### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/TextIter.rakumod
### ----------------------------------------------------
### -- Chunk 2 of 3
 possible; if I<iter> was the first in the buffer (character
offset 0), C<gtk_text_iter_backward_char()> returns C<0> for convenience when
writing loops.

Returns: whether movement was possible

  method gtk_text_iter_backward_char ( --> Int  )


=end pod

sub gtk_text_iter_backward_char ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_chars:
=begin pod
=head2 [[gtk_] text_iter_] forward_chars

Moves I<count> characters if possible (if I<count> would move past the
start or end of the buffer, moves to the start or end of the
buffer). The return value indicates whether the new position of
I<iter> is different from its original position, and dereferenceable
(the last iterator in the buffer is not dereferenceable). If I<count>
is 0, the function does nothing and returns C<0>.

Returns: whether I<iter> moved and is dereferenceable

  method gtk_text_iter_forward_chars ( Int $count --> Int  )

=item Int $count; number of characters to move, may be negative

=end pod

sub gtk_text_iter_forward_chars ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_chars:
=begin pod
=head2 [[gtk_] text_iter_] backward_chars

Moves I<count> characters backward, if possible (if I<count> would move
past the start or end of the buffer, moves to the start or end of
the buffer).  The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn’t move, or
moved onto the end iterator, then C<0> is returned. If I<count> is 0,
the function does nothing and returns C<0>.

Returns: whether I<iter> moved and is dereferenceable


  method gtk_text_iter_backward_chars ( Int $count --> Int  )

=item Int $count; number of characters to move

=end pod

sub gtk_text_iter_backward_chars ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_line:
=begin pod
=head2 [[gtk_] text_iter_] forward_line

Moves I<iter> to the start of the next line. If the iter is already on the
last line of the buffer, moves the iter to the end of the current line.
If after the operation, the iter is at the end of the buffer and not
dereferencable, returns C<0>. Otherwise, returns C<1>.

Returns: whether I<iter> can be dereferenced

  method gtk_text_iter_forward_line ( --> Int  )


=end pod

sub gtk_text_iter_forward_line ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_line:
=begin pod
=head2 [[gtk_] text_iter_] backward_line

Moves I<iter> to the start of the previous line. Returns C<1> if
I<iter> could be moved; i.e. if I<iter> was at character offset 0, this
function returns C<0>. Therefore if I<iter> was already on line 0,
but not at the start of the line, I<iter> is snapped to the start of
the line and the function returns C<1>. (Note that this implies that
in a loop calling this function, the line number may not change on
every iteration, if your first iteration is on line 0.)

Returns: whether I<iter> moved

  method gtk_text_iter_backward_line ( --> Int  )


=end pod

sub gtk_text_iter_backward_line ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_lines:
=begin pod
=head2 [[gtk_] text_iter_] forward_lines

Moves I<count> lines forward, if possible (if I<count> would move
past the start or end of the buffer, moves to the start or end of
the buffer).  The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn’t move, or
moved onto the end iterator, then C<0> is returned. If I<count> is 0,
the function does nothing and returns C<0>. If I<count> is negative,
moves backward by 0 - I<count> lines.

Returns: whether I<iter> moved and is dereferenceable

  method gtk_text_iter_forward_lines ( Int $count --> Int  )

=item Int $count; number of lines to move forward

=end pod

sub gtk_text_iter_forward_lines ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_lines:
=begin pod
=head2 [[gtk_] text_iter_] backward_lines

Moves I<count> lines backward, if possible (if I<count> would move
past the start or end of the buffer, moves to the start or end of
the buffer).  The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn’t move, or
moved onto the end iterator, then C<0> is returned. If I<count> is 0,
the function does nothing and returns C<0>. If I<count> is negative,
moves forward by 0 - I<count> lines.

Returns: whether I<iter> moved and is dereferenceable

  method gtk_text_iter_backward_lines ( Int $count --> Int  )

=item Int $count; number of lines to move backward

=end pod

sub gtk_text_iter_backward_lines ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_word_end:
=begin pod
=head2 [[gtk_] text_iter_] forward_word_end

Moves forward to the next word end. (If I<iter> is currently on a
word end, moves forward to the next one after that.) Word breaks
are determined by Pango and should be correct for nearly any
language (if not, the correct fix would be to the Pango word break
algorithms).

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_forward_word_end ( --> Int  )


=end pod

