/* Window definitions for GNU Emacs.
- Copyright (C) 1985-1986, 1993, 1995, 1997-2012
- Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 1993, 1995, 1997-2013 Free Software
+ Foundation, Inc.
This file is part of GNU Emacs.
EMACS_INT last_overlay_modified;
/* Value of point at that time. Since this is a position in a buffer,
- it should be positive. */
+ it should be positive. */
ptrdiff_t last_point;
/* Scaling factor for the glyph_matrix size calculation in this window.
/* Non-zero if this window is a minibuffer window. */
unsigned mini : 1;
- /* Non-zero means must regenerate mode line of this window */
+ /* Non-zero means must regenerate mode line of this window. */
unsigned update_mode_line : 1;
/* Non-nil if the buffer was "modified" when the window
y-direction (smooth scrolling). */
int vscroll;
- /* Z_BYTE - the buffer position of the last glyph in the current matrix of W.
+ /* Z_BYTE - Buffer position of the last glyph in the current matrix of W.
Should be nonnegative, and only valid if window_end_valid is not nil. */
ptrdiff_t window_end_bytepos;
};
/* Most code should use these functions to set Lisp fields in struct
window. */
WINDOW_INLINE void
-wset_buffer (struct window *w, Lisp_Object val)
-{
- w->buffer = val;
-}
-WINDOW_INLINE void
wset_frame (struct window *w, Lisp_Object val)
{
w->frame = val;
extern int update_mode_lines;
/* Nonzero if window sizes or contents have changed since last
- redisplay that finished */
+ redisplay that finished. */
extern int windows_or_buffers_changed;
extern int cursor_type_changed;
-/* Number of windows displaying the selected buffer. Normally this is
- 1, but it can be more. */
-
-extern int buffer_shared;
-
/* If *ROWS or *COLS are too small a size for FRAME, set them to the
minimum allowable size. */
|| !NILP (XWINDOW (WINDOW)->vchild) \
|| !NILP (XWINDOW (WINDOW)->hchild)))
+/* A window of any sort, leaf or interior, is "valid" if one
+ of its buffer, vchild, or hchild members is non-nil. */
+#define CHECK_VALID_WINDOW(WINDOW) \
+ CHECK_TYPE (WINDOW_VALID_P (WINDOW), Qwindow_valid_p, WINDOW)
/* Value is non-zero if WINDOW is a live window. */
#define WINDOW_LIVE_P(WINDOW) \
(WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->buffer))
+/* A window is "live" if and only if it shows a buffer. */
+#define CHECK_LIVE_WINDOW(WINDOW) \
+ CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW)
+
/* These used to be in lisp.h. */
extern Lisp_Object Qwindowp, Qwindow_live_p;
extern Lisp_Object Vwindow_list;
extern struct window *decode_live_window (Lisp_Object);
+extern struct window *decode_any_window (Lisp_Object);
extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool);
extern void mark_window_cursors_off (struct window *);
extern int window_internal_height (struct window *);
extern void temp_output_buffer_show (Lisp_Object);
extern void replace_buffer_in_windows (Lisp_Object);
extern void replace_buffer_in_windows_safely (Lisp_Object);
+/* This looks like a setter, but it is a bit special. */
+extern void wset_buffer (struct window *, Lisp_Object);
extern void init_window_once (void);
extern void init_window (void);
extern void syms_of_window (void);