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


5.2 Creating Windows

A window is a drawable that can also receive input events. CLX represents a window with a window object. The create-window function creates a new window object.

Function: create-window &key :parent :x :y :width :height (:depth 0) (:border-width 0) (:class :copy) (:visual :copy) :background :border :gravity :bit-gravity :backing-store :backing-planes :backing-pixel :save-under :event-mask :do-not-propagate-mask :override-redirect :colormap :cursor
:parent

The parent window. This argument is required.

:x
:y

int16 coordinates for the outside upper-left corner of the new window with respect to the origin (inside upper-left corner) of the :parent. These arguments are required.

:width
:height

card16 values for the size of the new window. These arguments are required.

:depth

A card16 specifying the depth of the new window.

:class

One of :input-output, :input-only, or :copy.

:visual

A card29 ID specifying the visual type of the new window.

:background
:backing-pixel
:backing-planes
:backing-store
:bit-gravity
:border
:border-width
:colormap
:cursor
:do-not-propagate-mask
:event
:gravity
:override-redirect
:save-under

Initial attribute values for the new window. If nil, the default value is defined by the X protocol.See paragraph

Creates and returns a window. A :parent window must be specified; the first window created by a client will have a root window as its :parent. The new window is initially unmapped and is placed on top of its siblings in the stacking order. A :create-notify event is generated by the server.

The :class of a window can be :input-output or :input-only. Windows of class :input-only cannot be used as the destination drawable for graphics output and can never receive :exposure events, but otherwise operate the same as :input-output windows. The :class can also be :copy, in which case the new window has the same class as its :parent.

For an :input-output window, the :visual and :depth must be a combination supported by the :parent’s screen, but the :depth need not be the same as the :parent’s. The :parent of an :input-output window must also be :input-output. A :depth of 0 means that the depth of the :parent is used.

For an :input-only window, the :depth must be zero, and the :visual must be supported by the :parent’s screen. The :parent of an :input-only window can be of any class. The only attributes that can be given for an :input-only window are :cursor, :do-not-propagate-mask, :event-mask, :gravity, and :override-redirect.

window

Type window.


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