use super::stdinc::*;
#[repr(transparent)]
#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SDL_LogCategory(pub ::core::ffi::c_int);
impl From<SDL_LogCategory> for ::core::ffi::c_int {
#[inline(always)]
fn from(value: SDL_LogCategory) -> Self {
value.0
}
}
#[cfg(feature = "debug-impls")]
impl ::core::fmt::Debug for SDL_LogCategory {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
#[allow(unreachable_patterns)]
f.write_str(match *self {
Self::APPLICATION => "SDL_LOG_CATEGORY_APPLICATION",
Self::ERROR => "SDL_LOG_CATEGORY_ERROR",
Self::ASSERT => "SDL_LOG_CATEGORY_ASSERT",
Self::SYSTEM => "SDL_LOG_CATEGORY_SYSTEM",
Self::AUDIO => "SDL_LOG_CATEGORY_AUDIO",
Self::VIDEO => "SDL_LOG_CATEGORY_VIDEO",
Self::RENDER => "SDL_LOG_CATEGORY_RENDER",
Self::INPUT => "SDL_LOG_CATEGORY_INPUT",
Self::TEST => "SDL_LOG_CATEGORY_TEST",
Self::GPU => "SDL_LOG_CATEGORY_GPU",
Self::RESERVED2 => "SDL_LOG_CATEGORY_RESERVED2",
Self::RESERVED3 => "SDL_LOG_CATEGORY_RESERVED3",
Self::RESERVED4 => "SDL_LOG_CATEGORY_RESERVED4",
Self::RESERVED5 => "SDL_LOG_CATEGORY_RESERVED5",
Self::RESERVED6 => "SDL_LOG_CATEGORY_RESERVED6",
Self::RESERVED7 => "SDL_LOG_CATEGORY_RESERVED7",
Self::RESERVED8 => "SDL_LOG_CATEGORY_RESERVED8",
Self::RESERVED9 => "SDL_LOG_CATEGORY_RESERVED9",
Self::RESERVED10 => "SDL_LOG_CATEGORY_RESERVED10",
Self::CUSTOM => "SDL_LOG_CATEGORY_CUSTOM",
_ => return write!(f, "SDL_LogCategory({})", self.0),
})
}
}
impl SDL_LogCategory {
pub const APPLICATION: Self = Self(0);
pub const ERROR: Self = Self(1);
pub const ASSERT: Self = Self(2);
pub const SYSTEM: Self = Self(3);
pub const AUDIO: Self = Self(4);
pub const VIDEO: Self = Self(5);
pub const RENDER: Self = Self(6);
pub const INPUT: Self = Self(7);
pub const TEST: Self = Self(8);
pub const GPU: Self = Self(9);
pub const RESERVED2: Self = Self(10);
pub const RESERVED3: Self = Self(11);
pub const RESERVED4: Self = Self(12);
pub const RESERVED5: Self = Self(13);
pub const RESERVED6: Self = Self(14);
pub const RESERVED7: Self = Self(15);
pub const RESERVED8: Self = Self(16);
pub const RESERVED9: Self = Self(17);
pub const RESERVED10: Self = Self(18);
pub const CUSTOM: Self = Self(19);
}
pub const SDL_LOG_CATEGORY_APPLICATION: SDL_LogCategory = SDL_LogCategory::APPLICATION;
pub const SDL_LOG_CATEGORY_ERROR: SDL_LogCategory = SDL_LogCategory::ERROR;
pub const SDL_LOG_CATEGORY_ASSERT: SDL_LogCategory = SDL_LogCategory::ASSERT;
pub const SDL_LOG_CATEGORY_SYSTEM: SDL_LogCategory = SDL_LogCategory::SYSTEM;
pub const SDL_LOG_CATEGORY_AUDIO: SDL_LogCategory = SDL_LogCategory::AUDIO;
pub const SDL_LOG_CATEGORY_VIDEO: SDL_LogCategory = SDL_LogCategory::VIDEO;
pub const SDL_LOG_CATEGORY_RENDER: SDL_LogCategory = SDL_LogCategory::RENDER;
pub const SDL_LOG_CATEGORY_INPUT: SDL_LogCategory = SDL_LogCategory::INPUT;
pub const SDL_LOG_CATEGORY_TEST: SDL_LogCategory = SDL_LogCategory::TEST;
pub const SDL_LOG_CATEGORY_GPU: SDL_LogCategory = SDL_LogCategory::GPU;
pub const SDL_LOG_CATEGORY_RESERVED2: SDL_LogCategory = SDL_LogCategory::RESERVED2;
pub const SDL_LOG_CATEGORY_RESERVED3: SDL_LogCategory = SDL_LogCategory::RESERVED3;
pub const SDL_LOG_CATEGORY_RESERVED4: SDL_LogCategory = SDL_LogCategory::RESERVED4;
pub const SDL_LOG_CATEGORY_RESERVED5: SDL_LogCategory = SDL_LogCategory::RESERVED5;
pub const SDL_LOG_CATEGORY_RESERVED6: SDL_LogCategory = SDL_LogCategory::RESERVED6;
pub const SDL_LOG_CATEGORY_RESERVED7: SDL_LogCategory = SDL_LogCategory::RESERVED7;
pub const SDL_LOG_CATEGORY_RESERVED8: SDL_LogCategory = SDL_LogCategory::RESERVED8;
pub const SDL_LOG_CATEGORY_RESERVED9: SDL_LogCategory = SDL_LogCategory::RESERVED9;
pub const SDL_LOG_CATEGORY_RESERVED10: SDL_LogCategory = SDL_LogCategory::RESERVED10;
pub const SDL_LOG_CATEGORY_CUSTOM: SDL_LogCategory = SDL_LogCategory::CUSTOM;
#[repr(transparent)]
#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SDL_LogPriority(pub ::core::ffi::c_int);
impl From<SDL_LogPriority> for ::core::ffi::c_int {
#[inline(always)]
fn from(value: SDL_LogPriority) -> Self {
value.0
}
}
#[cfg(feature = "debug-impls")]
impl ::core::fmt::Debug for SDL_LogPriority {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
#[allow(unreachable_patterns)]
f.write_str(match *self {
Self::INVALID => "SDL_LOG_PRIORITY_INVALID",
Self::TRACE => "SDL_LOG_PRIORITY_TRACE",
Self::VERBOSE => "SDL_LOG_PRIORITY_VERBOSE",
Self::DEBUG => "SDL_LOG_PRIORITY_DEBUG",
Self::INFO => "SDL_LOG_PRIORITY_INFO",
Self::WARN => "SDL_LOG_PRIORITY_WARN",
Self::ERROR => "SDL_LOG_PRIORITY_ERROR",
Self::CRITICAL => "SDL_LOG_PRIORITY_CRITICAL",
Self::COUNT => "SDL_LOG_PRIORITY_COUNT",
_ => return write!(f, "SDL_LogPriority({})", self.0),
})
}
}
impl SDL_LogPriority {
pub const INVALID: Self = Self(0);
pub const TRACE: Self = Self(1);
pub const VERBOSE: Self = Self(2);
pub const DEBUG: Self = Self(3);
pub const INFO: Self = Self(4);
pub const WARN: Self = Self(5);
pub const ERROR: Self = Self(6);
pub const CRITICAL: Self = Self(7);
pub const COUNT: Self = Self(8);
}
pub const SDL_LOG_PRIORITY_INVALID: SDL_LogPriority = SDL_LogPriority::INVALID;
pub const SDL_LOG_PRIORITY_TRACE: SDL_LogPriority = SDL_LogPriority::TRACE;
pub const SDL_LOG_PRIORITY_VERBOSE: SDL_LogPriority = SDL_LogPriority::VERBOSE;
pub const SDL_LOG_PRIORITY_DEBUG: SDL_LogPriority = SDL_LogPriority::DEBUG;
pub const SDL_LOG_PRIORITY_INFO: SDL_LogPriority = SDL_LogPriority::INFO;
pub const SDL_LOG_PRIORITY_WARN: SDL_LogPriority = SDL_LogPriority::WARN;
pub const SDL_LOG_PRIORITY_ERROR: SDL_LogPriority = SDL_LogPriority::ERROR;
pub const SDL_LOG_PRIORITY_CRITICAL: SDL_LogPriority = SDL_LogPriority::CRITICAL;
pub const SDL_LOG_PRIORITY_COUNT: SDL_LogPriority = SDL_LogPriority::COUNT;
extern "C" {
pub fn SDL_SetLogPriorities(priority: SDL_LogPriority);
}
extern "C" {
pub fn SDL_SetLogPriority(category: ::core::ffi::c_int, priority: SDL_LogPriority);
}
extern "C" {
pub fn SDL_GetLogPriority(category: ::core::ffi::c_int) -> SDL_LogPriority;
}
extern "C" {
pub fn SDL_ResetLogPriorities();
}
extern "C" {
pub fn SDL_SetLogPriorityPrefix(
priority: SDL_LogPriority,
prefix: *const ::core::ffi::c_char,
) -> ::core::primitive::bool;
}
extern "C" {
pub fn SDL_Log(fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogTrace(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogVerbose(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogDebug(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogInfo(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogWarn(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogError(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogCritical(category: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...);
}
extern "C" {
pub fn SDL_LogMessage(
category: ::core::ffi::c_int,
priority: SDL_LogPriority,
fmt: *const ::core::ffi::c_char,
...
);
}
extern "C" {
pub fn SDL_LogMessageV(
category: ::core::ffi::c_int,
priority: SDL_LogPriority,
fmt: *const ::core::ffi::c_char,
ap: crate::ffi::VaList,
);
}
pub type SDL_LogOutputFunction = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut ::core::ffi::c_void,
category: ::core::ffi::c_int,
priority: SDL_LogPriority,
message: *const ::core::ffi::c_char,
),
>;
extern "C" {
pub fn SDL_GetDefaultLogOutputFunction() -> SDL_LogOutputFunction;
}
extern "C" {
pub fn SDL_GetLogOutputFunction(
callback: *mut SDL_LogOutputFunction,
userdata: *mut *mut ::core::ffi::c_void,
);
}
extern "C" {
pub fn SDL_SetLogOutputFunction(
callback: SDL_LogOutputFunction,
userdata: *mut ::core::ffi::c_void,
);
}
#[cfg(doc)]
use crate::everything::*;