#include "dispextern.h"
#include "termhooks.h"
-#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
- XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
-#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
- XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
+/* Black and white pixel values for the screen which frame F is on. */
+#define BLACK_PIX_DEFAULT(f) \
+ BlackPixel (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f))
+#define WHITE_PIX_DEFAULT(f) \
+ WhitePixel (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f))
#define FONT_WIDTH(f) ((f)->max_width)
#define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
minibuffer. */
struct frame *x_highlight_frame;
+ /* The frame waiting to be auto-raised in XTread_socket. */
+ struct frame *x_pending_autoraise_frame;
+
+ /* The frame where the mouse was last time we reported a mouse event. */
+ struct frame *last_mouse_frame;
+
+ /* The frame where the mouse was last time we reported a mouse motion. */
+ struct frame *last_mouse_motion_frame;
+
/* Time of last user interaction as returned in X events on this display. */
Time last_user_time;
+ /* Position where the mouse was last time we reported a motion.
+ This is a position on last_mouse_motion_frame. */
+ int last_mouse_motion_x;
+ int last_mouse_motion_y;
+
/* The gray pixmap. */
Pixmap gray;
/* This is the `Screen *' which frame F is on. */
#define FRAME_X_SCREEN(f) (FRAME_DISPLAY_INFO (f)->screen)
+
+/* This is the screen index number of screen which frame F is on. */
#define FRAME_X_SCREEN_NUMBER(f) XScreenNumberOfScreen (FRAME_X_SCREEN (f))
/* This is the Visual which frame F is on. */
#define FRAME_XIC_STYLE(f) ((f)->output_data.x->xic_style)
#define FRAME_XIC_FONTSET(f) ((f)->output_data.x->xic_xfs)
-/* Value is the smallest width of any character in any font on frame F. */
-
-#define FRAME_SMALLEST_CHAR_WIDTH(F) \
- FRAME_DISPLAY_INFO(F)->smallest_char_width
-
-/* Value is the smallest height of any font on frame F. */
-
-#define FRAME_SMALLEST_FONT_HEIGHT(F) \
- FRAME_DISPLAY_INFO(F)->smallest_font_height
-\f
/* X-specific scroll bar stuff. */
/* We represent scroll bars as lisp vectors. This allows us to place
/* Turning a lisp vector value into a pointer to a struct scroll_bar. */
#define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
+#ifdef USE_X_TOOLKIT
/* Extract the X widget of the scroll bar from a struct scroll_bar.
XtWindowToWidget should be fast enough since Xt uses a hash table
ptr->x_window = window; \
} while (0)
+#endif /* USE_X_TOOLKIT */
/* Return the inside width of a vertical scroll bar, given the outside
width. */
#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \
((width) \
- VERTICAL_SCROLL_BAR_LEFT_BORDER \
- - VERTICAL_SCROLL_BAR_RIGHT_BORDER \
- - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2)
+ - VERTICAL_SCROLL_BAR_RIGHT_BORDER)
/* Return the length of the rectangle within which the top of the
handle must stay. This isn't equivalent to the inside height,
/* Minimum lengths for scroll bar handles, in pixels. */
#define VERTICAL_SCROLL_BAR_MIN_HANDLE (5)
-/* Trimming off a few pixels from each side prevents
- text from glomming up against the scroll bar */
-#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
-
-\f
/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
or SELECTION_CLEAR_EVENT, then its contents are really described
by this structure. */
#define SELECTION_EVENT_TIME(eventp) \
(((struct selection_input_event *) (eventp))->time)
-/* From xselect.c. */
-
-void x_handle_selection_notify (XSelectionEvent *);
-void x_handle_property_notify (XPropertyEvent *);
-
/* From xfns.c. */
extern void x_free_gcs (struct frame *);
/* Defined in xselect.c */
-extern void x_handle_property_notify (XPropertyEvent *);
-extern void x_handle_selection_notify (XSelectionEvent *);
+extern void x_handle_property_notify (const XPropertyEvent *);
+extern void x_handle_selection_notify (const XSelectionEvent *);
extern void x_handle_selection_event (struct input_event *);
extern void x_clear_frame_selections (struct frame *);
Lisp_Object values);
extern int x_handle_dnd_message (struct frame *,
- XClientMessageEvent *,
+ const XClientMessageEvent *,
struct x_display_info *,
- struct input_event *bufp);
+ struct input_event *);
extern int x_check_property_data (Lisp_Object);
extern void x_fill_property_data (Display *,
Lisp_Object,
/* Defined in xfns.c */
-extern struct x_display_info * check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_focus_frame (struct frame *);
#ifdef USE_GTK