sub gtk_text_iter_forward_word_end ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_word_start:
=begin pod
=head2 [[gtk_] text_iter_] backward_word_start

Moves backward to the previous word start. (If I<iter> is currently on a
word start, moves backward to the next one after that.) Word breaks
are determined by Pango and should be correct for nearly any
language (if not, the correct fix would be to the Pango word break
algorithms).

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_backward_word_start ( --> Int  )


=end pod

sub gtk_text_iter_backward_word_start ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_word_ends:
=begin pod
=head2 [[gtk_] text_iter_] forward_word_ends

Calls C<gtk_text_iter_forward_word_end()> up to I<count> times.

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_forward_word_ends ( Int $count --> Int  )

=item Int $count; number of times to move

=end pod

sub gtk_text_iter_forward_word_ends ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_word_starts:
=begin pod
=head2 [[gtk_] text_iter_] backward_word_starts

Calls C<gtk_text_iter_backward_word_start()> up to I<count> times.

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_backward_word_starts ( Int $count --> Int  )

=item Int $count; number of times to move

=end pod

sub gtk_text_iter_backward_word_starts ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_visible_line:
=begin pod
=head2 [[gtk_] text_iter_] forward_visible_line

Moves I<iter> to the start of the next visible line. Returns C<1> if there
was a next line to move to, and C<0> if I<iter> was simply moved to
the end of the buffer and is now not dereferenceable, or if I<iter> was
already at the end of the buffer.

Returns: whether I<iter> can be dereferenced

Since: 2.8

  method gtk_text_iter_forward_visible_line ( --> Int  )


=end pod

sub gtk_text_iter_forward_visible_line ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_visible_line:
=begin pod
=head2 [[gtk_] text_iter_] backward_visible_line

Moves I<iter> to the start of the previous visible line. Returns C<1> if
I<iter> could be moved; i.e. if I<iter> was at character offset 0, this
function returns C<0>. Therefore if I<iter> was already on line 0,
but not at the start of the line, I<iter> is snapped to the start of
the line and the function returns C<1>. (Note that this implies that
in a loop calling this function, the line number may not change on
every iteration, if your first iteration is on line 0.)

Returns: whether I<iter> moved

Since: 2.8

  method gtk_text_iter_backward_visible_line ( --> Int  )


=end pod

sub gtk_text_iter_backward_visible_line ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_visible_lines:
=begin pod
=head2 [[gtk_] text_iter_] forward_visible_lines

Moves I<count> visible lines forward, if possible (if I<count> would move
past the start or end of the buffer, moves to the start or end of
the buffer).  The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn’t move, or
moved onto the end iterator, then C<0> is returned. If I<count> is 0,
the function does nothing and returns C<0>. If I<count> is negative,
moves backward by 0 - I<count> lines.

Returns: whether I<iter> moved and is dereferenceable

Since: 2.8

  method gtk_text_iter_forward_visible_lines ( Int $count --> Int  )

=item Int $count; number of lines to move forward

=end pod

sub gtk_text_iter_forward_visible_lines ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_visible_lines:
=begin pod
=head2 [[gtk_] text_iter_] backward_visible_lines

Moves I<count> visible lines backward, if possible (if I<count> would move
past the start or end of the buffer, moves to the start or end of
the buffer).  The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn’t move, or
moved onto the end iterator, then C<0> is returned. If I<count> is 0,
the function does nothing and returns C<0>. If I<count> is negative,
moves forward by 0 - I<count> lines.

Returns: whether I<iter> moved and is dereferenceable

Since: 2.8

  method gtk_text_iter_backward_visible_lines ( Int $count --> Int  )

=item Int $count; number of lines to move backward

=end pod

sub gtk_text_iter_backward_visible_lines ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_visible_word_end:
=begin pod
=head2 [[gtk_] text_iter_] forward_visible_word_end

Moves forward to the next visible word end. (If I<iter> is currently on a
word end, moves forward to the next one after that.) Word breaks
are determined by Pango and should be correct for nearly any
language (if not, the correct fix would be to the Pango word break
algorithms).

Returns: C<1> if I<iter> moved and is not the end iterator

Since: 2.4

  method gtk_text_iter_forward_visible_word_end ( --> Int  )


=end pod

sub gtk_text_iter_forward_visible_word_end ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_visible_word_start:
=begin pod
=head2 [[gtk_] text_iter_] backward_visible_word_start

