Virtual Method

GtkEditableget_selection_bounds

Declaration [src]

gboolean
get_selection_bounds (
  GtkEditable* editable,
  gint* start_pos,
  gint* 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 gint*
 

Location to store the starting position, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
end_pos gint*
 

Location to store the end position, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.

Return value

Returns: gboolean
 

TRUE if an area is selected, FALSE otherwise.