XInternAtom(), XGetAtomName() - create or return atom names
Atom XInternAtom (Display *display, char *atom_name,
Bool only_if_exists)
char *XGetAtomName (Display *display, Atom atom)
The XInternAtom(3) function returns the atom identifier associated with the specified atom_name string. If only_if_exists is False, the atom is created if it does not exist. Therefore, XInternAtom(3) can return None. If the atom name is not in the Host Portable Character Encoding the result is implementation dependent. Case matters; the strings thing, Thing, and thinG all designate different atoms. The atom will remain defined even after the client's connection closes. It will become undefined only when the last connection to the X server closes.
XInternAtom(3) can generate BadAlloc and BadValue errors.
The XGetAtomName(3) function returns the name associated with the specified atom. If the data returned by the server is in the Latin Portable Character Encoding, then the returned string is in the Host Portable Character Encoding. Otherwise, the result is implementation dependent. To free the resulting string, call XFree(3).
XGetAtomName(3) can generate a BadAtom error.
XFree()
Xlib