NAME
XInternAtom − return an atom for a given property name string.
Synopsis
Atom XInternAtom(display, property_name, only_if_exists)
Display *display;
char *property_name;
Bool only_if_exists;
Arguments
displaySpecifies a connection to an X server; returned from XOpenDisplay().
property_name
Specifies the string name of the property for which you want the atom. Upper or lower case is important. If the property name is not in the Host Portable Character Encoding, then the result is implementation-dependent.
only_if_exists
Specifies a boolean value: if no such property_name exists XInternAtom() will return None if this argument is set to True or will create the atom if it is set to False.
Description
XInternAtom() returns the atom identifier corresponding to string property_name. If the atom does not exist, then XInternAtom() either returns None (if only_if_exists is True) or creates the atom and returns its ID (if only_if_exists is False). The string name should be a null-terminated. Case matters: the strings "thing," "Thing," and "thinG" all designate different atoms. The atom will remain defined even after the client that defined it has exited. It will become undefined only when the last connection to the X server closes. Therefore, the number of atoms interned should be kept to a minimum. which returns the atom name when given an atom ID. Predefined atoms require no call to XInternAtom(). Predefined atoms are defined in <X11/Xatom.h> and begin with the prefix "XA_". Predefined atoms are the only ones that do not require a call to XInternAtom().
Errors
BadAlloc
BadValue
See Also
XChangeProperty(), XDeleteProperty(), XGetFontProperty(), XGetWindowProperty(), XListProperties(), XRotateWindowProperties(), XSetStandardProperties().
Copyright O’Reilly & Assoc. —