ui/common/context.c

changeset 622
9090faa4094b
parent 557
e6415fd4af4b
child 623
1ebc781c7d17
equal deleted inserted replaced
621:84b351712c19 622:9090faa4094b
407 case UI_VAR_RANGE: uic_range_unbind(var->value); break; 407 case UI_VAR_RANGE: uic_range_unbind(var->value); break;
408 case UI_VAR_GENERIC: uic_generic_unbind(var->value); break; 408 case UI_VAR_GENERIC: uic_generic_unbind(var->value); break;
409 } 409 }
410 } 410 }
411 411
412 void uic_reg_var(UiContext *ctx, char *name, UiVarType type, void *value) { 412 void uic_reg_var(UiContext *ctx, const char *name, UiVarType type, void *value) {
413 // TODO: do we need/want this? Why adding vars to a context after 413 // TODO: do we need/want this? Why adding vars to a context after
414 // widgets reference these? Workarounds: 414 // widgets reference these? Workarounds:
415 // 1. add vars to ctx before creating ui 415 // 1. add vars to ctx before creating ui
416 // 2. create ui, create new document with vars, attach doc 416 // 2. create ui, create new document with vars, attach doc
417 // also it would be possible to create a function, that scans unbound vars 417 // also it would be possible to create a function, that scans unbound vars

mercurial