From 92dab582ccac31be7fa410e7f4fb3789e88a0629 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 28 Jul 2018 00:50:12 +0800 Subject: *update --- src/libjin/input/event.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/libjin/input') 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 -- cgit v1.1-26-g67d0