]> code.delx.au - gnu-emacs/blobdiff - src/frame.h
(mark_byte_stack): Use XMARKBIT and XMARK.
[gnu-emacs] / src / frame.h
index 27a5c9715f55d8b52f4c05666a1fd32d3f828426..498591106b43b066b883326ff87e8dde10dad2cb 100644 (file)
@@ -148,14 +148,14 @@ struct frame
      toolkit support is available.  */
   Lisp_Object menu_bar_window;
 
-  /* A window used to display the toolbar of a frame.  */
-  Lisp_Object toolbar_window;
+  /* A window used to display the tool-bar of a frame.  */
+  Lisp_Object tool_bar_window;
 
-  /* Desired and current toolbar items.  */
-  Lisp_Object desired_toolbar_items, current_toolbar_items;
+  /* Desired and current tool-bar items.  */
+  Lisp_Object desired_tool_bar_items, current_tool_bar_items;
 
-  /* Desired and current contents displayed in toolbar_window.  */
-  Lisp_Object desired_toolbar_string, current_toolbar_string;
+  /* Desired and current contents displayed in tool_bar_window.  */
+  Lisp_Object desired_tool_bar_string, current_tool_bar_string;
 
   /* beyond here, there should be no more Lisp_Object components.  */
 
@@ -176,11 +176,11 @@ struct frame
      be used for output.  */
   unsigned glyphs_initialized_p : 1;
 
-  /* Margin at the top of the frame.  Used to display the toolbar.  */
-  int toolbar_lines;
+  /* Margin at the top of the frame.  Used to display the tool-bar.  */
+  int tool_bar_lines;
 
-  int n_desired_toolbar_items;
-  int n_current_toolbar_items;
+  int n_desired_tool_bar_items;
+  int n_current_tool_bar_items;
   
   /* A buffer for decode_mode_line. */
   char *decode_mode_spec_buffer;
@@ -412,14 +412,14 @@ typedef struct frame *FRAME_PTR;
    These lines are counted in FRAME_HEIGHT.  */
 #define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
 
-/* Number of lines of frame F used for the toolbar.  */
+/* Number of lines of frame F used for the tool-bar.  */
 
-#define FRAME_TOOLBAR_LINES(f) (f)->toolbar_lines
+#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines
 
 /* Lines above the top-most window in frame F.  */
 
 #define FRAME_TOP_MARGIN(F) \
-     (FRAME_MENU_BAR_LINES (F) + FRAME_TOOLBAR_LINES (F))
+     (FRAME_MENU_BAR_LINES (F) + FRAME_TOOL_BAR_LINES (F))
 
 /* Nonzero if this frame should display a menu bar
    in a way that does not use any text lines.  */
@@ -581,19 +581,18 @@ typedef struct frame *FRAME_PTR;
    (f)->visible = (f)->async_visible, \
    (f)->iconified = (f)->async_iconified)
 
-#define CHECK_FRAME(x, i)                      \
-     if (! FRAMEP (x))                         \
-       x = wrong_type_argument (Qframep, (x)); \
-     else                                      \
-       (void) 0
+#define CHECK_FRAME(x, i)                              \
+     do {                                              \
+       if (! FRAMEP (x))                               \
+         x = wrong_type_argument (Qframep, (x));       \
+     } while (0)
 
 #define CHECK_LIVE_FRAME(x, i)                         \
-     if (! FRAMEP (x)                                  \
-        || ! FRAME_LIVE_P (XFRAME (x)))                \
-       x = wrong_type_argument (Qframe_live_p, (x));   \
-     else                                              \
-       (void) 0
-
+     do {                                              \
+       if (! FRAMEP (x)                                        \
+          || ! FRAME_LIVE_P (XFRAME (x)))              \
+         x = wrong_type_argument (Qframe_live_p, (x)); \
+     } while (0)
 
 /* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
    `for' loop which iterates over the elements of Vframe_list.  The
@@ -609,13 +608,12 @@ typedef struct frame *FRAME_PTR;
 #define FOR_EACH_FRAME(list_var, frame_var)                    \
   for ((list_var) = Vframe_list;                               \
        (CONSP (list_var)                                       \
-       && (frame_var = XCONS (list_var)->car, 1));             \
-       list_var = XCONS (list_var)->cdr)
+       && (frame_var = XCAR (list_var), 1));           \
+       list_var = XCDR (list_var))
 
 
 extern Lisp_Object Qframep, Qframe_live_p, Qicon;
 
-extern struct frame *selected_frame;
 extern struct frame *last_nonminibuf_frame;
 
 extern struct frame *make_terminal_frame P_ ((void));
@@ -655,6 +653,18 @@ extern Lisp_Object Vterminal_frame;
      
 #define WINDOW_VERTICAL_SCROLL_BAR_HEIGHT(w) (window_internal_height (w))
 
+/* The currently selected frame.  */
+
+extern Lisp_Object selected_frame;
+
+/* Value is a pointer to the selected frame.  If the selected frame
+   isn't life, abort.  */
+
+#define SELECTED_FRAME()                               \
+     ((FRAMEP (selected_frame)                         \
+       && FRAME_LIVE_P (XFRAME (selected_frame)))      \
+      ? XFRAME (selected_frame)                                \
+      : (struct frame *) (abort (), 0))
 
 \f
 /***********************************************************************
@@ -708,7 +718,7 @@ extern Lisp_Object Vterminal_frame;
 #define PIXEL_X_FROM_CANON_X(F, X)                     \
      (INTEGERP (X)                                     \
       ? XINT (X) * CANON_X_UNIT (F)                    \
-      : (int) (XFLOAT (X)->data * CANON_X_UNIT (F)))
+      : (int) (XFLOAT_DATA (X) * CANON_X_UNIT (F)))
       
 /* Convert canonical value Y to pixels.  F is the frame whose
    canonical character height is to be used.  X must be a Lisp integer
@@ -717,7 +727,7 @@ extern Lisp_Object Vterminal_frame;
 #define PIXEL_Y_FROM_CANON_Y(F, Y)                     \
      (INTEGERP (Y)                                     \
       ? XINT (Y) * CANON_Y_UNIT (F)                    \
-      : (int) (XFLOAT (Y)->data * CANON_Y_UNIT (F)))
+      : (int) (XFLOAT_DATA (Y) * CANON_Y_UNIT (F)))
 
 /* Convert pixel-value X to canonical units.  F is the frame whose
    canonical character width is to be used.  X is a C integer.  Result