Extra information can be associated with windows. This information can
be accessed by all clients using the server. Each property has a
name and a unique ID called an Atom. Properties have types which are also
indicated using Atoms (eg XA_STRING, XA_PIXMAP). The Atoms for
some common properties are predefined in <X11/Xatom.h>.
To create an Atom with a name, use
Atom XInternAtom(display,atom_name,only_if_exists)
char *atom_name;
int only_if_exists;/*If False then a new atom will be created if necessary;
if True, and there is no corresponding atom then None
is returned */ The inverse of this is,
char *XGetAtomName(display,atom)To obtain the atom type and property format, use
int GetWindowProperty(display,w,property,long_offset,long_length,delete,
req_type,actual_type,actual_format,nitems,bytes_after,prop);
Atom property;
long long_offset,long_length; /* the length and offset of data to be
received, in 32-bit quantities */
Bool delete; /*if True then the property is deleted */
Atom req_type; /*AnyPropertyType, etc */
Atom *actual_type; /*RETURN*/
int *actual_format; /*RETURN data type of returned data*/
unsigned long *nitems; /*RETURN*/
long *bytes_after; /*RETURN number of bytes left unread */
unsigned char **prop; /*RETURN*/
Possible return values are None, Success, BadWindow, BadMatch
Atom *XListProperties(display,w,num_prop)
int *num_prop; /*RETURN*/
XChangeProperty(display,w,property,type,format,mode,data,nelements)
Atom property,type;
int format; /*8,16 or 32*/
int mode; /* PropModeReplace, PropModePrePend, PropModeAppend*/
unsigned char *data;
int nelements;
XRotateWindowProperties(display,w,properties,num_props,npositions)
Atom properties[];
XDeleteProperty(display,w,property)