GtkTextBuffer::get_selection_bounds

bool get_selection_bounds();

Returns an array containing iterators that point at the start and end of the selection, if any. If there is no selection an empty array is returned.