#ifndef TS_EVENT #define TS_EVENT #include // FIXME: using this for keysym stuff for now #define TS_KEYDOWN 0 #define TS_KEYUP 1 enum TSEventType { TS_WINDOW, TS_KEYBOARD }; struct TSEvent_Key { int scancode; SDLMod mod; SDLKey sym; // ripped from SDL? Uint16 unicode; }; struct TSEvent_Keyboard { int state; struct TSEvent_Key key; }; struct TSEvent_Window { int eventcode; }; struct TSEvent_Mouseclick { int state; int button; }; struct TSEvent_Mousemove { int x; int y; }; struct TSEvent { enum TSEventType type; union { struct TSEvent_Keyboard keyboard; struct TSEvent_Window window; struct TSEvent_Mouseclick mouseclick; struct TSEvent_Mousemove mousemove; }; }; #endif