/* Window definitions for GNU Emacs.
- Copyright (C) 1985-1986, 1993, 1995, 1997-2014 Free Software
+ Copyright (C) 1985-1986, 1993, 1995, 1997-2015 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object next_buffers;
/* Number saying how recently window was selected. */
- int use_time;
+ EMACS_INT use_time;
/* Unique number of window assigned when it was created. */
- int sequence_number;
+ EMACS_INT sequence_number;
/* The upper left corner pixel coordinates of this window, as
integers relative to upper left corner of frame = 0, 0. */
/* Scaling factor for the glyph_matrix size calculation in this window.
Used if window contains many small images or uses proportional fonts,
- as the normal may yield a matrix which is too small. */
+ as the normal may yield a matrix which is too small. */
int nrows_scale_factor, ncols_scale_factor;
/* Intended cursor position. This is a position within the
/* True if this window is a minibuffer window. */
bool_bf mini : 1;
- /* Meaningful only if contents is a window, non-zero if this
+ /* Meaningful only if contents is a window, true if this
internal window is used in horizontal combination. */
bool_bf horizontal : 1;
#define WINDOW_FRAME_COLUMN_WIDTH(W) \
(FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W))))
-/* Return the canonical column width of the frame of window W. */
+/* Return the canonical line height of the frame of window W. */
#define WINDOW_FRAME_LINE_HEIGHT(W) \
(FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W))))
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (W) \
|| WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W))
+#if (defined (HAVE_WINDOW_SYSTEM) \
+ && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \
+ || defined (HAVE_NTGUI)))
+# define USE_HORIZONTAL_SCROLL_BARS true
+#else
+# define USE_HORIZONTAL_SCROLL_BARS false
+#endif
+
/* Say whether horizontal scroll bars are currently enabled for window
W. Horizontal scrollbars exist for toolkit versions only. */
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI)
+#if USE_HORIZONTAL_SCROLL_BARS
#define WINDOW_HAS_HORIZONTAL_SCROLL_BAR(W) \
((WINDOW_PSEUDO_P (W) || MINI_NON_ONLY_WINDOW_P (W)) \
? false \
: 0)
#define WINDOW_MODE_LINE_LINES(W) \
- (!! WINDOW_WANTS_MODELINE_P (W))
+ WINDOW_WANTS_MODELINE_P (W)
/* Height in pixels, and in lines, of the header line.
Zero if W doesn't have a header line. */
: 0)
#define WINDOW_HEADER_LINE_LINES(W) \
- (!! WINDOW_WANTS_HEADER_LINE_P (W))
+ WINDOW_WANTS_HEADER_LINE_P (W)
/* Pixel height of window W without mode line, bottom scroll bar and
bottom divider. */
recently used window. Its only users are Fselect_window,
init_window_once, and make_frame. */
-extern int window_select_count;
+extern EMACS_INT window_select_count;
/* The minibuffer window of the selected frame.
Note that you cannot test for minibufferness of an arbitrary window
void run_window_configuration_change_hook (struct frame *f);
-/* Make WINDOW display BUFFER. RUN_HOOKS_P non-zero means it's allowed
+/* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed
to run hooks. See make_frame for a case where it's not allowed. */
void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
struct glyph *get_phys_cursor_glyph (struct window *w);
-/* Value is non-zero if WINDOW is a valid window. */
+/* True if WINDOW is a valid window. */
#define WINDOW_VALID_P(WINDOW) \
(WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->contents)) \
#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. */
+/* True if WINDOW is a live window. */
#define WINDOW_LIVE_P(WINDOW) \
(WINDOWP (WINDOW) && BUFFERP (XWINDOW (WINDOW)->contents))
CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW)
/* These used to be in lisp.h. */
-extern Lisp_Object Qwindow_live_p;
extern Lisp_Object Vwindow_list;
extern Lisp_Object window_list (void);