summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/daw/platform_glfw.h2
-rw-r--r--src/include/daw/window.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/include/daw/platform_glfw.h b/src/include/daw/platform_glfw.h
index 01964c9..8311c5a 100644
--- a/src/include/daw/platform_glfw.h
+++ b/src/include/daw/platform_glfw.h
@@ -13,6 +13,7 @@ extern "C" {
Window* window_init_glfw(const char *restrict windowtitle, ivec2 windowsize, const u32 flags);
void window_destroy_glfw(Window *restrict w);
void window_resize_glfw(Window *restrict window, int width, int height);
+void window_size_glfw(Window *restrict w, ivec2 *restrict dst);
bool window_should_close_glfw(Window *restrict window);
void window_poll_glfw(void);
@@ -20,6 +21,7 @@ const struct Platform Platform_GLFW = {
.window_init = window_init_glfw,
.window_destroy = window_destroy_glfw,
.window_resize = window_resize_glfw,
+ .window_size = window_size_glfw,
.window_should_close = window_should_close_glfw,
.window_poll = window_poll_glfw,
};
diff --git a/src/include/daw/window.h b/src/include/daw/window.h
index 83280ec..f445860 100644
--- a/src/include/daw/window.h
+++ b/src/include/daw/window.h
@@ -73,6 +73,10 @@ struct Platform {
*/
void (*window_resize)(Window *restrict window, int width, int height);
+ /* Retrieve the current window size and store it in `dst`.
+ */
+ void (*window_size)(Window *restrict window, ivec2 *restrict dst);
+
/* Return true if the platform has ordered the window to exit. */
bool (*window_should_close)(Window *restrict w);
@@ -94,6 +98,7 @@ void window_reset_drawing(void);
void render(Window* w);
void get_mousepos(double *x, double *y);
+void window_get_size(ivec2* dst);
#ifdef __cplusplus
}