Signal protocol for OCaml.
let id =
(* Connecting a handle to a signal *)
Signal.connect "update" Renderer.update
let () =
(* Emit signal *)
Signal.emit "update" [`Int 12]type handleThe handle id.
type signal = stringThe signal.
type arg = [ `Float of float
| `Int of int
| `Pair of int * int
| `String of string
]Argument type to the arguments list.
type callback = arg list -> unitThe handle’s callback.
val debug : bool -> unitEnable or disable debugging.
val emit : signal -> arg list -> unitEmite a signal.
val get : handle -> signal * callbackReturn a handle by its id.
val connect : signal -> callback -> handleConnect a callback to a signal, returning the handle id.
val disconnect : signal -> handle -> unitDisconnect a handle from a signal.