diff options
Diffstat (limited to 'graphics/asymptote/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_opendialogmultiple.c')
-rw-r--r-- | graphics/asymptote/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_opendialogmultiple.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/graphics/asymptote/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_opendialogmultiple.c b/graphics/asymptote/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_opendialogmultiple.c new file mode 100644 index 0000000000..16cd675542 --- /dev/null +++ b/graphics/asymptote/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_opendialogmultiple.c @@ -0,0 +1,34 @@ +#include <nfd.h> + +#include <stdio.h> +#include <stdlib.h> + +/* this test should compile on all supported platforms */ + +int main( void ) +{ + nfdchar_t *outPath = NULL; + + nfdpathset_t pathSet; + nfdresult_t result = NFD_OpenDialogMultiple( "png,jpg;pdf", NULL, &pathSet ); + if ( result == NFD_OKAY ) + { + size_t i; + for ( i = 0; i < NFD_PathSet_GetCount(&pathSet); ++i ) + { + nfdchar_t *path = NFD_PathSet_GetPath(&pathSet, i); + printf("Path %li: %s\n", i, path ); + } + NFD_PathSet_Free(&pathSet); + } + else if ( result == NFD_CANCEL ) + { + puts("User pressed cancel."); + } + else + { + printf("Error: %s\n", NFD_GetError() ); + } + + return 0; +} |