### Struct

# Atspi TextSelection

since: 2.52

#### Description [src]

    struct AtspiTextSelection {
      AtspiAccessible* start_object;
      gint start_offset;
      AtspiAccessible* end_object;
      gint end_offset;
      gboolean start_is_active;
    }

This structure represents a single text selection within a document. This selection is defined by two points in the content, where each one is defined by an AtkObject supporting the AtkText interface and a character offset relative to it.

The end object must appear after the start object in the accessibility tree, i.e. the end object must be reachable from the start object by navigating forward (next, first child etc).

This struct also contains a `start_is_active` boolean, to communicate if the start of the selection is the active point or not.

The active point corresponds to the user’s focus or point of interest. The user moves the active point to expand or collapse the range. The anchor point is the other point of the range and typically remains constant. In most cases, anchor is the start of the range and active is the end. However, when selecting backwards (e.g. pressing shift+left arrow in a text field), the start of the range is the active point, as the user moves this to manipulate the selection.

###### Structure members

`start_object`

  The AtspiAccessible containing the start of the selection.

`start_offset`

  The text offset of the beginning of the selection within `start_object`.

`end_object`

  The AtspiAccessible containing the end of the selection.

`end_offset`

  The text offset of the end of the selection within `end_object`.

`start_is_active`

  A gboolean indicating whether the start of the selection is the active point.

Available since: 2.52