# HG changeset patch # User Olaf Wintermann # Date 1755701993 -7200 # Node ID 7032f69a325cfe11e02cc25fadb8710bf3140fb7 # Parent 148618eff9488efdc1b9421d2adba8b6f49c9fef add UiFileList wrapper diff -r 148618eff948 -r 7032f69a325c ui/common/wrapper.c --- 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; +} diff -r 148618eff948 -r 7032f69a325c ui/common/wrapper.h --- 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 }