Interface

GtkAccessible

Description [src]

interface Gtk.Accessible : GObject.Object

An interface for describing UI elements for Assistive Technologies.

Every accessible implementation has:

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 fromGObject.

Instance methods

gtk_accessible_announce

Requests the user’s screen reader to announce the given message.

since: 4.14

gtk_accessible_get_accessible_parent

Retrieves the accessible parent for an accessible object.

since: 4.10

gtk_accessible_get_accessible_role

Retrieves the accessible role of an accessible object.

gtk_accessible_get_at_context

Retrieves the implementation for the given accessible object.

since: 4.10

gtk_accessible_get_bounds

Queries the coordinates and dimensions of this accessible.

since: 4.10

gtk_accessible_get_first_accessible_child

Retrieves the first accessible child of an accessible object.

since: 4.10

gtk_accessible_get_next_accessible_sibling

Retrieves the next accessible sibling of an accessible object.

since: 4.10

gtk_accessible_get_platform_state

Queries a platform state, such as focus.

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.

since: 4.10

gtk_accessible_update_next_accessible_sibling

Updates the next accessible sibling.

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.

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
  );
  
}

The common interface for accessible objects.

Interface members
g_iface
GTypeInterface
 

No description available.

get_at_context
GtkATContext* (* get_at_context) (
    GtkAccessible* self
  )
 

Retrieve the platform-specific accessibility context for the accessible implementation.

get_platform_state
gboolean (* get_platform_state) (
    GtkAccessible* self,
    GtkAccessiblePlatformState state
  )
 

Retrieve the accessible state.

get_accessible_parent
GtkAccessible* (* get_accessible_parent) (
    GtkAccessible* self
  )
 

No description available.

get_first_accessible_child
GtkAccessible* (* get_first_accessible_child) (
    GtkAccessible* self
  )
 

No description available.

get_next_accessible_sibling
GtkAccessible* (* get_next_accessible_sibling) (
    GtkAccessible* self
  )
 

No description available.

get_bounds
gboolean (* get_bounds) (
    GtkAccessible* self,
    int* x,
    int* y,
    int* width,
    int* height
  )
 

No description available.

Virtual methods

Gtk.Accessible.get_accessible_parent

Retrieves the accessible parent for an accessible object.

since: 4.10

Gtk.Accessible.get_at_context

Retrieves the implementation for the given accessible object.

since: 4.10

Gtk.Accessible.get_bounds

Queries the coordinates and dimensions of this accessible.

since: 4.10

Gtk.Accessible.get_first_accessible_child

Retrieves the first accessible child of an accessible object.

since: 4.10

Gtk.Accessible.get_next_accessible_sibling

Retrieves the next accessible sibling of an accessible object.

since: 4.10

Gtk.Accessible.get_platform_state

Queries a platform state, such as focus.

since: 4.10