Atspi.Accessible

g Atspi.Accessible Atspi.Accessible Atspi.Action Atspi.Action Atspi.Action->Atspi.Accessible Atspi.Collection Atspi.Collection Atspi.Collection->Atspi.Accessible Atspi.Component Atspi.Component Atspi.Component->Atspi.Accessible Atspi.Document Atspi.Document Atspi.Document->Atspi.Accessible Atspi.EditableText Atspi.EditableText Atspi.EditableText->Atspi.Accessible Atspi.Hypertext Atspi.Hypertext Atspi.Hypertext->Atspi.Accessible Atspi.Image Atspi.Image Atspi.Image->Atspi.Accessible Atspi.Object Atspi.Object Atspi.Object->Atspi.Accessible Atspi.Selection Atspi.Selection Atspi.Selection->Atspi.Accessible Atspi.Table Atspi.Table Atspi.Table->Atspi.Accessible Atspi.TableCell Atspi.TableCell Atspi.TableCell->Atspi.Accessible Atspi.Text Atspi.Text Atspi.Text->Atspi.Accessible Atspi.Value Atspi.Value Atspi.Value->Atspi.Accessible GObject.GInterface GObject.GInterface GObject.GInterface->Atspi.Action GObject.GInterface->Atspi.Collection GObject.GInterface->Atspi.Component GObject.GInterface->Atspi.Document GObject.GInterface->Atspi.EditableText GObject.GInterface->Atspi.Hypertext GObject.GInterface->Atspi.Image GObject.GInterface->Atspi.Selection GObject.GInterface->Atspi.Table GObject.GInterface->Atspi.TableCell GObject.GInterface->Atspi.Text GObject.GInterface->Atspi.Value GObject.Object GObject.Object GObject.Object->Atspi.Object

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Atspi.Action (6), Atspi.Collection (5), Atspi.Component (14), Atspi.Document (5), Atspi.EditableText (6), Atspi.Hypertext (3), Atspi.Image (5), Atspi.Selection (8), Atspi.Table (26), Atspi.TableCell (8), Atspi.Text (24), Atspi.Value (6)

Structs:

GObject.ObjectClass (5)

clear_cache ()

clear_cache_single ()

get_accessible_id ()

get_action_iface ()

get_application ()

get_atspi_version ()

get_attributes ()

get_attributes_as_array ()

get_child_at_index (child_index)

get_child_count ()

get_collection_iface ()

get_component_iface ()

get_description ()

get_document_iface ()

get_editable_text_iface ()

get_hyperlink ()

get_hypertext_iface ()

get_id ()

get_image_iface ()

get_index_in_parent ()

get_interfaces ()

get_localized_role_name ()

get_name ()

get_object_locale ()

get_parent ()

get_process_id ()

get_relation_set ()

get_role ()

get_role_name ()

get_selection_iface ()

get_state_set ()

get_table_cell ()

get_table_iface ()

get_text_iface ()

get_toolkit_name ()

get_toolkit_version ()

get_value_iface ()

set_cache_mask (mask)

Virtual Methods

Inherited:

GObject.Object (7)

do_mode_changed (enabled)

do_region_changed (current_offset, last_offset)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

mode-changed

The signal “mode-changed” is emitted by a screen reader to indicate that its mode has changed.

region-changed

The signal “region-changed” is emitted by a screen reader to indicate that it is now reading or tracking a new object, or, a new piece of text within an object.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

accessible_parent

Atspi.Accessible

r

attributes

{object: object}

r

cached_properties

int

r

children

[object]

r

description

str

r

interfaces

int

r

name

str

r

parent

Atspi.Object

r

role

Atspi.Role

r

states

Atspi.StateSet

r

Class Details

class Atspi.Accessible(**kwargs)
Bases:

Atspi.Object, Atspi.Action, Atspi.Collection, Atspi.Component, Atspi.Document, Atspi.EditableText, Atspi.Hypertext, Atspi.Image, Atspi.Selection, Atspi.Table, Atspi.TableCell, Atspi.Text, Atspi.Value

Abstract:

No

Structure:

Atspi.AccessibleClass

The base interface which is implemented by all accessible objects.

All objects support interfaces for querying their contained ‘children’ and position in the accessible-object hierarchy, whether or not they actually have children.

clear_cache()

Clears the cached information for the given accessible and all of its descendants.

clear_cache_single()

Clears the cached information only for the given accessible.

get_accessible_id()
Raises:

GLib.Error

Returns:

a character string representing the accessible id of the Atspi.Accessible object or None on exception.

Return type:

str

Gets the accessible id of the accessible. This is not meant to be presented to the user, but to be an id which is stable over application development. Typically, this is the gtkbuilder id.

New in version 2.34.

get_action_iface()
Returns:

a pointer to an Atspi.Action interface instance, or None if self does not implement Atspi.Action.

Return type:

Atspi.Action

Gets the Atspi.Action interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_action_iface instead.

get_application()
Raises:

GLib.Error

