nfd_common.h 637 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. Native File Dialog
  3. Internal, common across platforms
  4. http://www.frogtoss.com/labs
  5. */
  6. #ifndef _NFD_COMMON_H
  7. #define _NFD_COMMON_H
  8. #include "nfd.h"
  9. #include <stdint.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #define NFD_MAX_STRLEN 256
  14. #define _NFD_UNUSED(x) ((void)x)
  15. #define NFD_UTF8_BOM "\xEF\xBB\xBF"
  16. void *NFDi_Malloc( size_t bytes );
  17. void NFDi_Free( void *ptr );
  18. void NFDi_SetError( const char *msg );
  19. int NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy );
  20. int32_t NFDi_UTF8_Strlen( const nfdchar_t *str );
  21. int NFDi_IsFilterSegmentChar( char ch );
  22. #ifdef __cplusplus
  23. }
  24. #endif
  25. #endif