summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h288
1 files changed, 176 insertions, 112 deletions
diff --git a/src/frame.h b/src/frame.h
index 999a29d56ae..fde815c3b84 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -313,7 +313,6 @@ struct frame
ENUM_BF (output_method) output_method : 3;
#ifdef HAVE_WINDOW_SYSTEM
-
/* See FULLSCREEN_ enum on top. */
ENUM_BF (fullscreen_type) want_fullscreen : 4;
@@ -321,14 +320,26 @@ struct frame
display the scroll bars of this type on this frame. */
ENUM_BF (vertical_scroll_bar_type) vertical_scroll_bar_type : 2;
+ /* Nonzero if we should actually display horizontal scroll bars on this frame. */
+ bool_bf horizontal_scroll_bars : 1;
#endif /* HAVE_WINDOW_SYSTEM */
+ /* Whether new_height and new_width shall be interpreted
+ in pixels. */
+ bool_bf new_pixelwise : 1;
+
+ /* True if frame has been added to Vframe_list and is henceforth
+ considered official. For in-official frames we neither process
+ x_set_window_size requests nor do we allow running
+ window-configuration-change-hook when resizing windows. */
+ bool_bf official : 1;
+
/* Bitfield area ends here. */
- /* Margin at the top of the frame. Used to display the tool-bar. */
+ /* Number of lines (rounded up) of tool bar. REMOVE THIS */
int tool_bar_lines;
- /* Pixel height of tool bar. */
+ /* Height of frame internal tool bar in pixels. */
int tool_bar_height;
int n_tool_bar_rows;
@@ -347,18 +358,22 @@ struct frame
/* Cost of deleting n lines on this frame. */
int *delete_n_lines_cost;
- /* Text width of this frame (excluding fringes, scroll bars and
- internal border width) and text height (excluding internal border
- width) in units of canonical characters. */
+ /* 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. */
int text_cols, text_lines;
- /* Total width of this frame (including fringes and scroll bars) in
+ /* 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;
+ int total_cols, total_lines;
- /* Text width of this frame (excluding fringes, scroll bars and
- internal border width) and text height (excluding internal border
- width) in pixels. */
+ /* 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. */
int text_width, text_height;
/* New text height and width for pending size change. 0 if no change
@@ -367,14 +382,12 @@ struct frame
text width/height of the frame. */
int new_width, new_height;
- /* Whether new_height and new_width shall be interpreted
- in pixels. */
- bool new_pixelwise;
-
/* Pixel position of the frame window (x and y offsets in root window). */
int left_pos, top_pos;
- /* Size of the frame window (including internal border widths) in
+ /* 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
pixels. */
int pixel_width, pixel_height;
@@ -396,9 +409,21 @@ struct frame
a highlighting is displayed inside the internal border. */
int internal_border_width;
- /* Width of borders between this frame's windows. */
- int right_divider_width;
- int bottom_divider_width;
+ /* Widths of dividers between this frame's windows in pixels. */
+ int right_divider_width, bottom_divider_width;
+
+ /* Widths of fringes in pixels. */
+ int left_fringe_width, right_fringe_width;
+
+ /* Total width of fringes reserved for drawing truncation bitmaps,
+ continuation bitmaps and alike - REMOVE THIS !!!!. */
+ int fringe_cols;
+
+ /* Number of lines of menu bar. */
+ int menu_bar_lines;
+
+ /* Pixel height of menubar. */
+ int menu_bar_height;
/* Canonical X unit. Width of default font, in pixels. */
int column_width;
@@ -426,22 +451,6 @@ struct frame
/* List of font-drivers available on the frame. */
struct font_driver_list *font_driver_list;
- /* Total width of fringes reserved for drawing truncation bitmaps,
- continuation bitmaps and alike. The width is in canonical char
- units of the frame. This must currently be the case because window
- sizes aren't pixel values. If it weren't the case, we wouldn't be
- able to split windows horizontally nicely. */
- int fringe_cols;
-
- /* The extra width (in pixels) currently allotted for fringes. */
- int left_fringe_width, right_fringe_width;
-
- /* Number of lines of menu bar. */
- int menu_bar_lines;
-
- /* Pixel height of menubar. */
- int menu_bar_height;
-
#if defined (HAVE_X_WINDOWS)
/* Used by x_wait_for_event when watching for an X event on this frame. */
int wait_event_type;
@@ -469,6 +478,14 @@ struct frame
int config_scroll_bar_width;
int config_scroll_bar_cols;
+ /* Configured height of the scroll bar, in pixels and in characters.
+ config_scroll_bar_lines tracks config_scroll_bar_height if the
+ latter is positive; a zero value in config_scroll_bar_height means
+ to compute the actual width on the fly, using
+ config_scroll_bar_lines and the current font width. */
+ int config_scroll_bar_height;
+ int config_scroll_bar_lines;
+
/* The baud rate that was used to calculate costs for this frame. */
int cost_calculation_baud_rate;
@@ -716,8 +733,7 @@ default_pixels_per_inch_y (void)
/* Pixel width of frame F. */
#define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width)
-/* Pixel height of frame F, including non-toolkit menu bar and
- non-toolkit tool bar lines. */
+/* Pixel height of frame F. */
#define FRAME_PIXEL_HEIGHT(f) ((f)->pixel_height)
/* Width of frame F, measured in canonical character columns,
@@ -733,7 +749,7 @@ default_pixels_per_inch_y (void)
#define FRAME_TEXT_WIDTH(f) (f)->text_width
/* Height of frame F, measured in pixels not including the height
- for internal borders. */
+ for scroll bar and internal borders. */
#define FRAME_TEXT_HEIGHT(f) (f)->text_height
/* Number of lines of frame F used for menu bar.
@@ -782,6 +798,8 @@ default_pixels_per_inch_y (void)
#else
#define FRAME_EXTERNAL_MENU_BAR(f) false
#endif
+
+/* True if frame F is currently visible. */
#define FRAME_VISIBLE_P(f) (f)->visible
/* True if frame F is currently visible but hidden. */
@@ -828,12 +846,14 @@ default_pixels_per_inch_y (void)
#define FRAME_FOCUS_FRAME(f) f->focus_frame
#ifdef HAVE_WINDOW_SYSTEM
-
+
/* This frame slot says whether scroll bars are currently enabled for frame F,
and which side they are on. */
#define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type)
#define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \
((f)->vertical_scroll_bar_type != vertical_scroll_bar_none)
+#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \
+ ((f)->horizontal_scroll_bars)
#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) \
((f)->vertical_scroll_bar_type == vertical_scroll_bar_left)
#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \
@@ -854,61 +874,85 @@ default_pixels_per_inch_y (void)
If scroll bars are turned off, this is still nonzero. */
#define FRAME_CONFIG_SCROLL_BAR_WIDTH(f) ((f)->config_scroll_bar_width)
+/* Height that a scroll bar in frame F should have, if there is one.
+ Measured in pixels.
+ If scroll bars are turned off, this is still nonzero. */
+#define FRAME_CONFIG_SCROLL_BAR_HEIGHT(f) ((f)->config_scroll_bar_height)
+
/* Width that a scroll bar in frame F should have, if there is one.
Measured in columns (characters).
If scroll bars are turned off, this is still nonzero. */
#define FRAME_CONFIG_SCROLL_BAR_COLS(f) ((f)->config_scroll_bar_cols)
-/* Width of a scroll bar in frame F, measured in columns (characters),
- but only if scroll bars are on the left. If scroll bars are on
- the right in this frame, or there are no scroll bars, value is 0. */
-
-#define FRAME_LEFT_SCROLL_BAR_COLS(f) \
- (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \
- ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
- : 0)
+/* Height that a scroll bar in frame F should have, if there is one.
+ Measured in lines (characters).
+ If scroll bars are turned off, this is still nonzero. */
+#define FRAME_CONFIG_SCROLL_BAR_LINES(f) ((f)->config_scroll_bar_lines)
/* Width of a left scroll bar in frame F, measured in pixels */
-
#define FRAME_LEFT_SCROLL_BAR_AREA_WIDTH(f) \
(FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \
? FRAME_CONFIG_SCROLL_BAR_WIDTH (f) \
: 0)
-/* Width of a scroll bar in frame F, measured in columns (characters),
- but only if scroll bars are on the right. If scroll bars are on
- the left in this frame, or there are no scroll bars, value is 0. */
-
-#define FRAME_RIGHT_SCROLL_BAR_COLS(f) \
- (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f) \
- ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
- : 0)
-
/* Width of a right scroll bar area in frame F, measured in pixels */
-
#define FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH(f) \
(FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f) \
? FRAME_CONFIG_SCROLL_BAR_WIDTH (f) \
: 0)
-/* Actual width of a scroll bar in frame F, measured in columns. */
+/* Width of a left scroll bar in frame F, measured in columns
+ (characters), but only if scroll bars are on the left. If scroll
+ bars are on the right in this frame, or there are no scroll bars,
+ value is 0. */
+#define FRAME_LEFT_SCROLL_BAR_COLS(f) \
+ (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \
+ ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
+ : 0)
-#define FRAME_SCROLL_BAR_COLS(f) \
- (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
+/* Width of a right scroll bar in frame F, measured in columns
+ (characters), but only if scroll bars are on the right. If scroll
+ bars are on the left in this frame, or there are no scroll bars,
+ value is 0. */
+#define FRAME_RIGHT_SCROLL_BAR_COLS(f) \
+ (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f) \
? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
: 0)
-/* Actual width of a scroll bar area in frame F, measured in pixels. */
+/* Width of a vertical scroll bar area in frame F, measured in
+ pixels. */
+#define FRAME_SCROLL_BAR_AREA_WIDTH(f) \
+ (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
+ ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f) \
+ : 0)
-#define FRAME_SCROLL_BAR_AREA_WIDTH(f) \
- (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
- ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f) \
+/* Height of horizontal scroll bar area in frame F, measured in
+ pixels. */
+#define FRAME_SCROLL_BAR_AREA_HEIGHT(f) \
+ (FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) \
+ ? FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) \
+ : 0)
+
+/* Width of vertical scroll bar in frame F, measured in columns. */
+#define FRAME_SCROLL_BAR_COLS(f) \
+ (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
+ ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
+ : 0)
+
+/* Height of horizontal scroll bar in frame F, measured in lines. */
+#define FRAME_SCROLL_BAR_LINES(f) \
+ (FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) \
+ ? 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) \
@@ -917,8 +961,16 @@ default_pixels_per_inch_y (void)
+ FRAME_SCROLL_BAR_COLS (f) \
+ FRAME_FRINGE_COLS (f)))
-/* Set the pixel widths of frame F. WIDTH specifies a nominal pixel
- text width. */
+/* 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) \
@@ -926,21 +978,23 @@ default_pixels_per_inch_y (void)
+ FRAME_TOTAL_FRINGE_WIDTH (f) \
+ 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
-/* Set the pixel heights of frame F. HEIGHT specifies a nominal pixel
- text width. */
+/* 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) \
- + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
+ + 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))
+/* Nonzero if frame F has scroll bars. */
#define FRAME_SCROLL_BARS(f) (f->scroll_bars)
-
#define FRAME_CONDEMNED_SCROLL_BARS(f) (f->condemned_scroll_bars)
+
#define FRAME_MENU_BAR_ITEMS(f) (f->menu_bar_items)
#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate)
@@ -1053,6 +1107,7 @@ extern void check_window_system (struct frame *);
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);
extern Lisp_Object Vframe_list;
@@ -1073,12 +1128,10 @@ extern Lisp_Object Vframe_list;
/* Canonical y-unit on frame F.
This value currently equals the line height of the frame (which is
the height of the default font of F). */
-
#define FRAME_LINE_HEIGHT(F) ((F)->line_height)
/* Canonical x-unit on frame F.
This value currently equals the average width of the default font of F. */
-
#define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
/* Pixel width of areas used to display truncation marks, continuation
@@ -1091,7 +1144,6 @@ extern Lisp_Object Vframe_list;
units of the frame. This must currently be the case because window
sizes aren't pixel values. If it weren't the case, we wouldn't be
able to split windows horizontally nicely. */
-
#define FRAME_FRINGE_COLS(F) ((F)->fringe_cols)
/* Pixel-width of the left and right fringe. */
@@ -1134,7 +1186,6 @@ extern Lisp_Object Vframe_list;
/* Convert canonical value X to pixels. F is the frame whose
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) \
@@ -1143,7 +1194,6 @@ extern Lisp_Object Vframe_list;
/* 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) \
@@ -1153,7 +1203,6 @@ extern Lisp_Object Vframe_list;
canonical character width is to be used. X is a C integer. Result
is a Lisp float if X is not a multiple of the canon width,
otherwise it's a Lisp integer. */
-
#define FRAME_CANON_X_FROM_PIXEL_X(F, X) \
((X) % FRAME_COLUMN_WIDTH (F) != 0 \
? make_float ((double) (X) / FRAME_COLUMN_WIDTH (F)) \
@@ -1163,7 +1212,6 @@ extern Lisp_Object Vframe_list;
canonical character height is to be used. Y is a C integer.
Result is a Lisp float if Y is not a multiple of the canon width,
otherwise it's a Lisp integer. */
-
#define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y) \
((Y) % FRAME_LINE_HEIGHT (F) \
? make_float ((double) (Y) / FRAME_LINE_HEIGHT (F)) \
@@ -1177,7 +1225,6 @@ extern Lisp_Object Vframe_list;
Return the upper/left pixel position of the character cell on frame F
at ROW/COL. */
-
#define FRAME_LINE_TO_PIXEL_Y(f, row) \
(((row) < FRAME_TOP_MARGIN (f) ? 0 : FRAME_INTERNAL_BORDER_WIDTH (f)) \
+ (row) * FRAME_LINE_HEIGHT (f))
@@ -1188,25 +1235,27 @@ extern Lisp_Object Vframe_list;
/* Return the pixel width/height of frame F if it has
COLS columns/LINES rows. */
-
#define FRAME_TEXT_COLS_TO_PIXEL_WIDTH(f, cols) \
- (FRAME_COL_TO_PIXEL_X (f, cols) \
+ ((cols) * FRAME_COLUMN_WIDTH (f) \
+ FRAME_SCROLL_BAR_AREA_WIDTH (f) \
+ FRAME_TOTAL_FRINGE_WIDTH (f) \
- + FRAME_INTERNAL_BORDER_WIDTH (f))
+ + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
#define FRAME_TEXT_LINES_TO_PIXEL_HEIGHT(f, lines) \
((lines) * FRAME_LINE_HEIGHT (f) \
+ + FRAME_TOP_MARGIN_HEIGHT (f) \
+ + FRAME_SCROLL_BAR_AREA_HEIGHT (f) \
+ 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
/* Return the row/column (zero-based) of the character cell containing
the pixel on FRAME at Y/X. */
-
#define FRAME_PIXEL_Y_TO_LINE(f, y) \
(((y) < FRAME_TOP_MARGIN_HEIGHT (f) \
? (y) \
- : ((y) < FRAME_TOP_MARGIN_HEIGHT (f) + FRAME_INTERNAL_BORDER_WIDTH (f) \
- ? (y) - (FRAME_TOP_MARGIN_HEIGHT (f) + FRAME_INTERNAL_BORDER_WIDTH (f) \
+ : ((y) < (FRAME_TOP_MARGIN_HEIGHT (f) \
+ + FRAME_INTERNAL_BORDER_WIDTH (f)) \
+ ? (y) - (FRAME_TOP_MARGIN_HEIGHT (f) \
+ + FRAME_INTERNAL_BORDER_WIDTH (f) \
/* Arrange for the division to round down. */ \
+ FRAME_LINE_HEIGHT (f) - 1) \
: (y) - FRAME_INTERNAL_BORDER_WIDTH (f))) \
@@ -1217,21 +1266,23 @@ extern Lisp_Object Vframe_list;
/ FRAME_COLUMN_WIDTH (f))
/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
- frame F? */
-
+ frame F (so we round down)? */
#define FRAME_PIXEL_WIDTH_TO_TEXT_COLS(f, width) \
- (FRAME_PIXEL_X_TO_COL (f, ((width) \
- - FRAME_INTERNAL_BORDER_WIDTH (f) \
- - FRAME_TOTAL_FRINGE_WIDTH (f) \
- - FRAME_SCROLL_BAR_AREA_WIDTH (f)))) \
+ (((width) \
+ - FRAME_TOTAL_FRINGE_WIDTH (f) \
+ - FRAME_SCROLL_BAR_AREA_WIDTH (f) \
+ - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)) \
+ / FRAME_COLUMN_WIDTH (f)) \
#define FRAME_PIXEL_HEIGHT_TO_TEXT_LINES(f, height) \
- (FRAME_PIXEL_Y_TO_LINE (f, ((height) \
- - FRAME_INTERNAL_BORDER_WIDTH (f))))
+ (((height) \
+ - FRAME_TOP_MARGIN_HEIGHT (f) \
+ - FRAME_SCROLL_BAR_AREA_HEIGHT (f) \
+ - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)) \
+ / FRAME_LINE_HEIGHT (f))
/* Return the pixel width/height of frame F with a text size of
- width/height. */
-
+ width/heigh. */
#define FRAME_TEXT_TO_PIXEL_WIDTH(f, width) \
((width) \
+ FRAME_SCROLL_BAR_AREA_WIDTH (f) \
@@ -1239,11 +1290,13 @@ extern Lisp_Object Vframe_list;
+ 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
#define FRAME_TEXT_TO_PIXEL_HEIGHT(f, height) \
- ((height) + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+ ((height) \
+ + FRAME_TOP_MARGIN_HEIGHT (f) \
+ + FRAME_SCROLL_BAR_AREA_HEIGHT (f) \
+ + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
/* Return the text width/height of frame F with a pixel size of
width/height. */
-
#define FRAME_PIXEL_TO_TEXT_WIDTH(f, width) \
((width) \
- FRAME_SCROLL_BAR_AREA_WIDTH (f) \
@@ -1251,15 +1304,26 @@ extern Lisp_Object Vframe_list;
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
#define FRAME_PIXEL_TO_TEXT_HEIGHT(f, height) \
- ((height) - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+ ((height) \
+ - FRAME_TOP_MARGIN_HEIGHT (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) \
+ (FRAME_PIXEL_WIDTH (f) \
+ - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
-/* Value is the smallest width of any character in any font on frame F. */
+#define FRAME_WINDOWS_HEIGHT(f) \
+ (FRAME_PIXEL_HEIGHT (f) \
+ - FRAME_TOP_MARGIN_HEIGHT (f) \
+ - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+/* Value is the smallest width of any character in any font on frame F. */
#define FRAME_SMALLEST_CHAR_WIDTH(f) \
FRAME_DISPLAY_INFO (f)->smallest_char_width
/* Value is the smallest height of any font on frame F. */
-
#define FRAME_SMALLEST_FONT_HEIGHT(f) \
FRAME_DISPLAY_INFO (f)->smallest_font_height
@@ -1282,6 +1346,7 @@ extern Lisp_Object Qname, Qtitle;
extern Lisp_Object Qparent_id;
extern Lisp_Object Qunsplittable, Qvisibility;
extern Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
+extern Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars;
extern Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
extern Lisp_Object Qscreen_gamma;
extern Lisp_Object Qline_spacing;
@@ -1311,25 +1376,24 @@ extern Lisp_Object Qrun_hook_with_args;
/* The class of this X application. */
#define EMACS_CLASS "Emacs"
-/* These are in xterm.c, w32term.c, etc. */
+/* If these are not in frame.c they are in xterm.c, w32term.c, etc. */
+extern void adjust_frame_size (struct frame *, int, int, int, bool);
+extern int frame_windows_min_size (Lisp_Object, Lisp_Object, Lisp_Object);
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 Lisp_Object Qface_set_after_frame_default;
-
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_fringe_width (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_internal_border_width (struct frame *, Lisp_Object,
Lisp_Object);
@@ -1341,10 +1405,10 @@ 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_scroll_bar_width (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);