add UiFileList wrapper

Wed, 20 Aug 2025 16:59:53 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 20 Aug 2025 16:59:53 +0200
changeset 700
7032f69a325c
parent 699
148618eff948
child 701
6fdec085c385

add UiFileList wrapper

ui/common/wrapper.c file | annotate | diff | comparison | revisions
ui/common/wrapper.h file | annotate | diff | comparison | revisions
--- a/ui/common/wrapper.c	Tue Aug 19 21:14:00 2025 +0200
+++ b/ui/common/wrapper.c	Wed Aug 20 16:59:53 2025 +0200
@@ -240,3 +240,16 @@
     ui_listselection_free(*sel);
     free(sel);
 }
+
+/* ---------------------------- UiFileList ---------------------------- */
+
+int ui_filelist_count(UiFileList *flist) {
+    return flist->nfiles;
+}
+
+char* ui_filelist_get(UiFileList *flist, int index) {
+    if(index >= 0 && index < flist->nfiles) {
+        return flist->files[index];
+    }
+    return NULL;
+}
--- a/ui/common/wrapper.h	Tue Aug 19 21:14:00 2025 +0200
+++ b/ui/common/wrapper.h	Wed Aug 20 16:59:53 2025 +0200
@@ -79,6 +79,9 @@
 UIEXPORT int* ui_list_selection_get_rows(UiListSelection *sel);
 UIEXPORT void ui_list_selection_free(UiListSelection *sel);
 
+UIEXPORT int ui_filelist_count(UiFileList *flist);
+UIEXPORT char* ui_filelist_get(UiFileList *flist, int index);
+
 
 #ifdef __cplusplus
 }

mercurial