Interface
GtkAccessible
Description [src]
interface Gtk.Accessible : GObject.Object
GtkAccessible
is an interface for describing UI elements for
Assistive Technologies.
Every accessible implementation has:
- a “role”, represented by a value of the
GtkAccessibleRole
enumeration - an “attribute”, represented by a set of
GtkAccessibleState
,GtkAccessibleProperty
andGtkAccessibleRelation
values
The role cannot be changed after instantiating a GtkAccessible
implementation.
The attributes are updated every time a UI element’s state changes in
a way that should be reflected by assistive technologies. For instance,
if a GtkWidget
visibility changes, the GTK_ACCESSIBLE_STATE_HIDDEN
state will also change to reflect the GtkWidget:visible
property.
Every accessible implementation is part of a tree of accessible objects.
Normally, this tree corresponds to the widget tree, but can be customized
by reimplementing the Gtk.AccessibleInterface.get_accessible_parent
,
Gtk.AccessibleInterface.get_first_accessible_child
and
Gtk.AccessibleInterface.get_next_accessible_sibling
virtual functions.
Note that you can not create a top-level accessible object as of now,
which means that you must always have a parent accessible object.
Also note that when an accessible object does not correspond to a widget,
and it has children, whose implementation you don’t control,
it is necessary to ensure the correct shape of the a11y tree
by calling gtk_accessible_set_accessible_parent()
and
updating the sibling by gtk_accessible_update_next_accessible_sibling()
.
Prerequisite
In order to implement Accessible, your type must inherit from
GObject
.
Instance methods
gtk_accessible_get_accessible_parent
Retrieves the accessible parent for an accessible object.
Available since: 4.10
gtk_accessible_get_accessible_role
Retrieves the accessible role of an accessible object.
gtk_accessible_get_at_context
Retrieves the accessible implementation for the given GtkAccessible
.
Available since: 4.10
gtk_accessible_get_bounds
Queries the coordinates and dimensions of this accessible.
Available since: 4.10
gtk_accessible_get_first_accessible_child
Retrieves the first accessible child of an accessible object.
Available since: 4.10
gtk_accessible_get_next_accessible_sibling
Retrieves the next accessible sibling of an accessible object.
Available since: 4.10
gtk_accessible_reset_property
Resets the accessible property
to its default value.
gtk_accessible_reset_relation
Resets the accessible relation
to its default value.
gtk_accessible_reset_state
Resets the accessible state
to its default value.
gtk_accessible_set_accessible_parent
Sets the parent and sibling of an accessible object.
Available since: 4.10
gtk_accessible_update_next_accessible_sibling
Updates the next accessible sibling of self
.
Available since: 4.10
gtk_accessible_update_property
Updates a list of accessible properties.
gtk_accessible_update_property_value
Updates an array of accessible properties.
gtk_accessible_update_relation
Updates a list of accessible relations.
gtk_accessible_update_relation_value
Updates an array of accessible relations.
gtk_accessible_update_state
Updates a list of accessible states. See the GtkAccessibleState
documentation for the value types of accessible states.
gtk_accessible_update_state_value
Updates an array of accessible states.
Properties
Gtk.Accessible:accessible-role
The accessible role of the given GtkAccessible
implementation.
Interface structure
struct GtkAccessibleInterface {
GTypeInterface g_iface;
GtkATContext* (* get_at_context) (
GtkAccessible* self
);
gboolean (* get_platform_state) (
GtkAccessible* self,
GtkAccessiblePlatformState state
);
GtkAccessible* (* get_accessible_parent) (
GtkAccessible* self
);
GtkAccessible* (* get_first_accessible_child) (
GtkAccessible* self
);
GtkAccessible* (* get_next_accessible_sibling) (
GtkAccessible* self
);
gboolean (* get_bounds) (
GtkAccessible* self,
int* x,
int* y,
int* width,
int* height
);
}
Interface members
g_iface |
|
No description available. | |
get_at_context |
|
No description available. | |
get_platform_state |
|
No description available. | |
get_accessible_parent |
|
No description available. | |
get_first_accessible_child |
|
No description available. | |
get_next_accessible_sibling |
|
No description available. | |
get_bounds |
|
No description available. |
Virtual methods
Gtk.Accessible.get_accessible_parent
Retrieves the accessible parent for an accessible object.
Gtk.Accessible.get_at_context
Retrieves the accessible implementation for the given GtkAccessible
.
Gtk.Accessible.get_bounds
Queries the coordinates and dimensions of this accessible.
Gtk.Accessible.get_first_accessible_child
Retrieves the first accessible child of an accessible object.
Gtk.Accessible.get_next_accessible_sibling
Retrieves the next accessible sibling of an accessible object.
Gtk.Accessible.get_platform_state
Query a platform state, such as focus.