diff options
Diffstat (limited to 'include/mglpp/window/Window.hpp')
-rw-r--r-- | include/mglpp/window/Window.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp index 2c179a8..8458d71 100644 --- a/include/mglpp/window/Window.hpp +++ b/include/mglpp/window/Window.hpp @@ -27,6 +27,11 @@ namespace mgl { vec2i size; }; + struct Scissor { + vec2i position; + vec2i size; + }; + /* Return true to continue. |get_clipboard| returns false if this returns false. Note: |size| is the size of the current data, not the total data (if the callback only contains a part of the data). @@ -46,11 +51,11 @@ namespace mgl { bool override_redirect = false; bool support_alpha = false; /* support alpha for the window */ bool hide_decorations = false; /* this is a hint, it may be ignored by the window manager */ - Color background_color = {0, 0, 0, 0}; + Color background_color = {0, 0, 0, 255}; const char *class_name = nullptr; mgl_window_type window_type = MGL_WINDOW_TYPE_NORMAL; WindowHandle transient_for_window = 0; /* 0 = none */ - mgl_render_api render_api = MGL_RENDER_API_GLX; + mgl_graphics_api graphics_api = MGL_GRAPHICS_API_EGL; }; Window(); @@ -103,6 +108,9 @@ namespace mgl { void set_view(const View &new_view); View get_view(); + void set_scissor(const Scissor &scissor); + Scissor get_scissor(); + bool is_key_pressed(Keyboard::Key key) const; bool is_mouse_button_pressed(Mouse::Button button) const; @@ -115,6 +123,7 @@ namespace mgl { mgl_window* internal_window(); private: mgl_window window; + bool window_created = false; }; } |