In order to access the above event information, one has to pass
a list of required event fields to the bind function.
valbind : events:event list -> ?extend:bool -> ?breakable:bool -> ?fields:eventField list -> ?action:(eventInfo -> unit) -> 'a Widget.widget -> unit
Bind a succession of events on a widget to an action.
If extend is true then then binding is added after existing
ones, otherwise it replaces them.
breakable should be true when break is to be called inside
the action.
action is called with the fields required set in
an eventInfo structure. Other fields should not be accessed.
If action is omitted then existing bindings are removed.
valbind_class : events:event list -> ?extend:bool -> ?breakable:bool -> ?fields:eventField list -> ?action:(eventInfo -> unit) -> ?on:'a Widget.widget -> string -> unit
Same thing for all widgets of a given class. If a widget
is given with label ~on:, the binding will be removed as
soon as it is destroyed.
valbind_tag : events:event list -> ?extend:bool -> ?breakable:bool -> ?fields:eventField list -> ?action:(eventInfo -> unit) -> ?on:'a Widget.widget -> string -> unit
Same thing for all widgets having a given tag
valbreak : unit -> unit
Used inside a bound action, do not call other actions
after this one. This is only possible if this action
was bound with ~breakable:true.