From a3b4a4bce5d6934feea075d52310abb69bfcbbcd Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 8 Jun 2001 16:02:59 +0000 Subject: Add a 'strong' parameter to allow moving either the strong or the weak Thu Jun 7 14:06:25 2001 Owen Taylor * 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. --- ChangeLog | 6 ++++++ ChangeLog.pre-1-0 | 6 ++++++ ChangeLog.pre-1-10 | 6 ++++++ ChangeLog.pre-1-2 | 6 ++++++ ChangeLog.pre-1-4 | 6 ++++++ ChangeLog.pre-1-6 | 6 ++++++ ChangeLog.pre-1-8 | 6 ++++++ docs/tmpl/layout.sgml | 1 + pango/pango-layout.c | 8 ++++++-- pango/pango-layout.h | 1 + 10 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1bd8715e..9c73e370 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 1bd8715e..9c73e370 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 1bd8715e..9c73e370 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 1bd8715e..9c73e370 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 1bd8715e..9c73e370 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 1bd8715e..9c73e370 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 1bd8715e..9c73e370 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +Thu Jun 7 14:06:25 2001 Owen Taylor + + * 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. + 2001-06-07 Havoc Pennington * pango/Makefile.am: add libpango.la to _DEPENDENCIES for the diff --git a/docs/tmpl/layout.sgml b/docs/tmpl/layout.sgml index 5540ee13..886340f6 100644 --- a/docs/tmpl/layout.sgml +++ b/docs/tmpl/layout.sgml @@ -385,6 +385,7 @@ for partial lines. @layout: +@strong: @old_index: @old_trailing: @direction: 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, -- cgit v1.2.1