aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/window/Window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mglpp/window/Window.hpp')
-rw-r--r--include/mglpp/window/Window.hpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp
index 79e999d..916e891 100644
--- a/include/mglpp/window/Window.hpp
+++ b/include/mglpp/window/Window.hpp
@@ -1,6 +1,7 @@
#ifndef MGLPP_WINDOW_HPP
#define MGLPP_WINDOW_HPP
+#include "../graphics/Color.hpp"
#include "../system/vec.hpp"
extern "C" {
@@ -8,7 +9,11 @@ extern "C" {
}
namespace mgl {
+ typedef mgl_window_handle WindowHandle;
+
+ class Event;
class Drawable;
+
class Window {
public:
class Delegate {
@@ -17,19 +22,18 @@ namespace mgl {
virtual void draw() = 0;
};
- Window(Delegate *delegate);
+ Window();
~Window();
bool create(const char *title, int width, int height);
- void poll_events();
- void draw();
+ bool poll_event(Event &event);
+ void clear(mgl::Color color = mgl::Color(0, 0, 0, 255));
void draw(Drawable &drawable);
+ void display();
vec2i get_cursor_position() const;
- Delegate* get_delegate();
private:
mgl_window window;
- Delegate *delegate;
};
}