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:
 - 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 
- “attributes”, represented by a set of [enum`Gtk`.AccessibleState], [enum`Gtk`.AccessibleProperty] and [enum`Gtk`.AccessibleRelation] values 
 - The role cannot be changed after instantiating a - GtkAccessibleimplementation.- 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 - GtkWidgetvisibility changes, the- Gtk.AccessibleState.HIDDENstate 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]. - announce(message, priority)[source]¶
- Parameters:
- message ( - str) – the string to announce
- priority ( - Gtk.AccessibleAnnouncementPriority) – the priority of the announcement
 
 - Requests the user’s screen reader to announce the given message. - This kind of notification is useful for messages that either have only a visual representation or that are not exposed visually at all, e.g. a notification about a successful operation. - Also, by using this API, you can ensure that the message does not interrupts the user’s current screen reader output. - New in version 4.14. 
 - get_accessible_parent()[source]¶
- Returns:
- the accessible parent 
- Return type:
 - Retrieves the accessible parent for an accessible object. - This function returns - NULLfor 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 implementation for the given accessible object. - 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 - GtkAccessibleimplementations, 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:
 - Queries a platform state, such as focus. - This functionality can be overridden by - GtkAccessibleimplementations, e.g. to get platform state from an ignored child widget, as is the case for- GtkTextwrappers.- New in version 4.10. 
 - reset_property(property)[source]¶
- Parameters:
- property ( - Gtk.AccessibleProperty) – the accessible property
 - Resets the accessible property to its default value. 
 - reset_relation(relation)[source]¶
- Parameters:
- relation ( - Gtk.AccessibleRelation) – the accessible relation
 - Resets the accessible relation to its default value. 
 - reset_state(state)[source]¶
- Parameters:
- state ( - Gtk.AccessibleState) – the accessible state
 - Resets the accessible state to its default value. 
 - set_accessible_parent(parent, next_sibling)[source]¶
- Parameters:
- parent ( - Gtk.Accessibleor- None) – the parent accessible object
- next_sibling ( - Gtk.Accessibleor- None) – 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 - GtkAccessibleinterface, 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.Accessibleor- None) – the new next accessible sibling to set
 - Updates the next accessible sibling. - That might be useful when a new child of a custom accessible is created, and it needs to be linked to a previous child. - New in version 4.10. 
 - update_platform_state(state)[source]¶
- Parameters:
- state ( - Gtk.AccessiblePlatformState) – the platform state to update
 - Informs ATs that the platform state has changed. - This function should be used by - GtkAccessibleimplementations that have a platform state but are not widgets. Widgets handle platform states automatically.- New in version 4.18. 
 - update_property(properties, values)[source]¶
- Parameters:
- properties ([ - Gtk.AccessibleProperty]) – an array of accessible properties
- values ([ - GObject.Value]) – an array of- GValues, one for each property
 
 - Updates an array of accessible properties. - This function should be called by - GtkWidgettypes 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 of accessible relations
- values ([ - GObject.Value]) – an array of- GValues, one for each relation
 
 - Updates an array of accessible relations. - This function should be called by - GtkWidgettypes 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 of accessible states
- values ([ - GObject.Value]) – an array of- GValues, one for each state
 
 - Updates an array of accessible states. - This function should be called by - GtkWidgettypes 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 - NULLfor top level widgets.- New in version 4.10. 
 - do_get_at_context() virtual¶
- Returns:
- the accessible implementation object 
- Return type:
 - Retrieves the implementation for the given accessible object. - 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 - GtkAccessibleimplementations, 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:
 - Queries a platform state, such as focus. - This functionality can be overridden by - GtkAccessibleimplementations, e.g. to get platform state from an ignored child widget, as is the case for- GtkTextwrappers.- 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 - GtkAccessibleimplementation.- The accessible role cannot be changed once set.