Previous: Programming Considerations, Up: Introduction to CLX [Contents][Index]
The following are some data type definitions that are commonly used in CLX function definitions.
alist defines an association list. An association list is a sequence, containing zero or more repetitions of the given elements with each of the elements expressed as (type name).
angle defines an angle in units of radians and is bounded by (-2%pi;) and (2%pi;). Note that we are explicitly using a different angle representation than what is actually transmitted in the protocol.
arc-seq defines a six-tuple sequence of the form (x, y, width, height, angle1, angle2). The points x and y are signed, 16-bit quantities with a range from -32,768 to 32,767. The width and height values are unsigned, 16-bit quantities and range from 0 to 65,535. angle1 and angle2 are in units of radians, and bounded by (-2%pi;) and (2%pi;).
array-index defines a type which is a subtype of the integers and can be used to describe all variables that can be array indices. The range is inclusive because start and end array index specifiers can be one (1) past the end.
A keyword that specifies which region of a window should be retained when the window is resized.
gravity – One of the following:
If a window is reconfigured without changing its inside width or height, then the contents of the window moves with the window and are not lost. Otherwise, the contents of a resized window are either moved or lost, depending on its bit-gravity attribute. See window-bit-gravity, in Window Attributes, for additional information.
Specifies a two-dimensional array of bits.
A structure that describes the storage format of a bitmap.
The bitmap-format structure contains slots for unit, pad, and lsb-first-p. The unit member indicates the unit of increments used to maintain the bitmap data. The units available for use are 8, 16, or 32 bits. The pad member indicates how many bits are needed to pad the left edge of the scan-line. The lsb-first-p member is a predicate which indicates the ordering of bits with the bitmap unit.
Type: (member 8 16 32).
The size of a contiguous grouping of bits, which can be 8, 16, or 32. The default is 8.
Type: (member 8 16 32).
The number of bits to left-pad the scan-line, which can be 8, 16, or 32. The default is 8.
Type: boolean.
A predicate indicating whether the least significant bit comes first (true) or not (nil).
boolean defines a type which is all inclusive. It is used for variables that can take on a true (non-nil) or false (nil) value.
boole-constant defines a type that is a set of the values associated with the 16 boolean operation-code constants for the Common Lisp language. It is used for the set of allowed source and destination combination functions in a graphics context.
value – One of the following:
An unsigned integer value that is a maximum of eight bits long. This gives a number of this type a range from 0 to 255.
An unsigned integer value that is a maximum of 16 bits long. This gives a number of this type a range from 0 to 65,535.
An unsigned integer value that is a maximum of 29 bits long. This gives a number of this type a range from 0 to 536,870,911.
An unsigned integer value that is a maximum of 32 bits long. This gives a number of this type a range from 0 to 4,294,967,295.
A color. See Color Functions, for additional information.
A colormap. See Colormap Functions, for additional information.
A cursor. See Cursors, for additional information.
Provides a way to specify a set of bits for an event bitmask. Two ways of specifying the bits are allowed: by setting the event bits in a 32 bit mask, or by listing the keyword names of the device related event bits in a list.
A keyword name, for a device related event, that corresponds to a particular bit in an event bitmask. The set of names is a subset of the names in the type event-mask-class.
event – One of the following:
A connection to an X server. See Displays, for additional information.
Both windows and pixmaps can be used as sources and destinations in graphics operations. windows and pixmaps together are known as drawables. However, an :input-only window cannot be used as a source or destination in a graphics operation.
Defines a list of rotation directions for drawing arcs and fonts. draw-direction can have the values of :left-to-right or :right-to-left.
Defines a list of all predefined errors. All errors (synchronous and asynchronous) are processed by calling an error handler in the display. The handler is called with the display as the first argument and the error-key as its second argument.
error – One of the following:
Defines a list that specifies all predefined event-types. Clients are informed of information asynchronously by means of events. These events can be either asynchronously generated from devices or generated as side effects of client requests.
event-type – One of the following:
Provides a way to specify a set of bits for an event bitmask. Two ways of specifying the bits are allowed: by setting the event bits in a 32 bit mask, or by listing the keyword names of the event bits in a list.
The elements of the type event-mask-class are keyword names that correspond to a particular bit in an event bitmask.
event – One of the following:
Returns a list of event-mask-class keyword names for the event bits that are set in the specified event mask.
An event mask (type mask32).
event-mask-class keywords.
Constructs an event mask from a set of event-mask-class keyword names.
Type mask32.
A text font. See Font and Characters, for additional information.
A fontable is either a font object or the name of one of the fonts in the font database.
A list that contains alternating keywords and integers.
A graphics context. See Graphics Contexts, for additional information.
A list of predefined types for use in gcontext processing. Various information for graphics output is stored in a graphics context (GC or GContext), such as foreground pixel, background pixel, line width, clipping region, and so forth.
type – One of the following:
There are two kinds of grabs: active and passive. An active grab occurs when a single client grabs the keyboard and/or pointer explicitly. Clients can also grab a particular keyboard key or pointer button in a window. The grab activates when the key or button is actually pressed, and is called a passive grab. Passive grabs can be very convenient for implementing reliable pop-up menus.
grab-type – One of the following:
Used in determining the depth of a pixmap, window, or image. The value specifies the number of bits deep that a given pixel has within a given pixmap, window, or image.
Used to control the element size of the destination buffer given to the translate function when drawing glyphs. If :default is specified, the size is based on the current font, if known; otherwise, 16 is used.
A signed integer value that is a maximum of eight bits long. A number of this type can have a range from -128 to 127.
A signed integer value that is a maximum of 16 bits long. A number of this type can have a range from -32,768 to 32,767.
A signed integer value that is a maximum of 32 bits long. A number of this type can have a range from -2,147,483,648 to 2,147,483,647.
Used as an encoding of a symbol on a keycap on a keyboard. It is an unsigned integer value represented in a maximum of 32 bits long. A keysym type can have a range from 0 to 4,294,967,295.
A positional bitmask that contains 16 boolean flags.
A positional bitmask that contains 32 boolean flags.
A keyword identifying one of the modifier keys on the keyboard device.
modifier – One of the following:
A bitmask or list of keywords that specifies a set of modifier keys. The keyword :any is equivalent to any subset of modifier key.
Specifies a two-dimensional array of pixels.
An unsigned integer value that is a maximum of 32 bits long. This gives a pixel type a value range from 0 to 4,294,967,295. Useful values are dependent on the class of colormap being used.
A pixmap, see Pixmaps), for additional information.
A structure that describes the storage format of a pixmap.
The pixmap-format structure contains slots for depth, bits-per-pixel, and scanline-pad. The depth member indicates the number of bit planes in the pixmap. The bits-per-pixel member indicates the number of bits used to represent a single pixel. For X, a pixel can be 1, 4, 8, 16, 24, or 32 bits wide. As for bitmap-format, the scanline-pad member indicates how many pixels are needed to pad the left edge of the scan-line.
Type: image-depth.
The number of bit planes in the pixmap.
Type: (member 1 4 8 16 24 32).
The number of consecutive bits used to encode a single pixel. The default is 8.
Type: (member 8 16 32).
The number of bits to left-pad the scan-line, which can be 8, 16, or 32. The default is 8.
The point-seq type is used to define sequences of (x,y) pairs of points. The paired values are 16-bit, signed integer quantities. This gives the points in this type a range from -32,768 to 32,767.
Provides a way to specify a set of bits for an event bitmask. Two ways of specifying the bits are allowed: by setting the event bits in a 32 bit mask, or by listing the keyword names of the pointer related event bits in a list.
A keyword name, for a pointer related event, that corresponds to a particular bit in an event bitmask. The set of names is a subset of the names in the type event-mask-class.
event – One of the following:
rect-seq defines a four-tuple sequence of the form (x, y, width, height). The points x and y are signed, 16-bit quantities with a range from -32,768 to 32,767. The width and height values are unsigned, 16-bit quantities and range from 0 to 65,535.
A subtype used to define repeating sequences.
A numeric identifier that is assigned by the server to a server resource object.
An rgb-val is a floating-point value between 0 and 1 that specifies a saturation for a red, green, or blue additive primary. The 0 value indicates no saturation and 1 indicates full saturation.
A display screen. See Screens, for further information.
Defines sequences of (x1, y1, x2, y2) sets of points. The point values are 16-bit, signed integer quantities. This gives the points in this type a range from -32,768 to 32,767.
A keyword identifying one of the display modifier keys or pointer buttons whose state is reported in device events.
button – One of the following:
A 16-bit mask of type mask16.
Returns a list of state-mask-key symbols corresponding to the state-mask. A symbol belongs to the returned list if, and only if, the corresponding state-mask bit is 1.
Type list.
A list of state-mask-key symbols.
Returns a 16-bit mask representing the given state-mask-key symbols. The returned mask contains a 1 bit for each keyword.
Type mask16.
Used for naming something. This type can be either a string or a symbol whose symbol-name is used as the string containing the name. The case of the characters in the string is ignored when comparing stringables.
An encoding of a time. nil stands for the current time.
A structure that represents a visual type. The elements of this structure are id, class, red-mask, green-mask, blue-mask, bits-per-rgb, and colormap-entries.
Type: card29.
A unique identification number.
Type: (member :direct-color :gray-scale :pseudo-color :static-color :static-gray :true-color).
The class of the visual type.
Type: pixel.
The red-mask, green-mask, and blue-mask elements are only meaningful for the :direct-color and :true-color classes. Each mask has one contiguous set of bits with no intersections.
Type: card8.
Specifies the log base 2 of the approximate number of distinct color values ( individually) of red, green, and blue. Actual RGB values are unsigned 16-bit numbers.
Type: card16.
Defines the number of available colormap entries in a newly created colormap. For :direct-color and :true-color, this is the size of an individual pixel subfield.
A keyword that specifies how to reposition a window when its parent is resized.
gravity – One of the following:
If a parent window is reconfigured without changing its inside width or height, then all child windows move with the parent and are not changed. Otherwise, each child of the resized parent is moved, depending on the child’s gravity attribute. See window-gravity (see Window Attributes)), for additional information.
A window. See Windows and Pixmaps, for additional information.
A structure that contains size hints for the window manager.
Type: (or null int32).
This slot is obsolete. New window managers do not use it.
Type: (or null int32).
This slot is obsolete. New window managers do not use it.
Type: (or null card32).
This slot is obsolete. New window managers do not use it. They will use the min-width and max-width slots instead.
Type: (or null card32).
This slot is obsolete. New window managers do not use it. They will use the min-height and max-height slots instead.
Type: (or null card32).
This slot indicates the smallest width for which the application still works properly.
Type: (or null card32).
This slot indicates the smallest height for which the application still works properly.
Type: (or null card32).
This slot indicates the largest width for which the application still works properly.
Type: (or null card32).
This slot indicates the largest height for which the application still works properly.
Type: (or null card32).
This slot defines an arithmetic progression of widths (minimum to maximum) into which the window prefers to be resized.
Type: (or null card32).
This slot defines an arithmetic progression of heights (minimum to maximum) into which the window prefers to be resized.
Type: (or null number).
This slot specifies the minimum aspect ratio (the fraction x size divided by y size) preferred by the application.
Type: (or null number).
This slot specifies the maximum aspect ratio (the fraction x size divided by y size) preferred by the application.
Type: (or null card32).
This slot specifies the desired width of the window.
Type: (or null card32).
This slot specifies the desired height of the window.
Type: (or null win-gravity).
The window manager will interpret the position of the window and its border width to position the point of the outer rectangle of the overall window specified by the value of this slot. The outer rectangle of the window includes any borders or decorations supplied by the window manager. In other words, if the window manager decides to place the window where the client asked, the position on the parent window’s border named by the value of this slot will be placed where the client window would have been placed in the absence of a window manager.
A name that has been assigned a corresponding unique ID by the server. xatoms are used to identify properties, selections, and types defined in the X server. An xatom can be either a string or symbol whose symbol-name is used as the xatom name. The case of the characters in the string are significant when comparing xatoms.
Previous: Programming Considerations, Up: Introduction to CLX [Contents][Index]