Debian Codegraph @

android/app/jni/extern/nfd-modified/test/test_savedialog.c

raw
1 #include "nfd.h"
2
3 #include <stdio.h>
4 #include <stdlib.h>
5
6 /* this test should compile on all supported platforms */
7
8 int main( void )
9 {
10 nfdchar_t *savePath = NULL;
11 nfdresult_t result = NFD_SaveDialog( "png,jpg;pdf", NULL, &savePath );
12 if ( result == NFD_OKAY )
13 {
14 puts("Success!");
15 puts(savePath);
16 free(savePath);
17 }
18 else if ( result == NFD_CANCEL )
19 {
20 puts("User pressed cancel.");
21 }
22 else
23 {
24 printf("Error: %s\n", NFD_GetError() );
25 }
26
27 return 0;
28 }