/* Define frame-object for GNU Emacs.
- Copyright (C) 1993-1994, 1999-2013 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1999-2014 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Cache of realized faces. */
struct face_cache *face_cache;
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
+ /* Tool-bar item index of the item on which a mouse button was pressed. */
+ int last_tool_bar_item;
+#endif
+
/* Number of elements in `menu_bar_vector' that have meaningful data. */
int menu_bar_items_used;
set this directly, use SET_FRAME_ICONIFIED instead. */
bool_bf iconified : 1;
- /* True if this frame should be redrawn. */
+ /* True if this frame should be fully redisplayed. Disables all
+ optimizations while rebuilding matrices and redrawing. */
bool_bf garbaged : 1;
/* False means, if this frame has just one window,
/* The baud rate that was used to calculate costs for this frame. */
int cost_calculation_baud_rate;
- /* frame opacity
+ /* Frame opacity
alpha[0]: alpha transparency of the active frame
alpha[1]: alpha transparency of inactive frames
Negative values mean not to change alpha. */
/* Additional space to put between text lines on this frame. */
int extra_line_spacing;
- /* All display backends seem to need these two pixel values. */
+ /* All display backends seem to need these two pixel values. */
unsigned long background_pixel;
unsigned long foreground_pixel;
};
#define FRAME_IMAGE_CACHE(F) ((F)->terminal->image_cache)
#define XFRAME(p) \
- (eassert (FRAMEP (p)), (struct frame *) XUNTAG (p, Lisp_Vectorlike))
+ (eassert (FRAMEP (p)), (struct frame *) SCM_SMOB_DATA (p))
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
/* Given a window, return its frame as a Lisp_Object. */
} \
} while (false)
+/* False means there are no visible garbaged frames. */
+extern bool frame_garbaged;
+
/* Set visibility of frame F.
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
SET_FRAME_VISIBLE (struct frame *f, int v)
{
eassert (0 <= v && v <= 2);
- if (v == 1 && f->visible != 1)
- redisplay_other_windows ();
+ if (v)
+ {
+ if (v == 1 && f->visible != 1)
+ redisplay_other_windows ();
+ if (FRAME_GARBAGED_P (f))
+ frame_garbaged = true;
+ }
f->visible = v;
}
extern Lisp_Object Qterminal;
extern Lisp_Object Qnoelisp;
-/* True means there is at least one garbaged frame. */
-extern bool frame_garbaged;
-
extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern struct frame *decode_window_system_frame (Lisp_Object);
extern struct frame *decode_live_frame (Lisp_Object);
extern struct frame *make_frame_without_minibuffer (Lisp_Object,
struct kboard *,
Lisp_Object);
-#endif /* HAVE_WINDOW_SYSTEM */
extern bool window_system_available (struct frame *);
+#else /* not HAVE_WINDOW_SYSTEM */
+#define window_system_available(f) ((void) (f), false)
+#endif /* HAVE_WINDOW_SYSTEM */
extern void check_window_system (struct frame *);
-extern void frame_make_pointer_invisible (void);
-extern void frame_make_pointer_visible (void);
+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 Lisp_Object Vframe_list;
extern Lisp_Object Qbuffer_predicate;
extern Lisp_Object Qcursor_color, Qcursor_type;
extern Lisp_Object Qfont;
-extern Lisp_Object Qbackground_color, Qforeground_color;
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 void x_set_window_size (struct frame *f, int change_grav,
int width, int height, bool pixelwise);
extern Lisp_Object x_get_focus_frame (struct frame *);
-extern void x_set_mouse_position (struct frame *f, int h, int v);
-extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
+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_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_activate_menubar (struct frame *);
extern void x_real_positions (struct frame *, int *, int *);
}
#endif /* !HAVE_NS */
-
#endif /* HAVE_WINDOW_SYSTEM */
INLINE void