ui/common/object.c

branch
newapi
changeset 328
059cba080ab4
parent 174
0358f1d9c506
--- a/ui/common/object.c	Sun Oct 06 12:08:40 2024 +0200
+++ b/ui/common/object.c	Mon Oct 07 23:26:30 2024 +0200
@@ -51,8 +51,10 @@
 
 
 UiObject* uic_object_new(UiObject *toplevel, UIWIDGET widget) {
-    UiContext *ctx = toplevel->ctx;
-    
+    return uic_ctx_object_new(toplevel->ctx, widget);
+}
+
+UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) {
     UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject));
     newobj->ctx = ctx;
     newobj->widget = widget;

mercurial