atk.Object
atk.Object — the base object class for the Accessibility Toolkit API.
Synopsis
class atk.Object( |
atk.Object Properties
|
atk.Object Signal Prototypes
def callback( | |
def callback( | |
def callback( | |
def callback( | |
def callback( | |
def callback( |
Description
This class is the primary class for accessibility support via the
Accessibility ToolKit (ATK). Objects that are instances of atk.Object
(or
instances of atk.Object
-derived
types) are queried for properties which relate basic (and generic)
properties of a UI component such as name and description. Instances of
atk.Object
may also be queried as to whether they implement other ATK interfaces
(e.g. atk.Action
,
atk.Component
,
etc.), as appropriate to the role which a given UI component plays in a
user interface.
All UI components in an applicationthat provide useful information
or services to the user must provide corresponding atk.Object
instances on request (in GTK+, for instance, usually on a call to the
gtk.Widget.get_accessible()
method), either via ATK support built into the toolkit for the widget
class or ancestor class, or in the case of custom widgets, if the
inherited atk.Object
implementation is insufficient, via instances of a new atk.Object
subclass.
Methods
atk.Object.get_name
def get_name()
Returns : | a character string representing the accessible name of the object. |
Gets the accessible name of the accessible.
atk.Object.get_description
def get_description()
Returns : | a character string representing the accessible description of the accessible. |
Gets the accessible description of the accessible.
atk.Object.get_parent
def get_parent()
Returns : | a atk.Object
representing the accessible parent of the
accessible |
Gets the accessible parent of the accessible.
atk.Object.get_n_accessible_children
def get_n_accessible_children()
Returns : | an integer representing the number of accessible children of the accessible. |
Gets the number of accessible children of the accessible.
atk.Object.ref_accessible_child
def ref_accessible_child(i
)
| an integer representing the position of the child, starting from 0 |
Returns : | an atk.Object
representing the specified accessible child of the
accessible. |
Gets a reference to the specified accessible child of the object. The accessible children are 0-based so the first accessible child is at index 0, the second at index 1 and so on.
atk.Object.ref_relation_set
def ref_relation_set()
Returns : | an atk.RelationSet
representing the relation set of the object. |
Gets the atk.RelationSet
associated with the object.
atk.Object.get_role
def get_role()
Returns : | one of the Atk Role Constants which is the role of the accessible |
Gets the role of the accessible.
atk.Object.get_layer
def get_layer()
Returns : | one of the Atk Layer Constants which is the layer of the accessible |
Note
This method is deprecated. Use the atk.Component.get_layer
()
method instead.
Gets the layer of the accessible.
atk.Object.get_mdi_zorder
def get_mdi_zorder()
Returns : | an integer which is the zorder of the accessible, i.e. the depth at which the component is shown in relation to other components in the same container. |
Note
This method is deprecated. Use the atk.Component.get_mdi_zorder
()
method instead.
Gets the zorder of the accessible. The value
G_MININT
will be returned if the layer of the
accessible is not atk.LAYER_MDI
.
atk.Object.ref_state_set
def ref_state_set()
Returns : | a reference to an atk.StateSet
which is the state set of the accessible |
Gets a reference to the state set of the accessible.
atk.Object.get_index_in_parent
def get_index_in_parent()
Returns : | an integer which is the index of the accessible in its parent |
Gets the 0-based index of this accessible in its parent; returns -1 if the accessible does not have an accessible parent.
atk.Object.set_name
def set_name(name
)
| a character string to be set as the accessible name |
Sets the accessible name of the accessible.
atk.Object.set_description
def set_description(description
)
| a character string to be set as the accessible description |
Sets the accessible description of the accessible.
atk.Object.set_parent
def set_parent(parent
)
| an atk.Object
to be set as the accessible parent |
Sets the accessible parent of the accessible.
atk.Object.set_role
def set_role(role
)
| one of the Atk Role Constants to be set as the role |
Sets the role of the accessible.
atk.Object.remove_property_change_handler
def remove_property_change_handler(handler_id
)
| an integer that identifies the handler to be removed. |
Removes a property change handler.
atk.Object.add_relationship
def add_relationship(relationship
, target
)
| one of the Atk Relation Type Constants |
| The atk.Object
which is to be the target of the relation. |
Returns : | True if the relationship is added. |
Adds a relationship of the specified type with the specified target.
atk.Object.remove_relationship
def remove_relationship(relationship
, target
)
| one of the Atk Relation Type Constants |
| The atk.Object
which is the target of the relation to be
removed. |
Returns : | True if the relationship is removed. |
Removes a relationship of the specified type with the specified target.
Signals
The "active-descendant-changed" atk.Object Signal
def callback(atkobject
, obj
, user_param1
, ...
)
| the object which received the signal. |
| the newly focused object. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "active-descendant-changed" signal is emitted by an object
which has the state atk.STATE_MANAGES_DESCENDANTS
when the focus object in the object changes. For instance, a table
will emit the signal when the cell in the table which has focus
changes.
The "children-changed" atk.Object Signal
def callback(atkobject
, index
, child
, user_param1
, ...
)
| the object which received the signal. |
| The index of the added or removed child |
| The child which was added or removed |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The signal "children-changed" is emitted when a child is added or removed form an object. It supports two details: "add" and "remove"
The "focus-event" atk.Object Signal
def callback(atkobject
, has_focus
, user_param1
, ...
)
| the object which received the signal. |
| A boolean value which indicates whether the object gained or lost focus. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The signal "focus-event" is emitted when an object gains or loses focus.
The "property-change" atk.Object Signal
def callback(atkobject
, value
, user_param1
, ...
)
| the object that received the signal. |
| The new value of the property that changed. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The signal "property-change" is emitted when an object's property value changes. The detail identifies the name of the property whose value has changed.
The "state-change" atk.Object Signal
def callback(atkobject
, state
, is_set
, user_param1
, ...
)
| the object which received the signal. |
| The name of the state which has changed |
| A boolean which indicates whether the state has been set or unset. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "state-change" signal is emitted when an object's state changes. The detail value identifies the state type which has changed.
The "visible-data-changed" atk.Object Signal
def callback(atkobject
, user_param1
, ...
)
| the object that received the signal. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "visible-data-changed" signal is emitted when the visual appearance of the object changed.