ui/winui/window.cpp

changeset 13
5a8762fcfecc
parent 0
2483f517c562
child 18
af411868ab9b
--- a/ui/winui/window.cpp	Tue Jan 30 11:58:11 2024 +0100
+++ b/ui/winui/window.cpp	Tue Jan 30 13:31:25 2024 +0100
@@ -175,3 +175,13 @@
 
 	return obj;
 }
+
+void ui_window_size(UiObject *obj, int width, int height) {
+	UIWINDOW win = obj->wobj;
+	if (win) {
+		winrt::Windows::Graphics::SizeInt32 wsize;
+		wsize.Width = width;
+		wsize.Height = height;
+		win->window.AppWindow().Resize(wsize);
+	}
+}

mercurial