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.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp
index d98f5ef..88a025c 100644
--- a/include/mglpp/window/Window.hpp
+++ b/include/mglpp/window/Window.hpp
@@ -1,8 +1,10 @@
#ifndef MGLPP_WINDOW_HPP
#define MGLPP_WINDOW_HPP
+#include "../graphics/PrimitiveType.hpp"
#include "../graphics/Color.hpp"
#include "../system/vec.hpp"
+#include <stddef.h>
extern "C" {
#include <mgl/window/window.h>
@@ -14,6 +16,7 @@ namespace mgl {
class Event;
class Drawable;
class Shader;
+ class Vertex;
class Window {
public:
@@ -27,13 +30,26 @@ namespace mgl {
~Window();
bool create(const char *title, int width, int height);
+ // Initialize this window from an existing window
+ bool create(WindowHandle existing_window);
+
bool poll_event(Event &event);
- void clear(mgl::Color color = mgl::Color(0, 0, 0, 255));
+
+ void clear(Color color = Color(0, 0, 0, 255));
void draw(Drawable &drawable, Shader *shader = nullptr);
+ void draw(const Vertex *vertices, size_t vertex_count, PrimitiveType primitive_type, Shader *shader = nullptr);
void display();
+ bool is_open() const;
+ bool has_focus() const;
+ void close();
+ void set_title(const char *title);
+ void set_framerate_limit(unsigned int fps);
+ void set_key_repeat_enabled(bool enabled);
+ void set_cursor_visible(bool visible);
vec2i get_size() const;
vec2i get_cursor_position() const;
+ WindowHandle get_system_handle() const;
private:
mgl_window window;
};