From 0d30bb843d3aeeacae211e1d0ba3cbf5faa01cd7 Mon Sep 17 00:00:00 2001 From: ancarola Date: Sun, 3 Feb 2019 21:52:52 +0100 Subject: Create an interface to SDL events List of basic events interfaces in namespace wsdl2::event - event_t - e_key - mouse::e_mouse - mouse::e_motion - mouse::e_button - e_quit (pure SDL quit callback) - window::e_window - window::e_resize - window::e_move --- include/video.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/video.hpp') diff --git a/include/video.hpp b/include/video.hpp index 1d71d21..7fbf859 100644 --- a/include/video.hpp +++ b/include/video.hpp @@ -4,6 +4,7 @@ #include #include +#include #include extern "C" { @@ -236,6 +237,9 @@ namespace wsdl2 { /// a basic wrapper around a SDL window class window { + + static std::map win_map; + public: friend class renderer; @@ -261,6 +265,8 @@ namespace wsdl2 { renderer& get_renderer() { return m_renderer; } void update(); + static window * get(Uint8 id); + private: bool m_open; renderer m_renderer; @@ -269,7 +275,4 @@ namespace wsdl2 { // dirty C code SDL_Window* sdl(); }; - - - } -- cgit v1.2.1