aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorAndrew Choi <[email protected]>2002-08-03 22:21:09 +0000
committerAndrew Choi <[email protected]>2002-08-03 22:21:09 +0000
commit742fbed75b4cd5c2c2e7a8d4c0f4add9957e7f9a (patch)
tree2d119dccd908ef943fd9343fbaa646808dc3e0e4 /src/keyboard.c
parent365417014078a0f260fd24d41845aeb274b876c8 (diff)
In src:
2002-08-03 Andrew Choi <[email protected]> * macterm.c (USE_CARBON_EVENTS): New macro. (macCtrlKey, macShiftKey, macMetaKey, macAltKey): New macros. (x_iconify_frame): Call CollapseWindow. (Vmac_reverse_ctrl_meta): New variable. (Vmac_wheel_button_is_mouse_2): New variable. (init_mac_drag_n_drop): New function. (mac_do_receive_drag): New function. (mac_handle_service_event): New function. (init_service_handler): New function. (mac_to_emacs_modifiers): New function. (mac_event_to_emacs_modifiers): New function. (mac_get_mouse_btn): New function. (mac_convert_event_ref): New function. (XTread_socket) [USE_CARBON_EVENTS]: Call ReceiveNextEvent, SendEventToEventTarget, mac_event_to_emacs_modifiers, and mac_get_mouse_btn. (mac_initialize): Call init_mac_drag_n_drop and init_service_handler. * keyboard.c: Define Qmouse_wheel, mouse_wheel_syms, and lispy_mouse_wheel_names for MAC_OSX as well as for WINDOWS_NT. (kbd_buffer_get_event): Set used_mouse_menu for MENU_BAR_EVENT and TOOL_BAR_EVENT for MAC_OS as well. (make_lispy_event): Handle MOUSE_WHEEL_EVENT for MAC_OSX as well as for WINDOWS_NT. (syms_of_keyboard): Initialize Qmouse_wheel for MAC_OSX. * termhooks.h (event_kind): Define MOUSE_WHEEL_EVENT also for MAC_OSX. In lisp: 2002-08-03 Andrew Choi <[email protected]> * term/mac-win.el: Set keys to enable mouse wheel support.
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