aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h87
1 files changed, 70 insertions, 17 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 20e074d2393..7426c03b5ec 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -69,6 +69,11 @@ typedef Pixmap XImagePtr;
69typedef XImagePtr XImagePtr_or_DC; 69typedef XImagePtr XImagePtr_or_DC;
70#endif 70#endif
71 71
72#ifndef HAVE_WINDOW_SYSTEM
73typedef int Cursor;
74#define No_Cursor (0)
75#endif
76
72#ifndef NativeRectangle 77#ifndef NativeRectangle
73#define NativeRectangle int 78#define NativeRectangle int
74#endif 79#endif
@@ -279,6 +284,9 @@ enum glyph_type
279 /* Glyph describes a static composition. */ 284 /* Glyph describes a static composition. */
280 COMPOSITE_GLYPH, 285 COMPOSITE_GLYPH,
281 286
287 /* Glyph describes a glyphless character. */
288 GLYPHLESS_GLYPH,
289
282 /* Glyph describes an image. */ 290 /* Glyph describes an image. */
283 IMAGE_GLYPH, 291 IMAGE_GLYPH,
284 292
@@ -333,7 +341,7 @@ struct glyph
333 341
334 /* Which kind of glyph this is---character, image etc. Value 342 /* Which kind of glyph this is---character, image etc. Value
335 should be an enumerator of type enum glyph_type. */ 343 should be an enumerator of type enum glyph_type. */
336 unsigned type : 2; 344 unsigned type : 3;
337 345
338 /* 1 means this glyph was produced from multibyte text. Zero 346 /* 1 means this glyph was produced from multibyte text. Zero
339 means it was produced from unibyte text, i.e. charsets aren't 347 means it was produced from unibyte text, i.e. charsets aren't
@@ -363,12 +371,11 @@ struct glyph
363 displaying. The member `pixel_width' above is set to 1. */ 371 displaying. The member `pixel_width' above is set to 1. */
364 unsigned padding_p : 1; 372 unsigned padding_p : 1;
365 373
366 /* 1 means the actual glyph is not available, draw a box instead. 374 /* 1 means the actual glyph is not available, draw using `struct
367 This can happen when a font couldn't be loaded, or a character 375 glyphless' below instead. This can happen when a font couldn't
368 doesn't have a glyph in a font. */ 376 be loaded, or a character doesn't have a glyph in a font. */
369 unsigned glyph_not_available_p : 1; 377 unsigned glyph_not_available_p : 1;
370 378
371
372 /* Non-zero means don't display cursor here. */ 379 /* Non-zero means don't display cursor here. */
373 unsigned avoid_cursor_p : 1; 380 unsigned avoid_cursor_p : 1;
374 381
@@ -402,6 +409,11 @@ struct glyph
402 /* Start and end indices of glyphs of a graphme cluster of a 409 /* Start and end indices of glyphs of a graphme cluster of a
403 composition (type == COMPOSITE_GLYPH). */ 410 composition (type == COMPOSITE_GLYPH). */
404 struct { int from, to; } cmp; 411 struct { int from, to; } cmp;
412 /* Pixel offsets for upper and lower part of the acronym. */
413 struct {
414 short upper_xoff, upper_yoff;
415 short lower_xoff, lower_yoff;
416 } glyphless;
405 } slice; 417 } slice;
406 418
407 /* A union of sub-structures for different glyph types. */ 419 /* A union of sub-structures for different glyph types. */
@@ -433,6 +445,19 @@ struct glyph
433 } 445 }
434 stretch; 446 stretch;
435 447
448 /* Sub-stretch for type == GLYPHLESS_GLYPH. */
449 struct
450 {
451 /* Value is an enum of the type glyphless_display_method. */
452 unsigned method : 2;
453 /* 1 iff this glyph is for a character of no font. */
454 unsigned for_no_font : 1;
455 /* Length of acronym or hexadecimal code string (at most 8). */
456 unsigned len : 4;
457 /* Character to display. Actually we need only 22 bits. */
458 unsigned ch : 26;
459 } glyphless;
460
436 /* Used to compare all bit-fields above in one step. */ 461 /* Used to compare all bit-fields above in one step. */
437 unsigned val; 462 unsigned val;
438 } u; 463 } u;
@@ -1918,6 +1943,9 @@ enum display_element_type
1918 /* A composition (static and automatic). */ 1943 /* A composition (static and automatic). */
1919 IT_COMPOSITION, 1944 IT_COMPOSITION,
1920 1945
1946 /* A glyphless character (e.g. ZWNJ, LRE). */
1947 IT_GLYPHLESS,
1948
1921 /* An image. */ 1949 /* An image. */
1922 IT_IMAGE, 1950 IT_IMAGE,
1923 1951
@@ -1964,6 +1992,21 @@ enum line_wrap_method
1964 WINDOW_WRAP 1992 WINDOW_WRAP
1965}; 1993};
1966 1994
1995/* An enumerator for the method of displaying glyphless characters. */
1996
1997enum glyphless_display_method
1998 {
1999 /* Display a thin (1-pixel width) space. On a TTY, display a
2000 1-character width space. */
2001 GLYPHLESS_DISPLAY_THIN_SPACE,
2002 /* Display an empty box of proper width. */
2003 GLYPHLESS_DISPLAY_EMPTY_BOX,
2004 /* Display an acronym string in a box. */
2005 GLYPHLESS_DISPLAY_ACRONYM,
2006 /* Display the hexadecimal code of the character in a box. */
2007 GLYPHLESS_DISPLAY_HEX_CODE
2008 };
2009
1967struct it_slice 2010struct it_slice
1968{ 2011{
1969 Lisp_Object x; 2012 Lisp_Object x;
@@ -2295,6 +2338,10 @@ struct it
2295 PRODUCE_GLYPHS, this should be set beforehand too. */ 2338 PRODUCE_GLYPHS, this should be set beforehand too. */
2296 int char_to_display; 2339 int char_to_display;
2297 2340
2341 /* If what == IT_GLYPHLESS, the method to display such a
2342 character. */
2343 enum glyphless_display_method glyphless_method;
2344
2298 /* If what == IT_IMAGE, the id of the image to display. */ 2345 /* If what == IT_IMAGE, the id of the image to display. */
2299 int image_id; 2346 int image_id;
2300 2347
@@ -2840,6 +2887,9 @@ enum tool_bar_item_idx
2840 /* Label to show when text labels are enabled. */ 2887 /* Label to show when text labels are enabled. */
2841 TOOL_BAR_ITEM_LABEL, 2888 TOOL_BAR_ITEM_LABEL,
2842 2889
2890 /* If we shall show the label only below the icon and not beside it. */
2891 TOOL_BAR_ITEM_VERT_ONLY,
2892
2843 /* Sentinel = number of slots in tool_bar_items occupied by one 2893 /* Sentinel = number of slots in tool_bar_items occupied by one
2844 tool-bar item. */ 2894 tool-bar item. */
2845 TOOL_BAR_ITEM_NSLOTS 2895 TOOL_BAR_ITEM_NSLOTS
@@ -2976,9 +3026,10 @@ extern int last_tool_bar_item;
2976extern Lisp_Object Vmouse_autoselect_window; 3026extern Lisp_Object Vmouse_autoselect_window;
2977extern int unibyte_display_via_language_environment; 3027extern int unibyte_display_via_language_environment;
2978extern EMACS_INT underline_minimum_offset; 3028extern EMACS_INT underline_minimum_offset;
3029extern Lisp_Object Vglyphless_char_display;
2979 3030
2980extern void reseat_at_previous_visible_line_start (struct it *); 3031extern void reseat_at_previous_visible_line_start (struct it *);
2981 3032extern Lisp_Object lookup_glyphless_char_display (int, struct it *);
2982extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, 3033extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object,
2983 struct font *, int, int *); 3034 struct font *, int, int *);
2984 3035
@@ -3017,28 +3068,31 @@ extern void x_update_cursor (struct frame *, int);
3017extern void x_clear_cursor (struct window *); 3068extern void x_clear_cursor (struct window *);
3018extern void x_draw_vertical_border (struct window *w); 3069extern void x_draw_vertical_border (struct window *w);
3019 3070
3020extern void frame_to_window_pixel_xy (struct window *, int *, int *);
3021extern int get_glyph_string_clip_rects (struct glyph_string *, 3071extern int get_glyph_string_clip_rects (struct glyph_string *,
3022 NativeRectangle *, int); 3072 NativeRectangle *, int);
3023extern void get_glyph_string_clip_rect (struct glyph_string *, 3073extern void get_glyph_string_clip_rect (struct glyph_string *,
3024 NativeRectangle *nr); 3074 NativeRectangle *nr);
3025extern Lisp_Object find_hot_spot (Lisp_Object, int, int); 3075extern Lisp_Object find_hot_spot (Lisp_Object, int, int);
3026extern void note_mouse_highlight (struct frame *, int, int);
3027extern void x_clear_window_mouse_face (struct window *);
3028extern void cancel_mouse_face (struct frame *);
3029 3076
3030extern void handle_tool_bar_click (struct frame *, 3077extern void handle_tool_bar_click (struct frame *,
3031 int, int, int, unsigned int); 3078 int, int, int, unsigned int);
3032 3079
3033/* msdos.c defines its own versions of these functions. */
3034extern int clear_mouse_face (Display_Info *);
3035extern void show_mouse_face (Display_Info *, enum draw_glyphs_face);
3036extern int cursor_in_mouse_face_p (struct window *w);
3037
3038extern void expose_frame (struct frame *, int, int, int, int); 3080extern void expose_frame (struct frame *, int, int, int, int);
3039extern int x_intersect_rectangles (XRectangle *, XRectangle *, 3081extern int x_intersect_rectangles (XRectangle *, XRectangle *,
3040 XRectangle *); 3082 XRectangle *);
3041#endif 3083#endif /* HAVE_WINDOW_SYSTEM */
3084
3085extern void frame_to_window_pixel_xy (struct window *, int *, int *);
3086extern void note_mouse_highlight (struct frame *, int, int);
3087extern void x_clear_window_mouse_face (struct window *);
3088extern void cancel_mouse_face (struct frame *);
3089extern int clear_mouse_face (Mouse_HLInfo *);
3090extern void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
3091extern int cursor_in_mouse_face_p (struct window *w);
3092extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *,
3093 int, int, enum draw_glyphs_face);
3094extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
3095 int, int, enum draw_glyphs_face);
3042 3096
3043/* Flags passed to try_window. */ 3097/* Flags passed to try_window. */
3044#define TRY_WINDOW_CHECK_MARGINS (1 << 0) 3098#define TRY_WINDOW_CHECK_MARGINS (1 << 0)
@@ -3124,7 +3178,6 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
3124int ascii_face_of_lisp_face (struct frame *, int); 3178int ascii_face_of_lisp_face (struct frame *, int);
3125void prepare_face_for_display (struct frame *, struct face *); 3179void prepare_face_for_display (struct frame *, struct face *);
3126int xstrcasecmp (const unsigned char *, const unsigned char *); 3180int xstrcasecmp (const unsigned char *, const unsigned char *);
3127int lookup_face (struct frame *, Lisp_Object *);
3128int lookup_named_face (struct frame *, Lisp_Object, int); 3181int lookup_named_face (struct frame *, Lisp_Object, int);
3129int lookup_basic_face (struct frame *, int); 3182int lookup_basic_face (struct frame *, int);
3130int smaller_face (struct frame *, int, int); 3183int smaller_face (struct frame *, int, int);