pub const SDL_AUDIO_DRIVER_WASAPI: u32 = 1;
pub const SDL_AUDIO_DRIVER_DSOUND: u32 = 1;
pub const SDL_AUDIO_DRIVER_WINMM: u32 = 1;
pub const SDL_AUDIO_DRIVER_DISK: u32 = 1;
pub const SDL_AUDIO_DRIVER_DUMMY: u32 = 1;
pub const SDL_JOYSTICK_DINPUT: u32 = 1;
pub const SDL_JOYSTICK_XINPUT: u32 = 1;
pub const SDL_JOYSTICK_HIDAPI: u32 = 1;
pub const SDL_HAPTIC_DINPUT: u32 = 1;
pub const SDL_HAPTIC_XINPUT: u32 = 1;
pub const SDL_SENSOR_DUMMY: u32 = 1;
pub const SDL_LOADSO_WINDOWS: u32 = 1;
pub const SDL_THREAD_WINDOWS: u32 = 1;
pub const SDL_TIMER_WINDOWS: u32 = 1;
pub const SDL_VIDEO_DRIVER_DUMMY: u32 = 1;
pub const SDL_VIDEO_DRIVER_WINDOWS: u32 = 1;
pub const SDL_VIDEO_RENDER_D3D: u32 = 1;
pub const SDL_VIDEO_RENDER_D3D11: u32 = 0;
pub const SDL_VIDEO_OPENGL: u32 = 1;
pub const SDL_VIDEO_OPENGL_WGL: u32 = 1;
pub const SDL_VIDEO_RENDER_OGL: u32 = 1;
pub const SDL_VIDEO_RENDER_OGL_ES2: u32 = 1;
pub const SDL_VIDEO_OPENGL_ES2: u32 = 1;
pub const SDL_VIDEO_OPENGL_EGL: u32 = 1;
pub const SDL_VIDEO_VULKAN: u32 = 1;
pub const SDL_POWER_WINDOWS: u32 = 1;
pub const SDL_FILESYSTEM_WINDOWS: u32 = 1;
pub const SDL_ASSEMBLY_ROUTINES: u32 = 1;
pub const SDL_PRIs64: &'static [u8; 5usize] = b"I64d\0";
pub const SDL_PRIu64: &'static [u8; 5usize] = b"I64u\0";
pub const SDL_PRIx64: &'static [u8; 5usize] = b"I64x\0";
pub const SDL_PRIX64: &'static [u8; 5usize] = b"I64X\0";
pub const SDL_ASSERT_LEVEL: u32 = 1;
pub const SDL_LIL_ENDIAN: u32 = 1234;
pub const SDL_BIG_ENDIAN: u32 = 4321;
pub const SDL_BYTEORDER: u32 = 1234;
pub const SDL_MUTEX_TIMEDOUT: u32 = 1;
pub const SDL_RWOPS_UNKNOWN: u32 = 0;
pub const SDL_RWOPS_WINFILE: u32 = 1;
pub const SDL_RWOPS_STDFILE: u32 = 2;
pub const SDL_RWOPS_JNIFILE: u32 = 3;
pub const SDL_RWOPS_MEMORY: u32 = 4;
pub const SDL_RWOPS_MEMORY_RO: u32 = 5;
pub const SDL_AUDIO_MASK_BITSIZE: u32 = 255;
pub const SDL_AUDIO_MASK_DATATYPE: u32 = 256;
pub const SDL_AUDIO_MASK_ENDIAN: u32 = 4096;
pub const SDL_AUDIO_MASK_SIGNED: u32 = 32768;
pub const AUDIO_U8: u32 = 8;
pub const AUDIO_S8: u32 = 32776;
pub const AUDIO_U16LSB: u32 = 16;
pub const AUDIO_S16LSB: u32 = 32784;
pub const AUDIO_U16MSB: u32 = 4112;
pub const AUDIO_S16MSB: u32 = 36880;
pub const AUDIO_U16: u32 = 16;
pub const AUDIO_S16: u32 = 32784;
pub const AUDIO_S32LSB: u32 = 32800;
pub const AUDIO_S32MSB: u32 = 36896;
pub const AUDIO_S32: u32 = 32800;
pub const AUDIO_F32LSB: u32 = 33056;
pub const AUDIO_F32MSB: u32 = 37152;
pub const AUDIO_F32: u32 = 33056;
pub const AUDIO_U16SYS: u32 = 16;
pub const AUDIO_S16SYS: u32 = 32784;
pub const AUDIO_S32SYS: u32 = 32800;
pub const AUDIO_F32SYS: u32 = 33056;
pub const SDL_AUDIO_ALLOW_FREQUENCY_CHANGE: u32 = 1;
pub const SDL_AUDIO_ALLOW_FORMAT_CHANGE: u32 = 2;
pub const SDL_AUDIO_ALLOW_CHANNELS_CHANGE: u32 = 4;
pub const SDL_AUDIO_ALLOW_SAMPLES_CHANGE: u32 = 8;
pub const SDL_AUDIO_ALLOW_ANY_CHANGE: u32 = 15;
pub const SDL_AUDIOCVT_MAX_FILTERS: u32 = 9;
pub const SDL_MIX_MAXVOLUME: u32 = 128;
pub const SDL_CACHELINE_SIZE: u32 = 128;
pub const SDL_ALPHA_OPAQUE: u32 = 255;
pub const SDL_ALPHA_TRANSPARENT: u32 = 0;
pub const SDL_SWSURFACE: u32 = 0;
pub const SDL_PREALLOC: u32 = 1;
pub const SDL_RLEACCEL: u32 = 2;
pub const SDL_DONTFREE: u32 = 4;
pub const SDL_SIMD_ALIGNED: u32 = 8;
pub const SDL_WINDOWPOS_UNDEFINED_MASK: u32 = 536805376;
pub const SDL_WINDOWPOS_CENTERED_MASK: u32 = 805240832;
pub const SDLK_SCANCODE_MASK: u32 = 1073741824;
pub const SDL_BUTTON_LEFT: u32 = 1;
pub const SDL_BUTTON_MIDDLE: u32 = 2;
pub const SDL_BUTTON_RIGHT: u32 = 3;
pub const SDL_BUTTON_X1: u32 = 4;
pub const SDL_BUTTON_X2: u32 = 5;
pub const SDL_JOYSTICK_AXIS_MAX: u32 = 32767;
pub const SDL_JOYSTICK_AXIS_MIN: i32 = -32768;
pub const SDL_HAT_CENTERED: u32 = 0;
pub const SDL_HAT_UP: u32 = 1;
pub const SDL_HAT_RIGHT: u32 = 2;
pub const SDL_HAT_DOWN: u32 = 4;
pub const SDL_HAT_LEFT: u32 = 8;
pub const SDL_HAT_RIGHTUP: u32 = 3;
pub const SDL_HAT_RIGHTDOWN: u32 = 6;
pub const SDL_HAT_LEFTUP: u32 = 9;
pub const SDL_HAT_LEFTDOWN: u32 = 12;
pub const SDL_RELEASED: u32 = 0;
pub const SDL_PRESSED: u32 = 1;
pub const SDL_TEXTEDITINGEVENT_TEXT_SIZE: u32 = 32;
pub const SDL_TEXTINPUTEVENT_TEXT_SIZE: u32 = 32;
pub const SDL_QUERY: i32 = -1;
pub const SDL_IGNORE: u32 = 0;
pub const SDL_DISABLE: u32 = 0;
pub const SDL_ENABLE: u32 = 1;
pub const SDL_HAPTIC_CONSTANT: u32 = 1;
pub const SDL_HAPTIC_SINE: u32 = 2;
pub const SDL_HAPTIC_LEFTRIGHT: u32 = 4;
pub const SDL_HAPTIC_TRIANGLE: u32 = 8;
pub const SDL_HAPTIC_SAWTOOTHUP: u32 = 16;
pub const SDL_HAPTIC_SAWTOOTHDOWN: u32 = 32;
pub const SDL_HAPTIC_RAMP: u32 = 64;
pub const SDL_HAPTIC_SPRING: u32 = 128;
pub const SDL_HAPTIC_DAMPER: u32 = 256;
pub const SDL_HAPTIC_INERTIA: u32 = 512;
pub const SDL_HAPTIC_FRICTION: u32 = 1024;
pub const SDL_HAPTIC_CUSTOM: u32 = 2048;
pub const SDL_HAPTIC_GAIN: u32 = 4096;
pub const SDL_HAPTIC_AUTOCENTER: u32 = 8192;
pub const SDL_HAPTIC_STATUS: u32 = 16384;
pub const SDL_HAPTIC_PAUSE: u32 = 32768;
pub const SDL_HAPTIC_POLAR: u32 = 0;
pub const SDL_HAPTIC_CARTESIAN: u32 = 1;
pub const SDL_HAPTIC_SPHERICAL: u32 = 2;
pub const SDL_HAPTIC_INFINITY: u32 = 4294967295;
pub const SDL_HINT_FRAMEBUFFER_ACCELERATION: &'static [u8; 29usize] =
b"SDL_FRAMEBUFFER_ACCELERATION\0";
pub const SDL_HINT_RENDER_DRIVER: &'static [u8; 18usize] = b"SDL_RENDER_DRIVER\0";
pub const SDL_HINT_RENDER_OPENGL_SHADERS: &'static [u8; 26usize] = b"SDL_RENDER_OPENGL_SHADERS\0";
pub const SDL_HINT_RENDER_DIRECT3D_THREADSAFE: &'static [u8; 31usize] =
b"SDL_RENDER_DIRECT3D_THREADSAFE\0";
pub const SDL_HINT_RENDER_DIRECT3D11_DEBUG: &'static [u8; 28usize] =
b"SDL_RENDER_DIRECT3D11_DEBUG\0";
pub const SDL_HINT_RENDER_LOGICAL_SIZE_MODE: &'static [u8; 29usize] =
b"SDL_RENDER_LOGICAL_SIZE_MODE\0";
pub const SDL_HINT_RENDER_SCALE_QUALITY: &'static [u8; 25usize] = b"SDL_RENDER_SCALE_QUALITY\0";
pub const SDL_HINT_RENDER_VSYNC: &'static [u8; 17usize] = b"SDL_RENDER_VSYNC\0";
pub const SDL_HINT_VIDEO_ALLOW_SCREENSAVER: &'static [u8; 28usize] =
b"SDL_VIDEO_ALLOW_SCREENSAVER\0";
pub const SDL_HINT_VIDEO_X11_XVIDMODE: &'static [u8; 23usize] = b"SDL_VIDEO_X11_XVIDMODE\0";
pub const SDL_HINT_VIDEO_X11_XINERAMA: &'static [u8; 23usize] = b"SDL_VIDEO_X11_XINERAMA\0";
pub const SDL_HINT_VIDEO_X11_XRANDR: &'static [u8; 21usize] = b"SDL_VIDEO_X11_XRANDR\0";
pub const SDL_HINT_VIDEO_X11_NET_WM_PING: &'static [u8; 26usize] = b"SDL_VIDEO_X11_NET_WM_PING\0";
pub const SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR: &'static [u8; 39usize] =
b"SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR\0";
pub const SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN: &'static [u8; 44usize] =
b"SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN\0";
pub const SDL_HINT_WINDOWS_INTRESOURCE_ICON: &'static [u8; 29usize] =
b"SDL_WINDOWS_INTRESOURCE_ICON\0";
pub const SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL: &'static [u8; 35usize] =
b"SDL_WINDOWS_INTRESOURCE_ICON_SMALL\0";
pub const SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP: &'static [u8; 31usize] =
b"SDL_WINDOWS_ENABLE_MESSAGELOOP\0";
pub const SDL_HINT_GRAB_KEYBOARD: &'static [u8; 18usize] = b"SDL_GRAB_KEYBOARD\0";
pub const SDL_HINT_MOUSE_DOUBLE_CLICK_TIME: &'static [u8; 28usize] =
b"SDL_MOUSE_DOUBLE_CLICK_TIME\0";
pub const SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS: &'static [u8; 30usize] =
b"SDL_MOUSE_DOUBLE_CLICK_RADIUS\0";
pub const SDL_HINT_MOUSE_NORMAL_SPEED_SCALE: &'static [u8; 29usize] =
b"SDL_MOUSE_NORMAL_SPEED_SCALE\0";
pub const SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE: &'static [u8; 31usize] =
b"SDL_MOUSE_RELATIVE_SPEED_SCALE\0";
pub const SDL_HINT_MOUSE_RELATIVE_MODE_WARP: &'static [u8; 29usize] =
b"SDL_MOUSE_RELATIVE_MODE_WARP\0";
pub const SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH: &'static [u8; 29usize] =
b"SDL_MOUSE_FOCUS_CLICKTHROUGH\0";
pub const SDL_HINT_TOUCH_MOUSE_EVENTS: &'static [u8; 23usize] = b"SDL_TOUCH_MOUSE_EVENTS\0";
pub const SDL_HINT_MOUSE_TOUCH_EVENTS: &'static [u8; 23usize] = b"SDL_MOUSE_TOUCH_EVENTS\0";
pub const SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS: &'static [u8; 33usize] =
b"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS\0";
pub const SDL_HINT_IDLE_TIMER_DISABLED: &'static [u8; 28usize] = b"SDL_IOS_IDLE_TIMER_DISABLED\0";
pub const SDL_HINT_ORIENTATIONS: &'static [u8; 21usize] = b"SDL_IOS_ORIENTATIONS\0";
pub const SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS: &'static [u8; 34usize] =
b"SDL_APPLE_TV_CONTROLLER_UI_EVENTS\0";
pub const SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION: &'static [u8; 35usize] =
b"SDL_APPLE_TV_REMOTE_ALLOW_ROTATION\0";
pub const SDL_HINT_IOS_HIDE_HOME_INDICATOR: &'static [u8; 28usize] =
b"SDL_IOS_HIDE_HOME_INDICATOR\0";
pub const SDL_HINT_ACCELEROMETER_AS_JOYSTICK: &'static [u8; 30usize] =
b"SDL_ACCELEROMETER_AS_JOYSTICK\0";
pub const SDL_HINT_TV_REMOTE_AS_JOYSTICK: &'static [u8; 26usize] = b"SDL_TV_REMOTE_AS_JOYSTICK\0";
pub const SDL_HINT_XINPUT_ENABLED: &'static [u8; 19usize] = b"SDL_XINPUT_ENABLED\0";
pub const SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING: &'static [u8; 36usize] =
b"SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING\0";
pub const SDL_HINT_GAMECONTROLLERCONFIG: &'static [u8; 25usize] = b"SDL_GAMECONTROLLERCONFIG\0";
pub const SDL_HINT_GAMECONTROLLERCONFIG_FILE: &'static [u8; 30usize] =
b"SDL_GAMECONTROLLERCONFIG_FILE\0";
pub const SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES: &'static [u8; 34usize] =
b"SDL_GAMECONTROLLER_IGNORE_DEVICES\0";
pub const SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT: &'static [u8; 41usize] =
b"SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT\0";
pub const SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS: &'static [u8; 37usize] =
b"SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS\0";
pub const SDL_HINT_JOYSTICK_HIDAPI: &'static [u8; 20usize] = b"SDL_JOYSTICK_HIDAPI\0";
pub const SDL_HINT_JOYSTICK_HIDAPI_PS4: &'static [u8; 24usize] = b"SDL_JOYSTICK_HIDAPI_PS4\0";
pub const SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE: &'static [u8; 31usize] =
b"SDL_JOYSTICK_HIDAPI_PS4_RUMBLE\0";
pub const SDL_HINT_JOYSTICK_HIDAPI_STEAM: &'static [u8; 26usize] = b"SDL_JOYSTICK_HIDAPI_STEAM\0";
pub const SDL_HINT_JOYSTICK_HIDAPI_SWITCH: &'static [u8; 27usize] = b"SDL_JOYSTICK_HIDAPI_SWITCH\0";
pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX: &'static [u8; 25usize] = b"SDL_JOYSTICK_HIDAPI_XBOX\0";
pub const SDL_HINT_ENABLE_STEAM_CONTROLLERS: &'static [u8; 29usize] =
b"SDL_ENABLE_STEAM_CONTROLLERS\0";
pub const SDL_HINT_ALLOW_TOPMOST: &'static [u8; 18usize] = b"SDL_ALLOW_TOPMOST\0";
pub const SDL_HINT_TIMER_RESOLUTION: &'static [u8; 21usize] = b"SDL_TIMER_RESOLUTION\0";
pub const SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION: &'static [u8; 34usize] =
b"SDL_QTWAYLAND_CONTENT_ORIENTATION\0";
pub const SDL_HINT_QTWAYLAND_WINDOW_FLAGS: &'static [u8; 27usize] = b"SDL_QTWAYLAND_WINDOW_FLAGS\0";
pub const SDL_HINT_THREAD_STACK_SIZE: &'static [u8; 22usize] = b"SDL_THREAD_STACK_SIZE\0";
pub const SDL_HINT_VIDEO_HIGHDPI_DISABLED: &'static [u8; 27usize] = b"SDL_VIDEO_HIGHDPI_DISABLED\0";
pub const SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK: &'static [u8; 39usize] =
b"SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK\0";
pub const SDL_HINT_VIDEO_WIN_D3DCOMPILER: &'static [u8; 26usize] = b"SDL_VIDEO_WIN_D3DCOMPILER\0";
pub const SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT: &'static [u8; 36usize] =
b"SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT\0";
pub const SDL_HINT_WINRT_PRIVACY_POLICY_URL: &'static [u8; 29usize] =
b"SDL_WINRT_PRIVACY_POLICY_URL\0";
pub const SDL_HINT_WINRT_PRIVACY_POLICY_LABEL: &'static [u8; 31usize] =
b"SDL_WINRT_PRIVACY_POLICY_LABEL\0";
pub const SDL_HINT_WINRT_HANDLE_BACK_BUTTON: &'static [u8; 29usize] =
b"SDL_WINRT_HANDLE_BACK_BUTTON\0";
pub const SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES: &'static [u8; 32usize] =
b"SDL_VIDEO_MAC_FULLSCREEN_SPACES\0";
pub const SDL_HINT_MAC_BACKGROUND_APP: &'static [u8; 23usize] = b"SDL_MAC_BACKGROUND_APP\0";
pub const SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION: &'static [u8; 44usize] =
b"SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION\0";
pub const SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION: &'static [u8; 45usize] =
b"SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION\0";
pub const SDL_HINT_IME_INTERNAL_EDITING: &'static [u8; 25usize] = b"SDL_IME_INTERNAL_EDITING\0";
pub const SDL_HINT_ANDROID_TRAP_BACK_BUTTON: &'static [u8; 29usize] =
b"SDL_ANDROID_TRAP_BACK_BUTTON\0";
pub const SDL_HINT_ANDROID_BLOCK_ON_PAUSE: &'static [u8; 27usize] = b"SDL_ANDROID_BLOCK_ON_PAUSE\0";
pub const SDL_HINT_RETURN_KEY_HIDES_IME: &'static [u8; 25usize] = b"SDL_RETURN_KEY_HIDES_IME\0";
pub const SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT: &'static [u8; 32usize] =
b"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\0";
pub const SDL_HINT_NO_SIGNAL_HANDLERS: &'static [u8; 23usize] = b"SDL_NO_SIGNAL_HANDLERS\0";
pub const SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4: &'static [u8; 31usize] =
b"SDL_WINDOWS_NO_CLOSE_ON_ALT_F4\0";
pub const SDL_HINT_BMP_SAVE_LEGACY_FORMAT: &'static [u8; 27usize] = b"SDL_BMP_SAVE_LEGACY_FORMAT\0";
pub const SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING: &'static [u8; 34usize] =
b"SDL_WINDOWS_DISABLE_THREAD_NAMING\0";
pub const SDL_HINT_RPI_VIDEO_LAYER: &'static [u8; 20usize] = b"SDL_RPI_VIDEO_LAYER\0";
pub const SDL_HINT_VIDEO_DOUBLE_BUFFER: &'static [u8; 24usize] = b"SDL_VIDEO_DOUBLE_BUFFER\0";
pub const SDL_HINT_OPENGL_ES_DRIVER: &'static [u8; 21usize] = b"SDL_OPENGL_ES_DRIVER\0";
pub const SDL_HINT_AUDIO_RESAMPLING_MODE: &'static [u8; 26usize] = b"SDL_AUDIO_RESAMPLING_MODE\0";
pub const SDL_HINT_AUDIO_CATEGORY: &'static [u8; 19usize] = b"SDL_AUDIO_CATEGORY\0";
pub const SDL_HINT_RENDER_BATCHING: &'static [u8; 20usize] = b"SDL_RENDER_BATCHING\0";
pub const SDL_HINT_EVENT_LOGGING: &'static [u8; 18usize] = b"SDL_EVENT_LOGGING\0";
pub const SDL_HINT_WAVE_RIFF_CHUNK_SIZE: &'static [u8; 25usize] = b"SDL_WAVE_RIFF_CHUNK_SIZE\0";
pub const SDL_HINT_WAVE_TRUNCATION: &'static [u8; 20usize] = b"SDL_WAVE_TRUNCATION\0";
pub const SDL_HINT_WAVE_FACT_CHUNK: &'static [u8; 20usize] = b"SDL_WAVE_FACT_CHUNK\0";
pub const SDL_MAX_LOG_MESSAGE: u32 = 4096;
pub const SDL_STANDARD_GRAVITY: f64 = 9.80665;
pub const SDL_NONSHAPEABLE_WINDOW: i32 = -1;
pub const SDL_INVALID_SHAPE_ARGUMENT: i32 = -2;
pub const SDL_WINDOW_LACKS_SHAPE: i32 = -3;
pub const SDL_MAJOR_VERSION: u32 = 2;
pub const SDL_MINOR_VERSION: u32 = 0;
pub const SDL_PATCHLEVEL: u32 = 10;
pub const SDL_INIT_TIMER: u32 = 1;
pub const SDL_INIT_AUDIO: u32 = 16;
pub const SDL_INIT_VIDEO: u32 = 32;
pub const SDL_INIT_JOYSTICK: u32 = 512;
pub const SDL_INIT_HAPTIC: u32 = 4096;
pub const SDL_INIT_GAMECONTROLLER: u32 = 8192;
pub const SDL_INIT_EVENTS: u32 = 16384;
pub const SDL_INIT_SENSOR: u32 = 32768;
pub const SDL_INIT_NOPARACHUTE: u32 = 1048576;
pub const SDL_INIT_EVERYTHING: u32 = 62001;
extern "C" {
pub fn SDL_GetPlatform() -> *const winapi::ctypes::c_char;
}
pub type wchar_t = winapi::ctypes::c_ushort;
pub type va_list = __builtin_va_list;
pub const SDL_FALSE: SDL_bool = 0;
pub const SDL_TRUE: SDL_bool = 1;
pub type SDL_bool = i32;
pub type Uint8 = u8;
pub type Sint16 = i16;
pub type Uint16 = u16;
pub type Sint32 = i32;
pub type Uint32 = u32;
pub type Sint64 = i64;
pub type Uint64 = u64;
pub type SDL_compile_time_assert_uint8 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_sint8 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_uint16 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_sint16 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_uint32 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_sint32 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_uint64 = [winapi::ctypes::c_int; 1usize];
pub type SDL_compile_time_assert_sint64 = [winapi::ctypes::c_int; 1usize];
pub const DUMMY_ENUM_VALUE: SDL_DUMMY_ENUM = 0;
pub type SDL_DUMMY_ENUM = i32;
pub type SDL_compile_time_assert_enum = [winapi::ctypes::c_int; 1usize];
extern "C" {
pub fn SDL_malloc(size: usize) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_calloc(nmemb: usize, size: usize) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_realloc(mem: *mut winapi::ctypes::c_void, size: usize) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_free(mem: *mut winapi::ctypes::c_void);
}
pub type SDL_malloc_func =
::core::option::Option<unsafe extern "C" fn(size: usize) -> *mut winapi::ctypes::c_void>;
pub type SDL_calloc_func = ::core::option::Option<
unsafe extern "C" fn(nmemb: usize, size: usize) -> *mut winapi::ctypes::c_void,
>;
pub type SDL_realloc_func = ::core::option::Option<
unsafe extern "C" fn(
mem: *mut winapi::ctypes::c_void,
size: usize,
) -> *mut winapi::ctypes::c_void,
>;
pub type SDL_free_func =
::core::option::Option<unsafe extern "C" fn(mem: *mut winapi::ctypes::c_void)>;
extern "C" {
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,
);
}
extern "C" {
pub fn SDL_SetMemoryFunctions(
malloc_func: SDL_malloc_func,
calloc_func: SDL_calloc_func,
realloc_func: SDL_realloc_func,
free_func: SDL_free_func,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetNumAllocations() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_getenv(name: *const winapi::ctypes::c_char) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_setenv(
name: *const winapi::ctypes::c_char,
value: *const winapi::ctypes::c_char,
overwrite: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_qsort(
base: *mut winapi::ctypes::c_void,
nmemb: usize,
size: usize,
compare: ::core::option::Option<
unsafe extern "C" fn(
arg1: *const winapi::ctypes::c_void,
arg2: *const winapi::ctypes::c_void,
) -> winapi::ctypes::c_int,
>,
);
}
extern "C" {
pub fn SDL_abs(x: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_isdigit(x: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_isspace(x: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_toupper(x: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_tolower(x: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_memset(
dst: *mut winapi::ctypes::c_void,
c: winapi::ctypes::c_int,
len: usize,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_memcpy(
dst: *mut winapi::ctypes::c_void,
src: *const winapi::ctypes::c_void,
len: usize,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_memmove(
dst: *mut winapi::ctypes::c_void,
src: *const winapi::ctypes::c_void,
len: usize,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_memcmp(
s1: *const winapi::ctypes::c_void,
s2: *const winapi::ctypes::c_void,
len: usize,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_wcsdup(wstr: *const wchar_t) -> *mut wchar_t;
}
extern "C" {
pub fn SDL_wcslen(wstr: *const wchar_t) -> usize;
}
extern "C" {
pub fn SDL_wcslcpy(dst: *mut wchar_t, src: *const wchar_t, maxlen: usize) -> usize;
}
extern "C" {
pub fn SDL_wcslcat(dst: *mut wchar_t, src: *const wchar_t, maxlen: usize) -> usize;
}
extern "C" {
pub fn SDL_wcscmp(str1: *const wchar_t, str2: *const wchar_t) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_strlen(str: *const winapi::ctypes::c_char) -> usize;
}
extern "C" {
pub fn SDL_strlcpy(
dst: *mut winapi::ctypes::c_char,
src: *const winapi::ctypes::c_char,
maxlen: usize,
) -> usize;
}
extern "C" {
pub fn SDL_utf8strlcpy(
dst: *mut winapi::ctypes::c_char,
src: *const winapi::ctypes::c_char,
dst_bytes: usize,
) -> usize;
}
extern "C" {
pub fn SDL_strlcat(
dst: *mut winapi::ctypes::c_char,
src: *const winapi::ctypes::c_char,
maxlen: usize,
) -> usize;
}
extern "C" {
pub fn SDL_strdup(str: *const winapi::ctypes::c_char) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_strrev(str: *mut winapi::ctypes::c_char) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_strupr(str: *mut winapi::ctypes::c_char) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_strlwr(str: *mut winapi::ctypes::c_char) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_strchr(
str: *const winapi::ctypes::c_char,
c: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_strrchr(
str: *const winapi::ctypes::c_char,
c: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_strstr(
haystack: *const winapi::ctypes::c_char,
needle: *const winapi::ctypes::c_char,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_utf8strlen(str: *const winapi::ctypes::c_char) -> usize;
}
extern "C" {
pub fn SDL_itoa(
value: winapi::ctypes::c_int,
str: *mut winapi::ctypes::c_char,
radix: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_uitoa(
value: winapi::ctypes::c_uint,
str: *mut winapi::ctypes::c_char,
radix: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_ltoa(
value: winapi::ctypes::c_long,
str: *mut winapi::ctypes::c_char,
radix: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_ultoa(
value: winapi::ctypes::c_ulong,
str: *mut winapi::ctypes::c_char,
radix: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_lltoa(
value: Sint64,
str: *mut winapi::ctypes::c_char,
radix: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_ulltoa(
value: Uint64,
str: *mut winapi::ctypes::c_char,
radix: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_atoi(str: *const winapi::ctypes::c_char) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_atof(str: *const winapi::ctypes::c_char) -> f64;
}
extern "C" {
pub fn SDL_strtol(
str: *const winapi::ctypes::c_char,
endp: *mut *mut winapi::ctypes::c_char,
base: winapi::ctypes::c_int,
) -> winapi::ctypes::c_long;
}
extern "C" {
pub fn SDL_strtoul(
str: *const winapi::ctypes::c_char,
endp: *mut *mut winapi::ctypes::c_char,
base: winapi::ctypes::c_int,
) -> winapi::ctypes::c_ulong;
}
extern "C" {
pub fn SDL_strtoll(
str: *const winapi::ctypes::c_char,
endp: *mut *mut winapi::ctypes::c_char,
base: winapi::ctypes::c_int,
) -> Sint64;
}
extern "C" {
pub fn SDL_strtoull(
str: *const winapi::ctypes::c_char,
endp: *mut *mut winapi::ctypes::c_char,
base: winapi::ctypes::c_int,
) -> Uint64;
}
extern "C" {
pub fn SDL_strtod(
str: *const winapi::ctypes::c_char,
endp: *mut *mut winapi::ctypes::c_char,
) -> f64;
}
extern "C" {
pub fn SDL_strcmp(
str1: *const winapi::ctypes::c_char,
str2: *const winapi::ctypes::c_char,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_strncmp(
str1: *const winapi::ctypes::c_char,
str2: *const winapi::ctypes::c_char,
maxlen: usize,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_strcasecmp(
str1: *const winapi::ctypes::c_char,
str2: *const winapi::ctypes::c_char,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_strncasecmp(
str1: *const winapi::ctypes::c_char,
str2: *const winapi::ctypes::c_char,
len: usize,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_sscanf(
text: *const winapi::ctypes::c_char,
fmt: *const winapi::ctypes::c_char,
...
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_vsscanf(
text: *const winapi::ctypes::c_char,
fmt: *const winapi::ctypes::c_char,
ap: va_list,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_snprintf(
text: *mut winapi::ctypes::c_char,
maxlen: usize,
fmt: *const winapi::ctypes::c_char,
...
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_vsnprintf(
text: *mut winapi::ctypes::c_char,
maxlen: usize,
fmt: *const winapi::ctypes::c_char,
ap: va_list,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_acos(x: f64) -> f64;
}
extern "C" {
pub fn SDL_acosf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_asin(x: f64) -> f64;
}
extern "C" {
pub fn SDL_asinf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_atan(x: f64) -> f64;
}
extern "C" {
pub fn SDL_atanf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_atan2(x: f64, y: f64) -> f64;
}
extern "C" {
pub fn SDL_atan2f(x: f32, y: f32) -> f32;
}
extern "C" {
pub fn SDL_ceil(x: f64) -> f64;
}
extern "C" {
pub fn SDL_ceilf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_copysign(x: f64, y: f64) -> f64;
}
extern "C" {
pub fn SDL_copysignf(x: f32, y: f32) -> f32;
}
extern "C" {
pub fn SDL_cos(x: f64) -> f64;
}
extern "C" {
pub fn SDL_cosf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_exp(x: f64) -> f64;
}
extern "C" {
pub fn SDL_expf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_fabs(x: f64) -> f64;
}
extern "C" {
pub fn SDL_fabsf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_floor(x: f64) -> f64;
}
extern "C" {
pub fn SDL_floorf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_fmod(x: f64, y: f64) -> f64;
}
extern "C" {
pub fn SDL_fmodf(x: f32, y: f32) -> f32;
}
extern "C" {
pub fn SDL_log(x: f64) -> f64;
}
extern "C" {
pub fn SDL_logf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_log10(x: f64) -> f64;
}
extern "C" {
pub fn SDL_log10f(x: f32) -> f32;
}
extern "C" {
pub fn SDL_pow(x: f64, y: f64) -> f64;
}
extern "C" {
pub fn SDL_powf(x: f32, y: f32) -> f32;
}
extern "C" {
pub fn SDL_scalbn(x: f64, n: winapi::ctypes::c_int) -> f64;
}
extern "C" {
pub fn SDL_scalbnf(x: f32, n: winapi::ctypes::c_int) -> f32;
}
extern "C" {
pub fn SDL_sin(x: f64) -> f64;
}
extern "C" {
pub fn SDL_sinf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_sqrt(x: f64) -> f64;
}
extern "C" {
pub fn SDL_sqrtf(x: f32) -> f32;
}
extern "C" {
pub fn SDL_tan(x: f64) -> f64;
}
extern "C" {
pub fn SDL_tanf(x: f32) -> f32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _SDL_iconv_t {
_unused: [u8; 0],
}
pub type SDL_iconv_t = *mut _SDL_iconv_t;
extern "C" {
pub fn SDL_iconv_open(
tocode: *const winapi::ctypes::c_char,
fromcode: *const winapi::ctypes::c_char,
) -> SDL_iconv_t;
}
extern "C" {
pub fn SDL_iconv_close(cd: SDL_iconv_t) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_iconv(
cd: SDL_iconv_t,
inbuf: *mut *const winapi::ctypes::c_char,
inbytesleft: *mut usize,
outbuf: *mut *mut winapi::ctypes::c_char,
outbytesleft: *mut usize,
) -> usize;
}
extern "C" {
pub fn SDL_iconv_string(
tocode: *const winapi::ctypes::c_char,
fromcode: *const winapi::ctypes::c_char,
inbuf: *const winapi::ctypes::c_char,
inbytesleft: usize,
) -> *mut winapi::ctypes::c_char;
}
pub type SDL_main_func = ::core::option::Option<
unsafe extern "C" fn(
argc: winapi::ctypes::c_int,
argv: *mut *mut winapi::ctypes::c_char,
) -> winapi::ctypes::c_int,
>;
extern "C" {
pub fn SDL_main(
argc: winapi::ctypes::c_int,
argv: *mut *mut winapi::ctypes::c_char,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetMainReady();
}
extern "C" {
pub fn SDL_RegisterApp(
name: *mut winapi::ctypes::c_char,
style: Uint32,
hInst: *mut winapi::ctypes::c_void,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UnregisterApp();
}
pub const SDL_ASSERTION_RETRY: SDL_AssertState = 0;
pub const SDL_ASSERTION_BREAK: SDL_AssertState = 1;
pub const SDL_ASSERTION_ABORT: SDL_AssertState = 2;
pub const SDL_ASSERTION_IGNORE: SDL_AssertState = 3;
pub const SDL_ASSERTION_ALWAYS_IGNORE: SDL_AssertState = 4;
pub type SDL_AssertState = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_AssertData {
pub always_ignore: winapi::ctypes::c_int,
pub trigger_count: winapi::ctypes::c_uint,
pub condition: *const winapi::ctypes::c_char,
pub filename: *const winapi::ctypes::c_char,
pub linenum: winapi::ctypes::c_int,
pub function: *const winapi::ctypes::c_char,
pub next: *const SDL_AssertData,
}
#[test]
fn bindgen_test_layout_SDL_AssertData() {
assert_eq!(
::core::mem::size_of::<SDL_AssertData>(),
28usize,
concat!("Size of: ", stringify!(SDL_AssertData))
);
assert_eq!(
::core::mem::align_of::<SDL_AssertData>(),
4usize,
concat!("Alignment of ", stringify!(SDL_AssertData))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).always_ignore as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(always_ignore)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).trigger_count as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(trigger_count)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).condition as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(condition)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).filename as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(filename)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).linenum as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(linenum)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).function as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(function)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AssertData>())).next as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_AssertData),
"::",
stringify!(next)
)
);
}
impl Default for SDL_AssertData {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn SDL_ReportAssertion(
arg1: *mut SDL_AssertData,
arg2: *const winapi::ctypes::c_char,
arg3: *const winapi::ctypes::c_char,
arg4: winapi::ctypes::c_int,
) -> SDL_AssertState;
}
pub type SDL_AssertionHandler = ::core::option::Option<
unsafe extern "C" fn(
data: *const SDL_AssertData,
userdata: *mut winapi::ctypes::c_void,
) -> SDL_AssertState,
>;
extern "C" {
pub fn SDL_SetAssertionHandler(
handler: SDL_AssertionHandler,
userdata: *mut winapi::ctypes::c_void,
);
}
extern "C" {
pub fn SDL_GetDefaultAssertionHandler() -> SDL_AssertionHandler;
}
extern "C" {
pub fn SDL_GetAssertionHandler(
puserdata: *mut *mut winapi::ctypes::c_void,
) -> SDL_AssertionHandler;
}
extern "C" {
pub fn SDL_GetAssertionReport() -> *const SDL_AssertData;
}
extern "C" {
pub fn SDL_ResetAssertionReport();
}
pub type SDL_SpinLock = winapi::ctypes::c_int;
extern "C" {
pub fn SDL_AtomicTryLock(lock: *mut SDL_SpinLock) -> SDL_bool;
}
extern "C" {
pub fn SDL_AtomicLock(lock: *mut SDL_SpinLock);
}
extern "C" {
pub fn SDL_AtomicUnlock(lock: *mut SDL_SpinLock);
}
extern "C" {
pub fn SDL_MemoryBarrierReleaseFunction();
}
extern "C" {
pub fn SDL_MemoryBarrierAcquireFunction();
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_atomic_t {
pub value: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_atomic_t() {
assert_eq!(
::core::mem::size_of::<SDL_atomic_t>(),
4usize,
concat!("Size of: ", stringify!(SDL_atomic_t))
);
assert_eq!(
::core::mem::align_of::<SDL_atomic_t>(),
4usize,
concat!("Alignment of ", stringify!(SDL_atomic_t))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_atomic_t>())).value as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_atomic_t),
"::",
stringify!(value)
)
);
}
extern "C" {
pub fn SDL_AtomicCAS(
a: *mut SDL_atomic_t,
oldval: winapi::ctypes::c_int,
newval: winapi::ctypes::c_int,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_AtomicSet(a: *mut SDL_atomic_t, v: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AtomicGet(a: *mut SDL_atomic_t) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AtomicAdd(a: *mut SDL_atomic_t, v: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AtomicCASPtr(
a: *mut *mut winapi::ctypes::c_void,
oldval: *mut winapi::ctypes::c_void,
newval: *mut winapi::ctypes::c_void,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_AtomicSetPtr(
a: *mut *mut winapi::ctypes::c_void,
v: *mut winapi::ctypes::c_void,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_AtomicGetPtr(a: *mut *mut winapi::ctypes::c_void) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_SetError(fmt: *const winapi::ctypes::c_char, ...) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetError() -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_ClearError();
}
pub const SDL_ENOMEM: SDL_errorcode = 0;
pub const SDL_EFREAD: SDL_errorcode = 1;
pub const SDL_EFWRITE: SDL_errorcode = 2;
pub const SDL_EFSEEK: SDL_errorcode = 3;
pub const SDL_UNSUPPORTED: SDL_errorcode = 4;
pub const SDL_LASTERROR: SDL_errorcode = 5;
pub type SDL_errorcode = i32;
extern "C" {
pub fn SDL_Error(code: SDL_errorcode) -> winapi::ctypes::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_mutex {
_unused: [u8; 0],
}
extern "C" {
pub fn SDL_CreateMutex() -> *mut SDL_mutex;
}
extern "C" {
pub fn SDL_LockMutex(mutex: *mut SDL_mutex) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_TryLockMutex(mutex: *mut SDL_mutex) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UnlockMutex(mutex: *mut SDL_mutex) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_DestroyMutex(mutex: *mut SDL_mutex);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_semaphore {
_unused: [u8; 0],
}
pub type SDL_sem = SDL_semaphore;
extern "C" {
pub fn SDL_CreateSemaphore(initial_value: Uint32) -> *mut SDL_sem;
}
extern "C" {
pub fn SDL_DestroySemaphore(sem: *mut SDL_sem);
}
extern "C" {
pub fn SDL_SemWait(sem: *mut SDL_sem) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SemTryWait(sem: *mut SDL_sem) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SemWaitTimeout(sem: *mut SDL_sem, ms: Uint32) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SemPost(sem: *mut SDL_sem) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SemValue(sem: *mut SDL_sem) -> Uint32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_cond {
_unused: [u8; 0],
}
extern "C" {
pub fn SDL_CreateCond() -> *mut SDL_cond;
}
extern "C" {
pub fn SDL_DestroyCond(cond: *mut SDL_cond);
}
extern "C" {
pub fn SDL_CondSignal(cond: *mut SDL_cond) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CondBroadcast(cond: *mut SDL_cond) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CondWait(cond: *mut SDL_cond, mutex: *mut SDL_mutex) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CondWaitTimeout(
cond: *mut SDL_cond,
mutex: *mut SDL_mutex,
ms: Uint32,
) -> winapi::ctypes::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_Thread {
_unused: [u8; 0],
}
pub type SDL_threadID = winapi::ctypes::c_ulong;
pub type SDL_TLSID = winapi::ctypes::c_uint;
pub const SDL_THREAD_PRIORITY_LOW: SDL_ThreadPriority = 0;
pub const SDL_THREAD_PRIORITY_NORMAL: SDL_ThreadPriority = 1;
pub const SDL_THREAD_PRIORITY_HIGH: SDL_ThreadPriority = 2;
pub const SDL_THREAD_PRIORITY_TIME_CRITICAL: SDL_ThreadPriority = 3;
pub type SDL_ThreadPriority = i32;
pub type SDL_ThreadFunction = ::core::option::Option<
unsafe extern "C" fn(data: *mut winapi::ctypes::c_void) -> winapi::ctypes::c_int,
>;
pub type pfnSDL_CurrentBeginThread = ::core::option::Option<
unsafe extern "C" fn(
arg1: *mut winapi::ctypes::c_void,
arg2: winapi::ctypes::c_uint,
func: ::core::option::Option<
unsafe extern "stdcall" fn(arg1: *mut winapi::ctypes::c_void) -> winapi::ctypes::c_uint,
>,
arg3: *mut winapi::ctypes::c_void,
arg4: winapi::ctypes::c_uint,
arg5: *mut winapi::ctypes::c_uint,
) -> usize,
>;
pub type pfnSDL_CurrentEndThread =
::core::option::Option<unsafe extern "C" fn(code: winapi::ctypes::c_uint)>;
extern "C" {
pub fn SDL_CreateThread(
fn_: SDL_ThreadFunction,
name: *const winapi::ctypes::c_char,
data: *mut winapi::ctypes::c_void,
pfnBeginThread: pfnSDL_CurrentBeginThread,
pfnEndThread: pfnSDL_CurrentEndThread,
) -> *mut SDL_Thread;
}
extern "C" {
pub fn SDL_CreateThreadWithStackSize(
fn_: ::core::option::Option<
unsafe extern "C" fn(arg1: *mut winapi::ctypes::c_void) -> winapi::ctypes::c_int,
>,
name: *const winapi::ctypes::c_char,
stacksize: usize,
data: *mut winapi::ctypes::c_void,
pfnBeginThread: pfnSDL_CurrentBeginThread,
pfnEndThread: pfnSDL_CurrentEndThread,
) -> *mut SDL_Thread;
}
extern "C" {
pub fn SDL_GetThreadName(thread: *mut SDL_Thread) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_ThreadID() -> SDL_threadID;
}
extern "C" {
pub fn SDL_GetThreadID(thread: *mut SDL_Thread) -> SDL_threadID;
}
extern "C" {
pub fn SDL_SetThreadPriority(priority: SDL_ThreadPriority) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_WaitThread(thread: *mut SDL_Thread, status: *mut winapi::ctypes::c_int);
}
extern "C" {
pub fn SDL_DetachThread(thread: *mut SDL_Thread);
}
extern "C" {
pub fn SDL_TLSCreate() -> SDL_TLSID;
}
extern "C" {
pub fn SDL_TLSGet(id: SDL_TLSID) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_TLSSet(
id: SDL_TLSID,
value: *const winapi::ctypes::c_void,
destructor: ::core::option::Option<unsafe extern "C" fn(arg1: *mut winapi::ctypes::c_void)>,
) -> winapi::ctypes::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SDL_RWops {
pub size: ::core::option::Option<unsafe extern "C" fn(context: *mut SDL_RWops) -> Sint64>,
pub seek: ::core::option::Option<
unsafe extern "C" fn(
context: *mut SDL_RWops,
offset: Sint64,
whence: winapi::ctypes::c_int,
) -> Sint64,
>,
pub read: ::core::option::Option<
unsafe extern "C" fn(
context: *mut SDL_RWops,
ptr: *mut winapi::ctypes::c_void,
size: usize,
maxnum: usize,
) -> usize,
>,
pub write: ::core::option::Option<
unsafe extern "C" fn(
context: *mut SDL_RWops,
ptr: *const winapi::ctypes::c_void,
size: usize,
num: usize,
) -> usize,
>,
pub close:
::core::option::Option<unsafe extern "C" fn(context: *mut SDL_RWops) -> winapi::ctypes::c_int>,
pub type_: Uint32,
pub hidden: SDL_RWops__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_RWops__bindgen_ty_1 {
pub windowsio: SDL_RWops__bindgen_ty_1__bindgen_ty_1,
pub mem: SDL_RWops__bindgen_ty_1__bindgen_ty_2,
pub unknown: SDL_RWops__bindgen_ty_1__bindgen_ty_3,
_bindgen_union_align: [u32; 5usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_RWops__bindgen_ty_1__bindgen_ty_1 {
pub append: SDL_bool,
pub h: *mut winapi::ctypes::c_void,
pub buffer: SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub data: *mut winapi::ctypes::c_void,
pub size: usize,
pub left: usize,
}
#[test]
fn bindgen_test_layout_SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
12usize,
concat!(
"Size of: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).data
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).size
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).left
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(left)
)
);
}
impl Default for SDL_RWops__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[test]
fn bindgen_test_layout_SDL_RWops__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_1>(),
20usize,
concat!(
"Size of: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_1>())).append as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(append)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_1>())).h as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_1>())).buffer as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(buffer)
)
);
}
impl Default for SDL_RWops__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_RWops__bindgen_ty_1__bindgen_ty_2 {
pub base: *mut Uint8,
pub here: *mut Uint8,
pub stop: *mut Uint8,
}
#[test]
fn bindgen_test_layout_SDL_RWops__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::core::mem::size_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_2>(),
12usize,
concat!(
"Size of: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::core::mem::align_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_2>())).base as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_2>())).here as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(here)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_2>())).stop as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(stop)
)
);
}
impl Default for SDL_RWops__bindgen_ty_1__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_RWops__bindgen_ty_1__bindgen_ty_3 {
pub data1: *mut winapi::ctypes::c_void,
pub data2: *mut winapi::ctypes::c_void,
}
#[test]
fn bindgen_test_layout_SDL_RWops__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::core::mem::size_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Size of: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::core::mem::align_of::<SDL_RWops__bindgen_ty_1__bindgen_ty_3>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_3>())).data1 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(data1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1__bindgen_ty_3>())).data2 as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(data2)
)
);
}
impl Default for SDL_RWops__bindgen_ty_1__bindgen_ty_3 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[test]
fn bindgen_test_layout_SDL_RWops__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_RWops__bindgen_ty_1>(),
20usize,
concat!("Size of: ", stringify!(SDL_RWops__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<SDL_RWops__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(SDL_RWops__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1>())).windowsio as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1),
"::",
stringify!(windowsio)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1>())).mem as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1),
"::",
stringify!(mem)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops__bindgen_ty_1>())).unknown as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops__bindgen_ty_1),
"::",
stringify!(unknown)
)
);
}
impl Default for SDL_RWops__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_RWops__bindgen_ty_1 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_RWops__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_SDL_RWops() {
assert_eq!(
::core::mem::size_of::<SDL_RWops>(),
44usize,
concat!("Size of: ", stringify!(SDL_RWops))
);
assert_eq!(
::core::mem::align_of::<SDL_RWops>(),
4usize,
concat!("Alignment of ", stringify!(SDL_RWops))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).seek as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(seek)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).read as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(read)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).write as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).close as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(close)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).type_ as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RWops>())).hidden as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_RWops),
"::",
stringify!(hidden)
)
);
}
impl Default for SDL_RWops {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_RWops {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write ! ( f , "SDL_RWops {{ size: {:?}, seek: {:?}, read: {:?}, write: {:?}, close: {:?}, type: {:?}, hidden: {:?} }}" , self . size , self . seek , self . read , self . write , self . close , self . type_ , self . hidden )
}
}
extern "C" {
pub fn SDL_RWFromFile(
file: *const winapi::ctypes::c_char,
mode: *const winapi::ctypes::c_char,
) -> *mut SDL_RWops;
}
extern "C" {
pub fn SDL_RWFromFP(fp: *mut winapi::ctypes::c_void, autoclose: SDL_bool) -> *mut SDL_RWops;
}
extern "C" {
pub fn SDL_RWFromMem(
mem: *mut winapi::ctypes::c_void,
size: winapi::ctypes::c_int,
) -> *mut SDL_RWops;
}
extern "C" {
pub fn SDL_RWFromConstMem(
mem: *const winapi::ctypes::c_void,
size: winapi::ctypes::c_int,
) -> *mut SDL_RWops;
}
extern "C" {
pub fn SDL_AllocRW() -> *mut SDL_RWops;
}
extern "C" {
pub fn SDL_FreeRW(area: *mut SDL_RWops);
}
extern "C" {
pub fn SDL_RWsize(context: *mut SDL_RWops) -> Sint64;
}
extern "C" {
pub fn SDL_RWseek(
context: *mut SDL_RWops,
offset: Sint64,
whence: winapi::ctypes::c_int,
) -> Sint64;
}
extern "C" {
pub fn SDL_RWtell(context: *mut SDL_RWops) -> Sint64;
}
extern "C" {
pub fn SDL_RWread(
context: *mut SDL_RWops,
ptr: *mut winapi::ctypes::c_void,
size: usize,
maxnum: usize,
) -> usize;
}
extern "C" {
pub fn SDL_RWwrite(
context: *mut SDL_RWops,
ptr: *const winapi::ctypes::c_void,
size: usize,
num: usize,
) -> usize;
}
extern "C" {
pub fn SDL_RWclose(context: *mut SDL_RWops) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_LoadFile_RW(
src: *mut SDL_RWops,
datasize: *mut usize,
freesrc: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_LoadFile(
file: *const winapi::ctypes::c_char,
datasize: *mut usize,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_ReadU8(src: *mut SDL_RWops) -> Uint8;
}
extern "C" {
pub fn SDL_ReadLE16(src: *mut SDL_RWops) -> Uint16;
}
extern "C" {
pub fn SDL_ReadBE16(src: *mut SDL_RWops) -> Uint16;
}
extern "C" {
pub fn SDL_ReadLE32(src: *mut SDL_RWops) -> Uint32;
}
extern "C" {
pub fn SDL_ReadBE32(src: *mut SDL_RWops) -> Uint32;
}
extern "C" {
pub fn SDL_ReadLE64(src: *mut SDL_RWops) -> Uint64;
}
extern "C" {
pub fn SDL_ReadBE64(src: *mut SDL_RWops) -> Uint64;
}
extern "C" {
pub fn SDL_WriteU8(dst: *mut SDL_RWops, value: Uint8) -> usize;
}
extern "C" {
pub fn SDL_WriteLE16(dst: *mut SDL_RWops, value: Uint16) -> usize;
}
extern "C" {
pub fn SDL_WriteBE16(dst: *mut SDL_RWops, value: Uint16) -> usize;
}
extern "C" {
pub fn SDL_WriteLE32(dst: *mut SDL_RWops, value: Uint32) -> usize;
}
extern "C" {
pub fn SDL_WriteBE32(dst: *mut SDL_RWops, value: Uint32) -> usize;
}
extern "C" {
pub fn SDL_WriteLE64(dst: *mut SDL_RWops, value: Uint64) -> usize;
}
extern "C" {
pub fn SDL_WriteBE64(dst: *mut SDL_RWops, value: Uint64) -> usize;
}
pub type SDL_AudioFormat = Uint16;
pub type SDL_AudioCallback = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut winapi::ctypes::c_void,
stream: *mut Uint8,
len: winapi::ctypes::c_int,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_AudioSpec {
pub freq: winapi::ctypes::c_int,
pub format: SDL_AudioFormat,
pub channels: Uint8,
pub silence: Uint8,
pub samples: Uint16,
pub padding: Uint16,
pub size: Uint32,
pub callback: SDL_AudioCallback,
pub userdata: *mut winapi::ctypes::c_void,
}
#[test]
fn bindgen_test_layout_SDL_AudioSpec() {
assert_eq!(
::core::mem::size_of::<SDL_AudioSpec>(),
24usize,
concat!("Size of: ", stringify!(SDL_AudioSpec))
);
assert_eq!(
::core::mem::align_of::<SDL_AudioSpec>(),
4usize,
concat!("Alignment of ", stringify!(SDL_AudioSpec))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).freq as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(freq)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).format as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).channels as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(channels)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).silence as *const _ as usize },
7usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(silence)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).samples as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(samples)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).padding as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(padding)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).size as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).callback as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(callback)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioSpec>())).userdata as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioSpec),
"::",
stringify!(userdata)
)
);
}
impl Default for SDL_AudioSpec {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type SDL_AudioFilter =
::core::option::Option<unsafe extern "C" fn(cvt: *mut SDL_AudioCVT, format: SDL_AudioFormat)>;
#[repr(C, packed(4))]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_AudioCVT {
pub needed: winapi::ctypes::c_int,
pub src_format: SDL_AudioFormat,
pub dst_format: SDL_AudioFormat,
pub rate_incr: f64,
pub buf: *mut Uint8,
pub len: winapi::ctypes::c_int,
pub len_cvt: winapi::ctypes::c_int,
pub len_mult: winapi::ctypes::c_int,
pub len_ratio: f64,
pub filters: [SDL_AudioFilter; 10usize],
pub filter_index: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_AudioCVT() {
assert_eq!(
::core::mem::size_of::<SDL_AudioCVT>(),
84usize,
concat!("Size of: ", stringify!(SDL_AudioCVT))
);
assert_eq!(
::core::mem::align_of::<SDL_AudioCVT>(),
4usize,
concat!("Alignment of ", stringify!(SDL_AudioCVT))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).needed as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(needed)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).src_format as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(src_format)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).dst_format as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(dst_format)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).rate_incr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(rate_incr)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).buf as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).len as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).len_cvt as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(len_cvt)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).len_mult as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(len_mult)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).len_ratio as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(len_ratio)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).filters as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(filters)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioCVT>())).filter_index as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioCVT),
"::",
stringify!(filter_index)
)
);
}
impl Default for SDL_AudioCVT {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn SDL_GetNumAudioDrivers() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetAudioDriver(index: winapi::ctypes::c_int) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_AudioInit(driver_name: *const winapi::ctypes::c_char) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AudioQuit();
}
extern "C" {
pub fn SDL_GetCurrentAudioDriver() -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_OpenAudio(
desired: *mut SDL_AudioSpec,
obtained: *mut SDL_AudioSpec,
) -> winapi::ctypes::c_int;
}
pub type SDL_AudioDeviceID = Uint32;
extern "C" {
pub fn SDL_GetNumAudioDevices(iscapture: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetAudioDeviceName(
index: winapi::ctypes::c_int,
iscapture: winapi::ctypes::c_int,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_OpenAudioDevice(
device: *const winapi::ctypes::c_char,
iscapture: winapi::ctypes::c_int,
desired: *const SDL_AudioSpec,
obtained: *mut SDL_AudioSpec,
allowed_changes: winapi::ctypes::c_int,
) -> SDL_AudioDeviceID;
}
pub const SDL_AUDIO_STOPPED: SDL_AudioStatus = 0;
pub const SDL_AUDIO_PLAYING: SDL_AudioStatus = 1;
pub const SDL_AUDIO_PAUSED: SDL_AudioStatus = 2;
pub type SDL_AudioStatus = i32;
extern "C" {
pub fn SDL_GetAudioStatus() -> SDL_AudioStatus;
}
extern "C" {
pub fn SDL_GetAudioDeviceStatus(dev: SDL_AudioDeviceID) -> SDL_AudioStatus;
}
extern "C" {
pub fn SDL_PauseAudio(pause_on: winapi::ctypes::c_int);
}
extern "C" {
pub fn SDL_PauseAudioDevice(dev: SDL_AudioDeviceID, pause_on: winapi::ctypes::c_int);
}
extern "C" {
pub fn SDL_LoadWAV_RW(
src: *mut SDL_RWops,
freesrc: winapi::ctypes::c_int,
spec: *mut SDL_AudioSpec,
audio_buf: *mut *mut Uint8,
audio_len: *mut Uint32,
) -> *mut SDL_AudioSpec;
}
extern "C" {
pub fn SDL_FreeWAV(audio_buf: *mut Uint8);
}
extern "C" {
pub fn SDL_BuildAudioCVT(
cvt: *mut SDL_AudioCVT,
src_format: SDL_AudioFormat,
src_channels: Uint8,
src_rate: winapi::ctypes::c_int,
dst_format: SDL_AudioFormat,
dst_channels: Uint8,
dst_rate: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_ConvertAudio(cvt: *mut SDL_AudioCVT) -> winapi::ctypes::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _SDL_AudioStream {
_unused: [u8; 0],
}
pub type SDL_AudioStream = _SDL_AudioStream;
extern "C" {
pub fn SDL_NewAudioStream(
src_format: SDL_AudioFormat,
src_channels: Uint8,
src_rate: winapi::ctypes::c_int,
dst_format: SDL_AudioFormat,
dst_channels: Uint8,
dst_rate: winapi::ctypes::c_int,
) -> *mut SDL_AudioStream;
}
extern "C" {
pub fn SDL_AudioStreamPut(
stream: *mut SDL_AudioStream,
buf: *const winapi::ctypes::c_void,
len: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AudioStreamGet(
stream: *mut SDL_AudioStream,
buf: *mut winapi::ctypes::c_void,
len: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AudioStreamAvailable(stream: *mut SDL_AudioStream) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AudioStreamFlush(stream: *mut SDL_AudioStream) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_AudioStreamClear(stream: *mut SDL_AudioStream);
}
extern "C" {
pub fn SDL_FreeAudioStream(stream: *mut SDL_AudioStream);
}
extern "C" {
pub fn SDL_MixAudio(
dst: *mut Uint8,
src: *const Uint8,
len: Uint32,
volume: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_MixAudioFormat(
dst: *mut Uint8,
src: *const Uint8,
format: SDL_AudioFormat,
len: Uint32,
volume: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_QueueAudio(
dev: SDL_AudioDeviceID,
data: *const winapi::ctypes::c_void,
len: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_DequeueAudio(
dev: SDL_AudioDeviceID,
data: *mut winapi::ctypes::c_void,
len: Uint32,
) -> Uint32;
}
extern "C" {
pub fn SDL_GetQueuedAudioSize(dev: SDL_AudioDeviceID) -> Uint32;
}
extern "C" {
pub fn SDL_ClearQueuedAudio(dev: SDL_AudioDeviceID);
}
extern "C" {
pub fn SDL_LockAudio();
}
extern "C" {
pub fn SDL_LockAudioDevice(dev: SDL_AudioDeviceID);
}
extern "C" {
pub fn SDL_UnlockAudio();
}
extern "C" {
pub fn SDL_UnlockAudioDevice(dev: SDL_AudioDeviceID);
}
extern "C" {
pub fn SDL_CloseAudio();
}
extern "C" {
pub fn SDL_CloseAudioDevice(dev: SDL_AudioDeviceID);
}
extern "C" {
pub fn SDL_SetClipboardText(text: *const winapi::ctypes::c_char) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetClipboardText() -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_HasClipboardText() -> SDL_bool;
}
extern "C" {
pub fn SDL_GetCPUCount() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetCPUCacheLineSize() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HasRDTSC() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasAltiVec() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasMMX() -> SDL_bool;
}
extern "C" {
pub fn SDL_Has3DNow() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasSSE() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasSSE2() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasSSE3() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasSSE41() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasSSE42() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasAVX() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasAVX2() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasAVX512F() -> SDL_bool;
}
extern "C" {
pub fn SDL_HasNEON() -> SDL_bool;
}
extern "C" {
pub fn SDL_GetSystemRAM() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SIMDGetAlignment() -> usize;
}
extern "C" {
pub fn SDL_SIMDAlloc(len: usize) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_SIMDFree(ptr: *mut winapi::ctypes::c_void);
}
pub const SDL_PIXELTYPE_UNKNOWN: _bindgen_ty_1 = 0;
pub const SDL_PIXELTYPE_INDEX1: _bindgen_ty_1 = 1;
pub const SDL_PIXELTYPE_INDEX4: _bindgen_ty_1 = 2;
pub const SDL_PIXELTYPE_INDEX8: _bindgen_ty_1 = 3;
pub const SDL_PIXELTYPE_PACKED8: _bindgen_ty_1 = 4;
pub const SDL_PIXELTYPE_PACKED16: _bindgen_ty_1 = 5;
pub const SDL_PIXELTYPE_PACKED32: _bindgen_ty_1 = 6;
pub const SDL_PIXELTYPE_ARRAYU8: _bindgen_ty_1 = 7;
pub const SDL_PIXELTYPE_ARRAYU16: _bindgen_ty_1 = 8;
pub const SDL_PIXELTYPE_ARRAYU32: _bindgen_ty_1 = 9;
pub const SDL_PIXELTYPE_ARRAYF16: _bindgen_ty_1 = 10;
pub const SDL_PIXELTYPE_ARRAYF32: _bindgen_ty_1 = 11;
pub type _bindgen_ty_1 = i32;
pub const SDL_BITMAPORDER_NONE: _bindgen_ty_2 = 0;
pub const SDL_BITMAPORDER_4321: _bindgen_ty_2 = 1;
pub const SDL_BITMAPORDER_1234: _bindgen_ty_2 = 2;
pub type _bindgen_ty_2 = i32;
pub const SDL_PACKEDORDER_NONE: _bindgen_ty_3 = 0;
pub const SDL_PACKEDORDER_XRGB: _bindgen_ty_3 = 1;
pub const SDL_PACKEDORDER_RGBX: _bindgen_ty_3 = 2;
pub const SDL_PACKEDORDER_ARGB: _bindgen_ty_3 = 3;
pub const SDL_PACKEDORDER_RGBA: _bindgen_ty_3 = 4;
pub const SDL_PACKEDORDER_XBGR: _bindgen_ty_3 = 5;
pub const SDL_PACKEDORDER_BGRX: _bindgen_ty_3 = 6;
pub const SDL_PACKEDORDER_ABGR: _bindgen_ty_3 = 7;
pub const SDL_PACKEDORDER_BGRA: _bindgen_ty_3 = 8;
pub type _bindgen_ty_3 = i32;
pub const SDL_ARRAYORDER_NONE: _bindgen_ty_4 = 0;
pub const SDL_ARRAYORDER_RGB: _bindgen_ty_4 = 1;
pub const SDL_ARRAYORDER_RGBA: _bindgen_ty_4 = 2;
pub const SDL_ARRAYORDER_ARGB: _bindgen_ty_4 = 3;
pub const SDL_ARRAYORDER_BGR: _bindgen_ty_4 = 4;
pub const SDL_ARRAYORDER_BGRA: _bindgen_ty_4 = 5;
pub const SDL_ARRAYORDER_ABGR: _bindgen_ty_4 = 6;
pub type _bindgen_ty_4 = i32;
pub const SDL_PACKEDLAYOUT_NONE: _bindgen_ty_5 = 0;
pub const SDL_PACKEDLAYOUT_332: _bindgen_ty_5 = 1;
pub const SDL_PACKEDLAYOUT_4444: _bindgen_ty_5 = 2;
pub const SDL_PACKEDLAYOUT_1555: _bindgen_ty_5 = 3;
pub const SDL_PACKEDLAYOUT_5551: _bindgen_ty_5 = 4;
pub const SDL_PACKEDLAYOUT_565: _bindgen_ty_5 = 5;
pub const SDL_PACKEDLAYOUT_8888: _bindgen_ty_5 = 6;
pub const SDL_PACKEDLAYOUT_2101010: _bindgen_ty_5 = 7;
pub const SDL_PACKEDLAYOUT_1010102: _bindgen_ty_5 = 8;
pub type _bindgen_ty_5 = i32;
pub const SDL_PIXELFORMAT_UNKNOWN: SDL_PixelFormatEnum = 0;
pub const SDL_PIXELFORMAT_INDEX1LSB: SDL_PixelFormatEnum = 286261504;
pub const SDL_PIXELFORMAT_INDEX1MSB: SDL_PixelFormatEnum = 287310080;
pub const SDL_PIXELFORMAT_INDEX4LSB: SDL_PixelFormatEnum = 303039488;
pub const SDL_PIXELFORMAT_INDEX4MSB: SDL_PixelFormatEnum = 304088064;
pub const SDL_PIXELFORMAT_INDEX8: SDL_PixelFormatEnum = 318769153;
pub const SDL_PIXELFORMAT_RGB332: SDL_PixelFormatEnum = 336660481;
pub const SDL_PIXELFORMAT_RGB444: SDL_PixelFormatEnum = 353504258;
pub const SDL_PIXELFORMAT_RGB555: SDL_PixelFormatEnum = 353570562;
pub const SDL_PIXELFORMAT_BGR555: SDL_PixelFormatEnum = 357764866;
pub const SDL_PIXELFORMAT_ARGB4444: SDL_PixelFormatEnum = 355602434;
pub const SDL_PIXELFORMAT_RGBA4444: SDL_PixelFormatEnum = 356651010;
pub const SDL_PIXELFORMAT_ABGR4444: SDL_PixelFormatEnum = 359796738;
pub const SDL_PIXELFORMAT_BGRA4444: SDL_PixelFormatEnum = 360845314;
pub const SDL_PIXELFORMAT_ARGB1555: SDL_PixelFormatEnum = 355667970;
pub const SDL_PIXELFORMAT_RGBA5551: SDL_PixelFormatEnum = 356782082;
pub const SDL_PIXELFORMAT_ABGR1555: SDL_PixelFormatEnum = 359862274;
pub const SDL_PIXELFORMAT_BGRA5551: SDL_PixelFormatEnum = 360976386;
pub const SDL_PIXELFORMAT_RGB565: SDL_PixelFormatEnum = 353701890;
pub const SDL_PIXELFORMAT_BGR565: SDL_PixelFormatEnum = 357896194;
pub const SDL_PIXELFORMAT_RGB24: SDL_PixelFormatEnum = 386930691;
pub const SDL_PIXELFORMAT_BGR24: SDL_PixelFormatEnum = 390076419;
pub const SDL_PIXELFORMAT_RGB888: SDL_PixelFormatEnum = 370546692;
pub const SDL_PIXELFORMAT_RGBX8888: SDL_PixelFormatEnum = 371595268;
pub const SDL_PIXELFORMAT_BGR888: SDL_PixelFormatEnum = 374740996;
pub const SDL_PIXELFORMAT_BGRX8888: SDL_PixelFormatEnum = 375789572;
pub const SDL_PIXELFORMAT_ARGB8888: SDL_PixelFormatEnum = 372645892;
pub const SDL_PIXELFORMAT_RGBA8888: SDL_PixelFormatEnum = 373694468;
pub const SDL_PIXELFORMAT_ABGR8888: SDL_PixelFormatEnum = 376840196;
pub const SDL_PIXELFORMAT_BGRA8888: SDL_PixelFormatEnum = 377888772;
pub const SDL_PIXELFORMAT_ARGB2101010: SDL_PixelFormatEnum = 372711428;
pub const SDL_PIXELFORMAT_RGBA32: SDL_PixelFormatEnum = 376840196;
pub const SDL_PIXELFORMAT_ARGB32: SDL_PixelFormatEnum = 377888772;
pub const SDL_PIXELFORMAT_BGRA32: SDL_PixelFormatEnum = 372645892;
pub const SDL_PIXELFORMAT_ABGR32: SDL_PixelFormatEnum = 373694468;
pub const SDL_PIXELFORMAT_YV12: SDL_PixelFormatEnum = 842094169;
pub const SDL_PIXELFORMAT_IYUV: SDL_PixelFormatEnum = 1448433993;
pub const SDL_PIXELFORMAT_YUY2: SDL_PixelFormatEnum = 844715353;
pub const SDL_PIXELFORMAT_UYVY: SDL_PixelFormatEnum = 1498831189;
pub const SDL_PIXELFORMAT_YVYU: SDL_PixelFormatEnum = 1431918169;
pub const SDL_PIXELFORMAT_NV12: SDL_PixelFormatEnum = 842094158;
pub const SDL_PIXELFORMAT_NV21: SDL_PixelFormatEnum = 825382478;
pub const SDL_PIXELFORMAT_EXTERNAL_OES: SDL_PixelFormatEnum = 542328143;
pub type SDL_PixelFormatEnum = i32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_Color {
pub r: Uint8,
pub g: Uint8,
pub b: Uint8,
pub a: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_Color() {
assert_eq!(
::core::mem::size_of::<SDL_Color>(),
4usize,
concat!("Size of: ", stringify!(SDL_Color))
);
assert_eq!(
::core::mem::align_of::<SDL_Color>(),
1usize,
concat!("Alignment of ", stringify!(SDL_Color))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Color>())).r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Color),
"::",
stringify!(r)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Color>())).g as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(SDL_Color),
"::",
stringify!(g)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Color>())).b as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(SDL_Color),
"::",
stringify!(b)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Color>())).a as *const _ as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(SDL_Color),
"::",
stringify!(a)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_Palette {
pub ncolors: winapi::ctypes::c_int,
pub colors: *mut SDL_Color,
pub version: Uint32,
pub refcount: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_Palette() {
assert_eq!(
::core::mem::size_of::<SDL_Palette>(),
16usize,
concat!("Size of: ", stringify!(SDL_Palette))
);
assert_eq!(
::core::mem::align_of::<SDL_Palette>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Palette))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Palette>())).ncolors as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Palette),
"::",
stringify!(ncolors)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Palette>())).colors as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_Palette),
"::",
stringify!(colors)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Palette>())).version as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_Palette),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Palette>())).refcount as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_Palette),
"::",
stringify!(refcount)
)
);
}
impl Default for SDL_Palette {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_PixelFormat {
pub format: Uint32,
pub palette: *mut SDL_Palette,
pub BitsPerPixel: Uint8,
pub BytesPerPixel: Uint8,
pub padding: [Uint8; 2usize],
pub Rmask: Uint32,
pub Gmask: Uint32,
pub Bmask: Uint32,
pub Amask: Uint32,
pub Rloss: Uint8,
pub Gloss: Uint8,
pub Bloss: Uint8,
pub Aloss: Uint8,
pub Rshift: Uint8,
pub Gshift: Uint8,
pub Bshift: Uint8,
pub Ashift: Uint8,
pub refcount: winapi::ctypes::c_int,
pub next: *mut SDL_PixelFormat,
}
#[test]
fn bindgen_test_layout_SDL_PixelFormat() {
assert_eq!(
::core::mem::size_of::<SDL_PixelFormat>(),
44usize,
concat!("Size of: ", stringify!(SDL_PixelFormat))
);
assert_eq!(
::core::mem::align_of::<SDL_PixelFormat>(),
4usize,
concat!("Alignment of ", stringify!(SDL_PixelFormat))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).format as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).palette as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(palette)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).BitsPerPixel as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(BitsPerPixel)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).BytesPerPixel as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(BytesPerPixel)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).padding as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(padding)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Rmask as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Rmask)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Gmask as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Gmask)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Bmask as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Bmask)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Amask as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Amask)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Rloss as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Rloss)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Gloss as *const _ as usize },
29usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Gloss)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Bloss as *const _ as usize },
30usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Bloss)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Aloss as *const _ as usize },
31usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Aloss)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Rshift as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Rshift)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Gshift as *const _ as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Gshift)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Bshift as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Bshift)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).Ashift as *const _ as usize },
35usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(Ashift)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).refcount as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(refcount)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_PixelFormat>())).next as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(SDL_PixelFormat),
"::",
stringify!(next)
)
);
}
impl Default for SDL_PixelFormat {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn SDL_GetPixelFormatName(format: Uint32) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_PixelFormatEnumToMasks(
format: Uint32,
bpp: *mut winapi::ctypes::c_int,
Rmask: *mut Uint32,
Gmask: *mut Uint32,
Bmask: *mut Uint32,
Amask: *mut Uint32,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_MasksToPixelFormatEnum(
bpp: winapi::ctypes::c_int,
Rmask: Uint32,
Gmask: Uint32,
Bmask: Uint32,
Amask: Uint32,
) -> Uint32;
}
extern "C" {
pub fn SDL_AllocFormat(pixel_format: Uint32) -> *mut SDL_PixelFormat;
}
extern "C" {
pub fn SDL_FreeFormat(format: *mut SDL_PixelFormat);
}
extern "C" {
pub fn SDL_AllocPalette(ncolors: winapi::ctypes::c_int) -> *mut SDL_Palette;
}
extern "C" {
pub fn SDL_SetPixelFormatPalette(
format: *mut SDL_PixelFormat,
palette: *mut SDL_Palette,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetPaletteColors(
palette: *mut SDL_Palette,
colors: *const SDL_Color,
firstcolor: winapi::ctypes::c_int,
ncolors: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_FreePalette(palette: *mut SDL_Palette);
}
extern "C" {
pub fn SDL_MapRGB(format: *const SDL_PixelFormat, r: Uint8, g: Uint8, b: Uint8) -> Uint32;
}
extern "C" {
pub fn SDL_MapRGBA(
format: *const SDL_PixelFormat,
r: Uint8,
g: Uint8,
b: Uint8,
a: Uint8,
) -> Uint32;
}
extern "C" {
pub fn SDL_GetRGB(
pixel: Uint32,
format: *const SDL_PixelFormat,
r: *mut Uint8,
g: *mut Uint8,
b: *mut Uint8,
);
}
extern "C" {
pub fn SDL_GetRGBA(
pixel: Uint32,
format: *const SDL_PixelFormat,
r: *mut Uint8,
g: *mut Uint8,
b: *mut Uint8,
a: *mut Uint8,
);
}
extern "C" {
pub fn SDL_CalculateGammaRamp(gamma: f32, ramp: *mut Uint16);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_Point {
pub x: winapi::ctypes::c_int,
pub y: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_Point() {
assert_eq!(
::core::mem::size_of::<SDL_Point>(),
8usize,
concat!("Size of: ", stringify!(SDL_Point))
);
assert_eq!(
::core::mem::align_of::<SDL_Point>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Point))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Point>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Point),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Point>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_Point),
"::",
stringify!(y)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_FPoint {
pub x: f32,
pub y: f32,
}
#[test]
fn bindgen_test_layout_SDL_FPoint() {
assert_eq!(
::core::mem::size_of::<SDL_FPoint>(),
8usize,
concat!("Size of: ", stringify!(SDL_FPoint))
);
assert_eq!(
::core::mem::align_of::<SDL_FPoint>(),
4usize,
concat!("Alignment of ", stringify!(SDL_FPoint))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_FPoint>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_FPoint),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_FPoint>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_FPoint),
"::",
stringify!(y)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_Rect {
pub x: winapi::ctypes::c_int,
pub y: winapi::ctypes::c_int,
pub w: winapi::ctypes::c_int,
pub h: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_Rect() {
assert_eq!(
::core::mem::size_of::<SDL_Rect>(),
16usize,
concat!("Size of: ", stringify!(SDL_Rect))
);
assert_eq!(
::core::mem::align_of::<SDL_Rect>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Rect))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Rect>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Rect),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Rect>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_Rect),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Rect>())).w as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_Rect),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Rect>())).h as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_Rect),
"::",
stringify!(h)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_FRect {
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
}
#[test]
fn bindgen_test_layout_SDL_FRect() {
assert_eq!(
::core::mem::size_of::<SDL_FRect>(),
16usize,
concat!("Size of: ", stringify!(SDL_FRect))
);
assert_eq!(
::core::mem::align_of::<SDL_FRect>(),
4usize,
concat!("Alignment of ", stringify!(SDL_FRect))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_FRect>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_FRect),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_FRect>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_FRect),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_FRect>())).w as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_FRect),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_FRect>())).h as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_FRect),
"::",
stringify!(h)
)
);
}
extern "C" {
pub fn SDL_HasIntersection(A: *const SDL_Rect, B: *const SDL_Rect) -> SDL_bool;
}
extern "C" {
pub fn SDL_IntersectRect(
A: *const SDL_Rect,
B: *const SDL_Rect,
result: *mut SDL_Rect,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_UnionRect(A: *const SDL_Rect, B: *const SDL_Rect, result: *mut SDL_Rect);
}
extern "C" {
pub fn SDL_EnclosePoints(
points: *const SDL_Point,
count: winapi::ctypes::c_int,
clip: *const SDL_Rect,
result: *mut SDL_Rect,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_IntersectRectAndLine(
rect: *const SDL_Rect,
X1: *mut winapi::ctypes::c_int,
Y1: *mut winapi::ctypes::c_int,
X2: *mut winapi::ctypes::c_int,
Y2: *mut winapi::ctypes::c_int,
) -> SDL_bool;
}
pub const SDL_BLENDMODE_NONE: SDL_BlendMode = 0;
pub const SDL_BLENDMODE_BLEND: SDL_BlendMode = 1;
pub const SDL_BLENDMODE_ADD: SDL_BlendMode = 2;
pub const SDL_BLENDMODE_MOD: SDL_BlendMode = 4;
pub const SDL_BLENDMODE_INVALID: SDL_BlendMode = 2147483647;
pub type SDL_BlendMode = i32;
pub const SDL_BLENDOPERATION_ADD: SDL_BlendOperation = 1;
pub const SDL_BLENDOPERATION_SUBTRACT: SDL_BlendOperation = 2;
pub const SDL_BLENDOPERATION_REV_SUBTRACT: SDL_BlendOperation = 3;
pub const SDL_BLENDOPERATION_MINIMUM: SDL_BlendOperation = 4;
pub const SDL_BLENDOPERATION_MAXIMUM: SDL_BlendOperation = 5;
pub type SDL_BlendOperation = i32;
pub const SDL_BLENDFACTOR_ZERO: SDL_BlendFactor = 1;
pub const SDL_BLENDFACTOR_ONE: SDL_BlendFactor = 2;
pub const SDL_BLENDFACTOR_SRC_COLOR: SDL_BlendFactor = 3;
pub const SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR: SDL_BlendFactor = 4;
pub const SDL_BLENDFACTOR_SRC_ALPHA: SDL_BlendFactor = 5;
pub const SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA: SDL_BlendFactor = 6;
pub const SDL_BLENDFACTOR_DST_COLOR: SDL_BlendFactor = 7;
pub const SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR: SDL_BlendFactor = 8;
pub const SDL_BLENDFACTOR_DST_ALPHA: SDL_BlendFactor = 9;
pub const SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA: SDL_BlendFactor = 10;
pub type SDL_BlendFactor = i32;
extern "C" {
pub fn SDL_ComposeCustomBlendMode(
srcColorFactor: SDL_BlendFactor,
dstColorFactor: SDL_BlendFactor,
colorOperation: SDL_BlendOperation,
srcAlphaFactor: SDL_BlendFactor,
dstAlphaFactor: SDL_BlendFactor,
alphaOperation: SDL_BlendOperation,
) -> SDL_BlendMode;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_Surface {
pub flags: Uint32,
pub format: *mut SDL_PixelFormat,
pub w: winapi::ctypes::c_int,
pub h: winapi::ctypes::c_int,
pub pitch: winapi::ctypes::c_int,
pub pixels: *mut winapi::ctypes::c_void,
pub userdata: *mut winapi::ctypes::c_void,
pub locked: winapi::ctypes::c_int,
pub lock_data: *mut winapi::ctypes::c_void,
pub clip_rect: SDL_Rect,
pub map: *mut SDL_BlitMap,
pub refcount: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_Surface() {
assert_eq!(
::core::mem::size_of::<SDL_Surface>(),
60usize,
concat!("Size of: ", stringify!(SDL_Surface))
);
assert_eq!(
::core::mem::align_of::<SDL_Surface>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Surface))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).format as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).w as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).h as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).pitch as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(pitch)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).pixels as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(pixels)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).userdata as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(userdata)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).locked as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(locked)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).lock_data as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(lock_data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).clip_rect as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(clip_rect)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).map as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(map)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Surface>())).refcount as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(SDL_Surface),
"::",
stringify!(refcount)
)
);
}
impl Default for SDL_Surface {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type SDL_blit = ::core::option::Option<
unsafe extern "C" fn(
src: *mut SDL_Surface,
srcrect: *mut SDL_Rect,
dst: *mut SDL_Surface,
dstrect: *mut SDL_Rect,
) -> winapi::ctypes::c_int,
>;
pub const SDL_YUV_CONVERSION_JPEG: SDL_YUV_CONVERSION_MODE = 0;
pub const SDL_YUV_CONVERSION_BT601: SDL_YUV_CONVERSION_MODE = 1;
pub const SDL_YUV_CONVERSION_BT709: SDL_YUV_CONVERSION_MODE = 2;
pub const SDL_YUV_CONVERSION_AUTOMATIC: SDL_YUV_CONVERSION_MODE = 3;
pub type SDL_YUV_CONVERSION_MODE = i32;
extern "C" {
pub fn SDL_CreateRGBSurface(
flags: Uint32,
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
depth: winapi::ctypes::c_int,
Rmask: Uint32,
Gmask: Uint32,
Bmask: Uint32,
Amask: Uint32,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_CreateRGBSurfaceWithFormat(
flags: Uint32,
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
depth: winapi::ctypes::c_int,
format: Uint32,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_CreateRGBSurfaceFrom(
pixels: *mut winapi::ctypes::c_void,
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
depth: winapi::ctypes::c_int,
pitch: winapi::ctypes::c_int,
Rmask: Uint32,
Gmask: Uint32,
Bmask: Uint32,
Amask: Uint32,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_CreateRGBSurfaceWithFormatFrom(
pixels: *mut winapi::ctypes::c_void,
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
depth: winapi::ctypes::c_int,
pitch: winapi::ctypes::c_int,
format: Uint32,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_FreeSurface(surface: *mut SDL_Surface);
}
extern "C" {
pub fn SDL_SetSurfacePalette(
surface: *mut SDL_Surface,
palette: *mut SDL_Palette,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_LockSurface(surface: *mut SDL_Surface) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UnlockSurface(surface: *mut SDL_Surface);
}
extern "C" {
pub fn SDL_LoadBMP_RW(src: *mut SDL_RWops, freesrc: winapi::ctypes::c_int) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_SaveBMP_RW(
surface: *mut SDL_Surface,
dst: *mut SDL_RWops,
freedst: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetSurfaceRLE(
surface: *mut SDL_Surface,
flag: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetColorKey(
surface: *mut SDL_Surface,
flag: winapi::ctypes::c_int,
key: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HasColorKey(surface: *mut SDL_Surface) -> SDL_bool;
}
extern "C" {
pub fn SDL_GetColorKey(surface: *mut SDL_Surface, key: *mut Uint32) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetSurfaceColorMod(
surface: *mut SDL_Surface,
r: Uint8,
g: Uint8,
b: Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetSurfaceColorMod(
surface: *mut SDL_Surface,
r: *mut Uint8,
g: *mut Uint8,
b: *mut Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetSurfaceAlphaMod(surface: *mut SDL_Surface, alpha: Uint8) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetSurfaceAlphaMod(
surface: *mut SDL_Surface,
alpha: *mut Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetSurfaceBlendMode(
surface: *mut SDL_Surface,
blendMode: SDL_BlendMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetSurfaceBlendMode(
surface: *mut SDL_Surface,
blendMode: *mut SDL_BlendMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetClipRect(surface: *mut SDL_Surface, rect: *const SDL_Rect) -> SDL_bool;
}
extern "C" {
pub fn SDL_GetClipRect(surface: *mut SDL_Surface, rect: *mut SDL_Rect);
}
extern "C" {
pub fn SDL_DuplicateSurface(surface: *mut SDL_Surface) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_ConvertSurface(
src: *mut SDL_Surface,
fmt: *const SDL_PixelFormat,
flags: Uint32,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_ConvertSurfaceFormat(
src: *mut SDL_Surface,
pixel_format: Uint32,
flags: Uint32,
) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_ConvertPixels(
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
src_format: Uint32,
src: *const winapi::ctypes::c_void,
src_pitch: winapi::ctypes::c_int,
dst_format: Uint32,
dst: *mut winapi::ctypes::c_void,
dst_pitch: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_FillRect(
dst: *mut SDL_Surface,
rect: *const SDL_Rect,
color: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_FillRects(
dst: *mut SDL_Surface,
rects: *const SDL_Rect,
count: winapi::ctypes::c_int,
color: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UpperBlit(
src: *mut SDL_Surface,
srcrect: *const SDL_Rect,
dst: *mut SDL_Surface,
dstrect: *mut SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_LowerBlit(
src: *mut SDL_Surface,
srcrect: *mut SDL_Rect,
dst: *mut SDL_Surface,
dstrect: *mut SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SoftStretch(
src: *mut SDL_Surface,
srcrect: *const SDL_Rect,
dst: *mut SDL_Surface,
dstrect: *const SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UpperBlitScaled(
src: *mut SDL_Surface,
srcrect: *const SDL_Rect,
dst: *mut SDL_Surface,
dstrect: *mut SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_LowerBlitScaled(
src: *mut SDL_Surface,
srcrect: *mut SDL_Rect,
dst: *mut SDL_Surface,
dstrect: *mut SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetYUVConversionMode(mode: SDL_YUV_CONVERSION_MODE);
}
extern "C" {
pub fn SDL_GetYUVConversionMode() -> SDL_YUV_CONVERSION_MODE;
}
extern "C" {
pub fn SDL_GetYUVConversionModeForResolution(
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
) -> SDL_YUV_CONVERSION_MODE;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_DisplayMode {
pub format: Uint32,
pub w: winapi::ctypes::c_int,
pub h: winapi::ctypes::c_int,
pub refresh_rate: winapi::ctypes::c_int,
pub driverdata: *mut winapi::ctypes::c_void,
}
#[test]
fn bindgen_test_layout_SDL_DisplayMode() {
assert_eq!(
::core::mem::size_of::<SDL_DisplayMode>(),
20usize,
concat!("Size of: ", stringify!(SDL_DisplayMode))
);
assert_eq!(
::core::mem::align_of::<SDL_DisplayMode>(),
4usize,
concat!("Alignment of ", stringify!(SDL_DisplayMode))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayMode>())).format as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayMode),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayMode>())).w as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayMode),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayMode>())).h as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayMode),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayMode>())).refresh_rate as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayMode),
"::",
stringify!(refresh_rate)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayMode>())).driverdata as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayMode),
"::",
stringify!(driverdata)
)
);
}
impl Default for SDL_DisplayMode {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_Window {
_unused: [u8; 0],
}
pub const SDL_WINDOW_FULLSCREEN: SDL_WindowFlags = 1;
pub const SDL_WINDOW_OPENGL: SDL_WindowFlags = 2;
pub const SDL_WINDOW_SHOWN: SDL_WindowFlags = 4;
pub const SDL_WINDOW_HIDDEN: SDL_WindowFlags = 8;
pub const SDL_WINDOW_BORDERLESS: SDL_WindowFlags = 16;
pub const SDL_WINDOW_RESIZABLE: SDL_WindowFlags = 32;
pub const SDL_WINDOW_MINIMIZED: SDL_WindowFlags = 64;
pub const SDL_WINDOW_MAXIMIZED: SDL_WindowFlags = 128;
pub const SDL_WINDOW_INPUT_GRABBED: SDL_WindowFlags = 256;
pub const SDL_WINDOW_INPUT_FOCUS: SDL_WindowFlags = 512;
pub const SDL_WINDOW_MOUSE_FOCUS: SDL_WindowFlags = 1024;
pub const SDL_WINDOW_FULLSCREEN_DESKTOP: SDL_WindowFlags = 4097;
pub const SDL_WINDOW_FOREIGN: SDL_WindowFlags = 2048;
pub const SDL_WINDOW_ALLOW_HIGHDPI: SDL_WindowFlags = 8192;
pub const SDL_WINDOW_MOUSE_CAPTURE: SDL_WindowFlags = 16384;
pub const SDL_WINDOW_ALWAYS_ON_TOP: SDL_WindowFlags = 32768;
pub const SDL_WINDOW_SKIP_TASKBAR: SDL_WindowFlags = 65536;
pub const SDL_WINDOW_UTILITY: SDL_WindowFlags = 131072;
pub const SDL_WINDOW_TOOLTIP: SDL_WindowFlags = 262144;
pub const SDL_WINDOW_POPUP_MENU: SDL_WindowFlags = 524288;
pub const SDL_WINDOW_VULKAN: SDL_WindowFlags = 268435456;
pub type SDL_WindowFlags = i32;
pub const SDL_WINDOWEVENT_NONE: SDL_WindowEventID = 0;
pub const SDL_WINDOWEVENT_SHOWN: SDL_WindowEventID = 1;
pub const SDL_WINDOWEVENT_HIDDEN: SDL_WindowEventID = 2;
pub const SDL_WINDOWEVENT_EXPOSED: SDL_WindowEventID = 3;
pub const SDL_WINDOWEVENT_MOVED: SDL_WindowEventID = 4;
pub const SDL_WINDOWEVENT_RESIZED: SDL_WindowEventID = 5;
pub const SDL_WINDOWEVENT_SIZE_CHANGED: SDL_WindowEventID = 6;
pub const SDL_WINDOWEVENT_MINIMIZED: SDL_WindowEventID = 7;
pub const SDL_WINDOWEVENT_MAXIMIZED: SDL_WindowEventID = 8;
pub const SDL_WINDOWEVENT_RESTORED: SDL_WindowEventID = 9;
pub const SDL_WINDOWEVENT_ENTER: SDL_WindowEventID = 10;
pub const SDL_WINDOWEVENT_LEAVE: SDL_WindowEventID = 11;
pub const SDL_WINDOWEVENT_FOCUS_GAINED: SDL_WindowEventID = 12;
pub const SDL_WINDOWEVENT_FOCUS_LOST: SDL_WindowEventID = 13;
pub const SDL_WINDOWEVENT_CLOSE: SDL_WindowEventID = 14;
pub const SDL_WINDOWEVENT_TAKE_FOCUS: SDL_WindowEventID = 15;
pub const SDL_WINDOWEVENT_HIT_TEST: SDL_WindowEventID = 16;
pub type SDL_WindowEventID = i32;
pub const SDL_DISPLAYEVENT_NONE: SDL_DisplayEventID = 0;
pub const SDL_DISPLAYEVENT_ORIENTATION: SDL_DisplayEventID = 1;
pub type SDL_DisplayEventID = i32;
pub const SDL_ORIENTATION_UNKNOWN: SDL_DisplayOrientation = 0;
pub const SDL_ORIENTATION_LANDSCAPE: SDL_DisplayOrientation = 1;
pub const SDL_ORIENTATION_LANDSCAPE_FLIPPED: SDL_DisplayOrientation = 2;
pub const SDL_ORIENTATION_PORTRAIT: SDL_DisplayOrientation = 3;
pub const SDL_ORIENTATION_PORTRAIT_FLIPPED: SDL_DisplayOrientation = 4;
pub type SDL_DisplayOrientation = i32;
pub type SDL_GLContext = *mut winapi::ctypes::c_void;
pub const SDL_GL_RED_SIZE: SDL_GLattr = 0;
pub const SDL_GL_GREEN_SIZE: SDL_GLattr = 1;
pub const SDL_GL_BLUE_SIZE: SDL_GLattr = 2;
pub const SDL_GL_ALPHA_SIZE: SDL_GLattr = 3;
pub const SDL_GL_BUFFER_SIZE: SDL_GLattr = 4;
pub const SDL_GL_DOUBLEBUFFER: SDL_GLattr = 5;
pub const SDL_GL_DEPTH_SIZE: SDL_GLattr = 6;
pub const SDL_GL_STENCIL_SIZE: SDL_GLattr = 7;
pub const SDL_GL_ACCUM_RED_SIZE: SDL_GLattr = 8;
pub const SDL_GL_ACCUM_GREEN_SIZE: SDL_GLattr = 9;
pub const SDL_GL_ACCUM_BLUE_SIZE: SDL_GLattr = 10;
pub const SDL_GL_ACCUM_ALPHA_SIZE: SDL_GLattr = 11;
pub const SDL_GL_STEREO: SDL_GLattr = 12;
pub const SDL_GL_MULTISAMPLEBUFFERS: SDL_GLattr = 13;
pub const SDL_GL_MULTISAMPLESAMPLES: SDL_GLattr = 14;
pub const SDL_GL_ACCELERATED_VISUAL: SDL_GLattr = 15;
pub const SDL_GL_RETAINED_BACKING: SDL_GLattr = 16;
pub const SDL_GL_CONTEXT_MAJOR_VERSION: SDL_GLattr = 17;
pub const SDL_GL_CONTEXT_MINOR_VERSION: SDL_GLattr = 18;
pub const SDL_GL_CONTEXT_EGL: SDL_GLattr = 19;
pub const SDL_GL_CONTEXT_FLAGS: SDL_GLattr = 20;
pub const SDL_GL_CONTEXT_PROFILE_MASK: SDL_GLattr = 21;
pub const SDL_GL_SHARE_WITH_CURRENT_CONTEXT: SDL_GLattr = 22;
pub const SDL_GL_FRAMEBUFFER_SRGB_CAPABLE: SDL_GLattr = 23;
pub const SDL_GL_CONTEXT_RELEASE_BEHAVIOR: SDL_GLattr = 24;
pub const SDL_GL_CONTEXT_RESET_NOTIFICATION: SDL_GLattr = 25;
pub const SDL_GL_CONTEXT_NO_ERROR: SDL_GLattr = 26;
pub type SDL_GLattr = i32;
pub const SDL_GL_CONTEXT_PROFILE_CORE: SDL_GLprofile = 1;
pub const SDL_GL_CONTEXT_PROFILE_COMPATIBILITY: SDL_GLprofile = 2;
pub const SDL_GL_CONTEXT_PROFILE_ES: SDL_GLprofile = 4;
pub type SDL_GLprofile = i32;
pub const SDL_GL_CONTEXT_DEBUG_FLAG: SDL_GLcontextFlag = 1;
pub const SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG: SDL_GLcontextFlag = 2;
pub const SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG: SDL_GLcontextFlag = 4;
pub const SDL_GL_CONTEXT_RESET_ISOLATION_FLAG: SDL_GLcontextFlag = 8;
pub type SDL_GLcontextFlag = i32;
pub const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE: SDL_GLcontextReleaseFlag = 0;
pub const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH: SDL_GLcontextReleaseFlag = 1;
pub type SDL_GLcontextReleaseFlag = i32;
pub const SDL_GL_CONTEXT_RESET_NO_NOTIFICATION: SDL_GLContextResetNotification = 0;
pub const SDL_GL_CONTEXT_RESET_LOSE_CONTEXT: SDL_GLContextResetNotification = 1;
pub type SDL_GLContextResetNotification = i32;
extern "C" {
pub fn SDL_GetNumVideoDrivers() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetVideoDriver(index: winapi::ctypes::c_int) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_VideoInit(driver_name: *const winapi::ctypes::c_char) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_VideoQuit();
}
extern "C" {
pub fn SDL_GetCurrentVideoDriver() -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetNumVideoDisplays() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetDisplayName(displayIndex: winapi::ctypes::c_int) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetDisplayBounds(
displayIndex: winapi::ctypes::c_int,
rect: *mut SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetDisplayUsableBounds(
displayIndex: winapi::ctypes::c_int,
rect: *mut SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetDisplayDPI(
displayIndex: winapi::ctypes::c_int,
ddpi: *mut f32,
hdpi: *mut f32,
vdpi: *mut f32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetDisplayOrientation(displayIndex: winapi::ctypes::c_int) -> SDL_DisplayOrientation;
}
extern "C" {
pub fn SDL_GetNumDisplayModes(displayIndex: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetDisplayMode(
displayIndex: winapi::ctypes::c_int,
modeIndex: winapi::ctypes::c_int,
mode: *mut SDL_DisplayMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetDesktopDisplayMode(
displayIndex: winapi::ctypes::c_int,
mode: *mut SDL_DisplayMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetCurrentDisplayMode(
displayIndex: winapi::ctypes::c_int,
mode: *mut SDL_DisplayMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetClosestDisplayMode(
displayIndex: winapi::ctypes::c_int,
mode: *const SDL_DisplayMode,
closest: *mut SDL_DisplayMode,
) -> *mut SDL_DisplayMode;
}
extern "C" {
pub fn SDL_GetWindowDisplayIndex(window: *mut SDL_Window) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetWindowDisplayMode(
window: *mut SDL_Window,
mode: *const SDL_DisplayMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetWindowDisplayMode(
window: *mut SDL_Window,
mode: *mut SDL_DisplayMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetWindowPixelFormat(window: *mut SDL_Window) -> Uint32;
}
extern "C" {
pub fn SDL_CreateWindow(
title: *const winapi::ctypes::c_char,
x: winapi::ctypes::c_int,
y: winapi::ctypes::c_int,
w: winapi::ctypes::c_int,
h: winapi::ctypes::c_int,
flags: Uint32,
) -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_CreateWindowFrom(data: *const winapi::ctypes::c_void) -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_GetWindowID(window: *mut SDL_Window) -> Uint32;
}
extern "C" {
pub fn SDL_GetWindowFromID(id: Uint32) -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_GetWindowFlags(window: *mut SDL_Window) -> Uint32;
}
extern "C" {
pub fn SDL_SetWindowTitle(window: *mut SDL_Window, title: *const winapi::ctypes::c_char);
}
extern "C" {
pub fn SDL_GetWindowTitle(window: *mut SDL_Window) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_SetWindowIcon(window: *mut SDL_Window, icon: *mut SDL_Surface);
}
extern "C" {
pub fn SDL_SetWindowData(
window: *mut SDL_Window,
name: *const winapi::ctypes::c_char,
userdata: *mut winapi::ctypes::c_void,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_GetWindowData(
window: *mut SDL_Window,
name: *const winapi::ctypes::c_char,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_SetWindowPosition(
window: *mut SDL_Window,
x: winapi::ctypes::c_int,
y: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_GetWindowPosition(
window: *mut SDL_Window,
x: *mut winapi::ctypes::c_int,
y: *mut winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_SetWindowSize(
window: *mut SDL_Window,
w: winapi::ctypes::c_int,
h: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_GetWindowSize(
window: *mut SDL_Window,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_GetWindowBordersSize(
window: *mut SDL_Window,
top: *mut winapi::ctypes::c_int,
left: *mut winapi::ctypes::c_int,
bottom: *mut winapi::ctypes::c_int,
right: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetWindowMinimumSize(
window: *mut SDL_Window,
min_w: winapi::ctypes::c_int,
min_h: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_GetWindowMinimumSize(
window: *mut SDL_Window,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_SetWindowMaximumSize(
window: *mut SDL_Window,
max_w: winapi::ctypes::c_int,
max_h: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_GetWindowMaximumSize(
window: *mut SDL_Window,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_SetWindowBordered(window: *mut SDL_Window, bordered: SDL_bool);
}
extern "C" {
pub fn SDL_SetWindowResizable(window: *mut SDL_Window, resizable: SDL_bool);
}
extern "C" {
pub fn SDL_ShowWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_HideWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_RaiseWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_MaximizeWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_MinimizeWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_RestoreWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_SetWindowFullscreen(window: *mut SDL_Window, flags: Uint32) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetWindowSurface(window: *mut SDL_Window) -> *mut SDL_Surface;
}
extern "C" {
pub fn SDL_UpdateWindowSurface(window: *mut SDL_Window) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UpdateWindowSurfaceRects(
window: *mut SDL_Window,
rects: *const SDL_Rect,
numrects: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetWindowGrab(window: *mut SDL_Window, grabbed: SDL_bool);
}
extern "C" {
pub fn SDL_GetWindowGrab(window: *mut SDL_Window) -> SDL_bool;
}
extern "C" {
pub fn SDL_GetGrabbedWindow() -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_SetWindowBrightness(window: *mut SDL_Window, brightness: f32)
-> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetWindowBrightness(window: *mut SDL_Window) -> f32;
}
extern "C" {
pub fn SDL_SetWindowOpacity(window: *mut SDL_Window, opacity: f32) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetWindowOpacity(
window: *mut SDL_Window,
out_opacity: *mut f32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetWindowModalFor(
modal_window: *mut SDL_Window,
parent_window: *mut SDL_Window,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetWindowInputFocus(window: *mut SDL_Window) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetWindowGammaRamp(
window: *mut SDL_Window,
red: *const Uint16,
green: *const Uint16,
blue: *const Uint16,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetWindowGammaRamp(
window: *mut SDL_Window,
red: *mut Uint16,
green: *mut Uint16,
blue: *mut Uint16,
) -> winapi::ctypes::c_int;
}
pub const SDL_HITTEST_NORMAL: SDL_HitTestResult = 0;
pub const SDL_HITTEST_DRAGGABLE: SDL_HitTestResult = 1;
pub const SDL_HITTEST_RESIZE_TOPLEFT: SDL_HitTestResult = 2;
pub const SDL_HITTEST_RESIZE_TOP: SDL_HitTestResult = 3;
pub const SDL_HITTEST_RESIZE_TOPRIGHT: SDL_HitTestResult = 4;
pub const SDL_HITTEST_RESIZE_RIGHT: SDL_HitTestResult = 5;
pub const SDL_HITTEST_RESIZE_BOTTOMRIGHT: SDL_HitTestResult = 6;
pub const SDL_HITTEST_RESIZE_BOTTOM: SDL_HitTestResult = 7;
pub const SDL_HITTEST_RESIZE_BOTTOMLEFT: SDL_HitTestResult = 8;
pub const SDL_HITTEST_RESIZE_LEFT: SDL_HitTestResult = 9;
pub type SDL_HitTestResult = i32;
pub type SDL_HitTest = ::core::option::Option<
unsafe extern "C" fn(
win: *mut SDL_Window,
area: *const SDL_Point,
data: *mut winapi::ctypes::c_void,
) -> SDL_HitTestResult,
>;
extern "C" {
pub fn SDL_SetWindowHitTest(
window: *mut SDL_Window,
callback: SDL_HitTest,
callback_data: *mut winapi::ctypes::c_void,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_DestroyWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_IsScreenSaverEnabled() -> SDL_bool;
}
extern "C" {
pub fn SDL_EnableScreenSaver();
}
extern "C" {
pub fn SDL_DisableScreenSaver();
}
extern "C" {
pub fn SDL_GL_LoadLibrary(path: *const winapi::ctypes::c_char) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_GetProcAddress(proc_: *const winapi::ctypes::c_char)
-> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_GL_UnloadLibrary();
}
extern "C" {
pub fn SDL_GL_ExtensionSupported(extension: *const winapi::ctypes::c_char) -> SDL_bool;
}
extern "C" {
pub fn SDL_GL_ResetAttributes();
}
extern "C" {
pub fn SDL_GL_SetAttribute(
attr: SDL_GLattr,
value: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_GetAttribute(
attr: SDL_GLattr,
value: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_CreateContext(window: *mut SDL_Window) -> SDL_GLContext;
}
extern "C" {
pub fn SDL_GL_MakeCurrent(
window: *mut SDL_Window,
context: SDL_GLContext,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_GetCurrentWindow() -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_GL_GetCurrentContext() -> SDL_GLContext;
}
extern "C" {
pub fn SDL_GL_GetDrawableSize(
window: *mut SDL_Window,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_GL_SetSwapInterval(interval: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_GetSwapInterval() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_SwapWindow(window: *mut SDL_Window);
}
extern "C" {
pub fn SDL_GL_DeleteContext(context: SDL_GLContext);
}
pub const SDL_SCANCODE_UNKNOWN: SDL_Scancode = 0;
pub const SDL_SCANCODE_A: SDL_Scancode = 4;
pub const SDL_SCANCODE_B: SDL_Scancode = 5;
pub const SDL_SCANCODE_C: SDL_Scancode = 6;
pub const SDL_SCANCODE_D: SDL_Scancode = 7;
pub const SDL_SCANCODE_E: SDL_Scancode = 8;
pub const SDL_SCANCODE_F: SDL_Scancode = 9;
pub const SDL_SCANCODE_G: SDL_Scancode = 10;
pub const SDL_SCANCODE_H: SDL_Scancode = 11;
pub const SDL_SCANCODE_I: SDL_Scancode = 12;
pub const SDL_SCANCODE_J: SDL_Scancode = 13;
pub const SDL_SCANCODE_K: SDL_Scancode = 14;
pub const SDL_SCANCODE_L: SDL_Scancode = 15;
pub const SDL_SCANCODE_M: SDL_Scancode = 16;
pub const SDL_SCANCODE_N: SDL_Scancode = 17;
pub const SDL_SCANCODE_O: SDL_Scancode = 18;
pub const SDL_SCANCODE_P: SDL_Scancode = 19;
pub const SDL_SCANCODE_Q: SDL_Scancode = 20;
pub const SDL_SCANCODE_R: SDL_Scancode = 21;
pub const SDL_SCANCODE_S: SDL_Scancode = 22;
pub const SDL_SCANCODE_T: SDL_Scancode = 23;
pub const SDL_SCANCODE_U: SDL_Scancode = 24;
pub const SDL_SCANCODE_V: SDL_Scancode = 25;
pub const SDL_SCANCODE_W: SDL_Scancode = 26;
pub const SDL_SCANCODE_X: SDL_Scancode = 27;
pub const SDL_SCANCODE_Y: SDL_Scancode = 28;
pub const SDL_SCANCODE_Z: SDL_Scancode = 29;
pub const SDL_SCANCODE_1: SDL_Scancode = 30;
pub const SDL_SCANCODE_2: SDL_Scancode = 31;
pub const SDL_SCANCODE_3: SDL_Scancode = 32;
pub const SDL_SCANCODE_4: SDL_Scancode = 33;
pub const SDL_SCANCODE_5: SDL_Scancode = 34;
pub const SDL_SCANCODE_6: SDL_Scancode = 35;
pub const SDL_SCANCODE_7: SDL_Scancode = 36;
pub const SDL_SCANCODE_8: SDL_Scancode = 37;
pub const SDL_SCANCODE_9: SDL_Scancode = 38;
pub const SDL_SCANCODE_0: SDL_Scancode = 39;
pub const SDL_SCANCODE_RETURN: SDL_Scancode = 40;
pub const SDL_SCANCODE_ESCAPE: SDL_Scancode = 41;
pub const SDL_SCANCODE_BACKSPACE: SDL_Scancode = 42;
pub const SDL_SCANCODE_TAB: SDL_Scancode = 43;
pub const SDL_SCANCODE_SPACE: SDL_Scancode = 44;
pub const SDL_SCANCODE_MINUS: SDL_Scancode = 45;
pub const SDL_SCANCODE_EQUALS: SDL_Scancode = 46;
pub const SDL_SCANCODE_LEFTBRACKET: SDL_Scancode = 47;
pub const SDL_SCANCODE_RIGHTBRACKET: SDL_Scancode = 48;
pub const SDL_SCANCODE_BACKSLASH: SDL_Scancode = 49;
pub const SDL_SCANCODE_NONUSHASH: SDL_Scancode = 50;
pub const SDL_SCANCODE_SEMICOLON: SDL_Scancode = 51;
pub const SDL_SCANCODE_APOSTROPHE: SDL_Scancode = 52;
pub const SDL_SCANCODE_GRAVE: SDL_Scancode = 53;
pub const SDL_SCANCODE_COMMA: SDL_Scancode = 54;
pub const SDL_SCANCODE_PERIOD: SDL_Scancode = 55;
pub const SDL_SCANCODE_SLASH: SDL_Scancode = 56;
pub const SDL_SCANCODE_CAPSLOCK: SDL_Scancode = 57;
pub const SDL_SCANCODE_F1: SDL_Scancode = 58;
pub const SDL_SCANCODE_F2: SDL_Scancode = 59;
pub const SDL_SCANCODE_F3: SDL_Scancode = 60;
pub const SDL_SCANCODE_F4: SDL_Scancode = 61;
pub const SDL_SCANCODE_F5: SDL_Scancode = 62;
pub const SDL_SCANCODE_F6: SDL_Scancode = 63;
pub const SDL_SCANCODE_F7: SDL_Scancode = 64;
pub const SDL_SCANCODE_F8: SDL_Scancode = 65;
pub const SDL_SCANCODE_F9: SDL_Scancode = 66;
pub const SDL_SCANCODE_F10: SDL_Scancode = 67;
pub const SDL_SCANCODE_F11: SDL_Scancode = 68;
pub const SDL_SCANCODE_F12: SDL_Scancode = 69;
pub const SDL_SCANCODE_PRINTSCREEN: SDL_Scancode = 70;
pub const SDL_SCANCODE_SCROLLLOCK: SDL_Scancode = 71;
pub const SDL_SCANCODE_PAUSE: SDL_Scancode = 72;
pub const SDL_SCANCODE_INSERT: SDL_Scancode = 73;
pub const SDL_SCANCODE_HOME: SDL_Scancode = 74;
pub const SDL_SCANCODE_PAGEUP: SDL_Scancode = 75;
pub const SDL_SCANCODE_DELETE: SDL_Scancode = 76;
pub const SDL_SCANCODE_END: SDL_Scancode = 77;
pub const SDL_SCANCODE_PAGEDOWN: SDL_Scancode = 78;
pub const SDL_SCANCODE_RIGHT: SDL_Scancode = 79;
pub const SDL_SCANCODE_LEFT: SDL_Scancode = 80;
pub const SDL_SCANCODE_DOWN: SDL_Scancode = 81;
pub const SDL_SCANCODE_UP: SDL_Scancode = 82;
pub const SDL_SCANCODE_NUMLOCKCLEAR: SDL_Scancode = 83;
pub const SDL_SCANCODE_KP_DIVIDE: SDL_Scancode = 84;
pub const SDL_SCANCODE_KP_MULTIPLY: SDL_Scancode = 85;
pub const SDL_SCANCODE_KP_MINUS: SDL_Scancode = 86;
pub const SDL_SCANCODE_KP_PLUS: SDL_Scancode = 87;
pub const SDL_SCANCODE_KP_ENTER: SDL_Scancode = 88;
pub const SDL_SCANCODE_KP_1: SDL_Scancode = 89;
pub const SDL_SCANCODE_KP_2: SDL_Scancode = 90;
pub const SDL_SCANCODE_KP_3: SDL_Scancode = 91;
pub const SDL_SCANCODE_KP_4: SDL_Scancode = 92;
pub const SDL_SCANCODE_KP_5: SDL_Scancode = 93;
pub const SDL_SCANCODE_KP_6: SDL_Scancode = 94;
pub const SDL_SCANCODE_KP_7: SDL_Scancode = 95;
pub const SDL_SCANCODE_KP_8: SDL_Scancode = 96;
pub const SDL_SCANCODE_KP_9: SDL_Scancode = 97;
pub const SDL_SCANCODE_KP_0: SDL_Scancode = 98;
pub const SDL_SCANCODE_KP_PERIOD: SDL_Scancode = 99;
pub const SDL_SCANCODE_NONUSBACKSLASH: SDL_Scancode = 100;
pub const SDL_SCANCODE_APPLICATION: SDL_Scancode = 101;
pub const SDL_SCANCODE_POWER: SDL_Scancode = 102;
pub const SDL_SCANCODE_KP_EQUALS: SDL_Scancode = 103;
pub const SDL_SCANCODE_F13: SDL_Scancode = 104;
pub const SDL_SCANCODE_F14: SDL_Scancode = 105;
pub const SDL_SCANCODE_F15: SDL_Scancode = 106;
pub const SDL_SCANCODE_F16: SDL_Scancode = 107;
pub const SDL_SCANCODE_F17: SDL_Scancode = 108;
pub const SDL_SCANCODE_F18: SDL_Scancode = 109;
pub const SDL_SCANCODE_F19: SDL_Scancode = 110;
pub const SDL_SCANCODE_F20: SDL_Scancode = 111;
pub const SDL_SCANCODE_F21: SDL_Scancode = 112;
pub const SDL_SCANCODE_F22: SDL_Scancode = 113;
pub const SDL_SCANCODE_F23: SDL_Scancode = 114;
pub const SDL_SCANCODE_F24: SDL_Scancode = 115;
pub const SDL_SCANCODE_EXECUTE: SDL_Scancode = 116;
pub const SDL_SCANCODE_HELP: SDL_Scancode = 117;
pub const SDL_SCANCODE_MENU: SDL_Scancode = 118;
pub const SDL_SCANCODE_SELECT: SDL_Scancode = 119;
pub const SDL_SCANCODE_STOP: SDL_Scancode = 120;
pub const SDL_SCANCODE_AGAIN: SDL_Scancode = 121;
pub const SDL_SCANCODE_UNDO: SDL_Scancode = 122;
pub const SDL_SCANCODE_CUT: SDL_Scancode = 123;
pub const SDL_SCANCODE_COPY: SDL_Scancode = 124;
pub const SDL_SCANCODE_PASTE: SDL_Scancode = 125;
pub const SDL_SCANCODE_FIND: SDL_Scancode = 126;
pub const SDL_SCANCODE_MUTE: SDL_Scancode = 127;
pub const SDL_SCANCODE_VOLUMEUP: SDL_Scancode = 128;
pub const SDL_SCANCODE_VOLUMEDOWN: SDL_Scancode = 129;
pub const SDL_SCANCODE_KP_COMMA: SDL_Scancode = 133;
pub const SDL_SCANCODE_KP_EQUALSAS400: SDL_Scancode = 134;
pub const SDL_SCANCODE_INTERNATIONAL1: SDL_Scancode = 135;
pub const SDL_SCANCODE_INTERNATIONAL2: SDL_Scancode = 136;
pub const SDL_SCANCODE_INTERNATIONAL3: SDL_Scancode = 137;
pub const SDL_SCANCODE_INTERNATIONAL4: SDL_Scancode = 138;
pub const SDL_SCANCODE_INTERNATIONAL5: SDL_Scancode = 139;
pub const SDL_SCANCODE_INTERNATIONAL6: SDL_Scancode = 140;
pub const SDL_SCANCODE_INTERNATIONAL7: SDL_Scancode = 141;
pub const SDL_SCANCODE_INTERNATIONAL8: SDL_Scancode = 142;
pub const SDL_SCANCODE_INTERNATIONAL9: SDL_Scancode = 143;
pub const SDL_SCANCODE_LANG1: SDL_Scancode = 144;
pub const SDL_SCANCODE_LANG2: SDL_Scancode = 145;
pub const SDL_SCANCODE_LANG3: SDL_Scancode = 146;
pub const SDL_SCANCODE_LANG4: SDL_Scancode = 147;
pub const SDL_SCANCODE_LANG5: SDL_Scancode = 148;
pub const SDL_SCANCODE_LANG6: SDL_Scancode = 149;
pub const SDL_SCANCODE_LANG7: SDL_Scancode = 150;
pub const SDL_SCANCODE_LANG8: SDL_Scancode = 151;
pub const SDL_SCANCODE_LANG9: SDL_Scancode = 152;
pub const SDL_SCANCODE_ALTERASE: SDL_Scancode = 153;
pub const SDL_SCANCODE_SYSREQ: SDL_Scancode = 154;
pub const SDL_SCANCODE_CANCEL: SDL_Scancode = 155;
pub const SDL_SCANCODE_CLEAR: SDL_Scancode = 156;
pub const SDL_SCANCODE_PRIOR: SDL_Scancode = 157;
pub const SDL_SCANCODE_RETURN2: SDL_Scancode = 158;
pub const SDL_SCANCODE_SEPARATOR: SDL_Scancode = 159;
pub const SDL_SCANCODE_OUT: SDL_Scancode = 160;
pub const SDL_SCANCODE_OPER: SDL_Scancode = 161;
pub const SDL_SCANCODE_CLEARAGAIN: SDL_Scancode = 162;
pub const SDL_SCANCODE_CRSEL: SDL_Scancode = 163;
pub const SDL_SCANCODE_EXSEL: SDL_Scancode = 164;
pub const SDL_SCANCODE_KP_00: SDL_Scancode = 176;
pub const SDL_SCANCODE_KP_000: SDL_Scancode = 177;
pub const SDL_SCANCODE_THOUSANDSSEPARATOR: SDL_Scancode = 178;
pub const SDL_SCANCODE_DECIMALSEPARATOR: SDL_Scancode = 179;
pub const SDL_SCANCODE_CURRENCYUNIT: SDL_Scancode = 180;
pub const SDL_SCANCODE_CURRENCYSUBUNIT: SDL_Scancode = 181;
pub const SDL_SCANCODE_KP_LEFTPAREN: SDL_Scancode = 182;
pub const SDL_SCANCODE_KP_RIGHTPAREN: SDL_Scancode = 183;
pub const SDL_SCANCODE_KP_LEFTBRACE: SDL_Scancode = 184;
pub const SDL_SCANCODE_KP_RIGHTBRACE: SDL_Scancode = 185;
pub const SDL_SCANCODE_KP_TAB: SDL_Scancode = 186;
pub const SDL_SCANCODE_KP_BACKSPACE: SDL_Scancode = 187;
pub const SDL_SCANCODE_KP_A: SDL_Scancode = 188;
pub const SDL_SCANCODE_KP_B: SDL_Scancode = 189;
pub const SDL_SCANCODE_KP_C: SDL_Scancode = 190;
pub const SDL_SCANCODE_KP_D: SDL_Scancode = 191;
pub const SDL_SCANCODE_KP_E: SDL_Scancode = 192;
pub const SDL_SCANCODE_KP_F: SDL_Scancode = 193;
pub const SDL_SCANCODE_KP_XOR: SDL_Scancode = 194;
pub const SDL_SCANCODE_KP_POWER: SDL_Scancode = 195;
pub const SDL_SCANCODE_KP_PERCENT: SDL_Scancode = 196;
pub const SDL_SCANCODE_KP_LESS: SDL_Scancode = 197;
pub const SDL_SCANCODE_KP_GREATER: SDL_Scancode = 198;
pub const SDL_SCANCODE_KP_AMPERSAND: SDL_Scancode = 199;
pub const SDL_SCANCODE_KP_DBLAMPERSAND: SDL_Scancode = 200;
pub const SDL_SCANCODE_KP_VERTICALBAR: SDL_Scancode = 201;
pub const SDL_SCANCODE_KP_DBLVERTICALBAR: SDL_Scancode = 202;
pub const SDL_SCANCODE_KP_COLON: SDL_Scancode = 203;
pub const SDL_SCANCODE_KP_HASH: SDL_Scancode = 204;
pub const SDL_SCANCODE_KP_SPACE: SDL_Scancode = 205;
pub const SDL_SCANCODE_KP_AT: SDL_Scancode = 206;
pub const SDL_SCANCODE_KP_EXCLAM: SDL_Scancode = 207;
pub const SDL_SCANCODE_KP_MEMSTORE: SDL_Scancode = 208;
pub const SDL_SCANCODE_KP_MEMRECALL: SDL_Scancode = 209;
pub const SDL_SCANCODE_KP_MEMCLEAR: SDL_Scancode = 210;
pub const SDL_SCANCODE_KP_MEMADD: SDL_Scancode = 211;
pub const SDL_SCANCODE_KP_MEMSUBTRACT: SDL_Scancode = 212;
pub const SDL_SCANCODE_KP_MEMMULTIPLY: SDL_Scancode = 213;
pub const SDL_SCANCODE_KP_MEMDIVIDE: SDL_Scancode = 214;
pub const SDL_SCANCODE_KP_PLUSMINUS: SDL_Scancode = 215;
pub const SDL_SCANCODE_KP_CLEAR: SDL_Scancode = 216;
pub const SDL_SCANCODE_KP_CLEARENTRY: SDL_Scancode = 217;
pub const SDL_SCANCODE_KP_BINARY: SDL_Scancode = 218;
pub const SDL_SCANCODE_KP_OCTAL: SDL_Scancode = 219;
pub const SDL_SCANCODE_KP_DECIMAL: SDL_Scancode = 220;
pub const SDL_SCANCODE_KP_HEXADECIMAL: SDL_Scancode = 221;
pub const SDL_SCANCODE_LCTRL: SDL_Scancode = 224;
pub const SDL_SCANCODE_LSHIFT: SDL_Scancode = 225;
pub const SDL_SCANCODE_LALT: SDL_Scancode = 226;
pub const SDL_SCANCODE_LGUI: SDL_Scancode = 227;
pub const SDL_SCANCODE_RCTRL: SDL_Scancode = 228;
pub const SDL_SCANCODE_RSHIFT: SDL_Scancode = 229;
pub const SDL_SCANCODE_RALT: SDL_Scancode = 230;
pub const SDL_SCANCODE_RGUI: SDL_Scancode = 231;
pub const SDL_SCANCODE_MODE: SDL_Scancode = 257;
pub const SDL_SCANCODE_AUDIONEXT: SDL_Scancode = 258;
pub const SDL_SCANCODE_AUDIOPREV: SDL_Scancode = 259;
pub const SDL_SCANCODE_AUDIOSTOP: SDL_Scancode = 260;
pub const SDL_SCANCODE_AUDIOPLAY: SDL_Scancode = 261;
pub const SDL_SCANCODE_AUDIOMUTE: SDL_Scancode = 262;
pub const SDL_SCANCODE_MEDIASELECT: SDL_Scancode = 263;
pub const SDL_SCANCODE_WWW: SDL_Scancode = 264;
pub const SDL_SCANCODE_MAIL: SDL_Scancode = 265;
pub const SDL_SCANCODE_CALCULATOR: SDL_Scancode = 266;
pub const SDL_SCANCODE_COMPUTER: SDL_Scancode = 267;
pub const SDL_SCANCODE_AC_SEARCH: SDL_Scancode = 268;
pub const SDL_SCANCODE_AC_HOME: SDL_Scancode = 269;
pub const SDL_SCANCODE_AC_BACK: SDL_Scancode = 270;
pub const SDL_SCANCODE_AC_FORWARD: SDL_Scancode = 271;
pub const SDL_SCANCODE_AC_STOP: SDL_Scancode = 272;
pub const SDL_SCANCODE_AC_REFRESH: SDL_Scancode = 273;
pub const SDL_SCANCODE_AC_BOOKMARKS: SDL_Scancode = 274;
pub const SDL_SCANCODE_BRIGHTNESSDOWN: SDL_Scancode = 275;
pub const SDL_SCANCODE_BRIGHTNESSUP: SDL_Scancode = 276;
pub const SDL_SCANCODE_DISPLAYSWITCH: SDL_Scancode = 277;
pub const SDL_SCANCODE_KBDILLUMTOGGLE: SDL_Scancode = 278;
pub const SDL_SCANCODE_KBDILLUMDOWN: SDL_Scancode = 279;
pub const SDL_SCANCODE_KBDILLUMUP: SDL_Scancode = 280;
pub const SDL_SCANCODE_EJECT: SDL_Scancode = 281;
pub const SDL_SCANCODE_SLEEP: SDL_Scancode = 282;
pub const SDL_SCANCODE_APP1: SDL_Scancode = 283;
pub const SDL_SCANCODE_APP2: SDL_Scancode = 284;
pub const SDL_SCANCODE_AUDIOREWIND: SDL_Scancode = 285;
pub const SDL_SCANCODE_AUDIOFASTFORWARD: SDL_Scancode = 286;
pub const SDL_NUM_SCANCODES: SDL_Scancode = 512;
pub type SDL_Scancode = i32;
pub type SDL_Keycode = Sint32;
pub const SDLK_UNKNOWN: _bindgen_ty_6 = 0;
pub const SDLK_RETURN: _bindgen_ty_6 = 13;
pub const SDLK_ESCAPE: _bindgen_ty_6 = 27;
pub const SDLK_BACKSPACE: _bindgen_ty_6 = 8;
pub const SDLK_TAB: _bindgen_ty_6 = 9;
pub const SDLK_SPACE: _bindgen_ty_6 = 32;
pub const SDLK_EXCLAIM: _bindgen_ty_6 = 33;
pub const SDLK_QUOTEDBL: _bindgen_ty_6 = 34;
pub const SDLK_HASH: _bindgen_ty_6 = 35;
pub const SDLK_PERCENT: _bindgen_ty_6 = 37;
pub const SDLK_DOLLAR: _bindgen_ty_6 = 36;
pub const SDLK_AMPERSAND: _bindgen_ty_6 = 38;
pub const SDLK_QUOTE: _bindgen_ty_6 = 39;
pub const SDLK_LEFTPAREN: _bindgen_ty_6 = 40;
pub const SDLK_RIGHTPAREN: _bindgen_ty_6 = 41;
pub const SDLK_ASTERISK: _bindgen_ty_6 = 42;
pub const SDLK_PLUS: _bindgen_ty_6 = 43;
pub const SDLK_COMMA: _bindgen_ty_6 = 44;
pub const SDLK_MINUS: _bindgen_ty_6 = 45;
pub const SDLK_PERIOD: _bindgen_ty_6 = 46;
pub const SDLK_SLASH: _bindgen_ty_6 = 47;
pub const SDLK_0: _bindgen_ty_6 = 48;
pub const SDLK_1: _bindgen_ty_6 = 49;
pub const SDLK_2: _bindgen_ty_6 = 50;
pub const SDLK_3: _bindgen_ty_6 = 51;
pub const SDLK_4: _bindgen_ty_6 = 52;
pub const SDLK_5: _bindgen_ty_6 = 53;
pub const SDLK_6: _bindgen_ty_6 = 54;
pub const SDLK_7: _bindgen_ty_6 = 55;
pub const SDLK_8: _bindgen_ty_6 = 56;
pub const SDLK_9: _bindgen_ty_6 = 57;
pub const SDLK_COLON: _bindgen_ty_6 = 58;
pub const SDLK_SEMICOLON: _bindgen_ty_6 = 59;
pub const SDLK_LESS: _bindgen_ty_6 = 60;
pub const SDLK_EQUALS: _bindgen_ty_6 = 61;
pub const SDLK_GREATER: _bindgen_ty_6 = 62;
pub const SDLK_QUESTION: _bindgen_ty_6 = 63;
pub const SDLK_AT: _bindgen_ty_6 = 64;
pub const SDLK_LEFTBRACKET: _bindgen_ty_6 = 91;
pub const SDLK_BACKSLASH: _bindgen_ty_6 = 92;
pub const SDLK_RIGHTBRACKET: _bindgen_ty_6 = 93;
pub const SDLK_CARET: _bindgen_ty_6 = 94;
pub const SDLK_UNDERSCORE: _bindgen_ty_6 = 95;
pub const SDLK_BACKQUOTE: _bindgen_ty_6 = 96;
pub const SDLK_a: _bindgen_ty_6 = 97;
pub const SDLK_b: _bindgen_ty_6 = 98;
pub const SDLK_c: _bindgen_ty_6 = 99;
pub const SDLK_d: _bindgen_ty_6 = 100;
pub const SDLK_e: _bindgen_ty_6 = 101;
pub const SDLK_f: _bindgen_ty_6 = 102;
pub const SDLK_g: _bindgen_ty_6 = 103;
pub const SDLK_h: _bindgen_ty_6 = 104;
pub const SDLK_i: _bindgen_ty_6 = 105;
pub const SDLK_j: _bindgen_ty_6 = 106;
pub const SDLK_k: _bindgen_ty_6 = 107;
pub const SDLK_l: _bindgen_ty_6 = 108;
pub const SDLK_m: _bindgen_ty_6 = 109;
pub const SDLK_n: _bindgen_ty_6 = 110;
pub const SDLK_o: _bindgen_ty_6 = 111;
pub const SDLK_p: _bindgen_ty_6 = 112;
pub const SDLK_q: _bindgen_ty_6 = 113;
pub const SDLK_r: _bindgen_ty_6 = 114;
pub const SDLK_s: _bindgen_ty_6 = 115;
pub const SDLK_t: _bindgen_ty_6 = 116;
pub const SDLK_u: _bindgen_ty_6 = 117;
pub const SDLK_v: _bindgen_ty_6 = 118;
pub const SDLK_w: _bindgen_ty_6 = 119;
pub const SDLK_x: _bindgen_ty_6 = 120;
pub const SDLK_y: _bindgen_ty_6 = 121;
pub const SDLK_z: _bindgen_ty_6 = 122;
pub const SDLK_CAPSLOCK: _bindgen_ty_6 = 1073741881;
pub const SDLK_F1: _bindgen_ty_6 = 1073741882;
pub const SDLK_F2: _bindgen_ty_6 = 1073741883;
pub const SDLK_F3: _bindgen_ty_6 = 1073741884;
pub const SDLK_F4: _bindgen_ty_6 = 1073741885;
pub const SDLK_F5: _bindgen_ty_6 = 1073741886;
pub const SDLK_F6: _bindgen_ty_6 = 1073741887;
pub const SDLK_F7: _bindgen_ty_6 = 1073741888;
pub const SDLK_F8: _bindgen_ty_6 = 1073741889;
pub const SDLK_F9: _bindgen_ty_6 = 1073741890;
pub const SDLK_F10: _bindgen_ty_6 = 1073741891;
pub const SDLK_F11: _bindgen_ty_6 = 1073741892;
pub const SDLK_F12: _bindgen_ty_6 = 1073741893;
pub const SDLK_PRINTSCREEN: _bindgen_ty_6 = 1073741894;
pub const SDLK_SCROLLLOCK: _bindgen_ty_6 = 1073741895;
pub const SDLK_PAUSE: _bindgen_ty_6 = 1073741896;
pub const SDLK_INSERT: _bindgen_ty_6 = 1073741897;
pub const SDLK_HOME: _bindgen_ty_6 = 1073741898;
pub const SDLK_PAGEUP: _bindgen_ty_6 = 1073741899;
pub const SDLK_DELETE: _bindgen_ty_6 = 127;
pub const SDLK_END: _bindgen_ty_6 = 1073741901;
pub const SDLK_PAGEDOWN: _bindgen_ty_6 = 1073741902;
pub const SDLK_RIGHT: _bindgen_ty_6 = 1073741903;
pub const SDLK_LEFT: _bindgen_ty_6 = 1073741904;
pub const SDLK_DOWN: _bindgen_ty_6 = 1073741905;
pub const SDLK_UP: _bindgen_ty_6 = 1073741906;
pub const SDLK_NUMLOCKCLEAR: _bindgen_ty_6 = 1073741907;
pub const SDLK_KP_DIVIDE: _bindgen_ty_6 = 1073741908;
pub const SDLK_KP_MULTIPLY: _bindgen_ty_6 = 1073741909;
pub const SDLK_KP_MINUS: _bindgen_ty_6 = 1073741910;
pub const SDLK_KP_PLUS: _bindgen_ty_6 = 1073741911;
pub const SDLK_KP_ENTER: _bindgen_ty_6 = 1073741912;
pub const SDLK_KP_1: _bindgen_ty_6 = 1073741913;
pub const SDLK_KP_2: _bindgen_ty_6 = 1073741914;
pub const SDLK_KP_3: _bindgen_ty_6 = 1073741915;
pub const SDLK_KP_4: _bindgen_ty_6 = 1073741916;
pub const SDLK_KP_5: _bindgen_ty_6 = 1073741917;
pub const SDLK_KP_6: _bindgen_ty_6 = 1073741918;
pub const SDLK_KP_7: _bindgen_ty_6 = 1073741919;
pub const SDLK_KP_8: _bindgen_ty_6 = 1073741920;
pub const SDLK_KP_9: _bindgen_ty_6 = 1073741921;
pub const SDLK_KP_0: _bindgen_ty_6 = 1073741922;
pub const SDLK_KP_PERIOD: _bindgen_ty_6 = 1073741923;
pub const SDLK_APPLICATION: _bindgen_ty_6 = 1073741925;
pub const SDLK_POWER: _bindgen_ty_6 = 1073741926;
pub const SDLK_KP_EQUALS: _bindgen_ty_6 = 1073741927;
pub const SDLK_F13: _bindgen_ty_6 = 1073741928;
pub const SDLK_F14: _bindgen_ty_6 = 1073741929;
pub const SDLK_F15: _bindgen_ty_6 = 1073741930;
pub const SDLK_F16: _bindgen_ty_6 = 1073741931;
pub const SDLK_F17: _bindgen_ty_6 = 1073741932;
pub const SDLK_F18: _bindgen_ty_6 = 1073741933;
pub const SDLK_F19: _bindgen_ty_6 = 1073741934;
pub const SDLK_F20: _bindgen_ty_6 = 1073741935;
pub const SDLK_F21: _bindgen_ty_6 = 1073741936;
pub const SDLK_F22: _bindgen_ty_6 = 1073741937;
pub const SDLK_F23: _bindgen_ty_6 = 1073741938;
pub const SDLK_F24: _bindgen_ty_6 = 1073741939;
pub const SDLK_EXECUTE: _bindgen_ty_6 = 1073741940;
pub const SDLK_HELP: _bindgen_ty_6 = 1073741941;
pub const SDLK_MENU: _bindgen_ty_6 = 1073741942;
pub const SDLK_SELECT: _bindgen_ty_6 = 1073741943;
pub const SDLK_STOP: _bindgen_ty_6 = 1073741944;
pub const SDLK_AGAIN: _bindgen_ty_6 = 1073741945;
pub const SDLK_UNDO: _bindgen_ty_6 = 1073741946;
pub const SDLK_CUT: _bindgen_ty_6 = 1073741947;
pub const SDLK_COPY: _bindgen_ty_6 = 1073741948;
pub const SDLK_PASTE: _bindgen_ty_6 = 1073741949;
pub const SDLK_FIND: _bindgen_ty_6 = 1073741950;
pub const SDLK_MUTE: _bindgen_ty_6 = 1073741951;
pub const SDLK_VOLUMEUP: _bindgen_ty_6 = 1073741952;
pub const SDLK_VOLUMEDOWN: _bindgen_ty_6 = 1073741953;
pub const SDLK_KP_COMMA: _bindgen_ty_6 = 1073741957;
pub const SDLK_KP_EQUALSAS400: _bindgen_ty_6 = 1073741958;
pub const SDLK_ALTERASE: _bindgen_ty_6 = 1073741977;
pub const SDLK_SYSREQ: _bindgen_ty_6 = 1073741978;
pub const SDLK_CANCEL: _bindgen_ty_6 = 1073741979;
pub const SDLK_CLEAR: _bindgen_ty_6 = 1073741980;
pub const SDLK_PRIOR: _bindgen_ty_6 = 1073741981;
pub const SDLK_RETURN2: _bindgen_ty_6 = 1073741982;
pub const SDLK_SEPARATOR: _bindgen_ty_6 = 1073741983;
pub const SDLK_OUT: _bindgen_ty_6 = 1073741984;
pub const SDLK_OPER: _bindgen_ty_6 = 1073741985;
pub const SDLK_CLEARAGAIN: _bindgen_ty_6 = 1073741986;
pub const SDLK_CRSEL: _bindgen_ty_6 = 1073741987;
pub const SDLK_EXSEL: _bindgen_ty_6 = 1073741988;
pub const SDLK_KP_00: _bindgen_ty_6 = 1073742000;
pub const SDLK_KP_000: _bindgen_ty_6 = 1073742001;
pub const SDLK_THOUSANDSSEPARATOR: _bindgen_ty_6 = 1073742002;
pub const SDLK_DECIMALSEPARATOR: _bindgen_ty_6 = 1073742003;
pub const SDLK_CURRENCYUNIT: _bindgen_ty_6 = 1073742004;
pub const SDLK_CURRENCYSUBUNIT: _bindgen_ty_6 = 1073742005;
pub const SDLK_KP_LEFTPAREN: _bindgen_ty_6 = 1073742006;
pub const SDLK_KP_RIGHTPAREN: _bindgen_ty_6 = 1073742007;
pub const SDLK_KP_LEFTBRACE: _bindgen_ty_6 = 1073742008;
pub const SDLK_KP_RIGHTBRACE: _bindgen_ty_6 = 1073742009;
pub const SDLK_KP_TAB: _bindgen_ty_6 = 1073742010;
pub const SDLK_KP_BACKSPACE: _bindgen_ty_6 = 1073742011;
pub const SDLK_KP_A: _bindgen_ty_6 = 1073742012;
pub const SDLK_KP_B: _bindgen_ty_6 = 1073742013;
pub const SDLK_KP_C: _bindgen_ty_6 = 1073742014;
pub const SDLK_KP_D: _bindgen_ty_6 = 1073742015;
pub const SDLK_KP_E: _bindgen_ty_6 = 1073742016;
pub const SDLK_KP_F: _bindgen_ty_6 = 1073742017;
pub const SDLK_KP_XOR: _bindgen_ty_6 = 1073742018;
pub const SDLK_KP_POWER: _bindgen_ty_6 = 1073742019;
pub const SDLK_KP_PERCENT: _bindgen_ty_6 = 1073742020;
pub const SDLK_KP_LESS: _bindgen_ty_6 = 1073742021;
pub const SDLK_KP_GREATER: _bindgen_ty_6 = 1073742022;
pub const SDLK_KP_AMPERSAND: _bindgen_ty_6 = 1073742023;
pub const SDLK_KP_DBLAMPERSAND: _bindgen_ty_6 = 1073742024;
pub const SDLK_KP_VERTICALBAR: _bindgen_ty_6 = 1073742025;
pub const SDLK_KP_DBLVERTICALBAR: _bindgen_ty_6 = 1073742026;
pub const SDLK_KP_COLON: _bindgen_ty_6 = 1073742027;
pub const SDLK_KP_HASH: _bindgen_ty_6 = 1073742028;
pub const SDLK_KP_SPACE: _bindgen_ty_6 = 1073742029;
pub const SDLK_KP_AT: _bindgen_ty_6 = 1073742030;
pub const SDLK_KP_EXCLAM: _bindgen_ty_6 = 1073742031;
pub const SDLK_KP_MEMSTORE: _bindgen_ty_6 = 1073742032;
pub const SDLK_KP_MEMRECALL: _bindgen_ty_6 = 1073742033;
pub const SDLK_KP_MEMCLEAR: _bindgen_ty_6 = 1073742034;
pub const SDLK_KP_MEMADD: _bindgen_ty_6 = 1073742035;
pub const SDLK_KP_MEMSUBTRACT: _bindgen_ty_6 = 1073742036;
pub const SDLK_KP_MEMMULTIPLY: _bindgen_ty_6 = 1073742037;
pub const SDLK_KP_MEMDIVIDE: _bindgen_ty_6 = 1073742038;
pub const SDLK_KP_PLUSMINUS: _bindgen_ty_6 = 1073742039;
pub const SDLK_KP_CLEAR: _bindgen_ty_6 = 1073742040;
pub const SDLK_KP_CLEARENTRY: _bindgen_ty_6 = 1073742041;
pub const SDLK_KP_BINARY: _bindgen_ty_6 = 1073742042;
pub const SDLK_KP_OCTAL: _bindgen_ty_6 = 1073742043;
pub const SDLK_KP_DECIMAL: _bindgen_ty_6 = 1073742044;
pub const SDLK_KP_HEXADECIMAL: _bindgen_ty_6 = 1073742045;
pub const SDLK_LCTRL: _bindgen_ty_6 = 1073742048;
pub const SDLK_LSHIFT: _bindgen_ty_6 = 1073742049;
pub const SDLK_LALT: _bindgen_ty_6 = 1073742050;
pub const SDLK_LGUI: _bindgen_ty_6 = 1073742051;
pub const SDLK_RCTRL: _bindgen_ty_6 = 1073742052;
pub const SDLK_RSHIFT: _bindgen_ty_6 = 1073742053;
pub const SDLK_RALT: _bindgen_ty_6 = 1073742054;
pub const SDLK_RGUI: _bindgen_ty_6 = 1073742055;
pub const SDLK_MODE: _bindgen_ty_6 = 1073742081;
pub const SDLK_AUDIONEXT: _bindgen_ty_6 = 1073742082;
pub const SDLK_AUDIOPREV: _bindgen_ty_6 = 1073742083;
pub const SDLK_AUDIOSTOP: _bindgen_ty_6 = 1073742084;
pub const SDLK_AUDIOPLAY: _bindgen_ty_6 = 1073742085;
pub const SDLK_AUDIOMUTE: _bindgen_ty_6 = 1073742086;
pub const SDLK_MEDIASELECT: _bindgen_ty_6 = 1073742087;
pub const SDLK_WWW: _bindgen_ty_6 = 1073742088;
pub const SDLK_MAIL: _bindgen_ty_6 = 1073742089;
pub const SDLK_CALCULATOR: _bindgen_ty_6 = 1073742090;
pub const SDLK_COMPUTER: _bindgen_ty_6 = 1073742091;
pub const SDLK_AC_SEARCH: _bindgen_ty_6 = 1073742092;
pub const SDLK_AC_HOME: _bindgen_ty_6 = 1073742093;
pub const SDLK_AC_BACK: _bindgen_ty_6 = 1073742094;
pub const SDLK_AC_FORWARD: _bindgen_ty_6 = 1073742095;
pub const SDLK_AC_STOP: _bindgen_ty_6 = 1073742096;
pub const SDLK_AC_REFRESH: _bindgen_ty_6 = 1073742097;
pub const SDLK_AC_BOOKMARKS: _bindgen_ty_6 = 1073742098;
pub const SDLK_BRIGHTNESSDOWN: _bindgen_ty_6 = 1073742099;
pub const SDLK_BRIGHTNESSUP: _bindgen_ty_6 = 1073742100;
pub const SDLK_DISPLAYSWITCH: _bindgen_ty_6 = 1073742101;
pub const SDLK_KBDILLUMTOGGLE: _bindgen_ty_6 = 1073742102;
pub const SDLK_KBDILLUMDOWN: _bindgen_ty_6 = 1073742103;
pub const SDLK_KBDILLUMUP: _bindgen_ty_6 = 1073742104;
pub const SDLK_EJECT: _bindgen_ty_6 = 1073742105;
pub const SDLK_SLEEP: _bindgen_ty_6 = 1073742106;
pub const SDLK_APP1: _bindgen_ty_6 = 1073742107;
pub const SDLK_APP2: _bindgen_ty_6 = 1073742108;
pub const SDLK_AUDIOREWIND: _bindgen_ty_6 = 1073742109;
pub const SDLK_AUDIOFASTFORWARD: _bindgen_ty_6 = 1073742110;
pub type _bindgen_ty_6 = i32;
pub const KMOD_NONE: SDL_Keymod = 0;
pub const KMOD_LSHIFT: SDL_Keymod = 1;
pub const KMOD_RSHIFT: SDL_Keymod = 2;
pub const KMOD_LCTRL: SDL_Keymod = 64;
pub const KMOD_RCTRL: SDL_Keymod = 128;
pub const KMOD_LALT: SDL_Keymod = 256;
pub const KMOD_RALT: SDL_Keymod = 512;
pub const KMOD_LGUI: SDL_Keymod = 1024;
pub const KMOD_RGUI: SDL_Keymod = 2048;
pub const KMOD_NUM: SDL_Keymod = 4096;
pub const KMOD_CAPS: SDL_Keymod = 8192;
pub const KMOD_MODE: SDL_Keymod = 16384;
pub const KMOD_RESERVED: SDL_Keymod = 32768;
pub type SDL_Keymod = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_Keysym {
pub scancode: SDL_Scancode,
pub sym: SDL_Keycode,
pub mod_: Uint16,
pub unused: Uint32,
}
#[test]
fn bindgen_test_layout_SDL_Keysym() {
assert_eq!(
::core::mem::size_of::<SDL_Keysym>(),
16usize,
concat!("Size of: ", stringify!(SDL_Keysym))
);
assert_eq!(
::core::mem::align_of::<SDL_Keysym>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Keysym))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Keysym>())).scancode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Keysym),
"::",
stringify!(scancode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Keysym>())).sym as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_Keysym),
"::",
stringify!(sym)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Keysym>())).mod_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_Keysym),
"::",
stringify!(mod_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Keysym>())).unused as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_Keysym),
"::",
stringify!(unused)
)
);
}
impl Default for SDL_Keysym {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn SDL_GetKeyboardFocus() -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_GetKeyboardState(numkeys: *mut winapi::ctypes::c_int) -> *const Uint8;
}
extern "C" {
pub fn SDL_GetModState() -> SDL_Keymod;
}
extern "C" {
pub fn SDL_SetModState(modstate: SDL_Keymod);
}
extern "C" {
pub fn SDL_GetKeyFromScancode(scancode: SDL_Scancode) -> SDL_Keycode;
}
extern "C" {
pub fn SDL_GetScancodeFromKey(key: SDL_Keycode) -> SDL_Scancode;
}
extern "C" {
pub fn SDL_GetScancodeName(scancode: SDL_Scancode) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetScancodeFromName(name: *const winapi::ctypes::c_char) -> SDL_Scancode;
}
extern "C" {
pub fn SDL_GetKeyName(key: SDL_Keycode) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetKeyFromName(name: *const winapi::ctypes::c_char) -> SDL_Keycode;
}
extern "C" {
pub fn SDL_StartTextInput();
}
extern "C" {
pub fn SDL_IsTextInputActive() -> SDL_bool;
}
extern "C" {
pub fn SDL_StopTextInput();
}
extern "C" {
pub fn SDL_SetTextInputRect(rect: *mut SDL_Rect);
}
extern "C" {
pub fn SDL_HasScreenKeyboardSupport() -> SDL_bool;
}
extern "C" {
pub fn SDL_IsScreenKeyboardShown(window: *mut SDL_Window) -> SDL_bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_Cursor {
_unused: [u8; 0],
}
pub const SDL_SYSTEM_CURSOR_ARROW: SDL_SystemCursor = 0;
pub const SDL_SYSTEM_CURSOR_IBEAM: SDL_SystemCursor = 1;
pub const SDL_SYSTEM_CURSOR_WAIT: SDL_SystemCursor = 2;
pub const SDL_SYSTEM_CURSOR_CROSSHAIR: SDL_SystemCursor = 3;
pub const SDL_SYSTEM_CURSOR_WAITARROW: SDL_SystemCursor = 4;
pub const SDL_SYSTEM_CURSOR_SIZENWSE: SDL_SystemCursor = 5;
pub const SDL_SYSTEM_CURSOR_SIZENESW: SDL_SystemCursor = 6;
pub const SDL_SYSTEM_CURSOR_SIZEWE: SDL_SystemCursor = 7;
pub const SDL_SYSTEM_CURSOR_SIZENS: SDL_SystemCursor = 8;
pub const SDL_SYSTEM_CURSOR_SIZEALL: SDL_SystemCursor = 9;
pub const SDL_SYSTEM_CURSOR_NO: SDL_SystemCursor = 10;
pub const SDL_SYSTEM_CURSOR_HAND: SDL_SystemCursor = 11;
pub const SDL_NUM_SYSTEM_CURSORS: SDL_SystemCursor = 12;
pub type SDL_SystemCursor = i32;
pub const SDL_MOUSEWHEEL_NORMAL: SDL_MouseWheelDirection = 0;
pub const SDL_MOUSEWHEEL_FLIPPED: SDL_MouseWheelDirection = 1;
pub type SDL_MouseWheelDirection = i32;
extern "C" {
pub fn SDL_GetMouseFocus() -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_GetMouseState(x: *mut winapi::ctypes::c_int, y: *mut winapi::ctypes::c_int) -> Uint32;
}
extern "C" {
pub fn SDL_GetGlobalMouseState(
x: *mut winapi::ctypes::c_int,
y: *mut winapi::ctypes::c_int,
) -> Uint32;
}
extern "C" {
pub fn SDL_GetRelativeMouseState(
x: *mut winapi::ctypes::c_int,
y: *mut winapi::ctypes::c_int,
) -> Uint32;
}
extern "C" {
pub fn SDL_WarpMouseInWindow(
window: *mut SDL_Window,
x: winapi::ctypes::c_int,
y: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_WarpMouseGlobal(
x: winapi::ctypes::c_int,
y: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetRelativeMouseMode(enabled: SDL_bool) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CaptureMouse(enabled: SDL_bool) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetRelativeMouseMode() -> SDL_bool;
}
extern "C" {
pub fn SDL_CreateCursor(
data: *const Uint8,
mask: *const Uint8,
w: winapi::ctypes::c_int,
h: winapi::ctypes::c_int,
hot_x: winapi::ctypes::c_int,
hot_y: winapi::ctypes::c_int,
) -> *mut SDL_Cursor;
}
extern "C" {
pub fn SDL_CreateColorCursor(
surface: *mut SDL_Surface,
hot_x: winapi::ctypes::c_int,
hot_y: winapi::ctypes::c_int,
) -> *mut SDL_Cursor;
}
extern "C" {
pub fn SDL_CreateSystemCursor(id: SDL_SystemCursor) -> *mut SDL_Cursor;
}
extern "C" {
pub fn SDL_SetCursor(cursor: *mut SDL_Cursor);
}
extern "C" {
pub fn SDL_GetCursor() -> *mut SDL_Cursor;
}
extern "C" {
pub fn SDL_GetDefaultCursor() -> *mut SDL_Cursor;
}
extern "C" {
pub fn SDL_FreeCursor(cursor: *mut SDL_Cursor);
}
extern "C" {
pub fn SDL_ShowCursor(toggle: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _SDL_Joystick {
_unused: [u8; 0],
}
pub type SDL_Joystick = _SDL_Joystick;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_JoystickGUID {
pub data: [Uint8; 16usize],
}
#[test]
fn bindgen_test_layout_SDL_JoystickGUID() {
assert_eq!(
::core::mem::size_of::<SDL_JoystickGUID>(),
16usize,
concat!("Size of: ", stringify!(SDL_JoystickGUID))
);
assert_eq!(
::core::mem::align_of::<SDL_JoystickGUID>(),
1usize,
concat!("Alignment of ", stringify!(SDL_JoystickGUID))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoystickGUID>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoystickGUID),
"::",
stringify!(data)
)
);
}
pub type SDL_JoystickID = Sint32;
pub const SDL_JOYSTICK_TYPE_UNKNOWN: SDL_JoystickType = 0;
pub const SDL_JOYSTICK_TYPE_GAMECONTROLLER: SDL_JoystickType = 1;
pub const SDL_JOYSTICK_TYPE_WHEEL: SDL_JoystickType = 2;
pub const SDL_JOYSTICK_TYPE_ARCADE_STICK: SDL_JoystickType = 3;
pub const SDL_JOYSTICK_TYPE_FLIGHT_STICK: SDL_JoystickType = 4;
pub const SDL_JOYSTICK_TYPE_DANCE_PAD: SDL_JoystickType = 5;
pub const SDL_JOYSTICK_TYPE_GUITAR: SDL_JoystickType = 6;
pub const SDL_JOYSTICK_TYPE_DRUM_KIT: SDL_JoystickType = 7;
pub const SDL_JOYSTICK_TYPE_ARCADE_PAD: SDL_JoystickType = 8;
pub const SDL_JOYSTICK_TYPE_THROTTLE: SDL_JoystickType = 9;
pub type SDL_JoystickType = i32;
pub const SDL_JOYSTICK_POWER_UNKNOWN: SDL_JoystickPowerLevel = -1;
pub const SDL_JOYSTICK_POWER_EMPTY: SDL_JoystickPowerLevel = 0;
pub const SDL_JOYSTICK_POWER_LOW: SDL_JoystickPowerLevel = 1;
pub const SDL_JOYSTICK_POWER_MEDIUM: SDL_JoystickPowerLevel = 2;
pub const SDL_JOYSTICK_POWER_FULL: SDL_JoystickPowerLevel = 3;
pub const SDL_JOYSTICK_POWER_WIRED: SDL_JoystickPowerLevel = 4;
pub const SDL_JOYSTICK_POWER_MAX: SDL_JoystickPowerLevel = 5;
pub type SDL_JoystickPowerLevel = i32;
extern "C" {
pub fn SDL_LockJoysticks();
}
extern "C" {
pub fn SDL_UnlockJoysticks();
}
extern "C" {
pub fn SDL_NumJoysticks() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickNameForIndex(
device_index: winapi::ctypes::c_int,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_JoystickGetDevicePlayerIndex(
device_index: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickGetDeviceGUID(device_index: winapi::ctypes::c_int) -> SDL_JoystickGUID;
}
extern "C" {
pub fn SDL_JoystickGetDeviceVendor(device_index: winapi::ctypes::c_int) -> Uint16;
}
extern "C" {
pub fn SDL_JoystickGetDeviceProduct(device_index: winapi::ctypes::c_int) -> Uint16;
}
extern "C" {
pub fn SDL_JoystickGetDeviceProductVersion(device_index: winapi::ctypes::c_int) -> Uint16;
}
extern "C" {
pub fn SDL_JoystickGetDeviceType(device_index: winapi::ctypes::c_int) -> SDL_JoystickType;
}
extern "C" {
pub fn SDL_JoystickGetDeviceInstanceID(device_index: winapi::ctypes::c_int) -> SDL_JoystickID;
}
extern "C" {
pub fn SDL_JoystickOpen(device_index: winapi::ctypes::c_int) -> *mut SDL_Joystick;
}
extern "C" {
pub fn SDL_JoystickFromInstanceID(joyid: SDL_JoystickID) -> *mut SDL_Joystick;
}
extern "C" {
pub fn SDL_JoystickName(joystick: *mut SDL_Joystick) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_JoystickGetPlayerIndex(joystick: *mut SDL_Joystick) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickGetGUID(joystick: *mut SDL_Joystick) -> SDL_JoystickGUID;
}
extern "C" {
pub fn SDL_JoystickGetVendor(joystick: *mut SDL_Joystick) -> Uint16;
}
extern "C" {
pub fn SDL_JoystickGetProduct(joystick: *mut SDL_Joystick) -> Uint16;
}
extern "C" {
pub fn SDL_JoystickGetProductVersion(joystick: *mut SDL_Joystick) -> Uint16;
}
extern "C" {
pub fn SDL_JoystickGetType(joystick: *mut SDL_Joystick) -> SDL_JoystickType;
}
extern "C" {
pub fn SDL_JoystickGetGUIDString(
guid: SDL_JoystickGUID,
pszGUID: *mut winapi::ctypes::c_char,
cbGUID: winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_JoystickGetGUIDFromString(pchGUID: *const winapi::ctypes::c_char) -> SDL_JoystickGUID;
}
extern "C" {
pub fn SDL_JoystickGetAttached(joystick: *mut SDL_Joystick) -> SDL_bool;
}
extern "C" {
pub fn SDL_JoystickInstanceID(joystick: *mut SDL_Joystick) -> SDL_JoystickID;
}
extern "C" {
pub fn SDL_JoystickNumAxes(joystick: *mut SDL_Joystick) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickNumBalls(joystick: *mut SDL_Joystick) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickNumHats(joystick: *mut SDL_Joystick) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickNumButtons(joystick: *mut SDL_Joystick) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickUpdate();
}
extern "C" {
pub fn SDL_JoystickEventState(state: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickGetAxis(joystick: *mut SDL_Joystick, axis: winapi::ctypes::c_int) -> Sint16;
}
extern "C" {
pub fn SDL_JoystickGetAxisInitialState(
joystick: *mut SDL_Joystick,
axis: winapi::ctypes::c_int,
state: *mut Sint16,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_JoystickGetHat(joystick: *mut SDL_Joystick, hat: winapi::ctypes::c_int) -> Uint8;
}
extern "C" {
pub fn SDL_JoystickGetBall(
joystick: *mut SDL_Joystick,
ball: winapi::ctypes::c_int,
dx: *mut winapi::ctypes::c_int,
dy: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickGetButton(joystick: *mut SDL_Joystick, button: winapi::ctypes::c_int)
-> Uint8;
}
extern "C" {
pub fn SDL_JoystickRumble(
joystick: *mut SDL_Joystick,
low_frequency_rumble: Uint16,
high_frequency_rumble: Uint16,
duration_ms: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_JoystickClose(joystick: *mut SDL_Joystick);
}
extern "C" {
pub fn SDL_JoystickCurrentPowerLevel(joystick: *mut SDL_Joystick) -> SDL_JoystickPowerLevel;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _SDL_GameController {
_unused: [u8; 0],
}
pub type SDL_GameController = _SDL_GameController;
pub const SDL_CONTROLLER_BINDTYPE_NONE: SDL_GameControllerBindType = 0;
pub const SDL_CONTROLLER_BINDTYPE_BUTTON: SDL_GameControllerBindType = 1;
pub const SDL_CONTROLLER_BINDTYPE_AXIS: SDL_GameControllerBindType = 2;
pub const SDL_CONTROLLER_BINDTYPE_HAT: SDL_GameControllerBindType = 3;
pub type SDL_GameControllerBindType = i32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SDL_GameControllerButtonBind {
pub bindType: SDL_GameControllerBindType,
pub value: SDL_GameControllerButtonBind__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_GameControllerButtonBind__bindgen_ty_1 {
pub button: winapi::ctypes::c_int,
pub axis: winapi::ctypes::c_int,
pub hat: SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: [u32; 2usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1 {
pub hat: winapi::ctypes::c_int,
pub hat_mask: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1>())).hat
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(hat)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1>())).hat_mask
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(hat_mask)
)
);
}
#[test]
fn bindgen_test_layout_SDL_GameControllerButtonBind__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_GameControllerButtonBind__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<SDL_GameControllerButtonBind__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_GameControllerButtonBind__bindgen_ty_1>())).button as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_GameControllerButtonBind__bindgen_ty_1>())).axis as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1),
"::",
stringify!(axis)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_GameControllerButtonBind__bindgen_ty_1>())).hat as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind__bindgen_ty_1),
"::",
stringify!(hat)
)
);
}
impl Default for SDL_GameControllerButtonBind__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_GameControllerButtonBind__bindgen_ty_1 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_GameControllerButtonBind__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_SDL_GameControllerButtonBind() {
assert_eq!(
::core::mem::size_of::<SDL_GameControllerButtonBind>(),
12usize,
concat!("Size of: ", stringify!(SDL_GameControllerButtonBind))
);
assert_eq!(
::core::mem::align_of::<SDL_GameControllerButtonBind>(),
4usize,
concat!("Alignment of ", stringify!(SDL_GameControllerButtonBind))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_GameControllerButtonBind>())).bindType as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind),
"::",
stringify!(bindType)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_GameControllerButtonBind>())).value as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_GameControllerButtonBind),
"::",
stringify!(value)
)
);
}
impl Default for SDL_GameControllerButtonBind {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_GameControllerButtonBind {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(
f,
"SDL_GameControllerButtonBind {{ bindType: {:?}, value: {:?} }}",
self.bindType, self.value
)
}
}
extern "C" {
pub fn SDL_GameControllerAddMappingsFromRW(
rw: *mut SDL_RWops,
freerw: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GameControllerAddMapping(
mappingString: *const winapi::ctypes::c_char,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GameControllerNumMappings() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GameControllerMappingForIndex(
mapping_index: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerMappingForGUID(guid: SDL_JoystickGUID) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerMapping(
gamecontroller: *mut SDL_GameController,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_IsGameController(joystick_index: winapi::ctypes::c_int) -> SDL_bool;
}
extern "C" {
pub fn SDL_GameControllerNameForIndex(
joystick_index: winapi::ctypes::c_int,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerMappingForDeviceIndex(
joystick_index: winapi::ctypes::c_int,
) -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerOpen(joystick_index: winapi::ctypes::c_int) -> *mut SDL_GameController;
}
extern "C" {
pub fn SDL_GameControllerFromInstanceID(joyid: SDL_JoystickID) -> *mut SDL_GameController;
}
extern "C" {
pub fn SDL_GameControllerName(
gamecontroller: *mut SDL_GameController,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerGetPlayerIndex(
gamecontroller: *mut SDL_GameController,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GameControllerGetVendor(gamecontroller: *mut SDL_GameController) -> Uint16;
}
extern "C" {
pub fn SDL_GameControllerGetProduct(gamecontroller: *mut SDL_GameController) -> Uint16;
}
extern "C" {
pub fn SDL_GameControllerGetProductVersion(gamecontroller: *mut SDL_GameController) -> Uint16;
}
extern "C" {
pub fn SDL_GameControllerGetAttached(gamecontroller: *mut SDL_GameController) -> SDL_bool;
}
extern "C" {
pub fn SDL_GameControllerGetJoystick(
gamecontroller: *mut SDL_GameController,
) -> *mut SDL_Joystick;
}
extern "C" {
pub fn SDL_GameControllerEventState(state: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GameControllerUpdate();
}
pub const SDL_CONTROLLER_AXIS_INVALID: SDL_GameControllerAxis = -1;
pub const SDL_CONTROLLER_AXIS_LEFTX: SDL_GameControllerAxis = 0;
pub const SDL_CONTROLLER_AXIS_LEFTY: SDL_GameControllerAxis = 1;
pub const SDL_CONTROLLER_AXIS_RIGHTX: SDL_GameControllerAxis = 2;
pub const SDL_CONTROLLER_AXIS_RIGHTY: SDL_GameControllerAxis = 3;
pub const SDL_CONTROLLER_AXIS_TRIGGERLEFT: SDL_GameControllerAxis = 4;
pub const SDL_CONTROLLER_AXIS_TRIGGERRIGHT: SDL_GameControllerAxis = 5;
pub const SDL_CONTROLLER_AXIS_MAX: SDL_GameControllerAxis = 6;
pub type SDL_GameControllerAxis = i32;
extern "C" {
pub fn SDL_GameControllerGetAxisFromString(
pchString: *const winapi::ctypes::c_char,
) -> SDL_GameControllerAxis;
}
extern "C" {
pub fn SDL_GameControllerGetStringForAxis(
axis: SDL_GameControllerAxis,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerGetBindForAxis(
gamecontroller: *mut SDL_GameController,
axis: SDL_GameControllerAxis,
) -> SDL_GameControllerButtonBind;
}
extern "C" {
pub fn SDL_GameControllerGetAxis(
gamecontroller: *mut SDL_GameController,
axis: SDL_GameControllerAxis,
) -> Sint16;
}
pub const SDL_CONTROLLER_BUTTON_INVALID: SDL_GameControllerButton = -1;
pub const SDL_CONTROLLER_BUTTON_A: SDL_GameControllerButton = 0;
pub const SDL_CONTROLLER_BUTTON_B: SDL_GameControllerButton = 1;
pub const SDL_CONTROLLER_BUTTON_X: SDL_GameControllerButton = 2;
pub const SDL_CONTROLLER_BUTTON_Y: SDL_GameControllerButton = 3;
pub const SDL_CONTROLLER_BUTTON_BACK: SDL_GameControllerButton = 4;
pub const SDL_CONTROLLER_BUTTON_GUIDE: SDL_GameControllerButton = 5;
pub const SDL_CONTROLLER_BUTTON_START: SDL_GameControllerButton = 6;
pub const SDL_CONTROLLER_BUTTON_LEFTSTICK: SDL_GameControllerButton = 7;
pub const SDL_CONTROLLER_BUTTON_RIGHTSTICK: SDL_GameControllerButton = 8;
pub const SDL_CONTROLLER_BUTTON_LEFTSHOULDER: SDL_GameControllerButton = 9;
pub const SDL_CONTROLLER_BUTTON_RIGHTSHOULDER: SDL_GameControllerButton = 10;
pub const SDL_CONTROLLER_BUTTON_DPAD_UP: SDL_GameControllerButton = 11;
pub const SDL_CONTROLLER_BUTTON_DPAD_DOWN: SDL_GameControllerButton = 12;
pub const SDL_CONTROLLER_BUTTON_DPAD_LEFT: SDL_GameControllerButton = 13;
pub const SDL_CONTROLLER_BUTTON_DPAD_RIGHT: SDL_GameControllerButton = 14;
pub const SDL_CONTROLLER_BUTTON_MAX: SDL_GameControllerButton = 15;
pub type SDL_GameControllerButton = i32;
extern "C" {
pub fn SDL_GameControllerGetButtonFromString(
pchString: *const winapi::ctypes::c_char,
) -> SDL_GameControllerButton;
}
extern "C" {
pub fn SDL_GameControllerGetStringForButton(
button: SDL_GameControllerButton,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GameControllerGetBindForButton(
gamecontroller: *mut SDL_GameController,
button: SDL_GameControllerButton,
) -> SDL_GameControllerButtonBind;
}
extern "C" {
pub fn SDL_GameControllerGetButton(
gamecontroller: *mut SDL_GameController,
button: SDL_GameControllerButton,
) -> Uint8;
}
extern "C" {
pub fn SDL_GameControllerRumble(
gamecontroller: *mut SDL_GameController,
low_frequency_rumble: Uint16,
high_frequency_rumble: Uint16,
duration_ms: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GameControllerClose(gamecontroller: *mut SDL_GameController);
}
pub type SDL_TouchID = Sint64;
pub type SDL_FingerID = Sint64;
pub const SDL_TOUCH_DEVICE_INVALID: SDL_TouchDeviceType = -1;
pub const SDL_TOUCH_DEVICE_DIRECT: SDL_TouchDeviceType = 0;
pub const SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE: SDL_TouchDeviceType = 1;
pub const SDL_TOUCH_DEVICE_INDIRECT_RELATIVE: SDL_TouchDeviceType = 2;
pub type SDL_TouchDeviceType = i32;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_Finger {
pub id: SDL_FingerID,
pub x: f32,
pub y: f32,
pub pressure: f32,
}
#[test]
fn bindgen_test_layout_SDL_Finger() {
assert_eq!(
::core::mem::size_of::<SDL_Finger>(),
20usize,
concat!("Size of: ", stringify!(SDL_Finger))
);
assert_eq!(
::core::mem::align_of::<SDL_Finger>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Finger))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Finger>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Finger),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Finger>())).x as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_Finger),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Finger>())).y as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_Finger),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Finger>())).pressure as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_Finger),
"::",
stringify!(pressure)
)
);
}
extern "C" {
pub fn SDL_GetNumTouchDevices() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetTouchDevice(index: winapi::ctypes::c_int) -> SDL_TouchID;
}
extern "C" {
pub fn SDL_GetTouchDeviceType(touchID: SDL_TouchID) -> SDL_TouchDeviceType;
}
extern "C" {
pub fn SDL_GetNumTouchFingers(touchID: SDL_TouchID) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetTouchFinger(touchID: SDL_TouchID, index: winapi::ctypes::c_int) -> *mut SDL_Finger;
}
pub type SDL_GestureID = Sint64;
extern "C" {
pub fn SDL_RecordGesture(touchId: SDL_TouchID) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SaveAllDollarTemplates(dst: *mut SDL_RWops) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SaveDollarTemplate(
gestureId: SDL_GestureID,
dst: *mut SDL_RWops,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_LoadDollarTemplates(
touchId: SDL_TouchID,
src: *mut SDL_RWops,
) -> winapi::ctypes::c_int;
}
pub const SDL_FIRSTEVENT: SDL_EventType = 0;
pub const SDL_QUIT: SDL_EventType = 256;
pub const SDL_APP_TERMINATING: SDL_EventType = 257;
pub const SDL_APP_LOWMEMORY: SDL_EventType = 258;
pub const SDL_APP_WILLENTERBACKGROUND: SDL_EventType = 259;
pub const SDL_APP_DIDENTERBACKGROUND: SDL_EventType = 260;
pub const SDL_APP_WILLENTERFOREGROUND: SDL_EventType = 261;
pub const SDL_APP_DIDENTERFOREGROUND: SDL_EventType = 262;
pub const SDL_DISPLAYEVENT: SDL_EventType = 336;
pub const SDL_WINDOWEVENT: SDL_EventType = 512;
pub const SDL_SYSWMEVENT: SDL_EventType = 513;
pub const SDL_KEYDOWN: SDL_EventType = 768;
pub const SDL_KEYUP: SDL_EventType = 769;
pub const SDL_TEXTEDITING: SDL_EventType = 770;
pub const SDL_TEXTINPUT: SDL_EventType = 771;
pub const SDL_KEYMAPCHANGED: SDL_EventType = 772;
pub const SDL_MOUSEMOTION: SDL_EventType = 1024;
pub const SDL_MOUSEBUTTONDOWN: SDL_EventType = 1025;
pub const SDL_MOUSEBUTTONUP: SDL_EventType = 1026;
pub const SDL_MOUSEWHEEL: SDL_EventType = 1027;
pub const SDL_JOYAXISMOTION: SDL_EventType = 1536;
pub const SDL_JOYBALLMOTION: SDL_EventType = 1537;
pub const SDL_JOYHATMOTION: SDL_EventType = 1538;
pub const SDL_JOYBUTTONDOWN: SDL_EventType = 1539;
pub const SDL_JOYBUTTONUP: SDL_EventType = 1540;
pub const SDL_JOYDEVICEADDED: SDL_EventType = 1541;
pub const SDL_JOYDEVICEREMOVED: SDL_EventType = 1542;
pub const SDL_CONTROLLERAXISMOTION: SDL_EventType = 1616;
pub const SDL_CONTROLLERBUTTONDOWN: SDL_EventType = 1617;
pub const SDL_CONTROLLERBUTTONUP: SDL_EventType = 1618;
pub const SDL_CONTROLLERDEVICEADDED: SDL_EventType = 1619;
pub const SDL_CONTROLLERDEVICEREMOVED: SDL_EventType = 1620;
pub const SDL_CONTROLLERDEVICEREMAPPED: SDL_EventType = 1621;
pub const SDL_FINGERDOWN: SDL_EventType = 1792;
pub const SDL_FINGERUP: SDL_EventType = 1793;
pub const SDL_FINGERMOTION: SDL_EventType = 1794;
pub const SDL_DOLLARGESTURE: SDL_EventType = 2048;
pub const SDL_DOLLARRECORD: SDL_EventType = 2049;
pub const SDL_MULTIGESTURE: SDL_EventType = 2050;
pub const SDL_CLIPBOARDUPDATE: SDL_EventType = 2304;
pub const SDL_DROPFILE: SDL_EventType = 4096;
pub const SDL_DROPTEXT: SDL_EventType = 4097;
pub const SDL_DROPBEGIN: SDL_EventType = 4098;
pub const SDL_DROPCOMPLETE: SDL_EventType = 4099;
pub const SDL_AUDIODEVICEADDED: SDL_EventType = 4352;
pub const SDL_AUDIODEVICEREMOVED: SDL_EventType = 4353;
pub const SDL_SENSORUPDATE: SDL_EventType = 4608;
pub const SDL_RENDER_TARGETS_RESET: SDL_EventType = 8192;
pub const SDL_RENDER_DEVICE_RESET: SDL_EventType = 8193;
pub const SDL_USEREVENT: SDL_EventType = 32768;
pub const SDL_LASTEVENT: SDL_EventType = 65535;
pub type SDL_EventType = i32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_CommonEvent {
pub type_: Uint32,
pub timestamp: Uint32,
}
#[test]
fn bindgen_test_layout_SDL_CommonEvent() {
assert_eq!(
::core::mem::size_of::<SDL_CommonEvent>(),
8usize,
concat!("Size of: ", stringify!(SDL_CommonEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_CommonEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_CommonEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_CommonEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_CommonEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_CommonEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_CommonEvent),
"::",
stringify!(timestamp)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_DisplayEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub display: Uint32,
pub event: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
pub data1: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_DisplayEvent() {
assert_eq!(
::core::mem::size_of::<SDL_DisplayEvent>(),
20usize,
concat!("Size of: ", stringify!(SDL_DisplayEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_DisplayEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_DisplayEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).display as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(display)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).event as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(event)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).padding1 as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(padding3)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DisplayEvent>())).data1 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_DisplayEvent),
"::",
stringify!(data1)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_WindowEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub event: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
pub data1: Sint32,
pub data2: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_WindowEvent() {
assert_eq!(
::core::mem::size_of::<SDL_WindowEvent>(),
24usize,
concat!("Size of: ", stringify!(SDL_WindowEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_WindowEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_WindowEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).event as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(event)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).padding1 as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(padding3)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).data1 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(data1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowEvent>())).data2 as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowEvent),
"::",
stringify!(data2)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_KeyboardEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub state: Uint8,
pub repeat: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
pub keysym: SDL_Keysym,
}
#[test]
fn bindgen_test_layout_SDL_KeyboardEvent() {
assert_eq!(
::core::mem::size_of::<SDL_KeyboardEvent>(),
32usize,
concat!("Size of: ", stringify!(SDL_KeyboardEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_KeyboardEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_KeyboardEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).state as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).repeat as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(repeat)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(padding3)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_KeyboardEvent>())).keysym as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_KeyboardEvent),
"::",
stringify!(keysym)
)
);
}
impl Default for SDL_KeyboardEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_TextEditingEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub text: [winapi::ctypes::c_char; 32usize],
pub start: Sint32,
pub length: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_TextEditingEvent() {
assert_eq!(
::core::mem::size_of::<SDL_TextEditingEvent>(),
52usize,
concat!("Size of: ", stringify!(SDL_TextEditingEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_TextEditingEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_TextEditingEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextEditingEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextEditingEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextEditingEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextEditingEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextEditingEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextEditingEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextEditingEvent>())).text as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextEditingEvent),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextEditingEvent>())).start as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextEditingEvent),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextEditingEvent>())).length as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextEditingEvent),
"::",
stringify!(length)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_TextInputEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub text: [winapi::ctypes::c_char; 32usize],
}
#[test]
fn bindgen_test_layout_SDL_TextInputEvent() {
assert_eq!(
::core::mem::size_of::<SDL_TextInputEvent>(),
44usize,
concat!("Size of: ", stringify!(SDL_TextInputEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_TextInputEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_TextInputEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextInputEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextInputEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextInputEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextInputEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextInputEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextInputEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TextInputEvent>())).text as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_TextInputEvent),
"::",
stringify!(text)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_MouseMotionEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub which: Uint32,
pub state: Uint32,
pub x: Sint32,
pub y: Sint32,
pub xrel: Sint32,
pub yrel: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_MouseMotionEvent() {
assert_eq!(
::core::mem::size_of::<SDL_MouseMotionEvent>(),
36usize,
concat!("Size of: ", stringify!(SDL_MouseMotionEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_MouseMotionEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_MouseMotionEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).which as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).state as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).x as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).y as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).xrel as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(xrel)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseMotionEvent>())).yrel as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseMotionEvent),
"::",
stringify!(yrel)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_MouseButtonEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub which: Uint32,
pub button: Uint8,
pub state: Uint8,
pub clicks: Uint8,
pub padding1: Uint8,
pub x: Sint32,
pub y: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_MouseButtonEvent() {
assert_eq!(
::core::mem::size_of::<SDL_MouseButtonEvent>(),
28usize,
concat!("Size of: ", stringify!(SDL_MouseButtonEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_MouseButtonEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_MouseButtonEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).which as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).button as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).state as *const _ as usize },
17usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).clicks as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(clicks)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).padding1 as *const _ as usize },
19usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).x as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseButtonEvent>())).y as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseButtonEvent),
"::",
stringify!(y)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_MouseWheelEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub which: Uint32,
pub x: Sint32,
pub y: Sint32,
pub direction: Uint32,
}
#[test]
fn bindgen_test_layout_SDL_MouseWheelEvent() {
assert_eq!(
::core::mem::size_of::<SDL_MouseWheelEvent>(),
28usize,
concat!("Size of: ", stringify!(SDL_MouseWheelEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_MouseWheelEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_MouseWheelEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).which as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).x as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).y as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MouseWheelEvent>())).direction as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_MouseWheelEvent),
"::",
stringify!(direction)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_JoyAxisEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub axis: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
pub value: Sint16,
pub padding4: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_JoyAxisEvent() {
assert_eq!(
::core::mem::size_of::<SDL_JoyAxisEvent>(),
20usize,
concat!("Size of: ", stringify!(SDL_JoyAxisEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_JoyAxisEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_JoyAxisEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).axis as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(axis)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).padding1 as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(padding3)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).value as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyAxisEvent>())).padding4 as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyAxisEvent),
"::",
stringify!(padding4)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_JoyBallEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub ball: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
pub xrel: Sint16,
pub yrel: Sint16,
}
#[test]
fn bindgen_test_layout_SDL_JoyBallEvent() {
assert_eq!(
::core::mem::size_of::<SDL_JoyBallEvent>(),
20usize,
concat!("Size of: ", stringify!(SDL_JoyBallEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_JoyBallEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_JoyBallEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).ball as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(ball)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).padding1 as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(padding3)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).xrel as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(xrel)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyBallEvent>())).yrel as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyBallEvent),
"::",
stringify!(yrel)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_JoyHatEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub hat: Uint8,
pub value: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_JoyHatEvent() {
assert_eq!(
::core::mem::size_of::<SDL_JoyHatEvent>(),
16usize,
concat!("Size of: ", stringify!(SDL_JoyHatEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_JoyHatEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_JoyHatEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).hat as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(hat)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).value as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).padding1 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyHatEvent>())).padding2 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyHatEvent),
"::",
stringify!(padding2)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_JoyButtonEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub button: Uint8,
pub state: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_JoyButtonEvent() {
assert_eq!(
::core::mem::size_of::<SDL_JoyButtonEvent>(),
16usize,
concat!("Size of: ", stringify!(SDL_JoyButtonEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_JoyButtonEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_JoyButtonEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).button as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).state as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).padding1 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyButtonEvent>())).padding2 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyButtonEvent),
"::",
stringify!(padding2)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_JoyDeviceEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_JoyDeviceEvent() {
assert_eq!(
::core::mem::size_of::<SDL_JoyDeviceEvent>(),
12usize,
concat!("Size of: ", stringify!(SDL_JoyDeviceEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_JoyDeviceEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_JoyDeviceEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyDeviceEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyDeviceEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyDeviceEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyDeviceEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_JoyDeviceEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_JoyDeviceEvent),
"::",
stringify!(which)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_ControllerAxisEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub axis: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
pub value: Sint16,
pub padding4: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_ControllerAxisEvent() {
assert_eq!(
::core::mem::size_of::<SDL_ControllerAxisEvent>(),
20usize,
concat!("Size of: ", stringify!(SDL_ControllerAxisEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_ControllerAxisEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_ControllerAxisEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).axis as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(axis)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).padding1 as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(padding3)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).value as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerAxisEvent>())).padding4 as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerAxisEvent),
"::",
stringify!(padding4)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_ControllerButtonEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: SDL_JoystickID,
pub button: Uint8,
pub state: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_ControllerButtonEvent() {
assert_eq!(
::core::mem::size_of::<SDL_ControllerButtonEvent>(),
16usize,
concat!("Size of: ", stringify!(SDL_ControllerButtonEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_ControllerButtonEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_ControllerButtonEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).timestamp as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).button as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).state as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).padding1 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerButtonEvent>())).padding2 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerButtonEvent),
"::",
stringify!(padding2)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_ControllerDeviceEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: Sint32,
}
#[test]
fn bindgen_test_layout_SDL_ControllerDeviceEvent() {
assert_eq!(
::core::mem::size_of::<SDL_ControllerDeviceEvent>(),
12usize,
concat!("Size of: ", stringify!(SDL_ControllerDeviceEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_ControllerDeviceEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_ControllerDeviceEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerDeviceEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerDeviceEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_ControllerDeviceEvent>())).timestamp as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerDeviceEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_ControllerDeviceEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_ControllerDeviceEvent),
"::",
stringify!(which)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_AudioDeviceEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: Uint32,
pub iscapture: Uint8,
pub padding1: Uint8,
pub padding2: Uint8,
pub padding3: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_AudioDeviceEvent() {
assert_eq!(
::core::mem::size_of::<SDL_AudioDeviceEvent>(),
16usize,
concat!("Size of: ", stringify!(SDL_AudioDeviceEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_AudioDeviceEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_AudioDeviceEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).iscapture as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(iscapture)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).padding1 as *const _ as usize },
13usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(padding1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).padding2 as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(padding2)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_AudioDeviceEvent>())).padding3 as *const _ as usize },
15usize,
concat!(
"Offset of field: ",
stringify!(SDL_AudioDeviceEvent),
"::",
stringify!(padding3)
)
);
}
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_TouchFingerEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub touchId: SDL_TouchID,
pub fingerId: SDL_FingerID,
pub x: f32,
pub y: f32,
pub dx: f32,
pub dy: f32,
pub pressure: f32,
}
#[test]
fn bindgen_test_layout_SDL_TouchFingerEvent() {
assert_eq!(
::core::mem::size_of::<SDL_TouchFingerEvent>(),
44usize,
concat!("Size of: ", stringify!(SDL_TouchFingerEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_TouchFingerEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_TouchFingerEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).touchId as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(touchId)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).fingerId as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(fingerId)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).x as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).y as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).dx as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(dx)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).dy as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(dy)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_TouchFingerEvent>())).pressure as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(SDL_TouchFingerEvent),
"::",
stringify!(pressure)
)
);
}
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_MultiGestureEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub touchId: SDL_TouchID,
pub dTheta: f32,
pub dDist: f32,
pub x: f32,
pub y: f32,
pub numFingers: Uint16,
pub padding: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_MultiGestureEvent() {
assert_eq!(
::core::mem::size_of::<SDL_MultiGestureEvent>(),
36usize,
concat!("Size of: ", stringify!(SDL_MultiGestureEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_MultiGestureEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_MultiGestureEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).touchId as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(touchId)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).dTheta as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(dTheta)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).dDist as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(dDist)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).x as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).y as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).numFingers as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(numFingers)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MultiGestureEvent>())).padding as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(SDL_MultiGestureEvent),
"::",
stringify!(padding)
)
);
}
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_DollarGestureEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub touchId: SDL_TouchID,
pub gestureId: SDL_GestureID,
pub numFingers: Uint32,
pub error: f32,
pub x: f32,
pub y: f32,
}
#[test]
fn bindgen_test_layout_SDL_DollarGestureEvent() {
assert_eq!(
::core::mem::size_of::<SDL_DollarGestureEvent>(),
40usize,
concat!("Size of: ", stringify!(SDL_DollarGestureEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_DollarGestureEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_DollarGestureEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).touchId as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(touchId)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).gestureId as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(gestureId)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).numFingers as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(numFingers)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).error as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).x as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DollarGestureEvent>())).y as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_DollarGestureEvent),
"::",
stringify!(y)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_DropEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub file: *mut winapi::ctypes::c_char,
pub windowID: Uint32,
}
#[test]
fn bindgen_test_layout_SDL_DropEvent() {
assert_eq!(
::core::mem::size_of::<SDL_DropEvent>(),
16usize,
concat!("Size of: ", stringify!(SDL_DropEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_DropEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_DropEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DropEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_DropEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DropEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_DropEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DropEvent>())).file as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_DropEvent),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_DropEvent>())).windowID as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_DropEvent),
"::",
stringify!(windowID)
)
);
}
impl Default for SDL_DropEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_SensorEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: Sint32,
pub data: [f32; 6usize],
}
#[test]
fn bindgen_test_layout_SDL_SensorEvent() {
assert_eq!(
::core::mem::size_of::<SDL_SensorEvent>(),
36usize,
concat!("Size of: ", stringify!(SDL_SensorEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_SensorEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_SensorEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SensorEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SensorEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SensorEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_SensorEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SensorEvent>())).which as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_SensorEvent),
"::",
stringify!(which)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SensorEvent>())).data as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_SensorEvent),
"::",
stringify!(data)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_QuitEvent {
pub type_: Uint32,
pub timestamp: Uint32,
}
#[test]
fn bindgen_test_layout_SDL_QuitEvent() {
assert_eq!(
::core::mem::size_of::<SDL_QuitEvent>(),
8usize,
concat!("Size of: ", stringify!(SDL_QuitEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_QuitEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_QuitEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_QuitEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_QuitEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_QuitEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_QuitEvent),
"::",
stringify!(timestamp)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_OSEvent {
pub type_: Uint32,
pub timestamp: Uint32,
}
#[test]
fn bindgen_test_layout_SDL_OSEvent() {
assert_eq!(
::core::mem::size_of::<SDL_OSEvent>(),
8usize,
concat!("Size of: ", stringify!(SDL_OSEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_OSEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_OSEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_OSEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_OSEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_OSEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_OSEvent),
"::",
stringify!(timestamp)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_UserEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub windowID: Uint32,
pub code: Sint32,
pub data1: *mut winapi::ctypes::c_void,
pub data2: *mut winapi::ctypes::c_void,
}
#[test]
fn bindgen_test_layout_SDL_UserEvent() {
assert_eq!(
::core::mem::size_of::<SDL_UserEvent>(),
24usize,
concat!("Size of: ", stringify!(SDL_UserEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_UserEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_UserEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_UserEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_UserEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_UserEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_UserEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_UserEvent>())).windowID as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_UserEvent),
"::",
stringify!(windowID)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_UserEvent>())).code as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_UserEvent),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_UserEvent>())).data1 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_UserEvent),
"::",
stringify!(data1)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_UserEvent>())).data2 as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_UserEvent),
"::",
stringify!(data2)
)
);
}
impl Default for SDL_UserEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_SysWMEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub msg: *mut SDL_SysWMmsg,
}
#[test]
fn bindgen_test_layout_SDL_SysWMEvent() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMEvent>(),
12usize,
concat!("Size of: ", stringify!(SDL_SysWMEvent))
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMEvent>(),
4usize,
concat!("Alignment of ", stringify!(SDL_SysWMEvent))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMEvent>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMEvent),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMEvent>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMEvent),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMEvent>())).msg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMEvent),
"::",
stringify!(msg)
)
);
}
impl Default for SDL_SysWMEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_Event {
pub type_: Uint32,
pub common: SDL_CommonEvent,
pub display: SDL_DisplayEvent,
pub window: SDL_WindowEvent,
pub key: SDL_KeyboardEvent,
pub edit: SDL_TextEditingEvent,
pub text: SDL_TextInputEvent,
pub motion: SDL_MouseMotionEvent,
pub button: SDL_MouseButtonEvent,
pub wheel: SDL_MouseWheelEvent,
pub jaxis: SDL_JoyAxisEvent,
pub jball: SDL_JoyBallEvent,
pub jhat: SDL_JoyHatEvent,
pub jbutton: SDL_JoyButtonEvent,
pub jdevice: SDL_JoyDeviceEvent,
pub caxis: SDL_ControllerAxisEvent,
pub cbutton: SDL_ControllerButtonEvent,
pub cdevice: SDL_ControllerDeviceEvent,
pub adevice: SDL_AudioDeviceEvent,
pub sensor: SDL_SensorEvent,
pub quit: SDL_QuitEvent,
pub user: SDL_UserEvent,
pub syswm: SDL_SysWMEvent,
pub tfinger: SDL_TouchFingerEvent,
pub mgesture: SDL_MultiGestureEvent,
pub dgesture: SDL_DollarGestureEvent,
pub drop: SDL_DropEvent,
pub padding: [Uint8; 56usize],
_bindgen_union_align: [u32; 14usize],
}
#[test]
fn bindgen_test_layout_SDL_Event() {
assert_eq!(
::core::mem::size_of::<SDL_Event>(),
56usize,
concat!("Size of: ", stringify!(SDL_Event))
);
assert_eq!(
::core::mem::align_of::<SDL_Event>(),
4usize,
concat!("Alignment of ", stringify!(SDL_Event))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).common as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(common)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).display as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(display)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).window as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(window)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).key as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(key)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).edit as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(edit)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).text as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).motion as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(motion)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).button as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).wheel as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(wheel)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).jaxis as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(jaxis)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).jball as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(jball)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).jhat as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(jhat)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).jbutton as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(jbutton)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).jdevice as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(jdevice)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).caxis as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(caxis)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).cbutton as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(cbutton)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).cdevice as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(cdevice)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).adevice as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(adevice)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).sensor as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(sensor)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).quit as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(quit)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).syswm as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(syswm)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).tfinger as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(tfinger)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).mgesture as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(mgesture)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).dgesture as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(dgesture)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).drop as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_Event>())).padding as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_Event),
"::",
stringify!(padding)
)
);
}
impl Default for SDL_Event {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_Event {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_Event {{ union }}")
}
}
pub type SDL_compile_time_assert_SDL_Event = [winapi::ctypes::c_int; 1usize];
extern "C" {
pub fn SDL_PumpEvents();
}
pub const SDL_ADDEVENT: SDL_eventaction = 0;
pub const SDL_PEEKEVENT: SDL_eventaction = 1;
pub const SDL_GETEVENT: SDL_eventaction = 2;
pub type SDL_eventaction = i32;
extern "C" {
pub fn SDL_PeepEvents(
events: *mut SDL_Event,
numevents: winapi::ctypes::c_int,
action: SDL_eventaction,
minType: Uint32,
maxType: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HasEvent(type_: Uint32) -> SDL_bool;
}
extern "C" {
pub fn SDL_HasEvents(minType: Uint32, maxType: Uint32) -> SDL_bool;
}
extern "C" {
pub fn SDL_FlushEvent(type_: Uint32);
}
extern "C" {
pub fn SDL_FlushEvents(minType: Uint32, maxType: Uint32);
}
extern "C" {
pub fn SDL_PollEvent(event: *mut SDL_Event) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_WaitEvent(event: *mut SDL_Event) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_WaitEventTimeout(
event: *mut SDL_Event,
timeout: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_PushEvent(event: *mut SDL_Event) -> winapi::ctypes::c_int;
}
pub type SDL_EventFilter = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut winapi::ctypes::c_void,
event: *mut SDL_Event,
) -> winapi::ctypes::c_int,
>;
extern "C" {
pub fn SDL_SetEventFilter(filter: SDL_EventFilter, userdata: *mut winapi::ctypes::c_void);
}
extern "C" {
pub fn SDL_GetEventFilter(
filter: *mut SDL_EventFilter,
userdata: *mut *mut winapi::ctypes::c_void,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_AddEventWatch(filter: SDL_EventFilter, userdata: *mut winapi::ctypes::c_void);
}
extern "C" {
pub fn SDL_DelEventWatch(filter: SDL_EventFilter, userdata: *mut winapi::ctypes::c_void);
}
extern "C" {
pub fn SDL_FilterEvents(filter: SDL_EventFilter, userdata: *mut winapi::ctypes::c_void);
}
extern "C" {
pub fn SDL_EventState(type_: Uint32, state: winapi::ctypes::c_int) -> Uint8;
}
extern "C" {
pub fn SDL_RegisterEvents(numevents: winapi::ctypes::c_int) -> Uint32;
}
extern "C" {
pub fn SDL_GetBasePath() -> *mut winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetPrefPath(
org: *const winapi::ctypes::c_char,
app: *const winapi::ctypes::c_char,
) -> *mut winapi::ctypes::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _SDL_Haptic {
_unused: [u8; 0],
}
pub type SDL_Haptic = _SDL_Haptic;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_HapticDirection {
pub type_: Uint8,
pub dir: [Sint32; 3usize],
}
#[test]
fn bindgen_test_layout_SDL_HapticDirection() {
assert_eq!(
::core::mem::size_of::<SDL_HapticDirection>(),
16usize,
concat!("Size of: ", stringify!(SDL_HapticDirection))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticDirection>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticDirection))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticDirection>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticDirection),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticDirection>())).dir as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticDirection),
"::",
stringify!(dir)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_HapticConstant {
pub type_: Uint16,
pub direction: SDL_HapticDirection,
pub length: Uint32,
pub delay: Uint16,
pub button: Uint16,
pub interval: Uint16,
pub level: Sint16,
pub attack_length: Uint16,
pub attack_level: Uint16,
pub fade_length: Uint16,
pub fade_level: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_HapticConstant() {
assert_eq!(
::core::mem::size_of::<SDL_HapticConstant>(),
40usize,
concat!("Size of: ", stringify!(SDL_HapticConstant))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticConstant>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticConstant))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).direction as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).length as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).delay as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(delay)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).button as *const _ as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).interval as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).level as *const _ as usize },
30usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(level)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).attack_length as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(attack_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).attack_level as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(attack_level)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).fade_length as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(fade_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticConstant>())).fade_level as *const _ as usize },
38usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticConstant),
"::",
stringify!(fade_level)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_HapticPeriodic {
pub type_: Uint16,
pub direction: SDL_HapticDirection,
pub length: Uint32,
pub delay: Uint16,
pub button: Uint16,
pub interval: Uint16,
pub period: Uint16,
pub magnitude: Sint16,
pub offset: Sint16,
pub phase: Uint16,
pub attack_length: Uint16,
pub attack_level: Uint16,
pub fade_length: Uint16,
pub fade_level: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_HapticPeriodic() {
assert_eq!(
::core::mem::size_of::<SDL_HapticPeriodic>(),
48usize,
concat!("Size of: ", stringify!(SDL_HapticPeriodic))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticPeriodic>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticPeriodic))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).direction as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).length as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).delay as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(delay)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).button as *const _ as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).interval as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).period as *const _ as usize },
30usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(period)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).magnitude as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(magnitude)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).offset as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).phase as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(phase)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).attack_length as *const _ as usize },
38usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(attack_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).attack_level as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(attack_level)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).fade_length as *const _ as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(fade_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticPeriodic>())).fade_level as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticPeriodic),
"::",
stringify!(fade_level)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_HapticCondition {
pub type_: Uint16,
pub direction: SDL_HapticDirection,
pub length: Uint32,
pub delay: Uint16,
pub button: Uint16,
pub interval: Uint16,
pub right_sat: [Uint16; 3usize],
pub left_sat: [Uint16; 3usize],
pub right_coeff: [Sint16; 3usize],
pub left_coeff: [Sint16; 3usize],
pub deadband: [Uint16; 3usize],
pub center: [Sint16; 3usize],
}
#[test]
fn bindgen_test_layout_SDL_HapticCondition() {
assert_eq!(
::core::mem::size_of::<SDL_HapticCondition>(),
68usize,
concat!("Size of: ", stringify!(SDL_HapticCondition))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticCondition>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticCondition))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).direction as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).length as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).delay as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(delay)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).button as *const _ as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).interval as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).right_sat as *const _ as usize },
30usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(right_sat)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).left_sat as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(left_sat)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).right_coeff as *const _ as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(right_coeff)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).left_coeff as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(left_coeff)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).deadband as *const _ as usize },
54usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(deadband)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCondition>())).center as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCondition),
"::",
stringify!(center)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_HapticRamp {
pub type_: Uint16,
pub direction: SDL_HapticDirection,
pub length: Uint32,
pub delay: Uint16,
pub button: Uint16,
pub interval: Uint16,
pub start: Sint16,
pub end: Sint16,
pub attack_length: Uint16,
pub attack_level: Uint16,
pub fade_length: Uint16,
pub fade_level: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_HapticRamp() {
assert_eq!(
::core::mem::size_of::<SDL_HapticRamp>(),
44usize,
concat!("Size of: ", stringify!(SDL_HapticRamp))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticRamp>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticRamp))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).direction as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).length as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).delay as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(delay)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).button as *const _ as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).interval as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).start as *const _ as usize },
30usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).end as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(end)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).attack_length as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(attack_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).attack_level as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(attack_level)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).fade_length as *const _ as usize },
38usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(fade_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticRamp>())).fade_level as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticRamp),
"::",
stringify!(fade_level)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_HapticLeftRight {
pub type_: Uint16,
pub length: Uint32,
pub large_magnitude: Uint16,
pub small_magnitude: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_HapticLeftRight() {
assert_eq!(
::core::mem::size_of::<SDL_HapticLeftRight>(),
12usize,
concat!("Size of: ", stringify!(SDL_HapticLeftRight))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticLeftRight>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticLeftRight))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticLeftRight>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticLeftRight),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticLeftRight>())).length as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticLeftRight),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_HapticLeftRight>())).large_magnitude as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticLeftRight),
"::",
stringify!(large_magnitude)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_HapticLeftRight>())).small_magnitude as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticLeftRight),
"::",
stringify!(small_magnitude)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_HapticCustom {
pub type_: Uint16,
pub direction: SDL_HapticDirection,
pub length: Uint32,
pub delay: Uint16,
pub button: Uint16,
pub interval: Uint16,
pub channels: Uint8,
pub period: Uint16,
pub samples: Uint16,
pub data: *mut Uint16,
pub attack_length: Uint16,
pub attack_level: Uint16,
pub fade_length: Uint16,
pub fade_level: Uint16,
}
#[test]
fn bindgen_test_layout_SDL_HapticCustom() {
assert_eq!(
::core::mem::size_of::<SDL_HapticCustom>(),
48usize,
concat!("Size of: ", stringify!(SDL_HapticCustom))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticCustom>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticCustom))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).direction as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).length as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).delay as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(delay)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).button as *const _ as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(button)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).interval as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(interval)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).channels as *const _ as usize },
30usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(channels)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).period as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(period)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).samples as *const _ as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(samples)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).data as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).attack_length as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(attack_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).attack_level as *const _ as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(attack_level)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).fade_length as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(fade_length)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticCustom>())).fade_level as *const _ as usize },
46usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticCustom),
"::",
stringify!(fade_level)
)
);
}
impl Default for SDL_HapticCustom {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_HapticEffect {
pub type_: Uint16,
pub constant: SDL_HapticConstant,
pub periodic: SDL_HapticPeriodic,
pub condition: SDL_HapticCondition,
pub ramp: SDL_HapticRamp,
pub leftright: SDL_HapticLeftRight,
pub custom: SDL_HapticCustom,
_bindgen_union_align: [u32; 17usize],
}
#[test]
fn bindgen_test_layout_SDL_HapticEffect() {
assert_eq!(
::core::mem::size_of::<SDL_HapticEffect>(),
68usize,
concat!("Size of: ", stringify!(SDL_HapticEffect))
);
assert_eq!(
::core::mem::align_of::<SDL_HapticEffect>(),
4usize,
concat!("Alignment of ", stringify!(SDL_HapticEffect))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).constant as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(constant)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).periodic as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(periodic)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).condition as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(condition)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).ramp as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(ramp)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).leftright as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(leftright)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_HapticEffect>())).custom as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_HapticEffect),
"::",
stringify!(custom)
)
);
}
impl Default for SDL_HapticEffect {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_HapticEffect {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_HapticEffect {{ union }}")
}
}
extern "C" {
pub fn SDL_NumHaptics() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticName(device_index: winapi::ctypes::c_int) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_HapticOpen(device_index: winapi::ctypes::c_int) -> *mut SDL_Haptic;
}
extern "C" {
pub fn SDL_HapticOpened(device_index: winapi::ctypes::c_int) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticIndex(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_MouseIsHaptic() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticOpenFromMouse() -> *mut SDL_Haptic;
}
extern "C" {
pub fn SDL_JoystickIsHaptic(joystick: *mut SDL_Joystick) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticOpenFromJoystick(joystick: *mut SDL_Joystick) -> *mut SDL_Haptic;
}
extern "C" {
pub fn SDL_HapticClose(haptic: *mut SDL_Haptic);
}
extern "C" {
pub fn SDL_HapticNumEffects(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticNumEffectsPlaying(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticQuery(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_uint;
}
extern "C" {
pub fn SDL_HapticNumAxes(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticEffectSupported(
haptic: *mut SDL_Haptic,
effect: *mut SDL_HapticEffect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticNewEffect(
haptic: *mut SDL_Haptic,
effect: *mut SDL_HapticEffect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticUpdateEffect(
haptic: *mut SDL_Haptic,
effect: winapi::ctypes::c_int,
data: *mut SDL_HapticEffect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticRunEffect(
haptic: *mut SDL_Haptic,
effect: winapi::ctypes::c_int,
iterations: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticStopEffect(
haptic: *mut SDL_Haptic,
effect: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticDestroyEffect(haptic: *mut SDL_Haptic, effect: winapi::ctypes::c_int);
}
extern "C" {
pub fn SDL_HapticGetEffectStatus(
haptic: *mut SDL_Haptic,
effect: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticSetGain(
haptic: *mut SDL_Haptic,
gain: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticSetAutocenter(
haptic: *mut SDL_Haptic,
autocenter: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticPause(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticUnpause(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticStopAll(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticRumbleSupported(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticRumbleInit(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticRumblePlay(
haptic: *mut SDL_Haptic,
strength: f32,
length: Uint32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_HapticRumbleStop(haptic: *mut SDL_Haptic) -> winapi::ctypes::c_int;
}
pub const SDL_HINT_DEFAULT: SDL_HintPriority = 0;
pub const SDL_HINT_NORMAL: SDL_HintPriority = 1;
pub const SDL_HINT_OVERRIDE: SDL_HintPriority = 2;
pub type SDL_HintPriority = i32;
extern "C" {
pub fn SDL_SetHintWithPriority(
name: *const winapi::ctypes::c_char,
value: *const winapi::ctypes::c_char,
priority: SDL_HintPriority,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_SetHint(
name: *const winapi::ctypes::c_char,
value: *const winapi::ctypes::c_char,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_GetHint(name: *const winapi::ctypes::c_char) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetHintBoolean(
name: *const winapi::ctypes::c_char,
default_value: SDL_bool,
) -> SDL_bool;
}
pub type SDL_HintCallback = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut winapi::ctypes::c_void,
name: *const winapi::ctypes::c_char,
oldValue: *const winapi::ctypes::c_char,
newValue: *const winapi::ctypes::c_char,
),
>;
extern "C" {
pub fn SDL_AddHintCallback(
name: *const winapi::ctypes::c_char,
callback: SDL_HintCallback,
userdata: *mut winapi::ctypes::c_void,
);
}
extern "C" {
pub fn SDL_DelHintCallback(
name: *const winapi::ctypes::c_char,
callback: SDL_HintCallback,
userdata: *mut winapi::ctypes::c_void,
);
}
extern "C" {
pub fn SDL_ClearHints();
}
extern "C" {
pub fn SDL_LoadObject(sofile: *const winapi::ctypes::c_char) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_LoadFunction(
handle: *mut winapi::ctypes::c_void,
name: *const winapi::ctypes::c_char,
) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_UnloadObject(handle: *mut winapi::ctypes::c_void);
}
pub const SDL_LOG_CATEGORY_APPLICATION: _bindgen_ty_7 = 0;
pub const SDL_LOG_CATEGORY_ERROR: _bindgen_ty_7 = 1;
pub const SDL_LOG_CATEGORY_ASSERT: _bindgen_ty_7 = 2;
pub const SDL_LOG_CATEGORY_SYSTEM: _bindgen_ty_7 = 3;
pub const SDL_LOG_CATEGORY_AUDIO: _bindgen_ty_7 = 4;
pub const SDL_LOG_CATEGORY_VIDEO: _bindgen_ty_7 = 5;
pub const SDL_LOG_CATEGORY_RENDER: _bindgen_ty_7 = 6;
pub const SDL_LOG_CATEGORY_INPUT: _bindgen_ty_7 = 7;
pub const SDL_LOG_CATEGORY_TEST: _bindgen_ty_7 = 8;
pub const SDL_LOG_CATEGORY_RESERVED1: _bindgen_ty_7 = 9;
pub const SDL_LOG_CATEGORY_RESERVED2: _bindgen_ty_7 = 10;
pub const SDL_LOG_CATEGORY_RESERVED3: _bindgen_ty_7 = 11;
pub const SDL_LOG_CATEGORY_RESERVED4: _bindgen_ty_7 = 12;
pub const SDL_LOG_CATEGORY_RESERVED5: _bindgen_ty_7 = 13;
pub const SDL_LOG_CATEGORY_RESERVED6: _bindgen_ty_7 = 14;
pub const SDL_LOG_CATEGORY_RESERVED7: _bindgen_ty_7 = 15;
pub const SDL_LOG_CATEGORY_RESERVED8: _bindgen_ty_7 = 16;
pub const SDL_LOG_CATEGORY_RESERVED9: _bindgen_ty_7 = 17;
pub const SDL_LOG_CATEGORY_RESERVED10: _bindgen_ty_7 = 18;
pub const SDL_LOG_CATEGORY_CUSTOM: _bindgen_ty_7 = 19;
pub type _bindgen_ty_7 = i32;
pub const SDL_LOG_PRIORITY_VERBOSE: SDL_LogPriority = 1;
pub const SDL_LOG_PRIORITY_DEBUG: SDL_LogPriority = 2;
pub const SDL_LOG_PRIORITY_INFO: SDL_LogPriority = 3;
pub const SDL_LOG_PRIORITY_WARN: SDL_LogPriority = 4;
pub const SDL_LOG_PRIORITY_ERROR: SDL_LogPriority = 5;
pub const SDL_LOG_PRIORITY_CRITICAL: SDL_LogPriority = 6;
pub const SDL_NUM_LOG_PRIORITIES: SDL_LogPriority = 7;
pub type SDL_LogPriority = i32;
extern "C" {
pub fn SDL_LogSetAllPriority(priority: SDL_LogPriority);
}
extern "C" {
pub fn SDL_LogSetPriority(category: winapi::ctypes::c_int, priority: SDL_LogPriority);
}
extern "C" {
pub fn SDL_LogGetPriority(category: winapi::ctypes::c_int) -> SDL_LogPriority;
}
extern "C" {
pub fn SDL_LogResetPriorities();
}
extern "C" {
pub fn SDL_Log(fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogVerbose(category: winapi::ctypes::c_int, fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogDebug(category: winapi::ctypes::c_int, fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogInfo(category: winapi::ctypes::c_int, fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogWarn(category: winapi::ctypes::c_int, fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogError(category: winapi::ctypes::c_int, fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogCritical(category: winapi::ctypes::c_int, fmt: *const winapi::ctypes::c_char, ...);
}
extern "C" {
pub fn SDL_LogMessage(
category: winapi::ctypes::c_int,
priority: SDL_LogPriority,
fmt: *const winapi::ctypes::c_char,
...
);
}
extern "C" {
pub fn SDL_LogMessageV(
category: winapi::ctypes::c_int,
priority: SDL_LogPriority,
fmt: *const winapi::ctypes::c_char,
ap: va_list,
);
}
pub type SDL_LogOutputFunction = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut winapi::ctypes::c_void,
category: winapi::ctypes::c_int,
priority: SDL_LogPriority,
message: *const winapi::ctypes::c_char,
),
>;
extern "C" {
pub fn SDL_LogGetOutputFunction(
callback: *mut SDL_LogOutputFunction,
userdata: *mut *mut winapi::ctypes::c_void,
);
}
extern "C" {
pub fn SDL_LogSetOutputFunction(
callback: SDL_LogOutputFunction,
userdata: *mut winapi::ctypes::c_void,
);
}
pub const SDL_MESSAGEBOX_ERROR: SDL_MessageBoxFlags = 16;
pub const SDL_MESSAGEBOX_WARNING: SDL_MessageBoxFlags = 32;
pub const SDL_MESSAGEBOX_INFORMATION: SDL_MessageBoxFlags = 64;
pub type SDL_MessageBoxFlags = i32;
pub const SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT: SDL_MessageBoxButtonFlags = 1;
pub const SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT: SDL_MessageBoxButtonFlags = 2;
pub type SDL_MessageBoxButtonFlags = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_MessageBoxButtonData {
pub flags: Uint32,
pub buttonid: winapi::ctypes::c_int,
pub text: *const winapi::ctypes::c_char,
}
#[test]
fn bindgen_test_layout_SDL_MessageBoxButtonData() {
assert_eq!(
::core::mem::size_of::<SDL_MessageBoxButtonData>(),
12usize,
concat!("Size of: ", stringify!(SDL_MessageBoxButtonData))
);
assert_eq!(
::core::mem::align_of::<SDL_MessageBoxButtonData>(),
4usize,
concat!("Alignment of ", stringify!(SDL_MessageBoxButtonData))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxButtonData>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxButtonData),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxButtonData>())).buttonid as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxButtonData),
"::",
stringify!(buttonid)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxButtonData>())).text as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxButtonData),
"::",
stringify!(text)
)
);
}
impl Default for SDL_MessageBoxButtonData {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_MessageBoxColor {
pub r: Uint8,
pub g: Uint8,
pub b: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_MessageBoxColor() {
assert_eq!(
::core::mem::size_of::<SDL_MessageBoxColor>(),
3usize,
concat!("Size of: ", stringify!(SDL_MessageBoxColor))
);
assert_eq!(
::core::mem::align_of::<SDL_MessageBoxColor>(),
1usize,
concat!("Alignment of ", stringify!(SDL_MessageBoxColor))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxColor>())).r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxColor),
"::",
stringify!(r)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxColor>())).g as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxColor),
"::",
stringify!(g)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxColor>())).b as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxColor),
"::",
stringify!(b)
)
);
}
pub const SDL_MESSAGEBOX_COLOR_BACKGROUND: SDL_MessageBoxColorType = 0;
pub const SDL_MESSAGEBOX_COLOR_TEXT: SDL_MessageBoxColorType = 1;
pub const SDL_MESSAGEBOX_COLOR_BUTTON_BORDER: SDL_MessageBoxColorType = 2;
pub const SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND: SDL_MessageBoxColorType = 3;
pub const SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED: SDL_MessageBoxColorType = 4;
pub const SDL_MESSAGEBOX_COLOR_MAX: SDL_MessageBoxColorType = 5;
pub type SDL_MessageBoxColorType = i32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_MessageBoxColorScheme {
pub colors: [SDL_MessageBoxColor; 5usize],
}
#[test]
fn bindgen_test_layout_SDL_MessageBoxColorScheme() {
assert_eq!(
::core::mem::size_of::<SDL_MessageBoxColorScheme>(),
15usize,
concat!("Size of: ", stringify!(SDL_MessageBoxColorScheme))
);
assert_eq!(
::core::mem::align_of::<SDL_MessageBoxColorScheme>(),
1usize,
concat!("Alignment of ", stringify!(SDL_MessageBoxColorScheme))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxColorScheme>())).colors as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxColorScheme),
"::",
stringify!(colors)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_MessageBoxData {
pub flags: Uint32,
pub window: *mut SDL_Window,
pub title: *const winapi::ctypes::c_char,
pub message: *const winapi::ctypes::c_char,
pub numbuttons: winapi::ctypes::c_int,
pub buttons: *const SDL_MessageBoxButtonData,
pub colorScheme: *const SDL_MessageBoxColorScheme,
}
#[test]
fn bindgen_test_layout_SDL_MessageBoxData() {
assert_eq!(
::core::mem::size_of::<SDL_MessageBoxData>(),
28usize,
concat!("Size of: ", stringify!(SDL_MessageBoxData))
);
assert_eq!(
::core::mem::align_of::<SDL_MessageBoxData>(),
4usize,
concat!("Alignment of ", stringify!(SDL_MessageBoxData))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).window as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(window)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).title as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(title)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).message as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(message)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).numbuttons as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(numbuttons)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).buttons as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(buttons)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_MessageBoxData>())).colorScheme as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(SDL_MessageBoxData),
"::",
stringify!(colorScheme)
)
);
}
impl Default for SDL_MessageBoxData {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn SDL_ShowMessageBox(
messageboxdata: *const SDL_MessageBoxData,
buttonid: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_ShowSimpleMessageBox(
flags: Uint32,
title: *const winapi::ctypes::c_char,
message: *const winapi::ctypes::c_char,
window: *mut SDL_Window,
) -> winapi::ctypes::c_int;
}
pub const SDL_POWERSTATE_UNKNOWN: SDL_PowerState = 0;
pub const SDL_POWERSTATE_ON_BATTERY: SDL_PowerState = 1;
pub const SDL_POWERSTATE_NO_BATTERY: SDL_PowerState = 2;
pub const SDL_POWERSTATE_CHARGING: SDL_PowerState = 3;
pub const SDL_POWERSTATE_CHARGED: SDL_PowerState = 4;
pub type SDL_PowerState = i32;
extern "C" {
pub fn SDL_GetPowerInfo(
secs: *mut winapi::ctypes::c_int,
pct: *mut winapi::ctypes::c_int,
) -> SDL_PowerState;
}
pub const SDL_RENDERER_SOFTWARE: SDL_RendererFlags = 1;
pub const SDL_RENDERER_ACCELERATED: SDL_RendererFlags = 2;
pub const SDL_RENDERER_PRESENTVSYNC: SDL_RendererFlags = 4;
pub const SDL_RENDERER_TARGETTEXTURE: SDL_RendererFlags = 8;
pub type SDL_RendererFlags = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_RendererInfo {
pub name: *const winapi::ctypes::c_char,
pub flags: Uint32,
pub num_texture_formats: Uint32,
pub texture_formats: [Uint32; 16usize],
pub max_texture_width: winapi::ctypes::c_int,
pub max_texture_height: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_SDL_RendererInfo() {
assert_eq!(
::core::mem::size_of::<SDL_RendererInfo>(),
84usize,
concat!("Size of: ", stringify!(SDL_RendererInfo))
);
assert_eq!(
::core::mem::align_of::<SDL_RendererInfo>(),
4usize,
concat!("Alignment of ", stringify!(SDL_RendererInfo))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RendererInfo>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_RendererInfo),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RendererInfo>())).flags as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_RendererInfo),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RendererInfo>())).num_texture_formats as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_RendererInfo),
"::",
stringify!(num_texture_formats)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RendererInfo>())).texture_formats as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_RendererInfo),
"::",
stringify!(texture_formats)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_RendererInfo>())).max_texture_width as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(SDL_RendererInfo),
"::",
stringify!(max_texture_width)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_RendererInfo>())).max_texture_height as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(SDL_RendererInfo),
"::",
stringify!(max_texture_height)
)
);
}
impl Default for SDL_RendererInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const SDL_TEXTUREACCESS_STATIC: SDL_TextureAccess = 0;
pub const SDL_TEXTUREACCESS_STREAMING: SDL_TextureAccess = 1;
pub const SDL_TEXTUREACCESS_TARGET: SDL_TextureAccess = 2;
pub type SDL_TextureAccess = i32;
pub const SDL_TEXTUREMODULATE_NONE: SDL_TextureModulate = 0;
pub const SDL_TEXTUREMODULATE_COLOR: SDL_TextureModulate = 1;
pub const SDL_TEXTUREMODULATE_ALPHA: SDL_TextureModulate = 2;
pub type SDL_TextureModulate = i32;
pub const SDL_FLIP_NONE: SDL_RendererFlip = 0;
pub const SDL_FLIP_HORIZONTAL: SDL_RendererFlip = 1;
pub const SDL_FLIP_VERTICAL: SDL_RendererFlip = 2;
pub type SDL_RendererFlip = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_Renderer {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDL_Texture {
_unused: [u8; 0],
}
extern "C" {
pub fn SDL_GetNumRenderDrivers() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetRenderDriverInfo(
index: winapi::ctypes::c_int,
info: *mut SDL_RendererInfo,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CreateWindowAndRenderer(
width: winapi::ctypes::c_int,
height: winapi::ctypes::c_int,
window_flags: Uint32,
window: *mut *mut SDL_Window,
renderer: *mut *mut SDL_Renderer,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CreateRenderer(
window: *mut SDL_Window,
index: winapi::ctypes::c_int,
flags: Uint32,
) -> *mut SDL_Renderer;
}
extern "C" {
pub fn SDL_CreateSoftwareRenderer(surface: *mut SDL_Surface) -> *mut SDL_Renderer;
}
extern "C" {
pub fn SDL_GetRenderer(window: *mut SDL_Window) -> *mut SDL_Renderer;
}
extern "C" {
pub fn SDL_GetRendererInfo(
renderer: *mut SDL_Renderer,
info: *mut SDL_RendererInfo,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetRendererOutputSize(
renderer: *mut SDL_Renderer,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_CreateTexture(
renderer: *mut SDL_Renderer,
format: Uint32,
access: winapi::ctypes::c_int,
w: winapi::ctypes::c_int,
h: winapi::ctypes::c_int,
) -> *mut SDL_Texture;
}
extern "C" {
pub fn SDL_CreateTextureFromSurface(
renderer: *mut SDL_Renderer,
surface: *mut SDL_Surface,
) -> *mut SDL_Texture;
}
extern "C" {
pub fn SDL_QueryTexture(
texture: *mut SDL_Texture,
format: *mut Uint32,
access: *mut winapi::ctypes::c_int,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetTextureColorMod(
texture: *mut SDL_Texture,
r: Uint8,
g: Uint8,
b: Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetTextureColorMod(
texture: *mut SDL_Texture,
r: *mut Uint8,
g: *mut Uint8,
b: *mut Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetTextureAlphaMod(texture: *mut SDL_Texture, alpha: Uint8) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetTextureAlphaMod(
texture: *mut SDL_Texture,
alpha: *mut Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetTextureBlendMode(
texture: *mut SDL_Texture,
blendMode: SDL_BlendMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetTextureBlendMode(
texture: *mut SDL_Texture,
blendMode: *mut SDL_BlendMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UpdateTexture(
texture: *mut SDL_Texture,
rect: *const SDL_Rect,
pixels: *const winapi::ctypes::c_void,
pitch: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UpdateYUVTexture(
texture: *mut SDL_Texture,
rect: *const SDL_Rect,
Yplane: *const Uint8,
Ypitch: winapi::ctypes::c_int,
Uplane: *const Uint8,
Upitch: winapi::ctypes::c_int,
Vplane: *const Uint8,
Vpitch: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_LockTexture(
texture: *mut SDL_Texture,
rect: *const SDL_Rect,
pixels: *mut *mut winapi::ctypes::c_void,
pitch: *mut winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_UnlockTexture(texture: *mut SDL_Texture);
}
extern "C" {
pub fn SDL_RenderTargetSupported(renderer: *mut SDL_Renderer) -> SDL_bool;
}
extern "C" {
pub fn SDL_SetRenderTarget(
renderer: *mut SDL_Renderer,
texture: *mut SDL_Texture,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetRenderTarget(renderer: *mut SDL_Renderer) -> *mut SDL_Texture;
}
extern "C" {
pub fn SDL_RenderSetLogicalSize(
renderer: *mut SDL_Renderer,
w: winapi::ctypes::c_int,
h: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderGetLogicalSize(
renderer: *mut SDL_Renderer,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
);
}
extern "C" {
pub fn SDL_RenderSetIntegerScale(
renderer: *mut SDL_Renderer,
enable: SDL_bool,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderGetIntegerScale(renderer: *mut SDL_Renderer) -> SDL_bool;
}
extern "C" {
pub fn SDL_RenderSetViewport(
renderer: *mut SDL_Renderer,
rect: *const SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderGetViewport(renderer: *mut SDL_Renderer, rect: *mut SDL_Rect);
}
extern "C" {
pub fn SDL_RenderSetClipRect(
renderer: *mut SDL_Renderer,
rect: *const SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderGetClipRect(renderer: *mut SDL_Renderer, rect: *mut SDL_Rect);
}
extern "C" {
pub fn SDL_RenderIsClipEnabled(renderer: *mut SDL_Renderer) -> SDL_bool;
}
extern "C" {
pub fn SDL_RenderSetScale(
renderer: *mut SDL_Renderer,
scaleX: f32,
scaleY: f32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderGetScale(renderer: *mut SDL_Renderer, scaleX: *mut f32, scaleY: *mut f32);
}
extern "C" {
pub fn SDL_SetRenderDrawColor(
renderer: *mut SDL_Renderer,
r: Uint8,
g: Uint8,
b: Uint8,
a: Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetRenderDrawColor(
renderer: *mut SDL_Renderer,
r: *mut Uint8,
g: *mut Uint8,
b: *mut Uint8,
a: *mut Uint8,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SetRenderDrawBlendMode(
renderer: *mut SDL_Renderer,
blendMode: SDL_BlendMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetRenderDrawBlendMode(
renderer: *mut SDL_Renderer,
blendMode: *mut SDL_BlendMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderClear(renderer: *mut SDL_Renderer) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawPoint(
renderer: *mut SDL_Renderer,
x: winapi::ctypes::c_int,
y: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawPoints(
renderer: *mut SDL_Renderer,
points: *const SDL_Point,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawLine(
renderer: *mut SDL_Renderer,
x1: winapi::ctypes::c_int,
y1: winapi::ctypes::c_int,
x2: winapi::ctypes::c_int,
y2: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawLines(
renderer: *mut SDL_Renderer,
points: *const SDL_Point,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawRect(
renderer: *mut SDL_Renderer,
rect: *const SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawRects(
renderer: *mut SDL_Renderer,
rects: *const SDL_Rect,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderFillRect(
renderer: *mut SDL_Renderer,
rect: *const SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderFillRects(
renderer: *mut SDL_Renderer,
rects: *const SDL_Rect,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderCopy(
renderer: *mut SDL_Renderer,
texture: *mut SDL_Texture,
srcrect: *const SDL_Rect,
dstrect: *const SDL_Rect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderCopyEx(
renderer: *mut SDL_Renderer,
texture: *mut SDL_Texture,
srcrect: *const SDL_Rect,
dstrect: *const SDL_Rect,
angle: f64,
center: *const SDL_Point,
flip: SDL_RendererFlip,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawPointF(renderer: *mut SDL_Renderer, x: f32, y: f32)
-> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawPointsF(
renderer: *mut SDL_Renderer,
points: *const SDL_FPoint,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawLineF(
renderer: *mut SDL_Renderer,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawLinesF(
renderer: *mut SDL_Renderer,
points: *const SDL_FPoint,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawRectF(
renderer: *mut SDL_Renderer,
rect: *const SDL_FRect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderDrawRectsF(
renderer: *mut SDL_Renderer,
rects: *const SDL_FRect,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderFillRectF(
renderer: *mut SDL_Renderer,
rect: *const SDL_FRect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderFillRectsF(
renderer: *mut SDL_Renderer,
rects: *const SDL_FRect,
count: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderCopyF(
renderer: *mut SDL_Renderer,
texture: *mut SDL_Texture,
srcrect: *const SDL_Rect,
dstrect: *const SDL_FRect,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderCopyExF(
renderer: *mut SDL_Renderer,
texture: *mut SDL_Texture,
srcrect: *const SDL_Rect,
dstrect: *const SDL_FRect,
angle: f64,
center: *const SDL_FPoint,
flip: SDL_RendererFlip,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderReadPixels(
renderer: *mut SDL_Renderer,
rect: *const SDL_Rect,
format: Uint32,
pixels: *mut winapi::ctypes::c_void,
pitch: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderPresent(renderer: *mut SDL_Renderer);
}
extern "C" {
pub fn SDL_DestroyTexture(texture: *mut SDL_Texture);
}
extern "C" {
pub fn SDL_DestroyRenderer(renderer: *mut SDL_Renderer);
}
extern "C" {
pub fn SDL_RenderFlush(renderer: *mut SDL_Renderer) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_BindTexture(
texture: *mut SDL_Texture,
texw: *mut f32,
texh: *mut f32,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GL_UnbindTexture(texture: *mut SDL_Texture) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_RenderGetMetalLayer(renderer: *mut SDL_Renderer) -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_RenderGetMetalCommandEncoder(
renderer: *mut SDL_Renderer,
) -> *mut winapi::ctypes::c_void;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _SDL_Sensor {
_unused: [u8; 0],
}
pub type SDL_Sensor = _SDL_Sensor;
pub type SDL_SensorID = Sint32;
pub const SDL_SENSOR_INVALID: SDL_SensorType = -1;
pub const SDL_SENSOR_UNKNOWN: SDL_SensorType = 0;
pub const SDL_SENSOR_ACCEL: SDL_SensorType = 1;
pub const SDL_SENSOR_GYRO: SDL_SensorType = 2;
pub type SDL_SensorType = i32;
extern "C" {
pub fn SDL_NumSensors() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SensorGetDeviceName(
device_index: winapi::ctypes::c_int,
) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_SensorGetDeviceType(device_index: winapi::ctypes::c_int) -> SDL_SensorType;
}
extern "C" {
pub fn SDL_SensorGetDeviceNonPortableType(
device_index: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SensorGetDeviceInstanceID(device_index: winapi::ctypes::c_int) -> SDL_SensorID;
}
extern "C" {
pub fn SDL_SensorOpen(device_index: winapi::ctypes::c_int) -> *mut SDL_Sensor;
}
extern "C" {
pub fn SDL_SensorFromInstanceID(instance_id: SDL_SensorID) -> *mut SDL_Sensor;
}
extern "C" {
pub fn SDL_SensorGetName(sensor: *mut SDL_Sensor) -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_SensorGetType(sensor: *mut SDL_Sensor) -> SDL_SensorType;
}
extern "C" {
pub fn SDL_SensorGetNonPortableType(sensor: *mut SDL_Sensor) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SensorGetInstanceID(sensor: *mut SDL_Sensor) -> SDL_SensorID;
}
extern "C" {
pub fn SDL_SensorGetData(
sensor: *mut SDL_Sensor,
data: *mut f32,
num_values: winapi::ctypes::c_int,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_SensorClose(sensor: *mut SDL_Sensor);
}
extern "C" {
pub fn SDL_SensorUpdate();
}
extern "C" {
pub fn SDL_CreateShapedWindow(
title: *const winapi::ctypes::c_char,
x: winapi::ctypes::c_uint,
y: winapi::ctypes::c_uint,
w: winapi::ctypes::c_uint,
h: winapi::ctypes::c_uint,
flags: Uint32,
) -> *mut SDL_Window;
}
extern "C" {
pub fn SDL_IsShapedWindow(window: *const SDL_Window) -> SDL_bool;
}
pub const ShapeModeDefault: WindowShapeMode = 0;
pub const ShapeModeBinarizeAlpha: WindowShapeMode = 1;
pub const ShapeModeReverseBinarizeAlpha: WindowShapeMode = 2;
pub const ShapeModeColorKey: WindowShapeMode = 3;
pub type WindowShapeMode = i32;
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_WindowShapeParams {
pub binarizationCutoff: Uint8,
pub colorKey: SDL_Color,
_bindgen_union_align: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_SDL_WindowShapeParams() {
assert_eq!(
::core::mem::size_of::<SDL_WindowShapeParams>(),
4usize,
concat!("Size of: ", stringify!(SDL_WindowShapeParams))
);
assert_eq!(
::core::mem::align_of::<SDL_WindowShapeParams>(),
1usize,
concat!("Alignment of ", stringify!(SDL_WindowShapeParams))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_WindowShapeParams>())).binarizationCutoff as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowShapeParams),
"::",
stringify!(binarizationCutoff)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowShapeParams>())).colorKey as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowShapeParams),
"::",
stringify!(colorKey)
)
);
}
impl Default for SDL_WindowShapeParams {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_WindowShapeParams {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_WindowShapeParams {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SDL_WindowShapeMode {
pub mode: WindowShapeMode,
pub parameters: SDL_WindowShapeParams,
}
#[test]
fn bindgen_test_layout_SDL_WindowShapeMode() {
assert_eq!(
::core::mem::size_of::<SDL_WindowShapeMode>(),
8usize,
concat!("Size of: ", stringify!(SDL_WindowShapeMode))
);
assert_eq!(
::core::mem::align_of::<SDL_WindowShapeMode>(),
4usize,
concat!("Alignment of ", stringify!(SDL_WindowShapeMode))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowShapeMode>())).mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowShapeMode),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_WindowShapeMode>())).parameters as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_WindowShapeMode),
"::",
stringify!(parameters)
)
);
}
impl Default for SDL_WindowShapeMode {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_WindowShapeMode {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(
f,
"SDL_WindowShapeMode {{ mode: {:?}, parameters: {:?} }}",
self.mode, self.parameters
)
}
}
extern "C" {
pub fn SDL_SetWindowShape(
window: *mut SDL_Window,
shape: *mut SDL_Surface,
shape_mode: *mut SDL_WindowShapeMode,
) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_GetShapedWindowMode(
window: *mut SDL_Window,
shape_mode: *mut SDL_WindowShapeMode,
) -> winapi::ctypes::c_int;
}
pub type SDL_WindowsMessageHook = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut winapi::ctypes::c_void,
hWnd: *mut winapi::ctypes::c_void,
message: winapi::ctypes::c_uint,
wParam: Uint64,
lParam: Sint64,
),
>;
extern "C" {
pub fn SDL_SetWindowsMessageHook(
callback: SDL_WindowsMessageHook,
userdata: *mut winapi::ctypes::c_void,
);
}
extern "C" {
pub fn SDL_Direct3D9GetAdapterIndex(displayIndex: winapi::ctypes::c_int)
-> winapi::ctypes::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IDirect3DDevice9 {
_unused: [u8; 0],
}
extern "C" {
pub fn SDL_RenderGetD3D9Device(renderer: *mut SDL_Renderer) -> *mut IDirect3DDevice9;
}
extern "C" {
pub fn SDL_DXGIGetOutputInfo(
displayIndex: winapi::ctypes::c_int,
adapterIndex: *mut winapi::ctypes::c_int,
outputIndex: *mut winapi::ctypes::c_int,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_IsTablet() -> SDL_bool;
}
extern "C" {
pub fn SDL_GetTicks() -> Uint32;
}
extern "C" {
pub fn SDL_GetPerformanceCounter() -> Uint64;
}
extern "C" {
pub fn SDL_GetPerformanceFrequency() -> Uint64;
}
extern "C" {
pub fn SDL_Delay(ms: Uint32);
}
pub type SDL_TimerCallback = ::core::option::Option<
unsafe extern "C" fn(interval: Uint32, param: *mut winapi::ctypes::c_void) -> Uint32,
>;
pub type SDL_TimerID = winapi::ctypes::c_int;
extern "C" {
pub fn SDL_AddTimer(
interval: Uint32,
callback: SDL_TimerCallback,
param: *mut winapi::ctypes::c_void,
) -> SDL_TimerID;
}
extern "C" {
pub fn SDL_RemoveTimer(id: SDL_TimerID) -> SDL_bool;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_version {
pub major: Uint8,
pub minor: Uint8,
pub patch: Uint8,
}
#[test]
fn bindgen_test_layout_SDL_version() {
assert_eq!(
::core::mem::size_of::<SDL_version>(),
3usize,
concat!("Size of: ", stringify!(SDL_version))
);
assert_eq!(
::core::mem::align_of::<SDL_version>(),
1usize,
concat!("Alignment of ", stringify!(SDL_version))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_version>())).major as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_version),
"::",
stringify!(major)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_version>())).minor as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(SDL_version),
"::",
stringify!(minor)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_version>())).patch as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(SDL_version),
"::",
stringify!(patch)
)
);
}
extern "C" {
pub fn SDL_GetVersion(ver: *mut SDL_version);
}
extern "C" {
pub fn SDL_GetRevision() -> *const winapi::ctypes::c_char;
}
extern "C" {
pub fn SDL_GetRevisionNumber() -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_Init(flags: Uint32) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_InitSubSystem(flags: Uint32) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_QuitSubSystem(flags: Uint32);
}
extern "C" {
pub fn SDL_WasInit(flags: Uint32) -> Uint32;
}
extern "C" {
pub fn SDL_Quit();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VkInstance_T {
_unused: [u8; 0],
}
pub type VkInstance = *mut VkInstance_T;
pub type VkSurfaceKHR = u64;
pub type SDL_vulkanInstance = VkInstance;
pub type SDL_vulkanSurface = VkSurfaceKHR;
extern "C" {
pub fn SDL_Vulkan_LoadLibrary(path: *const winapi::ctypes::c_char) -> winapi::ctypes::c_int;
}
extern "C" {
pub fn SDL_Vulkan_GetVkGetInstanceProcAddr() -> *mut winapi::ctypes::c_void;
}
extern "C" {
pub fn SDL_Vulkan_UnloadLibrary();
}
extern "C" {
pub fn SDL_Vulkan_GetInstanceExtensions(
window: *mut SDL_Window,
pCount: *mut winapi::ctypes::c_uint,
pNames: *mut *const winapi::ctypes::c_char,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_Vulkan_CreateSurface(
window: *mut SDL_Window,
instance: VkInstance,
surface: *mut VkSurfaceKHR,
) -> SDL_bool;
}
extern "C" {
pub fn SDL_Vulkan_GetDrawableSize(
window: *mut SDL_Window,
w: *mut winapi::ctypes::c_int,
h: *mut winapi::ctypes::c_int,
);
}
pub type UINT = winapi::ctypes::c_uint;
pub type UINT_PTR = winapi::ctypes::c_uint;
pub type LONG_PTR = winapi::ctypes::c_long;
pub type WPARAM = UINT_PTR;
pub type LPARAM = LONG_PTR;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct HINSTANCE__ {
pub unused: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_HINSTANCE__() {
assert_eq!(
::core::mem::size_of::<HINSTANCE__>(),
4usize,
concat!("Size of: ", stringify!(HINSTANCE__))
);
assert_eq!(
::core::mem::align_of::<HINSTANCE__>(),
4usize,
concat!("Alignment of ", stringify!(HINSTANCE__))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<HINSTANCE__>())).unused as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(HINSTANCE__),
"::",
stringify!(unused)
)
);
}
pub type HINSTANCE = *mut HINSTANCE__;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct HWND__ {
pub unused: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_HWND__() {
assert_eq!(
::core::mem::size_of::<HWND__>(),
4usize,
concat!("Size of: ", stringify!(HWND__))
);
assert_eq!(
::core::mem::align_of::<HWND__>(),
4usize,
concat!("Alignment of ", stringify!(HWND__))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<HWND__>())).unused as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(HWND__),
"::",
stringify!(unused)
)
);
}
pub type HWND = *mut HWND__;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct HDC__ {
pub unused: winapi::ctypes::c_int,
}
#[test]
fn bindgen_test_layout_HDC__() {
assert_eq!(
::core::mem::size_of::<HDC__>(),
4usize,
concat!("Size of: ", stringify!(HDC__))
);
assert_eq!(
::core::mem::align_of::<HDC__>(),
4usize,
concat!("Alignment of ", stringify!(HDC__))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<HDC__>())).unused as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(HDC__),
"::",
stringify!(unused)
)
);
}
pub type HDC = *mut HDC__;
pub const SDL_SYSWM_UNKNOWN: SDL_SYSWM_TYPE = 0;
pub const SDL_SYSWM_WINDOWS: SDL_SYSWM_TYPE = 1;
pub const SDL_SYSWM_X11: SDL_SYSWM_TYPE = 2;
pub const SDL_SYSWM_DIRECTFB: SDL_SYSWM_TYPE = 3;
pub const SDL_SYSWM_COCOA: SDL_SYSWM_TYPE = 4;
pub const SDL_SYSWM_UIKIT: SDL_SYSWM_TYPE = 5;
pub const SDL_SYSWM_WAYLAND: SDL_SYSWM_TYPE = 6;
pub const SDL_SYSWM_MIR: SDL_SYSWM_TYPE = 7;
pub const SDL_SYSWM_WINRT: SDL_SYSWM_TYPE = 8;
pub const SDL_SYSWM_ANDROID: SDL_SYSWM_TYPE = 9;
pub const SDL_SYSWM_VIVANTE: SDL_SYSWM_TYPE = 10;
pub const SDL_SYSWM_OS2: SDL_SYSWM_TYPE = 11;
pub type SDL_SYSWM_TYPE = i32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SDL_SysWMmsg {
pub version: SDL_version,
pub subsystem: SDL_SYSWM_TYPE,
pub msg: SDL_SysWMmsg__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_SysWMmsg__bindgen_ty_1 {
pub win: SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1,
pub dummy: winapi::ctypes::c_int,
_bindgen_union_align: [u32; 4usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1 {
pub hwnd: HWND,
pub msg: UINT,
pub wParam: WPARAM,
pub lParam: LPARAM,
}
#[test]
fn bindgen_test_layout_SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1>())).hwnd as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(hwnd)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1>())).msg as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(msg)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1>())).wParam as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(wParam)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1>())).lParam as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(lParam)
)
);
}
impl Default for SDL_SysWMmsg__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[test]
fn bindgen_test_layout_SDL_SysWMmsg__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMmsg__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(SDL_SysWMmsg__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMmsg__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(SDL_SysWMmsg__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMmsg__bindgen_ty_1>())).win as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1),
"::",
stringify!(win)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMmsg__bindgen_ty_1>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg__bindgen_ty_1),
"::",
stringify!(dummy)
)
);
}
impl Default for SDL_SysWMmsg__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_SysWMmsg__bindgen_ty_1 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_SysWMmsg__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_SDL_SysWMmsg() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMmsg>(),
24usize,
concat!("Size of: ", stringify!(SDL_SysWMmsg))
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMmsg>(),
4usize,
concat!("Alignment of ", stringify!(SDL_SysWMmsg))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMmsg>())).version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMmsg>())).subsystem as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg),
"::",
stringify!(subsystem)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMmsg>())).msg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMmsg),
"::",
stringify!(msg)
)
);
}
impl Default for SDL_SysWMmsg {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_SysWMmsg {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(
f,
"SDL_SysWMmsg {{ version: {:?}, subsystem: {:?}, msg: {:?} }}",
self.version, self.subsystem, self.msg
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SDL_SysWMinfo {
pub version: SDL_version,
pub subsystem: SDL_SYSWM_TYPE,
pub info: SDL_SysWMinfo__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SDL_SysWMinfo__bindgen_ty_1 {
pub win: SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1,
pub dummy: [Uint8; 64usize],
_bindgen_union_align: [u32; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1 {
pub window: HWND,
pub hdc: HDC,
pub hinstance: HINSTANCE,
}
#[test]
fn bindgen_test_layout_SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1>(),
12usize,
concat!(
"Size of: ",
stringify!(SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1>())).window as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(window)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1>())).hdc as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(hdc)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1>())).hinstance as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(hinstance)
)
);
}
impl Default for SDL_SysWMinfo__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[test]
fn bindgen_test_layout_SDL_SysWMinfo__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMinfo__bindgen_ty_1>(),
64usize,
concat!("Size of: ", stringify!(SDL_SysWMinfo__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMinfo__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(SDL_SysWMinfo__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMinfo__bindgen_ty_1>())).win as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo__bindgen_ty_1),
"::",
stringify!(win)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMinfo__bindgen_ty_1>())).dummy as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo__bindgen_ty_1),
"::",
stringify!(dummy)
)
);
}
impl Default for SDL_SysWMinfo__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_SysWMinfo__bindgen_ty_1 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(f, "SDL_SysWMinfo__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_SDL_SysWMinfo() {
assert_eq!(
::core::mem::size_of::<SDL_SysWMinfo>(),
72usize,
concat!("Size of: ", stringify!(SDL_SysWMinfo))
);
assert_eq!(
::core::mem::align_of::<SDL_SysWMinfo>(),
4usize,
concat!("Alignment of ", stringify!(SDL_SysWMinfo))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMinfo>())).version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMinfo>())).subsystem as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo),
"::",
stringify!(subsystem)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<SDL_SysWMinfo>())).info as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(SDL_SysWMinfo),
"::",
stringify!(info)
)
);
}
impl Default for SDL_SysWMinfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::fmt::Debug for SDL_SysWMinfo {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write!(
f,
"SDL_SysWMinfo {{ version: {:?}, subsystem: {:?}, info: {:?} }}",
self.version, self.subsystem, self.info
)
}
}
extern "C" {
pub fn SDL_GetWindowWMInfo(window: *mut SDL_Window, info: *mut SDL_SysWMinfo) -> SDL_bool;
}
pub type __builtin_va_list = *mut winapi::ctypes::c_char;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct SDL_BlitMap {
pub _address: u8,
}