### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/TextView.rakumod
### ----------------------------------------------------
### -- Chunk 3 of 5
 C<GDK_EVENT_PROPAGATE> to propagate the event further.
Since: 3.16

  method handler (
    Unknown type GTK_TYPE_TEXT_EXTEND_SELECTION $granularity,
    Unknown type GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE $location,
    Unknown type GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE $start,
    Unknown type GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE $end,
    Int :$_handler_id,
    Gnome::GObject::Object :_widget($text_view),
    *%user-options
    --> int32
  );

=item $text_view; the object which received the signal
=item $granularity; the granularity type
=item $location; the location where to extend the selection
=item $start; where the selection should start
=item $end; where the selection should end
=end comment
=end pod


#-------------------------------------------------------------------------------
=begin pod
=head1 Properties

An example of using a string type property of a B<Gnome::Gtk3::Label> object. This is just showing how to set/read a property, not that it is the best way to do it. This is because a) The class initialization often provides some options to set some of the properties and b) the classes provide many methods to modify just those properties. In the case below one can use B<new(:label('my text label'))> or B<gtk_label_set_text('my text label')>.

  my Gnome::Gtk3::Label $label .= new;
  my Gnome::GObject::Value $gv .= new(:init(G_TYPE_STRING));
  $label.g-object-get-property( 'label', $gv);
  $gv.g-value-set-string('my text label');

=head2 Supported properties

=comment #TP:0:pixels-above-lines:
=head3 Pixels Above Lines



The B<Gnome::GObject::Value> type of property I<pixels-above-lines> is C<G_TYPE_INT>.

=comment #TP:0:pixels-below-lines:
=head3 Pixels Below Lines



The B<Gnome::GObject::Value> type of property I<pixels-below-lines> is C<G_TYPE_INT>.

=comment #TP:0:pixels-inside-wrap:
=head3 Pixels Inside Wrap



The B<Gnome::GObject::Value> type of property I<pixels-inside-wrap> is C<G_TYPE_INT>.

=comment #TP:0:editable:
=head3 Editable

Whether the text can be modified by the user
Default value: True


The B<Gnome::GObject::Value> type of property I<editable> is C<G_TYPE_BOOLEAN>.

=comment #TP:0:wrap-mode:
=head3 Wrap Mode

Whether to wrap lines never, at word boundaries_COMMA_ or at character boundaries
Default value: False


The B<Gnome::GObject::Value> type of property I<wrap-mode> is C<G_TYPE_ENUM>.

=comment #TP:0:justification:
=head3 Justification

Left, right_COMMA_ or center justification
Default value: False


The B<Gnome::GObject::Value> type of property I<justification> is C<G_TYPE_ENUM>.

=comment #TP:0:left-margin:
=head3 Left Margin


The default left margin for text in the text view.
Tags in the buffer may override the default.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.
Don't confuse this property with  I<margin-left>.

The B<Gnome::GObject::Value> type of property I<left-margin> is C<G_TYPE_INT>.

=comment #TP:0:right-margin:
=head3 Right Margin


The default right margin for text in the text view.
Tags in the buffer may override the default.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.
Don't confuse this property with  I<margin-right>.

The B<Gnome::GObject::Value> type of property I<right-margin> is C<G_TYPE_INT>.

=comment #TP:0:top-margin:
=head3 Top Margin


The top margin for text in the text view.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.
Don't confuse this property with  I<margin-top>.
Since: 3.18

The B<Gnome::GObject::Value> type of property I<top-margin> is C<G_TYPE_INT>.

=comment #TP:0:bottom-margin:
=head3 Bottom Margin


The bottom margin for text in the text view.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.
Don't confuse this property with  I<margin-bottom>.
Since: 3.18

The B<Gnome::GObject::Value> type of property I<bottom-margin> is C<G_TYPE_INT>.

=comment #TP:0:indent:
=head3 Indent



