Go to the first, previous, next, last section, table of contents.

Image Specifiers

An image specifier is used for images (pixmaps and the like). It is used to describe the actual image in a glyph. It is instanced as an image-instance.

An image instantiator should be a string or a vector of the form

 [type :keyword value ...]

i.e. a type symbol followed by zero or more alternating keyword-value pairs. type should be one of

nothing
(Don't display anything; no keywords are valid for this.)
string
(Display this image as a text string.)
formatted-string
(Display this image as a text string, with replaceable fields; #### not implemented in 19.13.)
xbm
(An X bitmap; only if X support was compiled into this XEmacs.)
xpm
(An XPM pixmap; only if XPM support was compiled into this XEmacs.)
xface
(An X-Face bitmap, used to encode people's faces in e-mail messages; only if X-Face support was compiled into this XEmacs.)
autodetect
(XEmacs tries to guess what format the data is in. If X support exists, the data string will be checked to see if it names a filename. If so, and this filename contains XBM or XPM data, the appropriate sort of pixmap will be created. Otherwise, the image will be displayed as a string. If no X support exists, the image will always be displayed as a string.)

The valid keywords are:

:data
(Inline data. For most formats above, this should be a string. For XBM images, this should be a cons of three elements: width, height, and a string of bit data.)
:file
(Data is contained in a file. The value is the name of this file. If both :data and :file are specified, the image is created from what is specified in :data and the string in :file becomes the value of the image-instance-file-name function when applied to the resulting image-instance.)
:mask-data
(Only for XBM images. This specifies a mask to be used with the bitmap. The format is a cons of width, height, and bits, like for :data.)
:mask-file
(Only for XBM images. This specifies a file containing the mask data.)
:color-symbols
(Only for XPM images. This specifies an alist that maps strings that specify symbolic color names to the actual color to be used for that symbolic color (in the form of a string or a color-specifier object). If this is not specified, the contents of xpm-color-symbols are used to generate the alist.)

If instead of a vector, the instantiator is a string, it will be looked up according to the specs in the device-type-image-conversion-list for the device type of the domain over which the image is being instantiated.

If the instantiator is a string, it will be read in at the time that the instantiator is added to the image, and the instantiator will be converted into one of the [FILENAME ...] forms. This implies that the file must exist when the instantiator is added to the image, but does not need to exist at any other time (e.g. it may be a temporary file).

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

Variable: xpm-color-symbols
This variable holds definitions of logical color-names used when reading XPM files. Elements of this list should be of the form (color-name form-to-evaluate). The color-name should be a string, which is the name of the color to define; the form-to-evaluate should evaluate to a color specifier object, or a string to be passed to make-color-instance (see section Colors). If a loaded XPM file references a symbolic color called color-name, it will display as the computed color instead.

The default value of this variable defines the logical color names `"foreground"' and `"background"' to be the colors of the default face.

Variable: x-bitmap-file-path
A list of the directories in which X bitmap files may be found. If nil, this is initialized from the `"*bitmapFilePath"' resource. This is used by the make-image-instance function (however, note that if the environment variable `XBMLANGPATH' is set, it is consulted first).


Go to the first, previous, next, last section, table of contents.