aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-03 21:09:13 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-03 21:09:13 +0100
commit1c9ebd15bb0ada387038b7278226a557d0de92ad (patch)
tree3a13e033a6407080781e5b47b896ee39a333e90a /src
parentc2d177ad974a7dd7fda89f70e2c30077deb68a96 (diff)
Add window set_view and get_view
Diffstat (limited to 'src')
-rw-r--r--src/window/Window.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/window/Window.cpp b/src/window/Window.cpp
index 580737d..7f1fe38 100644
--- a/src/window/Window.cpp
+++ b/src/window/Window.cpp
@@ -112,6 +112,20 @@ namespace mgl {
return { window.cursor_position.x, window.cursor_position.y };
}
+ void Window::set_view(const View &new_view) {
+ if(!window.window)
+ return;
+ mgl_window_set_view(&window, (mgl_view*)&new_view);
+ }
+
+ View Window::get_view() {
+ View view;
+ if(!window.window)
+ return view;
+ mgl_window_get_view(&window, (mgl_view*)&view);
+ return view;
+ }
+
WindowHandle Window::get_system_handle() const {
return window.window;
}