2006-04-03 17:36:27 +00:00
|
|
|
// Event header file
|
|
|
|
|
|
|
|
#ifndef _EVENT_H
|
|
|
|
#define _EVENT_H
|
|
|
|
|
2009-05-21 12:16:39 +00:00
|
|
|
typedef enum event_type
|
|
|
|
{
|
2010-01-07 14:49:07 +00:00
|
|
|
EVENT_IDLE = 0,
|
|
|
|
EVENT_KEY_COMMAND,
|
2009-12-02 13:49:54 +00:00
|
|
|
EVENT_DRAW,
|
|
|
|
EVENT_CLOSE
|
2009-05-21 12:16:39 +00:00
|
|
|
} event_type;
|
|
|
|
|
|
|
|
// A vanilla event. Cast to the correct type of event according to 'type'.
|
|
|
|
typedef struct d_event
|
|
|
|
{
|
|
|
|
event_type type;
|
|
|
|
} d_event;
|
|
|
|
|
2006-04-03 17:36:27 +00:00
|
|
|
int event_init();
|
|
|
|
void event_poll();
|
|
|
|
|
2009-05-21 12:16:39 +00:00
|
|
|
// Not to be confused with event_poll, which will be removed eventually, this one sends events to event handlers
|
|
|
|
void event_process();
|
|
|
|
|
2006-04-03 17:36:27 +00:00
|
|
|
#endif
|