int XGetWindowProperty(display, w, property, long_offset, long_length, delete, req_type, actual_type_return, actual_format_return, nitems_return, bytes_after_return, prop_return) Display *display; Window w; Atom property; long long_offset, long_length; Bool delete; Atom req_type; Atom *actual_type_return; int *actual_format_return; unsigned long *nitems_return; unsigned long *bytes_after_return; unsigned char **prop_return;Atom *XListProperties(display, w, num_prop_return) Display *display; Window w; int *num_prop_return;
XChangeProperty(display, w, property, type, format, mode, data, nelements) Display *display; Window w; Atom property, type; int format; int mode; unsigned char *data; int nelements;
XRotateWindowProperties(display, w, properties, num_prop, npositions) Display *display; Window w; Atom properties[]; int num_prop; int npositions;
XDeleteProperty(display, w, property) Display *display; Window w; Atom property;
N = actual length of the stored property in bytes (even if the format is 16 or 32) I = 4 * long_offset T = N - I L = MINIMUM(T, 4 * long_length) A = N - (I + L)The returned value starts at byte index I in the property (indexing from zero), and its length in bytes is L. If the value for long_offset causes L to be negative, a ``BadValue'' error results. The value of bytes_after_return is A, giving the number of trailing unread bytes in the stored property. If the returned format is 8, the returned data is represented as a ``char'' array. If the returned format is 16, the returned data is represented as a ``short'' array and should be cast to that type to obtain the elements. If the returned format is 32, the returned data is represented as a ``long'' array and should be cast to that type to obtain the elements.
The function returns Success if it executes successfully. To free the resulting data, use XFree.
XGetWindowProperty can generate ``BadAtom'', ``BadValue'', and ``BadWindow'' errors.
The XListProperties function returns a pointer to an array of atom properties that are defined for the specified window or returns NULL if no properties were found. To free the memory allocated by this function, use XFree.
XListProperties can generate a ``BadWindow'' error.
The XChangeProperty function alters the property for the specified window and causes the X server to generate a PropertyNotify event on that window. XChangeProperty performs the following:
If the returned format is 8, the returned data is represented as a ``char'' array. If the returned format is 16, the returned data is represented as a ``short'' array and should be cast to that type to obtain the elements. If the returned format is 32, the returned data is represented as a ``long'' array and should be cast to that type to obtain the elements.
XChangeProperty can generate ``BadAlloc'', ``BadAtom'', ``BadMatch'', ``BadValue'', and ``BadWindow'' errors.
The XRotateWindowProperties function allows you to rotate properties on a window and causes the X server to generate PropertyNotify events. If the property names in the properties array are viewed as being numbered starting from zero and if there are num_prop property names in the list, then the value associated with property name I becomes the value associated with property name (I + npositions) mod N for all I from zero to N - 1. The effect is to rotate the states by npositions places around the virtual ring of property names (right for positive npositions, left for negative npositions). If npositions mod N is nonzero, the X server generates a PropertyNotify event for each property in the order that they are listed in the array. If an atom occurs more than once in the list or no property with that name is defined for the window, a ``BadMatch'' error results. If a ``BadAtom'' or ``BadMatch'' error results, no properties are changed.
XRotateWindowProperties can generate ``BadAtom'', ``BadMatch'', and ``BadWindow'' errors.
The XDeleteProperty function deletes the specified property only if the property was defined on the specified window and causes the X server to generate a PropertyNotify event on the window unless the property does not exist.
XDeleteProperty can generate ``BadAtom'' and ``BadWindow'' errors.