comparison lisp/objects.el @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents 70ad99077275
children 697ef44129c6
comparison
equal deleted inserted replaced
407:ed6218a7d4d3 408:501cfd01ee6d
44 (defun make-font-specifier (spec-list) 44 (defun make-font-specifier (spec-list)
45 "Return a new `font' specifier object with the given specification list. 45 "Return a new `font' specifier object with the given specification list.
46 SPEC-LIST can be a list of specifications (each of which is a cons of a 46 SPEC-LIST can be a list of specifications (each of which is a cons of a
47 locale and a list of instantiators), a single instantiator, or a list 47 locale and a list of instantiators), a single instantiator, or a list
48 of instantiators. See `make-specifier' for more information about 48 of instantiators. See `make-specifier' for more information about
49 specifiers." 49 specifiers.
50
51 Valid instantiators for font specifiers are:
52
53 -- a string naming a font (e.g. under X this might be
54 \"-*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*\" for a 14-point
55 upright medium-weight Courier font)
56 -- a font instance (use that instance directly if the device matches,
57 or use the string that generated it)
58 -- a vector of no elements (only on TTY's; this means to set no font
59 at all, thus using the \"natural\" font of the terminal's text)
60 -- a vector of one element (a face to inherit from)
61 "
50 (make-specifier-and-init 'font spec-list)) 62 (make-specifier-and-init 'font spec-list))
51 63
52 (defun font-name (font &optional domain charset) 64 (defun font-name (font &optional domain charset)
53 "Return the name of the FONT in the specified DOMAIN, if any. 65 "Return the name of the FONT in the specified DOMAIN, if any.
54 FONT should be a font specifier object and DOMAIN is normally a window 66 FONT should be a font specifier object and DOMAIN is normally a window
125 (defun make-color-specifier (spec-list) 137 (defun make-color-specifier (spec-list)
126 "Return a new `color' specifier object with the given specification list. 138 "Return a new `color' specifier object with the given specification list.
127 SPEC-LIST can be a list of specifications (each of which is a cons of a 139 SPEC-LIST can be a list of specifications (each of which is a cons of a
128 locale and a list of instantiators), a single instantiator, or a list 140 locale and a list of instantiators), a single instantiator, or a list
129 of instantiators. See `make-specifier' for a detailed description of 141 of instantiators. See `make-specifier' for a detailed description of
130 how specifiers work." 142 how specifiers work.
143
144 Valid instantiators for color specifiers are:
145
146 -- a string naming a color (e.g. under X this might be \"lightseagreen2\"
147 or \"#F534B2\")
148 -- a color instance (use that instance directly if the device matches,
149 or use the string that generated it)
150 -- a vector of no elements (only on TTY's; this means to set no color
151 at all, thus using the \"natural\" color of the terminal's text)
152 -- a vector of one or two elements: a face to inherit from, and
153 optionally a symbol naming which property of that face to inherit,
154 either `foreground' or `background' (if omitted, defaults to the same
155 property that this color specifier is used for; if this specifier is
156 not part of a face, the instantiator would not be valid)."
131 (make-specifier-and-init 'color spec-list)) 157 (make-specifier-and-init 'color spec-list))
132 158
133 (defun color-name (color &optional domain) 159 (defun color-name (color &optional domain)
134 "Return the name of the COLOR in the specified DOMAIN, if any. 160 "Return the name of the COLOR in the specified DOMAIN, if any.
135 COLOR should be a color specifier object and DOMAIN is normally a window 161 COLOR should be a color specifier object and DOMAIN is normally a window
144 and defaults to the selected window if omitted. This is equivalent 170 and defaults to the selected window if omitted. This is equivalent
145 to using `specifier-instance' and applying `color-instance-rgb-components' 171 to using `specifier-instance' and applying `color-instance-rgb-components'
146 to the result. See `make-specifier' for more information about specifiers." 172 to the result. See `make-specifier' for more information about specifiers."
147 (ws-object-property-1 'color-instance-rgb-components color domain)) 173 (ws-object-property-1 'color-instance-rgb-components color domain))
148 174
175 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; face-boolean specifiers
176
177 (defun make-face-boolean-specifier (spec-list)
178 "Return a new `face-boolean' specifier object with the given spec list.
179 SPEC-LIST can be a list of specifications (each of which is a cons of a
180 locale and a list of instantiators), a single instantiator, or a list
181 of instantiators. See `make-specifier' for a detailed description of
182 how specifiers work.
183
184 Valid instantiators for face-boolean specifiers are
185
186 -- t or nil
187 -- a vector of two or three elements: a face to inherit from,
188 optionally a symbol naming the property of that face to inherit from
189 (if omitted, defaults to the same property that this face-boolean
190 specifier is used for; if this specifier is not part of a face,
191 the instantiator would not be valid), and optionally a value which,
192 if non-nil, means to invert the sense of the inherited property."
193 (make-specifier-and-init 'color spec-list))
194
149 ;;; objects.el ends here. 195 ;;; objects.el ends here.