*** empty log message ***
[bpt/emacs.git] / src / xterm.h
index f9d3d7a..c1d69ca 100644 (file)
@@ -157,7 +157,7 @@ struct x_display_info
   /* The Visual being used for this display.  */
   Visual *visual;
 
-  /* THe colormap being used.  */
+  /* The colormap being used.  */
   Colormap cmap;
   
   /* Number of panes on this screen.  */
@@ -223,6 +223,9 @@ struct x_display_info
   /* Nonzero means defer mouse-motion highlighting.  */
   int mouse_face_defer;
 
+  /* Nonzero means that the mouse highlight should not be shown.  */
+  int mouse_face_hidden;
+
   int mouse_face_image_state;
 
   char *x_id_name;
@@ -537,7 +540,8 @@ struct x_output
   /* The extra width currently allotted for the areas in which
      truncation marks, continuation marks, and overlay arrows are
      displayed.  */
-  int fringes_extra;
+  int left_fringe_width, right_fringe_width;
+  int fringe_cols, fringes_extra;
 
   /* This is the gravity value for the specified window position.  */
   int win_gravity;
@@ -593,6 +597,37 @@ struct x_output
      arrive for an unknown reason and Emacs hangs in Xt.  If this is
      zero, tell Xt not to wait.  */
   int wait_for_wm;
+
+  /* See enum below */
+  int want_fullscreen;
+
+  /* This many pixels are the difference between the outer window (i.e. the
+     left of the window manager decoration) and FRAME_X_WINDOW. */
+  int x_pixels_diff;
+
+  /* This many pixels are the difference between the outer window (i.e. the
+     top of the window manager titlebar) and FRAME_X_WINDOW. */
+  int y_pixels_diff;
+
+  /* As x_pixels_diff, but to FRAME_OUTER_WINDOW.  For some reason the
+     two might differ by a pixel, depending on WM */
+  int x_pixels_outer_diff;
+  
+  /* As y_pixels_diff, but to FRAME_OUTER_WINDOW.  In the toolkit version,
+     these may differ because this does not take into account possible
+     menubar.  y_pixels_diff is with menubar height included */
+  int y_pixels_outer_diff;
+};
+
+enum
+{
+  /* 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_MOVE_WAIT  = 8,
 };
 
 /* Return the X window used for displaying data in frame F.  */
@@ -600,7 +635,9 @@ struct x_output
 
 /* Return the outermost X window associated with the frame F.  */
 #ifdef USE_X_TOOLKIT
-#define FRAME_OUTER_WINDOW(f) (XtWindow ((f)->output_data.x->widget))
+#define FRAME_OUTER_WINDOW(f) ((f)->output_data.x->widget ?             \
+                               XtWindow ((f)->output_data.x->widget) :  \
+                               FRAME_X_WINDOW (f))
 #else
 #define FRAME_OUTER_WINDOW(f) (FRAME_X_WINDOW (f))
 #endif
@@ -661,38 +698,22 @@ struct x_output
 #define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache
 
 \f
-/* Pixel width of the fringe bitmaps drawn to indicate truncation,
-   continuation etc.  */
-
-#define FRAME_FRINGE_BITMAP_WIDTH(f)   8
-#define FRAME_FRINGE_BITMAP_HEIGHT(f)  8
-
 /* Total width of fringes reserved for drawing truncation bitmaps,
    continuation bitmaps and alike.  The width is in canonical char
    units of the frame.  This must currently be the case because window
    sizes aren't pixel values.  If it weren't the case, we wouldn't be
    able to split windows horizontally nicely.  */
 
-#define FRAME_X_FRINGE_COLS(F)                                 \
-     ((2 * FRAME_FRINGE_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1)   \
-      / CANON_X_UNIT ((F)))
+#define FRAME_X_FRINGE_COLS(F) ((F)->output_data.x->fringe_cols)
 
 /* Total width of fringes in pixels.  */
 
-#define FRAME_X_FRINGE_WIDTH(F) \
-     (FRAME_X_FRINGE_COLS ((F)) * CANON_X_UNIT ((F)))
-
-/* Pixel-width of the left fringe.  */
+#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.x->fringes_extra)
 
-#define FRAME_X_LEFT_FRINGE_WIDTH(F) \
-     (FRAME_X_FRINGE_WIDTH (F) / 2)
+/* Pixel-width of the left and right fringe.  */
 
-/* Pixel-width of the right fringe.  Note that we are doing
-   integer arithmetic here, so don't loose a pixel if the total
-   width is an odd number.  */
-
-#define FRAME_X_RIGHT_FRINGE_WIDTH(F)  \
-     (FRAME_X_FRINGE_WIDTH (F) - FRAME_X_FRINGE_WIDTH (F) / 2)
+#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.x->left_fringe_width)
+#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.x->right_fringe_width)
 
 
 \f
@@ -981,6 +1002,7 @@ extern int x_had_errors_p P_ ((Display *));
 extern void x_uncatch_errors P_ ((Display *, int));
 extern Lisp_Object x_new_font P_ ((struct frame *, char *));
 extern Lisp_Object x_new_fontset P_ ((struct frame *, char *));
+extern void x_compute_fringe_widths P_ ((struct frame *, int));
 extern void x_set_offset P_ ((struct frame *, int, int, int));
 extern void x_set_window_size P_ ((struct frame *, int, int, int));
 extern void x_set_mouse_position P_ ((struct frame *, int, int));
@@ -999,7 +1021,6 @@ extern void x_wm_set_icon_position P_ ((struct frame *, int, int));
 extern void x_delete_display P_ ((struct x_display_info *));
 extern void x_initialize P_ ((void));
 extern void x_display_cursor P_ ((struct window *, int, int, int, int, int));
-extern void x_update_cursor P_ ((struct frame *, int));
 extern unsigned long x_copy_color P_ ((struct frame *, unsigned long));
 #ifdef USE_X_TOOLKIT
 extern XtAppContext Xt_app_con;
@@ -1008,6 +1029,10 @@ extern void x_query_colors P_ ((struct frame *f, XColor *, int));
 extern void x_query_color P_ ((struct frame *f, XColor *));
 extern void x_clear_area P_ ((Display *, Window, int, int, int, int, int));
 
+extern void x_fullscreen_adjust P_ ((struct frame *f, int *, int *,
+                                     int *, int *));
+
+
 /* Defined in xselect.c */
 
 extern void x_handle_property_notify P_ ((XPropertyEvent *));
@@ -1033,7 +1058,7 @@ extern void x_report_frame_params P_ ((struct frame *, Lisp_Object *));
 extern int defined_color P_ ((struct frame *, char *, XColor *, int));
 extern void x_set_border_pixel P_ ((struct frame *, int));
 extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern unsigned char * x_encode_text P_ ((Lisp_Object, Lisp_Object,
+extern unsigned char * x_encode_text P_ ((Lisp_Object, Lisp_Object, int,
                                          int *, int *));
 extern void x_implicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
 extern void create_frame_xic P_ ((struct frame *));