ui/common/wrapper.c

changeset 1134
b4b3c689ff8a
parent 1132
2cd3b4131a57
child 1135
2b1574ae72b5
--- a/ui/common/wrapper.c	Tue May 19 18:45:56 2026 +0200
+++ b/ui/common/wrapper.c	Wed May 20 19:38:54 2026 +0200
@@ -50,6 +50,22 @@
     obj->onclosedata = userdata;
 }
 
+static int obj_unref(void *ptr) {
+    ui_object_unref(ptr);
+}
+
+void ui_mainthread_object_unref(UiObject *obj) {
+    ui_call_mainthread(obj_unref, obj);
+}
+
+static int doc_unref(void *ptr) {
+    ui_document_unref(ptr);
+}
+
+void ui_mainthread_document_unref(void *doc) {
+    ui_call_mainthread(doc_unref, doc);
+}
+
 
 /* ---------------------------- UiList ---------------------------- */
 

mercurial