#ifndef _EVENT_H_ #define _EVENT_H_ struct platform; /* a table holding function pointers to functions that handle events */ struct event_vtbl { void (*keydown)(SDL_keysym *); void (*windowresize)(int, int); void (*quit)(void); }; 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 key_held; /* helper flag */ }; /* function prototypes */ int event_handler_init(struct platform *, struct event_vtbl *); void sdl_process_events(void); void event_keydown(SDL_keysym *); void event_keydown_gen(SDL_keysym *); void event_quit_gen(void); #endif