The B<Gnome::GObject::Value> type of property I<indent> is C<G_TYPE_INT>.

=comment #TP:0:tabs:
=head3 Tabs



The B<Gnome::GObject::Value> type of property I<tabs> is C<G_TYPE_BOXED>.

=comment #TP:0:cursor-visible:
=head3 Cursor Visible

If the insertion cursor is shown
Default value: True


The B<Gnome::GObject::Value> type of property I<cursor-visible> is C<G_TYPE_BOOLEAN>.

=comment #TP:0:buffer:
=head3 Buffer

The buffer which is displayed
Widget type: GTK_TYPE_TEXT_BUFFER


The B<Gnome::GObject::Value> type of property I<buffer> is C<G_TYPE_OBJECT>.

=comment #TP:0:overwrite:
=head3 Overwrite mode

Whether entered text overwrites existing contents
Default value: False


The B<Gnome::GObject::Value> type of property I<overwrite> is C<G_TYPE_BOOLEAN>.

=comment #TP:0:accepts-tab:
=head3 Accepts tab

Whether Tab will result in a tab character being entered
Default value: True


The B<Gnome::GObject::Value> type of property I<accepts-tab> is C<G_TYPE_BOOLEAN>.

=comment #TP:0:im-module:
=head3 IM module


Which IM (input method) module should be used for this text_view.
See B<Gnome::Gtk3::IMContext>.
Setting this to a non-C<Any> value overrides the
system-wide IM module setting. See the B<Gnome::Gtk3::Settings>
 I<gtk-im-module> property.
Since: 2.16

The B<Gnome::GObject::Value> type of property I<im-module> is C<G_TYPE_STRING>.

=comment #TP:0:input-purpose:
=head3 Purpose


The purpose of this text field.
This property can be used by on-screen keyboards and other input
methods to adjust their behaviour.
Since: 3.6
Widget type: GTK_TYPE_INPUT_PURPOSE

The B<Gnome::GObject::Value> type of property I<input-purpose> is C<G_TYPE_ENUM>.

=comment #TP:0:input-hints:
=head3 hints


Additional hints (beyond  I<input-purpose>) that
allow input methods to fine-tune their behaviour.
Since: 3.6

The B<Gnome::GObject::Value> type of property I<input-hints> is C<G_TYPE_FLAGS>.

=comment #TP:0:populate-all:
=head3 Populate all


If I<populate-all> is C<1>, the  I<populate-popup>
signal is also emitted for touch popups.
Since: 3.8

The B<Gnome::GObject::Value> type of property I<populate-all> is C<G_TYPE_BOOLEAN>.

=comment #TP:0:monospace:
=head3 Monospace


If C<1>, set the C<GTK_STYLE_CLASS_MONOSPACE> style class on the
text view to indicate that a monospace font is desired.
Since: 3.16

The B<Gnome::GObject::Value> type of property I<monospace> is C<G_TYPE_BOOLEAN>.
=end pod

































=finish
#-------------------------------------------------------------------------------
=begin pod
=head2 [gtk_] text_view_new

Creates a new B<Gnome::Gtk3::TextView>. If you don’t call C<gtk_text_view_set_buffer()>
before using the text view, an empty default buffer will be created
for you. Get the buffer with C<gtk_text_view_get_buffer()>. If you want
to specify your own buffer, consider C<gtk_text_view_new_with_buffer()>.

Returns: a new B<Gnome::Gtk3::TextView>

  method gtk_text_view_new ( --> N-GObject  )


=end pod

sub gtk_text_view_new (  )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] new_with_buffer

Creates a new B<Gnome::Gtk3::TextView> widget displaying the buffer
I<buffer>. One buffer can be shared among many widgets.
I<buffer> may be C<Any> to create a default buffer, in which case
this function is equivalent to C<gtk_text_view_new()>. The
text view adds its own reference count to the buffer; it does not
take over an existing reference.

