summaryrefslogtreecommitdiffstats
path: root/include/video.hpp
diff options
context:
space:
mode:
authorancarola <raffaele.ancarola@epfl.ch>2019-02-03 21:52:52 +0100
committerNao Pross <naopross@thearcway.org>2019-02-06 23:33:11 +0100
commit0d30bb843d3aeeacae211e1d0ba3cbf5faa01cd7 (patch)
treebbe7c5b43fb2f6b451336f69bef27153a84bbc24 /include/video.hpp
parentAdd basic texture wrapper (diff)
downloadlibwsdl2-master.tar.gz
libwsdl2-master.zip
Create an interface to SDL eventsHEADmaster
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
Diffstat (limited to 'include/video.hpp')
-rw-r--r--include/video.hpp9
1 files changed, 6 insertions, 3 deletions
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 <string>
#include <array>
+#include <map>
#include <type_traits>
extern "C" {
@@ -236,6 +237,9 @@ namespace wsdl2 {
/// a basic wrapper around a SDL window
class window {
+
+ static std::map<Uint8, window*> 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();
};
-
-
-
}