gtk.accessible
Module for [Accessible] interface
Types 2
[gtk.accessible.Accessible] is an interface for describing UI elements for Assistive Technologies.
Every accessible implementation has:
- a “role”, represented by a value of the [gtk.types.AccessibleRole] enumeration
- an “attribute”, represented by a set of [gtk.types.AccessibleState],
[gtk.types.AccessibleProperty] and [gtk.types.AccessibleRelation] values
The role cannot be changed after instantiating a [gtk.accessible.Accessible] 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 [gtk.widget.Widget] visibility changes, the [gtk.types.AccessibleState.Hidden] state will also change to reflect the [gtk.widget.Widget.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 vfunc@Gtk.Accessible.get_accessible_parent, vfunc@Gtk.Accessible.get_first_accessible_child and vfunc@Gtk.Accessible.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.Accessible.setAccessibleParent] and updating the sibling by [gtk.accessible.Accessible.updateNextAccessibleSibling].
gtk.types.AccessibleRole accessibleRole() @propertyGet `accessibleRole` property. Returns: The accessible role of the given [gtk.accessible.Accessible] implementation.void accessibleRole(gtk.types.AccessibleRole propval) @propertySet `accessibleRole` property. Params: propval = The accessible role of the given [gtk.accessible.Accessible] implementation.void announce(string message, gtk.types.AccessibleAnnouncementPriority priority)Requests the user's screen reader to announce the given message.gtk.accessible.Accessible getAccessibleParent()Retrieves the accessible parent for an accessible object.gtk.types.AccessibleRole getAccessibleRole()Retrieves the accessible role of an accessible object. Returns: the accessible rolegtk.atcontext.ATContext getAtContext()Retrieves the accessible implementation for the given [gtk.accessible.Accessible]. Returns: the accessible implementation objectbool getBounds(out int x, out int y, out int width, out int height)Queries the coordinates and dimensions of this accessiblegtk.accessible.Accessible getFirstAccessibleChild()Retrieves the first accessible child of an accessible object. Returns: the first accessible childgtk.accessible.Accessible getNextAccessibleSibling()Retrieves the next accessible sibling of an accessible object Returns: the next accessible siblingbool getPlatformState(gtk.types.AccessiblePlatformState state)Query a platform state, such as focus.void resetProperty(gtk.types.AccessibleProperty property)Resets the accessible property to its default value.void resetRelation(gtk.types.AccessibleRelation relation)Resets the accessible relation to its default value.void resetState(gtk.types.AccessibleState state)Resets the accessible state to its default value.void setAccessibleParent(gtk.accessible.Accessible parent = null, gtk.accessible.Accessible nextSibling = null)Sets the parent and sibling of an accessible object.void updateNextAccessibleSibling(gtk.accessible.Accessible newSibling = null)Updates the next accessible sibling of self.void updateProperty(gtk.types.AccessibleProperty[] properties, gobject.value.Value[] values)Updates an array of accessible properties.void updateRelation(gtk.types.AccessibleRelation[] relations, gobject.value.Value[] values)Updates an array of accessible relations.void updateState(gtk.types.AccessibleState[] states, gobject.value.Value[] values)Updates an array of accessible states.T accessibleRole(gtk.types.AccessibleRole propval)Set `accessibleRole` property. Params: propval = The accessible role of the given [gtk.accessible.Accessible] implementation.