colour.utilities.Delegate#

class colour.utilities.Delegate[source]#

Bases: object

Define a delegate allowing listeners to register and be notified of events.

Methods

__init__() None[source]#
Return type:

None

add_listener(listener: Callable) None[source]#

Add the given listener to the delegate.

Parameters:

listener (Callable) – Callable listening to the delegate notifications.

Return type:

None

remove_listener(listener: Callable) None[source]#

Remove the given listener from the delegate.

Parameters:

listener (Callable) – Callable listening to the delegate notifications.

Return type:

None

notify(*args: Any, **kwargs: Any) None[source]#

Notify the delegate listeners.

Parameters:
Return type:

None

__weakref__#

list of weak references to the object