Skip to content

Gtk.ATContext

class — extends GObject.Object

Communicates with platform-specific assistive technologies API.

Each platform supported by GTK implements a GtkATContext subclass, and is responsible for updating the accessible state in response to state changes in GtkAccessible.

Constructors

create

@classmethod
def create(cls, accessible_role: AccessibleRole | int, accessible: Accessible, display: Gdk.Display) -> ATContext | None

Creates a new GtkATContext instance for the given accessible role, accessible instance, and display connection.

The GtkATContext implementation being instantiated will depend on the platform.

Parameters:

  • accessible_role — the accessible role used by the GtkATContext
  • accessible — the GtkAccessible implementation using the GtkATContext
  • display — the GdkDisplay used by the GtkATContext

Methods

get_accessible

def get_accessible(self) -> Accessible

Retrieves the GtkAccessible using this context.

get_accessible_role

def get_accessible_role(self) -> AccessibleRole

Retrieves the accessible role of this context.

Properties

accessible

accessible: Accessible  # read/write

The GtkAccessible that created the GtkATContext instance.

accessible_role

accessible_role: AccessibleRole | int  # read/write

The accessible role used by the AT context.

Depending on the given role, different states and properties can be set or retrieved.

display

display: Gdk.Display  # read/write

The GdkDisplay for the GtkATContext.

realized

realized: bool  # read-only

Whether the GtkATContext has been realized or not.

Signals

state-change

def on_state_change(self) -> None: ...

Emitted when the attributes of the accessible for the GtkATContext instance change.