diff options
author | chai <chaifix@163.com> | 2018-07-28 00:50:12 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-28 00:50:12 +0800 |
commit | 92dab582ccac31be7fa410e7f4fb3789e88a0629 (patch) | |
tree | 008bbecc76a73aae38d77d1851f4230756356a33 /src/libjin/Input/Event.h | |
parent | b855ebb91ad8d97617ec1aa418b4add84670a07d (diff) |
*update
Diffstat (limited to 'src/libjin/Input/Event.h')
-rw-r--r-- | src/libjin/Input/Event.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/libjin/Input/Event.h b/src/libjin/Input/Event.h index e09f422..4d7230a 100644 --- a/src/libjin/Input/Event.h +++ b/src/libjin/Input/Event.h @@ -1,13 +1,33 @@ #ifndef __JIN_EVENT_H #define __JIN_EVENT_H +#include "../modules.h" +#if JIN_MODULES_INPUT + namespace jin { namespace input { +#if JIN_INPUT_SDL +#include "SDL.h" + typedef SDL_Event Event; - - + inline int pollEvent(Event* e) + { + return SDL_PollEvent(e); + } + + enum EventType{ + QUIT = SDL_QUIT, + KEYDOWN = SDL_KEYDOWN , + KEYUP = SDL_KEYUP, + MOUSEMOTION = SDL_MOUSEMOTION, + MOUSEBUTTONDOWN = SDL_MOUSEBUTTONDOWN, + MOUSEBUTTONUP = SDL_MOUSEBUTTONUP, + MOUSEWHEEL = SDL_MOUSEWHEEL + }; +#endif // JIN_INPUT_SDL } } +#endif // JIN_MODULES_INPUT #endif
\ No newline at end of file |