aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-23 08:03:25 +0400
committerDmitry Antipov2013-08-23 08:03:25 +0400
commit9997ec56be8bf3fb32ac246e5b654ed735ee2c52 (patch)
tree9005d22fa77dfbf0799c83e094bf510fc877af58 /src/dispextern.h
parent7f780da621d462afa3c6e0374590a86de513f863 (diff)
downloademacs-9997ec56be8bf3fb32ac246e5b654ed735ee2c52.tar.gz
emacs-9997ec56be8bf3fb32ac246e5b654ed735ee2c52.zip
Minor cleanup for redisplay interface and few related functions.
* frame.h (enum text_cursor_kinds): Move from here... * dispextern.h (enum text_cursor_kinds): ...to here. (toplevel): Drop unnecessary declarations. (struct redisplay_interface): Use bool and enum text_cursor_kinds in update_window_end_hook and draw_window_cursor functions. (display_and_set_cursor, x_update_cursor): Adjust prototypes. * nsterm.m (ns_update_window_end, ns_draw_window_cursor): * w32term.c (x_update_window_end,w32_draw_window_cursor): * xterm.c (x_update_window_end, x_draw_window_cursor): * xdisp.c (display_and_set_cursor, update_window_cursor) (update_cursor_in_window_tree, x_update_cursor): Use bool and enum text_cursor_kinds where appropriate.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index eb5b4bd195c..6e1d85de924 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -95,18 +95,17 @@ typedef int Cursor;
95#define NativeRectangle int 95#define NativeRectangle int
96#endif 96#endif
97 97
98/* Structure forward declarations. Some are here because function 98/* Text cursor types. */
99 prototypes below reference structure types before their definition
100 in this file. Some are here because not every file including
101 dispextern.h also includes frame.h and windows.h. */
102
103struct glyph;
104struct glyph_row;
105struct glyph_matrix;
106struct glyph_pool;
107struct frame;
108struct window;
109 99
100enum text_cursor_kinds
101{
102 DEFAULT_CURSOR = -2,
103 NO_CURSOR = -1,
104 FILLED_BOX_CURSOR,
105 HOLLOW_BOX_CURSOR,
106 BAR_CURSOR,
107 HBAR_CURSOR
108};
110 109
111/* Values returned from coordinates_in_window. */ 110/* Values returned from coordinates_in_window. */
112 111
@@ -2739,8 +2738,8 @@ struct redisplay_interface
2739 MOUSE_FACE_OVERWRITTEN_P non-zero means that some lines in W 2738 MOUSE_FACE_OVERWRITTEN_P non-zero means that some lines in W
2740 that contained glyphs in mouse-face were overwritten, so we 2739 that contained glyphs in mouse-face were overwritten, so we
2741 have to update the mouse highlight. */ 2740 have to update the mouse highlight. */
2742 void (*update_window_end_hook) (struct window *w, int cursor_on_p, 2741 void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
2743 int mouse_face_overwritten_p); 2742 bool mouse_face_overwritten_p);
2744 2743
2745 /* Move cursor to row/column position VPOS/HPOS, pixel coordinates 2744 /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
2746 Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y 2745 Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
@@ -2799,10 +2798,10 @@ struct redisplay_interface
2799 0, don't draw cursor. If ACTIVE_P is 1, system caret 2798 0, don't draw cursor. If ACTIVE_P is 1, system caret
2800 should track this cursor (when applicable). */ 2799 should track this cursor (when applicable). */
2801 void (*draw_window_cursor) (struct window *w, 2800 void (*draw_window_cursor) (struct window *w,
2802 struct glyph_row *glyph_row, 2801 struct glyph_row *glyph_row,
2803 int x, int y, 2802 int x, int y,
2804 int cursor_type, int cursor_width, 2803 enum text_cursor_kinds cursor_type,
2805 int on_p, int active_p); 2804 int cursor_width, bool on_p, bool active_p);
2806 2805
2807/* Draw vertical border for window W from (X,Y_0) to (X,Y_1). */ 2806/* Draw vertical border for window W from (X,Y_0) to (X,Y_1). */
2808 void (*draw_vertical_window_border) (struct window *w, 2807 void (*draw_vertical_window_border) (struct window *w,
@@ -3195,13 +3194,12 @@ extern void draw_phys_cursor_glyph (struct window *,
3195extern void get_phys_cursor_geometry (struct window *, struct glyph_row *, 3194extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
3196 struct glyph *, int *, int *, int *); 3195 struct glyph *, int *, int *, int *);
3197extern void erase_phys_cursor (struct window *); 3196extern void erase_phys_cursor (struct window *);
3198extern void display_and_set_cursor (struct window *, 3197extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
3199 int, int, int, int, int);
3200 3198
3201extern void set_output_cursor (struct cursor_pos *); 3199extern void set_output_cursor (struct cursor_pos *);
3202extern void x_cursor_to (struct window *, int, int, int, int); 3200extern void x_cursor_to (struct window *, int, int, int, int);
3203 3201
3204extern void x_update_cursor (struct frame *, int); 3202extern void x_update_cursor (struct frame *, bool);
3205extern void x_clear_cursor (struct window *); 3203extern void x_clear_cursor (struct window *);
3206extern void x_draw_vertical_border (struct window *w); 3204extern void x_draw_vertical_border (struct window *w);
3207 3205