diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/event.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/event.hpp b/include/event.hpp new file mode 100644 index 0000000..b992852 --- /dev/null +++ b/include/event.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include <optional> + +extern "C" { +#include <SDL2/SDL_events.h> +} + +namespace wrapsdl2 { + class event { + public: + using type = SDL_EventType; + + event(const SDL_Event& e); + + SDL_Event& sdl() { return m_event; } + + private: + SDL_Event m_event; + }; + + + std::optional<event> poll_event(); +}
\ No newline at end of file |