blob: 916e8917a5db187c2afa66091ccefb109b17f6c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef MGLPP_WINDOW_HPP
#define MGLPP_WINDOW_HPP
#include "../graphics/Color.hpp"
#include "../system/vec.hpp"
extern "C" {
#include <mgl/window/window.h>
}
namespace mgl {
typedef mgl_window_handle WindowHandle;
class Event;
class Drawable;
class Window {
public:
class Delegate {
public:
virtual ~Delegate() = default;
virtual void draw() = 0;
};
Window();
~Window();
bool create(const char *title, int width, int height);
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;
private:
mgl_window window;
};
}
#endif /* MGLPP_WINDOW_HPP */
|