Mercurial > emacs
comparison src/xterm.c @ 25546:e98819a94512
Change
`top-line' and `top_line' to `header-line' and `header_line'.
Likewise for similar spellings.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sun, 05 Sep 1999 16:39:19 +0000 |
parents | 693ca9ba497a |
children | ddf2e1fef00b |
comparison
equal
deleted
inserted
replaced
25545:b0a117037bde | 25546:e98819a94512 |
---|---|
866 struct glyph_row *row; | 866 struct glyph_row *row; |
867 { | 867 { |
868 struct frame *f = XFRAME (w->frame); | 868 struct frame *f = XFRAME (w->frame); |
869 enum bitmap_type bitmap; | 869 enum bitmap_type bitmap; |
870 struct face *face; | 870 struct face *face; |
871 int top_line_height = -1; | 871 int header_line_height = -1; |
872 | 872 |
873 xassert (interrupt_input_blocked); | 873 xassert (interrupt_input_blocked); |
874 | 874 |
875 /* If row is completely invisible, because of vscrolling, we | 875 /* If row is completely invisible, because of vscrolling, we |
876 don't have to draw anything. */ | 876 don't have to draw anything. */ |
902 int border = ((XFASTINT (w->left) > 0 | 902 int border = ((XFASTINT (w->left) > 0 |
903 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)) | 903 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)) |
904 ? 1 : 0); | 904 ? 1 : 0); |
905 int left = window_box_left (w, -1); | 905 int left = window_box_left (w, -1); |
906 | 906 |
907 if (top_line_height < 0) | 907 if (header_line_height < 0) |
908 top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); | 908 header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
909 | 909 |
910 /* In case the same realized face is used for bitmap areas and | 910 /* In case the same realized face is used for bitmap areas and |
911 for something displayed in the text (e.g. face `region' on | 911 for something displayed in the text (e.g. face `region' on |
912 mono-displays, the fill style may have been changed to | 912 mono-displays, the fill style may have been changed to |
913 FillSolid in x_draw_glyph_string_background. */ | 913 FillSolid in x_draw_glyph_string_background. */ |
919 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 919 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
920 face->gc, | 920 face->gc, |
921 (left | 921 (left |
922 - FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) | 922 - FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) |
923 + border), | 923 + border), |
924 WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height, | 924 WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
925 row->y)), | 925 row->y)), |
926 FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border, | 926 FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border, |
927 row->visible_height); | 927 row->visible_height); |
928 if (!face->stipple) | 928 if (!face->stipple) |
929 XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); | 929 XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); |
947 || FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) | 947 || FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) |
948 || row->height > FRAME_FLAGS_BITMAP_HEIGHT (f)) | 948 || row->height > FRAME_FLAGS_BITMAP_HEIGHT (f)) |
949 { | 949 { |
950 int right = window_box_right (w, -1); | 950 int right = window_box_right (w, -1); |
951 | 951 |
952 if (top_line_height < 0) | 952 if (header_line_height < 0) |
953 top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); | 953 header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
954 | 954 |
955 /* In case the same realized face is used for bitmap areas and | 955 /* In case the same realized face is used for bitmap areas and |
956 for something displayed in the text (e.g. face `region' on | 956 for something displayed in the text (e.g. face `region' on |
957 mono-displays, the fill style may have been changed to | 957 mono-displays, the fill style may have been changed to |
958 FillSolid in x_draw_glyph_string_background. */ | 958 FillSolid in x_draw_glyph_string_background. */ |
961 else | 961 else |
962 XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->background); | 962 XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->background); |
963 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 963 XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
964 face->gc, | 964 face->gc, |
965 right, | 965 right, |
966 WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height, | 966 WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
967 row->y)), | 967 row->y)), |
968 FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f), | 968 FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f), |
969 row->visible_height); | 969 row->visible_height); |
970 if (!face->stipple) | 970 if (!face->stipple) |
971 XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); | 971 XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); |
2433 /* Don't use S->y for clipping because it doesn't take partially | 2433 /* Don't use S->y for clipping because it doesn't take partially |
2434 visible lines into account. For example, it can be negative for | 2434 visible lines into account. For example, it can be negative for |
2435 partially visible lines at the top of a window. */ | 2435 partially visible lines at the top of a window. */ |
2436 if (!s->row->full_width_p | 2436 if (!s->row->full_width_p |
2437 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row)) | 2437 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row)) |
2438 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w); | 2438 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); |
2439 else | 2439 else |
2440 r->y = max (0, s->row->y); | 2440 r->y = max (0, s->row->y); |
2441 | 2441 |
2442 /* If drawing a tool-bar window, draw it over the internal border | 2442 /* If drawing a tool-bar window, draw it over the internal border |
2443 at the top of the window. */ | 2443 at the top of the window. */ |
2447 /* If S draws overlapping rows, it's sufficient to use the top and | 2447 /* If S draws overlapping rows, it's sufficient to use the top and |
2448 bottom of the window for clipping because this glyph string | 2448 bottom of the window for clipping because this glyph string |
2449 intentionally draws over other lines. */ | 2449 intentionally draws over other lines. */ |
2450 if (s->for_overlaps_p) | 2450 if (s->for_overlaps_p) |
2451 { | 2451 { |
2452 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w); | 2452 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); |
2453 r->height = window_text_bottom_y (s->w) - r->y; | 2453 r->height = window_text_bottom_y (s->w) - r->y; |
2454 } | 2454 } |
2455 | 2455 |
2456 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y); | 2456 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y); |
2457 } | 2457 } |
4720 { | 4720 { |
4721 from_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, from_x); | 4721 from_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, from_x); |
4722 to_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, to_x); | 4722 to_x = WINDOW_AREA_TO_FRAME_PIXEL_X (w, updated_area, to_x); |
4723 } | 4723 } |
4724 | 4724 |
4725 min_y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); | 4725 min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
4726 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y)); | 4726 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y)); |
4727 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y); | 4727 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y); |
4728 | 4728 |
4729 /* Prevent inadvertently clearing to end of the X window. */ | 4729 /* Prevent inadvertently clearing to end of the X window. */ |
4730 if (to_x > from_x && to_y > from_y) | 4730 if (to_x > from_x && to_y > from_y) |
6045 struct glyph_row *row; | 6045 struct glyph_row *row; |
6046 | 6046 |
6047 if (mode_line_p) | 6047 if (mode_line_p) |
6048 row = MATRIX_MODE_LINE_ROW (w->current_matrix); | 6048 row = MATRIX_MODE_LINE_ROW (w->current_matrix); |
6049 else | 6049 else |
6050 row = MATRIX_TOP_LINE_ROW (w->current_matrix); | 6050 row = MATRIX_HEADER_LINE_ROW (w->current_matrix); |
6051 | 6051 |
6052 if (row->enabled_p) | 6052 if (row->enabled_p) |
6053 { | 6053 { |
6054 struct glyph *glyph, *end; | 6054 struct glyph *glyph, *end; |
6055 Lisp_Object help, map; | 6055 Lisp_Object help, map; |
9998 | 9998 |
9999 /* Maybe clear the display under the cursor. */ | 9999 /* Maybe clear the display under the cursor. */ |
10000 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) | 10000 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) |
10001 { | 10001 { |
10002 int x; | 10002 int x; |
10003 int top_line_height = WINDOW_DISPLAY_TOP_LINE_HEIGHT (w); | 10003 int header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
10004 | 10004 |
10005 cursor_glyph = get_phys_cursor_glyph (w); | 10005 cursor_glyph = get_phys_cursor_glyph (w); |
10006 if (cursor_glyph == NULL) | 10006 if (cursor_glyph == NULL) |
10007 goto mark_cursor_off; | 10007 goto mark_cursor_off; |
10008 | 10008 |
10009 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), | 10009 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), |
10010 | 10010 |
10011 XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 10011 XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
10012 x, | 10012 x, |
10013 WINDOW_TO_FRAME_PIXEL_Y (w, max (top_line_height, | 10013 WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
10014 cursor_row->y)), | 10014 cursor_row->y)), |
10015 cursor_glyph->pixel_width, | 10015 cursor_glyph->pixel_width, |
10016 cursor_row->visible_height, | 10016 cursor_row->visible_height, |
10017 False); | 10017 False); |
10018 } | 10018 } |