designed to be called once for every character in the buffer or
string.
- The main entry point is bidi_get_next_char_visually. Each time it
+ The main entry point is bidi_move_to_visually_next. Each time it
is called, it finds the next character in the visual order, and
returns its information in a special structure. The caller is then
expected to process this character for display or any other
- purposes, and call bidi_get_next_char_visually for the next
- character. See the comments in bidi_get_next_char_visually for
- more details about its algorithm that finds the next visual-order
+ purposes, and call bidi_move_to_visually_next for the next
+ character. See the comments in bidi_move_to_visually_next for more
+ details about its algorithm that finds the next visual-order
character by resolving their levels on the fly.
The two other entry points are bidi_paragraph_init and
}
void
-bidi_get_next_char_visually (struct bidi_it *bidi_it)
+bidi_move_to_visually_next (struct bidi_it *bidi_it)
{
int old_level, new_level, next_level;
struct bidi_it sentinel;
reordering engine which is called by set_iterator_to_next and
returns the next character to display in the visual order. See
commentary on bidi.c for more details. As far as redisplay is
- concerned, the effect of calling bidi_get_next_char_visually, the
+ concerned, the effect of calling bidi_move_to_visually_next, the
main interface of the reordering engine, is that the iterator gets
magically placed on the buffer or string position that is to be
displayed next. In other words, a linear iteration through the
}
do
{
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
}
while (it->stop_charpos <= it->bidi_it.charpos
&& it->bidi_it.charpos < newpos);
while (it->bidi_it.charpos >= BEGV
&& it->prev_stop <= it->bidi_it.charpos
&& it->bidi_it.charpos < CHARPOS (it->position))
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
/* Record the stop_pos we just crossed, for when we cross it
back, maybe. */
if (it->bidi_it.charpos > CHARPOS (it->position))
character of the next grapheme cluster, or to the
character visually after the current composition. */
for (i = 0; i < it->cmp_it.nchars; i++)
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
IT_BYTEPOS (*it) = it->bidi_it.bytepos;
IT_CHARPOS (*it) = it->bidi_it.charpos;
/* Update IT's char/byte positions to point to the last
character of the previous grapheme cluster, or the
character visually after the current composition. */
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
IT_BYTEPOS (*it) = it->bidi_it.bytepos;
IT_CHARPOS (*it) = it->bidi_it.charpos;
direction (a.k.a. its base embedding level). */
if (it->bidi_it.new_paragraph)
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
IT_BYTEPOS (*it) = it->bidi_it.bytepos;
IT_CHARPOS (*it) = it->bidi_it.charpos;
if (prev_scan_dir != it->bidi_it.scan_dir)
/* If we are at the beginning of a line, we can produce the
next element right away. */
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
}
else
{
{
/* Now return to buffer position where we were asked to
get the next display element, and produce that. */
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
}
while (it->bidi_it.bytepos != orig_bytepos
&& it->bidi_it.bytepos < ZV_BYTE);
/* Resync the bidi iterator with IT's new position.
FIXME: this doesn't support bidirectional text. */
while (it->bidi_it.charpos < IT_CHARPOS (*it))
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
}
return 0;
}
correct (struct glyph)->charpos. */
int i;
for (i = 0; i < it->cmp_it.nchars - 1; i++)
- bidi_get_next_char_visually (&it->bidi_it);
+ bidi_move_to_visually_next (&it->bidi_it);
IT_CHARPOS (*it) = it->bidi_it.charpos;
IT_BYTEPOS (*it) = it->bidi_it.bytepos;
it->position = it->current.pos;