]> code.delx.au - gnu-emacs/blobdiff - src/frame.h
*** empty log message ***
[gnu-emacs] / src / frame.h
index 5efede23199181c32cdc8da0fc6b178d2dd94cde..d09a0d1ae04273a267e0d13effcbe1e016fd8995 100644 (file)
@@ -1,5 +1,6 @@
 /* Define frame-object for GNU Emacs.
-   Copyright (C) 1993, 1994, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004,
+                 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -15,8 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 /* Don't multiply include: dispextern.h includes macterm.h which
    includes frame.h some emacs source includes both dispextern.h and
@@ -71,7 +72,7 @@ enum text_cursor_kinds
 
 #if !defined(HAVE_X_WINDOWS)
 
-#define PIX_TYPE int
+#define PIX_TYPE unsigned long
 
 /* A (mostly empty) x_output structure definition for building Emacs
    on Unix and GNU/Linux without X support.  */
@@ -221,6 +222,7 @@ struct frame
   /* Margin at the top of the frame.  Used to display the tool-bar.  */
   int tool_bar_lines;
 
+  int n_tool_bar_rows;
   int n_tool_bar_items;
 
   /* A buffer for decode_mode_line. */
@@ -275,6 +277,9 @@ struct frame
   /* Canonical X unit.  Width of default font, in pixels.  */
   int column_width;
 
+  /* Widht of space glyph of default font, in pixels.  */
+  int space_width;
+
   /* Canonical Y unit.  Height of a line, in pixels.  */
   int line_height;
 
@@ -452,10 +457,25 @@ struct frame
      Clear the frame in clear_garbaged_frames if set.  */
   unsigned resized_p : 1;
 
+  /* Set to non-zero in when we want for force a flush_display in
+     update_frame, usually after resizing the frame.  */
+  unsigned force_flush_display_p : 1;
+
   /* 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.  */
   unsigned default_face_done_p : 1;
+
+  /* Set to non-zero if this frame has already been hscrolled during
+     current redisplay.  */
+  unsigned already_hscrolled_p : 1;
+
+  /* Set to non-zero when current redisplay has updated frame.  */
+  unsigned updated_p : 1;
+
+  /* Set to non-zero to minimize tool-bar height even when
+     auto-resize-tool-bar is set to grow-only.  */
+  unsigned minimize_tool_bar_window_p : 1;
 };
 
 #ifdef MULTI_KBOARD
@@ -744,18 +764,11 @@ typedef struct frame *FRAME_PTR;
    (f)->visible = (f)->async_visible, \
    (f)->iconified = (f)->async_iconified)
 
-#define CHECK_FRAME(x)                                 \
-     do {                                              \
-       if (! FRAMEP (x))                               \
-         x = wrong_type_argument (Qframep, (x));       \
-     } while (0)
+#define CHECK_FRAME(x) \
+  CHECK_TYPE (FRAMEP (x), Qframep, x)
 
-#define CHECK_LIVE_FRAME(x)                            \
-     do {                                              \
-       if (! FRAMEP (x)                                        \
-          || ! FRAME_LIVE_P (XFRAME (x)))              \
-         x = wrong_type_argument (Qframe_live_p, (x)); \
-     } while (0)
+#define CHECK_LIVE_FRAME(x) \
+  CHECK_TYPE (FRAMEP (x) && FRAME_LIVE_P (XFRAME (x)), Qframe_live_p, x)
 
 /* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
    `for' loop which iterates over the elements of Vframe_list.  The
@@ -795,9 +808,6 @@ extern Lisp_Object Vdefault_frame_alist;
 extern Lisp_Object Vterminal_frame;
 
 extern Lisp_Object Vmouse_highlight;
-
-enum text_cursor_kinds get_specified_cursor_type P_ ((Lisp_Object, int *));
-enum text_cursor_kinds get_window_cursor_type P_ ((struct window *, int *, int *));
 \f
 /* The currently selected frame.  */
 
@@ -817,17 +827,21 @@ extern Lisp_Object selected_frame;
                        Display-related Macros
  ***********************************************************************/
 
-/* Canonical y-unit on frame F.  
+/* Canonical y-unit on frame F.
    This value currently equals the line height of the frame (which is
    the height of the default font of F).  */
 
 #define FRAME_LINE_HEIGHT(F) ((F)->line_height)
 
-/* Canonical x-unit on frame F. 
-   This value currently equals the width of the default font of F.  */
+/* Canonical x-unit on frame F.
+   This value currently equals the average width of the default font of F.  */
 
 #define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
 
+/* Space glyph width of the default font of frame F.  */
+
+#define FRAME_SPACE_WIDTH(F) ((F)->space_width)
+
 
 /* Pixel width of areas used to display truncation marks, continuation
    marks, overlay arrows.  This is 0 for terminal frames.  */