Next: , Previous: , Up: Windows   [Contents][Index]

8.3 Window Property Lists

Many window manager extensions need to be able to associate Lisp data with individual windows. For example, the module handling iconification needs to associate a boolean value with each window—whether that window is iconified or not.

To solve this problem, Sawfish gives each window a property list. These are exactly analogous to the property lists stored with each symbol (see Property Lists in The Librep Manual); they allow values to be associated with Lisp symbols, for a particular window.

Note that these properties are different to the properties that X stores with each window, since these properties are internal to the window manager (see X Properties).

For a list of the standard window properties, see Standard Properties.

Function: window-put window property value

Set the lisp property named property (a symbol) associated with window object window to value. Note that these are Lisp properties not X properties.

Function: window-get window property #!optional checker

Return the window property named property (a symbol) associated with the window object window, or nil if no such property exists. Note that these are Lisp properties not X properties.

If the optional third argument checker is non-nil, then checker is returned if the requested property does not exist. This is used to distinguish the assigned value of nil from property’s absence. A symbol is usually a good choice for checker.

Function: map-window-properties function window

Call (function property value) on each of the Lisp properties bound to window. Returns the value of the last function invocation. If any function returns nil, map-window-properties returns nil immediately.

Function: window-plist window

Returns the property list of the window window which is of the form (prop value prop value ...).

Do not attempt to change properties by modifying the property list in place. Use window-put instead.

Function: window-remprop window property

Remove property of window. Returns t for success, nil if the property did not exist.

Next: , Previous: , Up: Windows   [Contents][Index]