Merge from emacs--devo--0
[bpt/emacs.git] / src / frame.h
index ae80c03..9c00e31 100644 (file)
@@ -1,12 +1,12 @@
 /* Define frame-object for GNU Emacs.
    Copyright (C) 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004,
-                 2005, 2006 Free Software Foundation, Inc.
+                 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -197,7 +197,7 @@ struct frame
      be used for output.  */
   unsigned glyphs_initialized_p : 1;
 
-#if defined (USE_GTK)
+#if defined (USE_GTK) || defined (MAC_OS)
   /* Nonzero means using a tool bar that comes from the toolkit.  */
   int external_tool_bar;
 #endif
@@ -205,6 +205,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. */
@@ -455,6 +456,10 @@ struct frame
 
   /* 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
@@ -529,7 +534,7 @@ typedef struct frame *FRAME_PTR;
 
 /* Nonzero if this frame should display a tool bar
    in a way that does not use any text lines.  */
-#if defined (USE_GTK)
+#if defined (USE_GTK) || defined (MAC_OS)
 #define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar
 #else
 #define FRAME_EXTERNAL_TOOL_BAR(f) 0
@@ -747,18 +752,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
@@ -782,6 +780,8 @@ extern Lisp_Object Qframep, Qframe_live_p;
 extern Lisp_Object Qtty, Qtty_type;
 extern Lisp_Object Qterminal, Qterminal_live_p;
 extern Lisp_Object Qenvironment;
+extern Lisp_Object Qterm_environment_variable;
+extern Lisp_Object Qdisplay_environment_variable;
 
 extern struct frame *last_nonminibuf_frame;