2 //since the array of const in delphi is not C compatible:
6 * \brief The maximum size of a log message
8 * Messages longer than the maximum size will be truncated
11 SDL_MAX_LOG_MESSAGE = 4096;
14 * \brief The predefined log categories
16 * By default the application category is enabled at the INFO level,
17 * the assert category is enabled at the WARN level, test is enabled
18 * at the VERBOSE level and all other categories are enabled at the
22 TSDL_LogCategory = (SDL_LOG_CATEGORY_APPLICATION,
23 SDL_LOG_CATEGORY_ERROR,
24 SDL_LOG_CATEGORY_ASSERT,
25 SDL_LOG_CATEGORY_SYSTEM,
26 SDL_LOG_CATEGORY_AUDIO,
27 SDL_LOG_CATEGORY_VIDEO,
28 SDL_LOG_CATEGORY_RENDER,
29 SDL_LOG_CATEGORY_INPUT,
30 SDL_LOG_CATEGORY_TEST,
32 {* Reserved for future SDL library use *}
33 SDL_LOG_CATEGORY_RESERVED1,
34 SDL_LOG_CATEGORY_RESERVED2,
35 SDL_LOG_CATEGORY_RESERVED3,
36 SDL_LOG_CATEGORY_RESERVED4,
37 SDL_LOG_CATEGORY_RESERVED5,
38 SDL_LOG_CATEGORY_RESERVED6,
39 SDL_LOG_CATEGORY_RESERVED7,
40 SDL_LOG_CATEGORY_RESERVED8,
41 SDL_LOG_CATEGORY_RESERVED9,
42 SDL_LOG_CATEGORY_RESERVED10,
44 {* Beyond this point is reserved for application use *}
45 SDL_LOG_CATEGORY_CUSTOM);
48 * \brief The predefined log priorities
51 SDL_LOG_PRIORITY_VERBOSE = 1;
52 SDL_LOG_PRIORITY_DEBUG = 2;
53 SDL_LOG_PRIORITY_INFO = 3;
54 SDL_LOG_PRIORITY_WARN = 4;
55 SDL_LOG_PRIORITY_ERROR = 5;
56 SDL_LOG_PRIORITY_CRITICAL = 6;
57 SDL_NUM_LOG_PRIORITIES = 7;
59 TSDL_LogPriority = Integer;
63 * \brief Set the priority of all log categories
65 procedure SDL_LogSetAllPriority(priority: TSDL_LogPriority) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetAllPriority' {$ENDIF} {$ENDIF};
68 * \brief Set the priority of a particular log category
70 procedure SDL_LogSetPriority(category: Integer; priority: TSDL_LogPriority) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetPriority' {$ENDIF} {$ENDIF};
73 * \brief Get the priority of a particular log category
75 function SDL_LogGetPriority(category: Integer): TSDL_LogPriority cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogGetPriority' {$ENDIF} {$ENDIF};
78 * \brief Reset all priorities to default.
80 * \note This is called in SDL_Quit().
82 procedure SDL_LogResetPriorities() cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogResetPriorities' {$ENDIF} {$ENDIF};
85 * \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
87 procedure SDL_Log(const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Log' {$ENDIF} {$ENDIF};
90 * \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
92 procedure SDL_LogVerbose(category: Integer; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogVerbose' {$ENDIF} {$ENDIF};
95 * \brief Log a message with SDL_LOG_PRIORITY_DEBUG
97 procedure SDL_LogDebug(category: Integer; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogDebug' {$ENDIF} {$ENDIF};
100 * \brief Log a message with SDL_LOG_PRIORITY_INFO
102 procedure SDL_LogInfo(category: Integer; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogInfo' {$ENDIF} {$ENDIF};
105 * \brief Log a message with SDL_LOG_PRIORITY_WARN
107 procedure SDL_LogWarn(category: Integer; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogWarn' {$ENDIF} {$ENDIF};
110 * \brief Log a message with SDL_LOG_PRIORITY_ERROR
112 procedure SDL_LogError(category: Integer; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogError' {$ENDIF} {$ENDIF};
115 * \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
117 procedure SDL_LogCritical(category: Integer; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogCritical' {$ENDIF} {$ENDIF};
120 * \brief Log a message with the specified category and priority.
122 procedure SDL_LogMessage(category: Integer; priority: TSDL_LogPriority; const fmt: PAnsiChar; pars: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogMessage' {$ENDIF} {$ENDIF};
125 * \brief Log a message with the specified category and priority.
127 procedure SDL_LogMessageV(category: Integer; priority: TSDL_LogPriority; const fmt: PAnsiChar; ap: array of const) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogMessageV' {$ENDIF} {$ENDIF};
130 * \brief The prototype for the log output function
133 TSDL_LogOutputFunction = procedure(userdata: Pointer; category: Integer; priority: TSDL_LogPriority; const msg: PAnsiChar);
134 PSDL_LogOutputFunction = ^TSDL_LogOutputFunction;
137 * \brief Get the current log output function.
139 procedure SDL_LogGetOutputFunction(callback: PSDL_LogOutputFunction; userdata: PPointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogGetOutputFunction' {$ENDIF} {$ENDIF};
142 * \brief This function allows you to replace the default log output
143 * function with one of your own.
145 procedure SDL_LogSetOutputFunction(callback: TSDL_LogOutputFunction; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetOutputFunction' {$ENDIF} {$ENDIF};