Documentation
From my personal library, The Internet

man page:



SYNTAX

       int XGetWindowProperty(Display *display, Window w, Atom property, long
              long_offset, long 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 *display, Window w, int
              *num_prop_return); int XChangeProperty(Display *display, Window
              w, Atom property, Atom type, int format, int mode, unsigned char
              *data, int nelements);

       int XRotateWindowProperties(Display *display, Window w, Atom proper-
              ties[], int num_prop, int npositions);

       int XDeleteProperty(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 prop-
                 erty if a partial read was performed.

       data      Specifies the property data.

       delete    Specifies a Boolean value that determines whether the prop-
                 erty 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 cor-
                 rectly 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 XChange-
                 Property.

       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.
                 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 applica-
                 tion 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 prop-
       erty; 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.  XGetWin-
       dowProperty sets the return arguments as follows:

       o    If the specified property does not exist for the specified window,
            XGetWindowProperty returns None to actual_type_return and the
            value zero to actual_format_return and bytes_after_return.  The
            nitems_return argument is empty.  In this case, the delete argu-
            ment is ignored.

       o    If the specified property exists but its type does not match the
            specified type, XGetWindowProperty returns the actual property
            type to actual_type_return, the actual property format (never
            zero) to actual_format_return, and the property length in bytes
            (even if the actual_format_return is 16 or 32) to
            bytes_after_return.  It also ignores the delete argument.  The
            nitems_return argument is empty.

       o    If the specified property exists and either you assign AnyProper-
            tyType to the req_type argument or the specified type matches the
            actual property type, XGetWindowProperty returns the actual prop-
            erty type to actual_type_return and the actual property format
            (never zero) to actual_format_return.  It also returns a value to
            bytes_after_return and nitems_return, by defining the following
            values:

       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 ele-
       ments.  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.

       XGetWindowProperty always allocates one extra byte in prop_return (even
       if the property is zero length) and sets it to zero so that simple
       properties consisting of characters do not have to be copied into yet
       another string before use.

       If delete is True and bytes_after_return is zero, XGetWindowProperty
       deletes the property from the window and generates a PropertyNotify
       event on the window.

       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 func-
       tion, use XFree.

       XListProperties can generate a BadWindow error.

       The XChangeProperty function alters the property for the specified win-
       dow and causes the X server to generate a PropertyNotify event on that
       window.  XChangeProperty performs the following:

       o    If mode is PropModeReplace, XChangeProperty discards the previous
            property value and stores the new data.

       o    If mode is PropModePrepend or PropModeAppend, XChangeProperty
            inserts the specified data before the beginning of the existing
            data or onto the end of the existing data, respectively.  The type
            and format must match the existing property value, or a BadMatch
            error results.  If the property is undefined, it is treated as
            defined with the correct type and format with zero-length data.

       If the specified format is 8, the property data must be a char array.
       If the specified format is 16, the property data must be a short array.
       If the specified format is 32, the property data must be a long array.

       The lifetime of a property is not tied to the storing client.  Proper-
       ties remain until explicitly deleted, until the window is destroyed, or
       until the server resets.  For a discussion of what happens when the
       connection to the X server is closed, see section 2.6.  The maximum
       size of a property is server dependent and can vary dynamically depend-
       ing on the amount of memory the server has available.  (If there is
       insufficient space, a BadAlloc error results.)
       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 win-
       dow, 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.


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

       XFree(3X11), XInternAtom(3X11)
       Xlib - C Language X Interface



X Version 11                      Release 6.6         XGetWindowProperty(3X11)

Man(1) output converted with man2html