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


48.5 Specifier Types

There are various different types of specifiers. The type of a specifier controls what sorts of instantiators are valid, how an instantiator is instantiated, etc. Here is a list of built-in specifier types:

boolean

The valid instantiators are the symbols t and nil. Instance objects are the same as instantiators so no special instantiation function is needed.

integer

The valid instantiators are integers. Instance objects are the same as instantiators so no special instantiation function is needed. modeline-shadow-thickness is an example of an integer specifier (negative thicknesses indicate that the shadow is drawn recessed instead of raised).

natnum

The valid instantiators are natnums (non-negative integers). Instance objects are the same as instantiators so no special instantiation function is needed. Natnum specifiers are used for dimension variables such as top-toolbar-height.

generic

All Lisp objects are valid instantiators. Instance objects are the same as instantiators so no special instantiation function is needed.

font

The valid instantiators are strings describing fonts or vectors indicating inheritance from the font of some face. Instance objects are font-instance objects, which are specific to a particular device. The instantiation method for font specifiers can fail, unlike for integer, natnum, boolean, and generic specifiers.

color

The valid instantiators are strings describing colors or vectors indicating inheritance from the foreground or background of some face. Instance objects are color-instance objects, which are specific to a particular device. The instantiation method for color specifiers can fail, as for font specifiers.

image

Images are perhaps the most complicated type of built-in specifier. The valid instantiators are strings (a filename, inline data for a pixmap, or text to be displayed in a text glyph) or vectors describing inline data of various sorts or indicating inheritance from the background-pixmap property of some face. Instance objects are either strings (for text images), image-instance objects (for pixmap images), or subwindow objects (for subwindow images). The instantiation method for image specifiers can fail, as for font and color specifiers.

face-boolean

The valid instantiators are the symbols t and nil and vectors indicating inheritance from a boolean property of some face. Specifiers of this sort are used for all of the built-in boolean properties of faces. Instance objects are either the symbol t or the symbol nil.

toolbar

The valid instantiators are toolbar descriptors, which are lists of toolbar-button descriptors (each of which is a vector of two or four elements). See Toolbar, for more information.

Color and font instance objects can also be used in turn as instantiators for a new color or font instance object. Since these instance objects are device-specific, the instantiator can be used directly as the new instance object, but only if they are of the same device. If the devices differ, the base color or font of the instantiating object is effectively used instead as the instantiator.

See Faces and Window-System Objects, for more information on fonts, colors, and face-boolean specifiers. See Glyphs, for more information about image specifiers. See Toolbar, for more information on toolbar specifiers.

Function: specifier-type specifier

This function returns the type of specifier. The returned value will be a symbol: one of integer, boolean, etc., as listed in the above table.

Functions are also provided to query whether an object is a particular kind of specifier:

Function: boolean-specifier-p object

This function returns non-nil if object is a boolean specifier.

Function: integer-specifier-p object

This function returns non-nil if object is an integer specifier.

Function: natnum-specifier-p object

This function returns non-nil if object is a natnum specifier.

Function: generic-specifier-p object

This function returns non-nil if object is a generic specifier.

Function: face-boolean-specifier-p object

This function returns non-nil if object is a face-boolean specifier.

Function: toolbar-specifier-p object

This function returns non-nil if object is a toolbar specifier.

Function: font-specifier-p object

This function returns non-nil if object is a font specifier.

Function: color-specifier-p object

This function returns non-nil if object is a color specifier.

Function: image-specifier-p object

This function returns non-nil if object is an image specifier.


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