summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-11 16:24:58 +0000
committerMiles Bader <miles@gnu.org>2007-10-11 16:24:58 +0000
commitc73bd236f75b742ad4642ec94798987ae6e3e1e8 (patch)
treeef5edc8db557fc1d25a17c379e4ae63a38b3ba5c /src/frame.h
parentecb21060d5c1752d41d7a742be565c59b5fcb855 (diff)
parent58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff)
downloademacs-c73bd236f75b742ad4642ec94798987ae6e3e1e8.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h125
1 files changed, 62 insertions, 63 deletions
diff --git a/src/frame.h b/src/frame.h
index 245b4aa3eb3..e48dd646da3 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -29,9 +29,7 @@ Boston, MA 02110-1301, USA. */
/* Miscellanea. */
-/* Nonzero means don't assume anything about current contents of
- actual terminal frame */
-
+/* Nonzero means there is at least one garbaged frame. */
extern int frame_garbaged;
/* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by
@@ -39,11 +37,17 @@ extern int frame_garbaged;
extern int message_buf_print;
+/* Nonzero means window system changes focus when moving the
+ mouse. */
+
+extern int focus_follows_mouse;
+
/* The structure representing a frame. */
enum output_method
{
+ output_initial,
output_termcap,
output_x_window,
output_msdos_raw,
@@ -68,30 +72,10 @@ enum text_cursor_kinds
HBAR_CURSOR
};
-#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(MAC_OS)
-
-#if !defined(HAVE_X_WINDOWS)
-
-#define PIX_TYPE unsigned long
-
-/* A (mostly empty) x_output structure definition for building Emacs
- on Unix and GNU/Linux without X support. */
-struct x_output
-{
- PIX_TYPE background_pixel;
- PIX_TYPE foreground_pixel;
-};
-
-#endif /* ! HAVE_X_WINDOWS */
-
-
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
-
-/* A structure describing a termcap frame display. */
-extern struct x_output tty_display;
+#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
+#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
-#endif /* ! MSDOS && ! WINDOWSNT && ! MAC_OS */
+struct terminal;
#ifdef USE_FONT_BACKEND
struct font_driver_list;
@@ -99,11 +83,10 @@ struct font_driver_list;
struct frame
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *next;
/* All Lisp_Object components must come first.
- Only EMACS_INT values can be intermixed with them.
That ensures they are all aligned normally. */
/* Name of this frame: a Lisp string. It is used for looking up resources,
@@ -157,7 +140,7 @@ struct frame
Actually, we don't specify exactly what is stored here at all; the
scroll bar implementation code can use it to store anything it likes.
This field is marked by the garbage collector. It is here
- instead of in the `display' structure so that the garbage
+ instead of in the `device' structure so that the garbage
collector doesn't need to look inside the window-system-dependent
structure. */
Lisp_Object scroll_bars;
@@ -177,8 +160,6 @@ struct frame
For the format of the data, see extensive comments in xmenu.c.
Only the X toolkit version uses this. */
Lisp_Object menu_bar_vector;
- /* Number of elements in the vector that have meaningful data. */
- EMACS_INT menu_bar_items_used;
/* Predicate for selecting buffers for other-buffer. */
Lisp_Object buffer_predicate;
@@ -186,6 +167,10 @@ struct frame
/* List of buffers viewed in this frame, for other-buffer. */
Lisp_Object buffer_list;
+ /* List of buffers that were viewed, then buried in this frame. The
+ most recently buried buffer is first. For last-buffer. */
+ Lisp_Object buried_buffer_list;
+
/* A dummy window used to display menu bars under X when no X
toolkit support is available. */
Lisp_Object menu_bar_window;
@@ -199,11 +184,14 @@ struct frame
/* Desired and current contents displayed in tool_bar_window. */
Lisp_Object desired_tool_bar_string, current_tool_bar_string;
- /* beyond here, there should be no more Lisp_Object components. */
+ /* Beyond here, there should be no more Lisp_Object components. */
/* Cache of realized faces. */
struct face_cache *face_cache;
+ /* Number of elements in `menu_bar_vector' that have meaningful data. */
+ EMACS_INT menu_bar_items_used;
+
/* A buffer to hold the frame's name. We can't use the Lisp
string's pointer (`name', above) because it might get relocated. */
char *namebuf;
@@ -290,20 +278,24 @@ struct frame
/* Canonical Y unit. Height of a line, in pixels. */
int line_height;
- /* The output method says how the contents of this frame
- are displayed. It could be using termcap, or using an X window. */
+ /* The output method says how the contents of this frame are
+ displayed. It could be using termcap, or using an X window.
+ This must be the same as the terminal->type. */
enum output_method output_method;
- /* A structure of auxiliary data used for displaying the contents.
- struct x_output is used for X window frames;
- it is defined in xterm.h.
- struct w32_output is used for W32 window frames;
- it is defined in w32term.h. */
+ /* The terminal device that this frame uses. If this is NULL, then
+ the frame has been deleted. */
+ struct terminal *terminal;
+
+ /* Device-dependent, frame-local auxiliary data used for displaying
+ the contents. When the frame is deleted, this data is deleted as
+ well. */
union output_data
{
- struct x_output *x;
- struct w32_output *w32;
- struct mac_output *mac;
+ struct tty_output *tty; /* termchar.h */
+ struct x_output *x; /* xterm.h */
+ struct w32_output *w32; /* w32term.h */
+ struct mac_output *mac; /* macterm.h */
EMACS_INT nothing;
}
output_data;
@@ -323,13 +315,6 @@ struct frame
/* The extra width (in pixels) currently allotted for fringes. */
int left_fringe_width, right_fringe_width;
-#ifdef MULTI_KBOARD
- /* A pointer to the kboard structure associated with this frame.
- For termcap frames, this points to initial_kboard. For X frames,
- it will be the same as display.x->display_info->kboard. */
- struct kboard *kboard;
-#endif
-
/* See FULLSCREEN_ enum below */
int want_fullscreen;
@@ -353,13 +338,13 @@ struct frame
frame becomes visible again, it must be marked as garbaged. The
FRAME_SAMPLE_VISIBILITY macro takes care of this.
- On Windows NT/9X, to avoid wasting effort updating visible frames
- that are actually completely obscured by other windows on the
- display, we bend the meaning of visible slightly: if greater than
- 1, then the frame is obscured - we still consider it to be
- "visible" as seen from lisp, but we don't bother updating it. We
- must take care to garbage the frame when it ceaces to be obscured
- though. Note that these semantics are only used on NT/9X.
+ On ttys and on Windows NT/9X, to avoid wasting effort updating
+ visible frames that are actually completely obscured by other
+ windows on the display, we bend the meaning of visible slightly:
+ if greater than 1, then the frame is obscured - we still consider
+ it to be "visible" as seen from lisp, but we don't bother
+ updating it. We must take care to garbage the frame when it
+ ceaces to be obscured though.
iconified is nonzero if the frame is currently iconified.
@@ -453,7 +438,7 @@ struct frame
/* The baud rate that was used to calculate costs for this frame. */
int cost_calculation_baud_rate;
- /* Nonzero if the mouse has moved on this display
+ /* Nonzero if the mouse has moved on this display device
since the last time we checked. */
char mouse_moved;
@@ -473,6 +458,10 @@ struct frame
update_frame, usually after resizing the frame. */
unsigned force_flush_display_p : 1;
+ /* All display backends seem to need these two pixel values. */
+ unsigned long background_pixel;
+ unsigned long foreground_pixel;
+
/* Set to non-zero if the default face for the frame has been
realized. Reset to zero whenever the default face changes.
Used to see the difference between a font change and face change. */
@@ -491,7 +480,7 @@ struct frame
};
#ifdef MULTI_KBOARD
-#define FRAME_KBOARD(f) ((f)->kboard)
+#define FRAME_KBOARD(f) ((f)->terminal->kboard)
#else
#define FRAME_KBOARD(f) (&the_only_kboard)
#endif
@@ -505,6 +494,7 @@ typedef struct frame *FRAME_PTR;
#define WINDOW_FRAME(w) (w)->frame
/* Test a frame for particular kinds of display methods. */
+#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)
#define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap)
#define FRAME_X_P(f) ((f)->output_method == output_x_window)
#define FRAME_W32_P(f) ((f)->output_method == output_w32)
@@ -528,7 +518,7 @@ typedef struct frame *FRAME_PTR;
#endif
/* Nonzero if frame F is still alive (not deleted). */
-#define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0)
+#define FRAME_LIVE_P(f) ((f)->terminal != 0)
/* Nonzero if frame F is a minibuffer-only frame. */
#define FRAME_MINIBUF_ONLY_P(f) \
@@ -768,7 +758,10 @@ typedef struct frame *FRAME_PTR;
Also, if a frame used to be invisible, but has just become visible,
it must be marked as garbaged, since redisplay hasn't been keeping
- up its contents. */
+ up its contents.
+
+ Note that a tty frame is visible if and only if it is the topmost
+ frame. */
#define FRAME_SAMPLE_VISIBILITY(f) \
(((f)->async_visible && (f)->visible != (f)->async_visible) ? \
@@ -801,10 +794,14 @@ typedef struct frame *FRAME_PTR;
extern Lisp_Object Qframep, Qframe_live_p;
+extern Lisp_Object Qtty, Qtty_type;
+extern Lisp_Object Qterminal, Qterminal_live_p;
+extern Lisp_Object Qenvironment;
extern struct frame *last_nonminibuf_frame;
-extern struct frame *make_terminal_frame P_ ((void));
+extern struct frame *make_initial_frame P_ ((void));
+extern struct frame *make_terminal_frame P_ ((struct terminal *));
extern struct frame *make_frame P_ ((int));
#ifdef HAVE_WINDOW_SYSTEM
extern struct frame *make_minibuffer_frame P_ ((void));
@@ -1004,7 +1001,7 @@ extern Lisp_Object selected_frame;
extern Lisp_Object Qauto_raise, Qauto_lower;
extern Lisp_Object Qborder_color, Qborder_width;
-extern Lisp_Object Qbuffer_predicate, Qbuffer_list;
+extern Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list;
extern Lisp_Object Qcursor_color, Qcursor_type;
extern Lisp_Object Qfont;
extern Lisp_Object Qbackground_color, Qforeground_color;
@@ -1037,6 +1034,8 @@ extern Lisp_Object Qx_resource_name;
extern Lisp_Object Qleft, Qright, Qtop, Qbox;
extern Lisp_Object Qdisplay;
+extern Lisp_Object Qwindow_system;
+
#ifdef HAVE_WINDOW_SYSTEM
/* The class of this X application. */
@@ -1049,7 +1048,7 @@ enum
FULLSCREEN_WIDTH = 1,
FULLSCREEN_HEIGHT = 2,
FULLSCREEN_BOTH = 3,
- FULLSCREEN_WAIT = 4,
+ FULLSCREEN_WAIT = 4
};