Commit 3f332ef3 authored by Kim F. Storm's avatar Kim F. Storm

Fringe cleanup.

Comment fixes. Use renamed symbols.
(fringe_bitmap_type): Renamed from bitmap_type.
(NO_FRINGE_BITMAP): Renamed from NO_BITMAP.
(x_draw_fringe_bitmap): Renamed from x_draw_bitmap.
(x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps.
parent f76e1b5f
......@@ -112,11 +112,11 @@ Boston, MA 02111-1307, USA. */
#define BETWEEN(X, LOWER, UPPER) ((X) >= (LOWER) && (X) < (UPPER))
/* Bitmaps for truncated lines. */
/* Fringe bitmaps. */
enum bitmap_type
enum fringe_bitmap_type
{
NO_BITMAP,
NO_FRINGE_BITMAP,
LEFT_TRUNCATION_BITMAP,
RIGHT_TRUNCATION_BITMAP,
OVERLAY_ARROW_BITMAP,
......@@ -430,13 +430,13 @@ static void x_update_cursor_in_window_tree P_ ((struct window *, int));
static void x_update_window_cursor P_ ((struct window *, int));
static void x_erase_phys_cursor P_ ((struct window *));
void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int));
static void x_draw_bitmap P_ ((struct window *, struct glyph_row *,
enum bitmap_type));
static void x_draw_fringe_bitmap P_ ((struct window *, struct glyph_row *,
enum fringe_bitmap_type));
static void x_clip_to_row P_ ((struct window *, struct glyph_row *,
GC, int));
static int x_phys_cursor_in_rect_p P_ ((struct window *, Rect *));
static void x_draw_row_bitmaps P_ ((struct window *, struct glyph_row *));
static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
static void note_overwritten_text_cursor P_ ((struct window *, int, int));
static void x_flush P_ ((struct frame *f));
static void x_update_begin P_ ((struct frame *));
......@@ -1154,7 +1154,7 @@ x_draw_vertical_border (w)
int x0, x1, y0, y1;
window_box_edges (w, -1, &x0, &y0, &x1, &y1);
x1 += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f);
x1 += FRAME_X_RIGHT_FRINGE_WIDTH (f);
y1 -= 1;
XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
......@@ -1260,7 +1260,7 @@ XTframe_up_to_date (f)
/* Draw truncation mark bitmaps, continuation mark bitmaps, overlay
arrow bitmaps, or clear the areas where they would be displayed
arrow bitmaps, or clear the fringes if no bitmaps are required
before DESIRED_ROW is made current. The window being updated is
found in updated_window. This function It is called from
update_window_line only if it is known that there are differences
......@@ -1277,7 +1277,7 @@ x_after_update_window_line (desired_row)
if (!desired_row->mode_line_p && !w->pseudo_window_p)
{
BLOCK_INPUT;
x_draw_row_bitmaps (w, desired_row);
x_draw_row_fringe_bitmaps (w, desired_row);
/* When a window has disappeared, make sure that no rest of
full-width rows stays visible in the internal border. */
......@@ -1287,7 +1287,7 @@ x_after_update_window_line (desired_row)
int width = FRAME_INTERNAL_BORDER_WIDTH (f);
int height = desired_row->visible_height;
int x = (window_box_right (w, -1)
+ FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f));
+ FRAME_X_RIGHT_FRINGE_WIDTH (f));
int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
......@@ -1299,16 +1299,16 @@ x_after_update_window_line (desired_row)
}
/* Draw the bitmap WHICH in one of the areas to the left or right of
/* Draw the bitmap WHICH in one of the left or right fringes of
window W. ROW is the glyph row for which to display the bitmap; it
determines the vertical position at which the bitmap has to be
drawn. */
static void
x_draw_bitmap (w, row, which)
x_draw_fringe_bitmap (w, row, which)
struct window *w;
struct glyph_row *row;
enum bitmap_type which;
enum fringe_bitmap_type which;
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
Display *display = FRAME_MAC_DISPLAY (f);
......@@ -1330,7 +1330,7 @@ x_draw_bitmap (w, row, which)
bits = left_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
case OVERLAY_ARROW_BITMAP:
......@@ -1339,7 +1339,7 @@ x_draw_bitmap (w, row, which)
bits = ov_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
case RIGHT_TRUNCATION_BITMAP:
......@@ -1347,7 +1347,7 @@ x_draw_bitmap (w, row, which)
h = right_height;
bits = right_bits;
x = window_box_right (w, -1);
x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2;
x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2;
break;
case CONTINUED_LINE_BITMAP:
......@@ -1355,7 +1355,7 @@ x_draw_bitmap (w, row, which)
h = right_height;
bits = continued_bits;
x = window_box_right (w, -1);
x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2;
x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2;
break;
case CONTINUATION_LINE_BITMAP:
......@@ -1364,7 +1364,7 @@ x_draw_bitmap (w, row, which)
bits = continuation_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
case ZV_LINE_BITMAP:
......@@ -1373,7 +1373,7 @@ x_draw_bitmap (w, row, which)
bits = zv_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
default:
......@@ -1387,7 +1387,7 @@ x_draw_bitmap (w, row, which)
/* Draw the bitmap. I believe these small pixmaps can be cached
by the server. */
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
face = FACE_FROM_ID (f, FRINGE_FACE_ID);
mac_create_bitmap_from_bitmap_data (&bitmap, bits, wd, h);
gcv.foreground = face->foreground;
......@@ -1400,16 +1400,16 @@ x_draw_bitmap (w, row, which)
}
/* Draw flags bitmaps for glyph row ROW on window W. Call this
/* Draw fringe bitmaps for glyph row ROW on window W. Call this
function with input blocked. */
static void
x_draw_row_bitmaps (w, row)
x_draw_row_fringe_bitmaps (w, row)
struct window *w;
struct glyph_row *row;
{
struct frame *f = XFRAME (w->frame);
enum bitmap_type bitmap;
enum fringe_bitmap_type bitmap;
struct face *face;
int header_line_height = -1;
......@@ -1420,10 +1420,10 @@ x_draw_row_bitmaps (w, row)
if (row->visible_height <= 0)
return;
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
face = FACE_FROM_ID (f, FRINGE_FACE_ID);
PREPARE_FACE_FOR_DISPLAY (f, face);
/* Decide which bitmap to draw at the left side. */
/* Decide which bitmap to draw in the left fringe. */
if (row->overlay_arrow_p)
bitmap = OVERLAY_ARROW_BITMAP;
else if (row->truncated_on_left_p)
......@@ -1433,13 +1433,13 @@ x_draw_row_bitmaps (w, row)
else if (row->indicate_empty_line_p)
bitmap = ZV_LINE_BITMAP;
else
bitmap = NO_BITMAP;
bitmap = NO_FRINGE_BITMAP;
/* Clear flags area if no bitmap to draw or if bitmap doesn't fill
the flags area. */
if (bitmap == NO_BITMAP
|| FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
|| row->height > FRAME_FLAGS_BITMAP_HEIGHT (f))
/* Clear left fringe if no bitmap to draw or if bitmap doesn't fill
the fringe. */
if (bitmap == NO_FRINGE_BITMAP
|| FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_LEFT_FRINGE_WIDTH (f)
|| row->height > FRAME_FRINGE_BITMAP_HEIGHT (f))
{
/* If W has a vertical border to its left, don't draw over it. */
int border = ((XFASTINT (w->left) > 0
......@@ -1451,7 +1451,7 @@ x_draw_row_bitmaps (w, row)
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
#if 0 /* MAC_TODO: stipple */
/* In case the same realized face is used for bitmap areas and
/* In case the same realized face is used for fringes and
for something displayed in the text (e.g. face `region' on
mono-displays, the fill style may have been changed to
FillSolid in x_draw_glyph_string_background. */
......@@ -1463,11 +1463,11 @@ x_draw_row_bitmaps (w, row)
XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
face->gc,
(left
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
- FRAME_X_LEFT_FRINGE_WIDTH (f)
+ border),
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border,
FRAME_X_LEFT_FRINGE_WIDTH (f) - border,
row->visible_height);
if (!face->stipple)
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground);
......@@ -1478,33 +1478,33 @@ x_draw_row_bitmaps (w, row)
XFillRectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
&gcv,
(left
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
- FRAME_X_LEFT_FRINGE_WIDTH (f)
+ border),
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border,
FRAME_X_LEFT_FRINGE_WIDTH (f) - border,
row->visible_height);
}
}
/* Draw the left bitmap. */
if (bitmap != NO_BITMAP)
x_draw_bitmap (w, row, bitmap);
if (bitmap != NO_FRINGE_BITMAP)
x_draw_fringe_bitmap (w, row, bitmap);
/* Decide which bitmap to draw at the right side. */
/* Decide which bitmap to draw in the right fringe. */
if (row->truncated_on_right_p)
bitmap = RIGHT_TRUNCATION_BITMAP;
else if (row->continued_p)
bitmap = CONTINUED_LINE_BITMAP;
else
bitmap = NO_BITMAP;
bitmap = NO_FRINGE_BITMAP;
/* Clear flags area if no bitmap to draw of if bitmap doesn't fill
the flags area. */
if (bitmap == NO_BITMAP
|| FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f)
|| row->height > FRAME_FLAGS_BITMAP_HEIGHT (f))
/* Clear right fringe if no bitmap to draw of if bitmap doesn't fill
the fringe. */
if (bitmap == NO_FRINGE_BITMAP
|| FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FRINGE_WIDTH (f)
|| row->height > FRAME_FRINGE_BITMAP_HEIGHT (f))
{
int right = window_box_right (w, -1);
......@@ -1512,7 +1512,7 @@ x_draw_row_bitmaps (w, row)
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
#if 0 /* MAC_TODO: stipple */
/* In case the same realized face is used for bitmap areas and
/* In case the same realized face is used for fringes and
for something displayed in the text (e.g. face `region' on
mono-displays, the fill style may have been changed to
FillSolid in x_draw_glyph_string_background. */
......@@ -1525,7 +1525,7 @@ x_draw_row_bitmaps (w, row)
right,
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f),
FRAME_X_RIGHT_FRINGE_WIDTH (f),
row->visible_height);
if (!face->stipple)
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground);
......@@ -1538,15 +1538,15 @@ x_draw_row_bitmaps (w, row)
right,
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f),
FRAME_X_RIGHT_FRINGE_WIDTH (f),
row->visible_height);
}
}
/* Draw the right bitmap. */
if (bitmap != NO_BITMAP)
x_draw_bitmap (w, row, bitmap);
if (bitmap != NO_FRINGE_BITMAP)
x_draw_fringe_bitmap (w, row, bitmap);
}
......@@ -4143,7 +4143,7 @@ x_draw_glyph_string_box (s)
if (s->row->full_width_p
&& !s->w->pseudo_window_p)
{
last_x += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (s->f);
last_x += FRAME_X_RIGHT_FRINGE_WIDTH (s->f);
if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (s->f))
last_x += FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f);
}
......@@ -5193,9 +5193,9 @@ x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
if (row->full_width_p)
{
/* X is relative to the left edge of W, without scroll bars
or flag areas. */
or fringes. */
struct frame *f = XFRAME (w->frame);
/* int width = FRAME_FLAGS_AREA_WIDTH (f); */
/* int width = FRAME_FRINGE_WIDTH (f); */
int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f);
x += window_left_x;
......@@ -5750,11 +5750,11 @@ x_scroll_run (w, run)
int x, y, width, height, from_y, to_y, bottom_y;
/* Get frame-relative bounding box of the text display area of W,
without mode lines. Include in this box the flags areas to the
left and right of W. */
without mode lines. Include in this box the left and right
fringes of W. */
window_box (w, -1, &x, &y, &width, &height);
width += FRAME_X_FLAGS_AREA_WIDTH (f);
x -= FRAME_X_LEFT_FLAGS_AREA_WIDTH (f);
width += FRAME_X_FRINGE_WIDTH (f);
x -= FRAME_X_LEFT_FRINGE_WIDTH (f);
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
......@@ -5922,12 +5922,12 @@ expose_window_tree (w, r)
&window_height);
window_rect.left
= (window_x
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
- FRAME_X_LEFT_FRINGE_WIDTH (f)
- FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_Y_UNIT (f));
window_rect.top = window_y;
window_rect.right = window_rect.left
+ (window_width
+ FRAME_X_FLAGS_AREA_WIDTH (f)
+ FRAME_X_FRINGE_WIDTH (f)
+ FRAME_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f));
window_rect.bottom = window_rect.top
+ window_height + CURRENT_MODE_LINE_HEIGHT (w);
......@@ -6028,7 +6028,7 @@ expose_line (w, row, r)
expose_area (w, row, r, TEXT_AREA);
if (row->used[RIGHT_MARGIN_AREA])
expose_area (w, row, r, RIGHT_MARGIN_AREA);
x_draw_row_bitmaps (w, row);
x_draw_row_fringe_bitmaps (w, row);
}
}
......@@ -6752,7 +6752,7 @@ frame_to_window_pixel_xy (w, x, y)
/* Take proper action when mouse has moved to the mode or top line of
window W, x-position X. MODE_LINE_P non-zero means mouse is on the
mode line. X is relative to the start of the text display area of
W, so the width of bitmap areas and scroll bars must be subtracted
W, so the width of fringes and scroll bars must be subtracted
to get a position relative to the start of the mode line. */
static void
......@@ -6780,7 +6780,7 @@ note_mode_line_highlight (w, x, mode_line_p)
glyph = row->glyphs[TEXT_AREA];
end = glyph + row->used[TEXT_AREA];
x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)
+ FRAME_X_LEFT_FLAGS_AREA_WIDTH (f));
+ FRAME_X_LEFT_FRINGE_WIDTH (f));
while (glyph < end
&& x >= x0 + glyph->pixel_width)
{
......@@ -8281,8 +8281,8 @@ x_clip_to_row (w, row, gc, whole_line_p)
the rectangle to the left and increase its width. */
if (whole_line_p)
{
clip_rect.left -= FRAME_X_LEFT_FLAGS_AREA_WIDTH (f);
clip_rect.right += FRAME_X_FLAGS_AREA_WIDTH (f);
clip_rect.left -= FRAME_X_LEFT_FRINGE_WIDTH (f);
clip_rect.right += FRAME_X_FRINGE_WIDTH (f);
}
mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), &clip_rect);
......@@ -9514,8 +9514,8 @@ x_set_window_size (f, change_gravity, cols, rows)
: FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
: (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font)));
f->output_data.mac->flags_areas_extra
= FRAME_FLAGS_AREA_WIDTH (f);
f->output_data.mac->fringes_extra
= FRAME_FRINGE_WIDTH (f);
pixelwidth = CHAR_TO_PIXEL_WIDTH (f, cols);
pixelheight = CHAR_TO_PIXEL_HEIGHT (f, rows);
......
......@@ -155,11 +155,11 @@ extern void _XEditResCheckMessages ();
#define BETWEEN(X, LOWER, UPPER) ((X) >= (LOWER) && (X) < (UPPER))
/* Bitmaps for truncated lines. */
/* Fringe bitmaps. */
enum bitmap_type
enum fringe_bitmap_type
{
NO_BITMAP,
NO_FRINGE_BITMAP,
LEFT_TRUNCATION_BITMAP,
RIGHT_TRUNCATION_BITMAP,
OVERLAY_ARROW_BITMAP,
......@@ -463,13 +463,13 @@ static void x_update_cursor_in_window_tree P_ ((struct window *, int));
static void x_update_window_cursor P_ ((struct window *, int));
static void x_erase_phys_cursor P_ ((struct window *));
void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int));
static void x_draw_bitmap P_ ((struct window *, struct glyph_row *,
enum bitmap_type));
static void x_draw_fringe_bitmap P_ ((struct window *, struct glyph_row *,
enum fringe_bitmap_type));
static void x_clip_to_row P_ ((struct window *, struct glyph_row *,
GC, int));
static int x_phys_cursor_in_rect_p P_ ((struct window *, XRectangle *));
static void x_draw_row_bitmaps P_ ((struct window *, struct glyph_row *));
static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
static void notice_overwritten_cursor P_ ((struct window *, int, int));
static void x_flush P_ ((struct frame *f));
static void x_update_begin P_ ((struct frame *));
......@@ -659,7 +659,7 @@ x_draw_vertical_border (w)
int x0, x1, y0, y1;
window_box_edges (w, -1, &x0, &y0, &x1, &y1);
x1 += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f);
x1 += FRAME_X_RIGHT_FRINGE_WIDTH (f);
y1 -= 1;
XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
......@@ -758,7 +758,7 @@ XTframe_up_to_date (f)
/* Draw truncation mark bitmaps, continuation mark bitmaps, overlay
arrow bitmaps, or clear the areas where they would be displayed
arrow bitmaps, or clear the fringes if no bitmaps are required
before DESIRED_ROW is made current. The window being updated is
found in updated_window. This function It is called from
update_window_line only if it is known that there are differences
......@@ -777,7 +777,7 @@ x_after_update_window_line (desired_row)
if (!desired_row->mode_line_p && !w->pseudo_window_p)
{
BLOCK_INPUT;
x_draw_row_bitmaps (w, desired_row);
x_draw_row_fringe_bitmaps (w, desired_row);
UNBLOCK_INPUT;
}
......@@ -813,16 +813,16 @@ x_after_update_window_line (desired_row)
}
/* Draw the bitmap WHICH in one of the areas to the left or right of
/* Draw the bitmap WHICH in one of the left or right fringes of
window W. ROW is the glyph row for which to display the bitmap; it
determines the vertical position at which the bitmap has to be
drawn. */
static void
x_draw_bitmap (w, row, which)
x_draw_fringe_bitmap (w, row, which)
struct window *w;
struct glyph_row *row;
enum bitmap_type which;
enum fringe_bitmap_type which;
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
Display *display = FRAME_X_DISPLAY (f);
......@@ -845,7 +845,7 @@ x_draw_bitmap (w, row, which)
bits = left_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
case OVERLAY_ARROW_BITMAP:
......@@ -854,7 +854,7 @@ x_draw_bitmap (w, row, which)
bits = ov_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
case RIGHT_TRUNCATION_BITMAP:
......@@ -862,7 +862,7 @@ x_draw_bitmap (w, row, which)
h = right_height;
bits = right_bits;
x = window_box_right (w, -1);
x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2;
x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2;
break;
case CONTINUED_LINE_BITMAP:
......@@ -870,7 +870,7 @@ x_draw_bitmap (w, row, which)
h = right_height;
bits = continued_bits;
x = window_box_right (w, -1);
x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2;
x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2;
break;
case CONTINUATION_LINE_BITMAP:
......@@ -879,7 +879,7 @@ x_draw_bitmap (w, row, which)
bits = continuation_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
case ZV_LINE_BITMAP:
......@@ -888,7 +888,7 @@ x_draw_bitmap (w, row, which)
bits = zv_bits;
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0)
- wd
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2);
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2);
break;
default:
......@@ -902,7 +902,7 @@ x_draw_bitmap (w, row, which)
/* Draw the bitmap. I believe these small pixmaps can be cached
by the server. */
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
face = FACE_FROM_ID (f, FRINGE_FACE_ID);
pixmap = XCreatePixmapFromBitmapData (display, window, bits, wd, h,
face->foreground,
face->background, depth);
......@@ -912,16 +912,16 @@ x_draw_bitmap (w, row, which)
}
/* Draw flags bitmaps for glyph row ROW on window W. Call this
/* Draw fringe bitmaps for glyph row ROW on window W. Call this
function with input blocked. */
static void
x_draw_row_bitmaps (w, row)
x_draw_row_fringe_bitmaps (w, row)
struct window *w;
struct glyph_row *row;
{
struct frame *f = XFRAME (w->frame);
enum bitmap_type bitmap;
enum fringe_bitmap_type bitmap;
struct face *face;
int header_line_height = -1;
......@@ -932,10 +932,10 @@ x_draw_row_bitmaps (w, row)
if (row->visible_height <= 0)
return;
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID);
face = FACE_FROM_ID (f, FRINGE_FACE_ID);
PREPARE_FACE_FOR_DISPLAY (f, face);
/* Decide which bitmap to draw at the left side. */
/* Decide which bitmap to draw in the left fringe. */
if (row->overlay_arrow_p)
bitmap = OVERLAY_ARROW_BITMAP;
else if (row->truncated_on_left_p)
......@@ -945,13 +945,13 @@ x_draw_row_bitmaps (w, row)
else if (row->indicate_empty_line_p)
bitmap = ZV_LINE_BITMAP;
else
bitmap = NO_BITMAP;
bitmap = NO_FRINGE_BITMAP;
/* Clear flags area if no bitmap to draw or if bitmap doesn't fill
the flags area. */
if (bitmap == NO_BITMAP
|| FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
|| row->height > FRAME_FLAGS_BITMAP_HEIGHT (f))
/* Clear left fringe if no bitmap to draw or if bitmap doesn't fill
the fringe. */
if (bitmap == NO_FRINGE_BITMAP
|| FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_LEFT_FRINGE_WIDTH (f)
|| row->height > FRAME_FRINGE_BITMAP_HEIGHT (f))
{
/* If W has a vertical border to its left, don't draw over it. */
int border = ((XFASTINT (w->left) > 0
......@@ -962,7 +962,7 @@ x_draw_row_bitmaps (w, row)
if (header_line_height < 0)
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
/* In case the same realized face is used for bitmap areas and
/* In case the same realized face is used for fringes and
for something displayed in the text (e.g. face `region' on
mono-displays, the fill style may have been changed to
FillSolid in x_draw_glyph_string_background. */
......@@ -974,40 +974,40 @@ x_draw_row_bitmaps (w, row)
XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
face->gc,
(left
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)
- FRAME_X_LEFT_FRINGE_WIDTH (f)
+ border),
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border,
FRAME_X_LEFT_FRINGE_WIDTH (f) - border,
row->visible_height);
if (!face->stipple)
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground);
}
/* Draw the left bitmap. */
if (bitmap != NO_BITMAP)
x_draw_bitmap (w, row, bitmap);
if (bitmap != NO_FRINGE_BITMAP)
x_draw_fringe_bitmap (w, row, bitmap);
/* Decide which bitmap to draw at the right side. */
/* Decide which bitmap to draw in the right fringe. */
if (row->truncated_on_right_p)
bitmap = RIGHT_TRUNCATION_BITMAP;
else if (row->continued_p)
bitmap = CONTINUED_LINE_BITMAP;
else
bitmap = NO_BITMAP;
bitmap = NO_FRINGE_BITMAP;
/* Clear flags area if no bitmap to draw of if bitmap doesn't fill
the flags area. */
if (bitmap == NO_BITMAP
|| FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f)
|| row->height > FRAME_FLAGS_BITMAP_HEIGHT (f))
/* Clear right fringe if no bitmap to draw of if bitmap doesn't fill
the fringe. */
if (bitmap == NO_FRINGE_BITMAP
|| FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FRINGE_WIDTH (f)
|| row->height > FRAME_FRINGE_BITMAP_HEIGHT (f))
{
int right = window_box_right (w, -1);
if (header_line_height < 0)
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
/* In case the same realized face is used for bitmap areas and
/* In case the same realized face is used for fringes and
for something displayed in the text (e.g. face `region' on
mono-displays, the fill style may have been changed to
FillSolid in x_draw_glyph_string_background. */
......@@ -1020,15 +1020,15 @@ x_draw_row_bitmaps (w, row)
right,
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y)),
FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f),
FRAME_X_RIGHT_FRINGE_WIDTH (f),
row->visible_height);
if (!face->stipple)
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground);
}
/* Draw the right bitmap. */
if (bitmap != NO_BITMAP)
x_draw_bitmap (w, row, bitmap);
if (bitmap != NO_FRINGE_BITMAP)
x_draw_fringe_bitmap (w, row, bitmap);
}
......@@ -3978,7 +3978,7 @@ x_draw_glyph_string_box (s)
if (s->row->full_width_p
&& !s->w->pseudo_window_p)
{
last_x += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (s->f);
last_x += FRAME_X_RIGHT_FRINGE_WIDTH (s->f);
if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (s->f))
last_x += FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f);
}
......@@ -5064,9 +5064,9 @@ x_draw_glyphs (w, x, row, area, start, end, hl, overlaps_p)
if (row->full_width_p)
{
/* X is relative to the left edge of W, without scroll bars
or flag areas. */
or fringes. */
struct frame *f = XFRAME (w->frame);
/* int width = FRAME_FLAGS_AREA_WIDTH (f); */
/* int width = FRAME_FRINGE_WIDTH (f); */
int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f);
x += window_left_x;
......@@ -5732,11 +5732,11 @@ x_scroll_run (w, run)
int x, y, width, height, from_y, to_y, bottom_y;