diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-09-11 12:56:33 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-09-11 12:56:33 +0400 |
commit | 742516e02048d3bbfba4e6e13dd19afa097bbd3b (patch) | |
tree | a040e49b687d4d1cb4c69aaa5ba4795c65dec807 /src/frame.h | |
parent | 73f82c7e8eb6a009248f4ea6360b2182d06f55e2 (diff) |
Ifdef away frame tool bar code when it is not really used.
* frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
and minimize_tool_bar_window_p under the above.
(fset_current_tool_bar_string, fset_desired_tool_bar_string)
(fset_tool_bar_window): Likewise.
* dispnew.c (clear_current_matrices, clear_desired_matrices)
(adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
(change_frame_size_1):
* window.c (window_from_coordinates, Frecenter): Adjust users.
* window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
code is not really used.
* xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
(tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
(get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
[!USE_GTK && !HAVE_NS]: Define as such.
(Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
(note_mouse_highlight, expose_frame):
* xfns.c (x_set_tool_bar_lines):
* xterm.c (handle_one_xevent): Adjust users.
Diffstat (limited to 'src/frame.h')
-rw-r--r-- | src/frame.h | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/frame.h b/src/frame.h index 87e218ee93..3aea0cfa27 100644 --- a/src/frame.h +++ b/src/frame.h @@ -145,9 +145,15 @@ struct frame Lisp_Object menu_bar_window; #endif +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) /* A window used to display the tool-bar of a frame. */ Lisp_Object tool_bar_window; + /* Desired and current contents displayed in that window. */ + Lisp_Object desired_tool_bar_string; + Lisp_Object current_tool_bar_string; +#endif + /* Desired and current tool-bar items. */ Lisp_Object tool_bar_items; @@ -155,10 +161,6 @@ struct frame tool bar only supports top. */ Lisp_Object tool_bar_position; - /* Desired and current contents displayed in tool_bar_window. */ - Lisp_Object desired_tool_bar_string; - Lisp_Object current_tool_bar_string; - /* Beyond here, there should be no more Lisp_Object components. */ /* Cache of realized faces. */ @@ -197,9 +199,11 @@ struct frame /* Set to non-zero when current redisplay has updated frame. */ unsigned updated_p : 1; +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) /* Set to non-zero to minimize tool-bar height even when auto-resize-tool-bar is set to grow-only. */ unsigned minimize_tool_bar_window_p : 1; +#endif #if defined (USE_GTK) || defined (HAVE_NS) /* Nonzero means using a tool bar that comes from the toolkit. */ @@ -455,16 +459,6 @@ fset_condemned_scroll_bars (struct frame *f, Lisp_Object val) f->condemned_scroll_bars = val; } FRAME_INLINE void -fset_current_tool_bar_string (struct frame *f, Lisp_Object val) -{ - f->current_tool_bar_string = val; -} -FRAME_INLINE void -fset_desired_tool_bar_string (struct frame *f, Lisp_Object val) -{ - f->desired_tool_bar_string = val; -} -FRAME_INLINE void fset_face_alist (struct frame *f, Lisp_Object val) { f->face_alist = val; @@ -536,11 +530,23 @@ fset_tool_bar_position (struct frame *f, Lisp_Object val) { f->tool_bar_position = val; } +#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS) FRAME_INLINE void fset_tool_bar_window (struct frame *f, Lisp_Object val) { f->tool_bar_window = val; } +FRAME_INLINE void +fset_current_tool_bar_string (struct frame *f, Lisp_Object val) +{ + f->current_tool_bar_string = val; +} +FRAME_INLINE void +fset_desired_tool_bar_string (struct frame *f, Lisp_Object val) +{ + f->desired_tool_bar_string = val; +} +#endif /* HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS */ #define NUMVAL(X) ((INTEGERP (X) || FLOATP (X)) ? XFLOATINT (X) : -1) |