3.  Window Functions  

(window? x)

Returns #t iff x is an object of type window.

(drawable? x)

Returns #t iff x is a ``drawable'' (window or pixmap).

(window-display window)

Returns the display associated with the window.

(create-window . args)

See XCreateWindow. This function is used to create a new window.

The number of arguments must be even. The 1st, 3rd, etc. argument is the name (a symbol) of an attribute to be set when the window is created, the 2nd, 4th, etc. argument is the corresponding value. The attributes can be specified in any order.

Attributes are x, y, width, height, border (each of which has an integer value), parent (the parent window), and all attributes that can be set by means of the set-window-attribute! functions below except sibling and stack-mode. The attributes parent, width, and height are mandatory. The default for x and y is 0, the default for border is 2.

(set-window-x! window value)
(set-window-y! window value)
(set-window-width! window value)
(set-window-height! window value)
(set-window-border-width! window value)
(set-window-sibling! window value)
(set-window-stack-mode! window value)
(set-window-background-pixmap! window value)
(set-window-background-pixel! window value)
(set-window-border-pixmap! window value)
(set-window-border-pixel! window value)
(set-window-bit-gravity! window value)
(set-window-gravity! window value)
(set-window-backing-store! window value)
(set-window-backing-planes! window value)
(set-window-backing-pixel! window value)
(set-window-save-under! window value)
(set-window-event-mask! window value)
(set-window-do-not-propagate-mask! window value)
(set-window-override-redirect! window value)
(set-window-colormap! window value)
(set-window-cursor! window value)

See XConfigureWindow, XChangeWindowAttributes. Set the sibling window, stacking mode, background pixmap, background pixel, border pixel, cursor, and other attributes (see the window- functions below) of the specified window.

The stacking mode is a symbol (above, below, top-if, bottom-if, opposite). The value argument to set-window-sibling! must be a window, set-window-background-pixmap! expects a pixmap, set-window-background-pixel! and set-window-border-pixel! expect a pixel, and set-window-cursor! expects a cursor argument. For the types of the value argument of the other functions see the return values of the window- functions below.

(window-x window)
(window-y window)
(window-width window)
(window-height window)
(window-border-width window)
(window-depth window)
(window-visual window)
(window-root window)
(window-class window)
(window-bit-gravity window)
(window-gravity window)
(window-backing-store window)
(window-backing-planes window)
(window-backing-pixel window)
(window-save-under window)
(window-colormap window)
(window-map-installed window)
(window-map-state window)
(window-all-event-masks window)
(window-your-event-mask window)
(window-do-not-propagate-mask window)
(window-override-redirect window)
(window-screen window)

See XGetWindowAttributes. Returns the x and y coordinates, width, height, border width, depth, visual, root window, class, bit gravity, window gravity, backing store availability, backing planes, backing pixel, save under availability, colormap, colormap installation information, map state, global event mask, local event mask, ``do-not-propagate'' mask, override redirect attribute, and screen of the specified window.

window-visual and window-screen always return the empty list in the current release of the software. window-root returns a window. window-class returns a symbol (input-output, input-only). window-bit-gravity returns a symbol (forget, north-west, north, north-east, west, center, east, south-west, south, south-east, static). window-gravity returns a symbol (same as window-bit-gravity with unmap instead of forget). window-backing-store returns a symbol (not-useful, when-mapped, always). window-backing-planes and window-backing-pixel return a pixel. window-save-under, window-map-installed and window-override-redirect return #t or #f. window-colormap returns a colormap. window-map-state returns a symbol (unmapped, unviewable, viewable). window-all-event-masks, window-your-event-mask, and window-do-not-propagate-mask return a list of symbols (event mask names such as enter-window, pointer-motion, etc.). All other functions return an integer.

(drawable-root drawable)
(drawable-x drawable)
(drawable-y drawable)
(drawable-width drawable)
(drawable-height drawable)
(drawable-border-width drawable)
(drawable-depth drawable)

See XGetGeometry. Returns the root window, x and y coordinates, width, height, border width, and depth of the specified drawable. drawable-root returns a window, all other functions return an integer.

(map-window window)

See XMapWindow.

(unmap-window window)

See XUnmapWindow.

(destroy-window window)

See XDestroyWindow.

(destroy-subwindows window)

See XDestroySubwindows.

(map-subwindows window)

See XMapSubwindows.

(unmap-subwindows window)

See XUnmapSubwindows.

(circulate-subwindows window direction)

See XCirculateSubwindows. direction is a symbol (raise-lowest or lower-highest).

(clear-window window)

Performs a clear-area on the entire window.

(raise-window window)

See XRaiseWindow.

(lower-window window)

See XLowerWindow.

(restack-windows list-of-windows)

See XRestackWindows.

(query-tree window)

See XQueryTree. Returns a list of three elements: root window, parent window, and children (a vector of windows).

(translate-coordinates src-window x y dst-window)

See XTranslateCoordinates. Returns a list of three elements: destination x and y, and child window.

(query-pointer window)

See XQueryPointer. Returns a list of eight elements: x and y, a boolean indicating whether the pointer is on the same screen as the specified window, the root window, the root window's x and y coordinates, the child window, and a list of modifier names (see grab-button below).


Markup created by unroff 1.0,    September 24, 1996,    net@informatik.uni-bremen.de