aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.h
diff options
context:
space:
mode:
authorAlexander Gramiak2019-03-16 11:46:39 -0600
committerAlexander Gramiak2019-03-16 13:15:07 -0600
commitcc06d76865a7a98b5fd4edd03a044f2baefb85a9 (patch)
treebebc69c07239c84cbaf8693f99d25d099fcd2072 /src/frame.h
parent7d8fe1f9f66110b23972869496e2000e9c35bb6d (diff)
downloademacs-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/frame.h')
-rw-r--r--src/frame.h22
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
181 Lisp_Object menu_bar_window; 181 Lisp_Object menu_bar_window;
182#endif 182#endif
183 183
184#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) 184#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR)
185 /* A window used to display the tool-bar of a frame. */ 185 /* A window used to display the tool-bar of a frame. */
186 Lisp_Object tool_bar_window; 186 Lisp_Object tool_bar_window;
187 187
@@ -209,7 +209,7 @@ struct frame
209 /* Cache of realized faces. */ 209 /* Cache of realized faces. */
210 struct face_cache *face_cache; 210 struct face_cache *face_cache;
211 211
212#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) 212#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR)
213 /* Tool-bar item index of the item on which a mouse button was pressed. */ 213 /* Tool-bar item index of the item on which a mouse button was pressed. */
214 int last_tool_bar_item; 214 int last_tool_bar_item;
215#endif 215#endif
@@ -257,13 +257,13 @@ struct frame
257 /* Set to true when current redisplay has updated frame. */ 257 /* Set to true when current redisplay has updated frame. */
258 bool_bf updated_p : 1; 258 bool_bf updated_p : 1;
259 259
260#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) 260#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR)
261 /* Set to true to minimize tool-bar height even when 261 /* Set to true to minimize tool-bar height even when
262 auto-resize-tool-bar is set to grow-only. */ 262 auto-resize-tool-bar is set to grow-only. */
263 bool_bf minimize_tool_bar_window_p : 1; 263 bool_bf minimize_tool_bar_window_p : 1;
264#endif 264#endif
265 265
266#if defined (USE_GTK) || defined (HAVE_NS) 266#ifdef HAVE_EXT_TOOL_BAR
267 /* True means using a tool bar that comes from the toolkit. */ 267 /* True means using a tool bar that comes from the toolkit. */
268 bool_bf external_tool_bar : 1; 268 bool_bf external_tool_bar : 1;
269#endif 269#endif
@@ -278,9 +278,8 @@ struct frame
278 /* True if it needs to be redisplayed. */ 278 /* True if it needs to be redisplayed. */
279 bool_bf redisplay : 1; 279 bool_bf redisplay : 1;
280 280
281#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 281#ifdef HAVE_EXT_MENU_BAR
282 || defined (HAVE_NS) || defined (USE_GTK) 282 /* True means using a menu bar that comes from the toolkit. */
283 /* True means using a menu bar that comes from the X toolkit. */
284 bool_bf external_menu_bar : 1; 283 bool_bf external_menu_bar : 1;
285#endif 284#endif
286 285
@@ -714,7 +713,7 @@ fset_tool_bar_position (struct frame *f, Lisp_Object val)
714 f->tool_bar_position = val; 713 f->tool_bar_position = val;
715} 714}
716#endif /* USE_GTK */ 715#endif /* USE_GTK */
717#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) 716#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR)
718INLINE void 717INLINE void
719fset_tool_bar_window (struct frame *f, Lisp_Object val) 718fset_tool_bar_window (struct frame *f, Lisp_Object val)
720{ 719{
@@ -882,7 +881,7 @@ default_pixels_per_inch_y (void)
882 881
883/* True if this frame should display a tool bar 882/* True if this frame should display a tool bar
884 in a way that does not use any text lines. */ 883 in a way that does not use any text lines. */
885#if defined (USE_GTK) || defined (HAVE_NS) 884#ifdef HAVE_EXT_TOOL_BAR
886#define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar 885#define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar
887#else 886#else
888#define FRAME_EXTERNAL_TOOL_BAR(f) false 887#define FRAME_EXTERNAL_TOOL_BAR(f) false
@@ -911,8 +910,7 @@ default_pixels_per_inch_y (void)
911 910
912/* True if this frame should display a menu bar 911/* True if this frame should display a menu bar
913 in a way that does not use any text lines. */ 912 in a way that does not use any text lines. */
914#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 913#ifdef HAVE_EXT_MENU_BAR
915 || defined (HAVE_NS) || defined (USE_GTK)
916#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar 914#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
917#else 915#else
918#define FRAME_EXTERNAL_MENU_BAR(f) false 916#define FRAME_EXTERNAL_MENU_BAR(f) false
@@ -1258,7 +1256,7 @@ SET_FRAME_VISIBLE (struct frame *f, int v)
1258extern Lisp_Object selected_frame; 1256extern Lisp_Object selected_frame;
1259extern Lisp_Object old_selected_frame; 1257extern Lisp_Object old_selected_frame;
1260 1258
1261#if ! (defined USE_GTK || defined HAVE_NS) 1259#ifndef HAVE_EXT_TOOL_BAR
1262extern int frame_default_tool_bar_height; 1260extern int frame_default_tool_bar_height;
1263#endif 1261#endif
1264 1262