comparison src/faces.h @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 2f8bb876ab1d
children 11054d720c21
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */ 20 Boston, MA 02111-1307, USA. */
21 21
22 /* Synched up with: Not in FSF. */ 22 /* Synched up with: Not in FSF. */
23 23
24 #ifndef INCLUDED_faces_h_ 24 #ifndef _XEMACS_FACES_H_
25 #define INCLUDED_faces_h_ 25 #define _XEMACS_FACES_H_
26 26
27 #include "buffer.h" /* for NUM_LEADING_BYTES */ 27 #include "buffer.h" /* for NUM_LEADING_BYTES */
28 28
29 /* a Lisp_Face is the C object corresponding to a face. There is one 29 /* a struct Lisp_Face is the C object corresponding to a face. There
30 of these per face. It basically contains all of the specifiers for 30 is one of these per face. It basically contains all of the specifiers
31 the built-in face properties, plus the plist of user-specified 31 for the built-in face properties, plus the plist of user-specified
32 properties. */ 32 properties. */
33 33
34 struct Lisp_Face 34 struct Lisp_Face
35 { 35 {
36 struct lcrecord_header header; 36 struct lcrecord_header header;
123 case, the MERGED_FACES_STATIC and MERGED_FACES elements specify 123 case, the MERGED_FACES_STATIC and MERGED_FACES elements specify
124 the faces used for merging by giving the indices of the 124 the faces used for merging by giving the indices of the
125 corresponding single-face cachels. 125 corresponding single-face cachels.
126 126
127 Formerly we didn't bother to keep track of the faces used for 127 Formerly we didn't bother to keep track of the faces used for
128 merging. We do now because we need to do so because there is no 128 merging. We do know because we need to do so because there is no
129 other way to properly handle multiple charsets for Mule in the 129 other way to properly handle multiple charsets for Mule in the
130 presence of display tables short of always computing the values 130 presence of display tables short of always computing the values
131 for all charsets, which is very expensive. Instead, we use a 131 for all charsets, which is very expensive. Instead, we use a
132 lazy scheme where we only compute the font for a particular charset 132 lazy scheme where we only compute the font for a particular charset
133 when it is needed. (The exception is the font for the ASCII charset. 133 when it is needed. (The exception is the font for the ASCII charset.
220 unsigned int updated :1; 220 unsigned int updated :1;
221 /* #### Of course we should use a bit array or something. */ 221 /* #### Of course we should use a bit array or something. */
222 unsigned char font_updated[NUM_LEADING_BYTES]; 222 unsigned char font_updated[NUM_LEADING_BYTES];
223 }; 223 };
224 224
225 DECLARE_LRECORD (face, Lisp_Face); 225 DECLARE_LRECORD (face, struct Lisp_Face);
226 #define XFACE(x) XRECORD (x, face, Lisp_Face) 226 #define XFACE(x) XRECORD (x, face, struct Lisp_Face)
227 #define XSETFACE(x, p) XSETRECORD (x, p, face) 227 #define XSETFACE(x, p) XSETRECORD (x, p, face)
228 #define FACEP(x) RECORDP (x, face) 228 #define FACEP(x) RECORDP (x, face)
229 #define GC_FACEP(x) GC_RECORDP (x, face)
229 #define CHECK_FACE(x) CHECK_RECORD (x, face) 230 #define CHECK_FACE(x) CHECK_RECORD (x, face)
230 231
231 Lisp_Object ensure_face_cachel_contains_charset (struct face_cachel *cachel, 232 Lisp_Object ensure_face_cachel_contains_charset (struct face_cachel *cachel,
232 Lisp_Object domain, 233 Lisp_Object domain,
233 Lisp_Object charset); 234 Lisp_Object charset);
238 Lisp_Object domain, 239 Lisp_Object domain,
239 Lisp_Object face); 240 Lisp_Object face);
240 void face_cachel_charset_font_metric_info (struct face_cachel *cachel, 241 void face_cachel_charset_font_metric_info (struct face_cachel *cachel,
241 unsigned char *charsets, 242 unsigned char *charsets,
242 struct font_metric_info *fm); 243 struct font_metric_info *fm);
243 void mark_face_cachels (face_cachel_dynarr *elements); 244 void mark_face_cachels (face_cachel_dynarr *elements,
245 void (*markobj) (Lisp_Object));
244 void mark_face_cachels_as_clean (struct window *w); 246 void mark_face_cachels_as_clean (struct window *w);
245 void mark_face_cachels_as_not_updated (struct window *w); 247 void mark_face_cachels_as_not_updated (struct window *w);
246 void reset_face_cachel (struct face_cachel *inst); 248 void reset_face_cachel (struct face_cachel *inst);
247 void reset_face_cachels (struct window *w); 249 void reset_face_cachels (struct window *w);
248 face_index get_builtin_face_cache_index (struct window *w, 250 face_index get_builtin_face_cache_index (struct window *w,
256 EXFUN (Ffind_face, 1); 258 EXFUN (Ffind_face, 1);
257 EXFUN (Fget_face, 1); 259 EXFUN (Fget_face, 1);
258 260
259 extern Lisp_Object Qstrikethru, Vbuilt_in_face_specifiers, Vdefault_face; 261 extern Lisp_Object Qstrikethru, Vbuilt_in_face_specifiers, Vdefault_face;
260 extern Lisp_Object Vleft_margin_face, Vpointer_face, Vright_margin_face; 262 extern Lisp_Object Vleft_margin_face, Vpointer_face, Vright_margin_face;
261 extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face; 263 extern Lisp_Object Vtext_cursor_face, Vvertical_divider_face;
262 extern Lisp_Object Vtoolbar_face, Vgui_element_face, Vwidget_face; 264 extern Lisp_Object Vtoolbar_face, Vgui_element_face, Vwidget_face;
263 265
264 void mark_all_faces_as_clean (void); 266 void mark_all_faces_as_clean (void);
265 void init_frame_faces (struct frame *f); 267 void init_frame_faces (struct frame *f);
266 void init_device_faces (struct device *d); 268 void init_device_faces (struct device *d);
356 FACE_PROPERTY_INSTANCE (face, Qdisplay_table, domain, 0, Qzero) 358 FACE_PROPERTY_INSTANCE (face, Qdisplay_table, domain, 0, Qzero)
357 #define FACE_BACKGROUND_PIXMAP(face, domain) \ 359 #define FACE_BACKGROUND_PIXMAP(face, domain) \
358 FACE_PROPERTY_INSTANCE (face, Qbackground_pixmap, domain, 0, Qzero) 360 FACE_PROPERTY_INSTANCE (face, Qbackground_pixmap, domain, 0, Qzero)
359 #define FACE_UNDERLINE_P(face, domain) \ 361 #define FACE_UNDERLINE_P(face, domain) \
360 (!NILP (FACE_PROPERTY_INSTANCE (face, Qunderline, domain, 0, Qzero))) 362 (!NILP (FACE_PROPERTY_INSTANCE (face, Qunderline, domain, 0, Qzero)))
361 #define FACE_STRIKETHRU_P(face, domain) \
362 (!NILP (FACE_PROPERTY_INSTANCE (face, Qstrikethru, domain, 0, Qzero)))
363 #define FACE_HIGHLIGHT_P(face, domain) \ 363 #define FACE_HIGHLIGHT_P(face, domain) \
364 (!NILP (FACE_PROPERTY_INSTANCE (face, Qhighlight, domain, 0, Qzero))) 364 (!NILP (FACE_PROPERTY_INSTANCE (face, Qhighlight, domain, 0, Qzero)))
365 #define FACE_DIM_P(face, domain) \ 365 #define FACE_DIM_P(face, domain) \
366 (!NILP (FACE_PROPERTY_INSTANCE (face, Qdim, domain, 0, Qzero))) 366 (!NILP (FACE_PROPERTY_INSTANCE (face, Qdim, domain, 0, Qzero)))
367 #define FACE_BLINKING_P(face, domain) \ 367 #define FACE_BLINKING_P(face, domain) \
368 (!NILP (FACE_PROPERTY_INSTANCE (face, Qblinking, domain, 0, Qzero))) 368 (!NILP (FACE_PROPERTY_INSTANCE (face, Qblinking, domain, 0, Qzero)))
369 #define FACE_REVERSE_P(face, domain) \ 369 #define FACE_REVERSE_P(face, domain) \
370 (!NILP (FACE_PROPERTY_INSTANCE (face, Qreverse, domain, 0, Qzero))) 370 (!NILP (FACE_PROPERTY_INSTANCE (face, Qreverse, domain, 0, Qzero)))
371 371
372 #endif /* INCLUDED_faces_h_ */ 372 #endif /* _XEMACS_FACES_H_ */