diff options
| author | Alexander Gramiak | 2019-03-16 11:46:39 -0600 |
|---|---|---|
| committer | Alexander Gramiak | 2019-03-16 13:15:07 -0600 |
| commit | cc06d76865a7a98b5fd4edd03a044f2baefb85a9 (patch) | |
| tree | bebc69c07239c84cbaf8693f99d25d099fcd2072 /src/keyboard.c | |
| parent | 7d8fe1f9f66110b23972869496e2000e9c35bb6d (diff) | |
| download | emacs-cc06d76865a7a98b5fd4edd03a044f2baefb85a9.tar.gz emacs-cc06d76865a7a98b5fd4edd03a044f2baefb85a9.zip | |
Define macros to abstract support for external menu/tool-bars
* src/lisp.h (HAVE_EXT_MENU_BAR)
(HAVE_EXT_TOOL_BAR): Define.
*src/dispnew.c:
*src/frame.c:
*src/frame.h:
*src/keyboard.c:
*src/menu.c:
*src/menu.h:
*src/window.c:
*src/window.h:
*src/xdisp.c:
*src/xfns: Use the new macros.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 760cd623f63..22e4377ee86 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3869,8 +3869,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3869 | } | 3869 | } |
| 3870 | break; | 3870 | break; |
| 3871 | 3871 | ||
| 3872 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ | 3872 | #ifdef HAVE_EXT_MENU_BAR |
| 3873 | || defined (HAVE_NS) || defined (USE_GTK) | ||
| 3874 | case MENU_BAR_ACTIVATE_EVENT: | 3873 | case MENU_BAR_ACTIVATE_EVENT: |
| 3875 | { | 3874 | { |
| 3876 | kbd_fetch_ptr = next_kbd_event (event); | 3875 | kbd_fetch_ptr = next_kbd_event (event); |
| @@ -3950,8 +3949,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3950 | { | 3949 | { |
| 3951 | obj = make_lispy_event (&event->ie); | 3950 | obj = make_lispy_event (&event->ie); |
| 3952 | 3951 | ||
| 3953 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ | 3952 | #ifdef HAVE_EXT_MENU_BAR |
| 3954 | || defined (HAVE_NS) || defined (USE_GTK) | ||
| 3955 | /* If this was a menu selection, then set the flag to inhibit | 3953 | /* If this was a menu selection, then set the flag to inhibit |
| 3956 | writing to last_nonmenu_event. Don't do this if the event | 3954 | writing to last_nonmenu_event. Don't do this if the event |
| 3957 | we're returning is (menu-bar), though; that indicates the | 3955 | we're returning is (menu-bar), though; that indicates the |
| @@ -5232,7 +5230,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, | |||
| 5232 | static bool | 5230 | static bool |
| 5233 | toolkit_menubar_in_use (struct frame *f) | 5231 | toolkit_menubar_in_use (struct frame *f) |
| 5234 | { | 5232 | { |
| 5235 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) || defined (HAVE_NTGUI) | 5233 | #ifdef HAVE_EXT_MENU_BAR |
| 5236 | return !(!FRAME_WINDOW_P (f)); | 5234 | return !(!FRAME_WINDOW_P (f)); |
| 5237 | #else | 5235 | #else |
| 5238 | return false; | 5236 | return false; |
| @@ -5925,8 +5923,7 @@ make_lispy_event (struct input_event *event) | |||
| 5925 | return list3 (head, position, files); | 5923 | return list3 (head, position, files); |
| 5926 | } | 5924 | } |
| 5927 | 5925 | ||
| 5928 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ | 5926 | #ifdef HAVE_EXT_MENU_BAR |
| 5929 | || defined (HAVE_NS) || defined (USE_GTK) | ||
| 5930 | case MENU_BAR_EVENT: | 5927 | case MENU_BAR_EVENT: |
| 5931 | if (EQ (event->arg, event->frame_or_window)) | 5928 | if (EQ (event->arg, event->frame_or_window)) |
| 5932 | /* This is the prefix key. We translate this to | 5929 | /* This is the prefix key. We translate this to |
| @@ -8136,7 +8133,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8136 | if (menu_separator_name_p (SSDATA (caption))) | 8133 | if (menu_separator_name_p (SSDATA (caption))) |
| 8137 | { | 8134 | { |
| 8138 | set_prop (TOOL_BAR_ITEM_TYPE, Qt); | 8135 | set_prop (TOOL_BAR_ITEM_TYPE, Qt); |
| 8139 | #if !defined (USE_GTK) && !defined (HAVE_NS) | 8136 | #ifndef HAVE_EXT_TOOL_BAR |
| 8140 | /* If we use build_desired_tool_bar_string to render the | 8137 | /* If we use build_desired_tool_bar_string to render the |
| 8141 | tool bar, the separator is rendered as an image. */ | 8138 | tool bar, the separator is rendered as an image. */ |
| 8142 | set_prop (TOOL_BAR_ITEM_IMAGES, | 8139 | set_prop (TOOL_BAR_ITEM_IMAGES, |