ui/common/object.c

changeset 51
e324291ca9f8
parent 0
2483f517c562
--- a/ui/common/object.c	Sun Oct 06 18:43:06 2024 +0200
+++ b/ui/common/object.c	Sun Oct 20 21:24:13 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