Returns: a new B<Gnome::Gtk3::TextView>.

  method gtk_text_view_new_with_buffer ( N-GObject $buffer --> N-GObject  )

=item N-GObject $buffer; a B<Gnome::Gtk3::TextBuffer>

=end pod

sub gtk_text_view_new_with_buffer ( N-GObject $buffer )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] set_buffer

Sets I<buffer> as the buffer being displayed by I<text_view>. The previous
buffer displayed by the text view is unreferenced, and a reference is
added to I<buffer>. If you owned a reference to I<buffer> before passing it
to this function, you must remove that reference yourself; B<Gnome::Gtk3::TextView>
will not “adopt” it.

  method gtk_text_view_set_buffer ( N-GObject $buffer )

=item N-GObject $buffer; (allow-none): a B<Gnome::Gtk3::TextBuffer>

=end pod

sub gtk_text_view_set_buffer ( N-GObject $text_view, N-GObject $buffer )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_buffer

Returns the B<Gnome::Gtk3::TextBuffer> being displayed by this text view.
The reference count on the buffer is not incremented; the caller
of this function won’t own a new reference.

Returns: (transfer none): a B<Gnome::Gtk3::TextBuffer>

  method gtk_text_view_get_buffer ( --> N-GObject  )


=end pod

sub gtk_text_view_get_buffer ( N-GObject $text_view )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] scroll_to_iter

Scrolls I<text_view> so that I<iter> is on the screen in the position
indicated by I<xalign> and I<yalign>. An alignment of 0.0 indicates
left or top, 1.0 indicates right or bottom, 0.5 means center.
If I<use_align> is C<0>, the text scrolls the minimal distance to
get the mark onscreen, possibly not scrolling at all. The effective
screen for purposes of this function is reduced by a margin of size
I<within_margin>.

Note that this function uses the currently-computed height of the
lines in the text buffer. Line heights are computed in an idle
handler; so this function may not have the desired effect if it’s
called before the height computations. To avoid oddness, consider
using C<gtk_text_view_scroll_to_mark()> which saves a point to be
scrolled to after line validation.

Returns: C<1> if scrolling occurred

  method gtk_text_view_scroll_to_iter ( N-GObject $iter, Num $within_margin, Int $use_align, Num $xalign, Num $yalign --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>
=item Num $within_margin; margin as a [0.0,0.5) fraction of screen size
=item Int $use_align; whether to use alignment arguments (if C<0>, just get the mark onscreen)
=item Num $xalign; horizontal alignment of mark within visible area
=item Num $yalign; vertical alignment of mark within visible area

=end pod

sub gtk_text_view_scroll_to_iter ( N-GObject $text_view, N-GObject $iter, num64 $within_margin, int32 $use_align, num64 $xalign, num64 $yalign )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] scroll_to_mark

Scrolls I<text_view> so that I<mark> is on the screen in the position
indicated by I<xalign> and I<yalign>. An alignment of 0.0 indicates
left or top, 1.0 indicates right or bottom, 0.5 means center.
If I<use_align> is C<0>, the text scrolls the minimal distance to
get the mark onscreen, possibly not scrolling at all. The effective
screen for purposes of this function is reduced by a margin of size
I<within_margin>.

  method gtk_text_view_scroll_to_mark ( N-GObject $mark, Num $within_margin, Int $use_align, Num $xalign, Num $yalign )

=item N-GObject $mark; a B<Gnome::Gtk3::TextMark>
=item Num $within_margin; margin as a [0.0,0.5) fraction of screen size
=item Int $use_align; whether to use alignment arguments (if C<0>, just  get the mark onscreen)
=item Num $xalign; horizontal alignment of mark within visible area
=item Num $yalign; vertical alignment of mark within visible area

=end pod

sub gtk_text_view_scroll_to_mark ( N-GObject $text_view, N-GObject $mark, num64 $within_margin, int32 $use_align, num64 $xalign, num64 $yalign )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] scroll_mark_onscreen

