summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h84
1 files changed, 62 insertions, 22 deletions
diff --git a/src/frame.h b/src/frame.h
index ad7376a6531..ed62e7ace0f 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1,5 +1,5 @@
/* Define frame-object for GNU Emacs.
- Copyright (C) 1993-1994, 1999-2018 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1999-2019 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -125,6 +125,10 @@ struct frame
The selected window of the selected frame is Emacs's selected window. */
Lisp_Object selected_window;
+ /* This frame's selected window when run_window_change_functions was
+ called the last time on this frame. */
+ Lisp_Object old_selected_window;
+
/* This frame's minibuffer window.
Most frames have their own minibuffer windows,
but only the selected frame's minibuffer window
@@ -177,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;
@@ -205,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
@@ -253,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
@@ -274,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
@@ -321,9 +324,18 @@ struct frame
cleared. */
bool_bf explicit_name : 1;
- /* True if configuration of windows on this frame has changed since
- last call of run_window_size_change_functions. */
- bool_bf window_configuration_changed : 1;
+ /* True if at least one window on this frame changed since the last
+ call of run_window_change_functions. Changes are either "state
+ changes" (a window has been created, deleted or got assigned
+ another buffer) or "size changes" (the total or body size of a
+ window changed). run_window_change_functions exits early unless
+ either this flag is true or a window selection happened on this
+ frame. */
+ bool_bf window_change : 1;
+
+ /* True if running window state change functions has been explicitly
+ requested for this frame since last redisplay. */
+ bool_bf window_state_change : 1;
/* True if the mouse has moved on this display device
since the last time we checked. */
@@ -404,8 +416,26 @@ struct frame
/* Non-zero if this frame's faces need to be recomputed. */
bool_bf face_change : 1;
+ /* Non-zero if this frame's image cache cannot be freed because the
+ frame is in the process of being redisplayed. */
+ bool_bf inhibit_clear_image_cache : 1;
+
/* Bitfield area ends here. */
+ /* This frame's change stamp, set the last time window change
+ functions were run for this frame. Should never be 0 because
+ that's the change stamp of a new window. A window was not on a
+ frame the last run_window_change_functions was called on it if
+ it's change stamp differs from that of its frame. */
+ int change_stamp;
+
+ /* This frame's number of windows, set the last time window change
+ functions were run for this frame. Should never be 0 even for
+ minibuffer-only frames. If no window has been added, this allows
+ to detect whether a window was deleted on this frame since the
+ last time run_window_change_functions was called on it. */
+ ptrdiff_t number_of_windows;
+
/* Number of lines (rounded up) of tool bar. REMOVE THIS */
int tool_bar_lines;
@@ -553,7 +583,7 @@ struct frame
int config_scroll_bar_lines;
/* The baud rate that was used to calculate costs for this frame. */
- int cost_calculation_baud_rate;
+ intmax_t cost_calculation_baud_rate;
/* Frame opacity
alpha[0]: alpha transparency of the active frame
@@ -662,6 +692,11 @@ fset_selected_window (struct frame *f, Lisp_Object val)
f->selected_window = val;
}
INLINE void
+fset_old_selected_window (struct frame *f, Lisp_Object val)
+{
+ f->old_selected_window = val;
+}
+INLINE void
fset_title (struct frame *f, Lisp_Object val)
{
f->title = val;
@@ -678,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)
{
@@ -846,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
@@ -875,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
@@ -908,10 +942,13 @@ default_pixels_per_inch_y (void)
are frozen on frame F. */
#define FRAME_WINDOWS_FROZEN(f) (f)->frozen_window_starts
-/* True if the frame's window configuration has changed since last call
- of run_window_size_change_functions. */
-#define FRAME_WINDOW_CONFIGURATION_CHANGED(f) \
- (f)->window_configuration_changed
+/* True if at least one window changed on frame F since the last time
+ window change functions were run on F. */
+#define FRAME_WINDOW_CHANGE(f) (f)->window_change
+
+/* True if running window state change functions has been explicitly
+ requested for this frame since last redisplay. */
+#define FRAME_WINDOW_STATE_CHANGE(f) (f)->window_state_change
/* The minibuffer window of frame F, if it has one; otherwise nil. */
#define FRAME_MINIBUF_WINDOW(f) f->minibuffer_window
@@ -919,8 +956,10 @@ default_pixels_per_inch_y (void)
/* The root window of the window tree of frame F. */
#define FRAME_ROOT_WINDOW(f) f->root_window
-/* The currently selected window of the window tree of frame F. */
+/* The currently selected window of frame F. */
#define FRAME_SELECTED_WINDOW(f) f->selected_window
+/* The old selected window of frame F. */
+#define FRAME_OLD_SELECTED_WINDOW(f) f->old_selected_window
#define FRAME_INSERT_COST(f) (f)->insert_line_cost
#define FRAME_DELETE_COST(f) (f)->delete_line_cost
@@ -1215,8 +1254,9 @@ SET_FRAME_VISIBLE (struct frame *f, int v)
(f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i))
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