Moves backward to the previous visible word start. (If I<iter> is currently
on a word start, moves backward to the next one after that.) Word breaks
are determined by Pango and should be correct for nearly any
language (if not, the correct fix would be to the Pango word break
algorithms).

Returns: C<1> if I<iter> moved and is not the end iterator

Since: 2.4

  method gtk_text_iter_backward_visible_word_start ( --> Int  )


=end pod

sub gtk_text_iter_backward_visible_word_start ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_visible_word_ends:
=begin pod
=head2 [[gtk_] text_iter_] forward_visible_word_ends

Calls C<gtk_text_iter_forward_visible_word_end()> up to I<count> times.

Returns: C<1> if I<iter> moved and is not the end iterator

Since: 2.4

  method gtk_text_iter_forward_visible_word_ends ( Int $count --> Int  )

=item Int $count; number of times to move

=end pod

sub gtk_text_iter_forward_visible_word_ends ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_visible_word_starts:
=begin pod
=head2 [[gtk_] text_iter_] backward_visible_word_starts

Calls C<gtk_text_iter_backward_visible_word_start()> up to I<count> times.

Returns: C<1> if I<iter> moved and is not the end iterator

Since: 2.4

  method gtk_text_iter_backward_visible_word_starts ( Int $count --> Int  )

=item Int $count; number of times to move

=end pod

sub gtk_text_iter_backward_visible_word_starts ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_sentence_end:
=begin pod
=head2 [[gtk_] text_iter_] forward_sentence_end

Moves forward to the next sentence end. (If I<iter> is at the end of
a sentence, moves to the next end of sentence.)  Sentence
boundaries are determined by Pango and should be correct for nearly
any language (if not, the correct fix would be to the Pango text
boundary algorithms).

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_forward_sentence_end ( --> Int  )


=end pod

sub gtk_text_iter_forward_sentence_end ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_sentence_start:
=begin pod
=head2 [[gtk_] text_iter_] backward_sentence_start

Moves backward to the previous sentence start; if I<iter> is already at
the start of a sentence, moves backward to the next one.  Sentence
boundaries are determined by Pango and should be correct for nearly
any language (if not, the correct fix would be to the Pango text
boundary algorithms).

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_backward_sentence_start ( --> Int  )


=end pod

sub gtk_text_iter_backward_sentence_start ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_sentence_ends:
=begin pod
=head2 [[gtk_] text_iter_] forward_sentence_ends

Calls C<gtk_text_iter_forward_sentence_end()> I<count> times (or until
C<gtk_text_iter_forward_sentence_end()> returns C<0>). If I<count> is
negative, moves backward instead of forward.

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_forward_sentence_ends ( Int $count --> Int  )

=item Int $count; number of sentences to move

=end pod

sub gtk_text_iter_forward_sentence_ends ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_sentence_starts:
=begin pod
=head2 [[gtk_] text_iter_] backward_sentence_starts

Calls C<gtk_text_iter_backward_sentence_start()> up to I<count> times,
or until it returns C<0>. If I<count> is negative, moves forward
instead of backward.

Returns: C<1> if I<iter> moved and is not the end iterator

  method gtk_text_iter_backward_sentence_starts ( Int $count --> Int  )

=item Int $count; number of sentences to move

=end pod

sub gtk_text_iter_backward_sentence_starts ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_cursor_position:
=begin pod
=head2 [[gtk_] text_iter_] forward_cursor_position

Moves I<iter> forward by a single cursor position. Cursor positions
are (unsurprisingly) positions where the cursor can appear. Perhaps
surprisingly, there may not be a cursor position between all
characters. The most common example for European languages would be
a carriage return/newline sequence. For some Unicode characters,
the equivalent of say the letter “a” with an accent mark will be
represented as two characters, first the letter then a "combining
mark" that causes the accent to be rendered; so the cursor can’t go
between those two characters. See also the B<PangoLogAttr>-struct and
C<pango_break()> function.

Returns: C<1> if we moved and the new position is dereferenceable

  method gtk_text_iter_forward_cursor_position ( --> Int  )


=end pod

sub gtk_text_iter_forward_cursor_position ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_cursor_position:
=begin pod
=head2 [[gtk_] text_iter_] backward_cursor_position

Like C<gtk_text_iter_forward_cursor_position()>, but moves backward.

Returns: C<1> if we moved

  method gtk_text_iter_backward_cursor_position ( --> Int  )


=end pod