Scrolls I<text_view> the minimum distance such that I<mark> is contained
within the visible area of the widget.

  method gtk_text_view_scroll_mark_onscreen ( N-GObject $mark )

=item N-GObject $mark; a mark in the buffer for I<text_view>

=end pod

sub gtk_text_view_scroll_mark_onscreen ( N-GObject $text_view, N-GObject $mark )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] move_mark_onscreen

Moves a mark within the buffer so that it's
located within the currently-visible text area.

Returns: C<1> if the mark moved (wasn’t already onscreen)

  method gtk_text_view_move_mark_onscreen ( N-GObject $mark --> Int  )

=item N-GObject $mark; a B<Gnome::Gtk3::TextMark>

=end pod

sub gtk_text_view_move_mark_onscreen ( N-GObject $text_view, N-GObject $mark )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] place_cursor_onscreen

Moves the cursor to the currently visible region of the
buffer, it it isn’t there already.

Returns: C<1> if the cursor had to be moved.

  method gtk_text_view_place_cursor_onscreen ( --> Int  )


=end pod

sub gtk_text_view_place_cursor_onscreen ( N-GObject $text_view )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_visible_rect

Fills I<visible_rect> with the currently-visible
region of the buffer, in buffer coordinates. Convert to window coordinates
with C<gtk_text_view_buffer_to_window_coords()>.

  method gtk_text_view_get_visible_rect ( N-GObject $visible_rect )

=item N-GObject $visible_rect; (out): rectangle to fill

=end pod

sub gtk_text_view_get_visible_rect ( N-GObject $text_view, N-GObject $visible_rect )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] set_cursor_visible

Toggles whether the insertion point should be displayed. A buffer with
no editable text probably shouldn’t have a visible cursor, so you may
want to turn the cursor off.

Note that this property may be overridden by the
prop C<gtk-keynave-use-caret> settings.

  method gtk_text_view_set_cursor_visible ( Int $setting )

=item Int $setting; whether to show the insertion cursor

=end pod

sub gtk_text_view_set_cursor_visible ( N-GObject $text_view, int32 $setting )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_cursor_visible

Find out whether the cursor should be displayed.

Returns: whether the insertion mark is visible

  method gtk_text_view_get_cursor_visible ( --> Int  )


=end pod

sub gtk_text_view_get_cursor_visible ( N-GObject $text_view )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] reset_cursor_blink

Ensures that the cursor is shown (i.e. not in an 'off' blink
interval) and resets the time that it will stay blinking (or
visible, in case blinking is disabled).

This function should be called in response to user input
(e.g. from derived classes that override the textview's
sig C<key-press-event> handler).

Since: 3.20

  method gtk_text_view_reset_cursor_blink ( )


=end pod

sub gtk_text_view_reset_cursor_blink ( N-GObject $text_view )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_cursor_locations

Given an I<iter> within a text layout, determine the positions of the
strong and weak cursors if the insertion point is at that
iterator. The position of each cursor is stored as a zero-width
rectangle. The strong cursor location is the location where
characters of the directionality equal to the base direction of the
paragraph are inserted.  The weak cursor location is the location
where characters of the directionality opposite to the base
direction of the paragraph are inserted.

If I<iter> is C<Any>, the actual cursor position is used.

Note that if I<iter> happens to be the actual cursor position, and
there is currently an IM preedit sequence being entered, the
returned locations will be adjusted to account for the preedit
cursor’s offset within the preedit sequence.

The rectangle position is in buffer coordinates; use
C<gtk_text_view_buffer_to_window_coords()> to convert these
coordinates to coordinates for one of the windows in the text view.

Since: 3.0

  method gtk_text_view_get_cursor_locations ( N-GObject $iter, N-GObject $strong, N-GObject $weak )

