37#define CMDFX_EVENT_RESIZE 0
66#define CMDFX_EVENT_KEY 1
87#define CMDFX_EVENT_MOUSE 2
EventCallback * getCmdFXEventListener(unsigned int eventId, unsigned int listenerId)
Gets an event listener.
int beginCmdFXEventLoop()
Starts the event loop for CmdFX.
int removeCmdFXEventListener(unsigned int eventId, unsigned int listenerId)
Removes an event listener.
int endCmdFXEventLoop()
Ends the event loop for CmdFX.
const EventCallback ** dispatchCmdFXEvent(CmdFX_Event *event)
Dispatches an event.
int(* EventCallback)(struct CmdFX_Event *event)
Represents an event callback.
Definition events.h:96
int addCmdFXEventListener(unsigned int id, EventCallback callback)
Adds an event listener.
The main event structure for CmdFX.
Definition events.h:104
unsigned int id
The event ID.
Definition events.h:108
void * data
A pointer to the data associated with the event.
Definition events.h:116
unsigned long long time
The time the event was created, in milliseconds.
Definition events.h:112
The payload for the CMDFX_EVENT_KEY event.
Definition events.h:71
char keyChar
The character representation of the key.
Definition events.h:79
int keyCode
The key code.
Definition events.h:75
The payload for the CMDFX_EVENT_RESIZE event.
Definition events.h:42
int newWidth
The new width of the terminal.
Definition events.h:54
int prevHeight
The previous height of the terminal.
Definition events.h:50
int prevWidth
The previous width of the terminal.
Definition events.h:46
int newHeight
The new height of the terminal.
Definition events.h:58