Commit 01b1f0c0 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(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.
parent db4f9403
...@@ -321,6 +321,9 @@ struct glyph ...@@ -321,6 +321,9 @@ struct glyph
/* Width in pixels. */ /* Width in pixels. */
short pixel_width; short pixel_width;
/* Ascent and descent in pixels. */
short ascent, descent;
/* Vertical offset. If < 0, the glyph is displayed raised, if > 0 /* Vertical offset. If < 0, the glyph is displayed raised, if > 0
the glyph is displayed lowered. */ the glyph is displayed lowered. */
short voffset; short voffset;
...@@ -359,8 +362,10 @@ struct glyph ...@@ -359,8 +362,10 @@ struct glyph
doesn't have a glyph in a font. */ doesn't have a glyph in a font. */
unsigned glyph_not_available_p : 1; unsigned glyph_not_available_p : 1;
#define FACE_ID_BITS 21
/* Face of the glyph. */ /* Face of the glyph. */
unsigned face_id : 21; unsigned face_id : FACE_ID_BITS;
/* Type of font used to display the character glyph. May be used to /* Type of font used to display the character glyph. May be used to
determine which set of functions to use to obtain font metrics determine which set of functions to use to obtain font metrics
...@@ -1493,6 +1498,7 @@ enum face_id ...@@ -1493,6 +1498,7 @@ enum face_id
BASIC_FACE_ID_SENTINEL BASIC_FACE_ID_SENTINEL
}; };
#define MAX_FACE_ID ((1 << FACE_ID_BITS) - 1)
/* A cache of realized faces. Each frame has its own cache because /* A cache of realized faces. Each frame has its own cache because
Emacs allows different frame-local face definitions. */ Emacs allows different frame-local face definitions. */
...@@ -2536,6 +2542,7 @@ extern void x_draw_vertical_border P_ ((struct window *w)); ...@@ -2536,6 +2542,7 @@ extern void x_draw_vertical_border P_ ((struct window *w));
extern void frame_to_window_pixel_xy P_ ((struct window *, int *, int *)); extern void frame_to_window_pixel_xy P_ ((struct window *, int *, int *));
extern void get_glyph_string_clip_rect P_ ((struct glyph_string *, extern void get_glyph_string_clip_rect P_ ((struct glyph_string *,
NativeRectangle *nr)); NativeRectangle *nr));
extern Lisp_Object find_hot_spot P_ ((Lisp_Object, int, int));
extern void note_mouse_highlight P_ ((struct frame *, int, int)); extern void note_mouse_highlight P_ ((struct frame *, int, int));
extern void x_clear_window_mouse_face P_ ((struct window *)); extern void x_clear_window_mouse_face P_ ((struct window *));
extern void cancel_mouse_face P_ ((struct frame *)); extern void cancel_mouse_face P_ ((struct frame *));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment