comparison src/dispextern.h @ 89943:4c90ffeb71c5

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-15 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-218 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-220 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-221 Restore deleted tagline in etc/TUTORIAL.ru * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-222 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-228 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-229 Remove TeX output files from the archive * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248 src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-256 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-258 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-263 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-264 Update from CVS: lispref/display.texi: emacs -> Emacs. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-265 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275 Update from CVS: man/makefile.w32-in: Revert last change * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 Allow restarting an existing debugger session that's exited * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328 Update from CVS: src/.gdbinit (xsymbol): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-344 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-345 Tweak source regexps so that building in place won't cause problems * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-346 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-352 Update from CVS: lisp/flymake.el: New file. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-353 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-362 Support " [...]" style defaults in minibuffer-electric-default-mode * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-363 (read-number): Use canonical format for default in prompt. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-364 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-367 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-368 Improve display-supports-face-attributes-p on non-ttys * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-369 Rewrite face-differs-from-default-p * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-370 Move `display-supports-face-attributes-p' entirely into C code * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-371 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-372 Simplify face-differs-from-default-p; don't consider :stipple. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-373 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-374 (tty_supports_face_attributes_p): Ensure attributes differ from default * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-375 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-376 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377 (Fdisplay_supports_face_attributes_p): Work around bootstrapping problem * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-378 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-380 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-381 Face merging cleanups * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-382 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-384 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-385 src/xfaces.c (push_named_merge_point): Return 0 if a cycle is detected * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-386 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-396 Tweak arch tagging to make build/install-in-place less annoying * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397 Work around vc-arch problems when building eshell * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-398 Tweak permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-399 Tweak directory permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-401 More build-in-place tweaking of arch tagging * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-403 Yet more build-in-place tweaking of arch tagging * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-404 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410 Make sure image types are initialized for lookup too * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416 Update from CVS
author Miles Bader <miles@gnu.org>
date Mon, 28 Jun 2004 07:56:49 +0000
parents 68c22ea6027c 5407da499273
children c08afac24467
comparison
equal deleted inserted replaced
89942:9cb747ae49af 89943:4c90ffeb71c5
1 /* Interface definitions for display code. 1 /* Interface definitions for display code.
2 Copyright (C) 1985, 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003 2 Copyright (C) 1985,93,94,97,98,99, 2000,01,02,03, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5 This file is part of GNU Emacs. 5 This file is part of GNU Emacs.
6 6
7 GNU Emacs is free software; you can redistribute it and/or modify 7 GNU Emacs is free software; you can redistribute it and/or modify
272 /* Glyph is a space of fractional width and/or height. */ 272 /* Glyph is a space of fractional width and/or height. */
273 STRETCH_GLYPH 273 STRETCH_GLYPH
274 }; 274 };
275 275
276 276
277 /* Structure describing how to use partial glyphs (images slicing) */
278
279 struct glyph_slice
280 {
281 unsigned x : 16;
282 unsigned y : 16;
283 unsigned width : 16;
284 unsigned height : 16;
285 };
286
287
277 /* Glyphs. 288 /* Glyphs.
278 289
279 Be extra careful when changing this structure! Esp. make sure that 290 Be extra careful when changing this structure! Esp. make sure that
280 functions producing glyphs, like append_glyph, fill ALL of the 291 functions producing glyphs, like append_glyph, fill ALL of the
281 glyph structure, and that GLYPH_EQUAL_P compares all 292 glyph structure, and that GLYPH_EQUAL_P compares all
350 determine which set of functions to use to obtain font metrics 361 determine which set of functions to use to obtain font metrics
351 for the glyph. On W32, value should be an enumerator of the type 362 for the glyph. On W32, value should be an enumerator of the type
352 w32_char_font_type. Otherwise it equals FONT_TYPE_UNKNOWN. */ 363 w32_char_font_type. Otherwise it equals FONT_TYPE_UNKNOWN. */
353 unsigned font_type : 3; 364 unsigned font_type : 3;
354 365
366 struct glyph_slice slice;
367
355 /* A union of sub-structures for different glyph types. */ 368 /* A union of sub-structures for different glyph types. */
356 union 369 union
357 { 370 {
358 /* Character code for character glyphs (type == CHAR_GLYPH). */ 371 /* Character code for character glyphs (type == CHAR_GLYPH). */
359 unsigned ch; 372 unsigned ch;
388 /* Is GLYPH a space? */ 401 /* Is GLYPH a space? */
389 402
390 #define CHAR_GLYPH_SPACE_P(GLYPH) \ 403 #define CHAR_GLYPH_SPACE_P(GLYPH) \
391 (GLYPH_FROM_CHAR_GLYPH ((GLYPH)) == SPACEGLYPH) 404 (GLYPH_FROM_CHAR_GLYPH ((GLYPH)) == SPACEGLYPH)
392 405
406 /* Are glyph slices of glyphs *X and *Y equal */
407
408 #define GLYPH_SLICE_EQUAL_P(X, Y) \
409 ((X)->slice.x == (Y)->slice.x \
410 && (X)->slice.y == (Y)->slice.y \
411 && (X)->slice.width == (Y)->slice.width \
412 && (X)->slice.height == (Y)->slice.height)
413
393 /* Are glyphs *X and *Y displayed equal? */ 414 /* Are glyphs *X and *Y displayed equal? */
394 415
395 #define GLYPH_EQUAL_P(X, Y) \ 416 #define GLYPH_EQUAL_P(X, Y) \
396 ((X)->type == (Y)->type \ 417 ((X)->type == (Y)->type \
397 && (X)->u.val == (Y)->u.val \ 418 && (X)->u.val == (Y)->u.val \
419 && GLYPH_SLICE_EQUAL_P (X, Y) \
398 && (X)->face_id == (Y)->face_id \ 420 && (X)->face_id == (Y)->face_id \
399 && (X)->padding_p == (Y)->padding_p \ 421 && (X)->padding_p == (Y)->padding_p \
400 && (X)->left_box_line_p == (Y)->left_box_line_p \ 422 && (X)->left_box_line_p == (Y)->left_box_line_p \
401 && (X)->right_box_line_p == (Y)->right_box_line_p \ 423 && (X)->right_box_line_p == (Y)->right_box_line_p \
402 && (X)->voffset == (Y)->voffset \ 424 && (X)->voffset == (Y)->voffset \
1140 font_not_found_p is 1. */ 1162 font_not_found_p is 1. */
1141 struct glyph *first_glyph; 1163 struct glyph *first_glyph;
1142 1164
1143 /* Image, if any. */ 1165 /* Image, if any. */
1144 struct image *img; 1166 struct image *img;
1167
1168 /* Slice */
1169 struct glyph_slice slice;
1145 1170
1146 struct glyph_string *next, *prev; 1171 struct glyph_string *next, *prev;
1147 }; 1172 };
1148 1173
1149 #endif /* HAVE_WINDOW_SYSTEM */ 1174 #endif /* HAVE_WINDOW_SYSTEM */
1602 /* Structure used to describe where and how to draw a fringe bitmap. 1627 /* Structure used to describe where and how to draw a fringe bitmap.
1603 WHICH is the fringe bitmap to draw. WD and H is the (adjusted) 1628 WHICH is the fringe bitmap to draw. WD and H is the (adjusted)
1604 width and height of the bitmap, DH is the height adjustment (if 1629 width and height of the bitmap, DH is the height adjustment (if
1605 bitmap is periodic). X and Y are frame coordinates of the area to 1630 bitmap is periodic). X and Y are frame coordinates of the area to
1606 display the bitmap, DY is relative offset of the bitmap into that 1631 display the bitmap, DY is relative offset of the bitmap into that
1607 area. BX, NX, BY, NY specifies the area to clear if the bitmap 1632 area. BX, NX, BY, NY specifies the area to clear if the bitmap
1608 does not fill the entire area. FACE is the fringe face. */ 1633 does not fill the entire area. FACE is the fringe face. */
1609 1634
1610 struct draw_fringe_bitmap_params 1635 struct draw_fringe_bitmap_params
1611 { 1636 {
1612 int which; /* enum fringe_bitmap_type */ 1637 int which; /* enum fringe_bitmap_type */
1711 /* Not a property. Used to indicate changes in overlays. */ 1736 /* Not a property. Used to indicate changes in overlays. */
1712 OVERLAY_PROP_IDX, 1737 OVERLAY_PROP_IDX,
1713 1738
1714 /* Sentinel. */ 1739 /* Sentinel. */
1715 LAST_PROP_IDX 1740 LAST_PROP_IDX
1741 };
1742
1743
1744 struct it_slice
1745 {
1746 Lisp_Object x;
1747 Lisp_Object y;
1748 Lisp_Object width;
1749 Lisp_Object height;
1716 }; 1750 };
1717 1751
1718 1752
1719 struct it 1753 struct it
1720 { 1754 {
1826 int string_nchars; 1860 int string_nchars;
1827 enum glyph_row_area area; 1861 enum glyph_row_area area;
1828 unsigned multibyte_p : 1; 1862 unsigned multibyte_p : 1;
1829 unsigned string_from_display_prop_p : 1; 1863 unsigned string_from_display_prop_p : 1;
1830 unsigned display_ellipsis_p : 1; 1864 unsigned display_ellipsis_p : 1;
1865 struct it_slice slice;
1831 Lisp_Object space_width; 1866 Lisp_Object space_width;
1832 short voffset; 1867 short voffset;
1833 Lisp_Object font_height; 1868 Lisp_Object font_height;
1834 } 1869 }
1835 stack[2]; 1870 stack[2];
1880 1915
1881 /* If 1, saved_face_id contains the id of the face in front of text 1916 /* If 1, saved_face_id contains the id of the face in front of text
1882 skipped due to selective display. */ 1917 skipped due to selective display. */
1883 unsigned face_before_selective_p : 1; 1918 unsigned face_before_selective_p : 1;
1884 1919
1920 /* If 1, adjust current glyph so it does not increase current row
1921 descent/ascent (line-height property). Reset after this glyph. */
1922 unsigned constrain_row_ascent_descent_p : 1;
1923
1885 /* The ID of the default face to use. One of DEFAULT_FACE_ID, 1924 /* The ID of the default face to use. One of DEFAULT_FACE_ID,
1886 MODE_LINE_FACE_ID, etc, depending on what we are displaying. */ 1925 MODE_LINE_FACE_ID, etc, depending on what we are displaying. */
1887 int base_face_id; 1926 int base_face_id;
1888 1927
1889 /* If what == IT_CHARACTER, character and length in bytes. This is 1928 /* If what == IT_CHARACTER, character and length in bytes. This is
1904 is set after produce_glyphs has been called. */ 1943 is set after produce_glyphs has been called. */
1905 int char_to_display; 1944 int char_to_display;
1906 1945
1907 /* If what == IT_IMAGE, the id of the image to display. */ 1946 /* If what == IT_IMAGE, the id of the image to display. */
1908 int image_id; 1947 int image_id;
1948
1949 /* Values from `slice' property. */
1950 struct it_slice slice;
1909 1951
1910 /* Value of the `space-width' property, if any; nil if none. */ 1952 /* Value of the `space-width' property, if any; nil if none. */
1911 Lisp_Object space_width; 1953 Lisp_Object space_width;
1912 1954
1913 /* Computed from the value of the `raise' property. */ 1955 /* Computed from the value of the `raise' property. */
1942 int last_visible_y; 1984 int last_visible_y;
1943 1985
1944 /* Additional space in pixels between lines (for window systems 1986 /* Additional space in pixels between lines (for window systems
1945 only.) */ 1987 only.) */
1946 int extra_line_spacing; 1988 int extra_line_spacing;
1989
1990 /* Override font height information for this glyph.
1991 Used if override_ascent >= 0. Cleared after this glyph. */
1992 int override_ascent, override_descent, override_boff;
1947 1993
1948 /* If non-null, glyphs are produced in glyph_row with each call to 1994 /* If non-null, glyphs are produced in glyph_row with each call to
1949 produce_glyphs. */ 1995 produce_glyphs. */
1950 struct glyph_row *glyph_row; 1996 struct glyph_row *glyph_row;
1951 1997
2174 int (*encode_char) P_ ((int c, XChar2b *char2b, 2220 int (*encode_char) P_ ((int c, XChar2b *char2b,
2175 struct font_info *font_into, 2221 struct font_info *font_into,
2176 struct charset *charset, 2222 struct charset *charset,
2177 int *two_byte_p)); 2223 int *two_byte_p));
2178 2224
2179 /* Compute left and right overhang of glyph string S. 2225 /* Compute left and right overhang of glyph string S.
2180 A NULL pointer if platform does not support this. */ 2226 A NULL pointer if platform does not support this. */
2181 void (*compute_glyph_string_overhangs) P_ ((struct glyph_string *s)); 2227 void (*compute_glyph_string_overhangs) P_ ((struct glyph_string *s));
2182 2228
2183 /* Draw a glyph string S. */ 2229 /* Draw a glyph string S. */
2184 void (*draw_glyph_string) P_ ((struct glyph_string *s)); 2230 void (*draw_glyph_string) P_ ((struct glyph_string *s));
2202 2248
2203 /* Draw vertical border for window W from (X,Y0) to (X,Y1). */ 2249 /* Draw vertical border for window W from (X,Y0) to (X,Y1). */
2204 void (*draw_vertical_window_border) P_ ((struct window *w, 2250 void (*draw_vertical_window_border) P_ ((struct window *w,
2205 int x, int y0, int y1)); 2251 int x, int y0, int y1));
2206 2252
2207 /* Shift display of frame F to make room for inserted glyphs. 2253 /* Shift display of frame F to make room for inserted glyphs.
2208 The area at pixel (X,Y) of width WIDTH and height HEIGHT is 2254 The area at pixel (X,Y) of width WIDTH and height HEIGHT is
2209 shifted right by SHIFT_BY pixels. */ 2255 shifted right by SHIFT_BY pixels. */
2210 void (*shift_glyphs_for_insert) P_ ((struct frame *f, 2256 void (*shift_glyphs_for_insert) P_ ((struct frame *f,
2211 int x, int y, int width, 2257 int x, int y, int width,
2212 int height, int shift_by)); 2258 int height, int shift_by));
2516 void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *)); 2562 void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *));
2517 extern Lisp_Object Qtool_bar; 2563 extern Lisp_Object Qtool_bar;
2518 extern Lisp_Object Vshow_trailing_whitespace; 2564 extern Lisp_Object Vshow_trailing_whitespace;
2519 extern int mode_line_in_non_selected_windows; 2565 extern int mode_line_in_non_selected_windows;
2520 extern int redisplaying_p; 2566 extern int redisplaying_p;
2521 extern Lisp_Object Vimage_types;
2522 extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object)); 2567 extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
2523 extern int help_echo_showing_p; 2568 extern int help_echo_showing_p;
2524 extern int current_mode_line_height, current_header_line_height; 2569 extern int current_mode_line_height, current_header_line_height;
2525 extern Lisp_Object help_echo_string, help_echo_window; 2570 extern Lisp_Object help_echo_string, help_echo_window;
2526 extern Lisp_Object help_echo_object, previous_help_echo_string; 2571 extern Lisp_Object help_echo_object, previous_help_echo_string;
2527 extern int help_echo_pos; 2572 extern int help_echo_pos;
2528 extern struct frame *last_mouse_frame; 2573 extern struct frame *last_mouse_frame;
2529 extern int last_tool_bar_item; 2574 extern int last_tool_bar_item;
2530 extern int mouse_autoselect_window; 2575 extern int mouse_autoselect_window;
2531 2576
2630 2675
2631 unsigned long image_background P_ ((struct image *, struct frame *, 2676 unsigned long image_background P_ ((struct image *, struct frame *,
2632 XImagePtr_or_DC ximg)); 2677 XImagePtr_or_DC ximg));
2633 int image_background_transparent P_ ((struct image *, struct frame *, 2678 int image_background_transparent P_ ((struct image *, struct frame *,
2634 XImagePtr_or_DC mask)); 2679 XImagePtr_or_DC mask));
2680
2681 int image_ascent P_ ((struct image *, struct face *, struct glyph_slice *));
2635 2682
2636 #endif 2683 #endif
2637 2684
2638 /* Defined in sysdep.c */ 2685 /* Defined in sysdep.c */
2639 2686
2739 extern int required_matrix_width P_ ((struct window *)); 2786 extern int required_matrix_width P_ ((struct window *));
2740 extern int required_matrix_height P_ ((struct window *)); 2787 extern int required_matrix_height P_ ((struct window *));
2741 extern Lisp_Object buffer_posn_from_coords P_ ((struct window *, 2788 extern Lisp_Object buffer_posn_from_coords P_ ((struct window *,
2742 int *, int *, 2789 int *, int *,
2743 struct display_pos *, 2790 struct display_pos *,
2744 Lisp_Object *, 2791 Lisp_Object *,
2745 int *, int *, int *, int *)); 2792 int *, int *, int *, int *));
2746 extern Lisp_Object mode_line_string P_ ((struct window *, enum window_part, 2793 extern Lisp_Object mode_line_string P_ ((struct window *, enum window_part,
2747 int *, int *, int *, 2794 int *, int *, int *,
2748 Lisp_Object *, 2795 Lisp_Object *,
2749 int *, int *, int *, int *)); 2796 int *, int *, int *, int *));