aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h42
1 files changed, 33 insertions, 9 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 166d420d857..a179c8488dd 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -694,6 +694,10 @@ struct glyph_row
694 frames. It may be < 0 in case of completely invisible rows. */ 694 frames. It may be < 0 in case of completely invisible rows. */
695 int visible_height; 695 int visible_height;
696 696
697 /* Extra line spacing added after this row. Do not consider this
698 in last row when checking if row is fully visible. */
699 int extra_line_spacing;
700
697 /* Hash code. This hash code is available as soon as the row 701 /* Hash code. This hash code is available as soon as the row
698 is constructed, i.e. after a call to display_line. */ 702 is constructed, i.e. after a call to display_line. */
699 unsigned hash; 703 unsigned hash;
@@ -916,22 +920,39 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int));
916 920
917#define MATRIX_ROW_DISPLAYS_TEXT_P(ROW) ((ROW)->displays_text_p) 921#define MATRIX_ROW_DISPLAYS_TEXT_P(ROW) ((ROW)->displays_text_p)
918 922
923
924/* Helper macros */
925
926#define MR_PARTIALLY_VISIBLE(ROW) \
927 ((ROW)->height != (ROW)->visible_height)
928
929#define MR_PARTIALLY_VISIBLE_AT_TOP(W, ROW) \
930 ((ROW)->y < WINDOW_HEADER_LINE_HEIGHT ((W)))
931
932#define MR_PARTIALLY_VISIBLE_AT_BOTTOM(W, ROW) \
933 (((ROW)->y + (ROW)->height - (ROW)->extra_line_spacing) \
934 > WINDOW_BOX_HEIGHT_NO_MODE_LINE ((W)))
935
919/* Non-zero if ROW is not completely visible in window W. */ 936/* Non-zero if ROW is not completely visible in window W. */
920 937
921#define MATRIX_ROW_PARTIALLY_VISIBLE_P(ROW) \ 938#define MATRIX_ROW_PARTIALLY_VISIBLE_P(W, ROW) \
922 ((ROW)->height != (ROW)->visible_height) 939 (MR_PARTIALLY_VISIBLE ((ROW)) \
940 && (MR_PARTIALLY_VISIBLE_AT_TOP ((W), (ROW)) \
941 || MR_PARTIALLY_VISIBLE_AT_BOTTOM ((W), (ROW))))
942
943
923 944
924/* Non-zero if ROW is partially visible at the top of window W. */ 945/* Non-zero if ROW is partially visible at the top of window W. */
925 946
926#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \ 947#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \
927 (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \ 948 (MR_PARTIALLY_VISIBLE ((ROW)) \
928 && (ROW)->y < WINDOW_HEADER_LINE_HEIGHT ((W))) 949 && MR_PARTIALLY_VISIBLE_AT_TOP ((W), (ROW)))
929 950
930/* Non-zero if ROW is partially visible at the bottom of window W. */ 951/* Non-zero if ROW is partially visible at the bottom of window W. */
931 952
932#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW) \ 953#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW) \
933 (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \ 954 (MR_PARTIALLY_VISIBLE ((ROW)) \
934 && (ROW)->y + (ROW)->height > WINDOW_BOX_HEIGHT_NO_MODE_LINE ((W))) 955 && MR_PARTIALLY_VISIBLE_AT_BOTTOM ((W), (ROW)))
935 956
936/* Return the bottom Y + 1 of ROW. */ 957/* Return the bottom Y + 1 of ROW. */
937 958
@@ -1986,10 +2007,13 @@ struct it
1986 line, if the window has one. */ 2007 line, if the window has one. */
1987 int last_visible_y; 2008 int last_visible_y;
1988 2009
1989 /* Additional space in pixels between lines (for window systems 2010 /* Default amount of additional space in pixels between lines (for
1990 only.) */ 2011 window systems only.) */
1991 int extra_line_spacing; 2012 int extra_line_spacing;
1992 2013
2014 /* Max extra line spacing added in this row. */
2015 int max_extra_line_spacing;
2016
1993 /* Override font height information for this glyph. 2017 /* Override font height information for this glyph.
1994 Used if override_ascent >= 0. Cleared after this glyph. */ 2018 Used if override_ascent >= 0. Cleared after this glyph. */
1995 int override_ascent, override_descent, override_boff; 2019 int override_ascent, override_descent, override_boff;