In X, an atom is a unique ID used as the name for certain server resources -- properties and selections.
In CLX, an atom is represented by a keyword symbol. For convenience, CLX functions also allow atoms to be specified by strings and non-keyword symbols. xatom is a CLX data type that permits either string or symbol values. A string is equivalent to the xatom given by (intern string 'keyword). A symbol is equivalent to the xatom given by ( intern (symbol-name symbol) 'keyword). The symbol name string of an xatom must consist only of ISO Latin characters. Note that the case of xatom strings is important; the xatom "Atom" is not the same as the xatom "ATOM".
Certain atoms are already predefined by every X server. Predefined atoms are designed to represent common names that are likely to be useful for many client applications. Note that these atoms are predefined only in the sense of having xatom and card29 values, not in the sense of having required semantics. No interpretation is placed on the meaning or use of an atom by the server. The xatom objects predefined by CLX are listed below.
When creating a new atom, the following conventions should be obeyed in order to minimize the conflict between atom names:
CLX provides functions to convert between an xatom and its corresponding ID integer. The data type of an atom ID is card29. The xatom representation is usually sufficient for most CLX programs. However, it is occasionally useful to be able to convert an atom ID returned in events or properties into its corresponding xatom.
Returns the atom keyword for the atom-id on the given display server.
Returns the atom ID for the given atom-name, if it exists. If no atom of that name exists for the display server, nil is returned.
Creates an atom with the given name and returns its atom ID. The atom can survive the interning client; it exists until the last server connection has been closed and the server resets itself.