| 289 |
289 |
| 290 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) { |
290 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) { |
| 291 item->eventdata = NULL; |
291 item->eventdata = NULL; |
| 292 } |
292 } |
| 293 |
293 |
| |
294 /* ------------------------ SourceListItem (public) ------------------------ */ |
| |
295 |
| |
296 void ui_sourcelist_item_set_icon(UiSourceListItem *item, const char *icon) { |
| |
297 item->icon = icon ? strdup(icon) : NULL; |
| |
298 } |
| |
299 |
| |
300 void ui_sourcelist_item_set_label(UiSourceListItem *item, const char *label) { |
| |
301 item->label = label ? strdup(label) : NULL; |
| |
302 } |
| |
303 |
| |
304 void ui_sourcelist_item_set_button_icon(UiSourceListItem *item, const char *icon) { |
| |
305 item->button_icon = icon ? strdup(icon) : NULL; |
| |
306 } |
| |
307 |
| |
308 void ui_sourcelist_item_set_button_label(UiSourceListItem *item, const char *label) { |
| |
309 item->button_label = label ? strdup(label) : NULL; |
| |
310 } |
| |
311 |
| |
312 void ui_sourcelist_item_set_button_menu(UiSourceListItem *item, UiMenuBuilder *menu) { |
| |
313 item->button_menu = menu; |
| |
314 } |
| |
315 |
| |
316 void ui_sourcelist_item_set_badge(UiSourceListItem *item, const char *badge) { |
| |
317 item->badge = badge ? strdup(badge) : NULL; |
| |
318 } |
| |
319 |
| |
320 void ui_sourcelist_item_set_is_header(UiSourceListItem *item, UiBool isheader) { |
| |
321 item->is_header = isheader; |
| |
322 } |
| |
323 |
| |
324 void ui_sourcelist_item_set_depth(UiSourceListItem *item, int depth) { |
| |
325 item->depth = depth; |
| |
326 } |
| |
327 |
| 294 /* ---------------------------- UiListSelection ---------------------------- */ |
328 /* ---------------------------- UiListSelection ---------------------------- */ |
| 295 |
329 |
| 296 int ui_list_selection_get_count(UiListSelection *sel) { |
330 int ui_list_selection_get_count(UiListSelection *sel) { |
| 297 return sel->count; |
331 return sel->count; |
| 298 } |
332 } |