summaryrefslogtreecommitdiff
path: root/src/nsterm.h
diff options
context:
space:
mode:
authorAdrian Robert <Adrian.B.Robert@gmail.com>2009-01-25 19:43:31 +0000
committerAdrian Robert <Adrian.B.Robert@gmail.com>2009-01-25 19:43:31 +0000
commit8612b71a44b34519fe1b047a9f1d6f6b1431d411 (patch)
treecc7567046437fef05a5f60a93518c8c8a2b49bcc /src/nsterm.h
parent0cb6149297b30250a6dc460ecb700a96bf576ea9 (diff)
downloademacs-8612b71a44b34519fe1b047a9f1d6f6b1431d411.tar.gz
Changes to remove Feval calls from GUI under NS.
* nsterm.h: Move KEY_NS_... definitions here from nsterm.m. Add NS_TOGGLE_TOOLBAR, NS_PUT_WORKING_TEXT, NS_UNPUT_WORKING_TEXT. Remove NS_INSERT_WORKING_TEXT, NS_DELETE_WORKING_TEXT. * nsterm.m: Move KEY_NS_... definitions to nsterm.h. (EmacsView-toggleToolbar:): Use KEY_NS_TOGGLE_TOOLBAR. (EmacsView-setMarkedText:,-deleteWorkingText:): Use NS_TEXT_EVENT instead of NON_ASCII_KEYSTROKE_EVENT. (EmacsApp-terminate:): Use KEY_NS_POWER_OFF instead of Feval. (EmacsApp-applicationShouldTerminate:): Query user. (EmacsPreferencesController-runHelp:): Use KEY_NS_INFO_PREFS instead of Feval. * termhooks.h (NS_TEXT_EVENT): New event type under HAVE_NS. * keyboard.c (kbd_buffer_get_event): Check for it. (keys_of_keyboard): Define lispy keys for ns-put/unput-working-text. * nsmenu.m (ns_popup_dialog): Resync window setting with X and W32 versions. (EmacsDialog-runDialogAt:): Use NSModalPanelRunLoopMode.
Diffstat (limited to 'src/nsterm.h')
-rw-r--r--src/nsterm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nsterm.h b/src/nsterm.h
index 781d312bafc..b1bff2e916f 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -384,6 +384,22 @@ typedef unsigned long NSUInteger;
========================================================================== */
+/* Special keycodes that we pass down the event chain */
+#define KEY_NS_POWER_OFF ((1<<28)|(0<<16)|1)
+#define KEY_NS_OPEN_FILE ((1<<28)|(0<<16)|2)
+#define KEY_NS_OPEN_TEMP_FILE ((1<<28)|(0<<16)|3)
+#define KEY_NS_DRAG_FILE ((1<<28)|(0<<16)|4)
+#define KEY_NS_DRAG_COLOR ((1<<28)|(0<<16)|5)
+#define KEY_NS_DRAG_TEXT ((1<<28)|(0<<16)|6)
+#define KEY_NS_CHANGE_FONT ((1<<28)|(0<<16)|7)
+#define KEY_NS_OPEN_FILE_LINE ((1<<28)|(0<<16)|8)
+#define KEY_NS_PUT_WORKING_TEXT ((1<<28)|(0<<16)|9)
+#define KEY_NS_UNPUT_WORKING_TEXT ((1<<28)|(0<<16)|10)
+#define KEY_NS_SPI_SERVICE_CALL ((1<<28)|(0<<16)|11)
+#define KEY_NS_NEW_FRAME ((1<<28)|(0<<16)|12)
+#define KEY_NS_TOGGLE_TOOLBAR ((1<<28)|(0<<16)|13)
+#define KEY_NS_INFO_PREFS ((1<<28)|(0<<16)|14)
+
/* could use list to store these, but rest of emacs has a big infrastructure
for managing a table of bitmap "records" */
struct ns_bitmap_record