]> code.delx.au - gnu-emacs/blobdiff - src/frame.h
font.c (font_parse_xlfd): If FONT is a font-entity and pixel size in NAME is invalid...
[gnu-emacs] / src / frame.h
index d070feeaef8b11c7bc1e1fc6dbf945d7e896c9ba..58c59954f15609b38fb15ff141478167c5585276 100644 (file)
@@ -1,6 +1,6 @@
 /* Define frame-object for GNU Emacs.
    Copyright (C) 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+                 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -75,12 +75,12 @@ enum text_cursor_kinds
 
 enum fullscreen_type
 {
-  /* Values used as a bit mask, BOTH == WIDTH | HEIGHT.  */
-  FULLSCREEN_NONE       = 0,
-  FULLSCREEN_WIDTH      = 1,
-  FULLSCREEN_HEIGHT     = 2,
-  FULLSCREEN_BOTH       = 3,
-  FULLSCREEN_WAIT       = 4
+  FULLSCREEN_NONE,
+  FULLSCREEN_WIDTH     = 0x001,
+  FULLSCREEN_HEIGHT    = 0x002,
+  FULLSCREEN_BOTH      = 0x003,
+  FULLSCREEN_MAXIMIZED = 0x013,
+  FULLSCREEN_WAIT      = 0x100
 };
 
 
@@ -216,11 +216,6 @@ struct frame
      be used for output.  */
   unsigned glyphs_initialized_p : 1;
 
-  /* frame opacity
-     alpha[0]: alpha transparency of the active frame
-     alpha[1]: alpha transparency of inactive frames   */
-  double alpha[2];
-
   /* Set to non-zero in change_frame_size when size of frame changed
      Clear the frame in clear_garbaged_frames if set.  */
   unsigned resized_p : 1;
@@ -245,7 +240,7 @@ struct frame
      auto-resize-tool-bar is set to grow-only.  */
   unsigned minimize_tool_bar_window_p : 1;
 
-#if defined (USE_GTK) || defined (HAVE_NS) || defined (MAC_OS)
+#if defined (USE_GTK) || defined (HAVE_NS)
   /* Nonzero means using a tool bar that comes from the toolkit.  */
   int external_tool_bar;
 #endif
@@ -334,7 +329,6 @@ struct frame
     struct tty_output *tty;     /* termchar.h */
     struct x_output *x;         /* xterm.h */
     struct w32_output *w32;     /* w32term.h */
-    struct mac_output *mac;     /* macterm.h */
     struct ns_output *ns;       /* nsterm.h */
     EMACS_INT nothing;
   }
@@ -362,7 +356,7 @@ struct frame
   /* Number of lines of menu bar.  */
   int menu_bar_lines;
 
-#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
     || defined (HAVE_NS) || defined (USE_GTK)
   /* Nonzero means using a menu bar that comes from the X toolkit.  */
   unsigned int external_menu_bar : 1;
@@ -446,6 +440,9 @@ struct frame
      since the last time we checked.  */
   unsigned char mouse_moved :1;
 
+  /* Nonzero means that the pointer is invisible. */
+  unsigned char pointer_invisible :1;
+
   /* If can_have_scroll_bars is non-zero, this is non-zero if we should
      actually display them on this frame.  */
   enum vertical_scroll_bar_type vertical_scroll_bar_type;
@@ -486,6 +483,12 @@ struct frame
   /* The baud rate that was used to calculate costs for this frame.  */
   int cost_calculation_baud_rate;
 
+  /* frame opacity
+     alpha[0]: alpha transparency of the active frame
+     alpha[1]: alpha transparency of inactive frames
+     Negative values mean not to change alpha.  */
+  double alpha[2];
+
   /* Exponent for gamma correction of colors.  1/(VIEWING_GAMMA *
      SCREEN_GAMMA) where viewing_gamma is 0.4545 and SCREEN_GAMMA is a
      frame parameter.  0 means don't do gamma correction.  */
@@ -499,11 +502,7 @@ struct frame
   unsigned long foreground_pixel;
 };
 
-#ifdef MULTI_KBOARD
 #define FRAME_KBOARD(f) ((f)->terminal->kboard)
-#else
-#define FRAME_KBOARD(f) (&the_only_kboard)
-#endif
 
 /* Return a pointer to the image cache of frame F.  */
 #define FRAME_IMAGE_CACHE(F) ((F)->terminal->image_cache)
@@ -534,9 +533,6 @@ typedef struct frame *FRAME_PTR;
 #ifdef HAVE_NTGUI
 #define FRAME_WINDOW_P(f) FRAME_W32_P (f)
 #endif
