/* automatically generated by rust-bindgen 0.71.1 */

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FfiFov {
    pub left: f32,
    pub right: f32,
    pub up: f32,
    pub down: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiFov"][::std::mem::size_of::<FfiFov>() - 16usize];
    ["Alignment of FfiFov"][::std::mem::align_of::<FfiFov>() - 4usize];
    ["Offset of field: FfiFov::left"][::std::mem::offset_of!(FfiFov, left) - 0usize];
    ["Offset of field: FfiFov::right"][::std::mem::offset_of!(FfiFov, right) - 4usize];
    ["Offset of field: FfiFov::up"][::std::mem::offset_of!(FfiFov, up) - 8usize];
    ["Offset of field: FfiFov::down"][::std::mem::offset_of!(FfiFov, down) - 12usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FfiQuat {
    pub x: f32,
    pub y: f32,
    pub z: f32,
    pub w: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiQuat"][::std::mem::size_of::<FfiQuat>() - 16usize];
    ["Alignment of FfiQuat"][::std::mem::align_of::<FfiQuat>() - 4usize];
    ["Offset of field: FfiQuat::x"][::std::mem::offset_of!(FfiQuat, x) - 0usize];
    ["Offset of field: FfiQuat::y"][::std::mem::offset_of!(FfiQuat, y) - 4usize];
    ["Offset of field: FfiQuat::z"][::std::mem::offset_of!(FfiQuat, z) - 8usize];
    ["Offset of field: FfiQuat::w"][::std::mem::offset_of!(FfiQuat, w) - 12usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FfiHandSkeleton {
    pub jointPositions: [[f32; 3usize]; 31usize],
    pub jointRotations: [FfiQuat; 31usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiHandSkeleton"][::std::mem::size_of::<FfiHandSkeleton>() - 868usize];
    ["Alignment of FfiHandSkeleton"][::std::mem::align_of::<FfiHandSkeleton>() - 4usize];
    ["Offset of field: FfiHandSkeleton::jointPositions"]
        [::std::mem::offset_of!(FfiHandSkeleton, jointPositions) - 0usize];
    ["Offset of field: FfiHandSkeleton::jointRotations"]
        [::std::mem::offset_of!(FfiHandSkeleton, jointRotations) - 372usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FfiDeviceMotion {
    pub deviceID: ::std::os::raw::c_ulonglong,
    pub orientation: FfiQuat,
    pub position: [f32; 3usize],
    pub linearVelocity: [f32; 3usize],
    pub angularVelocity: [f32; 3usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiDeviceMotion"][::std::mem::size_of::<FfiDeviceMotion>() - 64usize];
    ["Alignment of FfiDeviceMotion"][::std::mem::align_of::<FfiDeviceMotion>() - 8usize];
    ["Offset of field: FfiDeviceMotion::deviceID"]
        [::std::mem::offset_of!(FfiDeviceMotion, deviceID) - 0usize];
    ["Offset of field: FfiDeviceMotion::orientation"]
        [::std::mem::offset_of!(FfiDeviceMotion, orientation) - 8usize];
    ["Offset of field: FfiDeviceMotion::position"]
        [::std::mem::offset_of!(FfiDeviceMotion, position) - 24usize];
    ["Offset of field: FfiDeviceMotion::linearVelocity"]
        [::std::mem::offset_of!(FfiDeviceMotion, linearVelocity) - 36usize];
    ["Offset of field: FfiDeviceMotion::angularVelocity"]
        [::std::mem::offset_of!(FfiDeviceMotion, angularVelocity) - 48usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FfiHandData {
    pub controllerMotion: *const FfiDeviceMotion,
    pub handSkeleton: *const FfiHandSkeleton,
    pub isHandTracker: bool,
    pub predictHandSkeleton: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiHandData"][::std::mem::size_of::<FfiHandData>() - 24usize];
    ["Alignment of FfiHandData"][::std::mem::align_of::<FfiHandData>() - 8usize];
    ["Offset of field: FfiHandData::controllerMotion"]
        [::std::mem::offset_of!(FfiHandData, controllerMotion) - 0usize];
    ["Offset of field: FfiHandData::handSkeleton"]
        [::std::mem::offset_of!(FfiHandData, handSkeleton) - 8usize];
    ["Offset of field: FfiHandData::isHandTracker"]
        [::std::mem::offset_of!(FfiHandData, isHandTracker) - 16usize];
    ["Offset of field: FfiHandData::predictHandSkeleton"]
        [::std::mem::offset_of!(FfiHandData, predictHandSkeleton) - 17usize];
};
impl Default for FfiHandData {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub const FfiOpenvrPropertyType_Bool: FfiOpenvrPropertyType = 0;
pub const FfiOpenvrPropertyType_Float: FfiOpenvrPropertyType = 1;
pub const FfiOpenvrPropertyType_Int32: FfiOpenvrPropertyType = 2;
pub const FfiOpenvrPropertyType_Uint64: FfiOpenvrPropertyType = 3;
pub const FfiOpenvrPropertyType_Vector3: FfiOpenvrPropertyType = 4;
pub const FfiOpenvrPropertyType_Double: FfiOpenvrPropertyType = 5;
pub const FfiOpenvrPropertyType_String: FfiOpenvrPropertyType = 6;
pub type FfiOpenvrPropertyType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub union FfiOpenvrPropertyValue {
    pub bool_: ::std::os::raw::c_uint,
    pub float_: f32,
    pub int32: ::std::os::raw::c_int,
    pub uint64: ::std::os::raw::c_ulonglong,
    pub vector3: [f32; 3usize],
    pub double_: f64,
    pub string: [::std::os::raw::c_char; 256usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiOpenvrPropertyValue"][::std::mem::size_of::<FfiOpenvrPropertyValue>() - 256usize];
    ["Alignment of FfiOpenvrPropertyValue"]
        [::std::mem::align_of::<FfiOpenvrPropertyValue>() - 8usize];
    ["Offset of field: FfiOpenvrPropertyValue::bool_"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, bool_) - 0usize];
    ["Offset of field: FfiOpenvrPropertyValue::float_"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, float_) - 0usize];
    ["Offset of field: FfiOpenvrPropertyValue::int32"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, int32) - 0usize];
    ["Offset of field: FfiOpenvrPropertyValue::uint64"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, uint64) - 0usize];
    ["Offset of field: FfiOpenvrPropertyValue::vector3"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, vector3) - 0usize];
    ["Offset of field: FfiOpenvrPropertyValue::double_"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, double_) - 0usize];
    ["Offset of field: FfiOpenvrPropertyValue::string"]
        [::std::mem::offset_of!(FfiOpenvrPropertyValue, string) - 0usize];
};
impl Default for FfiOpenvrPropertyValue {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FfiOpenvrProperty {
    pub key: ::std::os::raw::c_uint,
    pub type_: FfiOpenvrPropertyType,
    pub value: FfiOpenvrPropertyValue,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiOpenvrProperty"][::std::mem::size_of::<FfiOpenvrProperty>() - 264usize];
    ["Alignment of FfiOpenvrProperty"][::std::mem::align_of::<FfiOpenvrProperty>() - 8usize];
    ["Offset of field: FfiOpenvrProperty::key"]
        [::std::mem::offset_of!(FfiOpenvrProperty, key) - 0usize];
    ["Offset of field: FfiOpenvrProperty::type_"]
        [::std::mem::offset_of!(FfiOpenvrProperty, type_) - 4usize];
    ["Offset of field: FfiOpenvrProperty::value"]
        [::std::mem::offset_of!(FfiOpenvrProperty, value) - 8usize];
};
impl Default for FfiOpenvrProperty {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FfiViewsConfig {
    pub fov: [FfiFov; 2usize],
    pub ipd_m: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiViewsConfig"][::std::mem::size_of::<FfiViewsConfig>() - 36usize];
    ["Alignment of FfiViewsConfig"][::std::mem::align_of::<FfiViewsConfig>() - 4usize];
    ["Offset of field: FfiViewsConfig::fov"][::std::mem::offset_of!(FfiViewsConfig, fov) - 0usize];
    ["Offset of field: FfiViewsConfig::ipd_m"]
        [::std::mem::offset_of!(FfiViewsConfig, ipd_m) - 32usize];
};
pub const FfiButtonType_BUTTON_TYPE_BINARY: FfiButtonType = 0;
pub const FfiButtonType_BUTTON_TYPE_SCALAR: FfiButtonType = 1;
pub type FfiButtonType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FfiButtonValue {
    pub type_: FfiButtonType,
    pub __bindgen_anon_1: FfiButtonValue__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union FfiButtonValue__bindgen_ty_1 {
    pub binary: ::std::os::raw::c_uint,
    pub scalar: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiButtonValue__bindgen_ty_1"]
        [::std::mem::size_of::<FfiButtonValue__bindgen_ty_1>() - 4usize];
    ["Alignment of FfiButtonValue__bindgen_ty_1"]
        [::std::mem::align_of::<FfiButtonValue__bindgen_ty_1>() - 4usize];
    ["Offset of field: FfiButtonValue__bindgen_ty_1::binary"]
        [::std::mem::offset_of!(FfiButtonValue__bindgen_ty_1, binary) - 0usize];
    ["Offset of field: FfiButtonValue__bindgen_ty_1::scalar"]
        [::std::mem::offset_of!(FfiButtonValue__bindgen_ty_1, scalar) - 0usize];
};
impl Default for FfiButtonValue__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiButtonValue"][::std::mem::size_of::<FfiButtonValue>() - 8usize];
    ["Alignment of FfiButtonValue"][::std::mem::align_of::<FfiButtonValue>() - 4usize];
    ["Offset of field: FfiButtonValue::type_"]
        [::std::mem::offset_of!(FfiButtonValue, type_) - 0usize];
};
impl Default for FfiButtonValue {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FfiDynamicEncoderParams {
    pub updated: ::std::os::raw::c_uint,
    pub bitrate_bps: ::std::os::raw::c_ulonglong,
    pub framerate: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of FfiDynamicEncoderParams"][::std::mem::size_of::<FfiDynamicEncoderParams>() - 24usize];
    ["Alignment of FfiDynamicEncoderParams"]
        [::std::mem::align_of::<FfiDynamicEncoderParams>() - 8usize];
    ["Offset of field: FfiDynamicEncoderParams::updated"]
        [::std::mem::offset_of!(FfiDynamicEncoderParams, updated) - 0usize];
    ["Offset of field: FfiDynamicEncoderParams::bitrate_bps"]
        [::std::mem::offset_of!(FfiDynamicEncoderParams, bitrate_bps) - 8usize];
    ["Offset of field: FfiDynamicEncoderParams::framerate"]
        [::std::mem::offset_of!(FfiDynamicEncoderParams, framerate) - 16usize];
};
unsafe extern "C" {
    pub static mut FRAME_RENDER_VS_CSO_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut FRAME_RENDER_VS_CSO_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut FRAME_RENDER_PS_CSO_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut FRAME_RENDER_PS_CSO_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut QUAD_SHADER_CSO_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut QUAD_SHADER_CSO_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut COMPRESS_AXIS_ALIGNED_CSO_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut COMPRESS_AXIS_ALIGNED_CSO_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut COLOR_CORRECTION_CSO_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut COLOR_CORRECTION_CSO_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut RGBTOYUV420_CSO_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut RGBTOYUV420_CSO_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut QUAD_SHADER_COMP_SPV_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut QUAD_SHADER_COMP_SPV_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut COLOR_SHADER_COMP_SPV_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut COLOR_SHADER_COMP_SPV_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut FFR_SHADER_COMP_SPV_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut FFR_SHADER_COMP_SPV_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut RGBTOYUV420_SHADER_COMP_SPV_PTR: *const ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub static mut RGBTOYUV420_SHADER_COMP_SPV_LEN: ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub static mut g_sessionPath: *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub static mut g_driverRootDir: *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub static mut LogError:
        ::std::option::Option<unsafe extern "C" fn(stringPtr: *const ::std::os::raw::c_char)>;
}
unsafe extern "C" {
    pub static mut LogWarn:
        ::std::option::Option<unsafe extern "C" fn(stringPtr: *const ::std::os::raw::c_char)>;
}
unsafe extern "C" {
    pub static mut LogInfo:
        ::std::option::Option<unsafe extern "C" fn(stringPtr: *const ::std::os::raw::c_char)>;
}
unsafe extern "C" {
    pub static mut LogDebug:
        ::std::option::Option<unsafe extern "C" fn(stringPtr: *const ::std::os::raw::c_char)>;
}
unsafe extern "C" {
    pub static mut LogEncoder:
        ::std::option::Option<unsafe extern "C" fn(stringPtr: *const ::std::os::raw::c_char)>;
}
unsafe extern "C" {
    pub static mut LogPeriodically: ::std::option::Option<
        unsafe extern "C" fn(
            tag: *const ::std::os::raw::c_char,
            stringPtr: *const ::std::os::raw::c_char,
        ),
    >;
}
unsafe extern "C" {
    pub static mut DriverReadyIdle:
        ::std::option::Option<unsafe extern "C" fn(setDefaultChaprone: bool)>;
}
unsafe extern "C" {
    pub static mut SetVideoConfigNals: ::std::option::Option<
        unsafe extern "C" fn(
            configBuffer: *const ::std::os::raw::c_uchar,
            len: ::std::os::raw::c_int,
            codec: ::std::os::raw::c_int,
        ),
    >;
}
unsafe extern "C" {
    pub static mut VideoSend: ::std::option::Option<
        unsafe extern "C" fn(
            targetTimestampNs: ::std::os::raw::c_ulonglong,
            buf: *mut ::std::os::raw::c_uchar,
            len: ::std::os::raw::c_int,
            isIdr: bool,
        ),
    >;
}
unsafe extern "C" {
    pub static mut HapticsSend: ::std::option::Option<
        unsafe extern "C" fn(
            path: ::std::os::raw::c_ulonglong,
            duration_s: f32,
            frequency: f32,
            amplitude: f32,
        ),
    >;
}
unsafe extern "C" {
    pub static mut ShutdownRuntime: ::std::option::Option<unsafe extern "C" fn()>;
}
unsafe extern "C" {
    pub static mut PathStringToHash: ::std::option::Option<
        unsafe extern "C" fn(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulonglong,
    >;
}
unsafe extern "C" {
    pub static mut ReportPresent: ::std::option::Option<
        unsafe extern "C" fn(
            timestamp_ns: ::std::os::raw::c_ulonglong,
            offset_ns: ::std::os::raw::c_ulonglong,
        ),
    >;
}
unsafe extern "C" {
    pub static mut ReportComposed: ::std::option::Option<
        unsafe extern "C" fn(
            timestamp_ns: ::std::os::raw::c_ulonglong,
            offset_ns: ::std::os::raw::c_ulonglong,
        ),
    >;
}
unsafe extern "C" {
    pub static mut GetDynamicEncoderParams:
        ::std::option::Option<unsafe extern "C" fn() -> FfiDynamicEncoderParams>;
}
unsafe extern "C" {
    pub static mut GetSerialNumber: ::std::option::Option<
        unsafe extern "C" fn(
            deviceID: ::std::os::raw::c_ulonglong,
            outString: *mut ::std::os::raw::c_char,
        ) -> ::std::os::raw::c_ulonglong,
    >;
}
unsafe extern "C" {
    pub static mut SetOpenvrProps: ::std::option::Option<
        unsafe extern "C" fn(
            instancePtr: *mut ::std::os::raw::c_void,
            deviceID: ::std::os::raw::c_ulonglong,
        ),
    >;
}
unsafe extern "C" {
    pub static mut RegisterButtons: ::std::option::Option<
        unsafe extern "C" fn(
            instancePtr: *mut ::std::os::raw::c_void,
            deviceID: ::std::os::raw::c_ulonglong,
        ),
    >;
}
unsafe extern "C" {
    pub static mut WaitForVSync: ::std::option::Option<unsafe extern "C" fn()>;
}
unsafe extern "C" {
    pub fn CppInit(earlyHmdInitialization: bool);
}
unsafe extern "C" {
    pub fn CppOpenvrEntryPoint(
        pInterfaceName: *const ::std::os::raw::c_char,
        pReturnCode: *mut ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn InitializeStreaming() -> bool;
}
unsafe extern "C" {
    pub fn DeinitializeStreaming();
}
unsafe extern "C" {
    pub fn SendVSync();
}
unsafe extern "C" {
    pub fn RequestIDR();
}
unsafe extern "C" {
    pub fn SetTracking(
        targetTimestampNs: ::std::os::raw::c_ulonglong,
        controllerPoseTimeOffsetS: f32,
        headMotion: FfiDeviceMotion,
        leftHandData: FfiHandData,
        rightHandData: FfiHandData,
        bodyTrackerMotions: *const FfiDeviceMotion,
        bodyTrackerMotionCount: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    pub fn VideoErrorReportReceive();
}
unsafe extern "C" {
    pub fn RequestDriverResync();
}
unsafe extern "C" {
    pub fn ShutdownSteamvr();
}
unsafe extern "C" {
    pub fn SetOpenvrProperty(instancePtr: *mut ::std::os::raw::c_void, prop: FfiOpenvrProperty);
}
unsafe extern "C" {
    pub fn SetOpenvrPropByDeviceID(deviceID: ::std::os::raw::c_ulonglong, prop: FfiOpenvrProperty);
}
unsafe extern "C" {
    pub fn RegisterButton(
        instancePtr: *mut ::std::os::raw::c_void,
        buttonID: ::std::os::raw::c_ulonglong,
    );
}
unsafe extern "C" {
    pub fn SetViewsConfig(config: FfiViewsConfig);
}
unsafe extern "C" {
    pub fn SetBattery(deviceID: ::std::os::raw::c_ulonglong, gauge_value: f32, is_plugged: bool);
}
unsafe extern "C" {
    pub fn SetButton(buttonID: ::std::os::raw::c_ulonglong, value: FfiButtonValue);
}
unsafe extern "C" {
    pub fn InitOpenvrClient();
}
unsafe extern "C" {
    pub fn ShutdownOpenvrClient();
}
unsafe extern "C" {
    pub fn SetChaperoneArea(areaWidth: f32, areaHeight: f32);
}
unsafe extern "C" {
    pub fn CaptureFrame();
}
unsafe extern "C" {
    #[link_name = "\u{1}_Z14ParseFrameNalsiPhiyb"]
    pub fn ParseFrameNals(
        codec: ::std::os::raw::c_int,
        buf: *mut ::std::os::raw::c_uchar,
        len: ::std::os::raw::c_int,
        targetTimestampNs: ::std::os::raw::c_ulonglong,
        isIdr: bool,
    );
}
unsafe extern "C" {
    #[link_name = "\u{1}_Z16HookCrashHandlerv"]
    pub fn HookCrashHandler();
}
