package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Accessible/index.html

Module Wrappers.Accessible

type t = [ `accessible ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val update_next_accessible_sibling : t -> t option -> unit

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.

val set_accessible_parent : t -> t option -> t option -> unit

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.

val reset_state : t -> Gtk_enums.accessiblestate -> unit

Resets the accessible @state to its default value.

val reset_relation : t -> Gtk_enums.accessiblerelation -> unit

Resets the accessible @relation to its default value.

val reset_property : t -> Gtk_enums.accessibleproperty -> unit

Resets the accessible @property to its default value.

val get_platform_state : t -> Gtk_enums.accessibleplatformstate -> bool

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 for `GtkText` wrappers.

val get_next_accessible_sibling : t -> t option

Retrieves the next accessible sibling of an accessible object

val get_first_accessible_child : t -> t option

Retrieves the first accessible child of an accessible object.

val get_bounds : t -> bool * int * int * int * int

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.

val get_at_context : t -> [ `at_context | `object_ ] Gobject.obj

Retrieves the accessible implementation for the given `GtkAccessible`.

val get_accessible_role : t -> Gtk_enums.accessiblerole

Retrieves the accessible role of an accessible object.

val get_accessible_parent : t -> t option

Retrieves the accessible parent for an accessible object.

This function returns `NULL` for top level widgets.

val announce : t -> string -> Gtk_enums.accessibleannouncementpriority -> unit

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.