Commit f66c49cc authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu
Browse files

(Qmac_apple_event) [MAC_OS]: New variable.

(syms_of_keyboard) [MAC_OS]: Initialize it.
(make_lispy_event) [MAC_OS]: Build lisp event for MAC_APPLE_EVENT.
parent dac5344b
...@@ -527,6 +527,9 @@ Lisp_Object Qlanguage_change; ...@@ -527,6 +527,9 @@ Lisp_Object Qlanguage_change;
#endif #endif
Lisp_Object Qdrag_n_drop; Lisp_Object Qdrag_n_drop;
Lisp_Object Qsave_session; Lisp_Object Qsave_session;
#ifdef MAC_OS
Lisp_Object Qmac_apple_event;
#endif
/* Lisp_Object Qmouse_movement; - also an event header */ /* Lisp_Object Qmouse_movement; - also an event header */
...@@ -5864,6 +5867,20 @@ make_lispy_event (event) ...@@ -5864,6 +5867,20 @@ make_lispy_event (event)
case SAVE_SESSION_EVENT: case SAVE_SESSION_EVENT:
return Qsave_session; return Qsave_session;
#ifdef MAC_OS
case MAC_APPLE_EVENT:
{
Lisp_Object spec[2];
spec[0] = event->x;
spec[1] = event->y;
return Fcons (Qmac_apple_event,
Fcons (Fvector (2, spec),
Fcons (mac_make_lispy_event_code (event->code),
Qnil)));
}
#endif
/* The 'kind' field of the event is something we don't recognize. */ /* The 'kind' field of the event is something we don't recognize. */
default: default:
abort (); abort ();
...@@ -10879,6 +10896,11 @@ syms_of_keyboard () ...@@ -10879,6 +10896,11 @@ syms_of_keyboard ()
Qsave_session = intern ("save-session"); Qsave_session = intern ("save-session");
staticpro (&Qsave_session); staticpro (&Qsave_session);
#ifdef MAC_OS
Qmac_apple_event = intern ("mac-apple-event");
staticpro (&Qmac_apple_event);
#endif
Qusr1_signal = intern ("usr1-signal"); Qusr1_signal = intern ("usr1-signal");
staticpro (&Qusr1_signal); staticpro (&Qusr1_signal);
Qusr2_signal = intern ("usr2-signal"); Qusr2_signal = intern ("usr2-signal");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment