From 24781de8bedb3bf4d12d7ec1d0307842e59a3f94 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Tue, 10 Dec 2024 20:47:53 +1300 Subject: Binding for filename.H added --- src/c_fl_file_chooser.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/c_fl_file_chooser.cpp') diff --git a/src/c_fl_file_chooser.cpp b/src/c_fl_file_chooser.cpp index 4cf3e8e..3ca16e2 100644 --- a/src/c_fl_file_chooser.cpp +++ b/src/c_fl_file_chooser.cpp @@ -11,6 +11,26 @@ +// Exports from Ada + +extern "C" int file_chooser_sort_hook(const char * a, const char * b); + + + + +// Some extra setup + +int file_chooser_sort_prehook(struct dirent ** a, struct dirent ** b) { + return file_chooser_sort_hook((*a)->d_name, (*b)->d_name); +} + +void file_chooser_setup_sort_hook() { + Fl_File_Chooser::sort = &file_chooser_sort_prehook; +} + + + + // Flattened C API begins here FILECHOOSER new_fl_file_chooser(const char * n, const char * p, int k, const char * t) { -- cgit