Base class capable of firing events
Fires an event. :param val: event value :type val: object
Determines is events are active :return: True if events are active or False otherwise :rtype: bool
Determines if the given callback is registered for this event.
True if callback is registered or False otherwise
Locks this event generator
(De)activates events on this event generator.
Parameters: events_active (bool) – activate/deactivate events
subscribeEvent(cb, data=None, with_first_event=True)¶
Subscribes to the event
- cb (callable) – a callable object
- data (boolean) – extra data to send each time an event is triggered on the given callback. Default is None.
- with_first_event – whether call the callback with the first event value (the most recent value) during the subscription process. Default is True.
Unlocks this event generator
for internal usage only
Unsubscribes the given callback from the event. If the callback is not a listener for this event a debug message is generated an nothing happens.
waitEvent(val=None, equal=True, any=False, timeout=None, stack=None)¶
Waits for an event to occur
the value of the event that unblocked the wait