ui/common/context.c

branch
newapi
changeset 341
c7427cadabd3
parent 337
2904fba2708b
--- a/ui/common/context.c	Sun Oct 20 10:42:13 2024 +0200
+++ b/ui/common/context.c	Sun Oct 20 21:26:06 2024 +0200
@@ -541,6 +541,10 @@
     cxListAdd(ctx->group_widgets, &gw);
 }
 
+UIEXPORT void *ui_ctx_allocator(UiContext *ctx) {
+    return (void*) ctx ? ctx->allocator : NULL;
+}
+
 void* ui_malloc(UiContext *ctx, size_t size) {
     return ctx ? cxMalloc(ctx->allocator, size) : NULL;
 }

mercurial