### Class

# Atk Object

#### Description [src]

    class Atk.Object : GObject.Object
    {
      gchar* description,
      gchar* name,
      AtkObject* accessible_parent,
      AtkRole role,
      AtkRelationSet* relation_set,
      AtkLayer layer
    }

The base object class for the Accessibility Toolkit API.

This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are instances of `AtkObject` (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 `AtkObject` may also be queried as to whether they implement other ATK interfaces (e.g. `AtkAction`, `AtkComponent`, 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 `AtkObject` 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 `AtkObject` implementation is insufficient, via instances of a new `AtkObject` subclass.

See `AtkObjectFactory`, `AtkRegistry`. (GTK+ users see also `GtkAccessible`).

#### Ancestors

- GObject

#### Descendants

- AtkGObjectAccessible
- AtkNoOpObject
- AtkPlug
- AtkSocket

#### Instance methods

###### atk_object_add_relationship

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

###### atk_object_connect_property_change_handler

Calls `handler` on property changes.

deprecated: 2.12

###### atk_object_get_accessible_id

Gets the accessible id of the accessible.

since: 2.34

###### atk_object_get_attributes

Get a list of properties applied to this object as a whole, as an `AtkAttributeSet` consisting of name-value pairs. As such these attributes may be considered weakly-typed properties or annotations, as distinct from strongly-typed object data available via other get/set methods. Not all objects have explicit “name-value pair” `AtkAttributeSet` properties.

since: 1.12

###### atk_object_get_description

Gets the accessible description of the accessible.

###### atk_object_get_help_text

Gets the help text associated with the accessible.

since: 2.52

###### atk_object_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.

###### atk_object_get_layer

Gets the layer of the accessible.

deprecated: Unknown

###### atk_object_get_mdi_zorder

Gets the zorder of the accessible. The value G_MININT will be returned if the layer of the accessible is not ATK_LAYER_MDI.

deprecated: Unknown

###### atk_object_get_n_accessible_children

Gets the number of accessible children of the accessible.

###### atk_object_get_name

Gets the accessible name of the accessible.

###### atk_object_get_object_locale

Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale of `accessible`.

since: 2.8

###### atk_object_get_parent

Gets the accessible parent of the accessible. By default this is the one assigned with atk_object_set_parent(), but it is assumed that ATK implementors have ways to get the parent of the object without the need of assigning it manually with atk_object_set_parent(), and will return it with this method.

###### atk_object_get_role

Gets the role of the accessible.

###### atk_object_initialize

This function is called when implementing subclasses of `AtkObject`. It does initialization required for the new object. It is intended that this function should called only in the …_new() functions used to create an instance of a subclass of `AtkObject`.

###### atk_object_notify_state_change

Emits a state-change signal for the specified state.

###### atk_object_peek_parent

Gets the accessible parent of the accessible, if it has been manually assigned with atk_object_set_parent. Otherwise, this function returns `NULL`.

###### atk_object_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.

###### atk_object_ref_relation_set

Gets the `AtkRelationSet` associated with the object.

###### atk_object_ref_state_set

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

###### atk_object_remove_property_change_handler

Removes a property change handler.

deprecated: 2.12

###### atk_object_remove_relationship

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

###### atk_object_set_accessible_id

Sets 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. Such an ID will be available for instance to identify a given well-known accessible object for tailored screen reading, or for automatic regression testing.

since: 2.34

###### atk_object_set_description

Sets the accessible description of the accessible. You can’t set the description to NULL. This is reserved for the initial value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty value you can use “”.

###### atk_object_set_help_text

Sets the help text associated with the accessible. This can be used to expose context-sensitive information to help a user understand how to interact with the object. You can’t set the help text to NULL. This is reserved for the initial value. If you want to set the name to an empty value, you can use “”.

since: 2.52

###### atk_object_set_name

Sets the accessible name of the accessible. You can’t set the name to NULL. This is reserved for the initial value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty value you can use “”.

###### atk_object_set_parent

Sets the accessible parent of the accessible. `parent` can be NULL.

###### atk_object_set_role

Sets the role of the accessible.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Atk.Object:accessible-component-layer

No description available.

###### Atk.Object:accessible-component-mdi-zorder

No description available.

###### Atk.Object:accessible-description

No description available.

###### Atk.Object:accessible-help-text

No description available.

###### Atk.Object:accessible-hypertext-nlinks

No description available.

###### Atk.Object:accessible-id

No description available.

###### Atk.Object:accessible-name

No description available.

###### Atk.Object:accessible-parent

No description available.

###### Atk.Object:accessible-role

No description available.

###### Atk.Object:accessible-table-caption

Table caption.

deprecated: Unknown

###### Atk.Object:accessible-table-caption-object

No description available.

###### Atk.Object:accessible-table-column-description

Accessible table column description.

deprecated: Unknown

###### Atk.Object:accessible-table-column-header

Accessible table column header.

deprecated: Unknown

###### Atk.Object:accessible-table-row-description

Accessible table row description.

deprecated: Unknown

###### Atk.Object:accessible-table-row-header

Accessible table row header.

deprecated: Unknown

###### Atk.Object:accessible-table-summary

No description available.

###### Atk.Object:accessible-value

Numeric value of this object, in case being and AtkValue.

deprecated: Unknown

#### Signals

###### Atk.Object::active-descendant-changed

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.

###### Atk.Object::announcement

The “announcement” signal can be emitted to pass an announcement on to be read by a screen reader.

since: 2.46

###### Atk.Object::attribute-changed

The “attribute-changed” signal should be emitted when one of an object’s attributes changes.

since: 2.52

###### Atk.Object::children-changed

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

###### Atk.Object::focus-event

The signal “focus-event” is emitted when an object gained or lost focus.

deprecated: 2.9.4

###### Atk.Object::notification

The “notification” signal can be emitted to pass an announcement on to be read by a screen reader.

since: 2.50

###### Atk.Object::property-change

The signal “property-change” is emitted when an object’s property value changes. `arg1` contains an `AtkPropertyValues` with the name and the new value of the property whose value has changed. Note that, as with GObject notify, getting this signal does not guarantee that the value of the property has actually changed; it may also be emitted when the setter of the property is called to reinstate the previous value.

###### Atk.Object::state-change

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

###### Atk.Object::visible-data-changed

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

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct AtkObjectClass {
      GObjectClass parent;
      const gchar* (* get_name) (
        AtkObject* accessible
      );
      const gchar* (* get_description) (
        AtkObject* accessible
      );
      AtkObject* (* get_parent) (
        AtkObject* accessible
      );
      gint (* get_n_children) (
        AtkObject* accessible
      );
      AtkObject* (* ref_child) (
        AtkObject* accessible,
        gint i
      );
      gint (* get_index_in_parent) (
        AtkObject* accessible
      );
      AtkRelationSet* (* ref_relation_set) (
        AtkObject* accessible
      );
      AtkRole (* get_role) (
        AtkObject* accessible
      );
      AtkLayer (* get_layer) (
        AtkObject* accessible
      );
      gint (* get_mdi_zorder) (
        AtkObject* accessible
      );
      AtkStateSet* (* ref_state_set) (
        AtkObject* accessible
      );
      void (* set_name) (
        AtkObject* accessible,
        const gchar* name
      );
      void (* set_description) (
        AtkObject* accessible,
        const gchar* description
      );
      void (* set_parent) (
        AtkObject* accessible,
        AtkObject* parent
      );
      void (* set_role) (
        AtkObject* accessible,
        AtkRole role
      );
      guint (* connect_property_change_handler) (
        AtkObject* accessible,
        AtkPropertyChangeHandler* handler
      );
      void (* remove_property_change_handler) (
        AtkObject* accessible,
        guint handler_id
      );
      void (* initialize) (
        AtkObject* accessible,
        gpointer data
      );
      void (* children_changed) (
        AtkObject* accessible,
        guint change_index,
        gpointer changed_child
      );
      void (* focus_event) (
        AtkObject* accessible,
        gboolean focus_in
      );
      void (* property_change) (
        AtkObject* accessible,
        AtkPropertyValues* values
      );
      void (* state_change) (
        AtkObject* accessible,
        const gchar* name,
        gboolean state_set
      );
      void (* visible_data_changed) (
        AtkObject* accessible
      );
      void (* active_descendant_changed) (
        AtkObject* accessible,
        gpointer* child
      );
      AtkAttributeSet* (* get_attributes) (
        AtkObject* accessible
      );
      const gchar* (* get_object_locale) (
        AtkObject* accessible
      );
      AtkFunction pad1;

    }

No description available.

###### Class members

`parent: GObjectClass`

  No description available.

`get_name: const gchar* (* get_name) ( AtkObject* accessible )`

  No description available.

`get_description: const gchar* (* get_description) ( AtkObject* accessible )`

  No description available.

`get_parent: AtkObject* (* get_parent) ( AtkObject* accessible )`

  No description available.

`get_n_children: gint (* get_n_children) ( AtkObject* accessible )`

  No description available.

`ref_child: AtkObject* (* ref_child) ( AtkObject* accessible, gint i )`

  No description available.

`get_index_in_parent: gint (* get_index_in_parent) ( AtkObject* accessible )`

  No description available.

`ref_relation_set: AtkRelationSet* (* ref_relation_set) ( AtkObject* accessible )`

  No description available.

`get_role: AtkRole (* get_role) ( AtkObject* accessible )`

  No description available.

`get_layer: AtkLayer (* get_layer) ( AtkObject* accessible )`

  No description available.

`get_mdi_zorder: gint (* get_mdi_zorder) ( AtkObject* accessible )`

  No description available.

`ref_state_set: AtkStateSet* (* ref_state_set) ( AtkObject* accessible )`

  No description available.

`set_name: void (* set_name) ( AtkObject* accessible, const gchar* name )`

  No description available.

`set_description: void (* set_description) ( AtkObject* accessible, const gchar* description )`

  No description available.

`set_parent: void (* set_parent) ( AtkObject* accessible, AtkObject* parent )`

  No description available.

`set_role: void (* set_role) ( AtkObject* accessible, AtkRole role )`

  No description available.

`connect_property_change_handler: guint (* connect_property_change_handler) ( AtkObject* accessible, AtkPropertyChangeHandler* handler )`

  Specifies a function to be called when a property changes value. This virtual function is deprecated since 2.12 and it should not be overriden. Connect directly to property-change or notify signal instead.

`remove_property_change_handler: void (* remove_property_change_handler) ( AtkObject* accessible, guint handler_id )`

  Removes a property changed handler as returned by `connect_property_change_handler`. This virtual function is deprecated sice 2.12 and it should not be overriden.

`initialize: void (* initialize) ( AtkObject* accessible, gpointer data )`

  No description available.

`children_changed: void (* children_changed) ( AtkObject* accessible, guint change_index, gpointer changed_child )`

  No description available.

`focus_event: void (* focus_event) ( AtkObject* accessible, gboolean focus_in )`

  The signal handler which is executed when there is a focus event for an object. This virtual function is deprecated since 2.9.4 and it should not be overriden. Use the `AtkObject::state-change` “focused” signal instead.

`property_change: void (* property_change) ( AtkObject* accessible, AtkPropertyValues* values )`

  No description available.

`state_change: void (* state_change) ( AtkObject* accessible, const gchar* name, gboolean state_set )`

  No description available.

`visible_data_changed: void (* visible_data_changed) ( AtkObject* accessible )`

  No description available.

`active_descendant_changed: void (* active_descendant_changed) ( AtkObject* accessible, gpointer* child )`

  No description available.

`get_attributes: AtkAttributeSet* (* get_attributes) ( AtkObject* accessible )`

  No description available.

`get_object_locale: const gchar* (* get_object_locale) ( AtkObject* accessible )`

  No description available.

`pad1: AtkFunction`

  No description available.

#### Virtual methods

###### Atk.ObjectClass.active_descendant_changed

No description available.

###### Atk.ObjectClass.children_changed

No description available.

###### Atk.ObjectClass.connect_property_change_handler

Calls `handler` on property changes.

deprecated: 2.12

###### Atk.ObjectClass.focus_event

The signal handler which is executed when there is a focus event for an object. This virtual function is deprecated since 2.9.4 and it should not be overriden. Use the `AtkObject::state-change` “focused” signal instead.

###### Atk.ObjectClass.get_attributes

Get a list of properties applied to this object as a whole, as an `AtkAttributeSet` consisting of name-value pairs. As such these attributes may be considered weakly-typed properties or annotations, as distinct from strongly-typed object data available via other get/set methods. Not all objects have explicit “name-value pair” `AtkAttributeSet` properties.

since: 1.12

###### Atk.ObjectClass.get_description

Gets the accessible description of the accessible.

###### Atk.ObjectClass.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.

###### Atk.ObjectClass.get_layer

Gets the layer of the accessible.

deprecated: Unknown

###### Atk.ObjectClass.get_mdi_zorder

Gets the zorder of the accessible. The value G_MININT will be returned if the layer of the accessible is not ATK_LAYER_MDI.

deprecated: Unknown

###### Atk.ObjectClass.get_n_children

No description available.

###### Atk.ObjectClass.get_name

Gets the accessible name of the accessible.

###### Atk.ObjectClass.get_object_locale

Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale of `accessible`.

since: 2.8

###### Atk.ObjectClass.get_parent

Gets the accessible parent of the accessible. By default this is the one assigned with atk_object_set_parent(), but it is assumed that ATK implementors have ways to get the parent of the object without the need of assigning it manually with atk_object_set_parent(), and will return it with this method.

###### Atk.ObjectClass.get_role

Gets the role of the accessible.

###### Atk.ObjectClass.initialize

This function is called when implementing subclasses of `AtkObject`. It does initialization required for the new object. It is intended that this function should called only in the …_new() functions used to create an instance of a subclass of `AtkObject`.

###### Atk.ObjectClass.property_change

No description available.

###### Atk.ObjectClass.ref_child

No description available.

###### Atk.ObjectClass.ref_relation_set

Gets the `AtkRelationSet` associated with the object.

###### Atk.ObjectClass.ref_state_set

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

###### Atk.ObjectClass.remove_property_change_handler

Removes a property change handler.

deprecated: 2.12

###### Atk.ObjectClass.set_description

Sets the accessible description of the accessible. You can’t set the description to NULL. This is reserved for the initial value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty value you can use “”.

###### Atk.ObjectClass.set_name

Sets the accessible name of the accessible. You can’t set the name to NULL. This is reserved for the initial value. In this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to a empty value you can use “”.

###### Atk.ObjectClass.set_parent

Sets the accessible parent of the accessible. `parent` can be NULL.

###### Atk.ObjectClass.set_role

Sets the role of the accessible.

###### Atk.ObjectClass.state_change

No description available.

###### Atk.ObjectClass.visible_data_changed

No description available.