diff options
| author | Jason Rumney | 2002-05-22 19:37:56 +0000 |
|---|---|---|
| committer | Jason Rumney | 2002-05-22 19:37:56 +0000 |
| commit | 17456df15cfd5d40e835dd71bb0b4168e9453cc5 (patch) | |
| tree | d384481a41929e71cf2a9d8f73362b9ceb108726 /src | |
| parent | 6a6ab7b654d36311e83952fb03f2f5a80545ce20 (diff) | |
| download | emacs-17456df15cfd5d40e835dd71bb0b4168e9453cc5.tar.gz emacs-17456df15cfd5d40e835dd71bb0b4168e9453cc5.zip | |
(x_draw_bar_cursor): New argument KIND; callers changed.
Handle the `hbar' cursor type.
(x_display_and_set_cursor): Handle the HBAR_CURSOR case.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/w32term.c | 28 |
2 files changed, 38 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6cd3d78d23b..eb8ea4f5751 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2002-05-22 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (enumfont_t): Remove tail, make pattern a normal | ||
| 4 | Lisp_Object. | ||
| 5 | (enum_font_cb2, enum_font_maybe_add_to_list, w32_list_fonts): | ||
| 6 | Use modified enumfont_t struct. | ||
| 7 | |||
| 8 | * w32term.h (text_cursor_kinds): New enumeration member HBAR_CURSOR. | ||
| 9 | |||
| 10 | * w32term.c (x_draw_bar_cursor): New argument KIND; callers changed. | ||
| 11 | Handle the `hbar' cursor type. | ||
| 12 | (x_display_and_set_cursor): Handle the HBAR_CURSOR case. | ||
| 13 | |||
| 14 | * w32fns.c (Qhbar): New variable. | ||
| 15 | (x_specified_cursor_type): Use it. | ||
| 16 | |||
| 1 | 2002-05-21 Ken Raeburn <raeburn@gnu.org> | 17 | 2002-05-21 Ken Raeburn <raeburn@gnu.org> |
| 2 | 18 | ||
| 3 | * w32fns.c (enum_font_maybe_add_to_list): Use XCDR_AS_LVALUE for | 19 | * w32fns.c (enum_font_maybe_add_to_list): Use XCDR_AS_LVALUE for |
diff --git a/src/w32term.c b/src/w32term.c index eb055dab044..e8797abeaf1 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -9455,10 +9455,11 @@ x_draw_hollow_cursor (w, row) | |||
| 9455 | --gerd. */ | 9455 | --gerd. */ |
| 9456 | 9456 | ||
| 9457 | static void | 9457 | static void |
| 9458 | x_draw_bar_cursor (w, row, width) | 9458 | x_draw_bar_cursor (w, row, width, kind) |
| 9459 | struct window *w; | 9459 | struct window *w; |
| 9460 | struct glyph_row *row; | 9460 | struct glyph_row *row; |
| 9461 | int width; | 9461 | int width; |
| 9462 | enum text_cursor_kinds kind; | ||
| 9462 | { | 9463 | { |
| 9463 | struct frame *f = XFRAME (w->frame); | 9464 | struct frame *f = XFRAME (w->frame); |
| 9464 | struct glyph *cursor_glyph; | 9465 | struct glyph *cursor_glyph; |
| @@ -9488,6 +9489,7 @@ x_draw_bar_cursor (w, row, width) | |||
| 9488 | 9489 | ||
| 9489 | if (width < 0) | 9490 | if (width < 0) |
| 9490 | width = f->output_data.w32->cursor_width; | 9491 | width = f->output_data.w32->cursor_width; |
| 9492 | width = min (cursor_glyph->pixel_width, width); | ||
| 9491 | 9493 | ||
| 9492 | /* If the glyph's background equals the color we normally draw | 9494 | /* If the glyph's background equals the color we normally draw |
| 9493 | the bar cursor in, the bar cursor in its normal color is | 9495 | the bar cursor in, the bar cursor in its normal color is |
| @@ -9500,10 +9502,20 @@ x_draw_bar_cursor (w, row, width) | |||
| 9500 | x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); | 9502 | x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); |
| 9501 | hdc = get_frame_dc (f); | 9503 | hdc = get_frame_dc (f); |
| 9502 | w32_clip_to_row (w, row, hdc, 0); | 9504 | w32_clip_to_row (w, row, hdc, 0); |
| 9503 | w32_fill_area (f, hdc, cursor_color, x, | 9505 | |
| 9504 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), | 9506 | if (kind == BAR_CURSOR) |
| 9505 | min (cursor_glyph->pixel_width, width), | 9507 | { |
| 9506 | row->height); | 9508 | w32_fill_area (f, hdc, cursor_color, x, |
| 9509 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), | ||
| 9510 | width, row->height); | ||
| 9511 | } | ||
| 9512 | else | ||
| 9513 | { | ||
| 9514 | w32_fill_area (f, hdc, cursor_color, x, | ||
| 9515 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + | ||
| 9516 | row->height - width), | ||
| 9517 | cursor_glyph->pixel_width, width); | ||
| 9518 | } | ||
| 9507 | release_frame_dc (f, hdc); | 9519 | release_frame_dc (f, hdc); |
| 9508 | } | 9520 | } |
| 9509 | } | 9521 | } |
| @@ -9872,7 +9884,11 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 9872 | break; | 9884 | break; |
| 9873 | 9885 | ||
| 9874 | case BAR_CURSOR: | 9886 | case BAR_CURSOR: |
| 9875 | x_draw_bar_cursor (w, glyph_row, new_cursor_width); | 9887 | x_draw_bar_cursor (w, glyph_row, new_cursor_width, BAR_CURSOR); |
| 9888 | break; | ||
| 9889 | |||
| 9890 | case HBAR_CURSOR: | ||
| 9891 | x_draw_bar_cursor (w, glyph_row, new_cursor_width, HBAR_CURSOR); | ||
| 9876 | break; | 9892 | break; |
| 9877 | 9893 | ||
| 9878 | case NO_CURSOR: | 9894 | case NO_CURSOR: |