#![allow(dead_code)]
pub use crate::{c_int, c_void};
pub(crate) type Uint8 = u8;
pub(crate) type Sint8 = i8;
pub(crate) type Uint16 = u16;
pub(crate) type Sint16 = i16;
pub(crate) type Uint32 = u32;
pub(crate) type Sint32 = i32;
pub(crate) type Uint64 = u64;
pub(crate) type Sint64 = i64;
pub const fn SDL_FOURCC(a: u8, b: u8, c: u8, d: u8) -> u32 {
(a as u32) | (b as u32) << 8 | (c as u32) << 16 | (d as u32) << 24
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_bool(u32);
pub const SDL_FALSE: SDL_bool = SDL_bool(0);
pub const SDL_TRUE: SDL_bool = SDL_bool(1);
extern "C" {
pub fn SDL_malloc(size: usize) -> *mut c_void;
pub fn SDL_calloc(nmemb: usize, size: usize) -> *mut c_void;
pub fn SDL_realloc(mem: *mut c_void, size: usize) -> *mut c_void;
pub fn SDL_free(mem: *mut c_void);
pub fn SDL_GetMemoryFunctions(
malloc_func: *mut SDL_malloc_func, calloc_func: *mut SDL_calloc_func,
realloc_func: *mut SDL_realloc_func, free_func: *mut SDL_free_func,
);
pub fn SDL_SetMemoryFunctions(
malloc_func: SDL_malloc_func, calloc_func: SDL_calloc_func,
realloc_func: SDL_realloc_func, free_func: SDL_free_func,
) -> c_int;
pub fn SDL_GetNumAllocations() -> c_int;
}
pub type SDL_malloc_func =
Option<unsafe extern "C" fn(size: usize) -> *mut c_void>;
pub type SDL_calloc_func =
Option<unsafe extern "C" fn(nmemb: usize, size: usize) -> *mut c_void>;
pub type SDL_realloc_func =
Option<unsafe extern "C" fn(mem: *mut c_void, size: usize) -> *mut c_void>;
pub type SDL_free_func = Option<unsafe extern "C" fn(mem: *mut c_void)>;