aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index ce20d57913..6c45139d80 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -550,8 +550,10 @@ Lisp_Object Qhelp_echo;
/* Symbols to denote kinds of events. */
Lisp_Object Qfunction_key;
Lisp_Object Qmouse_click;
-#ifdef WINDOWSNT
+#if defined(WINDOWSNT) || defined(MAC_OSX)
Lisp_Object Qmouse_wheel;
+#endif
+#ifdef WINDOWSNT
Lisp_Object Qlanguage_change;
#endif
Lisp_Object Qdrag_n_drop;
@@ -644,7 +646,7 @@ int flow_control;
/* If we support a window system, turn on the code to poll periodically
to detect C-g. It isn't actually used when doing interrupt input. */
-#ifdef HAVE_WINDOW_SYSTEM
+#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS)
#define POLL_FOR_INPUT
#endif
@@ -3881,7 +3883,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
{
obj = make_lispy_event (event);
-#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined(MAC_OS)
/* If this was a menu selection, then set the flag to inhibit
writing to last_nonmenu_event. Don't do this if the event
we're returning is (menu-bar), though; that indicates the
@@ -4260,7 +4262,7 @@ timer_check (do_it_now)
static Lisp_Object accent_key_syms;
static Lisp_Object func_key_syms;
static Lisp_Object mouse_syms;
-#ifdef WINDOWSNT
+#if defined(WINDOWSNT) || defined(MAC_OSX)
static Lisp_Object mouse_wheel_syms;
#endif
static Lisp_Object drag_n_drop_syms;
@@ -4669,7 +4671,7 @@ static char *iso_lispy_function_keys[] =
Lisp_Object Vlispy_mouse_stem;
-#ifdef WINDOWSNT
+#if defined(WINDOWSNT) || defined(MAC_OSX)
/* mouse-wheel events are generated by the wheel on devices such as
the MS Intellimouse. The wheel sits in between the left and right
mouse buttons, and is typically used to scroll or zoom the window
@@ -5279,6 +5281,8 @@ make_lispy_event (event)
Qnil));
}
}
+#endif /* WINDOWS_NT */
+#if defined(WINDOWS_NT) || defined(MAC_OSX)
case MOUSE_WHEEL_EVENT:
{
int part;
@@ -5350,7 +5354,7 @@ make_lispy_event (event)
Qnil))));
}
}
-#endif /* WINDOWSNT */
+#endif /* WINDOWSNT || MAC_OSX */
case DRAG_N_DROP_EVENT:
{
@@ -10433,9 +10437,11 @@ syms_of_keyboard ()
staticpro (&Qfunction_key);
Qmouse_click = intern ("mouse-click");
staticpro (&Qmouse_click);
-#ifdef WINDOWSNT
+#if defined(WINDOWSNT) || defined(MAC_OSX)
Qmouse_wheel = intern ("mouse-wheel");
staticpro (&Qmouse_wheel);
+#endif
+#ifdef WINDOWSNT
Qlanguage_change = intern ("language-change");
staticpro (&Qlanguage_change);
#endif
@@ -10583,10 +10589,9 @@ syms_of_keyboard ()
func_key_syms = Qnil;
staticpro (&func_key_syms);
-#ifdef WINDOWSNT
+#if defined(WINDOWSNT) || defined(MAC_OSX)
mouse_wheel_syms = Qnil;
staticpro (&mouse_wheel_syms);
-
drag_n_drop_syms = Qnil;
staticpro (&drag_n_drop_syms);
#endif