diff options
author | Alexander Gramiak <agrambot@gmail.com> | 2019-03-16 11:46:39 -0600 |
---|---|---|
committer | Alexander Gramiak <agrambot@gmail.com> | 2019-03-16 13:15:07 -0600 |
commit | cc06d76865a7a98b5fd4edd03a044f2baefb85a9 (patch) | |
tree | bebc69c07239c84cbaf8693f99d25d099fcd2072 /src/frame.h | |
parent | 7d8fe1f9f66110b23972869496e2000e9c35bb6d (diff) | |
download | emacs-cc06d76865a7a98b5fd4edd03a044f2baefb85a9.tar.gz |
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/frame.h')
-rw-r--r-- | src/frame.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/frame.h b/src/frame.h index 5bac24b077e..ed62e7ace0f 100644 --- a/src/frame.h +++ b/src/frame.h @@ -181,7 +181,7 @@ struct frame Lisp_Object menu_bar_window; #endif -#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) /* A window used to display the tool-bar of a frame. */ Lisp_Object tool_bar_window; @@ -209,7 +209,7 @@ struct frame /* Cache of realized faces. */ struct face_cache *face_cache; -#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) /* Tool-bar item index of the item on which a mouse button was pressed. */ int last_tool_bar_item; #endif @@ -257,13 +257,13 @@ struct frame /* Set to true when current redisplay has updated frame. */ bool_bf updated_p : 1; -#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) /* Set to true to minimize tool-bar height even when auto-resize-tool-bar is set to grow-only. */ bool_bf minimize_tool_bar_window_p : 1; #endif -#if defined (USE_GTK) || defined (HAVE_NS) +#ifdef HAVE_EXT_TOOL_BAR /* True means using a tool bar that comes from the toolkit. */ bool_bf external_tool_bar : 1; #endif @@ -278,9 +278,8 @@ struct frame /* True if it needs to be redisplayed. */ bool_bf redisplay : 1; -#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ - || defined (HAVE_NS) || defined (USE_GTK) - /* True means using a menu bar that comes from the X toolkit. */ +#ifdef HAVE_EXT_MENU_BAR + /* True means using a menu bar that comes from the toolkit. */ bool_bf external_menu_bar : 1; #endif @@ -714,7 +713,7 @@ fset_tool_bar_position (struct frame *f, Lisp_Object val) f->tool_bar_position = val; } #endif /* USE_GTK */ -#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) INLINE void fset_tool_bar_window (struct frame *f, Lisp_Object val) { @@ -882,7 +881,7 @@ default_pixels_per_inch_y (void) /* True if this frame should display a tool bar in a way that does not use any text lines. */ -#if defined (USE_GTK) || defined (HAVE_NS) +#ifdef HAVE_EXT_TOOL_BAR #define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar #else #define FRAME_EXTERNAL_TOOL_BAR(f) false @@ -911,8 +910,7 @@ default_pixels_per_inch_y (void) /* True if this frame should display a menu bar in a way that does not use any text lines. */ -#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ - || defined (HAVE_NS) || defined (USE_GTK) +#ifdef HAVE_EXT_MENU_BAR #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar #else #define FRAME_EXTERNAL_MENU_BAR(f) false @@ -1258,7 +1256,7 @@ SET_FRAME_VISIBLE (struct frame *f, int v) extern Lisp_Object selected_frame; extern Lisp_Object old_selected_frame; -#if ! (defined USE_GTK || defined HAVE_NS) +#ifndef HAVE_EXT_TOOL_BAR extern int frame_default_tool_bar_height; #endif |