From 8a0f6d6eee6162d1a10b20512e2f2c86a0278a34 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 21 Jan 2019 20:11:29 +0100 Subject: Add events wrapper --- include/event.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/event.hpp (limited to 'include') 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 + +extern "C" { +#include +} + +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 poll_event(); +} \ No newline at end of file -- cgit v1.2.1