Gtk.AccessibleText
Description: Reference for Gtk.AccessibleText

### Interface

# GtkAccessibleText

unstable since: 4.14

#### Description [src]

    interface Gtk.AccessibleText : Gtk.Accessible

An interface for accessible objects containing formatted text.

The `GtkAccessibleText` interfaces is meant to be implemented by accessible objects that have text formatted with attributes, or non-trivial text contents.

You should use the `GtkAccessibleProperty` or the `GtkAccessibleProperty` properties for accessible objects containing simple, unformatted text.

Available since: 4.14

#### Prerequisite

In order to implement AccessibleText, your type must inherit from`GtkAccessible`.

#### Implementations

- GtkInscription
- GtkLabel
- GtkText
- GtkTextView

#### Instance methods

###### gtk_accessible_text_update_caret_position

Updates the position of the caret.

unstable since: 4.14

###### gtk_accessible_text_update_contents

Notifies assistive technologies of a change in contents.

unstable since: 4.14

###### gtk_accessible_text_update_selection_bound

Updates the boundary of the selection.

unstable since: 4.14

#### Interface structure

    struct GtkAccessibleTextInterface {
      GBytes* (* get_contents) (
        GtkAccessibleText* self,
        unsigned int start,
        unsigned int end
      );
      GBytes* (* get_contents_at) (
        GtkAccessibleText* self,
        unsigned int offset,
        GtkAccessibleTextGranularity granularity,
        unsigned int* start,
        unsigned int* end
      );
      unsigned int (* get_caret_position) (
        GtkAccessibleText* self
      );
      gboolean (* get_selection) (
        GtkAccessibleText* self,
        gsize* n_ranges,
        GtkAccessibleTextRange** ranges
      );
      gboolean (* get_attributes) (
        GtkAccessibleText* self,
        unsigned int offset,
        gsize* n_ranges,
        GtkAccessibleTextRange** ranges,
        char*** attribute_names,
        char*** attribute_values
      );

    }

The interface vtable for accessible objects containing text.

###### Interface members

`get_contents` |
    GBytes* (* get_contents) (
        GtkAccessibleText* self,
        unsigned int start,
        unsigned int end
      )
| No description available.
`get_contents_at` |
    GBytes* (* get_contents_at) (
        GtkAccessibleText* self,
        unsigned int offset,
        GtkAccessibleTextGranularity granularity,
        unsigned int* start,
        unsigned int* end
      )
| No description available.
`get_caret_position` |
    unsigned int (* get_caret_position) (
        GtkAccessibleText* self
      )
| No description available.
`get_selection` |
    gboolean (* get_selection) (
        GtkAccessibleText* self,
        gsize* n_ranges,
        GtkAccessibleTextRange** ranges
      )
| No description available.
`get_attributes` |
    gboolean (* get_attributes) (
        GtkAccessibleText* self,
        unsigned int offset,
        gsize* n_ranges,
        GtkAccessibleTextRange** ranges,
        char*** attribute_names,
        char*** attribute_values
      )
| No description available.

#### Virtual methods

###### Gtk.AccessibleText.get_attributes

Retrieves the text attributes inside the accessible object.

unstable since: 4.14

###### Gtk.AccessibleText.get_caret_position

Retrieves the position of the caret inside the accessible object.

unstable since: 4.14

###### Gtk.AccessibleText.get_contents

Retrieve the current contents of the accessible object within the given range.

unstable since: 4.14

###### Gtk.AccessibleText.get_contents_at

Retrieve the current contents of the accessible object starting from the given offset, and using the given granularity.

unstable since: 4.14

###### Gtk.AccessibleText.get_selection

Retrieves the selection ranges in the accessible object.

unstable since: 4.14