Method

Gtk.TextBuffer.get_selection_bounds

Declaration [src]

gboolean
gtk_text_buffer_get_selection_bounds (
  GtkTextBuffer* buffer,
  GtkTextIter* start,
  GtkTextIter* end
)

Description [src]

Returns TRUE if some text is selected; places the bounds of the selection in start and end.

If the selection has length 0, then start and end are filled in with the same value. start and end will be in ascending order. If start and end are NULL, then they are not filled in, but the return value still indicates whether text is selected.

Parameters

start GtkTextIter
 

iterator to initialize with selection start

 Direction: out
 Ownership is not transferred to the callee
end GtkTextIter
 

iterator to initialize with selection end

 Direction: out
 Ownership is not transferred to the callee

Return value

Returns: gboolean

whether the selection has nonzero length