aboutsummaryrefslogtreecommitdiff
path: root/sdl2/video.ha
diff options
context:
space:
mode:
Diffstat (limited to 'sdl2/video.ha')
-rw-r--r--sdl2/video.ha13
1 files changed, 13 insertions, 0 deletions
diff --git a/sdl2/video.ha b/sdl2/video.ha
index e12ca12..e6dfa58 100644
--- a/sdl2/video.ha
+++ b/sdl2/video.ha
@@ -71,3 +71,16 @@ export @symbol("SDL_CreateWindow") fn create_window(title: const *char,
// Destroy a window.
export @symbol("SDL_DestroyWindow") fn destroy_window(window: *window) void;
+
+// Get the size of a window's client area.
+//
+// Null may safely be passed as the 'w' or 'h' parameter if the width or
+// height value is not desired.
+//
+// The window size in screen coordinates may differ from the size in pixels, if
+// the window was created with `ALLOW_HIGHDPI` on a platform with high-dpi
+// support (e.g. iOS or macOS). Use [[gl_getdrawablesize]],
+// [[vulkan_getdrawablesize]], or [[getrendereroutputsize]] to get the real
+// client area size in pixels.
+export @symbol("SDL_GetWindowSize") fn get_window_size(window: *window,
+ w: nullable *int, h: nullable *int) void;