GNU Info

Info Node: (sawfish.info)X Properties

(sawfish.info)X Properties


Next: Window Stacking Prev: Input Focus Up: Windows
Enter node , (file) or (file)node

X Properties
============

   The X window system associates properties with windows (these are
totally separate to the properties that sawfish associates with window
_objects_, Note: Window Property Lists). Most inter-client
communication is performed through manipulation of these properties.

   All functions defined below, that operate on X properties, accept
their WINDOW parameter as either a window object (denoting the
associated client window), the numeric xid of a window, or the symbol
`root' denoting the root window.

   Sawfish represents X atoms (both the names and data types of  X
properties) as symbols. There is an exact correspondence between the
names of atoms and the name of the symbol representing them. For
example, the X atom `STRING' is represented by the lisp symbol `STRING'.

 - Function: list-x-properties window
     Return a list of symbols defining the X properties set on WINDOW.

 - Function: delete-x-property window property
     Deletes the X property named PROPERTY (a symbol) associated with
     WINDOW.

 - Function: get-x-property window property
     Returns a list `(TYPE FORMAT DATA)' representing the X property
     PROPERTY of WINDOW. If no such property exists, return nil.

     TYPE is the atom defining the type of the property. FORMAT is an
     integer, either 8, 16 or 32, defining the number of bits in each
     of the data items. DATA is an array, either a string for an 8-bit
     format property, or a vector of integers otherwise.

     If TYPE is `ATOM' and FORMAT is 32, then DATA will be a vector of
     symbols, representing the atoms read.

 - Function: set-x-property window property data type format
     Set the X property PROPERTY of WINDOW to the array DATA, either a
     string or a vector of integers.

     TYPE is a symbol representing the atom defining the type of the
     property; FORMAT is either 8, 16 or 32 defining the number of bits
     in the data values.

     If TYPE is `ATOM' and FORMAT is 32, then any symbols in DATA will
     be converted to their numeric X atoms.

   The standard X property formats don't allow for an array of strings
to be stored, so these are often encoded as the strings concatenated,
separated by zero characters. These are usually called "text
properties". Sawfish has two functions for manipulating them:

 - Function: get-x-text-property window property
     Similar to `get-x-property', but returns either `nil' or a vector
     of strings.

 - Function: set-x-text-property window property data
     Sets the X text property PROPERTY of WINDOW to the array of
     strings DATA.

   It's also possible to detect when the value of any property
associated with a managed window changes, using the
`property-notify-hook'.  Note: Standard Hooks.


automatically generated by info2www version 1.2.2.9