Returns:

the containing Atspi.Application instance for this object.

Return type:

Atspi.Accessible

Gets the containing Atspi.Application for an object.

get_atspi_version()
Raises:

GLib.Error

Returns:

a UTF-8 string indicating the AT-SPI version for the Atspi.Accessible object or None on exception.

Return type:

str

Gets the AT-SPI IPC specification version supported by the application pointed to by the Atspi.Accessible object. Only works on application root objects.

get_attributes()
Raises:

GLib.Error

Returns:

The name-value-pair attributes assigned to this object.

Return type:

{str: str}

Gets the #AttributeSet representing any assigned name-value pair attributes or annotations for this object. For typographic, textual, or textually-semantic attributes, see Atspi.Text.get_text_attributes instead.

get_attributes_as_array()
Raises:

GLib.Error

Returns:

The name-value-pair attributes assigned to this object.

Return type:

[str]

Gets a GLib.Array representing any assigned name-value pair attributes or annotations for this object. For typographic, textual, or textually-semantic attributes, see atspi_text_get_attributes_as_array instead.

get_child_at_index(child_index)
Parameters:

child_index (int) – a #long indicating which child is specified.

Raises:

GLib.Error

Returns:

a pointer to the Atspi.Accessible child object at index child_index or None on exception.

Return type:

Atspi.Accessible

Gets the Atspi.Accessible child of an Atspi.Accessible object at a given index.

get_child_count()
Raises:

GLib.Error

Returns:

a #long indicating the number of Atspi.Accessible children contained by an Atspi.Accessible object or -1 on exception.

Return type:

int

Gets the number of children contained by an Atspi.Accessible object.

get_collection_iface()
Returns:

a pointer to an Atspi.Collection interface instance, or None if self does not implement Atspi.Collection.

Return type:

Atspi.Collection

Gets the Atspi.Collection interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_collection_iface instead.

get_component_iface()
Returns:

a pointer to an Atspi.Component interface instance, or None if self does not implement Atspi.Component.

Return type:

Atspi.Component

Gets the Atspi.Component interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_component_iface instead.

get_description()
Raises:

GLib.Error

Returns:

a UTF-8 string describing the Atspi.Accessible object or None on exception.

Return type:

str

Gets the description of an Atspi.Accessible object.

get_document_iface()
Returns:

a pointer to an Atspi.Document interface instance, or None if self does not implement Atspi.Document.

Return type:

Atspi.Document

Gets the Atspi.Document interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_document_iface instead.

get_editable_text_iface()
Returns:

a pointer to an Atspi.EditableText interface instance, or None if self does not implement Atspi.EditableText.

Return type:

Atspi.EditableText

Gets the Atspi.EditableText interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_editable_text_iface instead.

Returns:

the Atspi.Hyperlink object associated with the given Atspi.Accessible, or None if not supported.

Return type:

Atspi.Hyperlink

Gets the Atspi.Hyperlink interface for an Atspi.Accessible.

get_hypertext_iface()
Returns:

a pointer to an Atspi.Hypertext interface instance, or None if self does not implement Atspi.Hypertext.

Return type:

Atspi.Hypertext

Gets the Atspi.Hypertext interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_hypertext_iface instead.

get_id()
Raises:

GLib.Error

Returns:

a positive int indicating the id for the Atspi.Accessible object or -1 on exception.

Return type:

int

Gets the application id for a Atspi.Accessible object. Only works on application root objects.

get_image_iface()
Returns:

a pointer to an Atspi.Image interface instance, or None if self does not implement Atspi.Image.

Return type:

Atspi.Image

Gets the Atspi.Image interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_image_iface instead.

get_index_in_parent()
Raises:

GLib.Error

Returns:

a int indicating the index of the Atspi.Accessible object in its parent, or -1 if self has no containing parent or on exception.

Return type:

int

Gets the index of an Atspi.Accessible object within its parent’s Atspi.Accessible children list.

get_interfaces()
Returns:

A GLib.Array of strings describing the interfaces supported by the object. Interfaces are denoted in short-hand (i.e. “Component”, “Text” etc.).

Return type:

[str]

A set of pointers to all interfaces supported by an Atspi.Accessible.

get_localized_role_name()
Raises:

GLib.Error

Returns:

a localized, UTF-8 string specifying the type of UI role played by an Atspi.Accessible object.

Return type:

str

Gets a UTF-8 string corresponding to the name of the role played by an object, translated to the current locale. This method will return useful values for roles that fall outside the enumeration used in atspi_accessible_getRole ().

get_name()
Raises:

GLib.Error

Returns:

a UTF-8 string indicating the name of the Atspi.Accessible object or None on exception.

Return type:

str

Gets the name of an Atspi.Accessible object.

get_object_locale()
Raises:

GLib.Error

Return type:

str

get_parent()
Raises:

GLib.Error

Returns:

a pointer to the Atspi.Accessible object which contains the given Atspi.Accessible instance, or None if the self has no parent container.

