| 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 |