Merged fringe width related changes from xterm.h.
[bpt/emacs.git] / mac / inc / macterm.h
index 7df8a93..340be4e 100644 (file)
@@ -211,8 +211,11 @@ struct mac_display_info
 /* This is a chain of structures for all the displays currently in use.  */
 extern struct mac_display_info one_mac_display_info;
 
+/* This is a chain of structures for all the X displays currently in use.  */
+extern struct x_display_info *x_display_list;
+
 /* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
-   one for each element of w32_display_list and in the same order.
+   one for each element of x_display_list and in the same order.
    NAME is the name of the frame.
    FONT-LIST-CACHE records previous values returned by x-list-fonts.  */
 extern Lisp_Object x_display_name_list;
@@ -319,14 +322,14 @@ struct mac_output {
   Cursor nontext_cursor;
   Cursor modeline_cursor;
   Cursor cross_cursor;
-  Cursor busy_cursor;
+  Cursor hourglass_cursor;
 #if 0
-  /* Window whose cursor is busy_cursor.  This window is temporarily
-     mapped to display a busy-cursor.  */
-  Window busy_window;
+  /* Window whose cursor is hourglass_cursor.  This window is temporarily
+     mapped to display a hourglass-cursor.  */
+  Window hourglass_window;
   
-  /* Non-zero means busy cursor is currently displayed.  */
-  unsigned busy_p : 1;
+  /* Non-zero means hourglass cursor is currently displayed.  */
+  unsigned hourglass_p : 1;
 
   /* Flag to set when the window needs to be completely repainted.  */
   int needs_exposure;
@@ -355,7 +358,8 @@ struct mac_output {
   /* The extra width currently allotted for the areas in which
      truncation marks, continuation marks, and overlay arrows are
      displayed.  */
-  int flags_areas_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;
@@ -448,39 +452,22 @@ typedef struct mac_output mac_output;
 #define FRAME_X_IMAGE_CACHE(F) FRAME_MAC_DISPLAY_INFO ((F))->image_cache
 
 \f
-/* Pixel width of the bitmaps drawn to indicate truncation,
-   continuation etc.  */
-
-#define FRAME_FLAGS_BITMAP_WIDTH(f)    8
-#define FRAME_FLAGS_BITMAP_HEIGHT(f)   8
-
-/* Total width of areas reserved for drawing truncation bitmaps,
+/* 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_FLAGS_AREA_COLS(F)                             \
-     ((2 * FRAME_FLAGS_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1)    \
-      / CANON_X_UNIT ((F)))
-
-/* Total width of flags areas in pixels.  */
-
-#define FRAME_X_FLAGS_AREA_WIDTH(F) \
-     (FRAME_X_FLAGS_AREA_COLS ((F)) * CANON_X_UNIT ((F)))
-
-/* Pixel-width of the left flags area.  */
+#define FRAME_X_FRINGE_COLS(F) ((F)->output_data.mac->fringe_cols)
 
-#define FRAME_X_LEFT_FLAGS_AREA_WIDTH(F) \
-     (FRAME_X_FLAGS_AREA_WIDTH (F) / 2)
+/* Total width of fringes in pixels.  */
 
-/* Pixel-width of the right flags area.  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_FRINGE_WIDTH(F) ((F)->output_data.mac->fringes_extra)
 
-#define FRAME_X_RIGHT_FLAGS_AREA_WIDTH(F)      \
-     (FRAME_X_FLAGS_AREA_WIDTH (F) - FRAME_X_FLAGS_AREA_WIDTH (F) / 2)
+/* Pixel-width of the left and right fringe.  */
 
+#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.mac->left_fringe_width)
+#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.mac->right_fringe_width)
 
 \f
 /* Mac-specific scroll bar stuff.  */
@@ -629,7 +616,7 @@ struct scroll_bar {
 #define CHAR_TO_PIXEL_WIDTH(f, width) \
   (CHAR_TO_PIXEL_COL (f, width) \
    + (f)->output_data.mac->vertical_scroll_bar_extra \
-   + (f)->output_data.mac->flags_areas_extra \
+   + (f)->output_data.mac->fringes_extra \
    + (f)->output_data.mac->internal_border_width)
 #define CHAR_TO_PIXEL_HEIGHT(f, height) \
   (CHAR_TO_PIXEL_ROW (f, height) \
@@ -650,7 +637,7 @@ struct scroll_bar {
 #define PIXEL_TO_CHAR_WIDTH(f, width) \
   (PIXEL_TO_CHAR_COL (f, ((width) \
                          - (f)->output_data.mac->internal_border_width \
-                         - (f)->output_data.mac->flags_areas_extra \
+                         - (f)->output_data.mac->fringes_extra \
                          - (f)->output_data.mac->vertical_scroll_bar_extra)))
 #define PIXEL_TO_CHAR_HEIGHT(f, height) \
   (PIXEL_TO_CHAR_ROW (f, ((height) \