Mercurial > hg > xemacs-beta
comparison src/faces.c @ 5080:5502045ec510
The background-placement face property.
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2010-02-25 Didier Verna <didier@xemacs.org>
The background-placement face property.
* cl-macs.el (face-background-placement): New defsetf.
* cus-face.el (custom-face-attributes):
* faces.el (face-interactive):
* faces.el (set-face-property):
* faces.el (face-equal):
* faces.el (init-other-random-faces): Update.
* faces.el (face-background-placement):
* faces.el (set-face-background-placement):
* faces.el (face-background-placement-instance):
* faces.el (face-background-placement-instance-p):
* frame.el (set-frame-background-placement):
* frame.el (frame-background-placement):
* frame.el (frame-background-placement-instance):
* objects.el (make-face-background-placement-specifier): New.
man/ChangeLog addition:
2010-02-25 Didier Verna <didier@xemacs.org>
The background-placement face property.
* xemacs/custom.texi (Faces): Document it.
src/ChangeLog addition:
2010-02-25 Didier Verna <didier@xemacs.org>
The background-placement face property.
* console-x-impl.h (struct x_frame): Add new slots x and y.
* console-x-impl.h (FRAME_X_X, FRAME_X_Y): New slot accessors.
* console-gtk-impl.h: Fake something similar for potential port.
* frame-x.c (x_get_frame_text_position): New function.
* frame-x.c (x_init_frame_3): Use it.
* event-Xt.c (emacs_Xt_handle_magic_event): Eat spurious
ConfigureNotify events, get the frame position and mark frame
faces changed.
* objects-impl.h: The face_background_placement_specifier
structure and its accessors.
* objects.c: New symbols Qabsolute and Qrelative.
* objects.c (face_background_placement_create):
* objects.c (face_background_placement_mark):
* objects.c (face_background_placement_instantiate):
* objects.c (face_background_placement_validate):
* objects.c (face_background_placement_after_change):
* objects.c (set_face_background_placement_attached_to): New.
* objects.h (set_face_background_palcement_attached_to): Declare
the one above.
* objects.c (syms_of_objects):
* objects.c (specifier_type_create_objects):
* objects.c (reinit_specifier_type_create_objects):
* objects.c (reinit_vars_of_objects): Update for the modifications
above.
* console-xlike-inc.h (XLIKE_GC_TS_X_ORIGIN, XLIKE_GC_TS_X_ORIGIN):
New X11/Gtk compatibility macros.
* redisplay-xlike-inc.c (XLIKE_get_gc): Add a background placement
argument and handle it.
* gtk-glue.c (face_to_gc):
* redisplay-xlike-inc.c (XLIKE_output_string):
* redisplay-xlike-inc.c (XLIKE_output_pixmap):
* redisplay-xlike-inc.c (XLIKE_output_blank):
* redisplay-xlike-inc.c (XLIKE_output_horizontal_line):
* redisplay-xlike-inc.c (XLIKE_output_eol_cursor): Update
accordingly.
* console-impl.h (struct console_methods): Add a background
placement (Lisp_Object) argument to the clear_region method.
* console-stream.c (stream_clear_region):
* redisplay-tty.c (tty_clear_region):
* redisplay-msw.c (mswindows_clear_region):
* redisplay-xlike-inc.c (XLIKE_clear_region): Update accordingly.
* redisplay-output.c (redisplay_clear_region): Handle the
background placement property and update the call to the
clear_region method.
* faces.h (struct Lisp_Face):
* faces.h (struct face_cachel): Add a background placement slot.
* faces.h (WINDOW_FACE_CACHEL_BACKGROUND_PLACEMENT): New accessor.
* 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 (mark_face_cachels):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (reset_face_cachel):
* faces.c (Fmake_face):
* faces.c (Fcopy_face): Handle the background placement property.
* faces.c (syms_of_faces):
* faces.c (vars_of_faces):
* faces.c (complex_vars_of_faces): Update accordingly.
author | Didier Verna <didier@lrde.epita.fr> |
---|---|
date | Thu, 25 Feb 2010 16:19:01 +0100 |
parents | 07dcc7000bbf |
children | 7be849cb8828 |
comparison
equal
deleted
inserted
replaced
5079:aa4cae427255 | 5080:5502045ec510 |
---|---|
1 /* "Face" primitives | 1 /* "Face" primitives |
2 Copyright (C) 1994 Free Software Foundation, Inc. | 2 Copyright (C) 1994 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Board of Trustees, University of Illinois. | 3 Copyright (C) 1995 Board of Trustees, University of Illinois. |
4 Copyright (C) 1995, 1996, 2001, 2002, 2005, 2010 Ben Wing. | 4 Copyright (C) 1995, 1996, 2001, 2002, 2005, 2010 Ben Wing. |
5 Copyright (C) 1995 Sun Microsystems, Inc. | 5 Copyright (C) 1995 Sun Microsystems, Inc. |
6 Copyright (C) 2010 Didier Verna | |
6 | 7 |
7 This file is part of XEmacs. | 8 This file is part of XEmacs. |
8 | 9 |
9 XEmacs is free software; you can redistribute it and/or modify it | 10 XEmacs is free software; you can redistribute it and/or modify it |
10 under the terms of the GNU General Public License as published by the | 11 under the terms of the GNU General Public License as published by the |
40 #include "specifier.h" | 41 #include "specifier.h" |
41 #include "window.h" | 42 #include "window.h" |
42 | 43 |
43 Lisp_Object Qfacep; | 44 Lisp_Object Qfacep; |
44 Lisp_Object Qforeground, Qbackground, Qdisplay_table; | 45 Lisp_Object Qforeground, Qbackground, Qdisplay_table; |
45 Lisp_Object Qbackground_pixmap, Qunderline, Qdim; | 46 Lisp_Object Qbackground_pixmap, Qbackground_placement, Qunderline, Qdim; |
46 Lisp_Object Qblinking, Qstrikethru; | 47 Lisp_Object Qblinking, Qstrikethru; |
47 | 48 |
48 Lisp_Object Qinit_face_from_resources; | 49 Lisp_Object Qinit_face_from_resources; |
49 Lisp_Object Qinit_frame_faces; | 50 Lisp_Object Qinit_frame_faces; |
50 Lisp_Object Qinit_device_faces; | 51 Lisp_Object Qinit_device_faces; |
109 mark_object (face->foreground); | 110 mark_object (face->foreground); |
110 mark_object (face->background); | 111 mark_object (face->background); |
111 mark_object (face->font); | 112 mark_object (face->font); |
112 mark_object (face->display_table); | 113 mark_object (face->display_table); |
113 mark_object (face->background_pixmap); | 114 mark_object (face->background_pixmap); |
115 mark_object (face->background_placement); | |
114 mark_object (face->underline); | 116 mark_object (face->underline); |
115 mark_object (face->strikethru); | 117 mark_object (face->strikethru); |
116 mark_object (face->highlight); | 118 mark_object (face->highlight); |
117 mark_object (face->dim); | 119 mark_object (face->dim); |
118 mark_object (face->blinking); | 120 mark_object (face->blinking); |
160 (internal_equal (f1->foreground, f2->foreground, depth) && | 162 (internal_equal (f1->foreground, f2->foreground, depth) && |
161 internal_equal (f1->background, f2->background, depth) && | 163 internal_equal (f1->background, f2->background, depth) && |
162 internal_equal (f1->font, f2->font, depth) && | 164 internal_equal (f1->font, f2->font, depth) && |
163 internal_equal (f1->display_table, f2->display_table, depth) && | 165 internal_equal (f1->display_table, f2->display_table, depth) && |
164 internal_equal (f1->background_pixmap, f2->background_pixmap, depth) && | 166 internal_equal (f1->background_pixmap, f2->background_pixmap, depth) && |
167 internal_equal (f1->background_placement, | |
168 f2->background_placement, | |
169 depth) && | |
165 internal_equal (f1->underline, f2->underline, depth) && | 170 internal_equal (f1->underline, f2->underline, depth) && |
166 internal_equal (f1->strikethru, f2->strikethru, depth) && | 171 internal_equal (f1->strikethru, f2->strikethru, depth) && |
167 internal_equal (f1->highlight, f2->highlight, depth) && | 172 internal_equal (f1->highlight, f2->highlight, depth) && |
168 internal_equal (f1->dim, f2->dim, depth) && | 173 internal_equal (f1->dim, f2->dim, depth) && |
169 internal_equal (f1->blinking, f2->blinking, depth) && | 174 internal_equal (f1->blinking, f2->blinking, depth) && |
190 face_getprop (Lisp_Object obj, Lisp_Object prop) | 195 face_getprop (Lisp_Object obj, Lisp_Object prop) |
191 { | 196 { |
192 Lisp_Face *f = XFACE (obj); | 197 Lisp_Face *f = XFACE (obj); |
193 | 198 |
194 return | 199 return |
195 (EQ (prop, Qforeground) ? f->foreground : | 200 (EQ (prop, Qforeground) ? f->foreground : |
196 EQ (prop, Qbackground) ? f->background : | 201 EQ (prop, Qbackground) ? f->background : |
197 EQ (prop, Qfont) ? f->font : | 202 EQ (prop, Qfont) ? f->font : |
198 EQ (prop, Qdisplay_table) ? f->display_table : | 203 EQ (prop, Qdisplay_table) ? f->display_table : |
199 EQ (prop, Qbackground_pixmap) ? f->background_pixmap : | 204 EQ (prop, Qbackground_pixmap) ? f->background_pixmap : |
200 EQ (prop, Qunderline) ? f->underline : | 205 EQ (prop, Qbackground_placement) ? f->background_placement : |
201 EQ (prop, Qstrikethru) ? f->strikethru : | 206 EQ (prop, Qunderline) ? f->underline : |
202 EQ (prop, Qhighlight) ? f->highlight : | 207 EQ (prop, Qstrikethru) ? f->strikethru : |
203 EQ (prop, Qdim) ? f->dim : | 208 EQ (prop, Qhighlight) ? f->highlight : |
204 EQ (prop, Qblinking) ? f->blinking : | 209 EQ (prop, Qdim) ? f->dim : |
205 EQ (prop, Qreverse) ? f->reverse : | 210 EQ (prop, Qblinking) ? f->blinking : |
206 EQ (prop, Qdoc_string) ? f->doc_string : | 211 EQ (prop, Qreverse) ? f->reverse : |
212 EQ (prop, Qdoc_string) ? f->doc_string : | |
207 external_plist_get (&f->plist, prop, 0, ERROR_ME)); | 213 external_plist_get (&f->plist, prop, 0, ERROR_ME)); |
208 } | 214 } |
209 | 215 |
210 static int | 216 static int |
211 face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value) | 217 face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value) |
212 { | 218 { |
213 Lisp_Face *f = XFACE (obj); | 219 Lisp_Face *f = XFACE (obj); |
214 | 220 |
215 if (EQ (prop, Qforeground) || | 221 if (EQ (prop, Qforeground) || |
216 EQ (prop, Qbackground) || | 222 EQ (prop, Qbackground) || |
217 EQ (prop, Qfont) || | 223 EQ (prop, Qfont) || |
218 EQ (prop, Qdisplay_table) || | 224 EQ (prop, Qdisplay_table) || |
219 EQ (prop, Qbackground_pixmap) || | 225 EQ (prop, Qbackground_pixmap) || |
220 EQ (prop, Qunderline) || | 226 EQ (prop, Qbackground_placement) || |
221 EQ (prop, Qstrikethru) || | 227 EQ (prop, Qunderline) || |
222 EQ (prop, Qhighlight) || | 228 EQ (prop, Qstrikethru) || |
223 EQ (prop, Qdim) || | 229 EQ (prop, Qhighlight) || |
224 EQ (prop, Qblinking) || | 230 EQ (prop, Qdim) || |
231 EQ (prop, Qblinking) || | |
225 EQ (prop, Qreverse)) | 232 EQ (prop, Qreverse)) |
226 return 0; | 233 return 0; |
227 | 234 |
228 if (EQ (prop, Qdoc_string)) | 235 if (EQ (prop, Qdoc_string)) |
229 { | 236 { |
240 static int | 247 static int |
241 face_remprop (Lisp_Object obj, Lisp_Object prop) | 248 face_remprop (Lisp_Object obj, Lisp_Object prop) |
242 { | 249 { |
243 Lisp_Face *f = XFACE (obj); | 250 Lisp_Face *f = XFACE (obj); |
244 | 251 |
245 if (EQ (prop, Qforeground) || | 252 if (EQ (prop, Qforeground) || |
246 EQ (prop, Qbackground) || | 253 EQ (prop, Qbackground) || |
247 EQ (prop, Qfont) || | 254 EQ (prop, Qfont) || |
248 EQ (prop, Qdisplay_table) || | 255 EQ (prop, Qdisplay_table) || |
249 EQ (prop, Qbackground_pixmap) || | 256 EQ (prop, Qbackground_pixmap) || |
250 EQ (prop, Qunderline) || | 257 EQ (prop, Qbackground_placement) || |
251 EQ (prop, Qstrikethru) || | 258 EQ (prop, Qunderline) || |
252 EQ (prop, Qhighlight) || | 259 EQ (prop, Qstrikethru) || |
253 EQ (prop, Qdim) || | 260 EQ (prop, Qhighlight) || |
254 EQ (prop, Qblinking) || | 261 EQ (prop, Qdim) || |
262 EQ (prop, Qblinking) || | |
255 EQ (prop, Qreverse)) | 263 EQ (prop, Qreverse)) |
256 return -1; | 264 return -1; |
257 | 265 |
258 if (EQ (prop, Qdoc_string)) | 266 if (EQ (prop, Qdoc_string)) |
259 { | 267 { |
268 face_plist (Lisp_Object obj) | 276 face_plist (Lisp_Object obj) |
269 { | 277 { |
270 Lisp_Face *face = XFACE (obj); | 278 Lisp_Face *face = XFACE (obj); |
271 Lisp_Object result = face->plist; | 279 Lisp_Object result = face->plist; |
272 | 280 |
273 result = cons3 (Qreverse, face->reverse, result); | 281 result = cons3 (Qreverse, face->reverse, result); |
274 result = cons3 (Qblinking, face->blinking, result); | 282 result = cons3 (Qblinking, face->blinking, result); |
275 result = cons3 (Qdim, face->dim, result); | 283 result = cons3 (Qdim, face->dim, result); |
276 result = cons3 (Qhighlight, face->highlight, result); | 284 result = cons3 (Qhighlight, face->highlight, result); |
277 result = cons3 (Qstrikethru, face->strikethru, result); | 285 result = cons3 (Qstrikethru, face->strikethru, result); |
278 result = cons3 (Qunderline, face->underline, result); | 286 result = cons3 (Qunderline, face->underline, result); |
279 result = cons3 (Qbackground_pixmap, face->background_pixmap, result); | 287 result = cons3 (Qbackground_placement, face->background_placement, result); |
280 result = cons3 (Qdisplay_table, face->display_table, result); | 288 result = cons3 (Qbackground_pixmap, face->background_pixmap, result); |
281 result = cons3 (Qfont, face->font, result); | 289 result = cons3 (Qdisplay_table, face->display_table, result); |
282 result = cons3 (Qbackground, face->background, result); | 290 result = cons3 (Qfont, face->font, result); |
283 result = cons3 (Qforeground, face->foreground, result); | 291 result = cons3 (Qbackground, face->background, result); |
292 result = cons3 (Qforeground, face->foreground, result); | |
284 | 293 |
285 return result; | 294 return result; |
286 } | 295 } |
287 | 296 |
288 static const struct memory_description face_description[] = { | 297 static const struct memory_description face_description[] = { |
291 { XD_LISP_OBJECT, offsetof (Lisp_Face, foreground) }, | 300 { XD_LISP_OBJECT, offsetof (Lisp_Face, foreground) }, |
292 { XD_LISP_OBJECT, offsetof (Lisp_Face, background) }, | 301 { XD_LISP_OBJECT, offsetof (Lisp_Face, background) }, |
293 { XD_LISP_OBJECT, offsetof (Lisp_Face, font) }, | 302 { XD_LISP_OBJECT, offsetof (Lisp_Face, font) }, |
294 { XD_LISP_OBJECT, offsetof (Lisp_Face, display_table) }, | 303 { XD_LISP_OBJECT, offsetof (Lisp_Face, display_table) }, |
295 { XD_LISP_OBJECT, offsetof (Lisp_Face, background_pixmap) }, | 304 { XD_LISP_OBJECT, offsetof (Lisp_Face, background_pixmap) }, |
305 { XD_LISP_OBJECT, offsetof (Lisp_Face, background_placement) }, | |
296 { XD_LISP_OBJECT, offsetof (Lisp_Face, underline) }, | 306 { XD_LISP_OBJECT, offsetof (Lisp_Face, underline) }, |
297 { XD_LISP_OBJECT, offsetof (Lisp_Face, strikethru) }, | 307 { XD_LISP_OBJECT, offsetof (Lisp_Face, strikethru) }, |
298 { XD_LISP_OBJECT, offsetof (Lisp_Face, highlight) }, | 308 { XD_LISP_OBJECT, offsetof (Lisp_Face, highlight) }, |
299 { XD_LISP_OBJECT, offsetof (Lisp_Face, dim) }, | 309 { XD_LISP_OBJECT, offsetof (Lisp_Face, dim) }, |
300 { XD_LISP_OBJECT, offsetof (Lisp_Face, blinking) }, | 310 { XD_LISP_OBJECT, offsetof (Lisp_Face, blinking) }, |
384 f->foreground = Qnil; | 394 f->foreground = Qnil; |
385 f->background = Qnil; | 395 f->background = Qnil; |
386 f->font = Qnil; | 396 f->font = Qnil; |
387 f->display_table = Qnil; | 397 f->display_table = Qnil; |
388 f->background_pixmap = Qnil; | 398 f->background_pixmap = Qnil; |
399 f->background_placement = Qnil; | |
389 f->underline = Qnil; | 400 f->underline = Qnil; |
390 f->strikethru = Qnil; | 401 f->strikethru = Qnil; |
391 f->highlight = Qnil; | 402 f->highlight = Qnil; |
392 f->dim = Qnil; | 403 f->dim = Qnil; |
393 f->blinking = Qnil; | 404 f->blinking = Qnil; |
843 set_color_attached_to (f->background, face, Qbackground); | 854 set_color_attached_to (f->background, face, Qbackground); |
844 f->font = Fmake_specifier (Qfont); | 855 f->font = Fmake_specifier (Qfont); |
845 set_font_attached_to (f->font, face, Qfont); | 856 set_font_attached_to (f->font, face, Qfont); |
846 f->background_pixmap = Fmake_specifier (Qimage); | 857 f->background_pixmap = Fmake_specifier (Qimage); |
847 set_image_attached_to (f->background_pixmap, face, Qbackground_pixmap); | 858 set_image_attached_to (f->background_pixmap, face, Qbackground_pixmap); |
859 f->background_placement = Fmake_specifier (Qface_background_placement); | |
860 set_face_background_placement_attached_to (f->background_placement, face); | |
848 f->display_table = Fmake_specifier (Qdisplay_table); | 861 f->display_table = Fmake_specifier (Qdisplay_table); |
849 f->underline = Fmake_specifier (Qface_boolean); | 862 f->underline = Fmake_specifier (Qface_boolean); |
850 set_face_boolean_attached_to (f->underline, face, Qunderline); | 863 set_face_boolean_attached_to (f->underline, face, Qunderline); |
851 f->strikethru = Fmake_specifier (Qface_boolean); | 864 f->strikethru = Fmake_specifier (Qface_boolean); |
852 set_face_boolean_attached_to (f->strikethru, face, Qstrikethru); | 865 set_face_boolean_attached_to (f->strikethru, face, Qstrikethru); |
871 set_specifier_fallback (f->font, | 884 set_specifier_fallback (f->font, |
872 Fget (Vdefault_face, Qfont, Qunbound)); | 885 Fget (Vdefault_face, Qfont, Qunbound)); |
873 set_specifier_fallback (f->background_pixmap, | 886 set_specifier_fallback (f->background_pixmap, |
874 Fget (Vdefault_face, Qbackground_pixmap, | 887 Fget (Vdefault_face, Qbackground_pixmap, |
875 Qunbound)); | 888 Qunbound)); |
889 set_specifier_fallback (f->background_placement, | |
890 Fget (Vdefault_face, Qbackground_placement, | |
891 Qunbound)); | |
876 set_specifier_fallback (f->display_table, | 892 set_specifier_fallback (f->display_table, |
877 Fget (Vdefault_face, Qdisplay_table, Qunbound)); | 893 Fget (Vdefault_face, Qdisplay_table, Qunbound)); |
878 set_specifier_fallback (f->underline, | 894 set_specifier_fallback (f->underline, |
879 Fget (Vdefault_face, Qunderline, Qunbound)); | 895 Fget (Vdefault_face, Qunderline, Qunbound)); |
880 set_specifier_fallback (f->strikethru, | 896 set_specifier_fallback (f->strikethru, |
1065 mark_object (cachel->face); | 1081 mark_object (cachel->face); |
1066 mark_object (cachel->foreground); | 1082 mark_object (cachel->foreground); |
1067 mark_object (cachel->background); | 1083 mark_object (cachel->background); |
1068 mark_object (cachel->display_table); | 1084 mark_object (cachel->display_table); |
1069 mark_object (cachel->background_pixmap); | 1085 mark_object (cachel->background_pixmap); |
1086 mark_object (cachel->background_placement); | |
1070 } | 1087 } |
1071 } | 1088 } |
1072 | 1089 |
1073 /* ensure that the given cachel contains an updated font value for | 1090 /* ensure that the given cachel contains an updated font value for |
1074 the given charset. Return the updated font value (which can be | 1091 the given charset. Return the updated font value (which can be |
1421 || WINDOW_FACE_CACHEL (DOMAIN_XWINDOW (domain), DEFAULT_INDEX)) | 1438 || WINDOW_FACE_CACHEL (DOMAIN_XWINDOW (domain), DEFAULT_INDEX)) |
1422 { | 1439 { |
1423 FROB (background_pixmap); | 1440 FROB (background_pixmap); |
1424 MAYBE_UNFROB_BACKGROUND_PIXMAP; | 1441 MAYBE_UNFROB_BACKGROUND_PIXMAP; |
1425 } | 1442 } |
1443 | |
1444 FROB (background_placement); | |
1445 | |
1426 #undef FROB | 1446 #undef FROB |
1427 #undef MAYBE_UNFROB_BACKGROUND_PIXMAP | 1447 #undef MAYBE_UNFROB_BACKGROUND_PIXMAP |
1428 | 1448 |
1429 ensure_face_cachel_contains_charset (cachel, domain, Vcharset_ascii); | 1449 ensure_face_cachel_contains_charset (cachel, domain, Vcharset_ascii); |
1430 | 1450 |
1484 | 1504 |
1485 FROB (foreground); | 1505 FROB (foreground); |
1486 FROB (background); | 1506 FROB (background); |
1487 FROB (display_table); | 1507 FROB (display_table); |
1488 FROB (background_pixmap); | 1508 FROB (background_pixmap); |
1509 FROB (background_placement); | |
1489 FROB (underline); | 1510 FROB (underline); |
1490 FROB (strikethru); | 1511 FROB (strikethru); |
1491 FROB (highlight); | 1512 FROB (highlight); |
1492 FROB (dim); | 1513 FROB (dim); |
1493 FROB (reverse); | 1514 FROB (reverse); |
1534 for (i = 0; i < NUM_LEADING_BYTES; i++) | 1555 for (i = 0; i < NUM_LEADING_BYTES; i++) |
1535 cachel->font[i] = Qunbound; | 1556 cachel->font[i] = Qunbound; |
1536 } | 1557 } |
1537 cachel->display_table = Qunbound; | 1558 cachel->display_table = Qunbound; |
1538 cachel->background_pixmap = Qunbound; | 1559 cachel->background_pixmap = Qunbound; |
1560 cachel->background_placement = Qunbound; | |
1539 FACE_CACHEL_FONT_SPECIFIED (cachel)->size = sizeof(cachel->font_specified); | 1561 FACE_CACHEL_FONT_SPECIFIED (cachel)->size = sizeof(cachel->font_specified); |
1540 FACE_CACHEL_FONT_UPDATED (cachel)->size = sizeof(cachel->font_updated); | 1562 FACE_CACHEL_FONT_UPDATED (cachel)->size = sizeof(cachel->font_updated); |
1541 } | 1563 } |
1542 | 1564 |
1543 /* Retrieve the index to a cachel for window W that corresponds to | 1565 /* Retrieve the index to a cachel for window W that corresponds to |
1899 int default_face = EQ (face, Vdefault_face); | 1921 int default_face = EQ (face, Vdefault_face); |
1900 | 1922 |
1901 /* If the locale could affect the frame value, then call | 1923 /* If the locale could affect the frame value, then call |
1902 update_EmacsFrames just in case. */ | 1924 update_EmacsFrames just in case. */ |
1903 if (default_face && | 1925 if (default_face && |
1904 (EQ (property, Qforeground) || | 1926 (EQ (property, Qforeground) || |
1905 EQ (property, Qbackground) || | 1927 EQ (property, Qbackground) || |
1906 EQ (property, Qfont))) | 1928 EQ (property, Qfont))) |
1907 update_EmacsFrames (locale, property); | 1929 update_EmacsFrames (locale, property); |
1908 | 1930 |
1909 if (WINDOWP (locale)) | 1931 if (WINDOWP (locale)) |
1910 { | 1932 { |
1994 COPY_PROPERTY (foreground); | 2016 COPY_PROPERTY (foreground); |
1995 COPY_PROPERTY (background); | 2017 COPY_PROPERTY (background); |
1996 COPY_PROPERTY (font); | 2018 COPY_PROPERTY (font); |
1997 COPY_PROPERTY (display_table); | 2019 COPY_PROPERTY (display_table); |
1998 COPY_PROPERTY (background_pixmap); | 2020 COPY_PROPERTY (background_pixmap); |
2021 COPY_PROPERTY (background_placement); | |
1999 COPY_PROPERTY (underline); | 2022 COPY_PROPERTY (underline); |
2000 COPY_PROPERTY (strikethru); | 2023 COPY_PROPERTY (strikethru); |
2001 COPY_PROPERTY (highlight); | 2024 COPY_PROPERTY (highlight); |
2002 COPY_PROPERTY (dim); | 2025 COPY_PROPERTY (dim); |
2003 COPY_PROPERTY (blinking); | 2026 COPY_PROPERTY (blinking); |
2124 DEFSYMBOL (Qforeground); | 2147 DEFSYMBOL (Qforeground); |
2125 DEFSYMBOL (Qbackground); | 2148 DEFSYMBOL (Qbackground); |
2126 /* Qfont defined in general.c */ | 2149 /* Qfont defined in general.c */ |
2127 DEFSYMBOL (Qdisplay_table); | 2150 DEFSYMBOL (Qdisplay_table); |
2128 DEFSYMBOL (Qbackground_pixmap); | 2151 DEFSYMBOL (Qbackground_pixmap); |
2152 DEFSYMBOL (Qbackground_placement); | |
2129 DEFSYMBOL (Qunderline); | 2153 DEFSYMBOL (Qunderline); |
2130 DEFSYMBOL (Qstrikethru); | 2154 DEFSYMBOL (Qstrikethru); |
2131 /* Qhighlight, Qreverse defined in general.c */ | 2155 /* Qhighlight, Qreverse defined in general.c */ |
2132 DEFSYMBOL (Qdim); | 2156 DEFSYMBOL (Qdim); |
2133 DEFSYMBOL (Qblinking); | 2157 DEFSYMBOL (Qblinking); |
2197 syms[n++] = Qforeground; | 2221 syms[n++] = Qforeground; |
2198 syms[n++] = Qbackground; | 2222 syms[n++] = Qbackground; |
2199 syms[n++] = Qfont; | 2223 syms[n++] = Qfont; |
2200 syms[n++] = Qdisplay_table; | 2224 syms[n++] = Qdisplay_table; |
2201 syms[n++] = Qbackground_pixmap; | 2225 syms[n++] = Qbackground_pixmap; |
2226 syms[n++] = Qbackground_placement; | |
2202 syms[n++] = Qunderline; | 2227 syms[n++] = Qunderline; |
2203 syms[n++] = Qstrikethru; | 2228 syms[n++] = Qstrikethru; |
2204 syms[n++] = Qhighlight; | 2229 syms[n++] = Qhighlight; |
2205 syms[n++] = Qdim; | 2230 syms[n++] = Qdim; |
2206 syms[n++] = Qblinking; | 2231 syms[n++] = Qblinking; |
2515 set_specifier_fallback (Fget (Vmodeline_face, Qbackground, Qunbound), | 2540 set_specifier_fallback (Fget (Vmodeline_face, Qbackground, Qunbound), |
2516 Fget (Vgui_element_face, Qbackground, Qunbound)); | 2541 Fget (Vgui_element_face, Qbackground, Qunbound)); |
2517 set_specifier_fallback (Fget (Vmodeline_face, Qbackground_pixmap, Qnil), | 2542 set_specifier_fallback (Fget (Vmodeline_face, Qbackground_pixmap, Qnil), |
2518 Fget (Vgui_element_face, Qbackground_pixmap, | 2543 Fget (Vgui_element_face, Qbackground_pixmap, |
2519 Qunbound)); | 2544 Qunbound)); |
2545 set_specifier_fallback (Fget (Vmodeline_face, Qbackground_placement, Qnil), | |
2546 Fget (Vgui_element_face, Qbackground_placement, | |
2547 Qunbound)); | |
2520 | 2548 |
2521 /* toolbar is another gui element */ | 2549 /* toolbar is another gui element */ |
2522 Vtoolbar_face = Fmake_face (Qtoolbar, | 2550 Vtoolbar_face = Fmake_face (Qtoolbar, |
2523 build_defer_string ("toolbar face"), | 2551 build_defer_string ("toolbar face"), |
2524 Qnil); | 2552 Qnil); |
2527 set_specifier_fallback (Fget (Vtoolbar_face, Qbackground, Qunbound), | 2555 set_specifier_fallback (Fget (Vtoolbar_face, Qbackground, Qunbound), |
2528 Fget (Vgui_element_face, Qbackground, Qunbound)); | 2556 Fget (Vgui_element_face, Qbackground, Qunbound)); |
2529 set_specifier_fallback (Fget (Vtoolbar_face, Qbackground_pixmap, Qnil), | 2557 set_specifier_fallback (Fget (Vtoolbar_face, Qbackground_pixmap, Qnil), |
2530 Fget (Vgui_element_face, Qbackground_pixmap, | 2558 Fget (Vgui_element_face, Qbackground_pixmap, |
2531 Qunbound)); | 2559 Qunbound)); |
2560 set_specifier_fallback (Fget (Vtoolbar_face, Qbackground_placement, Qnil), | |
2561 Fget (Vgui_element_face, Qbackground_placement, | |
2562 Qunbound)); | |
2532 | 2563 |
2533 /* vertical divider is another gui element */ | 2564 /* vertical divider is another gui element */ |
2534 Vvertical_divider_face = Fmake_face (Qvertical_divider, | 2565 Vvertical_divider_face = Fmake_face (Qvertical_divider, |
2535 build_defer_string ("vertical divider face"), | 2566 build_defer_string ("vertical divider face"), |
2536 Qnil); | 2567 Qnil); |
2540 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground, Qunbound), | 2571 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground, Qunbound), |
2541 Fget (Vgui_element_face, Qbackground, Qunbound)); | 2572 Fget (Vgui_element_face, Qbackground, Qunbound)); |
2542 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground_pixmap, | 2573 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground_pixmap, |
2543 Qunbound), | 2574 Qunbound), |
2544 Fget (Vgui_element_face, Qbackground_pixmap, | 2575 Fget (Vgui_element_face, Qbackground_pixmap, |
2576 Qunbound)); | |
2577 set_specifier_fallback (Fget (Vvertical_divider_face, Qbackground_placement, | |
2578 Qnil), | |
2579 Fget (Vgui_element_face, Qbackground_placement, | |
2545 Qunbound)); | 2580 Qunbound)); |
2546 | 2581 |
2547 /* widget is another gui element */ | 2582 /* widget is another gui element */ |
2548 Vwidget_face = Fmake_face (Qwidget, | 2583 Vwidget_face = Fmake_face (Qwidget, |
2549 build_defer_string ("widget face"), | 2584 build_defer_string ("widget face"), |