X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/54efd2ab176dd6cc33bb1e86a9c37908c26d0a46..c026c0016e8075f4112e7ea0d868a8e2b81105d0:/src/dispextern.h diff --git a/src/dispextern.h b/src/dispextern.h index bf0c2fc0a4..e44b70bf56 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -348,10 +348,6 @@ enum glyph_type /* Glyph is a space of fractional width and/or height. */ STRETCH_GLYPH -#ifdef HAVE_XWIDGETS - /* Glyph is an external widget drawn by the GUI toolkit. */ - ,XWIDGET_GLYPH -#endif }; @@ -503,9 +499,6 @@ struct glyph /* Image ID for image glyphs (type == IMAGE_GLYPH). */ int img_id; -#ifdef HAVE_XWIDGETS - struct xwidget* xwidget; -#endif /* Sub-structure for type == STRETCH_GLYPH. */ struct { @@ -1313,9 +1306,6 @@ struct glyph_string /* True means the background of this string has been drawn. */ bool_bf background_filled_p : 1; - /* True means glyph string must be drawn with 16-bit functions. */ - bool_bf two_byte_p : 1; - /* True means that the original font determined for drawing this glyph string could not be loaded. The member `font' has been set to the frame's default font in this case. */ @@ -1360,9 +1350,6 @@ struct glyph_string /* Image, if any. */ struct image *img; -#ifdef HAVE_XWIDGETS - struct xwidget* xwidget; -#endif /* Slice */ struct glyph_slice slice; @@ -1539,6 +1526,12 @@ struct glyph_string + (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \ - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F))) +/* A heuristic test for fonts that claim they need a preposterously + large vertical space. The heuristics is in the factor of 3. We + ignore the ascent and descent values reported by such fonts, and + instead go by the values reported for individual glyphs. */ +#define FONT_TOO_HIGH(ft) ((ft)->ascent + (ft)->descent > 3*(ft)->pixel_size) + /*********************************************************************** Faces @@ -1823,8 +1816,10 @@ struct face_cache ((FACE) == (FACE)->ascii_face) /* Return the id of the realized face on frame F that is like the face - with id ID but is suitable for displaying character CHAR. - This macro is only meaningful for multibyte character CHAR. */ + FACE, but is suitable for displaying character CHAR at buffer or + string position POS. OBJECT is the string object, or nil for + buffer. This macro is only meaningful for multibyte character + CHAR. */ #define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \ face_for_char ((F), (FACE), (CHAR), (POS), (OBJECT)) @@ -1860,10 +1855,10 @@ GLYPH_CODE_P (Lisp_Object gc) : TYPE_MAXIMUM (EMACS_INT))))); } -/* Non-zero means face attributes have been changed since the last +/* True means face attributes have been changed since the last redisplay. Used in redisplay_internal. */ -extern int face_change_count; +extern bool face_change; /* For reordering of bidirectional text. */ @@ -2107,10 +2102,6 @@ enum display_element_type /* Continuation glyphs. See the comment for IT_TRUNCATION. */ IT_CONTINUATION - -#ifdef HAVE_XWIDGETS - ,IT_XWIDGET -#endif }; @@ -2174,9 +2165,6 @@ enum it_method { GET_FROM_C_STRING, GET_FROM_IMAGE, GET_FROM_STRETCH, -#ifdef HAVE_XWIDGETS - GET_FROM_XWIDGET, -#endif NUM_IT_METHODS }; @@ -2390,20 +2378,10 @@ struct it struct it_slice slice; ptrdiff_t image_id; } image; - /* method == GET_FROM_COMPOSITION */ - struct { - Lisp_Object object; - } comp; /* method == GET_FROM_STRETCH */ struct { Lisp_Object object; } stretch; -#ifdef HAVE_XWIDGETS - /* method == GET_FROM_XWIDGET */ - struct { - Lisp_Object object; - } xwidget; -#endif } u; /* Current text and display positions. */ @@ -2528,10 +2506,6 @@ struct it /* If what == IT_IMAGE, the id of the image to display. */ ptrdiff_t image_id; -#ifdef HAVE_XWIDGETS - /* If what == IT_XWIDGET*/ - struct xwidget* xwidget; -#endif /* Values from `slice' property. */ struct it_slice slice; @@ -2969,6 +2943,10 @@ struct image /* Pixmaps of the image. */ Pixmap pixmap, mask; +#ifdef USE_CAIRO + void *cr_data; + void *cr_data2; +#endif #ifdef HAVE_X_WINDOWS /* X images of the image, corresponding to the above Pixmaps. Non-NULL means it and its Pixmap counterpart may be out of sync @@ -3212,9 +3190,9 @@ struct glyph_row *row_containing_pos (struct window *, ptrdiff_t, struct glyph_row *, int); int line_bottom_y (struct it *); int default_line_pixel_height (struct window *); -int display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t); +bool display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t); void resize_echo_area_exactly (void); -int resize_mini_window (struct window *, int); +bool resize_mini_window (struct window *, bool); void set_vertical_scroll_bar (struct window *); void set_horizontal_scroll_bar (struct window *); int try_window (Lisp_Object, struct text_pos, int); @@ -3229,10 +3207,10 @@ int window_box_right (struct window *, enum glyph_row_area); int estimate_mode_line_height (struct frame *, enum face_id); int move_it_to (struct it *, ptrdiff_t, int, int, int, int); void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, - NativeRectangle *, int); + NativeRectangle *, bool); void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *); -void mark_window_display_accurate (Lisp_Object, int); +void mark_window_display_accurate (Lisp_Object, bool); void redisplay_preserve_echo_area (int); void init_iterator (struct it *, struct window *, ptrdiff_t, ptrdiff_t, struct glyph_row *, enum face_id); @@ -3258,11 +3236,14 @@ extern void reseat_at_previous_visible_line_start (struct it *); extern Lisp_Object lookup_glyphless_char_display (int, struct it *); extern ptrdiff_t compute_display_string_pos (struct text_pos *, struct bidi_string_data *, - struct window *, int, int *); + struct window *, bool, int *); extern ptrdiff_t compute_display_string_end (ptrdiff_t, struct bidi_string_data *); extern void produce_stretch_glyph (struct it *); extern int merge_glyphless_glyph_face (struct it *); +extern void forget_escape_and_glyphless_faces (void); + +extern void get_font_ascent_descent (struct font *, int *, int *); #ifdef HAVE_WINDOW_SYSTEM @@ -3301,21 +3282,20 @@ extern void get_glyph_string_clip_rect (struct glyph_string *, extern Lisp_Object find_hot_spot (Lisp_Object, int, int); extern void handle_tool_bar_click (struct frame *, - int, int, int, int); + int, int, bool, int); extern void expose_frame (struct frame *, int, int, int, int); -extern int x_intersect_rectangles (XRectangle *, XRectangle *, - XRectangle *); +extern bool x_intersect_rectangles (XRectangle *, XRectangle *, XRectangle *); #endif /* HAVE_WINDOW_SYSTEM */ extern void note_mouse_highlight (struct frame *, int, int); extern void x_clear_window_mouse_face (struct window *); extern void cancel_mouse_face (struct frame *); -extern int clear_mouse_face (Mouse_HLInfo *); +extern bool clear_mouse_face (Mouse_HLInfo *); extern bool cursor_in_mouse_face_p (struct window *w); extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *, int, int, enum draw_glyphs_face); -extern void display_tty_menu_item (const char *, int, int, int, int, int); +extern void display_tty_menu_item (const char *, int, int, int, int, bool); /* Flags passed to try_window. */ #define TRY_WINDOW_CHECK_MARGINS (1 << 0) @@ -3331,6 +3311,9 @@ bool update_window_fringes (struct window *, bool); void w32_init_fringe (struct redisplay_interface *); void w32_reset_fringes (void); #endif +#ifdef USE_CAIRO +void x_cr_init_fringe (struct redisplay_interface *); +#endif extern unsigned row_hash (struct glyph_row *); @@ -3387,7 +3370,6 @@ void unrequest_sigio (void); bool tabs_safe_p (int); void init_baud_rate (int); void init_sigio (int); -void ignore_sigio (void); /* Defined in xfaces.c. */ @@ -3407,23 +3389,20 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, #ifdef HAVE_WINDOW_SYSTEM void prepare_face_for_display (struct frame *, struct face *); #endif -int lookup_named_face (struct frame *, Lisp_Object, int); +int lookup_named_face (struct frame *, Lisp_Object, bool); int lookup_basic_face (struct frame *, int); int smaller_face (struct frame *, int, int); int face_with_height (struct frame *, int, int); -int lookup_derived_face (struct frame *, Lisp_Object, int, int); +int lookup_derived_face (struct frame *, Lisp_Object, int, bool); void init_frame_faces (struct frame *); void free_frame_faces (struct frame *); void recompute_basic_faces (struct frame *); -int face_at_buffer_position (struct window *w, ptrdiff_t pos, - ptrdiff_t *endptr, ptrdiff_t limit, - int mouse, int base_face_id); -int face_for_overlay_string (struct window *w, ptrdiff_t pos, - ptrdiff_t *endptr, ptrdiff_t limit, - int mouse, Lisp_Object overlay); -int face_at_string_position (struct window *w, Lisp_Object string, - ptrdiff_t pos, ptrdiff_t bufpos, - ptrdiff_t *endptr, enum face_id, int mouse); +int face_at_buffer_position (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t, + bool, int); +int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t, + bool, Lisp_Object); +int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t, + ptrdiff_t *, enum face_id, bool); int merge_faces (struct frame *, Lisp_Object, int, int); int compute_char_face (struct frame *, int, Lisp_Object); void free_all_realized_faces (Lisp_Object);