Gtk.Accessible¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Signals¶
None
Fields¶
None
Class Details¶
- class Gtk.Accessible¶
- Bases:
- Structure:
GtkAccessible
is an interface for describing UI elements for Assistive Technologies.Every accessible implementation has:
a “role”, represented by a value of the [enum`Gtk`.AccessibleRole] enumeration
an “attribute”, represented by a set of [enum`Gtk`.AccessibleState], [enum`Gtk`.AccessibleProperty] and [enum`Gtk`.AccessibleRelation] 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, theGtk.AccessibleState.HIDDEN
state will also change to reflect the [property`Gtk`.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 [method`Gtk`.Accessible.set_accessible_parent] and updating the sibling by [method`Gtk`.Accessible.update_next_accessible_sibling].
- get_accessible_parent()[source]¶
- Returns:
the accessible parent
- Return type:
Retrieves the accessible parent for an accessible object.
This function returns
NULL
for top level widgets.New in version 4.10.
- get_accessible_role()[source]¶
- Returns:
the accessible role
- Return type:
Retrieves the accessible role of an accessible object.
- get_at_context()[source]¶
- Returns:
the accessible implementation object
- Return type:
Retrieves the accessible implementation for the given
GtkAccessible
.New in version 4.10.
- get_bounds()[source]¶
- Returns:
true if the bounds are valid, and false otherwise
- x:
the x coordinate of the top left corner of the accessible
- y:
the y coordinate of the top left corner of the widget
- width:
the width of the accessible object
- height:
the height of the accessible object
- Return type:
Queries the coordinates and dimensions of this accessible
This functionality can be overridden by
GtkAccessible
implementations, e.g. to get the bounds from an ignored child widget.New in version 4.10.
- get_first_accessible_child()[source]¶
- Returns:
the first accessible child
- Return type:
Retrieves the first accessible child of an accessible object.
New in version 4.10.
- get_next_accessible_sibling()[source]¶
- Returns:
the next accessible sibling
- Return type:
Retrieves the next accessible sibling of an accessible object
New in version 4.10.
- get_platform_state(state)[source]¶
- Parameters:
state (
Gtk.AccessiblePlatformState
) – platform state to query- Returns:
the value of state for the accessible
- Return type:
Query a platform state, such as focus.
See gtk_accessible_platform_changed().
This functionality can be overridden by
GtkAccessible
implementations, e.g. to get platform state from an ignored child widget, as is the case forGtkText
wrappers.New in version 4.10.
- reset_property(property)[source]¶
- Parameters:
property (
Gtk.AccessibleProperty
) – aGtkAccessibleProperty
Resets the accessible property to its default value.
- reset_relation(relation)[source]¶
- Parameters:
relation (
Gtk.AccessibleRelation
) – aGtkAccessibleRelation
Resets the accessible relation to its default value.
- reset_state(state)[source]¶
- Parameters:
state (
Gtk.AccessibleState
) – aGtkAccessibleState
Resets the accessible state to its default value.
- set_accessible_parent(parent, next_sibling)[source]¶
- Parameters:
parent (
Gtk.Accessible
orNone
) – the parent accessible objectnext_sibling (
Gtk.Accessible
orNone
) – the sibling accessible object
Sets the parent and sibling of an accessible object.
This function is meant to be used by accessible implementations that are not part of the widget hierarchy, and but act as a logical bridge between widgets. For instance, if a widget creates an object that holds metadata for each child, and you want that object to implement the
GtkAccessible
interface, you will use this function to ensure that the parent of each child widget is the metadata object, and the parent of each metadata object is the container widget.New in version 4.10.
- update_next_accessible_sibling(new_sibling)[source]¶
- Parameters:
new_sibling (
Gtk.Accessible
orNone
) – the new next accessible sibling to set
Updates the next accessible sibling of self.
That might be useful when a new child of a custom
GtkAccessible
is created, and it needs to be linked to a previous child.New in version 4.10.
- update_property(properties, values)[source]¶
- Parameters:
properties ([
Gtk.AccessibleProperty
]) – an array ofGtkAccessibleProperty
values ([
GObject.Value
]) – an array ofGValues
, one for each property
Updates an array of accessible properties.
This function should be called by
GtkWidget
types whenever an accessible property change must be communicated to assistive technologies.This function is meant to be used by language bindings.
- update_relation(relations, values)[source]¶
- Parameters:
relations ([
Gtk.AccessibleRelation
]) – an array ofGtkAccessibleRelation
values ([
GObject.Value
]) – an array ofGValues
, one for each relation
Updates an array of accessible relations.
This function should be called by
GtkWidget
types whenever an accessible relation change must be communicated to assistive technologies.This function is meant to be used by language bindings.
- update_state(states, values)[source]¶
- Parameters:
states ([
Gtk.AccessibleState
]) – an array ofGtkAccessibleState
values ([
GObject.Value
]) – an array ofGValues
, one for each state
Updates an array of accessible states.
This function should be called by
GtkWidget
types whenever an accessible state change must be communicated to assistive technologies.This function is meant to be used by language bindings.
- do_get_accessible_parent() virtual¶
- Returns:
the accessible parent
- Return type:
Retrieves the accessible parent for an accessible object.
This function returns
NULL
for top level widgets.New in version 4.10.
- do_get_at_context() virtual¶
- Returns:
the accessible implementation object
- Return type:
Retrieves the accessible implementation for the given
GtkAccessible
.New in version 4.10.
- do_get_bounds() virtual¶
- Returns:
true if the bounds are valid, and false otherwise
- x:
the x coordinate of the top left corner of the accessible
- y:
the y coordinate of the top left corner of the widget
- width:
the width of the accessible object
- height:
the height of the accessible object
- Return type:
Queries the coordinates and dimensions of this accessible
This functionality can be overridden by
GtkAccessible
implementations, e.g. to get the bounds from an ignored child widget.New in version 4.10.
- do_get_first_accessible_child() virtual¶
- Returns:
the first accessible child
- Return type:
Retrieves the first accessible child of an accessible object.
New in version 4.10.
- do_get_next_accessible_sibling() virtual¶
- Returns:
the next accessible sibling
- Return type:
Retrieves the next accessible sibling of an accessible object
New in version 4.10.
- do_get_platform_state(state) virtual¶
- Parameters:
state (
Gtk.AccessiblePlatformState
) – platform state to query- Returns:
the value of state for the accessible
- Return type:
Query a platform state, such as focus.
See gtk_accessible_platform_changed().
This functionality can be overridden by
GtkAccessible
implementations, e.g. to get platform state from an ignored child widget, as is the case forGtkText
wrappers.New in version 4.10.
Property Details¶
- Gtk.Accessible.props.accessible_role¶
- Name:
accessible-role
- Type:
- Default Value:
- Flags:
The accessible role of the given
GtkAccessible
implementation.The accessible role cannot be changed once set.