1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/* automatically generated by rust-bindgen */
/* modified and adapted by @Cobrand */

pub const SDL_LOG_CATEGORY_APPLICATION: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::APPLICATION;
pub const SDL_LOG_CATEGORY_ERROR: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::ERROR;
pub const SDL_LOG_CATEGORY_ASSERT: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::ASSERT;
pub const SDL_LOG_CATEGORY_SYSTEM: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::SYSTEM;
pub const SDL_LOG_CATEGORY_AUDIO: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::AUDIO;
pub const SDL_LOG_CATEGORY_VIDEO: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::VIDEO;
pub const SDL_LOG_CATEGORY_RENDER: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RENDER;
pub const SDL_LOG_CATEGORY_INPUT: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::INPUT;
pub const SDL_LOG_CATEGORY_TEST: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::TEST;
pub const SDL_LOG_CATEGORY_RESERVED1: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED1;
pub const SDL_LOG_CATEGORY_RESERVED2: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED2;
pub const SDL_LOG_CATEGORY_RESERVED3: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED3;
pub const SDL_LOG_CATEGORY_RESERVED4: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED4;
pub const SDL_LOG_CATEGORY_RESERVED5: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED5;
pub const SDL_LOG_CATEGORY_RESERVED6: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED6;
pub const SDL_LOG_CATEGORY_RESERVED7: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED7;
pub const SDL_LOG_CATEGORY_RESERVED8: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED8;
pub const SDL_LOG_CATEGORY_RESERVED9: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED9;
pub const SDL_LOG_CATEGORY_RESERVED10: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::RESERVED10;
pub const SDL_LOG_CATEGORY_CUSTOM: SDL_LOG_CATEGORY =
    SDL_LOG_CATEGORY::CUSTOM;
#[repr(u32)]
/**
 *  \brief The predefined log categories
 *
 *  By default the application category is enabled at the INFO level,
 *  the assert category is enabled at the WARN level, test is enabled
 *  at the VERBOSE level and all other categories are enabled at the
 *  CRITICAL level.
 */
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum SDL_LOG_CATEGORY {
    APPLICATION = 0,
    ERROR = 1,
    ASSERT = 2,
    SYSTEM = 3,
    AUDIO = 4,
    VIDEO = 5,
    RENDER = 6,
    INPUT = 7,
    TEST = 8,
    RESERVED1 = 9,
    RESERVED2 = 10,
    RESERVED3 = 11,
    RESERVED4 = 12,
    RESERVED5 = 13,
    RESERVED6 = 14,
    RESERVED7 = 15,
    RESERVED8 = 16,
    RESERVED9 = 17,
    RESERVED10 = 18,
    CUSTOM = 19,
}
#[repr(u32)]
/**
 *  \brief The predefined log priorities
 */
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum SDL_LogPriority {
    SDL_LOG_PRIORITY_VERBOSE = 1,
    SDL_LOG_PRIORITY_DEBUG = 2,
    SDL_LOG_PRIORITY_INFO = 3,
    SDL_LOG_PRIORITY_WARN = 4,
    SDL_LOG_PRIORITY_ERROR = 5,
    SDL_LOG_PRIORITY_CRITICAL = 6,
    SDL_NUM_LOG_PRIORITIES = 7,
}
extern "C" {
    /**
 *  \brief Set the priority of all log categories
 */
    pub fn SDL_LogSetAllPriority(priority: SDL_LogPriority);
}
extern "C" {
    /**
 *  \brief Set the priority of a particular log category
 */
    pub fn SDL_LogSetPriority(category: ::std::os::raw::c_int,
                              priority: SDL_LogPriority);
}
extern "C" {
    /**
 *  \brief Get the priority of a particular log category
 */
    pub fn SDL_LogGetPriority(category: ::std::os::raw::c_int)
     -> SDL_LogPriority;
}
extern "C" {
    /**
 *  \brief Reset all priorities to default.
 *
 *  \note This is called in SDL_Quit().
 */
    pub fn SDL_LogResetPriorities();
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
 */
    pub fn SDL_Log(fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
 */
    pub fn SDL_LogVerbose(category: ::std::os::raw::c_int,
                          fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_PRIORITY_DEBUG
 */
    pub fn SDL_LogDebug(category: ::std::os::raw::c_int,
                        fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_PRIORITY_INFO
 */
    pub fn SDL_LogInfo(category: ::std::os::raw::c_int,
                       fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_PRIORITY_WARN
 */
    pub fn SDL_LogWarn(category: ::std::os::raw::c_int,
                       fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_PRIORITY_ERROR
 */
    pub fn SDL_LogError(category: ::std::os::raw::c_int,
                        fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
 */
    pub fn SDL_LogCritical(category: ::std::os::raw::c_int,
                           fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
    /**
 *  \brief Log a message with the specified category and priority.
 */
    pub fn SDL_LogMessage(category: ::std::os::raw::c_int,
                          priority: SDL_LogPriority,
                          fmt: *const ::std::os::raw::c_char, ...);
}
/**
 *  \brief The prototype for the log output function
 */
pub type SDL_LogOutputFunction =
    ::std::option::Option<unsafe extern "C" fn(userdata:
                                                   *mut ::std::os::raw::c_void,
                                               category:
                                                   ::std::os::raw::c_int,
                                               priority: SDL_LogPriority,
                                               message:
                                                   *const ::std::os::raw::c_char)>;
extern "C" {
    /**
 *  \brief Get the current log output function.
 */
    pub fn SDL_LogGetOutputFunction(callback: *mut SDL_LogOutputFunction,
                                    userdata:
                                        *mut *mut ::std::os::raw::c_void);
}
extern "C" {
    /**
 *  \brief This function allows you to replace the default log output
 *         function with one of your own.
 */
    pub fn SDL_LogSetOutputFunction(callback: SDL_LogOutputFunction,
                                    userdata: *mut ::std::os::raw::c_void);
}