-#ifdef MAC_OS
-#define FRAME_WINDOW_P(f) FRAME_MAC_P (f)
-#endif
 #ifdef HAVE_NS
 #define FRAME_WINDOW_P(f) FRAME_NS_P(f)
 #endif
@@ -578,7 +574,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) || defined (HAVE_NS) || defined (MAC_OS)
+#if defined (USE_GTK) || defined (HAVE_NS)
 #define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar
 #else
 #define FRAME_EXTERNAL_TOOL_BAR(f) 0
@@ -594,9 +590,14 @@ typedef struct frame *FRAME_PTR;
 #define FRAME_TOP_MARGIN(F) \
      (FRAME_MENU_BAR_LINES (F) + FRAME_TOOL_BAR_LINES (F))
 
+/* Pixel height of the top margin above.  */
+
+#define FRAME_TOP_MARGIN_HEIGHT(f) \
+  (FRAME_TOP_MARGIN (f) * FRAME_LINE_HEIGHT (f))
+
 /* Nonzero if this frame should display a menu bar
    in a way that does not use any text lines.  */
-#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
      || defined (HAVE_NS) || defined (USE_GTK)
 #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
 #else
@@ -837,6 +838,9 @@ extern struct frame *make_frame_without_minibuffer P_ ((Lisp_Object,
                                                        Lisp_Object));
 #endif /* HAVE_WINDOW_SYSTEM */
 extern int other_visible_frames P_ ((struct frame *));
+extern void frame_make_pointer_invisible P_ ((void));
+extern void frame_make_pointer_visible P_ ((void));
+extern Lisp_Object delete_frame P_ ((Lisp_Object, Lisp_Object));
 
 extern Lisp_Object Vframe_list;
 extern Lisp_Object Vdefault_frame_alist;
@@ -976,7 +980,7 @@ extern Lisp_Object selected_frame;
    at ROW/COL.  */
 
 #define FRAME_LINE_TO_PIXEL_Y(f, row) \
-  (FRAME_INTERNAL_BORDER_WIDTH (f)  \
+  ((row < FRAME_TOP_MARGIN (f) ? 0 : FRAME_INTERNAL_BORDER_WIDTH (f))  \
    + (row) * FRAME_LINE_HEIGHT (f))
 
 #define FRAME_COL_TO_PIXEL_X(f, col) \
@@ -1001,7 +1005,13 @@ extern Lisp_Object selected_frame;
    the pixel on FRAME at Y/X.  */
 
 #define FRAME_PIXEL_Y_TO_LINE(f, y) \
-  (((y) - FRAME_INTERNAL_BORDER_WIDTH (f))     \
+  (((y) < FRAME_TOP_MARGIN_HEIGHT (f)  \
+    ? (y)      \
+    : ((y) < FRAME_TOP_MARGIN_HEIGHT (f) + FRAME_INTERNAL_BORDER_WIDTH (f) \
+       ? (y) - (FRAME_TOP_MARGIN_HEIGHT (f) + FRAME_INTERNAL_BORDER_WIDTH (f) \
+               /* Arrange for the division to round down.  */  \
+               + FRAME_LINE_HEIGHT (f) - 1)    \
+       : (y) - FRAME_INTERNAL_BORDER_WIDTH (f)))       \
    / FRAME_LINE_HEIGHT (f))
 
 #define FRAME_PIXEL_X_TO_COL(f, x) \
@@ -1045,6 +1055,8 @@ extern Lisp_Object Qscreen_gamma;
 extern Lisp_Object Qline_spacing;
 extern Lisp_Object Qwait_for_wm;
 extern Lisp_Object Qfullscreen;
+extern Lisp_Object Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
+extern Lisp_Object Qsticky;
 extern Lisp_Object Qfont_backend;
 extern Lisp_Object Qalpha;
 
@@ -1115,14 +1127,13 @@ extern Lisp_Object Vframe_alpha_lower_limit;
 extern void x_set_alpha P_ ((struct frame *, Lisp_Object, Lisp_Object));
 
 extern void validate_x_resource_name P_ ((void));
-
+                                           
 extern Lisp_Object display_x_get_resource (Display_Info *,
                                           Lisp_Object attribute,
                                           Lisp_Object class,
                                           Lisp_Object component,
                                           Lisp_Object subclass);
 
-
 #endif /* HAVE_WINDOW_SYSTEM */
 
 #endif /* not EMACS_FRAME_H */