Module dagon.core.event
Primitives and tools for event-driven programming.
Description
The dagon.core.event module defines the EventType enumeration,
the Event struct, the EventManager class for event polling and storing,
and the EventListener base class for handling events.
EventManager is single-threaded. For multi-threaded event/message passing,
use MessageBroker.
Functions
| Name | Description |
messageEvent(sender, recipient, message, payload, domain)
|
Constructs a message event.
|
taskEvent(sender, recipient, callback, payload, domain)
|
Constructs a task event.
|
Structs
| Name | Description |
Event
|
Represents a single event in the Dagon event system.
Contains event type and relevant data for the event.
|
GameInputDevice
|
A structure that represents game input device.
|
Enums
| Name | Description |
EventType
|
All supported event types in Dagon.
|
GameInputDeviceType
|
Enumeration of supported game input device types.
|
MessageDomain
|
Communication layer Event is subject to.
Circular - event goes to both message broker and main-thread event listeners;
ITC - event goes to the message broker;
MainThread - event goes to main-thread event listeners.
|
Manifest constants
| Name | Type | Description |
MAX_CONTROLLERS
|
|
Maximum number of supported controllers.
|
Aliases
| Name | Type | Description |
TaskCallback
|
void delegate(Object, void*)
|
A delegate that can be used as an asynchronous callback in task events.
executor parameter is meant to be the object that executes the task.
payload is user-defined pointer passed with the event.
|