Mercurial > hg > xemacs-beta
annotate src/faces.h @ 5617:b0d712bbc2a6
The "flush" face property.
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2011-12-23 Didier Verna <didier@xemacs.org>
* faces.h (struct Lisp_Face): New 'flush slot.
* faces.h (struct face_cachel): New 'flush and 'flush_specified
flags.
* faces.h (WINDOW_FACE_CACHEL_FLUSH_P):
* faces.h (FACE_FLUSH_P): New macros.
* faces.c: Declare Qflush.
* lisp.h: Externalize it.
* faces.c (syms_of_faces): Define it.
* faces.c (vars_of_faces): Update built-in face specifiers.
* faces.c (complex_vars_of_faces): Update specifier fallbacks.
* faces.c (mark_face):
* faces.c (face_equal):
* faces.c (face_getprop):
* faces.c (face_putprop):
* faces.c (face_remprop):
* faces.c (face_plist):
* faces.c (reset_face):
* faces.c (update_face_inheritance_mapper):
* faces.c (Fmake_face):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (Fcopy_face):
* fontcolor.c (face_boolean_validate): Handle the flush property.
* redisplay.h (struct display_line): Rename 'default_findex slot to
clearer name 'clear_findex.
* redisplay.h (DISPLAY_LINE_INIT): Update accordingly.
* redisplay-output.c (compare_display_blocks):
* redisplay-output.c (output_display_line):
* redisplay-output.c (redisplay_output_window):
* redisplay.c (regenerate_window_extents_only_changed):
* redisplay.c (regenerate_window_incrementally): Update the
comparison tests between the current and desired display lines to
cope for different 'clear_findex values.
* redisplay.c (create_text_block): Initialize the display line's
'clear_findex slot to DEFAULT_INDEX. Record a new 'clear_findex
value when we encounter a newline character displayed in a flushed
face.
* redisplay.c (create_string_text_block): Record a new
'clear_findex value when we encounter a newline character
displayed in a flushed face.
lisp/ChangeLog addition:
2011-12-23 Didier Verna <didier@xemacs.org>
* cl-macs.el (face-flush-p): New defsetf.
* faces.el (set-face-property): Document the flush property.
* faces.el (face-flush-p): New function.
* faces.el (set-face-flush-p): New function.
* faces.el (face-equal):
* cus-face.el (custom-face-attributes):
* x-faces.el (x-init-face-from-resources):
* x-faces.el (make-face-x-resource-internal): Handle the flush
property.
author | Didier Verna <didier@xemacs.org> |
---|---|
date | Fri, 23 Dec 2011 10:56:16 +0100 |
parents | 308d34e9f07d |
children | 75ad4969a16d |
rev | line source |
---|---|
428 | 1 /* Face data structures. |
2 Copyright (C) 1995 Board of Trustees, University of Illinois. | |
5043 | 3 Copyright (C) 1995, 2002, 2010 Ben Wing |
5080
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
4 Copyright (C) 2010 Didier Verna |
428 | 5 |
6 This file is part of XEmacs. | |
7 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5157
diff
changeset
|
8 XEmacs is free software: you can redistribute it and/or modify it |
428 | 9 under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5157
diff
changeset
|
10 Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5157
diff
changeset
|
11 option) any later version. |
428 | 12 |
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5157
diff
changeset
|
19 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
428 | 20 |
21 /* Synched up with: Not in FSF. */ | |
22 | |
440 | 23 #ifndef INCLUDED_faces_h_ |
24 #define INCLUDED_faces_h_ | |
428 | 25 |
771 | 26 #include "charset.h" /* for NUM_LEADING_BYTES */ |
3659 | 27 #include "specifier.h" |
428 | 28 |
440 | 29 /* a Lisp_Face is the C object corresponding to a face. There is one |
30 of these per face. It basically contains all of the specifiers for | |
31 the built-in face properties, plus the plist of user-specified | |
428 | 32 properties. */ |
33 | |
34 struct Lisp_Face | |
35 { | |
5127
a9c41067dd88
more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents:
5126
diff
changeset
|
36 NORMAL_LISP_OBJECT_HEADER header; |
428 | 37 |
38 Lisp_Object name; | |
39 Lisp_Object doc_string; | |
40 unsigned int dirty :1; /* Set whenever a face property is changed on | |
41 a face. */ | |
42 | |
43 Lisp_Object foreground; | |
44 Lisp_Object background; | |
45 Lisp_Object font; | |
46 | |
47 Lisp_Object display_table; | |
48 Lisp_Object background_pixmap; | |
5080
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
49 Lisp_Object background_placement; |
428 | 50 |
51 Lisp_Object underline; | |
52 Lisp_Object strikethru; | |
53 Lisp_Object highlight; | |
54 Lisp_Object dim; | |
55 Lisp_Object blinking; | |
56 Lisp_Object reverse; | |
5617
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
57 Lisp_Object flush; |
428 | 58 |
59 Lisp_Object plist; | |
60 | |
61 Lisp_Object charsets_warned_about; | |
62 }; | |
63 | |
64 /* | |
65 | |
66 A face cache element caches the results of instantiating the | |
67 properties of a face in a particular window. (Instantiation can | |
68 take a long time so this is very important.) Each window contains | |
69 an array of face cache elements (called the "face cache"), one for | |
70 each face that has been seen in the window so far. | |
71 | |
72 Some tricky stuff is done to make sure the face cache does not | |
73 become inconsistent: | |
74 | |
75 1) Switching buffers in a window clears the face cache for that | |
76 window, because this can change the way any property is | |
77 instantiated in the window. | |
78 2) Setting a face property causes that face to be marked as | |
79 dirty. This causes various stuff to happen to make sure | |
80 the appropriate face cache elements are invalidated. | |
81 (#### Actually this doesn't work quite right, and errs | |
82 too much on the side of invalidating unnecessary stuff.) | |
83 | |
84 There are also face cache elements for "merged faces", which are the | |
85 result of merging all the faces that overlap a particular buffer | |
86 position. The merging is always done in the context of a particular | |
87 domain (specifically, a window), and the face cache element is | |
88 specific to a particular window. (Face cache elements are contained | |
89 in an array that is attached to each struct_window.) The reason that | |
90 the merging takes place in the context of a particular window has | |
91 to do with the way the merging works: | |
92 | |
93 1) All extents overlying the buffer position are sorted by descending | |
94 priority. | |
95 2) The property of a particular merged face comes from the highest- | |
96 priority face that specifies a value for that particular property. | |
97 3) The way to determine whether a face specifies a value for a | |
98 particular property is to instantiate that face's property in | |
99 the window in question with the no-fallback option set, to | |
100 see if we got anything. | |
101 | |
102 For Mule, things get a bit trickier because there can be multiple | |
103 fonts per face/window combination -- the charset is an argument | |
104 to specifier-instance. | |
105 | |
106 We have two possible data structure representations: | |
107 | |
108 1) Keep the original "one font per face cache element" representation | |
109 and use a different face cache element for each charset. | |
110 2) Allow multiple fonts to be in a single face cache element. | |
111 | |
112 I've chosen to use (2) -- the data structure gets more complicated | |
113 but the algorithms for maintaining face cache elements end up | |
114 simpler. | |
115 */ | |
116 | |
117 #define NUM_STATIC_CACHEL_FACES 4 | |
118 | |
119 typedef struct face_cachel face_cachel; | |
120 struct face_cachel | |
121 { | |
3092 | 122 #ifdef NEW_GC |
5127
a9c41067dd88
more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents:
5126
diff
changeset
|
123 NORMAL_LISP_OBJECT_HEADER header; |
3263 | 124 #endif /* NEW_GC */ |
428 | 125 /* There are two kinds of cachels; those created from a single face |
126 and those created by merging more than one face. In the former | |
127 case, the FACE element specifies the face used. In the latter | |
128 case, the MERGED_FACES_STATIC and MERGED_FACES elements specify | |
129 the faces used for merging by giving the indices of the | |
130 corresponding single-face cachels. | |
131 | |
132 Formerly we didn't bother to keep track of the faces used for | |
442 | 133 merging. We do now because we need to do so because there is no |
428 | 134 other way to properly handle multiple charsets for Mule in the |
135 presence of display tables short of always computing the values | |
136 for all charsets, which is very expensive. Instead, we use a | |
137 lazy scheme where we only compute the font for a particular charset | |
138 when it is needed. (The exception is the font for the ASCII charset. | |
139 We always compute it, just like the other attributes, because | |
140 many places in the C code refer to the font of the ASCII charset | |
141 and expect it to always be there.) | |
142 | |
143 We store the first four faces in a static array, and use a | |
144 Dynarr for the rest. This has the advantage that the space used | |
145 is small but the Dynarr will almost never be created, so we | |
146 won't spend much time in malloc()/free(). | |
147 | |
148 The order of the faces here is decreasing extent priority. */ | |
149 Lisp_Object face; | |
150 int merged_faces_static[NUM_STATIC_CACHEL_FACES]; | |
151 int_dynarr *merged_faces; | |
152 int nfaces; | |
153 | |
154 /* The values stored here are computed by calling specifier_instance() | |
155 on the appropriate specifiers. This means that we will have either | |
156 a value computed from the face itself or a value computed from the | |
157 default face. We need to distinguish the two so that merging works | |
158 properly -- a value that comes from the default face is treated | |
159 as "unspecified" during merging and is overridden by lower-priority | |
160 faces. This is what the _specified flags below are for. */ | |
161 | |
162 Lisp_Object foreground; | |
163 Lisp_Object background; | |
771 | 164 /* There are currently 128 or 129 possible charsets under Mule. For the |
428 | 165 moment we just take the easy way out and allocate space for each |
166 of them. This avoids messing with Dynarrs. | |
167 | |
168 #### We should look into this and probably clean it up | |
3094 | 169 to use Dynarrs. This may be a big space hog as is. |
170 sjt sez: doesn't look like it, my total face cache is 170KB. | |
171 Could be reduced to maybe 50KB. */ | |
428 | 172 Lisp_Object font[NUM_LEADING_BYTES]; |
173 | |
174 Lisp_Object display_table; | |
175 Lisp_Object background_pixmap; | |
5080
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
176 Lisp_Object background_placement; |
428 | 177 |
178 unsigned int underline :1; | |
179 unsigned int strikethru :1; | |
180 unsigned int highlight :1; | |
181 unsigned int dim :1; | |
182 unsigned int blinking :1; | |
183 unsigned int reverse :1; | |
5617
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
184 unsigned int flush :1; |
428 | 185 |
186 /* Used when merging to tell if the above field represents an actual | |
187 value of this face or a fallback value. */ | |
3659 | 188 DECLARE_INLINE_LISP_BIT_VECTOR(NUM_LEADING_BYTES) font_specified; |
189 | |
428 | 190 unsigned int foreground_specified :1; |
191 unsigned int background_specified :1; | |
192 unsigned int display_table_specified :1; | |
193 unsigned int background_pixmap_specified :1; | |
5080
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
194 unsigned int background_placement_specified :1; |
428 | 195 |
196 unsigned int strikethru_specified :1; | |
197 unsigned int underline_specified :1; | |
198 unsigned int highlight_specified :1; | |
199 unsigned int dim_specified :1; | |
200 unsigned int blinking_specified :1; | |
201 unsigned int reverse_specified :1; | |
5617
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
202 unsigned int flush_specified :1; |
428 | 203 |
204 /* The updated flag is set after we calculate the values for the | |
205 face cachel and cleared whenever a face changes, to indicate | |
206 that the values stored here might be wrong. The next time | |
207 we go to access the values, we recompute them; if any values | |
208 change, we set the DIRTY flag, which tells the output routines | |
209 that a face value has in fact changed and the sections of text | |
210 using this face need to be redrawn. | |
211 | |
212 It is trickier with fonts because we don't automatically | |
213 recompute the fonts but do it only when it is necessary. | |
214 (The ASCII font is an exception, of course; see above). | |
215 | |
216 In the case of fonts, we maintain a separate updated flag | |
217 for each font. Whenever we need to access the font for | |
218 a particular charset, we recalculate it if either its | |
219 value is Qunbound (meaning it's never been computed at all) | |
220 or the updated flag is not set. We set the dirty flag if | |
221 the value is not the same as before and the previous value | |
222 was not Qunbound. | |
223 | |
224 #### Note that we don't yet deal with the case of the new | |
225 value being Qunbound, as could happen if no fonts of the | |
226 right sort are available on the system. In this case, the | |
227 whole program will just crash. For the moment, this is | |
228 OK (for debugging purposes) but we should fix this by | |
229 storing a "blank font" if the instantiation fails. */ | |
230 unsigned int dirty :1; | |
231 unsigned int updated :1; | |
3659 | 232 |
233 DECLARE_INLINE_LISP_BIT_VECTOR(NUM_LEADING_BYTES) font_updated; | |
234 | |
235 /* Whether the font for the charset in question was determined in the | |
236 "final stage"; that is, the last stage Lisp code could specify it, | |
237 after the initial stage and before the fallback. */ | |
238 DECLARE_INLINE_LISP_BIT_VECTOR(NUM_LEADING_BYTES) font_final_stage; | |
428 | 239 }; |
240 | |
3092 | 241 #ifdef NEW_GC |
242 typedef struct face_cachel Lisp_Face_Cachel; | |
243 | |
5118
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
3676
diff
changeset
|
244 DECLARE_LISP_OBJECT (face_cachel, Lisp_Face_Cachel); |
3092 | 245 |
246 #define XFACE_CACHEL(x) \ | |
247 XRECORD (x, face_cachel, Lisp_Face_Cachel) | |
248 #define wrap_face_cachel(p) wrap_record (p, face_cachel) | |
249 #define FACE_CACHEL_P(x) RECORDP (x, face_cachel) | |
250 #define CHECK_FACE_CACHEL(x) CHECK_RECORD (x, face_cachel) | |
251 #define CONCHECK_FACE_CACHEL(x) CONCHECK_RECORD (x, face_cachel) | |
252 #endif /* NEW_GC */ | |
253 | |
5118
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
3676
diff
changeset
|
254 DECLARE_LISP_OBJECT (face, Lisp_Face); |
440 | 255 #define XFACE(x) XRECORD (x, face, Lisp_Face) |
617 | 256 #define wrap_face(p) wrap_record (p, face) |
428 | 257 #define FACEP(x) RECORDP (x, face) |
258 #define CHECK_FACE(x) CHECK_RECORD (x, face) | |
259 | |
260 Lisp_Object ensure_face_cachel_contains_charset (struct face_cachel *cachel, | |
261 Lisp_Object domain, | |
262 Lisp_Object charset); | |
263 void ensure_face_cachel_complete (struct face_cachel *cachel, | |
264 Lisp_Object domain, | |
265 unsigned char *charsets); | |
266 void update_face_cachel_data (struct face_cachel *cachel, | |
267 Lisp_Object domain, | |
268 Lisp_Object face); | |
269 void face_cachel_charset_font_metric_info (struct face_cachel *cachel, | |
270 unsigned char *charsets, | |
271 struct font_metric_info *fm); | |
272 void mark_face_cachels (face_cachel_dynarr *elements); | |
273 void mark_face_cachels_as_clean (struct window *w); | |
274 void mark_face_cachels_as_not_updated (struct window *w); | |
275 void reset_face_cachel (struct face_cachel *inst); | |
276 void reset_face_cachels (struct window *w); | |
277 face_index get_builtin_face_cache_index (struct window *w, | |
278 Lisp_Object face); | |
3094 | 279 /* WARNING: this interface may change. */ |
280 face_index merge_face_list_to_cache_index (struct window *w, | |
281 Lisp_Object *face_list, int count); | |
282 | |
428 | 283 #ifdef MEMORY_USAGE_STATS |
284 int compute_face_cachel_usage (face_cachel_dynarr *face_cachels, | |
5157
1fae11d56ad2
redo memory-usage mechanism, add way of dynamically initializing Lisp objects
Ben Wing <ben@xemacs.org>
parents:
5128
diff
changeset
|
285 struct usage_stats *ustats); |
428 | 286 #endif /* MEMORY_USAGE_STATS */ |
287 | |
288 EXFUN (Fface_name, 1); | |
289 EXFUN (Ffind_face, 1); | |
290 EXFUN (Fget_face, 1); | |
291 | |
292 extern Lisp_Object Qstrikethru, Vbuilt_in_face_specifiers, Vdefault_face; | |
293 extern Lisp_Object Vleft_margin_face, Vpointer_face, Vright_margin_face; | |
432 | 294 extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face; |
428 | 295 extern Lisp_Object Vtoolbar_face, Vgui_element_face, Vwidget_face; |
296 | |
297 void mark_all_faces_as_clean (void); | |
298 void init_frame_faces (struct frame *f); | |
299 void init_device_faces (struct device *d); | |
300 void init_global_faces (struct device *d); | |
301 face_index get_extent_fragment_face_cache_index (struct window *w, | |
302 struct extent_fragment *ef); | |
303 void update_frame_face_values (struct frame *f); | |
304 void face_property_was_changed (Lisp_Object face, Lisp_Object property, | |
305 Lisp_Object locale); | |
306 void default_face_font_info (Lisp_Object domain, int *ascent, | |
5047
07dcc7000bbf
put width before height consistently, fix a real bug found in the process
Ben Wing <ben@xemacs.org>
parents:
5043
diff
changeset
|
307 int *descent, int *width, int *height, |
428 | 308 int *proportional_p); |
5047
07dcc7000bbf
put width before height consistently, fix a real bug found in the process
Ben Wing <ben@xemacs.org>
parents:
5043
diff
changeset
|
309 void default_face_width_and_height (Lisp_Object domain, int *width, |
07dcc7000bbf
put width before height consistently, fix a real bug found in the process
Ben Wing <ben@xemacs.org>
parents:
5043
diff
changeset
|
310 int *height); |
428 | 311 |
312 #define FACE_CACHEL_FONT(cachel, charset) \ | |
771 | 313 (cachel->font[XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE]) |
428 | 314 |
3659 | 315 #define FACE_CACHEL_FONT_UPDATED(x) \ |
316 ((struct Lisp_Bit_Vector *)(&((x)->font_updated))) | |
317 #define FACE_CACHEL_FONT_SPECIFIED(x) \ | |
318 ((struct Lisp_Bit_Vector *)(&((x)->font_specified))) | |
319 #define FACE_CACHEL_FONT_FINAL_STAGE(x) \ | |
320 ((struct Lisp_Bit_Vector *)(&((x)->font_final_stage))) | |
321 | |
428 | 322 #define WINDOW_FACE_CACHEL(window, index) \ |
323 Dynarr_atp ((window)->face_cachels, index) | |
324 | |
325 #define FACE_CACHEL_FINDEX_UNSAFE(cachel, offset) \ | |
326 ((offset) < NUM_STATIC_CACHEL_FACES \ | |
327 ? (cachel)->merged_faces_static[offset] \ | |
328 : Dynarr_at ((cachel)->merged_faces, (offset) - NUM_STATIC_CACHEL_FACES)) | |
329 | |
330 #define WINDOW_FACE_CACHEL_FACE(window, index) \ | |
331 (WINDOW_FACE_CACHEL (window, index)->face) | |
332 #define WINDOW_FACE_CACHEL_FOREGROUND(window, index) \ | |
333 (WINDOW_FACE_CACHEL (window, index)->foreground) | |
334 #define WINDOW_FACE_CACHEL_BACKGROUND(window, index) \ | |
335 (WINDOW_FACE_CACHEL (window, index)->background) | |
336 /* #### This can be referenced by various functions, | |
337 but face_cachels isn't initialized for the stream device. | |
338 Since it doesn't need the value we just return nil here to avoid | |
339 blowing up in multiple places. */ | |
340 #define WINDOW_FACE_CACHEL_FONT(window, index, charset) \ | |
341 ((window)->face_cachels \ | |
342 ? FACE_CACHEL_FONT (WINDOW_FACE_CACHEL (window, index), charset) \ | |
343 : Qnil) | |
344 #define WINDOW_FACE_CACHEL_DISPLAY_TABLE(window, index) \ | |
345 (WINDOW_FACE_CACHEL (window, index)->display_table) | |
346 #define WINDOW_FACE_CACHEL_BACKGROUND_PIXMAP(window, index) \ | |
347 (WINDOW_FACE_CACHEL (window, index)->background_pixmap) | |
5080
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
348 #define WINDOW_FACE_CACHEL_BACKGROUND_PLACEMENT(window, index) \ |
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
349 (WINDOW_FACE_CACHEL (window, index)->background_placement) |
428 | 350 #define WINDOW_FACE_CACHEL_DIRTY(window, index) \ |
351 (WINDOW_FACE_CACHEL (window, index)->dirty) | |
352 #define WINDOW_FACE_CACHEL_UNDERLINE_P(window, index) \ | |
353 (WINDOW_FACE_CACHEL (window, index)->underline) | |
354 #define WINDOW_FACE_CACHEL_HIGHLIGHT_P(window, index) \ | |
355 (WINDOW_FACE_CACHEL (window, index)->highlight) | |
356 #define WINDOW_FACE_CACHEL_DIM_P(window, index) \ | |
357 (WINDOW_FACE_CACHEL (window, index)->dim) | |
358 #define WINDOW_FACE_CACHEL_BLINKING_P(window, index) \ | |
359 (WINDOW_FACE_CACHEL (window, index)->blinking) | |
360 #define WINDOW_FACE_CACHEL_REVERSE_P(window, index) \ | |
361 (WINDOW_FACE_CACHEL (window, index)->reverse) | |
5617
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
362 #define WINDOW_FACE_CACHEL_FLUSH_P(window, index) \ |
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
363 (WINDOW_FACE_CACHEL (window, index)->flush) |
428 | 364 |
365 #define FACE_PROPERTY_SPECIFIER(face, property) Fget (face, property, Qnil) | |
366 | |
367 #define FACE_PROPERTY_INSTANCE_1(face, property, domain, errb, no_fallback, depth) \ | |
368 specifier_instance (FACE_PROPERTY_SPECIFIER (face, property), Qunbound, \ | |
369 domain, errb, 1, no_fallback, depth) | |
370 | |
371 #define FACE_PROPERTY_INSTANCE(face, property, domain, no_fallback, depth) \ | |
793 | 372 FACE_PROPERTY_INSTANCE_1 (face, property, domain, ERROR_ME_DEBUG_WARN, \ |
428 | 373 no_fallback, depth) |
374 | |
3659 | 375 Lisp_Object face_property_matching_instance |
376 (Lisp_Object face, | |
377 Lisp_Object property, | |
378 Lisp_Object charset, | |
379 Lisp_Object domain, | |
380 Error_Behavior errb, | |
381 int no_fallback, | |
382 Lisp_Object depth, | |
383 enum font_specifier_matchspec_stages stages); | |
428 | 384 |
385 #define FACE_PROPERTY_SPEC_LIST(face, property, locale) \ | |
386 Fspecifier_spec_list (FACE_PROPERTY_SPECIFIER (face, property), \ | |
387 locale, Qnil, Qnil) | |
498 | 388 #define SET_FACE_PROPERTY(face, property, value, locale, tag, how_to_add) \ |
428 | 389 Fadd_spec_to_specifier (FACE_PROPERTY_SPECIFIER (face, property), \ |
498 | 390 value, locale, tag, how_to_add) |
428 | 391 |
392 #define FACE_FOREGROUND(face, domain) \ | |
393 FACE_PROPERTY_INSTANCE (face, Qforeground, domain, 0, Qzero) | |
394 #define FACE_BACKGROUND(face, domain) \ | |
395 FACE_PROPERTY_INSTANCE (face, Qbackground, domain, 0, Qzero) | |
3676 | 396 |
397 /* Calling this function on the default face with the ASCII character set | |
398 may delete any X11 frames; see the code at the end of | |
399 x_find_charset_font. */ | |
428 | 400 #define FACE_FONT(face, domain, charset) \ |
401 face_property_matching_instance (face, Qfont, charset, domain, \ | |
3659 | 402 ERROR_ME_DEBUG_WARN, 0, Qzero, \ |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
3676
diff
changeset
|
403 STAGE_INITIAL) |
428 | 404 #define FACE_DISPLAY_TABLE(face, domain) \ |
405 FACE_PROPERTY_INSTANCE (face, Qdisplay_table, domain, 0, Qzero) | |
406 #define FACE_BACKGROUND_PIXMAP(face, domain) \ | |
407 FACE_PROPERTY_INSTANCE (face, Qbackground_pixmap, domain, 0, Qzero) | |
5080
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
408 |
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
409 extern Lisp_Object Qbackground_placement; |
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
410 #define FACE_BACKGROUND_PLACEMENT(face, domain) \ |
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
411 FACE_PROPERTY_INSTANCE (face, Qbackground_placement, domain, 0, Qzero) |
5502045ec510
The background-placement face property.
Didier Verna <didier@lrde.epita.fr>
parents:
5047
diff
changeset
|
412 |
428 | 413 #define FACE_UNDERLINE_P(face, domain) \ |
414 (!NILP (FACE_PROPERTY_INSTANCE (face, Qunderline, domain, 0, Qzero))) | |
440 | 415 #define FACE_STRIKETHRU_P(face, domain) \ |
416 (!NILP (FACE_PROPERTY_INSTANCE (face, Qstrikethru, domain, 0, Qzero))) | |
428 | 417 #define FACE_HIGHLIGHT_P(face, domain) \ |
418 (!NILP (FACE_PROPERTY_INSTANCE (face, Qhighlight, domain, 0, Qzero))) | |
419 #define FACE_DIM_P(face, domain) \ | |
420 (!NILP (FACE_PROPERTY_INSTANCE (face, Qdim, domain, 0, Qzero))) | |
421 #define FACE_BLINKING_P(face, domain) \ | |
422 (!NILP (FACE_PROPERTY_INSTANCE (face, Qblinking, domain, 0, Qzero))) | |
423 #define FACE_REVERSE_P(face, domain) \ | |
424 (!NILP (FACE_PROPERTY_INSTANCE (face, Qreverse, domain, 0, Qzero))) | |
5617
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
425 #define FACE_FLUSH_P(face, domain) \ |
b0d712bbc2a6
The "flush" face property.
Didier Verna <didier@xemacs.org>
parents:
5402
diff
changeset
|
426 (!NILP (FACE_PROPERTY_INSTANCE (face, Qflush, domain, 0, Qzero))) |
428 | 427 |
440 | 428 #endif /* INCLUDED_faces_h_ */ |