=item N-GObject $iter; (allow-none): a B<Gnome::Gtk3::TextIter>
=item N-GObject $strong; (out) (allow-none): location to store the strong cursor position (may be C<Any>)
=item N-GObject $weak; (out) (allow-none): location to store the weak cursor position (may be C<Any>)

=end pod

sub gtk_text_view_get_cursor_locations ( N-GObject $text_view, N-GObject $iter, N-GObject $strong, N-GObject $weak )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_iter_location

Gets a rectangle which roughly contains the character at I<iter>.
The rectangle position is in buffer coordinates; use
C<gtk_text_view_buffer_to_window_coords()> to convert these
coordinates to coordinates for one of the windows in the text view.

  method gtk_text_view_get_iter_location ( N-GObject $iter, N-GObject $location )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>
=item N-GObject $location; (out): bounds of the character at I<iter>

=end pod

sub gtk_text_view_get_iter_location ( N-GObject $text_view, N-GObject $iter, N-GObject $location )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_iter_at_location

Retrieves the iterator at buffer coordinates I<x> and I<y>. Buffer
coordinates are coordinates for the entire buffer, not just the
currently-displayed portion.  If you have coordinates from an
event, you have to convert those to buffer coordinates with
C<gtk_text_view_window_to_buffer_coords()>.

Returns: C<1> if the position is over text

  method gtk_text_view_get_iter_at_location ( N-GObject $iter, Int $x, Int $y --> Int  )

=item N-GObject $iter; (out): a B<Gnome::Gtk3::TextIter>
=item Int $x; x position, in buffer coordinates
=item Int $y; y position, in buffer coordinates

=end pod

sub gtk_text_view_get_iter_at_location ( N-GObject $text_view, N-GObject $iter, int32 $x, int32 $y )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_iter_at_position

Retrieves the iterator pointing to the character at buffer
coordinates I<x> and I<y>. Buffer coordinates are coordinates for
the entire buffer, not just the currently-displayed portion.
If you have coordinates from an event, you have to convert
those to buffer coordinates with
C<gtk_text_view_window_to_buffer_coords()>.

Note that this is different from C<gtk_text_view_get_iter_at_location()>,
which returns cursor locations, i.e. positions between
characters.

Returns: C<1> if the position is over text

Since: 2.6

  method gtk_text_view_get_iter_at_position ( N-GObject $iter, Int $trailing, Int $x, Int $y --> Int  )

=item N-GObject $iter; (out): a B<Gnome::Gtk3::TextIter>
=item Int $trailing; (out) (allow-none): if non-C<Any>, location to store an integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.
=item Int $x; x position, in buffer coordinates
=item Int $y; y position, in buffer coordinates

=end pod

sub gtk_text_view_get_iter_at_position ( N-GObject $text_view, N-GObject $iter, int32 $trailing, int32 $x, int32 $y )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_line_yrange

Gets the y coordinate of the top of the line containing I<iter>,
and the height of the line. The coordinate is a buffer coordinate;
convert to window coordinates with C<gtk_text_view_buffer_to_window_coords()>.

  method gtk_text_view_get_line_yrange ( N-GObject $iter, Int $y, Int $height )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>
=item Int $y; (out): return location for a y coordinate
=item Int $height; (out): return location for a height

=end pod

sub gtk_text_view_get_line_yrange ( N-GObject $text_view, N-GObject $iter, int32 $y, int32 $height )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_line_at_y

Gets the B<Gnome::Gtk3::TextIter> at the start of the line containing
the coordinate I<y>. I<y> is in buffer coordinates, convert from
window coordinates with C<gtk_text_view_window_to_buffer_coords()>.
If non-C<Any>, I<line_top> will be filled with the coordinate of the top
edge of the line.

  method gtk_text_view_get_line_at_y ( N-GObject $target_iter, Int $y, Int $line_top )

