ui/common/wrapper.c

changeset 1168
2f9d8af6a499
parent 1155
066fc6df92d1
child 1171
d5500e601996
equal deleted inserted replaced
1167:f0e901f7d1b7 1168:2f9d8af6a499
96 96
97 void ui_list_set_iter(UiList *list, void *iter) { 97 void ui_list_set_iter(UiList *list, void *iter) {
98 list->iter = iter; 98 list->iter = iter;
99 } 99 }
100 100
101 void ui_list_set_save_selection(UiList *list, UiBool value) {
102 list->save_selection = value;
103 }
104
105 UiBool ui_list_get_save_selection(UiList *list) {
106 return list->save_selection;
107 }
101 108
102 /* ------------------------------ UiSublist ------------------------------ */ 109 /* ------------------------------ UiSublist ------------------------------ */
103 110
104 UiSubList* ui_sublist_new(void) { 111 UiSubList* ui_sublist_new(void) {
105 UiSubList *sublist = malloc(sizeof(UiSubList)); 112 UiSubList *sublist = malloc(sizeof(UiSubList));
272 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) { 279 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) {
273 item->eventdata = NULL; 280 item->eventdata = NULL;
274 } 281 }
275 282
276 /* ---------------------------- UiListSelection ---------------------------- */ 283 /* ---------------------------- UiListSelection ---------------------------- */
277
278 UiListSelection* ui_list_get_selection_allocated(UiList *list) {
279 UiListSelection *sel = malloc(sizeof(UiListSelection));
280 *sel = ui_list_get_selection(list);
281 return sel;
282
283 }
284 284
285 int ui_list_selection_get_count(UiListSelection *sel) { 285 int ui_list_selection_get_count(UiListSelection *sel) {
286 return sel->count; 286 return sel->count;
287 } 287 }
288 288
297 if(list->setselection) { 297 if(list->setselection) {
298 list->setselection(list, sel); 298 list->setselection(list, sel);
299 } 299 }
300 } 300 }
301 301
302 void ui_list_selection_free(UiListSelection *sel) {
303 ui_listselection_free(*sel);
304 free(sel);
305 }
306 302
307 /* -------------------------- UiTextChangedEvent -------------------------- */ 303 /* -------------------------- UiTextChangedEvent -------------------------- */
308 304
309 int ui_text_change_event_get_type(UiTextChangeEventData *event) { 305 int ui_text_change_event_get_type(UiTextChangeEventData *event) {
310 return event->type; 306 return event->type;

mercurial