summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-21 04:48:02 +0100
committerNao Pross <naopross@thearcway.org>2019-01-21 04:48:02 +0100
commitca091e358a8b02423ba304bfca055712b3a70881 (patch)
tree71252ee4f0316387fd2c335fe299313b5b313167 /include
parentInitial commit, add makefile, .gitignore and debug header (diff)
downloadlibwsdl2-ca091e358a8b02423ba304bfca055712b3a70881.tar.gz
libwsdl2-ca091e358a8b02423ba304bfca055712b3a70881.zip
Add basic window wrapper
Diffstat (limited to '')
-rw-r--r--include/input.hpp0
-rw-r--r--include/video.hpp29
-rw-r--r--include/wrapsdl.hpp6
-rw-r--r--include/wrapsdl2.hpp9
4 files changed, 38 insertions, 6 deletions
diff --git a/include/input.hpp b/include/input.hpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/input.hpp
diff --git a/include/video.hpp b/include/video.hpp
new file mode 100644
index 0000000..1b6e022
--- /dev/null
+++ b/include/video.hpp
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <string>
+
+class SDL_Window;
+class SDL_Surface;
+
+namespace wrapsdl2 {
+ class window {
+ public:
+ window() = delete;
+ window(const window& other) = delete;
+
+ window(const std::string& title, std::size_t width, std::size_t height);
+ ~window();
+
+ // manipulation
+ void show();
+ void hide();
+ void raise();
+
+ // rendering
+ void update();
+
+ private:
+ SDL_Window *m_window;
+ SDL_Surface *m_surface;
+ };
+} \ No newline at end of file
diff --git a/include/wrapsdl.hpp b/include/wrapsdl.hpp
deleted file mode 100644
index 9b9a72c..0000000
--- a/include/wrapsdl.hpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-namespace wrapsdl {
- bool initialize(void);
- void quit(void);
-} \ No newline at end of file
diff --git a/include/wrapsdl2.hpp b/include/wrapsdl2.hpp
new file mode 100644
index 0000000..993a704
--- /dev/null
+++ b/include/wrapsdl2.hpp
@@ -0,0 +1,9 @@
+#pragma once
+
+namespace wrapsdl2 {
+ bool initialize(void);
+ void quit(void);
+
+ // tool functions
+ void delay()
+} \ No newline at end of file