=item N-GObject $target_iter; (out): a B<Gnome::Gtk3::TextIter>
=item Int $y; a y coordinate
=item Int $line_top; (out): return location for top coordinate of the line

=end pod

sub gtk_text_view_get_line_at_y ( N-GObject $text_view, N-GObject $target_iter, int32 $y, int32 $line_top )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] buffer_to_window_coords

Converts coordinate (I<buffer_x>, I<buffer_y>) to coordinates for the window
I<win>, and stores the result in (I<window_x>, I<window_y>).

Note that you can’t convert coordinates for a nonexisting window (see
C<gtk_text_view_set_border_window_size()>).

  method gtk_text_view_buffer_to_window_coords ( GtkTextWindowType $win, Int $buffer_x, Int $buffer_y, Int $window_x, Int $window_y )

=item GtkTextWindowType $win; a B<Gnome::Gtk3::TextWindowType> except C<GTK_TEXT_WINDOW_PRIVATE>
=item Int $buffer_x; buffer x coordinate
=item Int $buffer_y; buffer y coordinate
=item Int $window_x; (out) (allow-none): window x coordinate return location or C<Any>
=item Int $window_y; (out) (allow-none): window y coordinate return location or C<Any>

=end pod

sub gtk_text_view_buffer_to_window_coords ( N-GObject $text_view, int32 $win, int32 $buffer_x, int32 $buffer_y, int32 $window_x, int32 $window_y )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] window_to_buffer_coords

Converts coordinates on the window identified by I<win> to buffer
coordinates, storing the result in (I<buffer_x>,I<buffer_y>).

Note that you can’t convert coordinates for a nonexisting window (see
C<gtk_text_view_set_border_window_size()>).

  method gtk_text_view_window_to_buffer_coords ( GtkTextWindowType $win, Int $window_x, Int $window_y, Int $buffer_x, Int $buffer_y )

=item GtkTextWindowType $win; a B<Gnome::Gtk3::TextWindowType> except C<GTK_TEXT_WINDOW_PRIVATE>
=item Int $window_x; window x coordinate
=item Int $window_y; window y coordinate
=item Int $buffer_x; (out) (allow-none): buffer x coordinate return location or C<Any>
=item Int $buffer_y; (out) (allow-none): buffer y coordinate return location or C<Any>

=end pod

sub gtk_text_view_window_to_buffer_coords ( N-GObject $text_view, int32 $win, int32 $window_x, int32 $window_y, int32 $buffer_x, int32 $buffer_y )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_window

Retrieves the B<Gnome::Gdk3::Window> corresponding to an area of the text view;
possible windows include the overall widget window, child windows
on the left, right, top, bottom, and the window that displays the
text buffer. Windows are C<Any> and nonexistent if their width or
height is 0, and are nonexistent before the widget has been
realized.

Returns: (nullable) (transfer none): a B<Gnome::Gdk3::Window>, or C<Any>

  method gtk_text_view_get_window ( GtkTextWindowType $win --> N-GObject  )

=item GtkTextWindowType $win; window to get

=end pod

sub gtk_text_view_get_window ( N-GObject $text_view, int32 $win )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_window_type

Usually used to find out which window an event corresponds to.
If you connect to an event signal on I<text_view>, this function
should be called on `event->window` to
see which window it was.

Returns: the window type.

  method gtk_text_view_get_window_type ( N-GObject $window --> GtkTextWindowType  )

=item N-GObject $window; a window type

=end pod

sub gtk_text_view_get_window_type ( N-GObject $text_view, N-GObject $window )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] set_border_window_size

Sets the width of C<GTK_TEXT_WINDOW_LEFT> or C<GTK_TEXT_WINDOW_RIGHT>,
or the height of C<GTK_TEXT_WINDOW_TOP> or C<GTK_TEXT_WINDOW_BOTTOM>.
Automatically destroys the corresponding window if the size is set
to 0, and creates the window if the size is set to non-zero.  This
function can only be used for the “border windows,” it doesn’t work
with C<GTK_TEXT_WINDOW_WIDGET>, C<GTK_TEXT_WINDOW_TEXT>, or
C<GTK_TEXT_WINDOW_PRIVATE>.

  method gtk_text_view_set_border_window_size ( GtkTextWindowType $type, Int $size )

