package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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