summaryrefslogtreecommitdiff
path: root/graphics/asymptote/cudareflect/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_savedialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/cudareflect/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_savedialog.c')
-rw-r--r--graphics/asymptote/cudareflect/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_savedialog.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/graphics/asymptote/cudareflect/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_savedialog.c b/graphics/asymptote/cudareflect/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_savedialog.c
new file mode 100644
index 0000000000..4e1f69efc4
--- /dev/null
+++ b/graphics/asymptote/cudareflect/tinyexr/examples/exrview/ThirdPartyLibs/nativefiledialog/test/test_savedialog.c
@@ -0,0 +1,28 @@
+#include <nfd.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* this test should compile on all supported platforms */
+
+int main( void )
+{
+ nfdchar_t *savePath = NULL;
+ nfdresult_t result = NFD_SaveDialog( "png,jpg;pdf", NULL, &savePath );
+ if ( result == NFD_OKAY )
+ {
+ puts("Success!");
+ puts(savePath);
+ free(savePath);
+ }
+ else if ( result == NFD_CANCEL )
+ {
+ puts("User pressed cancel.");
+ }
+ else
+ {
+ printf("Error: %s\n", NFD_GetError() );
+ }
+
+ return 0;
+}