Handler

Represents an SDL event handler, which controls the main thread and calls delegate functions specified by the program

Members

Functions

addDelegate
void addDelegate(void delegate(EventArgs) del, int event)

Adds a delegate function to be called by this handler when a specific event occurs

callEvent
void callEvent(uint event, EventArgs arg)

Dispatches an event to be run by user-defined delegate functions event: Event UID

handle
void handle()

Starts the main loop for this Handler. The loop will run until the stop function has been called

stop
void stop()

Forces the main loop to stop

Properties

events
events [@property getter]

The SDL events that happened this frame. This function should only be called on the main thread.

time
time [@property getter]

The amount of time it took between the previous frame and this frame This function should only be called on the main thread.

Meta