forked from mlabbe/nativefiledialog
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement NFD_PickFolder for mlabbe#22
- Loading branch information
Showing
6 changed files
with
258 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "nfd.h" | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
|
||
/* this test should compile on all supported platforms */ | ||
|
||
int main( void ) | ||
{ | ||
nfdchar_t *outPath = NULL; | ||
nfdresult_t result = NFD_PickFolder( NULL, &outPath ); | ||
if ( result == NFD_OKAY ) | ||
{ | ||
puts("Success!"); | ||
puts(outPath); | ||
free(outPath); | ||
} | ||
else if ( result == NFD_CANCEL ) | ||
{ | ||
puts("User pressed cancel."); | ||
} | ||
else | ||
{ | ||
printf("Error: %s\n", NFD_GetError() ); | ||
} | ||
|
||
return 0; | ||
} |