--- a/ui/common/context.h Sun Apr 16 10:20:21 2023 +0200 +++ b/ui/common/context.h Tue May 23 11:11:28 2023 +0200 @@ -30,9 +30,11 @@ #define UIC_CONTEXT_H #include "../ui/toolkit.h" -#include <ucx/map.h> -#include <ucx/mempool.h> -#include <ucx/list.h> +#include <cx/map.h> +#include <cx/hash_map.h> +#include <cx/mempool.h> +#include <cx/list.h> +#include <cx/linked_list.h> #ifdef __cplusplus extern "C" { @@ -58,16 +60,16 @@ struct UiContext { UiContext *parent; UiObject *obj; - UcxMempool *mempool; + const CxAllocator *allocator; void *document; - UcxList *documents; + CxList *documents; - UcxMap *vars; // manually created context vars - UcxMap *vars_unbound; // unbound vars created by widgets + CxMap *vars; // manually created context vars + CxMap *vars_unbound; // unbound vars created by widgets - UcxList *groups; // int list - UcxList *group_widgets; // UiGroupWidget* list + CxList *groups; // int list + CxList *group_widgets; // UiGroupWidget list void (*attach_document)(UiContext *ctx, void *document); void (*detach_document2)(UiContext *ctx, void *document); @@ -100,7 +102,7 @@ void uic_init_global_context(void); -UiContext* uic_context(UiObject *toplevel, UcxMempool *mp); +UiContext* uic_context(UiObject *toplevel, const CxAllocator *a); UiContext* uic_root_context(UiContext *ctx); void uic_context_set_document(UiContext *ctx, void *document); // deprecated void uic_context_detach_document(UiContext *ctx); // deprecated @@ -122,7 +124,7 @@ void uic_remove_bound_var(UiContext *ctx, UiVar *var); void uic_check_group_widgets(UiContext *ctx); -void uic_add_group_widget(UiContext *ctx, void *widget, ui_enablefunc enable, UcxList *groups); +void uic_add_group_widget(UiContext *ctx, void *widget, ui_enablefunc enable, CxList *groups); #ifdef __cplusplus