comparison src/xterm.c @ 44690:8826cd76618a

(x_draw_bar_cursor): New argument KIND; callers changed. Handle the `hbar' cursor type. (x_display_and_set_cursor): Handle the HBAR_CURSOR case.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 19 Apr 2002 11:47:58 +0000
parents 404f74d6dc4a
children b4274ec69fa3
comparison
equal deleted inserted replaced
44689:63f15e84eed7 44690:8826cd76618a
467 static void frame_unhighlight P_ ((struct frame *)); 467 static void frame_unhighlight P_ ((struct frame *));
468 static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *)); 468 static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
469 static void XTframe_rehighlight P_ ((struct frame *)); 469 static void XTframe_rehighlight P_ ((struct frame *));
470 static void x_frame_rehighlight P_ ((struct x_display_info *)); 470 static void x_frame_rehighlight P_ ((struct x_display_info *));
471 static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); 471 static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
472 static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int)); 472 static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int,
473 enum text_cursor_kinds));
473 static int x_intersect_rectangles P_ ((XRectangle *, XRectangle *, 474 static int x_intersect_rectangles P_ ((XRectangle *, XRectangle *,
474 XRectangle *)); 475 XRectangle *));
475 static void expose_frame P_ ((struct frame *, int, int, int, int)); 476 static void expose_frame P_ ((struct frame *, int, int, int, int));
476 static int expose_window_tree P_ ((struct window *, XRectangle *)); 477 static int expose_window_tree P_ ((struct window *, XRectangle *));
477 static int expose_window P_ ((struct window *, XRectangle *)); 478 static int expose_window P_ ((struct window *, XRectangle *));
11331 angle equal to the one given by the font property XA_ITALIC_ANGLE. 11332 angle equal to the one given by the font property XA_ITALIC_ANGLE.
11332 Unfortunately, I didn't find a font yet that has this property set. 11333 Unfortunately, I didn't find a font yet that has this property set.
11333 --gerd. */ 11334 --gerd. */
11334 11335
11335 static void 11336 static void
11336 x_draw_bar_cursor (w, row, width) 11337 x_draw_bar_cursor (w, row, width, kind)
11337 struct window *w; 11338 struct window *w;
11338 struct glyph_row *row; 11339 struct glyph_row *row;
11339 int width; 11340 int width;
11341 enum text_cursor_kinds kind;
11340 { 11342 {
11341 struct frame *f = XFRAME (w->frame); 11343 struct frame *f = XFRAME (w->frame);
11342 struct glyph *cursor_glyph; 11344 struct glyph *cursor_glyph;
11343 11345
11344 /* If cursor is out of bounds, don't draw garbage. This can happen 11346 /* If cursor is out of bounds, don't draw garbage. This can happen
11388 if (width < 0) 11390 if (width < 0)
11389 width = f->output_data.x->cursor_width; 11391 width = f->output_data.x->cursor_width;
11390 width = min (cursor_glyph->pixel_width, width); 11392 width = min (cursor_glyph->pixel_width, width);
11391 11393
11392 x_clip_to_row (w, row, gc, 0); 11394 x_clip_to_row (w, row, gc, 0);
11393 XFillRectangle (dpy, window, gc, 11395 if (kind == BAR_CURSOR)
11394 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), 11396 XFillRectangle (dpy, window, gc,
11395 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), 11397 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
11396 width, row->height); 11398 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
11399 width, row->height);
11400 else
11401 XFillRectangle (dpy, window, gc,
11402 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
11403 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
11404 row->height - width),
11405 cursor_glyph->pixel_width,
11406 width);
11407
11397 XSetClipMask (dpy, gc, None); 11408 XSetClipMask (dpy, gc, None);
11398 } 11409 }
11399 } 11410 }
11400 11411
11401 11412
11712 case FILLED_BOX_CURSOR: 11723 case FILLED_BOX_CURSOR:
11713 x_draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); 11724 x_draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
11714 break; 11725 break;
11715 11726
11716 case BAR_CURSOR: 11727 case BAR_CURSOR:
11717 x_draw_bar_cursor (w, glyph_row, new_cursor_width); 11728 x_draw_bar_cursor (w, glyph_row, new_cursor_width, BAR_CURSOR);
11729 break;
11730
11731 case HBAR_CURSOR:
11732 x_draw_bar_cursor (w, glyph_row, new_cursor_width, HBAR_CURSOR);
11718 break; 11733 break;
11719 11734
11720 case NO_CURSOR: 11735 case NO_CURSOR:
11721 break; 11736 break;
11722 11737