Next: , Previous: , Up: X Graphics   [Contents][Index]


17.9.1 X Graphics Type

A graphics device for X windows is created by passing the symbol x as the graphics device type name to make-graphics-device:

(make-graphics-device 'x #!optional display geometry suppress-map?)

where display is either a display object, #f, or a string; geometry is either #f or a string; and suppress-map? is a boolean or a vector (see below). A new window is created on the appropriate display, and a graphics device representing that window is returned.

Display specifies which X display the window is to be opened on; if it is #f or a string, it is passed as an argument to x-open-display, and the value returned by that procedure is used in place of the original argument. Geometry is an X geometry string, or #f which means to use the default geometry (which is specified as a resource).

Suppress-map?, if given, may take two forms. First, it may be a boolean: if #f (the default), the window is automatically mapped after it is created; otherwise, #t means to suppress this automatic mapping. The second form is a vector of three elements. The first element is a boolean with the same meaning as the boolean form of suppress-map?. The second element is a string, which specifies an alternative resource name to be used for looking up the window’s resources. The third element is also a string, which specifies a class name for looking up the window’s resources. The default value for suppress-map? is #f.

The default resource and class names are "schemeGraphics" and "SchemeGraphics" respectively.

The window is initialized using the resource and class names specified by suppress-map?, and is sensitive to the following resource properties:

Property        Class           Default
--------        -----           -------
geometry        Geometry        512x384+0+0
font            Font            fixed
borderWidth     BorderWidth     2
internalBorder  BorderWidth     [border width]
background      Background      white
foreground      Foreground      black
borderColor     BorderColor     [foreground color]
cursorColor     Foreground      [foreground color]
pointerColor    Foreground      [foreground color]

The window is created with a backing_store attribute of Always. The window’s name and icon name are initialized to "scheme-graphics".


Next: Utilities for X Graphics, Previous: X Graphics, Up: X Graphics   [Contents][Index]