Mercurial > emacs
comparison src/w32term.c @ 40078:11e29c86babb
(x_fix_overlapping_area, x_write_glyphs, expose_area)
(expose_line, x_erase_phys_cursor): Don't use `inverse_p' field.
(w32_reassert_line_highlight, x_change_line_highlight): Functions removed.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 20 Oct 2001 05:49:35 +0000 |
parents | 1a8e549e2f40 |
children | 5f0d7d58283b |
comparison
equal
deleted
inserted
replaced
40077:ba1ee05b48f7 | 40078:11e29c86babb |
---|---|
357 static void x_draw_phys_cursor_glyph P_ ((struct window *, | 357 static void x_draw_phys_cursor_glyph P_ ((struct window *, |
358 struct glyph_row *, | 358 struct glyph_row *, |
359 enum draw_glyphs_face)); | 359 enum draw_glyphs_face)); |
360 static void x_update_end P_ ((struct frame *)); | 360 static void x_update_end P_ ((struct frame *)); |
361 static void w32_frame_up_to_date P_ ((struct frame *)); | 361 static void w32_frame_up_to_date P_ ((struct frame *)); |
362 static void w32_reassert_line_highlight P_ ((int, int)); | |
363 static void x_change_line_highlight P_ ((int, int, int, int)); | |
364 static void w32_set_terminal_modes P_ ((void)); | 362 static void w32_set_terminal_modes P_ ((void)); |
365 static void w32_reset_terminal_modes P_ ((void)); | 363 static void w32_reset_terminal_modes P_ ((void)); |
366 static void w32_cursor_to P_ ((int, int, int, int)); | 364 static void w32_cursor_to P_ ((int, int, int, int)); |
367 static void x_write_glyphs P_ ((struct glyph *, int)); | 365 static void x_write_glyphs P_ ((struct glyph *, int)); |
368 static void x_clear_end_of_line P_ ((int)); | 366 static void x_clear_end_of_line P_ ((int)); |
983 | 981 |
984 release_frame_dc (f, hdc); | 982 release_frame_dc (f, hdc); |
985 } | 983 } |
986 | 984 |
987 | 985 |
988 /*********************************************************************** | |
989 Line Highlighting | |
990 ***********************************************************************/ | |
991 | |
992 /* External interface to control of standout mode. Not used for W32 | |
993 frames. Aborts when called. */ | |
994 | |
995 static void | |
996 w32_reassert_line_highlight (new, vpos) | |
997 int new, vpos; | |
998 { | |
999 struct frame *f; | |
1000 | |
1001 if (updating_frame) | |
1002 f = updating_frame; | |
1003 else | |
1004 f = SELECTED_FRAME (); | |
1005 | |
1006 if (! FRAME_W32_P (f)) | |
1007 return; | |
1008 | |
1009 abort (); | |
1010 } | |
1011 | |
1012 | |
1013 /* Call this when about to modify line at position VPOS and change | |
1014 whether it is highlighted. Not used for W32 frames. Aborts when | |
1015 called. */ | |
1016 | |
1017 static void | |
1018 x_change_line_highlight (new_highlight, vpos, y, first_unused_hpos) | |
1019 int new_highlight, vpos, y, first_unused_hpos; | |
1020 { | |
1021 struct frame *f; | |
1022 | |
1023 if (updating_frame) | |
1024 f = updating_frame; | |
1025 else | |
1026 f = SELECTED_FRAME (); | |
1027 | |
1028 if (! FRAME_W32_P (f)) | |
1029 return; | |
1030 | |
1031 abort (); | |
1032 } | |
1033 | |
1034 | |
1035 /* This is called when starting Emacs and when restarting after | 986 /* This is called when starting Emacs and when restarting after |
1036 suspend. When starting Emacs, no window is mapped. And nothing | 987 suspend. When starting Emacs, no window is mapped. And nothing |
1037 must be done to Emacs's own window if it is suspended (though that | 988 must be done to Emacs's own window if it is suspended (though that |
1038 rarely happens). */ | 989 rarely happens). */ |
1039 | 990 |
5106 } | 5057 } |
5107 while (i < row->used[area] | 5058 while (i < row->used[area] |
5108 && row->glyphs[area][i].overlaps_vertically_p); | 5059 && row->glyphs[area][i].overlaps_vertically_p); |
5109 | 5060 |
5110 x_draw_glyphs (w, start_x, row, area, start, i, | 5061 x_draw_glyphs (w, start_x, row, area, start, i, |
5111 (row->inverse_p | 5062 DRAW_NORMAL_TEXT, |
5112 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT), | |
5113 NULL, NULL, 1); | 5063 NULL, NULL, 1); |
5114 } | 5064 } |
5115 else | 5065 else |
5116 { | 5066 { |
5117 x += row->glyphs[area][i].pixel_width; | 5067 x += row->glyphs[area][i].pixel_width; |
5143 | 5093 |
5144 hpos = start - updated_row->glyphs[updated_area]; | 5094 hpos = start - updated_row->glyphs[updated_area]; |
5145 x = x_draw_glyphs (updated_window, output_cursor.x, | 5095 x = x_draw_glyphs (updated_window, output_cursor.x, |
5146 updated_row, updated_area, | 5096 updated_row, updated_area, |
5147 hpos, hpos + len, | 5097 hpos, hpos + len, |
5148 (updated_row->inverse_p | 5098 DRAW_NORMAL_TEXT, |
5149 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT), | |
5150 &real_start, &real_end, 0); | 5099 &real_start, &real_end, 0); |
5151 | 5100 |
5152 /* If we drew over the cursor, note that it is not visible any more. */ | 5101 /* If we drew over the cursor, note that it is not visible any more. */ |
5153 note_overwritten_text_cursor (updated_window, real_start, | 5102 note_overwritten_text_cursor (updated_window, real_start, |
5154 real_end - real_start); | 5103 real_end - real_start); |
5609 | 5558 |
5610 if (area == TEXT_AREA && row->fill_line_p) | 5559 if (area == TEXT_AREA && row->fill_line_p) |
5611 /* If row extends face to end of line write the whole line. */ | 5560 /* If row extends face to end of line write the whole line. */ |
5612 x_draw_glyphs (w, 0, row, area, | 5561 x_draw_glyphs (w, 0, row, area, |
5613 0, row->used[area], | 5562 0, row->used[area], |
5614 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, | 5563 DRAW_NORMAL_TEXT, |
5615 NULL, NULL, 0); | 5564 NULL, NULL, 0); |
5616 else | 5565 else |
5617 { | 5566 { |
5618 /* Set START_X to the window-relative start position for drawing glyphs of | 5567 /* Set START_X to the window-relative start position for drawing glyphs of |
5619 AREA. The first glyph of the text area can be partially visible. | 5568 AREA. The first glyph of the text area can be partially visible. |
5648 /* Repaint. */ | 5597 /* Repaint. */ |
5649 if (last > first) | 5598 if (last > first) |
5650 x_draw_glyphs (w, first_x - start_x, row, area, | 5599 x_draw_glyphs (w, first_x - start_x, row, area, |
5651 first - row->glyphs[area], | 5600 first - row->glyphs[area], |
5652 last - row->glyphs[area], | 5601 last - row->glyphs[area], |
5653 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, | 5602 DRAW_NORMAL_TEXT, |
5654 NULL, NULL, 0); | 5603 NULL, NULL, 0); |
5655 } | 5604 } |
5656 } | 5605 } |
5657 | 5606 |
5658 | 5607 |
5667 { | 5616 { |
5668 xassert (row->enabled_p); | 5617 xassert (row->enabled_p); |
5669 | 5618 |
5670 if (row->mode_line_p || w->pseudo_window_p) | 5619 if (row->mode_line_p || w->pseudo_window_p) |
5671 x_draw_glyphs (w, 0, row, TEXT_AREA, 0, row->used[TEXT_AREA], | 5620 x_draw_glyphs (w, 0, row, TEXT_AREA, 0, row->used[TEXT_AREA], |
5672 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, | 5621 DRAW_NORMAL_TEXT, NULL, NULL, 0); |
5673 NULL, NULL, 0); | |
5674 else | 5622 else |
5675 { | 5623 { |
5676 if (row->used[LEFT_MARGIN_AREA]) | 5624 if (row->used[LEFT_MARGIN_AREA]) |
5677 expose_area (w, row, r, LEFT_MARGIN_AREA); | 5625 expose_area (w, row, r, LEFT_MARGIN_AREA); |
5678 if (row->used[TEXT_AREA]) | 5626 if (row->used[TEXT_AREA]) |
9055 } | 9003 } |
9056 | 9004 |
9057 /* Erase the cursor by redrawing the character underneath it. */ | 9005 /* Erase the cursor by redrawing the character underneath it. */ |
9058 if (mouse_face_here_p) | 9006 if (mouse_face_here_p) |
9059 hl = DRAW_MOUSE_FACE; | 9007 hl = DRAW_MOUSE_FACE; |
9060 else if (cursor_row->inverse_p) | |
9061 hl = DRAW_INVERSE_VIDEO; | |
9062 else | 9008 else |
9063 hl = DRAW_NORMAL_TEXT; | 9009 hl = DRAW_NORMAL_TEXT; |
9064 x_draw_phys_cursor_glyph (w, cursor_row, hl); | 9010 x_draw_phys_cursor_glyph (w, cursor_row, hl); |
9065 | 9011 |
9066 mark_cursor_off: | 9012 mark_cursor_off: |