changeset 41720:b4898b480ab0

struct x_output): Add left_fringe_width, right_fringe_width, and fringe_cols fields. (FRAME_FRINGE_BITMAP_WIDTH, FRAME_FRINGE_BITMAP_HEIGHT): Remove macros. (FRAME_X_FRINGE_COLS): Use fringe_cols field. (FRAME_X_FRINGE_WIDTH): Use fringes_extra field. (FRAME_X_LEFT_FRINGE_WIDTH): Use left_fringe_width field. (FRAME_X_RIGHT_FRINGE_WIDTH): Use right_fringe_width field. (x_compute_fringe_widths): Add prototype.
author Kim F. Storm <storm@cua.dk>
date Sat, 01 Dec 2001 01:16:32 +0000
parents 3734871037bb
children e0335ea68760
files src/xterm.h
diffstat 1 files changed, 8 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.h	Sat Dec 01 01:15:43 2001 +0000
+++ b/src/xterm.h	Sat Dec 01 01:16:32 2001 +0000
@@ -537,7 +537,8 @@
   /* 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;
@@ -661,38 +662,22 @@
 #define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache
 
 
-/* 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)
 
 
 
@@ -981,6 +966,7 @@
 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));