]> code.delx.au - gnu-emacs/blobdiff - src/frame.h
(have_menus_p): Renamed from using_x_p.
[gnu-emacs] / src / frame.h
index 1de00dde65dd99e21ac3114a75b55c26cac3d834..cfb42dad720ad02c7a8cb4c221ab6e5436e5373e 100644 (file)
@@ -37,7 +37,7 @@ extern int message_buf_print;
    having miscellaneous random variables scattered about.  */
 
 enum output_method
-{ output_termcap, output_x_window, output_msdos_raw };
+{ output_termcap, output_x_window, output_msdos_raw, output_win32 };
 
 struct frame
 {
@@ -48,9 +48,14 @@ struct frame
      Only EMACS_INT values can be intermixed with them.
      That ensures they are all aligned normally.  */
 
-  /* Name of this frame: a Lisp string.  See also `explicit_name'.  */
+  /* Name of this frame: a Lisp string.  See also `explicit_name'
+     and `namebuf'.  */
   Lisp_Object name;
 
+  /* The name to use for the icon, the last time
+     it was refreshed.  nil means not explicitly specified.  */
+  Lisp_Object icon_name;
+
   /* The frame which should receive keystrokes that occur in this
      frame, or nil if they should go to the frame itself.  This is
      usually nil, but if the frame is minibufferless, we can use this
@@ -117,6 +122,10 @@ struct frame
   /* Beyond here, there should be no more Lisp_Object components.  */
 
 
+  /* A buffer to hold the frame's name.  We can't use the Lisp string's
+     pointer (`name', above) because it might get relocated.  */
+  char *namebuf;
+
   /* glyphs as they appear on the frame */
   struct frame_glyphs *current_glyphs;
 
@@ -162,21 +171,23 @@ struct frame
   enum output_method output_method;
 
   /* A structure of auxiliary data used for displaying the contents.
-     struct x_display is used for X window frames;
-     it is defined in xterm.h.  */
-  union display { struct x_display *x; int nothing; } display;
+     struct x_output is used for X window frames;
+     it is defined in xterm.h.  
+     struct win32_output is used for Win32 window frames;
+     it is defined in w32term.h.  */
+  union output_data { struct x_output *x; struct win32_output *win32; int nothing; } output_data;
 
 #ifdef MULTI_KBOARD
   /* A pointer to the kboard structure associated with this frame.
      For termcap frames, this points to initial_kboard.  For X frames,
      it will be the same as display.x->display_info->kboard.  */
-  KBOARD *kboard;
+  struct kboard *kboard;
 #endif
 
   /* Number of lines of menu bar.  */
   int menu_bar_lines;
 
-#ifdef USE_X_TOOLKIT
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
   /* Nonzero means using a menu bar that comes from the X toolkit.  */
   int external_menu_bar;
 #endif
@@ -270,6 +281,10 @@ struct frame
 
   /* The baud rate that was used to calculate costs for this frame.  */
   int cost_calculation_baud_rate;
+
+  /* Nonzero if the mouse has moved on this display
+     since the last time we checked.  */
+  char mouse_moved;
 };
 
 #ifdef MULTI_KBOARD  /* Note that MULTI_KBOARD implies MULTI_FRAME */
@@ -287,9 +302,23 @@ typedef struct frame *FRAME_PTR;
 
 #define WINDOW_FRAME(w) (w)->frame
 
-#define FRAME_LIVE_P(f) ((f)->display.nothing != 0)
-#define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap)
 #define FRAME_X_P(f) ((f)->output_method == output_x_window)
+#define FRAME_WIN32_P(f) ((f)->output_method == output_win32)
+
+/* FRAME_WINDOW_P tests whether the frame is a window, and is
+   defined to be the predicate for the window system being used.  */
+#ifdef HAVE_X_WINDOWS
+#define FRAME_WINDOW_P(f) FRAME_X_P (f)
+#endif
+#ifdef HAVE_NTGUI
+#define FRAME_WINDOW_P(f) FRAME_WIN32_P (f)
+#endif
+#ifndef FRAME_WINDOW_P
+#define FRAME_WINDOW_P(f) (0)
+#endif
+
+#define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0)
+#define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap)
 #define FRAME_MINIBUF_ONLY_P(f) \
   EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f))
 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer)
@@ -301,7 +330,7 @@ typedef struct frame *FRAME_PTR;
 #define FRAME_NEW_HEIGHT(f) (f)->new_height
 #define FRAME_NEW_WIDTH(f) (f)->new_width
 #define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
-#ifdef USE_X_TOOLKIT
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
 #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
 #else
 #define FRAME_EXTERNAL_MENU_BAR(f) 0
@@ -442,6 +471,7 @@ extern FRAME_PTR last_nonminibuf_frame;
 #define FRAME_TERMCAP_P(f) 1
 #define FRAME_X_P(f) 0
 #endif
+#define FRAME_WINDOW_P(f) FRAME_X_P (f)
 #define FRAME_MINIBUF_ONLY_P(f) 0
 #define FRAME_HAS_MINIBUF_P(f) 1
 #define FRAME_CURRENT_GLYPHS(f) (the_only_frame.current_glyphs)