Class
AtkObject
Description [src]
class Atk.Object : GObject.Object {
parent: GObject,
description: gchar*,
name: gchar*,
accessible_parent: AtkObject*,
role: AtkRole,
relation_set: AtkRelationSet*,
layer: AtkLayer
}
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 also: AtkObjectFactory
, AtkRegistry
. (GTK+ users see also
GtkAccessible
).
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 since: 2.12
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.
Available since: 1.12
atk_object_get_description
Gets the accessible description of the accessible.
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_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 since: 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
.
Available 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_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.
Available 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_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.
Properties
Atk.Object:accessible-component-layer
Atk.Object:accessible-component-mdi-zorder
Atk.Object:accessible-description
Atk.Object:accessible-hypertext-nlinks
Atk.Object:accessible-name
Atk.Object:accessible-parent
Atk.Object:accessible-role
Atk.Object:accessible-table-caption-object
Atk.Object:accessible-table-column-description
Accessible table column description.
Deprecated since: Unknown
Atk.Object:accessible-table-row-description
Accessible table row description.
Deprecated since: Unknown
Atk.Object:accessible-table-summary
Atk.Object:accessible-value
Numeric value of this object, in case being and AtkValue.
Deprecated since: 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::children-changed
The signal “children-changed” is emitted when a child is added or removed form 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 since: 2.9.4
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.Object::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;
}
Class members
parent |
|
No description available. | |
get_name |
|
No description available. | |
get_description |
|
No description available. | |
get_parent |
|
No description available. | |
get_n_children |
|
No description available. | |
ref_child |
|
No description available. | |
get_index_in_parent |
|
No description available. | |
ref_relation_set |
|
No description available. | |
get_role |
|
No description available. | |
get_layer |
|
No description available. | |
get_mdi_zorder |
|
No description available. | |
ref_state_set |
|
No description available. | |
set_name |
|
No description available. | |
set_description |
|
No description available. | |
set_parent |
|
No description available. | |
set_role |
|
No description available. | |
connect_property_change_handler |
|
No description available. | |
remove_property_change_handler |
|
No description available. | |
initialize |
|
No description available. | |
children_changed |
|
No description available. | |
focus_event |
|
No description available. | |
property_change |
|
No description available. | |
state_change |
|
No description available. | |
visible_data_changed |
|
No description available. | |
active_descendant_changed |
|
No description available. | |
get_attributes |
|
No description available. | |
get_object_locale |
|
No description available. | |
pad1 |
|
No description available. |
Virtual methods
Atk.ObjectClass.active_descendant_changed
Atk.ObjectClass.children_changed
Atk.ObjectClass.connect_property_change_handler
Calls handler
on property changes.
Deprecated since: 2.12
Atk.ObjectClass.focus_event
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.
Available 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_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 since: Unknown
Atk.ObjectClass.get_n_children
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
.
Available 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
Atk.ObjectClass.ref_child
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 since: 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.