]> code.delx.au - gnu-emacs/commitdiff
Merged fringe width related changes from xterm.h.
authorKim F. Storm <storm@cua.dk>
Sat, 1 Dec 2001 01:35:14 +0000 (01:35 +0000)
committerKim F. Storm <storm@cua.dk>
Sat, 1 Dec 2001 01:35:14 +0000 (01:35 +0000)
mac/inc/macterm.h
src/w32term.h

index f105dcab8cd391e5d6243312bf9c2fd7fce7c3d7..340be4e35f39a1bc5fdc02aab43a69262f2fd4fd 100644 (file)
@@ -358,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 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;
@@ -451,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 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.mac->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_LEFT_FRINGE_WIDTH(F) \
-     (FRAME_X_FRINGE_WIDTH (F) / 2)
-
-/* 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_FRINGE_WIDTH(F) ((F)->output_data.mac->fringes_extra)
 
-#define FRAME_X_RIGHT_FRINGE_WIDTH(F)  \
-     (FRAME_X_FRINGE_WIDTH (F) - FRAME_X_FRINGE_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.  */
index 99a32de6a976424bb1a1fe17827bad0c24a76eb2..661210781876a071e138752d98f607aab596145a 100644 (file)
@@ -385,7 +385,8 @@ struct w32_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;
@@ -468,39 +469,22 @@ extern struct w32_output w32term_display;
 #define FRAME_X_IMAGE_CACHE(F) FRAME_W32_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)                         \
-     ((F) == XFRAME (tip_frame) ? 0 :                   \
-      (2 * FRAME_FRINGE_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1)   \
-      / CANON_X_UNIT ((F)))
+#define FRAME_X_FRINGE_COLS(F) ((F)->output_data.w32->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_LEFT_FRINGE_WIDTH(F) \
-     (FRAME_X_FRINGE_WIDTH (F) / 2)
+#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.w32->fringes_extra)
 
-/* 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.  */
+/* Pixel-width of the left and right fringe.  */
 
-#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.w32->left_fringe_width)
+#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.w32->right_fringe_width)
 
 
 \f