nfd_common.h 615 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #define NFD_MAX_STRLEN 256
  13. #define _NFD_UNUSED(x) ((void)x)
  14. #define NFD_UTF8_BOM "\xEF\xBB\xBF"
  15. void *NFDi_Malloc( size_t bytes );
  16. void NFDi_Free( void *ptr );
  17. void NFDi_SetError( const char *msg );
  18. int NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy );
  19. size_t NFDi_UTF8_Strlen( const nfdchar_t *str );
  20. int NFDi_IsFilterSegmentChar( char ch );
  21. #ifdef __cplusplus
  22. }
  23. #endif
  24. #endif