Atoms.c File Reference

#include <X11/Intrinsic.h>
#include "Atoms.h"

Include dependency graph for Atoms.c:

Go to the source code of this file.

Data Structures

struct  _DisplayRec
struct  _AtomRec

Defines

#define STATIC   static
#define DeclareAtom(atom, text)

Typedefs

typedef _DisplayRec DisplayRec

Functions

 DeclareAtom (XA_ATOM_PAIR,"ATOM_PAIR")
char * XmuNameOfAtom (AtomPtr atom_ptr)
Atom XmuInternAtom (Display *d, AtomPtr atom_ptr)
char * XmuGetAtomName (Display *d, Atom atom)
void XmuInternStrings (Display *d, register String *names, register Cardinal count, register Atom *atoms)


Define Documentation

#define DeclareAtom ( atom,
text   ) 

Value:

STATIC struct _AtomRec __##atom = { text, NULL }; \
AtomPtr _##atom = &__##atom;

Definition at line 64 of file Atoms.c.

#define STATIC   static

Definition at line 60 of file Atoms.c.


Typedef Documentation

typedef struct _DisplayRec DisplayRec


Function Documentation

DeclareAtom ( XA_ATOM_PAIR  ,
"ATOM_PAIR"   
)

Definition at line 73 of file Atoms.c.

References NULL.

00106 {
00107     AtomPtr ptr = XtNew(struct _AtomRec);
00108     ptr->name = (char *) name;
00109     ptr->head = NULL;
00110     return ptr;
00111 }

char* XmuGetAtomName ( Display *  d,
Atom  atom 
)

Definition at line 139 of file Atoms.c.

References NULL.

00140 {
00141     if (atom == 0) return (NULL);
00142     return XGetAtomName(d, atom);
00143 }

Atom XmuInternAtom ( Display *  d,
AtomPtr  atom_ptr 
)

Definition at line 121 of file Atoms.c.

References _DisplayRec::atom, _DisplayRec::dpy, _AtomRec::head, _AtomRec::name, _DisplayRec::next, and NULL.

Referenced by FindFontSelection().

00122 {
00123     DisplayRec* display_rec;
00124     for (display_rec = atom_ptr->head; display_rec != NULL;
00125          display_rec = display_rec->next) {
00126         if (display_rec->dpy == d)
00127             return display_rec->atom;
00128     }
00129     display_rec = XtNew(DisplayRec);
00130     display_rec->next = atom_ptr->head;
00131     atom_ptr->head = display_rec;
00132     display_rec->dpy = d;
00133     display_rec->atom = XInternAtom(d, atom_ptr->name, False);
00134     return display_rec->atom;
00135 }

Here is the caller graph for this function:

void XmuInternStrings ( Display *  d,
register String *  names,
register Cardinal  count,
register Atom *  atoms 
)

Definition at line 147 of file Atoms.c.

References FALSE, and void().

Referenced by _GetSelection(), and _OwnSelection().

00149 {
00150     (void) XInternAtoms(d, (char**)names, (int)count, FALSE, atoms);
00151 }

Here is the call graph for this function:

Here is the caller graph for this function:

char* XmuNameOfAtom ( AtomPtr  atom_ptr  ) 

Definition at line 114 of file Atoms.c.

References _AtomRec::name.

Referenced by FindFontSelection().

00115 {
00116     return atom_ptr->name;
00117 }

Here is the caller graph for this function:


Generated on Sun Mar 4 16:03:24 2007 for Scilab [trunk] by  doxygen 1.5.1