🛠️🐜 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.

28 lines
533 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 *savePath = NULL;
  8. nfdresult_t result = NFD_SaveDialog( "png,jpg;pdf", NULL, &savePath );
  9. if ( result == NFD_OKAY )
  10. {
  11. puts("Success!");
  12. puts(savePath);
  13. free(savePath);
  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. }