summaryrefslogtreecommitdiffstats
path: root/sdl/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/event.h')
-rw-r--r--sdl/event.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sdl/event.h b/sdl/event.h
index 0608fa7..b6a1084 100644
--- a/sdl/event.h
+++ b/sdl/event.h
@@ -6,14 +6,23 @@ struct platform;
/* a table holding function pointers to functions that handle events */
struct event_vtbl
{
- void (*keydown)(SDL_keysym *, const unsigned int *, const int);
+ void (*keydown)(SDL_keysym *);
void (*windowresize)(int, int);
};
+struct event_handler
+{
+ struct event_vtbl funcs; /* table of event function handlers */
+ unsigned int keys_held[323]; /* keep track of the keys that were held */
+
+ struct platform *p; /* reference to the host platform */
+ int flag; /* helper flag */
+};
+
/* function prototypes */
int event_handler_init(struct platform *, struct event_vtbl *);
void sdl_process_events(void);
-void event_keydown(SDL_keysym *, const unsigned int *, const int);
+void event_keydown(SDL_keysym *);
#endif