summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h646
1 files changed, 397 insertions, 249 deletions
diff --git a/src/frame.h b/src/frame.h
index d1c21da4d2a..458b6257e49 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1,5 +1,5 @@
/* Define frame-object for GNU Emacs.
- Copyright (C) 1993-1994, 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1999-2022 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -69,8 +69,9 @@ enum internal_border_part
#ifdef NS_IMPL_COCOA
enum ns_appearance_type
{
- ns_appearance_aqua,
- ns_appearance_vibrant_dark
+ ns_appearance_system_default,
+ ns_appearance_aqua,
+ ns_appearance_vibrant_dark
};
#endif
#endif /* HAVE_WINDOW_SYSTEM */
@@ -79,7 +80,7 @@ enum ns_appearance_type
struct frame
{
- struct vectorlike_header header;
+ union vectorlike_header header;
/* All Lisp_Object components must come first.
That ensures they are all aligned normally. */
@@ -101,13 +102,17 @@ struct frame
Lisp_Object parent_frame;
#endif /* HAVE_WINDOW_SYSTEM */
+ /* Last device to move over this frame. Any value that isn't a
+ string means the "Virtual core pointer". */
+ Lisp_Object last_mouse_device;
+
/* The frame which should receive keystrokes that occur in this
frame, or nil if they should go to the frame itself. This is
usually nil, but if the frame is minibufferless, we can use this
to redirect keystrokes to a surrogate minibuffer frame when
needed.
- Note that a value of nil is different than having the field point
+ Note that a value of nil is different from having the field point
to the frame itself. Whenever the Fselect_frame function is used
to shift from one frame to the other, any redirections to the
original frame are shifted to the newly selected frame; if
@@ -122,9 +127,14 @@ struct frame
/* This frame's selected window.
Each frame has its own window hierarchy
and one of the windows in it is selected within the frame.
+ This window may be the mini-window of the frame, if any.
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
@@ -153,8 +163,8 @@ struct frame
There are four additional elements of nil at the end, to terminate. */
Lisp_Object menu_bar_items;
- /* Alist of elements (FACE-NAME . FACE-VECTOR-DATA). */
- Lisp_Object face_alist;
+ /* Hash table of FACE-NAME keys and FACE-VECTOR-DATA values. */
+ Lisp_Object face_hash_table;
/* A vector that records the entire structure of this frame's menu bar.
For the format of the data, see extensive comments in xmenu.c.
@@ -177,7 +187,16 @@ struct frame
Lisp_Object menu_bar_window;
#endif
-#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
+#if defined (HAVE_WINDOW_SYSTEM)
+ /* A window used to display the tab-bar of a frame. */
+ Lisp_Object tab_bar_window;
+
+ /* Desired and current contents displayed in that window. */
+ Lisp_Object desired_tab_bar_string;
+ Lisp_Object current_tab_bar_string;
+#endif
+
+#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;
@@ -186,9 +205,6 @@ struct frame
Lisp_Object current_tool_bar_string;
#endif
- /* Desired and current tool-bar items. */
- Lisp_Object tool_bar_items;
-
#ifdef USE_GTK
/* Where tool bar is, can be left, right, top or bottom.
Except with GTK, the only supported position is `top'. */
@@ -200,12 +216,20 @@ struct frame
Lisp_Object font_data;
#endif
- /* Beyond here, there should be no more Lisp_Object components. */
+ /* Desired and current tab-bar items. */
+ Lisp_Object tab_bar_items;
+
+ /* Desired and current tool-bar items. */
+ Lisp_Object tool_bar_items;
+ /* tool_bar_items should be the last Lisp_Object member. */
/* Cache of realized faces. */
struct face_cache *face_cache;
-#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
+ /* Tab-bar item index of the item on which a mouse button was pressed. */
+ int last_tab_bar_item;
+
+#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
@@ -237,8 +261,8 @@ struct frame
be used for output. */
bool_bf glyphs_initialized_p : 1;
- /* Set to true in change_frame_size when size of frame changed
- Clear the frame in clear_garbaged_frames if set. */
+ /* Set to true in adjust_frame_size when one of the frame's sizes
+ changed. Clear the frame in clear_garbaged_frames if set. */
bool_bf resized_p : 1;
/* Set to true if the default face for the frame has been
@@ -253,13 +277,19 @@ 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)
+ /* Set to true to minimize tab-bar height even when
+ auto-resize-tab-bar is set to grow-only. */
+ bool_bf minimize_tab_bar_window_p : 1;
+#endif
+
+#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 +304,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 +350,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. */
@@ -342,6 +380,9 @@ struct frame
ENUM_BF (output_method) output_method : 3;
#ifdef HAVE_WINDOW_SYSTEM
+ /* True if this frame is a tooltip frame. */
+ bool_bf tooltip : 1;
+
/* See FULLSCREEN_ enum on top. */
ENUM_BF (fullscreen_type) want_fullscreen : 4;
@@ -351,9 +392,7 @@ struct frame
/* Nonzero if we should actually display horizontal scroll bars on this frame. */
bool_bf horizontal_scroll_bars : 1;
-#endif /* HAVE_WINDOW_SYSTEM */
-#if defined (HAVE_WINDOW_SYSTEM)
/* True if this is an undecorated frame. */
bool_bf undecorated : 1;
@@ -381,18 +420,30 @@ struct frame
bool_bf no_special_glyphs : 1;
#endif /* HAVE_WINDOW_SYSTEM */
- /* Whether new_height and new_width shall be interpreted
- in pixels. */
- bool_bf new_pixelwise : 1;
-
- /* True means x_set_window_size requests can be processed for this
- frame. */
- bool_bf can_x_set_window_size : 1;
+ /* True means set_window_size_hook requests can be processed for
+ this frame. */
+ bool_bf can_set_window_size : 1;
/* Set to true after this frame was made by `make-frame'. */
bool_bf after_make_frame : 1;
- /* Whether the tool bar height change should be taken into account. */
+ /* Two sticky flags, that are both false when a frame is created.
+ 'display_tab_bar' sets the former to true the first time it
+ displays the tab bar. When the former is true, the next call of
+ 'x_change_tab_bar_height' and associates sets the latter true and
+ tries to adjust the frame height in a way that the now valid pixel
+ height of the tab bar is taken into account by the frame's native
+ height. */
+ bool_bf tab_bar_redisplayed : 1;
+ bool_bf tab_bar_resized : 1;
+
+ /* Two sticky flags, that are both false when a frame is created.
+ 'redisplay_tool_bar' sets the former to true the first time it
+ displays the tool bar. When the former is true, the next call of
+ 'x_change_tool_bar_height' and associates sets the latter true and
+ tries to adjust the frame height in a way that the now valid pixel
+ height of the tool bar is taken into account by the frame's native
+ height. */
bool_bf tool_bar_redisplayed : 1;
bool_bf tool_bar_resized : 1;
@@ -403,9 +454,50 @@ 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 and face cache cannot be
+ freed because the frame is in the process of being redisplayed. */
+ bool_bf inhibit_clear_image_cache : 1;
+
+ /* True when new_width or new_height were set by change_frame_size,
+ false when they were set by adjust_frame_size internally or not
+ set. */
+ bool_bf new_size_p : 1;
+
+ /* True when frame was invisible before first MapNotify event. Used
+ in X builds only. */
+ bool_bf was_invisible : 1;
+
+ /* True when the frame isn't selected, and selecting it in the
+ future should select the mini-window rather than the currently
+ selected window in the frame, assuming there is still an active
+ minibuffer in that mini-window. */
+ bool_bf select_mini_window_flag : 1;
/* Bitfield area ends here. */
- /* Number of lines (rounded up) of tool bar. REMOVE THIS */
+ /* 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 frame lines (rounded up) of tab bar. */
+ int tab_bar_lines;
+
+ /* Height of frame internal tab bar in pixels. */
+ int tab_bar_height;
+
+ int n_tab_bar_rows;
+ int n_tab_bar_items;
+
+ /* Number of frame lines (rounded up) of tool bar. */
int tool_bar_lines;
/* Height of frame internal tool bar in pixels. */
@@ -427,39 +519,24 @@ struct frame
/* Cost of deleting n lines on this frame. */
int *delete_n_lines_cost;
- /* Text width of this frame (excluding fringes, vertical scroll bar
- and internal border widths) and text height (excluding menu bar,
- tool bar, horizontal scroll bar and internal border widths) in
- units of canonical characters. */
+ /* Text width and height of this frame in (and maybe rounded to) frame
+ columns and lines. */
int text_cols, text_lines;
-
- /* Total width of this frame (including fringes, vertical scroll bar
- and internal border widths) and total height (including menu bar,
- tool bar, horizontal scroll bar and internal border widths) in
- units of canonical characters. */
- int total_cols, total_lines;
-
- /* Text width of this frame (excluding fringes, vertical scroll bar
- and internal border widths) and text height (excluding menu bar,
- tool bar, horizontal scroll bar and internal border widths) in
- pixels. */
+ /* Text width and height of this frame in pixels. */
int text_width, text_height;
- /* New text height and width for pending size change. 0 if no change
- pending. These values represent pixels or canonical character units
- according to the value of new_pixelwise and correlate to the the
- text width/height of the frame. */
+ /* Native width of this frame in (and maybe rounded to) frame columns
+ and lines. */
+ int total_cols, total_lines;
+ /* Native width and height of this frame in pixels. */
+ int pixel_width, pixel_height;
+ /* New native width and height of this frame for pending size change,
+ in pixels. -1 if no change pending. */
int new_width, new_height;
/* Pixel position of the frame window (x and y offsets in root window). */
int left_pos, top_pos;
- /* Total width of this frame (including fringes, vertical scroll bar
- and internal border widths) and total height (including internal
- menu and tool bars, horizontal scroll bar and internal border
- widths) in pixels. */
- int pixel_width, pixel_height;
-
/* This is the gravity value for the specified window position. */
int win_gravity;
@@ -469,6 +546,10 @@ struct frame
/* Border width of the frame window as known by the (X) window system. */
int border_width;
+ /* Width of child frames' internal border. Acts as
+ internal_border_width for child frames. */
+ int child_frame_border_width;
+
/* Width of the internal border. This is a line of background color
just inside the window's border. When the frame is selected,
a highlighting is displayed inside the internal border. */
@@ -509,7 +590,8 @@ struct frame
struct x_output *x; /* From xterm.h. */
struct w32_output *w32; /* From w32term.h. */
struct ns_output *ns; /* From nsterm.h. */
- intptr_t nothing;
+ struct pgtk_output *pgtk; /* From pgtkterm.h. */
+ struct haiku_output *haiku; /* From haikuterm.h. */
}
output_data;
@@ -552,7 +634,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
@@ -560,6 +642,9 @@ struct frame
Negative values mean not to change alpha. */
double alpha[2];
+ /* Background opacity */
+ double alpha_background;
+
/* Exponent for gamma correction of colors. 1/(VIEWING_GAMMA *
SCREEN_GAMMA) where viewing_gamma is 0.4545 and SCREEN_GAMMA is a
frame parameter. 0 means don't do gamma correction. */
@@ -577,7 +662,7 @@ struct frame
enum ns_appearance_type ns_appearance;
bool_bf ns_transparent_titlebar;
#endif
-};
+} GCALIGNED_STRUCT;
/* Most code should use these functions to set Lisp fields in struct frame. */
@@ -597,9 +682,9 @@ fset_condemned_scroll_bars (struct frame *f, Lisp_Object val)
f->condemned_scroll_bars = val;
}
INLINE void
-fset_face_alist (struct frame *f, Lisp_Object val)
+fset_face_hash_table (struct frame *f, Lisp_Object val)
{
- f->face_alist = val;
+ f->face_hash_table = val;
}
#if defined (HAVE_WINDOW_SYSTEM)
INLINE void
@@ -661,11 +746,38 @@ 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;
}
INLINE void
+fset_tab_bar_items (struct frame *f, Lisp_Object val)
+{
+ f->tab_bar_items = val;
+}
+#if defined (HAVE_WINDOW_SYSTEM)
+INLINE void
+fset_tab_bar_window (struct frame *f, Lisp_Object val)
+{
+ f->tab_bar_window = val;
+}
+INLINE void
+fset_current_tab_bar_string (struct frame *f, Lisp_Object val)
+{
+ f->current_tab_bar_string = val;
+}
+INLINE void
+fset_desired_tab_bar_string (struct frame *f, Lisp_Object val)
+{
+ f->desired_tab_bar_string = val;
+}
+#endif /* HAVE_WINDOW_SYSTEM */
+INLINE void
fset_tool_bar_items (struct frame *f, Lisp_Object val)
{
f->tool_bar_items = val;
@@ -677,7 +789,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)
{
@@ -725,7 +837,7 @@ default_pixels_per_inch_y (void)
#define FRAME_IMAGE_CACHE(F) ((F)->terminal->image_cache)
#define XFRAME(p) \
- (eassert (FRAMEP (p)), (struct frame *) XUNTAG (p, Lisp_Vectorlike))
+ (eassert (FRAMEP (p)), XUNTAG (p, Lisp_Vectorlike, struct frame))
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
/* Given a window, return its frame as a Lisp_Object. */
@@ -750,10 +862,19 @@ default_pixels_per_inch_y (void)
#else
#define FRAME_NS_P(f) ((f)->output_method == output_ns)
#endif
+#ifndef HAVE_PGTK
+#define FRAME_PGTK_P(f) false
+#else
+#define FRAME_PGTK_P(f) ((f)->output_method == output_pgtk)
+#endif
+#ifndef HAVE_HAIKU
+#define FRAME_HAIKU_P(f) false
+#else
+#define FRAME_HAIKU_P(f) ((f)->output_method == output_haiku)
+#endif
-/* FRAME_WINDOW_P tests whether the frame is a window, and is
- defined to be the predicate for the window system being used. */
-
+/* FRAME_WINDOW_P tests whether the frame is a graphical window system
+ frame. */
#ifdef HAVE_X_WINDOWS
#define FRAME_WINDOW_P(f) FRAME_X_P (f)
#endif
@@ -763,6 +884,12 @@ default_pixels_per_inch_y (void)
#ifdef HAVE_NS
#define FRAME_WINDOW_P(f) FRAME_NS_P(f)
#endif
+#ifdef HAVE_PGTK
+#define FRAME_WINDOW_P(f) FRAME_PGTK_P(f)
+#endif
+#ifdef HAVE_HAIKU
+#define FRAME_WINDOW_P(f) FRAME_HAIKU_P (f)
+#endif
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) ((void) (f), false)
#endif
@@ -812,40 +939,46 @@ default_pixels_per_inch_y (void)
(WINDOWP (f->minibuffer_window) \
&& XFRAME (XWINDOW (f->minibuffer_window)->frame) == f)
-/* Pixel width of frame F. */
-#define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width)
+/* Scale factor of frame F. */
+#if defined HAVE_NS
+# define FRAME_SCALE_FACTOR(f) (FRAME_NS_P (f) ? ns_frame_scale_factor (f) : 1)
+#elif defined HAVE_PGTK
+# define FRAME_SCALE_FACTOR(f) (FRAME_PGTK_P (f) ? pgtk_frame_scale_factor (f) : 1)
+#else
+# define FRAME_SCALE_FACTOR(f) 1
+#endif
-/* Pixel height of frame F. */
+/* Native width and height of frame F, in pixels and frame
+ columns/lines. */
+#define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width)
#define FRAME_PIXEL_HEIGHT(f) ((f)->pixel_height)
+#define FRAME_TOTAL_COLS(f) ((f)->total_cols)
+#define FRAME_TOTAL_LINES(f) ((f)->total_lines)
-/* Width of frame F, measured in canonical character columns,
- not including scroll bars if any. */
-#define FRAME_COLS(f) (f)->text_cols
-
-/* Height of frame F, measured in canonical lines, including
- non-toolkit menu bar and non-toolkit tool bar lines. */
-#define FRAME_LINES(f) (f)->text_lines
-
-/* Width of frame F, measured in pixels not including the width for
- fringes, scroll bar, and internal borders. */
+/* Text width and height of frame F, in pixels and frame
+ columns/lines. */
#define FRAME_TEXT_WIDTH(f) (f)->text_width
-
-/* Height of frame F, measured in pixels not including the height
- for scroll bar and internal borders. */
#define FRAME_TEXT_HEIGHT(f) (f)->text_height
+#define FRAME_COLS(f) ((f)->text_cols)
+#define FRAME_LINES(f) ((f)->text_lines)
-/* Number of lines of frame F used for menu bar.
- This is relevant on terminal frames and on
- X Windows when not using the X toolkit.
- These lines are counted in FRAME_LINES. */
-#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
+/* True if this frame should display an external menu bar. */
+#ifdef HAVE_EXT_MENU_BAR
+#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
+#else
+#define FRAME_EXTERNAL_MENU_BAR(f) false
+#endif
-/* Pixel height of frame F's menu bar. */
+/* Size of frame F's internal menu bar in frame lines and pixels. */
+#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
#define FRAME_MENU_BAR_HEIGHT(f) (f)->menu_bar_height
-/* 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)
+/* Size of frame F's tab bar in frame lines and pixels. */
+#define FRAME_TAB_BAR_LINES(f) (f)->tab_bar_lines
+#define FRAME_TAB_BAR_HEIGHT(f) (f)->tab_bar_height
+
+/* True if this frame should display an external tool bar. */
+#ifdef HAVE_EXT_TOOL_BAR
#define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar
#else
#define FRAME_EXTERNAL_TOOL_BAR(f) false
@@ -858,28 +991,21 @@ default_pixels_per_inch_y (void)
#define FRAME_TOOL_BAR_POSITION(f) ((void) (f), Qtop)
#endif
-/* Number of lines of frame F used for the tool-bar. */
+/* Size of frame F's internal tool bar in frame lines and pixels. */
#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines
-
-/* Pixel height of frame F's tool-bar. */
#define FRAME_TOOL_BAR_HEIGHT(f) (f)->tool_bar_height
-/* Lines above the top-most window in frame F. */
-#define FRAME_TOP_MARGIN(F) \
- (FRAME_MENU_BAR_LINES (F) + FRAME_TOOL_BAR_LINES (F))
+/* Height of frame F's top margin in frame lines. */
+#define FRAME_TOP_MARGIN(F) \
+ (FRAME_MENU_BAR_LINES (F) \
+ + FRAME_TAB_BAR_LINES (F) \
+ + FRAME_TOOL_BAR_LINES (F))
/* Pixel height of frame F's top margin. */
-#define FRAME_TOP_MARGIN_HEIGHT(F) \
- (FRAME_MENU_BAR_HEIGHT (F) + FRAME_TOOL_BAR_HEIGHT (F))
-
-/* 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)
-#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
-#else
-#define FRAME_EXTERNAL_MENU_BAR(f) false
-#endif
+#define FRAME_TOP_MARGIN_HEIGHT(F) \
+ (FRAME_MENU_BAR_HEIGHT (F) \
+ + FRAME_TAB_BAR_HEIGHT (F) \
+ + FRAME_TOOL_BAR_HEIGHT (F))
/* True if frame F is currently visible. */
#define FRAME_VISIBLE_P(f) (f)->visible
@@ -907,10 +1033,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
@@ -918,8 +1047,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
@@ -967,6 +1098,7 @@ default_pixels_per_inch_y (void)
#define FRAME_Z_GROUP_ABOVE_SUSPENDED(f) \
((f)->z_group == z_group_above_suspended)
#define FRAME_Z_GROUP_BELOW(f) ((f)->z_group == z_group_below)
+#define FRAME_TOOLTIP_P(f) ((f)->tooltip)
#ifdef NS_IMPL_COCOA
#define FRAME_NS_APPEARANCE(f) ((f)->ns_appearance)
#define FRAME_NS_TRANSPARENT_TITLEBAR(f) ((f)->ns_transparent_titlebar)
@@ -983,6 +1115,7 @@ default_pixels_per_inch_y (void)
#define FRAME_Z_GROUP_NONE(f) ((void) (f), true)
#define FRAME_Z_GROUP_ABOVE(f) ((void) (f), false)
#define FRAME_Z_GROUP_BELOW(f) ((void) (f), false)
+#define FRAME_TOOLTIP_P(f) ((void) f, false)
#endif /* HAVE_WINDOW_SYSTEM */
/* Whether horizontal scroll bars are currently enabled for frame F. */
@@ -1069,48 +1202,6 @@ default_pixels_per_inch_y (void)
? FRAME_CONFIG_SCROLL_BAR_LINES (f) \
: 0)
-/* Total width of frame F, in columns (characters),
- including the width used by scroll bars if any. */
-#define FRAME_TOTAL_COLS(f) ((f)->total_cols)
-
-/* Total height of frame F, in lines (characters),
- including the height used by scroll bars if any. */
-#define FRAME_TOTAL_LINES(f) ((f)->total_lines)
-
-/* Set the character widths of frame F. WIDTH specifies a nominal
- character text width. */
-#define SET_FRAME_COLS(f, width) \
- ((f)->text_cols = (width), \
- (f)->total_cols = ((width) \
- + FRAME_SCROLL_BAR_COLS (f) \
- + FRAME_FRINGE_COLS (f)))
-
-/* Set the character heights of frame F. HEIGHT specifies a nominal
- character text height. */
-#define SET_FRAME_LINES(f, height) \
- ((f)->text_lines = (height), \
- (f)->total_lines = ((height) \
- + FRAME_TOP_MARGIN (f) \
- + FRAME_SCROLL_BAR_LINES (f)))
-
-/* Set the widths of frame F. WIDTH specifies a nominal pixel text
- width. */
-#define SET_FRAME_WIDTH(f, width) \
- ((f)->text_width = (width), \
- (f)->pixel_width = ((width) \
- + FRAME_SCROLL_BAR_AREA_WIDTH (f) \
- + FRAME_TOTAL_FRINGE_WIDTH (f) \
- + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
-
-/* Set the heights of frame F. HEIGHT specifies a nominal pixel text
- height. */
-#define SET_FRAME_HEIGHT(f, height) \
- ((f)->text_height = (height), \
- (f)->pixel_height = ((height) \
- + FRAME_TOP_MARGIN_HEIGHT (f) \
- + FRAME_SCROLL_BAR_AREA_HEIGHT (f) \
- + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
-
/* Maximum + 1 legitimate value for FRAME_CURSOR_X. */
#define FRAME_CURSOR_X_LIMIT(f) \
(FRAME_COLS (f) + FRAME_LEFT_SCROLL_BAR_COLS (f))
@@ -1131,7 +1222,6 @@ default_pixels_per_inch_y (void)
#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
/* Return a pointer to the face cache of frame F. */
-
#define FRAME_FACE_CACHE(F) (F)->face_cache
/* Return the size of message_buf of the frame F. We multiply the
@@ -1149,8 +1239,7 @@ default_pixels_per_inch_y (void)
/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
`for' loop which iterates over the elements of Vframe_list. The
loop will set FRAME_VAR, a Lisp_Object, to each frame in
- Vframe_list in succession and execute the statement. Vframe_list
- should be nonempty, so the body is executed at least once. LIST_VAR
+ Vframe_list in succession and execute the statement. LIST_VAR
should be a Lisp_Object too; it is used to iterate through the
Vframe_list. Note that this macro walks over child frames and
the tooltip frame as well.
@@ -1158,15 +1247,13 @@ default_pixels_per_inch_y (void)
This macro is a holdover from a time when multiple frames weren't always
supported. An alternate definition of the macro would expand to
something which executes the statement once. */
-
-#define FOR_EACH_FRAME(list_var, frame_var) \
- for ((list_var) = (eassume (CONSP (Vframe_list)), Vframe_list); \
- (CONSP (list_var) \
+#define FOR_EACH_FRAME(list_var, frame_var) \
+ for ((list_var) = Vframe_list; \
+ (CONSP (list_var) \
&& (frame_var = XCAR (list_var), true)); \
list_var = XCDR (list_var))
/* Reflect mouse movement when a complete frame update is performed. */
-
#define FRAME_MOUSE_UPDATE(frame) \
do { \
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (frame); \
@@ -1181,8 +1268,7 @@ default_pixels_per_inch_y (void)
} while (false)
/* Handy macro to construct an argument to Fmodify_frame_parameters. */
-
-#define AUTO_FRAME_ARG(name, parameter, value) \
+#define AUTO_FRAME_ARG(name, parameter, value) \
AUTO_LIST1 (name, AUTO_CONS_EXPR (parameter, value))
/* False means there are no visible garbaged frames. */
@@ -1192,7 +1278,6 @@ extern bool frame_garbaged;
We call redisplay_other_windows to make sure the frame gets redisplayed
if some changes were applied to it while it wasn't visible (and hence
wasn't redisplayed). */
-
INLINE void
SET_FRAME_VISIBLE (struct frame *f, int v)
{
@@ -1207,21 +1292,43 @@ SET_FRAME_VISIBLE (struct frame *f, int v)
f->visible = v;
}
-/* Set iconify of frame F. */
+/* Set iconified status of frame F. */
+INLINE void
+SET_FRAME_ICONIFIED (struct frame *f, int i)
+{
+#ifdef HAVE_WINDOW_SYSTEM
+ Lisp_Object frame;
+#endif
+
+ eassert (0 <= (i) && (i) <= 1);
-#define SET_FRAME_ICONIFIED(f, i) \
- (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i))
+ f->iconified = i;
+
+#ifdef HAVE_WINDOW_SYSTEM
+ /* Iconifying a frame might cause the frame title to change if no
+ title was explicitly specified. Force the frame title to be
+ recomputed. */
+
+ XSETFRAME (frame, f);
+
+ if (FRAME_WINDOW_P (f))
+ gui_consider_frame_title (frame);
+#endif
+}
extern Lisp_Object selected_frame;
+extern Lisp_Object old_selected_frame;
+
+extern int frame_default_tab_bar_height;
-#if ! (defined USE_GTK || defined HAVE_NS)
+#ifndef HAVE_EXT_TOOL_BAR
extern int frame_default_tool_bar_height;
#endif
#ifdef HAVE_WINDOW_SYSTEM
# define WINDOW_SYSTEM_RETURN
#else
-# define WINDOW_SYSTEM_RETURN _Noreturn
+# define WINDOW_SYSTEM_RETURN _Noreturn ATTRIBUTE_COLD
#endif
extern WINDOW_SYSTEM_RETURN struct frame *
@@ -1253,10 +1360,12 @@ extern void frame_make_pointer_invisible (struct frame *);
extern void frame_make_pointer_visible (struct frame *);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
extern bool frame_inhibit_resize (struct frame *, bool, Lisp_Object);
-extern void adjust_frame_size (struct frame *, int, int, int, bool, Lisp_Object);
-extern void frame_size_history_add (struct frame *f, Lisp_Object fun_symbol,
- int width, int height, Lisp_Object rest);
-
+extern void adjust_frame_size (struct frame *, int, int, int, bool,
+ Lisp_Object);
+extern Lisp_Object mouse_position (bool);
+extern void frame_size_history_plain (struct frame *, Lisp_Object);
+extern void frame_size_history_extra (struct frame *, Lisp_Object,
+ int, int, int, int, int, int);
extern Lisp_Object Vframe_list;
/* Value is a pointer to the selected frame. If the selected frame
@@ -1326,11 +1435,27 @@ FRAME_TOTAL_FRINGE_WIDTH (struct frame *f)
return FRAME_LEFT_FRINGE_WIDTH (f) + FRAME_RIGHT_FRINGE_WIDTH (f);
}
-/* Pixel-width of internal border lines. */
+INLINE int
+FRAME_CHILD_FRAME_BORDER_WIDTH (struct frame *f)
+{
+ return frame_dimension (f->child_frame_border_width);
+}
+
+/* Pixel-width of internal border. Uses child_frame_border_width for
+ child frames if possible, and falls back on internal_border_width
+ otherwise. */
INLINE int
FRAME_INTERNAL_BORDER_WIDTH (struct frame *f)
{
+#ifdef HAVE_WINDOW_SYSTEM
+ return (FRAME_PARENT_FRAME(f)
+ ? (FRAME_CHILD_FRAME_BORDER_WIDTH(f) >= 0
+ ? FRAME_CHILD_FRAME_BORDER_WIDTH(f)
+ : frame_dimension (f->internal_border_width))
+ : frame_dimension (f->internal_border_width));
+#else
return frame_dimension (f->internal_border_width);
+#endif
}
/* Pixel-size of window divider lines. */
@@ -1345,6 +1470,49 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
{
return frame_dimension (f->bottom_divider_width);
}
+
+/* Return a non-null pointer to the cached face with ID on frame F. */
+
+INLINE struct face *
+FACE_FROM_ID (struct frame *f, int id)
+{
+ eassert (0 <= id && id < FRAME_FACE_CACHE (f)->used);
+ return FRAME_FACE_CACHE (f)->faces_by_id[id];
+}
+
+/* Return a pointer to the face with ID on frame F, or null if such a
+ face doesn't exist. */
+
+INLINE struct face *
+FACE_FROM_ID_OR_NULL (struct frame *f, int id)
+{
+ int used = FRAME_FACE_CACHE (f)->used;
+ eassume (0 <= used);
+ return 0 <= id && id < used ? FRAME_FACE_CACHE (f)->faces_by_id[id] : NULL;
+}
+
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* A non-null pointer to the image with id ID on frame F. */
+
+INLINE struct image *
+IMAGE_FROM_ID (struct frame *f, int id)
+{
+ eassert (0 <= id && id < FRAME_IMAGE_CACHE (f)->used);
+ return FRAME_IMAGE_CACHE (f)->images[id];
+}
+
+/* Value is a pointer to the image with id ID on frame F, or null if
+ no image with that id exists. */
+
+INLINE struct image *
+IMAGE_OPT_FROM_ID (struct frame *f, int id)
+{
+ int used = FRAME_IMAGE_CACHE (f)->used;
+ eassume (0 <= used);
+ return 0 <= id && id < used ? FRAME_IMAGE_CACHE (f)->images[id] : NULL;
+}
+#endif
/***********************************************************************
Conversion between canonical units and pixels
@@ -1358,17 +1526,13 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
canonical char width is to be used. X must be a Lisp integer or
float. Value is a C integer. */
#define FRAME_PIXEL_X_FROM_CANON_X(F, X) \
- (INTEGERP (X) \
- ? XINT (X) * FRAME_COLUMN_WIDTH (F) \
- : (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F)))
+ ((int) (XFLOATINT (X) * FRAME_COLUMN_WIDTH (F)))
/* Convert canonical value Y to pixels. F is the frame whose
canonical character height is to be used. X must be a Lisp integer
or float. Value is a C integer. */
#define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \
- (INTEGERP (Y) \
- ? XINT (Y) * FRAME_LINE_HEIGHT (F) \
- : (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F)))
+ ((int) (XFLOATINT (Y) * FRAME_LINE_HEIGHT (F)))
/* Convert pixel-value X to canonical units. F is the frame whose
canonical character width is to be used. X is a C integer. Result
@@ -1377,7 +1541,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
#define FRAME_CANON_X_FROM_PIXEL_X(F, X) \
((X) % FRAME_COLUMN_WIDTH (F) != 0 \
? make_float ((double) (X) / FRAME_COLUMN_WIDTH (F)) \
- : make_number ((X) / FRAME_COLUMN_WIDTH (F)))
+ : make_fixnum ((X) / FRAME_COLUMN_WIDTH (F)))
/* Convert pixel-value Y to canonical units. F is the frame whose
canonical character height is to be used. Y is a C integer.
@@ -1386,7 +1550,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
#define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y) \
((Y) % FRAME_LINE_HEIGHT (F) \
? make_float ((double) (Y) / FRAME_LINE_HEIGHT (F)) \
- : make_number ((Y) / FRAME_LINE_HEIGHT (F)))
+ : make_fixnum ((Y) / FRAME_LINE_HEIGHT (F)))
@@ -1443,7 +1607,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
- FRAME_TOTAL_FRINGE_WIDTH (f) \
- FRAME_SCROLL_BAR_AREA_WIDTH (f) \
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f)) \
- / FRAME_COLUMN_WIDTH (f)) \
+ / FRAME_COLUMN_WIDTH (f))
#define FRAME_PIXEL_HEIGHT_TO_TEXT_LINES(f, height) \
(((height) \
@@ -1480,12 +1644,11 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
- FRAME_SCROLL_BAR_AREA_HEIGHT (f) \
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
-/* Return the width/height reserved for the windows of frame F. */
-#define FRAME_WINDOWS_WIDTH(f) \
+#define FRAME_INNER_WIDTH(f) \
(FRAME_PIXEL_WIDTH (f) \
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
-#define FRAME_WINDOWS_HEIGHT(f) \
+#define FRAME_INNER_HEIGHT(f) \
(FRAME_PIXEL_HEIGHT (f) \
- FRAME_TOP_MARGIN_HEIGHT (f) \
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
@@ -1507,86 +1670,68 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
/* The class of this X application. */
#define EMACS_CLASS "Emacs"
-extern void x_set_scroll_bar_default_width (struct frame *);
-extern void x_set_scroll_bar_default_height (struct frame *);
-extern void x_set_offset (struct frame *, int, int, int);
-extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position);
-extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
-extern void x_set_frame_parameters (struct frame *, Lisp_Object);
-extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_screen_gamma (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_font (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_font_backend (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_left_fringe (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_right_fringe (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_border_width (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_right_divider_width (struct frame *, Lisp_Object,
- Lisp_Object);
-extern void x_set_bottom_divider_width (struct frame *, Lisp_Object,
- Lisp_Object);
-extern void x_set_visibility (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_autoraise (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_autolower (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_unsplittable (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_horizontal_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_scroll_bar_width (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_scroll_bar_height (struct frame *, Lisp_Object, Lisp_Object);
-
-extern long x_figure_window_size (struct frame *, Lisp_Object, bool, int *, int *);
-
-extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_no_special_glyphs (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_frame_parameters (struct frame *, Lisp_Object);
+extern void gui_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_screen_gamma (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_font (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_font_backend (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_left_fringe (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_right_fringe (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_border_width (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_right_divider_width (struct frame *, Lisp_Object,
+ Lisp_Object);
+extern void gui_set_bottom_divider_width (struct frame *, Lisp_Object,
+ Lisp_Object);
+extern void gui_set_visibility (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_autoraise (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_autolower (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_unsplittable (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_vertical_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_horizontal_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_scroll_bar_width (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_scroll_bar_height (struct frame *, Lisp_Object, Lisp_Object);
+
+extern long gui_figure_window_size (struct frame *, Lisp_Object, bool, bool);
+
+extern void gui_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_alpha_background (struct frame *, Lisp_Object, Lisp_Object);
+extern void gui_set_no_special_glyphs (struct frame *, Lisp_Object, Lisp_Object);
extern void validate_x_resource_name (void);
-extern Lisp_Object display_x_get_resource (Display_Info *,
- Lisp_Object attribute,
- Lisp_Object class,
- Lisp_Object component,
- Lisp_Object subclass);
+extern Lisp_Object gui_display_get_resource (Display_Info *,
+ Lisp_Object attribute,
+ Lisp_Object class,
+ Lisp_Object component,
+ Lisp_Object subclass);
-extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
-extern void x_set_window_size (struct frame *f, bool change_gravity,
- int width, int height, bool pixelwise);
-extern Lisp_Object x_get_focus_frame (struct frame *);
+extern void set_frame_menubar (struct frame *f, bool deep_p);
extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
-extern void x_make_frame_visible (struct frame *f);
-extern void x_make_frame_invisible (struct frame *f);
-extern void x_iconify_frame (struct frame *f);
-extern void x_set_frame_alpha (struct frame *f);
-extern void x_activate_menubar (struct frame *);
-extern void x_real_positions (struct frame *, int *, int *);
extern void free_frame_menubar (struct frame *);
-extern void x_free_frame_resources (struct frame *);
extern bool frame_ancestor_p (struct frame *af, struct frame *df);
extern enum internal_border_part frame_internal_border_part (struct frame *f, int x, int y);
#if defined HAVE_X_WINDOWS
extern void x_wm_set_icon_position (struct frame *, int, int);
#if !defined USE_X_TOOLKIT
-extern char *x_get_resource_string (const char *, const char *);
+extern const char *x_get_resource_string (const char *, const char *);
#endif
extern void x_sync (struct frame *);
#endif /* HAVE_X_WINDOWS */
-extern void x_query_colors (struct frame *f, XColor *, int);
-extern void x_focus_frame (struct frame *, bool);
-
-#ifndef HAVE_NS
-
-extern bool x_bitmap_icon (struct frame *, Lisp_Object);
+#if !defined (HAVE_NS) && !defined (HAVE_PGTK)
/* Set F's bitmap icon, if specified among F's parameters. */
INLINE void
-x_set_bitmap_icon (struct frame *f)
+gui_set_bitmap_icon (struct frame *f)
{
Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist);
- if (CONSP (obj) && !NILP (XCDR (obj)))
- x_bitmap_icon (f, XCDR (obj));
+ if (CONSP (obj) && !NILP (XCDR (obj))
+ && FRAME_TERMINAL (f)->set_bitmap_icon_hook)
+ FRAME_TERMINAL (f)->set_bitmap_icon_hook (f, XCDR (obj));
}
#endif /* !HAVE_NS */
@@ -1608,9 +1753,12 @@ flush_frame (struct frame *f)
#ifdef HAVE_WINDOW_SYSTEM
struct MonitorInfo {
- XRectangle geom, work;
+ Emacs_Rectangle geom, work;
int mm_width, mm_height;
char *name;
+#ifdef HAVE_PGTK
+ double scale_factor;
+#endif
};
extern void free_monitors (struct MonitorInfo *monitors, int n_monitors);