package lablgtk3

  1. Overview
  2. Docs
OCaml interface to GTK+3

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lablgtk3-3.1.5.tbz
sha256=d4821cdbecf3ae374f20317d63e43fe58030c3ba9657b51a2e83e652197e8eac
sha512=83f0be38a1e21737de93f88b0adac15cdcc50cf712d773720b9bc1e8d8ffdb2c660d35840f25d326a42a9d4e6537e6cef466099bf72494196b2cc79977e703e3

doc/lablgtk3/GtkSignal/index.html

Module GtkSignalSource

Signals

Sourcetype id
Sourcetype 'a marshaller = 'a -> Gobject.Closure.argv -> unit
Sourcetype ('a, 'b) t = {
  1. name : string;
  2. classe : 'a;
  3. marshaller : 'b marshaller;
}

When writing marshallers, beware that the list omits the 0th argument of argv, which is the referent object

Sourcetype query = {
  1. id : int;
  2. signal_name : string;
  3. itype : string;
  4. flags : int;
  5. return : string;
  6. params : string array;
}
Sourceval stop_emit : unit -> unit

Call stop_emit () in a callback to prohibit further handling of the current signal invocation, by calling emit_stop_by_name. Be careful about where you use it, since the concept of current signal may be tricky.

Sourceval connect : sgn:('a, 'b) t -> callback:'b -> ?after:bool -> 'a Gobject.obj -> id

You may use stop_emit inside the callback

Sourceval connect_property : prop:('a, 'b) Gobject.property -> callback:('b -> unit) -> 'a Gobject.obj -> id

Connect to the "notify::foo" signal associated with a property. These are emitted each time the property "foo" is set (including when it is set to the same value).

Sourceval user_handler : (exn -> unit) ref

A hook to allow changing the behaviour of exceptions in callbacks The default behaviour of printing the exception and ignoring it is obtained when user_handler is set to Pervasives.raise

Sourceval safe_call : ?where:string -> ('a -> unit) -> 'a -> unit

A hook to allow changing the behaviour of exceptions in callbacks The default behaviour of printing the exception and ignoring it is obtained when user_handler is set to Pervasives.raise

Safe wrapper for function calls. Tries to handle exceptions with user_handler, and reports an error otherwise.

Sourceval signal_new : string -> Gobject.g_type -> Gobject.signal_type list -> unit
Sourceval list_ids : Gobject.g_type -> int array
Sourceval query : int -> query
Sourceval connect_by_name : 'a Gobject.obj -> name:string -> callback:Gobject.g_closure -> after:bool -> id
Sourceval disconnect : 'a Gobject.obj -> id -> unit
Sourceval emit_stop_by_name : 'a Gobject.obj -> name:string -> unit

Unsafe: use stop_emit instead.

Sourceval handler_block : 'a Gobject.obj -> id -> unit

Unsafe: use stop_emit instead.

Sourceval handler_unblock : 'a Gobject.obj -> id -> unit
Marshallers

Some marshaller functions, to build signals

Sourceval marshal_unit : (unit -> unit) marshaller
Sourceval marshal_int : (int -> unit) marshaller
Sourceval marshal_string : (string -> unit) marshaller
Sourceval marshal1 : 'a Gobject.data_conv -> string -> ('a -> unit) marshaller
Sourceval marshal2 : 'a Gobject.data_conv -> 'b Gobject.data_conv -> string -> ('a -> 'b -> unit) marshaller
Sourceval marshal3 : 'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> string -> ('a -> 'b -> 'c -> unit) marshaller
Sourceval marshal4 : 'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> 'd Gobject.data_conv -> string -> ('a -> 'b -> 'c -> 'd -> unit) marshaller
Sourceval marshal5 : 'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> 'd Gobject.data_conv -> 'e Gobject.data_conv -> string -> ('a -> 'b -> 'c -> 'd -> 'e -> unit) marshaller
Sourceval marshal6 : 'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> 'd Gobject.data_conv -> 'e Gobject.data_conv -> 'f Gobject.data_conv -> string -> ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> unit) marshaller
Sourceval marshal0_ret : ret:'a Gobject.data_conv -> (unit -> 'a) marshaller
Sourceval marshal1_ret : ret:'a Gobject.data_conv -> 'b Gobject.data_conv -> string -> ('b -> 'a) marshaller
Sourceval marshal2_ret : ret:'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> string -> ('b -> 'c -> 'a) marshaller
Sourceval marshal3_ret : ret:'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> 'd Gobject.data_conv -> string -> ('b -> 'c -> 'd -> 'a) marshaller
Sourceval marshal4_ret : ret:'a Gobject.data_conv -> 'b Gobject.data_conv -> 'c Gobject.data_conv -> 'd Gobject.data_conv -> 'e Gobject.data_conv -> string -> ('b -> 'c -> 'd -> 'e -> 'a) marshaller
Emitter functions
Sourceval emit : 'a Gobject.obj -> sgn:('a, 'b) t -> emitter:(cont:('c Gobject.data_set array -> 'd) -> 'b) -> conv:(Gobject.g_value -> 'd) -> 'b
Sourceval emit_unit : 'a Gobject.obj -> sgn:('a, unit -> unit) t -> unit
Sourceval emit_int : 'a Gobject.obj -> sgn:('a, int -> unit) t -> int -> unit
Default handler override
Sourceval override_class_closure : ('a, 'b) t -> Gobject.g_type -> Gobject.g_closure -> unit
Sourceval chain_from_overridden : Gobject.Closure.argv -> unit