Add 2011 to FSF/AIST copyright years.
[bpt/emacs.git] / src / window.h
index 8246336..99259b7 100644 (file)
@@ -1,6 +1,6 @@
 /* Window definitions for GNU Emacs.
    Copyright (C) 1985, 1986, 1993, 1995, 1997, 1998, 1999, 2000, 2001,
-                 2002, 2003, 2004, 2005, 2006, 2007, 2008
+                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -224,10 +224,12 @@ struct window
        proportionally.  */
     Lisp_Object resize_proportionally;
 
-    /* Original window height and top before mini-window was
-       enlarged. */
+    /* Original window height and top before mini-window was enlarged. */
     Lisp_Object orig_total_lines, orig_top_line;
 
+    /* An alist with parameteres.  */
+    Lisp_Object window_parameters;
+
     /* No Lisp data may follow below this point without changing
        mark_object in alloc.c.  The member current_matrix must be the
        first non-Lisp member.  */
@@ -278,6 +280,11 @@ struct window
        Currently only used for menu bar windows of frames.  */
     unsigned pseudo_window_p : 1;
 
+    /* 1 means the window start of this window is frozen and may not
+       be changed during redisplay.  If point is not in the window,
+       accept that.  */
+    unsigned frozen_window_start_p : 1;
+
     /* Amount by which lines of this window are scrolled in
        y-direction (smooth scrolling).  */
     int vscroll;
@@ -285,11 +292,6 @@ struct window
     /* Z_BYTE - the buffer position of the last glyph in the current matrix
        of W.  Only valid if WINDOW_END_VALID is not nil.  */
     int window_end_bytepos;
-
-    /* 1 means the window start of this window is frozen and may not
-       be changed during redisplay.  If point is not in the window,
-       accept that.  */
-    unsigned frozen_window_start_p : 1;
 };
 
 /* 1 if W is a minibuffer window.  */
@@ -398,18 +400,32 @@ struct window
   (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
    + WINDOW_RIGHT_EDGE_COL (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
 
+/* 1 if W is a menu bar window.  */
+
+#define WINDOW_MENU_BAR_P(W) \
+  (WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \
+   && (W) == XWINDOW (WINDOW_XFRAME (W)->menu_bar_window))
+
+/* 1 if W is a tool bar window.  */
+
+#define WINDOW_TOOL_BAR_P(W) \
+  (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \
+   && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window))
+
 /* Return the frame y-position at which window W starts.
    This includes a header line, if any.  */
 
 #define WINDOW_TOP_EDGE_Y(W) \
-  (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
+  (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
+    ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
    + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
 
 /* Return the frame y-position before which window W ends.
    This includes a mode line, if any.  */
 
 #define WINDOW_BOTTOM_EDGE_Y(W) \
-  (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
+  (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
+    ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
    + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
 
 
@@ -758,7 +774,6 @@ extern Lisp_Object Vmouse_event;
 
 EXFUN (Fnext_window, 3);
 EXFUN (Fselect_window, 2);
-EXFUN (Fdisplay_buffer, 3);
 EXFUN (Fset_window_buffer, 3);
 EXFUN (Fset_window_hscroll, 2);
 EXFUN (Fwindow_hscroll, 1);