Atspi.Document

g Atspi.Document Atspi.Document GObject.GInterface GObject.GInterface GObject.GInterface->Atspi.Document

Implementations:

Atspi.Accessible

Methods

get_current_page_number ()

get_document_attribute_value (attribute)

get_document_attributes ()

get_locale ()

get_page_count ()

get_text_selections ()

set_text_selections (selections)

Virtual Methods

None

Properties

None

Signals

None

Fields

None

Class Details

class Atspi.Document
Bases:

GObject.GInterface

get_current_page_number()
Raises:

GLib.Error

Returns:

a int indicating the current page number in the #AccessibleDocument object.

Return type:

int

Gets the current page number of an #AccessibleDocument object.

get_document_attribute_value(attribute)
Parameters:

attribute (str) – a string indicating the name of a specific attribute.

Raises:

GLib.Error

Returns:

a string corresponding to the value of the specified attribute, or an empty string if the attribute is unspecified for the object.

Return type:

str

Gets the value of a single attribute, if specified for the document as a whole.

Deprecated since version 2.10: Use Atspi.Document.get_document_attribute_value instead.

get_document_attributes()
Raises:

GLib.Error

Returns:

a GLib.HashTable containing the constant attributes of the document, as name-value pairs.

Return type:

{str: str}

Gets all constant attributes for the document as a whole. For attributes that change within the document content, see atspi_text_get_attribute_run instead.

Deprecated since version 2.10: Use Atspi.Document.get_document_attributes instead.

get_locale()
Raises:

GLib.Error

Returns:

a string compliant with the POSIX standard for locale description.

Return type:

str

Gets the locale associated with the document’s content, e.g. the locale for LOCALE_TYPE_MESSAGES.

get_page_count()
Raises:

GLib.Error

Returns:

a int indicating the page count of an #AccessibleDocument object.

Return type:

int

Gets the page count of an #AccessibleDocument object.

get_text_selections()
Raises:

GLib.Error

Returns:

a GLib.Array of Atspi.TextSelection structures representing the selection.

Return type:

[Atspi.TextSelection]

Returns an array of AtspiTextSelections within this document.

New in version 2.52.

set_text_selections(selections)
Parameters:

selections ([Atspi.TextSelection]) – a GLib.Array of AtspiTextSelections to be selected.

Raises:

GLib.Error

Returns:

True if the selection was made successfully; False otherwise.

Return type:

bool

Makes 1 or more selections within this document denoted by the given array of AtspiTextSelections. Any existing physical selection (inside or outside this document) is replaced by the new selections. All objects within the given selection ranges must be descendants of this document. Otherwise False will be returned.

New in version 2.52.