sub gtk_text_iter_backward_cursor_position ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_cursor_positions:
=begin pod
=head2 [[gtk_] text_iter_] forward_cursor_positions

Moves up to I<count> cursor positions. See
C<gtk_text_iter_forward_cursor_position()> for details.

Returns: C<1> if we moved and the new position is dereferenceable

  method gtk_text_iter_forward_cursor_positions ( Int $count --> Int  )

=item Int $count; number of positions to move

=end pod

sub gtk_text_iter_forward_cursor_positions ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_cursor_positions:
=begin pod
=head2 [[gtk_] text_iter_] backward_cursor_positions

Moves up to I<count> cursor positions. See
C<gtk_text_iter_forward_cursor_position()> for details.

Returns: C<1> if we moved and the new position is dereferenceable

  method gtk_text_iter_backward_cursor_positions ( Int $count --> Int  )

=item Int $count; number of positions to move

=end pod

sub gtk_text_iter_backward_cursor_positions ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_visible_cursor_position:
=begin pod
=head2 [[gtk_] text_iter_] forward_visible_cursor_position

Moves I<iter> forward to the next visible cursor position. See
C<gtk_text_iter_forward_cursor_position()> for details.

Returns: C<1> if we moved and the new position is dereferenceable

Since: 2.4

  method gtk_text_iter_forward_visible_cursor_position ( --> Int  )


=end pod

sub gtk_text_iter_forward_visible_cursor_position ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_visible_cursor_position:
=begin pod
=head2 [[gtk_] text_iter_] backward_visible_cursor_position

Moves I<iter> forward to the previous visible cursor position. See
C<gtk_text_iter_backward_cursor_position()> for details.

Returns: C<1> if we moved and the new position is dereferenceable

Since: 2.4

  method gtk_text_iter_backward_visible_cursor_position ( --> Int  )


=end pod

sub gtk_text_iter_backward_visible_cursor_position ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_visible_cursor_positions:
=begin pod
=head2 [[gtk_] text_iter_] forward_visible_cursor_positions

Moves up to I<count> visible cursor positions. See
C<gtk_text_iter_forward_cursor_position()> for details.

Returns: C<1> if we moved and the new position is dereferenceable

Since: 2.4

  method gtk_text_iter_forward_visible_cursor_positions ( Int $count --> Int  )

=item Int $count; number of positions to move

=end pod

sub gtk_text_iter_forward_visible_cursor_positions ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_visible_cursor_positions:
=begin pod
=head2 [[gtk_] text_iter_] backward_visible_cursor_positions

Moves up to I<count> visible cursor positions. See
C<gtk_text_iter_backward_cursor_position()> for details.

Returns: C<1> if we moved and the new position is dereferenceable

Since: 2.4

  method gtk_text_iter_backward_visible_cursor_positions ( Int $count --> Int  )

=item Int $count; number of positions to move

=end pod

