18.5 Implementation Issues
The Motif clipboard mechanism relies on an underlying X mechanism referred to as properties. As you know,
windows are data structures maintained by the X server; each window can have an arbitrary list of properties
associated with it. Each property consists of a name (called an atom), an arbitrary amount of data, and a format.
Property formats are not at all the same thing as the higher−level Motif formats−−they simply indicate whether the
data is a list of 8−bit, 16−bit, or 32−bit quantities, so that the server can perform byte−swapping, if appropriate.
Properties are the underlying mechanism for all interclient communication, including interaction between applications
and window managers, and interapplication interaction such as the transfer of selections.
In order to simplify communication over the network, property names are not passed as -arbitrary−length strings, but
as defined integers known as atoms. A number of standard properties (such as those used for communication between
applications and window managers) are predefined and interned, or made known to, and cached by the server.
However, -application−defined atoms can also be interned with the server by calling the Xlib function
XInternAtom() or the Motif function XmInternAtom(). Atoms are not only used to name properties, but to
name any string data that may need to be passed back and forth between a client and the server.
We started this chapter with the analogy that the Motif toolkit is the moderator ...