# HG changeset patch # User Gerd Moellmann # Date 933947969 0 # Node ID d3614d7b7583144181e7bfa3fdb378eca0550194 # Parent 290fceb2b1c079607dbb4f4164fa474939ba193c (struct glyph_row): Add overlapping_p. (MATRIX_ROW_OVERLAPS_PRED_P): New. (MATRIX_ROW_OVERLAPS_SUCC_P): New. (struct glyph_row): Add flag overlapped_p. (MATRIX_ROW_OVERLAPPING_P): New. (struct redisplay_interface): Add fix_overlapping_area. (struct glyph): Add overlaps_vertically_p. (struct glyph_row): Add phys_ascent and phys_height. (struct it): Add phys_ascent, phys_descent, max_phys_ascent, max_phys_descent. diff -r 290fceb2b1c0 -r d3614d7b7583 src/dispextern.h --- a/src/dispextern.h Fri Aug 06 11:45:48 1999 +0000 +++ b/src/dispextern.h Fri Aug 06 13:59:29 1999 +0000 @@ -262,6 +262,11 @@ unsigned left_box_line_p : 1; unsigned right_box_line_p : 1; + /* Non-zero means this glyph's physical ascent or descent is greater + than its logical ascent/descent, i.e. it may potentially overlap + glyphs above or below it. */ + unsigned overlaps_vertically_p : 1; + /* A union of sub-structures for different glyph types. */ union { @@ -563,10 +568,15 @@ end of the row into account. */ int pixel_width; - /* Height information. The value of ascent is zero and height is 1 - on terminal frames. */ + /* Logical ascent/height of this line. The value of ascent is zero + and height is 1 on terminal frames. */ int ascent, height; + /* Physical ascent/height of this line. If max_ascent > ascent, + this line overlaps the line above it on the display. Otherwise, + if max_height > height, this line overlaps the line beneath it. */ + int phys_ascent, phys_height; + /* Portion of row that is visible. Partially visible rows may be found at the top and bottom of a window. This is 1 for tty frames. It may be < 0 in case of completely invisible rows. */ @@ -639,6 +649,12 @@ /* Non-zero means row is a mode or top-line. */ unsigned mode_line_p : 1; + /* 1 in a current row means this row is overlapped by another row. */ + unsigned overlapped_p : 1; + + /* 1 in a current row means this row overlaps others. */ + unsigned overlapping_p : 1; + /* Continuation lines width at the start of the row. */ int continuation_lines_width; }; @@ -778,7 +794,17 @@ || ((ROW)->start.overlay_string_index >= 0 \ && (ROW)->start.string_pos.charpos > 0)) - +/* Non-zero means ROW overlaps its predecessor. */ + +#define MATRIX_ROW_OVERLAPS_PRED_P(ROW) \ + ((ROW)->phys_ascent > (ROW)->ascent) + +/* Non-zero means ROW overlaps its successor. */ + +#define MATRIX_ROW_OVERLAPS_SUCC_P(ROW) \ + ((ROW)->phys_height - (ROW)->phys_ascent \ + > (ROW)->height - (ROW)->ascent) + /* Non-zero means that fonts have been loaded since the last glyph matrix adjustments. The function redisplay_internal adjusts glyph matrices when this flag is non-zero. */ @@ -1638,9 +1664,10 @@ produce_glyphs. */ int pixel_width; - /* Current and maximum line height information. Result of - produce_glyphs. */ + /* Current, maximum logical, and maximum physical line height + information. Result of produce_glyphs. */ int ascent, descent, max_ascent, max_descent; + int phys_ascent, phys_descent, max_phys_ascent, max_phys_descent; /* Current x pixel position within the display line. This value does not include the width of continuation lines in front of the @@ -1781,6 +1808,12 @@ frame F. */ void (*get_glyph_overhangs) P_ ((struct glyph *glyph, struct frame *f, int *left, int *right)); + + /* Fix the display of AREA of ROW in window W for overlapping rows. + This function is called from redraw_overlapping_rows after + desired rows have been made current. */ + void (*fix_overlapping_area) P_ ((struct window *w, struct glyph_row *row, + enum glyph_row_area area)); }; /* The current interface for window-based redisplay. */