Atspi.Text
Description: Reference for Atspi.Text

### Interface

# AtspiText

#### Description [src]

    interface Atspi.Text : GObject.Object

An interface implemented by objects which place textual information onscreen.

The text interface should be implemented by objects which place textual information onscreen as character strings or glyphs. The text interface allows access to textual content including display attributes and semantic hints associated with runs of text, and to bounding information for glyphs and substrings. It also allows portions of text to be selected, if the objects StateSet includes STATE_SELECTABLE_TEXT.

#### Prerequisite

In order to implement Text, your type must inherit from`GObject`.

#### Implementations

- AtspiAccessible

#### Instance methods

###### atspi_text_add_selection

Selects some text (adds a text selection) in an `AtspiText` object.

###### atspi_text_get_attribute_run

Gets a set of attributes applied to a range of text from an `AtspiText` object, optionally including its ‘default’ attributes.

###### atspi_text_get_attribute_value

Gets the value of a named attribute at a given offset.

deprecated: 2.10

###### atspi_text_get_attributes

Gets the attributes applied to a range of text from an `AtspiText` object. The text attributes correspond to CSS attributes where possible. DEPRECATED

deprecated: 2.10

###### atspi_text_get_bounded_ranges

Gets the ranges of text from an `AtspiText` object which lie within the bounds defined by (`x`, `y`) and (`x`+`width`, `y`+`height`).

###### atspi_text_get_caret_offset

Gets the current offset of the text caret in an `AtspiText` object.

###### atspi_text_get_character_at_offset

Gets the character at a given offset for an `AtspiText` object.

###### atspi_text_get_character_count

Gets the character count of an `AccessibleText` object.

###### atspi_text_get_character_extents

Gets a bounding box containing the glyph representing the character at a particular text offset. The returned values are meaningful only if the Text has both STATE_VISIBLE and STATE_SHOWING.

###### atspi_text_get_default_attributes

Gets the default attributes applied to an `AtspiText` object. The text attributes correspond to CSS attributes where possible. The combination of this attribute set and the attributes reported by #atspi_text_get_attributes describes the entire set of text attributes over a range.

###### atspi_text_get_n_selections

Gets the number of active non-contiguous selections for an `AtspiText` object.

###### atspi_text_get_offset_at_point

Gets the character offset into the text at a given point.

###### atspi_text_get_range_extents

Gets the bounding box for text within a range in an `AtspiText` object. The returned values are meaningful only if the Text has both STATE_VISIBLE and STATE_SHOWING.

###### atspi_text_get_selection

Gets the bounds of the `selection_num`-th active text selection for an `AtspiText` object.

###### atspi_text_get_string_at_offset

Gets a portion of the text exposed through an `AtspiText` according to a given `offset` and a specific `granularity`, along with the start and end offsets defining the boundaries of such a portion of text.

since: 2.9.90

###### atspi_text_get_text

Gets a range of text from an `AtspiText` object. The number of bytes in the returned string may exceed either end_offset or start_offset, since UTF-8 is a variable-width encoding.

###### atspi_text_get_text_after_offset

Gets delimited text from an `AtspiText` object which follows a given text offset.

###### atspi_text_get_text_at_offset

Gets delimited text from an `AtspiText` object which includes a given text offset.

deprecated: 2.10

###### atspi_text_get_text_attribute_value

Gets the value of a named attribute at a given offset.

###### atspi_text_get_text_attributes

Gets the attributes applied to a range of text from an `AtspiText` object. The text attributes correspond to CSS attributes where possible. DEPRECATED

###### atspi_text_get_text_before_offset

Gets delimited text from an `AtspiText` object which precedes a given text offset.

###### atspi_text_remove_selection

De-selects a text selection.

###### atspi_text_scroll_substring_to

Scrolls whatever container of the `AtspiText` text range so it becomes visible on the screen.

###### atspi_text_scroll_substring_to_point

Scrolls whatever container of the `AtspiText` text range so it becomes visible on the screen at a given position.

###### atspi_text_set_caret_offset

Moves the text caret to a given position.

###### atspi_text_set_selection

Changes the bounds of an existing `AtspiText` text selection.