aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32term.h')
-rw-r--r--src/w32term.h63
1 files changed, 33 insertions, 30 deletions
diff --git a/src/w32term.h b/src/w32term.h
index e65c1146294..095ca54e3e8 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -179,6 +179,37 @@ struct w32_display_info
179 frame. It differs from w32_focus_frame when we're using a global 179 frame. It differs from w32_focus_frame when we're using a global
180 minibuffer. */ 180 minibuffer. */
181 struct frame *x_highlight_frame; 181 struct frame *x_highlight_frame;
182
183 /* The frame waiting to be auto-raised in w32_read_socket. */
184 struct frame *w32_pending_autoraise_frame;
185
186 /* The frame where the mouse was last time we reported a mouse event. */
187 struct frame *last_mouse_frame;
188
189 /* The frame where the mouse was last time we reported a mouse motion. */
190 struct frame *last_mouse_motion_frame;
191
192 /* The frame where the mouse was last time we reported a mouse position. */
193 struct frame *last_mouse_glyph_frame;
194
195 /* Position where the mouse was last time we reported a motion.
196 This is a position on last_mouse_motion_frame. */
197 int last_mouse_motion_x;
198 int last_mouse_motion_y;
199
200 /* Where the mouse was last time we reported a mouse position.
201 This is a rectangle on last_mouse_glyph_frame. */
202 RECT last_mouse_glyph;
203
204 /* The scroll bar in which the last motion event occurred. */
205 struct scroll_bar *last_mouse_scroll_bar;
206
207 /* Mouse position on the scroll bar above.
208 FIXME: shouldn't it be a member of struct scroll_bar? */
209 int last_mouse_scroll_bar_pos;
210
211 /* Time of last mouse movement. */
212 Time last_mouse_movement_time;
182}; 213};
183 214
184/* This is a chain of structures for all the displays currently in use. */ 215/* This is a chain of structures for all the displays currently in use. */
@@ -199,8 +230,6 @@ Lisp_Object display_x_get_resource (struct w32_display_info *,
199 Lisp_Object, Lisp_Object, 230 Lisp_Object, Lisp_Object,
200 Lisp_Object, Lisp_Object); 231 Lisp_Object, Lisp_Object);
201 232
202extern void x_focus_on_frame (struct frame *f);
203
204/* also defined in xterm.h XXX: factor out to common header */ 233/* also defined in xterm.h XXX: factor out to common header */
205 234
206extern struct w32_display_info *w32_term_init (Lisp_Object, 235extern struct w32_display_info *w32_term_init (Lisp_Object,
@@ -211,7 +240,6 @@ extern void x_set_window_size (struct frame *f, int change_grav,
211 int cols, int rows); 240 int cols, int rows);
212extern int x_display_pixel_height (struct w32_display_info *); 241extern int x_display_pixel_height (struct w32_display_info *);
213extern int x_display_pixel_width (struct w32_display_info *); 242extern int x_display_pixel_width (struct w32_display_info *);
214extern void x_sync (struct frame *);
215extern Lisp_Object x_get_focus_frame (struct frame *); 243extern Lisp_Object x_get_focus_frame (struct frame *);
216extern void x_set_mouse_position (struct frame *f, int h, int v); 244extern void x_set_mouse_position (struct frame *f, int h, int v);
217extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); 245extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
@@ -384,22 +412,11 @@ extern struct w32_output w32term_display;
384#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) 412#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
385 413
386/* This gives the w32_display_info structure for the display F is on. */ 414/* This gives the w32_display_info structure for the display F is on. */
387#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) 415#define FRAME_DISPLAY_INFO(f) (&one_w32_display_info)
388#define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info)
389 416
390/* This is the `Display *' which frame F is on. */ 417/* This is the `Display *' which frame F is on. */
391#define FRAME_X_DISPLAY(f) (0) 418#define FRAME_X_DISPLAY(f) (0)
392 419
393/* Value is the smallest width of any character in any font on frame F. */
394
395#define FRAME_SMALLEST_CHAR_WIDTH(F) \
396 FRAME_W32_DISPLAY_INFO(F)->smallest_char_width
397
398/* Value is the smallest height of any font on frame F. */
399
400#define FRAME_SMALLEST_FONT_HEIGHT(F) \
401 FRAME_W32_DISPLAY_INFO(F)->smallest_font_height
402
403#define FRAME_NORMAL_PLACEMENT(F) ((F)->output_data.w32->normal_placement) 420#define FRAME_NORMAL_PLACEMENT(F) ((F)->output_data.w32->normal_placement)
404#define FRAME_PREV_FSMODE(F) ((F)->output_data.w32->prev_fsmode) 421#define FRAME_PREV_FSMODE(F) ((F)->output_data.w32->prev_fsmode)
405 422
@@ -491,21 +508,12 @@ struct scroll_bar {
491#define SET_SCROLL_BAR_W32_WINDOW(ptr, id) \ 508#define SET_SCROLL_BAR_W32_WINDOW(ptr, id) \
492 (SCROLL_BAR_UNPACK ((ptr)->w32_window_low, (ptr)->w32_window_high, (intptr_t) id)) 509 (SCROLL_BAR_UNPACK ((ptr)->w32_window_low, (ptr)->w32_window_high, (intptr_t) id))
493 510
494/* Extract the X widget of the scroll bar from a struct scroll_bar. */
495#define SCROLL_BAR_X_WIDGET(ptr) \
496 ((Widget) SCROLL_BAR_PACK ((ptr)->x_widget_low, (ptr)->x_widget_high))
497
498/* Store a widget id in a struct scroll_bar. */
499#define SET_SCROLL_BAR_X_WIDGET(ptr, w) \
500 (SCROLL_BAR_UNPACK ((ptr)->x_widget_low, (ptr)->x_widget_high, (int) w))
501
502/* Return the inside width of a vertical scroll bar, given the outside 511/* Return the inside width of a vertical scroll bar, given the outside
503 width. */ 512 width. */
504#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f,width) \ 513#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f,width) \
505 ((width) \ 514 ((width) \
506 - VERTICAL_SCROLL_BAR_LEFT_BORDER \ 515 - VERTICAL_SCROLL_BAR_LEFT_BORDER \
507 - VERTICAL_SCROLL_BAR_RIGHT_BORDER \ 516 - VERTICAL_SCROLL_BAR_RIGHT_BORDER)
508 - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2)
509 517
510/* Return the length of the rectangle within which the top of the 518/* Return the length of the rectangle within which the top of the
511 handle must stay. This isn't equivalent to the inside height, 519 handle must stay. This isn't equivalent to the inside height,
@@ -542,11 +550,6 @@ struct scroll_bar {
542/* Minimum lengths for scroll bar handles, in pixels. */ 550/* Minimum lengths for scroll bar handles, in pixels. */
543#define VERTICAL_SCROLL_BAR_MIN_HANDLE (vertical_scroll_bar_min_handle) 551#define VERTICAL_SCROLL_BAR_MIN_HANDLE (vertical_scroll_bar_min_handle)
544 552
545/* Trimming off a few pixels from each side prevents
546 text from glomming up against the scroll bar */
547#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
548
549
550struct frame; /* from frame.h */ 553struct frame; /* from frame.h */
551 554
552extern void w32_fill_rect (struct frame *, HDC, COLORREF, RECT *); 555extern void w32_fill_rect (struct frame *, HDC, COLORREF, RECT *);