ui/common/wrapper.c

changeset 693
3e1cd004da0a
parent 671
0ab4c7a18660
child 700
7032f69a325c
--- a/ui/common/wrapper.c	Tue Aug 12 14:56:10 2025 +0200
+++ b/ui/common/wrapper.c	Wed Aug 13 18:56:18 2025 +0200
@@ -218,3 +218,25 @@
 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) {
     item->eventdata = NULL;
 }
+
+/* ---------------------------- UiListSelection ---------------------------- */
+
+UiListSelection* ui_list_get_selection_allocated(UiList *list) {
+    UiListSelection *sel = malloc(sizeof(UiListSelection));
+    *sel = ui_list_get_selection(list);
+    return sel;
+    
+}
+
+int ui_list_selection_get_count(UiListSelection *sel) {
+    return sel->count;
+}
+
+int* ui_list_selection_get_rows(UiListSelection *sel) {
+    return sel->rows;
+}
+
+void ui_list_selection_free(UiListSelection *sel) {
+    ui_listselection_free(*sel);
+    free(sel);
+}

mercurial