ui/common/object.c

changeset 112
c3f2f16fa4b8
parent 110
c00e968d018b
child 113
dde28a806552
--- a/ui/common/object.c	Sat Oct 04 14:54:25 2025 +0200
+++ b/ui/common/object.c	Sun Oct 19 21:20:08 2025 +0200
@@ -74,32 +74,6 @@
     }
 }
 
-void ui_end(UiObject *obj) {
-    if(!obj->next) {
-        return;
-    }
-    
-    UiObject *prev = NULL;
-    while(obj->next) {
-        prev = obj;
-        obj = obj->next;
-    }
-    
-    if(prev) {
-        // TODO: free last obj
-        prev->next = NULL;
-    }
-}
-
-void ui_end_new(UiObject *obj) {
-    if(!obj->container_end) {
-        return;
-    }
-    UiContainerX *rm = obj->container_end;
-    uic_object_pop_container(obj);
-    ui_free(obj->ctx, rm);
-}
-
 void ui_object_ref(UiObject *obj) {
     obj->ref++;
 }
@@ -141,10 +115,6 @@
     return obj;
 }
 
-UiObject* uic_object_new(UiObject *toplevel, UIWIDGET widget) {
-    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;
@@ -153,26 +123,6 @@
     return newobj;
 }
 
-void uic_obj_add(UiObject *toplevel, UiObject *ctobj) {
-    UiObject *current = uic_current_obj(toplevel);
-    current->next = ctobj;
-}
-
-UiObject* uic_current_obj(UiObject *toplevel) {
-    if(!toplevel) {
-        return NULL;
-    }
-    UiObject *obj = toplevel;
-    while(obj->next) {
-        obj = obj->next;
-    }
-    return obj;
-}
-
-UiContainer* uic_get_current_container(UiObject *obj) {
-    return uic_current_obj(obj)->container;
-}
-
 void uic_object_push_container(UiObject *toplevel, UiContainerX *newcontainer) {
     newcontainer->prev = toplevel->container_end;
     if(toplevel->container_end) {

mercurial