sub gtk_text_iter_backward_visible_cursor_positions ( N-GTextIter $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_set_offset:
=begin pod
=head2 [[gtk_] text_iter_] set_offset

Sets I<iter> to point to I<char_offset>. I<char_offset> counts from the start
of the entire text buffer, starting with 0.

  method gtk_text_iter_set_offset ( Int $char_offset )

=item Int $char_offset; a character number

=end pod

sub gtk_text_iter_set_offset ( N-GTextIter $iter, int32 $char_offset )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_set_line:
=begin pod
=head2 [[gtk_] text_iter_] set_line

Moves iterator I<iter> to the start of the line I<line_number>.  If
I<line_number> is negative or larger than the number of lines in the
buffer, moves I<iter> to the start of the last line in the buffer.


  method gtk_text_iter_set_line ( Int $line_number )

=item Int $line_number; line number (counted from 0)

=end pod

sub gtk_text_iter_set_line ( N-GTextIter $iter, int32 $line_number )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_set_line_offset:
=begin pod
=head2 [[gtk_] text_iter_] set_line_offset

Moves I<iter> within a line, to a new character
(not byte) offset. The given character offset must be less than or
equal to the number of characters in the line; if equal, I<iter>
moves to the start of the next line. See
C<gtk_text_iter_set_line_index()> if you have a byte index rather than
a character offset.


  method gtk_text_iter_set_line_offset ( Int $char_on_line )

=item Int $char_on_line; a character offset relative to the start of I<iter>’s current line

=end pod

sub gtk_text_iter_set_line_offset ( N-GTextIter $iter, int32 $char_on_line )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_set_line_index:
=begin pod
=head2 [[gtk_] text_iter_] set_line_index

Same as C<gtk_text_iter_set_line_offset()>, but works with a
byte index. The given byte index must be at
the start of a character, it can’t be in the middle of a UTF-8
encoded character.


  method gtk_text_iter_set_line_index ( Int $byte_on_line )

=item Int $byte_on_line; a byte index relative to the start of I<iter>’s current line

=end pod

sub gtk_text_iter_set_line_index ( N-GTextIter $iter, int32 $byte_on_line )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_to_end:
=begin pod
=head2 [[gtk_] text_iter_] forward_to_end

Moves I<iter> forward to the “end iterator,” which points one past the last
valid character in the buffer. C<gtk_text_iter_get_char()> called on the
end iterator returns 0, which is convenient for writing loops.

  method gtk_text_iter_forward_to_end ( )


=end pod

sub gtk_text_iter_forward_to_end ( N-GTextIter $iter )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_to_line_end:
=begin pod
=head2 [[gtk_] text_iter_] forward_to_line_end

Moves the iterator to point to the paragraph delimiter characters,
which will be either a newline, a carriage return, a carriage
return/newline in sequence, or the Unicode paragraph separator
character. If the iterator is already at the paragraph delimiter
characters, moves to the paragraph delimiter characters for the
next line. If I<iter> is on the last line in the buffer, which does
not end in paragraph delimiters, moves to the end iterator (end of
the last line), and returns C<0>.

Returns: C<1> if we moved and the new location is not the end iterator

  method gtk_text_iter_forward_to_line_end ( --> Int  )


=end pod

sub gtk_text_iter_forward_to_line_end ( N-GTextIter $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_set_visible_line_offset:
=begin pod
=head2 [[gtk_] text_iter_] set_visible_line_offset

Like C<gtk_text_iter_set_line_offset()>, but the offset is in visible
characters, i.e. text with a tag making it invisible is not
counted in the offset.

  method gtk_text_iter_set_visible_line_offset ( Int $char_on_line )

=item Int $char_on_line; a character offset

=end pod

sub gtk_text_iter_set_visible_line_offset ( N-GTextIter $iter, int32 $char_on_line )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_set_visible_line_index:
=begin pod
=head2 [[gtk_] text_iter_] set_visible_line_index

Like C<gtk_text_iter_set_line_index()>, but the index is in visible
bytes, i.e. text with a tag making it invisible is not counted
in the index.

  method gtk_text_iter_set_visible_line_index ( Int $byte_on_line )

=item Int $byte_on_line; a byte index

=end pod

sub gtk_text_iter_set_visible_line_index ( N-GTextIter $iter, int32 $byte_on_line )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_to_tag_toggle:
=begin pod
=head2 [[gtk_] text_iter_] forward_to_tag_toggle

Moves forward to the next toggle (on or off) of the
B<Gnome::Gtk3::TextTag> I<tag>, or to the next toggle of any tag if
I<tag> is C<Any>. If no matching tag toggles are found,
returns C<0>, otherwise C<1>. Does not return toggles
located at I<iter>, only toggles after I<iter>. Sets I<iter> to
the location of the toggle, or to the end of the buffer
if no toggle is found.

Returns: whether we found a tag toggle after I<iter>

  method gtk_text_iter_forward_to_tag_toggle ( N-GObject $tag --> Int  )

=item N-GObject $tag; (allow-none): a B<Gnome::Gtk3::TextTag>, or C<Any>

=end pod

sub gtk_text_iter_forward_to_tag_toggle ( N-GTextIter $iter, N-GObject $tag )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_to_tag_toggle:
=begin pod
=head2 [[gtk_] text_iter_] backward_to_tag_toggle

Moves backward to the next toggle (on or off) of the
B<Gnome::Gtk3::TextTag> I<tag>, or to the next toggle of any tag if
I<tag> is C<Any>. If no matching tag toggles are found,
returns C<0>, otherwise C<1>. Does not return toggles
located at I<iter>, only toggles before I<iter>. Sets I<iter>
to the location of the toggle, or the start of the buffer
if no toggle is found.

Returns: whether we found a tag toggle before I<iter>

  method gtk_text_iter_backward_to_tag_toggle ( N-GObject $tag --> Int  )

=item N-GObject $tag; (allow-none): a B<Gnome::Gtk3::TextTag>, or C<Any>

=end pod

sub gtk_text_iter_backward_to_tag_toggle ( N-GTextIter $iter, N-GObject $tag )
  returns int32
  is native(&gtk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_find_char:
=begin pod
=head2 [[gtk_] text_iter_] forward_find_char

Advances I<iter>, calling I<pred> on each character. If
I<pred> returns C<1>, returns C<1> and stops scanning.
If I<pred> never returns C<1>, I<iter> is set to I<limit> if
I<limit> is non-C<Any>, otherwise to the end iterator.

Returns: whether a match was found

  method gtk_text_iter_forward_find_char ( GtkTextCharPredicate $pred, Pointer $user_data, N-GObject $limit --> Int  )

=item GtkTextCharPredicate $pred; (scope call): a function to be called on each character
=item Pointer $user_data; user data for I<pred>
=item N-GObject $limit; (allow-none): search limit, or C<Any> for none

=end pod

sub gtk_text_iter_forward_find_char ( N-GTextIter $iter, GtkTextCharPredicate $pred, Pointer $user_data, N-GObject $limit )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_find_char:
=begin pod
=head2 [[gtk_] text_iter_] backward_find_char

Same as C<gtk_text_iter_forward_find_char()>, but goes backward from I<iter>.

Returns: whether a match was found

  method gtk_text_iter_backward_find_char ( GtkTextCharPredicate $pred, Pointer $user_data, N-GObject $limit --> Int  )

=item GtkTextCharPredicate $pred; (scope call): function to be called on each character
=item Pointer $user_data; user data for I<pred>
=item N-GObject $limit; (allow-none): search limit, or C<Any> for none

=end pod

sub gtk_text_iter_backward_find_char ( N-GTextIter $iter, GtkTextCharPredicate $pred, Pointer $user_data, N-GObject $limit )
  returns int32
  is native(&gtk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_forward_search:
=begin pod
=head2 [[gtk_] text_iter_] forward_search

Searches forward for I<str>. Any match is returned by setting
I<match_start> to the first character of the match and I<match_end> to the
first character after the match. The search will not continue past
I<limit>. Note that a search is a linear or O(n) operation, so you
may wish to use I<limit> to avoid locking up your UI on large
buffers.

I<match_start> will never be set to a B<Gnome::Gtk3::TextIter> located before I<iter>, even if
there is a possible I<match_end> after or at I<iter>.

Returns: whether a match was found

  method gtk_text_iter_forward_search ( Str $str, GtkTextSearchFlags $flags, N-GObject $match_start, N-GObject $match_end, N-GObject $limit --> Int  )

=item Str $str; a search string
=item GtkTextSearchFlags $flags; flags affecting how the search is done
=item N-GObject $match_start; (out caller-allocates) (allow-none): return location for start of match, or C<Any>
=item N-GObject $match_end; (out caller-allocates) (allow-none): return location for end of match, or C<Any>
=item N-GObject $limit; (allow-none): location of last possible I<match_end>, or C<Any> for the end of the buffer

=end pod

sub gtk_text_iter_forward_search ( N-GTextIter $iter, Str $str, int32 $flags, N-GObject $match_start, N-GObject $match_end, N-GObject $limit )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_backward_search:
=begin pod
=head2 [[gtk_] text_iter_] backward_search

Same as C<gtk_text_iter_forward_search()>, but moves backward.

I<match_end> will never be set to a B<Gnome::Gtk3::TextIter> located after I<iter>, even if
there is a possible I<match_start> before or at I<iter>.

Returns: whether a match was found

  method gtk_text_iter_backward_search ( Str $str, GtkTextSearchFlags $flags, N-GObject $match_start, N-GObject $match_end, N-GObject $limit --> Int  )

=item Str $str; search string
=item GtkTextSearchFlags $flags; bitmask of flags affecting the search
=item N-GObject $match_start; (out caller-allocates) (allow-none): return location for start of match, or C<Any>
=item N-GObject $match_end; (out caller-allocates) (allow-none): return location for end of match, or C<Any>
=item N-GObject $limit; (allow-none): location of last possible I<match_start>, or C<Any> for start of buffer

=end pod

sub gtk_text_iter_backward_search ( N-GTextIter $iter, Str $str, int32 $flags, N-GObject $match_start, N-GObject $match_end, N-GObject $limit )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_text_iter_equal:
=begin pod
=head2 [gtk_] text_iter_equal

Tests whether two iterators are equal, using the fastest possible
me