From d246e5586b4cbb5543a4c3d1579cae111513f16a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 1 Dec 2001 01:16:32 +0000 Subject: [PATCH] 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. --- src/xterm.h | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/src/xterm.h b/src/xterm.h index 791c6c8bf8e..5c8ec39627d 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -537,7 +537,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; @@ -661,38 +662,22 @@ struct x_output #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_LEFT_FRINGE_WIDTH(F) \ - (FRAME_X_FRINGE_WIDTH (F) / 2) +#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.x->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.x->left_fringe_width) +#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.x->right_fringe_width) @@ -981,6 +966,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)); -- 2.39.2