ui/common/wrapper.c

changeset 109
c3dfcb8f0be7
parent 108
77254bd6dccb
child 110
c00e968d018b
equal deleted inserted replaced
108:77254bd6dccb 109:c3dfcb8f0be7
216 } 216 }
217 217
218 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) { 218 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) {
219 item->eventdata = NULL; 219 item->eventdata = NULL;
220 } 220 }
221
222 /* ---------------------------- UiListSelection ---------------------------- */
223
224 UiListSelection* ui_list_get_selection_allocated(UiList *list) {
225 UiListSelection *sel = malloc(sizeof(UiListSelection));
226 *sel = ui_list_get_selection(list);
227 return sel;
228
229 }
230
231 int ui_list_selection_get_count(UiListSelection *sel) {
232 return sel->count;
233 }
234
235 int* ui_list_selection_get_rows(UiListSelection *sel) {
236 return sel->rows;
237 }
238
239 void ui_list_selection_free(UiListSelection *sel) {
240 ui_listselection_free(*sel);
241 free(sel);
242 }
243
244 /* ---------------------------- UiFileList ---------------------------- */
245
246 int ui_filelist_count(UiFileList *flist) {
247 return flist->nfiles;
248 }
249
250 char* ui_filelist_get(UiFileList *flist, int index) {
251 if(index >= 0 && index < flist->nfiles) {
252 return flist->files[index];
253 }
254 return NULL;
255 }

mercurial