ui/common/types.c

changeset 109
c3dfcb8f0be7
parent 108
77254bd6dccb
child 110
c00e968d018b
equal deleted inserted replaced
108:77254bd6dccb 109:c3dfcb8f0be7
163 163
164 void ui_list_clear(UiList *list) { 164 void ui_list_clear(UiList *list) {
165 cxListClear(list->data); 165 cxListClear(list->data);
166 } 166 }
167 167
168 UIEXPORT void ui_list_update(UiList *list) { 168 void ui_list_update(UiList *list) {
169 if(list->update) { 169 if(list->update) {
170 list->update(list, -1); 170 list->update(list, -1);
171 }
172 }
173
174 void ui_list_update_row(UiList *list, int row) {
175 if(list->update) {
176 list->update(list, row);
177 }
178 }
179
180 UiListSelection ui_list_get_selection(UiList *list) {
181 if(list->getselection) {
182 return list->getselection(list);
183 } else {
184 return (UiListSelection){0, NULL};
171 } 185 }
172 } 186 }
173 187
174 void ui_list_addobsv(UiList *list, ui_callback f, void *data) { 188 void ui_list_addobsv(UiList *list, ui_callback f, void *data) {
175 list->observers = ui_add_observer(list->observers, f, data); 189 list->observers = ui_add_observer(list->observers, f, data);

mercurial