Method

GtkEditableget_selection_bounds

Declaration [src]

gboolean
gtk_editable_get_selection_bounds (
  GtkEditable* editable,
  int* start_pos,
  int* end_pos
)

Description [src]

Retrieves the selection bound of the editable.

start_pos will be filled with the start of the selection and end_pos with end. If no text was selected both will be identical and FALSE will be returned.

Note that positions are specified in characters, not bytes.

Parameters

start_pos

Type: int*

Location to store the starting position.

The argument will be set by the function.
The argument can be NULL.
end_pos

Type: int*

Location to store the end position.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: gboolean

TRUE if there is a non-empty selection, FALSE otherwise.