Compare commits

...

1 Commits

Author SHA1 Message Date
Daniel Boles
2786f1ffda TextLayout|View: Add missing (inout)s on TextIters
The lack of an annotation in such cases means Vala assumes it can pass
the TextIter by value, but these methods need to update the iter, so we
need Vala to pass by reference. Adding (inout) allows that to happen.

https://gitlab.gnome.org/GNOME/gtk/issues/78
2018-03-15 18:51:04 +00:00
2 changed files with 16 additions and 15 deletions

View File

@@ -3209,9 +3209,9 @@ gtk_text_layout_clamp_iter_to_vrange (GtkTextLayout *layout,
/**
* gtk_text_layout_move_iter_to_previous_line:
* @layout: a #GtkLayout
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
*
* Move the iterator to the beginning of the previous line. The lines
* Moves the given @iter to the beginning of the previous line. The lines
* of a wrapped paragraph are treated as distinct for this operation.
**/
gboolean
@@ -3328,9 +3328,9 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
/**
* gtk_text_layout_move_iter_to_next_line:
* @layout: a #GtkLayout
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
*
* Move the iterator to the beginning of the next line. The
* Moves the given @iter to the beginning of the next line. The
* lines of a wrapped paragraph are treated as distinct for
* this operation.
**/
@@ -3405,10 +3405,11 @@ gtk_text_layout_move_iter_to_next_line (GtkTextLayout *layout,
/**
* gtk_text_layout_move_iter_to_line_end:
* @layout: a #GtkTextLayout
* @iter: (inout): a #GtkTextIter
* @direction: if negative, move to beginning of line, otherwise
move to end of line.
*
* Move to the beginning or end of a display line.
* Moves the given @iter to the beginning or end of a display line.
**/
gboolean
gtk_text_layout_move_iter_to_line_end (GtkTextLayout *layout,
@@ -3525,10 +3526,10 @@ gtk_text_layout_get_iter_at_line (GtkTextLayout *layout,
/**
* gtk_text_layout_move_iter_to_x:
* @layout: a #GtkTextLayout
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
* @x: X coordinate
*
* Keeping the iterator on the same line of the layout, move it to the
* Keeping the given @iter on the same line of the layout, moves it to the
* specified X coordinate. The lines of a wrapped paragraph are
* treated as distinct for this operation.
**/
@@ -3584,10 +3585,10 @@ gtk_text_layout_move_iter_to_x (GtkTextLayout *layout,
/**
* gtk_text_layout_move_iter_visually:
* @layout: a #GtkTextLayout
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
* @count: number of characters to move (negative moves left, positive moves right)
*
* Move the iterator a given number of characters visually, treating
* Moves the given @iter a given number of characters visually, treating
* it as the strong cursor position. If @count is positive, then the
* new strong cursor position will be @count positions to the right of
* the old cursor position. If @count is negative then the new strong

View File

@@ -9774,7 +9774,7 @@ gtk_text_view_move_child (GtkTextView *text_view,
/**
* gtk_text_view_forward_display_line:
* @text_view: a #GtkTextView
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
*
* Moves the given @iter forward by one display (wrapped) line.
* A display line is different from a paragraph. Paragraphs are
@@ -9802,7 +9802,7 @@ gtk_text_view_forward_display_line (GtkTextView *text_view,
/**
* gtk_text_view_backward_display_line:
* @text_view: a #GtkTextView
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
*
* Moves the given @iter backward by one display (wrapped) line.
* A display line is different from a paragraph. Paragraphs are
@@ -9830,7 +9830,7 @@ gtk_text_view_backward_display_line (GtkTextView *text_view,
/**
* gtk_text_view_forward_display_line_end:
* @text_view: a #GtkTextView
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
*
* Moves the given @iter forward to the next display line end.
* A display line is different from a paragraph. Paragraphs are
@@ -9858,7 +9858,7 @@ gtk_text_view_forward_display_line_end (GtkTextView *text_view,
/**
* gtk_text_view_backward_display_line_start:
* @text_view: a #GtkTextView
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
*
* Moves the given @iter backward to the next display line start.
* A display line is different from a paragraph. Paragraphs are
@@ -9909,11 +9909,11 @@ gtk_text_view_starts_display_line (GtkTextView *text_view,
/**
* gtk_text_view_move_visually:
* @text_view: a #GtkTextView
* @iter: a #GtkTextIter
* @iter: (inout): a #GtkTextIter
* @count: number of characters to move (negative moves left,
* positive moves right)
*
* Move the iterator a given number of characters visually, treating
* Moves the given @iter a given number of characters visually, treating
* it as the strong cursor position. If @count is positive, then the
* new strong cursor position will be @count positions to the right of
* the old cursor position. If @count is negative then the new strong