aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-12-28 00:09:49 +0000
committerKim F. Storm2003-12-28 00:09:49 +0000
commit01b1f0c05b794f86c98e6ad36086e02aa8927482 (patch)
tree7fb79d6b5834e8895092ac7d514790776061b3f7 /src
parentdb4f9403e18676d597721c4e9fa36809bd9e6d0d (diff)
downloademacs-01b1f0c05b794f86c98e6ad36086e02aa8927482.tar.gz
emacs-01b1f0c05b794f86c98e6ad36086e02aa8927482.zip
(FACE_ID_BITS, MAX_FACE_ID): New defines.
(struct glyph): New members, ascent and descent. Used to save this glyph's ascent and descent, instead of having. (struct glyph): Declare member face_id using FACE_ID_BITS. (find_hot_spot): Add prototype.
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index f306a939db2..25c8227d773 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -321,6 +321,9 @@ struct glyph
321 /* Width in pixels. */ 321 /* Width in pixels. */
322 short pixel_width; 322 short pixel_width;
323 323
324 /* Ascent and descent in pixels. */
325 short ascent, descent;
326
324 /* Vertical offset. If < 0, the glyph is displayed raised, if > 0 327 /* Vertical offset. If < 0, the glyph is displayed raised, if > 0
325 the glyph is displayed lowered. */ 328 the glyph is displayed lowered. */
326 short voffset; 329 short voffset;
@@ -359,8 +362,10 @@ struct glyph
359 doesn't have a glyph in a font. */ 362 doesn't have a glyph in a font. */
360 unsigned glyph_not_available_p : 1; 363 unsigned glyph_not_available_p : 1;
361 364
365#define FACE_ID_BITS 21
366
362 /* Face of the glyph. */ 367 /* Face of the glyph. */
363 unsigned face_id : 21; 368 unsigned face_id : FACE_ID_BITS;
364 369
365 /* Type of font used to display the character glyph. May be used to 370 /* Type of font used to display the character glyph. May be used to
366 determine which set of functions to use to obtain font metrics 371 determine which set of functions to use to obtain font metrics
@@ -1493,6 +1498,7 @@ enum face_id
1493 BASIC_FACE_ID_SENTINEL 1498 BASIC_FACE_ID_SENTINEL
1494}; 1499};
1495 1500
1501#define MAX_FACE_ID ((1 << FACE_ID_BITS) - 1)
1496 1502
1497/* A cache of realized faces. Each frame has its own cache because 1503/* A cache of realized faces. Each frame has its own cache because
1498 Emacs allows different frame-local face definitions. */ 1504 Emacs allows different frame-local face definitions. */
@@ -2536,6 +2542,7 @@ extern void x_draw_vertical_border P_ ((struct window *w));
2536extern void frame_to_window_pixel_xy P_ ((struct window *, int *, int *)); 2542extern void frame_to_window_pixel_xy P_ ((struct window *, int *, int *));
2537extern void get_glyph_string_clip_rect P_ ((struct glyph_string *, 2543extern void get_glyph_string_clip_rect P_ ((struct glyph_string *,
2538 NativeRectangle *nr)); 2544 NativeRectangle *nr));
2545extern Lisp_Object find_hot_spot P_ ((Lisp_Object, int, int));
2539extern void note_mouse_highlight P_ ((struct frame *, int, int)); 2546extern void note_mouse_highlight P_ ((struct frame *, int, int));
2540extern void x_clear_window_mouse_face P_ ((struct window *)); 2547extern void x_clear_window_mouse_face P_ ((struct window *));
2541extern void cancel_mouse_face P_ ((struct frame *)); 2548extern void cancel_mouse_face P_ ((struct frame *));