/* Define frame-object for GNU Emacs.
- Copyright (C) 1993-1994, 1999-2014 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1999-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-/* Don't multiply include: dispextern.h includes macterm.h which
- includes frame.h some emacs source includes both dispextern.h and
- frame.h. */
-
#ifndef EMACS_FRAME_H
#define EMACS_FRAME_H
-#include "dispextern.h"
#include "termhooks.h"
#include "window.h"
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;
+ /* True means x_set_window_size requests can be processed for this
+ frame. */
+ bool_bf can_x_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. */
+ bool_bf tool_bar_redisplayed : 1;
+ bool_bf tool_bar_resized : 1;
+
+ /* Inhibit implied resize before after_make_frame is set. */
+ bool_bf inhibit_horizontal_resize : 1;
+ bool_bf inhibit_vertical_resize : 1;
+
+ /* Non-zero if this frame's faces need to be recomputed. */
+ bool_bf face_change : 1;
/* Bitfield area ends here. */
int left_pos, top_pos;
/* 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. */
+ 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;
- /* These many pixels are the difference between the outer window (i.e. the
- left and top of the window manager decoration) and FRAME_X_WINDOW. */
- int x_pixels_diff, y_pixels_diff;
-
/* This is the gravity value for the specified window position. */
int win_gravity;
}
#endif /* HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS */
-#define NUMVAL(X) ((INTEGERP (X) || FLOATP (X)) ? XFLOATINT (X) : -1)
+#define NUMVAL(X) (NUMBERP (X) ? XFLOATINT (X) : -1)
INLINE double
default_pixels_per_inch_x (void)
#endif /* HAVE_WINDOW_SYSTEM */
/* Whether horizontal scroll bars are currently enabled for frame F. */
-#if (defined (HAVE_WINDOW_SYSTEM) \
- && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \
- || defined (HAVE_NTGUI)))
+#if USE_HORIZONTAL_SCROLL_BARS
#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \
((f)->horizontal_scroll_bars)
#else
} \
} while (false)
+/* Handy macro to construct an argument to Fmodify_frame_parameters. */
+
+#define AUTO_FRAME_ARG(name, parameter, value) \
+ AUTO_LIST1 (name, AUTO_CONS_EXPR (parameter, value))
+
/* False means there are no visible garbaged frames. */
extern bool frame_garbaged;
(f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i))
extern Lisp_Object selected_frame;
-extern Lisp_Object Qframep, Qframe_live_p;
-extern Lisp_Object Qtty, Qtty_type;
-extern Lisp_Object Qtty_color_mode;
-extern Lisp_Object Qterminal;
-extern Lisp_Object Qnoelisp;
+
+#if ! (defined USE_GTK || defined HAVE_NS)
+extern int frame_default_tool_bar_height;
+#endif
extern struct frame *decode_window_system_frame (Lisp_Object);
extern struct frame *decode_live_frame (Lisp_Object);
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 void adjust_frame_size (struct frame *, int, int, int, bool);
+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 Lisp_Object Vframe_list;
/ FRAME_LINE_HEIGHT (f))
/* Return the pixel width/height of frame F with a text size of
- width/heigh. */
+ width/height. */
#define FRAME_TEXT_TO_PIXEL_WIDTH(f, width) \
((width) \
+ FRAME_SCROLL_BAR_AREA_WIDTH (f) \
Frame Parameters
***********************************************************************/
-extern Lisp_Object Qauto_raise, Qauto_lower;
-extern Lisp_Object Qborder_color, Qborder_width;
-extern Lisp_Object Qbuffer_predicate;
-extern Lisp_Object Qcursor_color, Qcursor_type;
-extern Lisp_Object Qfont;
-extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
-extern Lisp_Object Qinternal_border_width;
-extern Lisp_Object Qright_divider_width, Qbottom_divider_width;
-extern Lisp_Object Qtooltip;
-extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position;
-extern Lisp_Object Qmouse_color;
-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;
-extern Lisp_Object Qwait_for_wm;
-extern Lisp_Object Qfullscreen;
-extern Lisp_Object Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
-extern Lisp_Object Qsticky;
-extern Lisp_Object Qfont_backend;
-extern Lisp_Object Qalpha;
-
-extern Lisp_Object Qleft_fringe, Qright_fringe;
-extern Lisp_Object Qheight, Qwidth;
-extern Lisp_Object Qminibuffer, Qmodeline;
-extern Lisp_Object Qx, Qw32, Qpc, Qns;
-extern Lisp_Object Qvisible;
-extern Lisp_Object Qdisplay_type;
-
-extern Lisp_Object Qx_resource_name;
-
-extern Lisp_Object Qtop, Qbox, Qbottom;
-extern Lisp_Object Qdisplay;
-
-extern Lisp_Object Qrun_hook_with_args;
-
#ifdef HAVE_WINDOW_SYSTEM
/* The class of this X application. */
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_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);
+extern long x_figure_window_size (struct frame *, Lisp_Object, bool, int *, int *);
extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
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, int change_grav,
+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 frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
#endif /* HAVE_X_WINDOWS */
extern void x_query_colors (struct frame *f, XColor *, int);
-extern void x_query_color (struct frame *f, XColor *);
extern void x_focus_frame (struct frame *);
#ifndef HAVE_NS
-extern int x_bitmap_icon (struct frame *, Lisp_Object);
+extern bool x_bitmap_icon (struct frame *, Lisp_Object);
/* Set F's bitmap icon, if specified among F's parameters. */
{
Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist);
- if (CONSP (obj))
+ if (CONSP (obj) && !NILP (XCDR (obj)))
x_bitmap_icon (f, XCDR (obj));
}
INLINE_HEADER_END
+/* Suppress -Wsuggest-attribute=const if there are no scroll bars.
+ This is for functions like x_set_horizontal_scroll_bars that have
+ no effect in this case. */
+#if ! USE_HORIZONTAL_SCROLL_BARS && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
#endif /* not EMACS_FRAME_H */