X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/41e962982dfe424c69ed99f0bd26a6e4eb67107f..662ee733257d573deaadd2e217894b70265fb5fe:/src/frame.h diff --git a/src/frame.h b/src/frame.h index 22f2fa7a24..e7d3aab119 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1,5 +1,5 @@ /* 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. @@ -16,14 +16,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -/* 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" @@ -328,11 +323,23 @@ struct frame 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. */ @@ -386,15 +393,11 @@ struct frame 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; @@ -617,7 +620,7 @@ fset_desired_tool_bar_string (struct frame *f, Lisp_Object val) } #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) @@ -1093,11 +1096,10 @@ SET_FRAME_VISIBLE (struct frame *f, int v) (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); @@ -1117,8 +1119,10 @@ 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 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; @@ -1342,46 +1346,6 @@ extern Lisp_Object Vframe_list; 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. */ @@ -1392,7 +1356,6 @@ 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); @@ -1415,7 +1378,7 @@ extern void x_set_horizontal_scroll_bars (struct frame *, Lisp_Object, Lisp_Obje 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); @@ -1428,7 +1391,7 @@ extern Lisp_Object display_x_get_resource (Display_Info *, 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); @@ -1450,12 +1413,11 @@ extern void x_sync (struct frame *); #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. */ @@ -1464,7 +1426,7 @@ x_set_bitmap_icon (struct frame *f) { 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)); }