Class
AtkObject
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
).
Instance methods
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_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: Unknown
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_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_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_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.
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.
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 “”.
Properties
Atk.Object:accessible-table-column-description
Accessible table column description.
deprecated: Unknown
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.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_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: Unknown
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.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.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.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 “”.