summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-08-30 23:14:40 +0000
committerGerd Moellmann <gerd@gnu.org>1999-08-30 23:14:40 +0000
commit81fe0ce9f3a85c2e4800eeb5265d263d74a10463 (patch)
tree89d588f692f7e056dc1750fc15396fd599ef3706
parent110859fc3cf16f8805fc98e7f687a1fd62f0463a (diff)
downloademacs-81fe0ce9f3a85c2e4800eeb5265d263d74a10463.tar.gz
(FRAME_X_FLAGS_AREA_COLS): Define it as the total width
of both margins. (FRAME_X_FLAGS_AREA_WIDTH): Likewise. (FRAME_X_LEFT_FLAGS_AREA_WIDTH): New. (FRAME_X_RIGHT_FLAGS_AREA_WIDTH): New.
-rw-r--r--src/xterm.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 2ba12680a7a..39606492b08 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -630,19 +630,34 @@ struct x_output
#define FRAME_FLAGS_BITMAP_WIDTH(f) 8
#define FRAME_FLAGS_BITMAP_HEIGHT(f) 8
-/* Width of a single area reserved for drawing truncation bitmaps,
+/* Total width of a areas 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) \
- ((FRAME_FLAGS_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1) \
+#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_LEFT_FLAGS_AREA_WIDTH(F) \
+ (FRAME_X_FLAGS_AREA_WIDTH (F) / 2)
+
+/* 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_RIGHT_FLAGS_AREA_WIDTH(F) \
+ (FRAME_X_FLAGS_AREA_WIDTH (F) - FRAME_X_FLAGS_AREA_WIDTH (F) / 2)
+
+
/* X-specific scroll bar stuff. */