Table of Contents

Name

XGetWindowProperty, XListProperties, XChangeProperty, XRotateWindowProperties, XDeleteProperty - obtain and change window properties

Syntax

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;

Arguments

actual_format_return
Returns the actual format of the property.
actual_type_return
Returns the atom identifier that defines the actual type of the property.
bytes_after_return
Returns the number of bytes remaining to be read in the property if a partial read was performed.
data
Specifies the property data.
delete
Specifies a Boolean value that determines whether the property is deleted.
display
Specifies the connection to the X server.
format
Specifies whether the data should be viewed as a list of 8-bit, 16-bit, or 32-bit quantities. Possible values are 8, 16, and 32. This information allows the X server to correctly perform byte-swap operations as necessary. If the format is 16-bit or 32-bit, you must explicitly cast your data pointer to an (unsigned char *) in the call to XChangeProperty.
long_length
Specifies the length in 32-bit multiples of the data to be retrieved.
long_offset
Specifies the offset in the specified property (in 32-bit quantities) where the data is to be retrieved.
mode
Specifies the mode of the operation. You can pass PropModeReplace, PropModePrepend, or PropModeAppend.
nelements
Specifies the number of elements of the specified data format.
nitems_return
Returns the actual number of 8-bit, 16-bit, or 32-bit items stored in the prop_return data.
num_prop
Specifies the length of the properties array.
num_prop_return
Returns the length of the properties array.
npositions
Specifies the rotation amount.
prop_return
Returns the data in the specified format.
property
Specifies the property name.
properties
Specifies the array of properties that are to be rotated.
req_type
Specifies the atom identifier associated with the property type or AnyPropertyType.
type
Specifies the type of the property. The X server does not interpret the type but simply passes it back to an application that later calls XGetWindowProperty.
w
Specifies the window whose property you want to obtain, change, rotate or delete.

Description

The XGetWindowProperty function returns the actual type of the property; the actual format of the property; the number of 8-bit, 16-bit, or 32-bit items transferred; the number of bytes remaining to be read in the property; and a pointer to the data actually returned. XGetWindowProperty sets the return arguments as follows: