Next: , Previous: AtkNoOpObjectFactory, Up: Top


14 AtkObject

The base object class for the Accessibility Toolkit API.

14.1 Overview

This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are instances of <atk-object> (or instances of AtkObject-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 application which 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 #gtk-widget-get-accessible), 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.

14.2 Usage

— Class: <atk-object>

Derives from <gobject>.

This class defines the following slots:

accessible-name
Object instance's name formatted for assistive technology access
accessible-description
Description of an object, formatted for assistive technology access
accessible-parent
Is used to notify that the parent has changed
accessible-value
Is used to notify that the value has changed
accessible-role
The accessible role of this object
accessible-component-layer
The accessible layer of this object
accessible-component-mdi-zorder
The accessible MDI value of this object
accessible-table-caption
Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead
accessible-table-column-description
Is used to notify that the table column description has changed
accessible-table-column-header
Is used to notify that the table column header has changed
accessible-table-row-description
Is used to notify that the table row description has changed
accessible-table-row-header
Is used to notify that the table row header has changed
accessible-table-summary
Is used to notify that the table summary has changed
accessible-table-caption-object
Is used to notify that the table caption has changed
accessible-hypertext-nlinks
The number of links which the current AtkHypertext has
— Signal on <atk-object>: children-changed (arg0 <guint>) (arg1 <gpointer>)

The signal "children-changed" is emitted when a child is added or removed form an object. It supports two details: "add" and "remove"

— Signal on <atk-object>: focus-event (arg0 <gboolean>)

The signal "focus-event" is emitted when an object gains or loses focus.

— Signal on <atk-object>: property-change (arg0 <gpointer>)

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.

— Signal on <atk-object>: state-change (arg0 <gchararray>) (arg1 <gboolean>)

The "state-change" signal is emitted when an object's state changes. The detail value identifies the state type which has changed.

— Signal on <atk-object>: visible-data-changed

The "visible-data-changed" signal is emitted when the visual appearance of the object changed.

— Signal on <atk-object>: active-descendant-changed (arg0 <gpointer>)

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.

— Class: <atk-implementor>

Derives from <ginterface>.

This class defines no direct slots.

— Function: atk-implementor-ref-accessible (self <atk-implementor>) ⇒  (ret <atk-object>)
— Method: ref-accessible

Gets a reference to an object's <atk-object> implementation, if the object implements <atk-object-iface>

implementor
The <gobject> instance which should implement <atk-implementor-iface> if a non-null return value is required.
ret
a reference to an object's <atk-object> implementation
— Function: atk-object-get-name (self <atk-object>) ⇒  (ret mchars)
— Method: get-name

Gets the accessible name of the accessible.

accessible
an <atk-object>
ret
a character string representing the accessible name of the object.
— Function: atk-object-get-description (self <atk-object>) ⇒  (ret mchars)
— Method: get-description

Gets the accessible description of the accessible.

accessible
an <atk-object>
ret
a character string representing the accessible description of the accessible.
— Function: atk-object-get-parent (self <atk-object>) ⇒  (ret <atk-object>)
— Method: get-parent

Gets the accessible parent of the accessible.

accessible
an <atk-object>
ret
a <atk-object> representing the accessible parent of the accessible
— Function: atk-object-ref-accessible-child (self <atk-object>) (int) ⇒  (ret <atk-object>)
— Method: ref-accessible-child

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.

accessible
an <atk-object>
i
a gint representing the position of the child, starting from 0
ret
an <atk-object> representing the specified accessible child of the accessible.
— Function: atk-object-ref-relation-set (self <atk-object>) ⇒  (ret <atk-relation-set>)
— Method: ref-relation-set

Gets the <atk-relation-set> associated with the object.

accessible
an <atk-object>
ret
an <atk-relation-set> representing the relation set of the object.
— Function: atk-object-get-layer (self <atk-object>) ⇒  (ret <atk-layer>)
— Method: get-layer

atk_object_get_layer’ is deprecated and should not be used in newly-written code. Use atk_component_get_layer instead.

Gets the layer of the accessible.

Returns:

accessible
an <atk-object>
ret
an <atk-layer> which is the layer of the accessible
— Function: atk-object-get-mdi-zorder (self <atk-object>) ⇒  (ret int)
— Method: get-mdi-zorder

atk_object_get_mdi_zorder’ is deprecated and should not be used in newly-written code. Use atk_component_get_mdi_zorder 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.

Returns:

accessible
an <atk-object>
ret
a gint 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.
— Function: atk-object-get-role (self <atk-object>) ⇒  (ret <atk-role>)
— Method: get-role

Gets the role of the accessible.

accessible
an <atk-object>
ret
an <atk-role> which is the role of the accessible
— Function: atk-object-ref-state-set (self <atk-object>) ⇒  (ret <atk-state-set>)
— Method: ref-state-set

Gets a reference to the state set of the accessible; the caller must unreference it when it is no longer needed.

accessible
an <atk-object>
ret
a reference to an <atk-state-set> which is the state set of the accessible
— Function: atk-object-get-index-in-parent (self <atk-object>) ⇒  (ret int)
— Method: get-index-in-parent

Gets the 0-based index of this accessible in its parent; returns -1 if the accessible does not have an accessible parent.

accessible
an <atk-object>
ret
an integer which is the index of the accessible in its parent
— Function: atk-object-set-name (self <atk-object>) (name mchars)
— Method: set-name

Sets the accessible name of the accessible.

accessible
an <atk-object>
name
a character string to be set as the accessible name
— Function: atk-object-set-description (self <atk-object>) (description mchars)
— Method: set-description

Sets the accessible description of the accessible.

accessible
an <atk-object>
description
a character string to be set as the accessible description
— Function: atk-object-set-parent (self <atk-object>) (parent <atk-object>)
— Method: set-parent

Sets the accessible parent of the accessible.

accessible
an <atk-object>
parent
an <atk-object> to be set as the accessible parent
— Function: atk-object-set-role (self <atk-object>) (role <atk-role>)
— Method: set-role

Sets the role of the accessible.

accessible
an <atk-object>
role
an <atk-role> to be set as the role
— Function: atk-object-notify-state-change (self <atk-object>) (state unsigned-int64) (value bool)
— Method: notify-state-change

Emits a state-change signal for the specified state.

accessible
an <atk-object>
state
an <atk-state> whose state is changed
value
a gboolean which indicates whether the state is being set on or off
— Function: atk-object-add-relationship (self <atk-object>) (relationship <atk-relation-type>) (target <atk-object>) ⇒  (ret bool)
— Method: add-relationship

Adds a relationship of the specified type with the specified target.

object
The <atk-object> to which an AtkRelation is to be added.
relationship
The <atk-relation-type> of the relation
target
The <atk-object> which is to be the target of the relation.
ret
TRUE if the relationship is added.
— Function: atk-object-remove-relationship (self <atk-object>) (relationship <atk-relation-type>) (target <atk-object>) ⇒  (ret bool)
— Method: remove-relationship

Removes a relationship of the specified type with the specified target.

object
The <atk-object> from which an AtkRelation is to be removed.
relationship
The <atk-relation-type> of the relation
target
The <atk-object> which is the target of the relation to be removed.
ret
TRUE if the relationship is removed.
— Function: atk-role-get-name (role <atk-role>) ⇒  (ret mchars)

Gets the description string describing the <atk-role>role.

role
The <atk-role> whose name is required
ret
the string describing the AtkRole
— Function: atk-role-get-localized-name (role <atk-role>) ⇒  (ret mchars)

Gets the localized description string describing the <atk-role>role.

role
The <atk-role> whose localized name is required
ret
the localized string describing the AtkRole
— Function: atk-role-for-name (name mchars) ⇒  (ret <atk-role>)

Get the <atk-role> type corresponding to a rolew name.

name
a string which is the (non-localized) name of an ATK role.
ret
the <atk-role> enumerated type corresponding to the specified name, or <atk-role-invalid> if no matching role is found.