struct frame *x_highlight_frame;
struct frame *x_focus_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;
+
+ /* 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;
+
+ /* Where the mouse was last time we reported a mouse position. */
+ NSRect last_mouse_glyph;
+
+ /* Time of last mouse movement. */
+ Time last_mouse_movement_time;
+
+ /* The scroll bar in which the last motion event occurred. */
+#ifdef __OBJC__
+ EmacsScroller *last_mouse_scroll_bar;
+#else
+ void *last_mouse_scroll_bar;
+#endif
};
/* This is a chain of structures for all the NS displays currently in use. */
extern Lisp_Object ns_display_name_list;
extern struct ns_display_info *ns_display_info_for_name (Lisp_Object name);
-struct ns_display_info *check_x_display_info (Lisp_Object frame);
-
struct ns_output
{
#ifdef __OBJC__
/* This gives the ns_display_info structure for the display F is on. */
-#define FRAME_NS_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
-/* the primacy of X must be constantly worked with... */
-#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
+#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
#define FRAME_X_OUTPUT(f) ((f)->output_data.ns)
#define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc)
#define FRAME_X_WINDOW(f) ((f)->output_data.ns->window_desc)
#define FRAME_NS_DISPLAY(f) (0)
#define FRAME_X_DISPLAY(f) (0)
#define FRAME_X_SCREEN(f) (0)
-#define FRAME_X_VISUAL(f) FRAME_NS_DISPLAY_INFO(f)->visual
+#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO(f)->visual
#define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color)
#define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color)
-#define FRAME_X_IMAGE_CACHE(F) FRAME_NS_DISPLAY_INFO ((F))->image_cache
+#define FRAME_X_IMAGE_CACHE(F) FRAME_DISPLAY_INFO ((F))->image_cache
#define NS_FACE_FOREGROUND(f) ((f)->foreground)
#define NS_FACE_BACKGROUND(f) ((f)->background)
#define FONT_WIDTH(f) ((f)->max_width)
#define FONT_HEIGHT(f) ((f)->height)
-/*#define FONT_BASE(f) ((f)->ascent) */
-#define FONT_BASE(f) (((struct nsfont_info *)f)->max_bounds.ascent)
-/*#define FONT_DESCENT(f) ((f)->descent) */
-#define FONT_DESCENT(f) (((struct nsfont_info *)f)->max_bounds.descent)
+#define FONT_BASE(f) ((f)->ascent)
+#define FONT_DESCENT(f) ((f)->descent)
#define FRAME_DEFAULT_FACE(f) FACE_FROM_ID (f, DEFAULT_FACE_ID)
#define NS_TOP_POS(f) ((f)->top_pos)
#endif
-#define FRAME_NS_FONT_TABLE(f) (FRAME_NS_DISPLAY_INFO (f)->font_table)
+#define FRAME_NS_FONT_TABLE(f) (FRAME_DISPLAY_INFO (f)->font_table)
#define FRAME_FONTSET(f) ((f)->output_data.ns->fontset)
-#define FRAME_SMALLEST_CHAR_WIDTH(f) \
- (FRAME_NS_DISPLAY_INFO (f)->smallest_char_width)
-#define FRAME_SMALLEST_FONT_HEIGHT(f) \
- (FRAME_NS_DISPLAY_INFO (f)->smallest_font_height)
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.ns->baseline_offset)
#define BLACK_PIX_DEFAULT(f) 0x000000
#define WHITE_PIX_DEFAULT(f) 0xFFFFFF
/* This in nsterm.m */
extern void x_destroy_window (struct frame *f);
extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, EMACS_TIME const *timeout,
+ fd_set *exceptfds, struct timespec const *timeout,
sigset_t const *sigmask);
extern unsigned long ns_get_rgb_color (struct frame *f,
float r, float g, float b, float a);
-extern NSPoint last_mouse_motion_position;
/* From nsterm.m, needed in nsfont.m. */
#ifdef __OBJC__
? (min) : (((x)>(max)) ? (max) : (x)))
#define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX))
-/* needed somewhere... */
-#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
-
-
#endif /* HAVE_NS */