diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-06-08 16:02:59 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-08 16:02:59 +0000 |
commit | a3b4a4bce5d6934feea075d52310abb69bfcbbcd (patch) | |
tree | c34b60dfa70f4b8d9ce0cb53792962bc38b7463c /pango | |
parent | a5b50542c5bd7e4a5487284af9ce3d40a36633f8 (diff) | |
download | pango-a3b4a4bce5d6934feea075d52310abb69bfcbbcd.tar.gz |
Add a 'strong' parameter to allow moving either the strong or the weak
Thu Jun 7 14:06:25 2001 Owen Taylor <otaylor@redhat.com>
* pango/pango-layout.c (pango_layout_move_cursor_visually):
Add a 'strong' parameter to allow moving either the strong
or the weak cursor visually, instead of the strong cursor.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 8 | ||||
-rw-r--r-- | pango/pango-layout.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 8cd14be8..f0424b26 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -1135,6 +1135,9 @@ pango_layout_index_to_line_x (PangoLayout *layout, /** * pango_layout_move_cursor_visually: * @layout: a #PangoLayout. + * @strong: whether the moving cursor is the strong cursor or the + * weak cursor. The strong cursor is the cursor corresponding + * to text insertion in the base direction for the layout. * @old_index: the byte index of the grapheme for the old index * @old_trailing: if 0, the cursor was at the trailing edge of the * grapheme indicated by @old_index, if > 0, the cursor @@ -1171,6 +1174,7 @@ pango_layout_index_to_line_x (PangoLayout *layout, **/ void pango_layout_move_cursor_visually (PangoLayout *layout, + gboolean strong, int old_index, int old_trailing, int direction, @@ -1228,7 +1232,7 @@ pango_layout_move_cursor_visually (PangoLayout *layout, while (old_trailing--) old_index = g_utf8_next_char (layout->text + old_index) - layout->text; - log2vis_map = pango_layout_line_get_log2vis_map (line, TRUE); + log2vis_map = pango_layout_line_get_log2vis_map (line, strong); n_vis = g_utf8_strlen (layout->text + line->start_index, line->length); /* Clamp old_index to fit on the line */ @@ -1289,7 +1293,7 @@ pango_layout_move_cursor_visually (PangoLayout *layout, vis_pos = 0; } - vis2log_map = pango_layout_line_get_vis2log_map (line, TRUE); + vis2log_map = pango_layout_line_get_vis2log_map (line, strong); do { diff --git a/pango/pango-layout.h b/pango/pango-layout.h index 28b4cfcb..85b00e42 100644 --- a/pango/pango-layout.h +++ b/pango/pango-layout.h @@ -142,6 +142,7 @@ void pango_layout_get_cursor_pos (PangoLayout *layout, PangoRectangle *strong_pos, PangoRectangle *weak_pos); void pango_layout_move_cursor_visually (PangoLayout *layout, + gboolean strong, int old_index, int old_trailing, int direction, |