aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-03-21 21:47:46 +0000
committerKim F. Storm2003-03-21 21:47:46 +0000
commite5a3b7d9690daa0827ca68074c4fa904eb552e63 (patch)
treedfc9e8e5ce376f2761bae93e13130d12a0999742 /src
parent5c9cc435b8ee04290d18817dbf859329cb9f0224 (diff)
downloademacs-e5a3b7d9690daa0827ca68074c4fa904eb552e63.tar.gz
emacs-e5a3b7d9690daa0827ca68074c4fa904eb552e63.zip
(struct redisplay_interface): Add active_p argument to
draw_window_cursor member. All uses changed.
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h12
-rw-r--r--src/macterm.c17
-rw-r--r--src/w32term.c21
-rw-r--r--src/xterm.c17
4 files changed, 36 insertions, 31 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index ad42527fdc0..822b4054541 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2258,13 +2258,15 @@ struct redisplay_interface
2258 void (*clear_frame_area) P_ ((struct frame *f, int x, int y, 2258 void (*clear_frame_area) P_ ((struct frame *f, int x, int y,
2259 int width, int height)); 2259 int width, int height));
2260 2260
2261/* Draw specified cursor NEW_CURSOR_TYPE of width NEW_CURSOR_WIDTH 2261/* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
2262 at row GLYPH_ROW on window W. */ 2262 at row GLYPH_ROW on window W if ON_P is 1. If ON_P is
2263 0, don't draw cursor. If ACTIVE_P is 1, system caret
2264 should track this cursor (when applicable). */
2263 void (*draw_window_cursor) P_ ((struct window *w, 2265 void (*draw_window_cursor) P_ ((struct window *w,
2264 struct glyph_row *glyph_row, 2266 struct glyph_row *glyph_row,
2265 int on, int x, int y, 2267 int x, int y,
2266 int new_cursor_type, 2268 int cursor_type, int cursor_width,
2267 int new_cursor_width)); 2269 int on_p, int active_p));
2268 2270
2269/* Draw vertical border for window W from (X,Y0) to (X,Y1). */ 2271/* Draw vertical border for window W from (X,Y0) to (X,Y1). */
2270 void (*draw_vertical_window_border) P_ ((struct window *w, 2272 void (*draw_vertical_window_border) P_ ((struct window *w,
diff --git a/src/macterm.c b/src/macterm.c
index 510269c8ca5..68c599caa3e 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -4648,19 +4648,20 @@ mac_clear_frame_area (f, x, y, width, height)
4648/* RIF: Draw cursor on window W. */ 4648/* RIF: Draw cursor on window W. */
4649 4649
4650static void 4650static void
4651mac_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_width) 4651mac_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
4652 struct window *w; 4652 struct window *w;
4653 struct glyph_row *glyph_row; 4653 struct glyph_row *glyph_row;
4654 int on, x, y; 4654 int x, y;
4655 int new_cursor_type, new_cursor_width; 4655 int cursor_type, cursor_width;
4656 int on_p, active_p;
4656{ 4657{
4657 if (on) 4658 if (on_p)
4658 { 4659 {
4659 w->phys_cursor_type = new_cursor_type; 4660 w->phys_cursor_type = cursor_type;
4660 w->phys_cursor_width = new_cursor_width; 4661 w->phys_cursor_width = cursor_width;
4661 w->phys_cursor_on_p = 1; 4662 w->phys_cursor_on_p = 1;
4662 4663
4663 switch (new_cursor_type) 4664 switch (cursor_type)
4664 { 4665 {
4665 case HOLLOW_BOX_CURSOR: 4666 case HOLLOW_BOX_CURSOR:
4666 x_draw_hollow_cursor (w, glyph_row); 4667 x_draw_hollow_cursor (w, glyph_row);
@@ -4673,7 +4674,7 @@ mac_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt
4673 case HBAR_CURSOR: 4674 case HBAR_CURSOR:
4674 /* TODO. For now, just draw bar cursor. */ 4675 /* TODO. For now, just draw bar cursor. */
4675 case BAR_CURSOR: 4676 case BAR_CURSOR:
4676 x_draw_bar_cursor (w, glyph_row, new_cursor_width); 4677 x_draw_bar_cursor (w, glyph_row, cursor_width);
4677 break; 4678 break;
4678 4679
4679 case NO_CURSOR: 4680 case NO_CURSOR:
diff --git a/src/w32term.c b/src/w32term.c
index a93482672cc..d539d53e691 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5160,13 +5160,14 @@ w32_clear_frame_area (f, x, y, width, height)
5160/* RIF: Draw or clear cursor on window W. */ 5160/* RIF: Draw or clear cursor on window W. */
5161 5161
5162static void 5162static void
5163w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_width) 5163w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
5164 struct window *w; 5164 struct window *w;
5165 struct glyph_row *glyph_row; 5165 struct glyph_row *glyph_row;
5166 int on, x, y; 5166 int x, y;
5167 int new_cursor_type, new_cursor_width; 5167 int cursor_type, cursor_width;
5168 int on_p, active_p;
5168{ 5169{
5169 if (on) 5170 if (on_p)
5170 { 5171 {
5171 /* If the user wants to use the system caret, make sure our own 5172 /* If the user wants to use the system caret, make sure our own
5172 cursor remains invisible. */ 5173 cursor remains invisible. */
@@ -5175,12 +5176,12 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt
5175 if (w->phys_cursor_type != NO_CURSOR) 5176 if (w->phys_cursor_type != NO_CURSOR)
5176 erase_phys_cursor (w); 5177 erase_phys_cursor (w);
5177 5178
5178 new_cursor_type = w->phys_cursor_type = NO_CURSOR; 5179 cursor_type = w->phys_cursor_type = NO_CURSOR;
5179 w->phys_cursor_width = -1; 5180 w->phys_cursor_width = -1;
5180 } 5181 }
5181 else 5182 else
5182 { 5183 {
5183 w->phys_cursor_type = new_cursor_type; 5184 w->phys_cursor_type = cursor_type;
5184 } 5185 }
5185 5186
5186 w->phys_cursor_on_p = 1; 5187 w->phys_cursor_on_p = 1;
@@ -5188,7 +5189,7 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt
5188 /* If this is the active cursor, we need to track it with the 5189 /* If this is the active cursor, we need to track it with the
5189 system caret, so third party software like screen magnifiers 5190 system caret, so third party software like screen magnifiers
5190 and speech synthesizers can follow the cursor. */ 5191 and speech synthesizers can follow the cursor. */
5191 if (active_cursor) 5192 if (active_p)
5192 { 5193 {
5193 HWND hwnd = FRAME_W32_WINDOW (f); 5194 HWND hwnd = FRAME_W32_WINDOW (f);
5194 5195
@@ -5210,7 +5211,7 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt
5210 PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0); 5211 PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0);
5211 } 5212 }
5212 5213
5213 switch (new_cursor_type) 5214 switch (cursor_type)
5214 { 5215 {
5215 case HOLLOW_BOX_CURSOR: 5216 case HOLLOW_BOX_CURSOR:
5216 x_draw_hollow_cursor (w, glyph_row); 5217 x_draw_hollow_cursor (w, glyph_row);
@@ -5221,11 +5222,11 @@ w32_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_widt
5221 break; 5222 break;
5222 5223
5223 case BAR_CURSOR: 5224 case BAR_CURSOR:
5224 x_draw_bar_cursor (w, glyph_row, new_cursor_width, BAR_CURSOR); 5225 x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR);
5225 break; 5226 break;
5226 5227
5227 case HBAR_CURSOR: 5228 case HBAR_CURSOR:
5228 x_draw_bar_cursor (w, glyph_row, new_cursor_width, HBAR_CURSOR); 5229 x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR);
5229 break; 5230 break;
5230 5231
5231 case NO_CURSOR: 5232 case NO_CURSOR:
diff --git a/src/xterm.c b/src/xterm.c
index b74fef5b92a..b4fdd5c360e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7500,20 +7500,21 @@ x_clear_frame_area (f, x, y, width, height)
7500/* RIF: Draw cursor on window W. */ 7500/* RIF: Draw cursor on window W. */
7501 7501
7502static void 7502static void
7503x_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_width) 7503x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
7504 struct window *w; 7504 struct window *w;
7505 struct glyph_row *glyph_row; 7505 struct glyph_row *glyph_row;
7506 int on, x, y; 7506 int x, y;
7507 int new_cursor_type, new_cursor_width; 7507 int cursor_type, cursor_width;
7508 int on_p, active_p;
7508{ 7509{
7509 struct frame *f = XFRAME (WINDOW_FRAME (w)); 7510 struct frame *f = XFRAME (WINDOW_FRAME (w));
7510 7511
7511 if (on) 7512 if (on_p)
7512 { 7513 {
7513 w->phys_cursor_type = new_cursor_type; 7514 w->phys_cursor_type = cursor_type;
7514 w->phys_cursor_on_p = 1; 7515 w->phys_cursor_on_p = 1;
7515 7516
7516 switch (new_cursor_type) 7517 switch (cursor_type)
7517 { 7518 {
7518 case HOLLOW_BOX_CURSOR: 7519 case HOLLOW_BOX_CURSOR:
7519 x_draw_hollow_cursor (w, glyph_row); 7520 x_draw_hollow_cursor (w, glyph_row);
@@ -7524,11 +7525,11 @@ x_draw_window_cursor (w, glyph_row, on, x, y, new_cursor_type, new_cursor_width)
7524 break; 7525 break;
7525 7526
7526 case BAR_CURSOR: 7527 case BAR_CURSOR:
7527 x_draw_bar_cursor (w, glyph_row, new_cursor_width, BAR_CURSOR); 7528 x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR);
7528 break; 7529 break;
7529 7530
7530 case HBAR_CURSOR: 7531 case HBAR_CURSOR:
7531 x_draw_bar_cursor (w, glyph_row, new_cursor_width, HBAR_CURSOR); 7532 x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR);
7532 break; 7533 break;
7533 7534
7534 case NO_CURSOR: 7535 case NO_CURSOR: