Stk.EventsSourceEvents and callback registration.
The event type ev is an extensible type. Some basic events are defined in Widget, others are specific to some widgets and are defined in the corresponding modules (for example in Clist or Textbuffer). Code using the Stk library can add its own events, then use trigger* methods in Object.o to trigger events and the callback registration mecanism below (or through the connect and disconnect methods of Object.o).
register callbacks ev cb registers cb in callbacks to be called when event ev is trigged. The returned callback id can be used to unregister the callback. Optional parameter count indicates the number of times the callback is called before being unregistered. Default is None, i.e. callback is not unregistered.
get callbacks ev returns the list of callbacks associated to event ev in callbacks.
unregister id unregister the callback associated to id.