blob: 79e999da3008507c3f43d1e391556ef5478eab45 (
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
|
#ifndef MGLPP_WINDOW_HPP
#define MGLPP_WINDOW_HPP
#include "../system/vec.hpp"
extern "C" {
#include <mgl/window/window.h>
}
namespace mgl {
class Drawable;
class Window {
public:
class Delegate {
public:
virtual ~Delegate() = default;
virtual void draw() = 0;
};
Window(Delegate *delegate);
~Window();
bool create(const char *title, int width, int height);
void poll_events();
void draw();
void draw(Drawable &drawable);
vec2i get_cursor_position() const;
Delegate* get_delegate();
private:
mgl_window window;
Delegate *delegate;
};
}
#endif /* MGLPP_WINDOW_HPP */
|