aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorDmitry Antipov <[email protected]>2013-08-28 09:45:38 +0400
committerDmitry Antipov <[email protected]>2013-08-28 09:45:38 +0400
commitf60e429a1a1a0d6a51761ef12e54dde52967f085 (patch)
tree83be6ff103b71cb7b59fa171b631437f0c6720c7 /src/dispnew.c
parent0acfedd3496a4a375c27215d13bf63466fdb1071 (diff)
Redesign redisplay interface to drop global output_cursor.
* dispextern.h (struct redisplay_interface): Remove cursor_to member. (toplevel): Remove declaration of output_cursor. (set_output_cursor, x_cursor_to): Remove prototype. * window.h (struct window): New member output_cursor. (output_cursor_to): New function to replace RIF member. * dispnew.c (redraw_overlapped_rows, update_marginal_area) (update_text_area, set_window_cursor_after_update): Use it. * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove. (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line): * nsterm.m (ns_update_window_begin, ns_update_window_end): * w32term.c (x_update_window_begin, x_update_window_end): * xterm.c (x_update_window_begin, x_update_window_end): Adjust to use per-window output cursor.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 1c80facd42..349689e57f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3223,8 +3223,8 @@ redraw_overlapped_rows (struct window *w, int yb)
for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
{
- FRAME_RIF (f)->cursor_to (w, i, 0, row->y,
- area == TEXT_AREA ? row->x : 0);
+ output_cursor_to (w, i, 0, row->y,
+ area == TEXT_AREA ? row->x : 0);
if (row->used[area])
FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area],
area, row->used[area]);
@@ -3481,7 +3481,7 @@ update_window (struct window *w, bool force_p)
/* End the update of window W. Don't set the cursor if we
paused updating the display because in this case,
set_window_cursor_after_update hasn't been called, and
- output_cursor doesn't contain the cursor location. */
+ W->output_cursor doesn't contain the cursor location. */
rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p);
}
else
@@ -3511,7 +3511,7 @@ update_marginal_area (struct window *w, struct glyph_row *updated_row,
/* Set cursor to start of glyphs, write them, and clear to the end
of the area. I don't think that something more sophisticated is
necessary here, since marginal areas will not be the default. */
- rif->cursor_to (w, vpos, 0, desired_row->y, 0);
+ output_cursor_to (w, vpos, 0, desired_row->y, 0);
if (desired_row->used[area])
rif->write_glyphs (w, updated_row, desired_row->glyphs[area],
area, desired_row->used[area]);
@@ -3549,7 +3549,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
&& !(current_row->mode_line_p && vpos > 0))
|| current_row->x != desired_row->x)
{
- rif->cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
+ output_cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
if (desired_row->used[TEXT_AREA])
rif->write_glyphs (w, updated_row, desired_row->glyphs[TEXT_AREA],
@@ -3692,7 +3692,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
break;
}
- rif->cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
+ output_cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
rif->write_glyphs (w, updated_row, start,
TEXT_AREA, i - start_hpos);
changed_p = 1;
@@ -3702,7 +3702,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
/* Write the rest. */
if (i < desired_row->used[TEXT_AREA])
{
- rif->cursor_to (w, vpos, i, desired_row->y, x);
+ output_cursor_to (w, vpos, i, desired_row->y, x);
rif->write_glyphs (w, updated_row, desired_glyph,
TEXT_AREA, desired_row->used[TEXT_AREA] - i);
changed_p = 1;
@@ -3724,8 +3724,8 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
{
/* If old row extends to the end of the text area, clear. */
if (i >= desired_row->used[TEXT_AREA])
- rif->cursor_to (w, vpos, i, desired_row->y,
- desired_row->pixel_width);
+ output_cursor_to (w, vpos, i, desired_row->y,
+ desired_row->pixel_width);
rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1);
changed_p = 1;
}
@@ -3736,8 +3736,8 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
int xlim;
if (i >= desired_row->used[TEXT_AREA])
- rif->cursor_to (w, vpos, i, desired_row->y,
- desired_row->pixel_width);
+ output_cursor_to (w, vpos, i, desired_row->y,
+ desired_row->pixel_width);
/* If cursor is displayed at the end of the line, make sure
it's cleared. Nowadays we don't have a phys_cursor_glyph
@@ -3836,7 +3836,6 @@ static void
set_window_cursor_after_update (struct window *w)
{
struct frame *f = XFRAME (w->frame);
- struct redisplay_interface *rif = FRAME_RIF (f);
int cx, cy, vpos, hpos;
/* Not intended for frame matrix updates. */
@@ -3908,7 +3907,7 @@ set_window_cursor_after_update (struct window *w)
Horizontal position is -1 when cursor is on the left fringe. */
hpos = clip_to_bounds (-1, hpos, w->current_matrix->matrix_w - 1);
vpos = clip_to_bounds (0, vpos, w->current_matrix->nrows - 1);
- rif->cursor_to (w, vpos, hpos, cy, cx);
+ output_cursor_to (w, vpos, hpos, cy, cx);
}