]> git.localhorst.tv Git - space.git/blobdiff - src/graphics/Window.h
move to SDL2
[space.git] / src / graphics / Window.h
diff --git a/src/graphics/Window.h b/src/graphics/Window.h
new file mode 100644 (file)
index 0000000..00418af
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef SPACE_WINDOW_H_
+#define SPACE_WINDOW_H
+
+#include "Canvas.h"
+#include "Vector.h"
+
+#include <SDL.h>
+
+
+namespace space {
+
+class Window {
+
+public:
+       static const Vector<int> POS_CENTER;
+       static const Vector<int> POS_UNDEF;
+
+public:
+       Window() : win(nullptr) { }
+       Window(const char *title, Vector<int> pos, Vector<int> size, Uint32 flags);
+       ~Window();
+
+       Window(Window &&);
+       Window &operator =(Window &&);
+
+       Window(const Window &) = delete;
+       Window &operator =(const Window &) = delete;
+
+public:
+       Vector<int> Size() const;
+
+       Canvas CreateCanvas(Uint32 flags);
+
+private:
+       SDL_Window *win;
+
+};
+
+}
+
+#endif