=item GtkTextWindowType $type; window to affect
=item Int $size; width or height of the window

=end pod

sub gtk_text_view_set_border_window_size ( N-GObject $text_view, int32 $type, int32 $size )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] get_border_window_size

Gets the width of the specified border window. See
C<gtk_text_view_set_border_window_size()>.

Returns: width of window

  method gtk_text_view_get_border_window_size ( GtkTextWindowType $type --> Int  )

=item GtkTextWindowType $type; window to return size from

=end pod

sub gtk_text_view_get_border_window_size ( N-GObject $text_view, int32 $type )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] forward_display_line

Moves the given I<iter> forward by one display (wrapped) line.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view’s width; paragraphs are the same in all
views, since they depend on the contents of the B<Gnome::Gtk3::TextBuffer>.

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

  method gtk_text_view_forward_display_line ( N-GObject $iter --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>

=end pod

sub gtk_text_view_forward_display_line ( N-GObject $text_view, N-GObject $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] backward_display_line

Moves the given I<iter> backward by one display (wrapped) line.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view’s width; paragraphs are the same in all
views, since they depend on the contents of the B<Gnome::Gtk3::TextBuffer>.

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

  method gtk_text_view_backward_display_line ( N-GObject $iter --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>

=end pod

sub gtk_text_view_backward_display_line ( N-GObject $text_view, N-GObject $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] forward_display_line_end

Moves the given I<iter> forward to the next display line end.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view’s width; paragraphs are the same in all
views, since they depend on the contents of the B<Gnome::Gtk3::TextBuffer>.

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

  method gtk_text_view_forward_display_line_end ( N-GObject $iter --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>

=end pod

sub gtk_text_view_forward_display_line_end ( N-GObject $text_view, N-GObject $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] backward_display_line_start

Moves the given I<iter> backward to the next display line start.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view’s width; paragraphs are the same in all
views, since they depend on the contents of the B<Gnome::Gtk3::TextBuffer>.

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

  method gtk_text_view_backward_display_line_start ( N-GObject $iter --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>

=end pod

sub gtk_text_view_backward_display_line_start ( N-GObject $text_view, N-GObject $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] starts_display_line

Determines whether I<iter> is at the start of a display line.
See C<gtk_text_view_forward_display_line()> for an explanation of
display lines vs. paragraphs.

Returns: C<1> if I<iter> begins a wrapped line

  method gtk_text_view_starts_display_line ( N-GObject $iter --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>

=end pod

sub gtk_text_view_starts_display_line ( N-GObject $text_view, N-GObject $iter )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] move_visually

Move the iterator a given number of characters visually, treating
it as the strong cursor position. If I<count> is positive, then the
new strong cursor position will be I<count> positions to the right of
the old cursor position. If I<count> is negative then the new strong
cursor position will be I<count> positions to the left of the old
cursor position.

In the presence of bi-directional text, the correspondence
between logical and visual order will depend on the direction
of the current run, and there may be jumps when the cursor
is moved off of the end of a run.

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

  method gtk_text_view_move_visually ( N-GObject $iter, Int $count --> Int  )

=item N-GObject $iter; a B<Gnome::Gtk3::TextIter>
=item Int $count; number of characters to move (negative moves left,  positive moves right)

=end pod

sub gtk_text_view_move_visually ( N-GObject $text_view, N-GObject $iter, int32 $count )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
=begin pod
=head2 [[gtk_] text_view_] im_context_filter_keypress

Allow the B<Gnome::Gtk3::TextView> input method to internally handle key press
and release events. If this function