🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
530 B

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