]> code.delx.au - gnu-emacs/blobdiff - src/window.h
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
[gnu-emacs] / src / window.h
index cdf8da931380004c05ff6c7b4b05f697788119cd..eaff57eaedfb35f9330f7bcc226e00cb5a001e03 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
@@ -195,10 +195,10 @@ struct window
     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.  */
@@ -256,7 +256,7 @@ struct window
 
     /* 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
@@ -323,7 +323,7 @@ struct window
     /* 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;
 
@@ -519,7 +519,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #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))))
 
@@ -785,9 +785,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
   (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                                                     \
@@ -913,7 +921,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    : 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.  */
@@ -923,7 +931,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    : 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.  */
@@ -982,7 +990,7 @@ extern Lisp_Object selected_window;
    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
@@ -1007,7 +1015,7 @@ extern int window_relative_x_coord (struct window *, enum window_part, int);
 
 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,
@@ -1059,7 +1067,7 @@ extern void redisplay_other_windows (void);
 
 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))     \
 
@@ -1068,7 +1076,7 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
 #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))
 
@@ -1077,7 +1085,6 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
   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);