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/Root/index.html

Module Wrappers.Root

type t = [ `root ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val set_focus : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option -> unit

If @focus is not the current focus widget, and is focusable, sets it as the focus widget for the root.

If @focus is %NULL, unsets the focus widget for the root.

To set the focus to a particular widget in the root, it is usually more convenient to use method@Gtk.Widget.grab_focus instead of this function.

val get_focus : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option

Retrieves the current focused widget within the root.

Note that this is the widget that would have the focus if the root is active; if the root is not focused then `gtk_widget_has_focus (widget)` will be %FALSE for the widget.

val get_display : t -> Ocgtk_gdk.Gdk.Wrappers.Display.t

Returns the display that this `GtkRoot` is on.