Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XGetWProp(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XInternAtom(3X)

XGetWindowProperty(3X)  —  X Version 11

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. This is the number of bytes remaining to be read in the property if a partial read was performed.

dataSpecifies the property data. 

deleteSpecifies a boolean value that determines whether the property is deleted from the window.  You can pass one of these constants: True or False.

displaySpecifies the connection to the X server. 

formatSpecifies whether the data should be viewed as a list of 8-bit, 16-bit, or 32-bit quantities.  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 a (char ∗) in the call to XChangeProperty. Possible values are 8, 16, and 32.

long_lengthSpecifies the length in 32-bit multiples of the data to be retrieved. 

long_offsetSpecifies the offset in the specified property (in 32-bit quantities) where data will be retrieved. 

modeSpecifies the mode of the operation.  You can pass one of these constants: PropModeReplace, PropModePrepend, or PropModeAppend.

nelementsSpecifies the number of elements of the specified data format (8-bit, 16-bit, or 32-bit). 

nitems_return
Returns the actual number of 8-bit, 16-bit, or 32-bit items stored in the prop_return data.

num_propSpecifies the length of the properties array. 

num_prop_return
Returns the length of the properties array.

npositionsSpecifies the rotation amount. 

prop_returnReturns a pointer to the data, in the specified format. 

propertySpecifies the property atom. 

propertiesSpecifies the array of properties that are to be rotated. 

req_typeSpecifies the atom identifier associated with the property type.  You can also pass AnyPropertyType.

typeSpecifies the type of the property.  The X server does not interpret the type but simply passes it back to an application that later calls XGetProperty.

wSpecifies the window ID. 

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. .PN 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. .PN 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. .PN XChangeProperty can generate BadAlloc, BadAtom, BadMatch, BadValue, and BadWindow errors.

The XRotateWindowProperties function allows you to rotate properties in the properties array and causes the X server to generate a PropertyNotify event. .PN 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. XDeleteProperty causes the X server to generate a PropertyNotify event on the window, unless the property does not exist. .PN XDeleteProperty can generate BadAtom and BadWindow errors.

DIAGNOSTICS

BadAlloc The server failed to allocate the requested resource or server memory. 

BadAtom A value for an Atom argument does not name a defined Atom. 

BadValue Some numeric value falls outside the range of values accepted by the request.  Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted.  Any argument defined as a set of alternatives can generate this error. 

BadWindow A value for a Window argument does not name a defined Window. 

SEE ALSO

XInternAtom(3X)
Xlib − C Language X Interface

1 March 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026