Return type:

Atspi.Accessible or None

Gets an Atspi.Accessible object’s parent container.

get_process_id()
Raises:

GLib.Error

Returns:

The process ID or undetermined value if error is set.

Return type:

int

Returns the process id associated with the given accessible. Mainly added for debugging; it is a shortcut to explicitly querying the accessible’s app->bus_name and then calling GetConnectionUnixProcessID.

get_relation_set()
Raises:

GLib.Error

Returns:

a GLib.Array of Atspi.Relation pointers or None on exception.

Return type:

[Atspi.Relation]

Gets the set of Atspi.Relation objects which describes this Atspi.Accessible object’s relationships with other Atspi.Accessible objects.

get_role()
Raises:

GLib.Error

Returns:

the Atspi.Role of an Atspi.Accessible object.

Return type:

Atspi.Role

Gets the UI role played by an Atspi.Accessible object. This role’s name can be obtained via Atspi.Accessible.get_role_name ().

get_role_name()
Raises:

GLib.Error

Returns:

a UTF-8 string specifying the type of UI role played by an Atspi.Accessible object.

Return type:

str

Gets a UTF-8 string corresponding to the name of the role played by an object. This method will return useful values for roles that fall outside the enumeration used in Atspi.Accessible.get_role ().

get_selection_iface()
Returns:

a pointer to an Atspi.Selection interface instance, or None if self does not implement Atspi.Selection.

Return type:

Atspi.Selection

Gets the Atspi.Selection interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_selection_iface instead.

get_state_set()
Returns:

a pointer to an Atspi.StateSet representing an object’s current state set.

Return type:

Atspi.StateSet

Gets the states currently held by an object.

get_table_cell()
Returns:

a pointer to an Atspi.TableCell interface instance, or None if self does not implement Atspi.Table.

Return type:

Atspi.TableCell

Gets the Atspi.TableCell interface for an Atspi.Accessible.

get_table_iface()
Returns:

a pointer to an Atspi.Table interface instance, or None if self does not implement Atspi.Table.

Return type:

Atspi.Table

Gets the Atspi.Table interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_table_iface instead.

get_text_iface()
Returns:

a pointer to an Atspi.Text interface instance, or None if self does not implement Atspi.Text.

Return type:

Atspi.Text

Gets the Atspi.Table interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_text_iface instead.

get_toolkit_name()
Raises:

GLib.Error

Returns:

a UTF-8 string indicating the toolkit name for the Atspi.Accessible object or None on exception.

Return type:

str

Gets the toolkit name for an Atspi.Accessible object. Only works on application root objects.

get_toolkit_version()
Raises:

GLib.Error

Returns:

a UTF-8 string indicating the toolkit version for the Atspi.Accessible object or None on exception.

Return type:

str

Gets the toolkit version for an Atspi.Accessible object. Only works on application root objects.

get_value_iface()
Returns:

a pointer to an Atspi.Value interface instance, or None if self does not implement Atspi.Value.

Return type:

Atspi.Value

Gets the Atspi.Table interface for an Atspi.Accessible.

Deprecated since version 2.10: Use Atspi.Accessible.get_value_iface instead.

set_cache_mask(mask)
Parameters:

mask (Atspi.Cache) – An Atspi.Cache specifying a bit mask of the types of data to cache.

Sets the type of data to cache for accessibles. If this is not set for an application or is reset to Atspi.Cache.UNDEFINED, then the desktop’s cache flag will be used. If the desktop’s cache flag is also undefined, then all possible data will be cached. This function is intended to work around bugs in toolkits where the proper events are not raised / to aid in testing for such bugs.

do_mode_changed(enabled) virtual
Parameters:

enabled (bool) –

do_region_changed(current_offset, last_offset) virtual
Parameters:
  • current_offset (int) –

  • last_offset (int) –

Signal Details

Atspi.Accessible.signals.mode_changed(accessible, arg1, why)
Signal Name:

mode-changed

Flags:

RUN_LAST, DETAILED

Parameters:
  • accessible (Atspi.Accessible) – The object which received the signal

  • arg1 (int) – a boolean specifying whether the mode is being toggled on or off.

  • why (str) – an optional string explaining why the mode changed.

The signal “mode-changed” is emitted by a screen reader to indicate that its mode has changed. This signal supports the following details: focus-tracking flat-review mouse-review say-all caret-tracking

Atspi.Accessible.signals.region_changed(accessible, arg1, arg2)
Signal Name:

region-changed

Flags:

RUN_LAST

Parameters:
  • accessible (Atspi.Accessible) – The object which received the signal

  • arg1 (int) – an integer specifying the current offset of the text being read, if the object is textual.

  • arg2 (int) – an integer specifying the ending offset of the text being read, if the object is textual.

The signal “region-changed” is emitted by a screen reader to indicate that it is now reading or tracking a new object, or, a new piece of text within an object. This allows a magnifier to gain the information needed to highlight the object that the screen reader is reading.