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

Module Wrappers.Switch

type t = [ `switch | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new Switch

val set_state : t -> bool -> unit

Sets the underlying state of the `GtkSwitch`.

This function is typically called from a signal@Gtk.Switch::state-set signal handler in order to set up delayed state changes.

See signal@Gtk.Switch::state-set for details.

val set_active : t -> bool -> unit

Changes the state of @self to the desired one.

val get_state : t -> bool

Gets the underlying state of the `GtkSwitch`.

val get_active : t -> bool

Gets whether the `GtkSwitch` is in its “on” or “off” state.

val on_activate : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_state_set : ?after:bool -> t -> callback:(state:bool -> bool) -> Gobject.Signal.handler_id