diff -r b1eac0878ce7 -r 18892c0a9adc ui/common/context.h --- a/ui/common/context.h Sat Dec 05 10:34:10 2020 +0100 +++ b/ui/common/context.h Sat Dec 05 11:54:58 2020 +0100 @@ -59,14 +59,19 @@ UiContext *parent; UiObject *obj; UcxMempool *mempool; - UcxMap *bound; // key: char* value: UiVar* - UcxMap *vars; // key: char* value: UiVar* - void *document; + + UcxMap *bound; // key: char* value: UiVar* deprecated + UcxMap *vars; // key: char* value: UiVar* deprecated + void *document; // deprecated + + UcxMap *vars2; // manually created context vars + UcxMap *vars_unbound; // unbound vars created by widgets + UcxList *groups; // int list UcxList *group_widgets; // UiGroupWidget* list - void (*set_document)(UiContext *ctx, void *document); - void (*detach_document)(UiContext *ctx); + void (*set_document)(UiContext *ctx, void *document); // deprecated + void (*detach_document)(UiContext *ctx); // deprecated char *title; @@ -78,6 +83,7 @@ void *close_data; }; +// deprecated struct UiVar { void *value; void *orig_val; @@ -85,6 +91,13 @@ UiVar *from; }; +// UiVar replacement, rename it to UiVar when finished +struct UiVar2 { + void *value; + UiVarType type; + UiContext *bound_from; /* bound by this context or NULL if unbound */ +}; + struct UiGroupWidget { UIWIDGET widget; int *groups; @@ -94,8 +107,8 @@ UiContext* uic_context(UiObject *toplevel, UcxMempool *mp); UiContext* uic_root_context(UiContext *ctx); -void uic_context_set_document(UiContext *ctx, void *document); -void uic_context_detach_document(UiContext *ctx); +void uic_context_set_document(UiContext *ctx, void *document); // deprecated +void uic_context_detach_document(UiContext *ctx); // deprecated //UiVar* uic_get_var(UiContext *ctx, char *name); UiVar* uic_create_var(UiContext *ctx, char *name, UiVarType type);