EventListener

Generic event listener.

Members

Functions

addEventListener
size_t addEventListener(void delegate(T) listener)

Adds an event through a delegate.

callCancellableIfExists
bool callCancellableIfExists(Parameters!(T.__ctor) args)

Calls a cancellable event using callEventIfExists.

callEvent
void callEvent(T event)

Calls an event. Events are always called in the order they are registered, even in the inheritance.

callEventIfExists
T callEventIfExists(Parameters!(T.__ctor) args)

Calls an event only if it exists. This should be used when a event is used only to notify the plugin of it.

callablesOf
Callable[] callablesOf(T event)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
opOpAssign(void delegate(T) listener)

Adds an event through a delegate.

opOpAssign
bool opOpAssign(void delegate(T) listener)

Removes an event listener using its delegate pointer.

opOpAssign
bool opOpAssign(size_t count)

Removes an event listener using its assigned id.

removeEventListener
bool removeEventListener(void delegate(T) listener)

Removes an event listener using its delegate pointer.

removeEventListener
bool removeEventListener(size_t count)

Removes an event listener using its assigned id.

setListener
void setListener(EventListener!(O, E) listener)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

listeners
Delegate[][class_t] listeners;
Undocumented in source.

Meta