Mercurial > emacs
comparison src/w32term.c @ 58402:d1d4d5846215
(w32_clip_to_row): Add area arg. Callers changed.
(x_draw_hollow_cursor, x_draw_bar_cursor): Clip to TEXT_AREA.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 21 Nov 2004 15:48:58 +0000 |
parents | d2354c6afd6d |
children | c21a6318ec07 2a3f27a45698 f2ebccfa87d4 |
comparison
equal
deleted
inserted
replaced
58401:972f6be01006 | 58402:d1d4d5846215 |
---|---|
258 static void w32_frame_rehighlight P_ ((struct frame *)); | 258 static void w32_frame_rehighlight P_ ((struct frame *)); |
259 static void x_frame_rehighlight P_ ((struct w32_display_info *)); | 259 static void x_frame_rehighlight P_ ((struct w32_display_info *)); |
260 static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); | 260 static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); |
261 static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, | 261 static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, |
262 enum text_cursor_kinds)); | 262 enum text_cursor_kinds)); |
263 static void w32_clip_to_row P_ ((struct window *, struct glyph_row *, HDC)); | 263 static void w32_clip_to_row P_ ((struct window *, struct glyph_row *, int, HDC)); |
264 | 264 |
265 static Lisp_Object Qvendor_specific_keysyms; | 265 static Lisp_Object Qvendor_specific_keysyms; |
266 | 266 |
267 | 267 |
268 /*********************************************************************** | 268 /*********************************************************************** |
689 visible last row. */ | 689 visible last row. */ |
690 int oldY = row->y; | 690 int oldY = row->y; |
691 int oldVH = row->visible_height; | 691 int oldVH = row->visible_height; |
692 row->visible_height = p->h; | 692 row->visible_height = p->h; |
693 row->y -= rowY - p->y; | 693 row->y -= rowY - p->y; |
694 w32_clip_to_row (w, row, hdc); | 694 w32_clip_to_row (w, row, -1, hdc); |
695 row->y = oldY; | 695 row->y = oldY; |
696 row->visible_height = oldVH; | 696 row->visible_height = oldVH; |
697 } | 697 } |
698 else | 698 else |
699 w32_clip_to_row (w, row, hdc); | 699 w32_clip_to_row (w, row, -1, hdc); |
700 | 700 |
701 if (p->bx >= 0 && !p->overlay_p) | 701 if (p->bx >= 0 && !p->overlay_p) |
702 { | 702 { |
703 w32_fill_area (f, hdc, face->background, | 703 w32_fill_area (f, hdc, face->background, |
704 p->bx, p->by, p->nx, p->ny); | 704 p->bx, p->by, p->nx, p->ny); |
4910 ROW may be a text row or, e.g., a mode line. Text rows must be | 4910 ROW may be a text row or, e.g., a mode line. Text rows must be |
4911 clipped to the interior of the window dedicated to text display, | 4911 clipped to the interior of the window dedicated to text display, |
4912 mode lines must be clipped to the whole window. */ | 4912 mode lines must be clipped to the whole window. */ |
4913 | 4913 |
4914 static void | 4914 static void |
4915 w32_clip_to_row (w, row, hdc) | 4915 w32_clip_to_row (w, row, area, hdc) |
4916 struct window *w; | 4916 struct window *w; |
4917 struct glyph_row *row; | 4917 struct glyph_row *row; |
4918 int area; | |
4918 HDC hdc; | 4919 HDC hdc; |
4919 { | 4920 { |
4920 struct frame *f = XFRAME (WINDOW_FRAME (w)); | 4921 struct frame *f = XFRAME (WINDOW_FRAME (w)); |
4921 RECT clip_rect; | 4922 RECT clip_rect; |
4922 int window_y, window_width; | 4923 int window_x, window_y, window_width; |
4923 | 4924 |
4924 window_box (w, -1, 0, &window_y, &window_width, 0); | 4925 window_box (w, area, &window_x, &window_y, &window_width, 0); |
4925 | 4926 |
4926 clip_rect.left = WINDOW_TO_FRAME_PIXEL_X (w, 0); | 4927 clip_rect.left = window_x; |
4927 clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 4928 clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
4928 clip_rect.top = max (clip_rect.top, window_y); | 4929 clip_rect.top = max (clip_rect.top, window_y); |
4929 clip_rect.right = clip_rect.left + window_width; | 4930 clip_rect.right = clip_rect.left + window_width; |
4930 clip_rect.bottom = clip_rect.top + row->visible_height; | 4931 clip_rect.bottom = clip_rect.top + row->visible_height; |
4931 | 4932 |
4981 w->phys_cursor_width = wd; | 4982 w->phys_cursor_width = wd; |
4982 | 4983 |
4983 rect.right = rect.left + wd; | 4984 rect.right = rect.left + wd; |
4984 hdc = get_frame_dc (f); | 4985 hdc = get_frame_dc (f); |
4985 /* Set clipping, draw the rectangle, and reset clipping again. */ | 4986 /* Set clipping, draw the rectangle, and reset clipping again. */ |
4986 w32_clip_to_row (w, row, hdc); | 4987 w32_clip_to_row (w, row, TEXT_AREA, hdc); |
4987 FrameRect (hdc, &rect, hb); | 4988 FrameRect (hdc, &rect, hb); |
4988 DeleteObject (hb); | 4989 DeleteObject (hb); |
4989 w32_set_clip_rectangle (hdc, NULL); | 4990 w32_set_clip_rectangle (hdc, NULL); |
4990 release_frame_dc (f, hdc); | 4991 release_frame_dc (f, hdc); |
4991 } | 4992 } |
5047 | 5048 |
5048 w->phys_cursor_width = width; | 5049 w->phys_cursor_width = width; |
5049 | 5050 |
5050 | 5051 |
5051 hdc = get_frame_dc (f); | 5052 hdc = get_frame_dc (f); |
5052 w32_clip_to_row (w, row, hdc); | 5053 w32_clip_to_row (w, row, TEXT_AREA, hdc); |
5053 | 5054 |
5054 if (kind == BAR_CURSOR) | 5055 if (kind == BAR_CURSOR) |
5055 { | 5056 { |
5056 w32_fill_area (f, hdc, cursor_color, x, | 5057 w32_fill_area (f, hdc, cursor_color, x, |
5057 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), | 5058 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), |