SDL_log.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #ifndef _SDL_log_h
  2. #define _SDL_log_h
  3. #include "SDL_stdinc.h"
  4. #include "begin_code.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #define SDL_MAX_LOG_MESSAGE 4096
  9. enum
  10. {
  11. SDL_LOG_CATEGORY_APPLICATION,
  12. SDL_LOG_CATEGORY_ERROR,
  13. SDL_LOG_CATEGORY_ASSERT,
  14. SDL_LOG_CATEGORY_SYSTEM,
  15. SDL_LOG_CATEGORY_AUDIO,
  16. SDL_LOG_CATEGORY_VIDEO,
  17. SDL_LOG_CATEGORY_RENDER,
  18. SDL_LOG_CATEGORY_INPUT,
  19. SDL_LOG_CATEGORY_TEST,
  20. SDL_LOG_CATEGORY_RESERVED1,
  21. SDL_LOG_CATEGORY_RESERVED2,
  22. SDL_LOG_CATEGORY_RESERVED3,
  23. SDL_LOG_CATEGORY_RESERVED4,
  24. SDL_LOG_CATEGORY_RESERVED5,
  25. SDL_LOG_CATEGORY_RESERVED6,
  26. SDL_LOG_CATEGORY_RESERVED7,
  27. SDL_LOG_CATEGORY_RESERVED8,
  28. SDL_LOG_CATEGORY_RESERVED9,
  29. SDL_LOG_CATEGORY_RESERVED10,
  30. SDL_LOG_CATEGORY_CUSTOM
  31. };
  32. typedef enum
  33. {
  34. SDL_LOG_PRIORITY_VERBOSE = 1,
  35. SDL_LOG_PRIORITY_DEBUG,
  36. SDL_LOG_PRIORITY_INFO,
  37. SDL_LOG_PRIORITY_WARN,
  38. SDL_LOG_PRIORITY_ERROR,
  39. SDL_LOG_PRIORITY_CRITICAL,
  40. SDL_NUM_LOG_PRIORITIES
  41. } SDL_LogPriority;
  42. typedef void SDLCALL tSDL_LogSetAllPriority(SDL_LogPriority priority);
  43. typedef void SDLCALL tSDL_LogSetPriority(int category,
  44. SDL_LogPriority priority);
  45. typedef SDL_LogPriority SDLCALL tSDL_LogGetPriority(int category);
  46. typedef void SDLCALL tSDL_LogResetPriorities(void);
  47. typedef void SDLCALL tSDL_Log(const char *fmt, ...);
  48. typedef void SDLCALL tSDL_LogVerbose(int category, const char *fmt, ...);
  49. typedef void SDLCALL tSDL_LogDebug(int category, const char *fmt, ...);
  50. typedef void SDLCALL tSDL_LogInfo(int category, const char *fmt, ...);
  51. typedef void SDLCALL tSDL_LogWarn(int category, const char *fmt, ...);
  52. typedef void SDLCALL tSDL_LogError(int category, const char *fmt, ...);
  53. typedef void SDLCALL tSDL_LogCritical(int category, const char *fmt, ...);
  54. typedef void SDLCALL tSDL_LogMessage(int category,
  55. SDL_LogPriority priority,
  56. const char *fmt, ...);
  57. typedef void SDLCALL tSDL_LogMessageV(int category,
  58. SDL_LogPriority priority,
  59. const char *fmt, va_list ap);
  60. typedef void (*SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
  61. typedef void SDLCALL tSDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
  62. typedef void SDLCALL tSDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
  63. extern tSDL_LogSetAllPriority *SDL_LogSetAllPriority;
  64. extern tSDL_LogSetPriority *SDL_LogSetPriority;
  65. extern tSDL_LogGetPriority *SDL_LogGetPriority;
  66. extern tSDL_LogResetPriorities *SDL_LogResetPriorities;
  67. extern tSDL_Log *SDL_Log;
  68. extern tSDL_LogVerbose *SDL_LogVerbose;
  69. extern tSDL_LogDebug *SDL_LogDebug;
  70. extern tSDL_LogInfo *SDL_LogInfo;
  71. extern tSDL_LogWarn *SDL_LogWarn;
  72. extern tSDL_LogError *SDL_LogError;
  73. extern tSDL_LogCritical *SDL_LogCritical;
  74. extern tSDL_LogMessage *SDL_LogMessage;
  75. extern tSDL_LogMessageV *SDL_LogMessageV;
  76. extern tSDL_LogGetOutputFunction *SDL_LogGetOutputFunction;
  77. extern tSDL_LogSetOutputFunction *SDL_LogSetOutputFunction;
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #include "close_code.h"
  82. #endif