summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boles <dboles@src.gnome.org>2018-03-15 18:51:04 +0000
committerDaniel Boles <dboles@src.gnome.org>2018-03-15 18:51:04 +0000
commit2786f1ffdad8fd9fd799ec28b0cef4041bab7ff9 (patch)
treeb9aca0834bc5b43d22c361a948e75981fcb40eba
parent0b4e0ce50937694763aead07ac1d03a5e18c6ac8 (diff)
downloadgtk+-78-textview-forward_display_line-doesn-t-work.tar.gz
TextLayout|View: Add missing (inout)s on TextIters78-textview-forward_display_line-doesn-t-work
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
-rw-r--r--gtk/gtktextlayout.c19
-rw-r--r--gtk/gtktextview.c12
2 files changed, 16 insertions, 15 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index 51ac51a3b6..5a95980664 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -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
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 85daa761d0..3c2f4b6a64 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -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