79 } |
79 } |
80 observer = observer->next; |
80 observer = observer->next; |
81 } |
81 } |
82 } |
82 } |
83 |
83 |
|
84 void ui_notify_evt(UiObserver *observer, UiEvent *event) { |
|
85 while(observer) { |
|
86 observer->callback(event, observer->data); |
|
87 observer = observer->next; |
|
88 } |
|
89 } |
|
90 |
84 /* --------------------------- UiList --------------------------- */ |
91 /* --------------------------- UiList --------------------------- */ |
85 |
92 |
86 UiList* ui_list_new(void) { |
93 UiList* ui_list_new(void) { |
87 UiList *list = malloc(sizeof(UiList)); |
94 UiList *list = malloc(sizeof(UiList)); |
88 list->first = ui_list_first; |
95 list->first = ui_list_first; |
196 ucx_list_free(cols); |
203 ucx_list_free(cols); |
197 |
204 |
198 return info; |
205 return info; |
199 } |
206 } |
200 |
207 |
201 void ui_model_info_free(UiContext *ctx, UiModelInfo *mi) { |
208 void ui_model_info_free(UiContext *ctx, UiModel *mi) { |
202 ucx_mempool_free(ctx->mempool, mi->types); |
209 ucx_mempool_free(ctx->mempool, mi->types); |
203 ucx_mempool_free(ctx->mempool, mi->titles); |
210 ucx_mempool_free(ctx->mempool, mi->titles); |
204 ucx_mempool_free(ctx->mempool, mi); |
211 ucx_mempool_free(ctx->mempool, mi); |
205 } |
212 } |
206 |
213 |