pub const _VCRT_COMPILER_PREPROCESSOR: u32 = 1;
pub const _SAL_VERSION: u32 = 20;
pub const __SAL_H_VERSION: u32 = 180000000;
pub const _USE_DECLSPECS_FOR_SAL: u32 = 0;
pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0;
pub const _CRT_PACKING: u32 = 8;
pub const _HAS_EXCEPTIONS: u32 = 1;
pub const _HAS_CXX17: u32 = 0;
pub const _HAS_CXX20: u32 = 0;
pub const _HAS_NODISCARD: u32 = 0;
pub const WCHAR_MIN: u32 = 0;
pub const WCHAR_MAX: u32 = 65535;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 65535;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const LEAP_DISTORTION_MATRIX_N: u32 = 64;
pub type va_list = *mut ::std::os::raw::c_char;
extern "C" {
pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
}
pub type size_t = ::std::os::raw::c_ulonglong;
pub type __vcrt_bool = bool;
pub type wchar_t = ::std::os::raw::c_ushort;
extern "C" {
pub fn __security_init_cookie();
}
extern "C" {
pub fn __security_check_cookie(_StackCookie: usize);
}
extern "C" {
pub fn __report_gsfailure(_StackCookie: usize);
}
extern "C" {
pub static mut __security_cookie: usize;
}
pub type int_least8_t = ::std::os::raw::c_schar;
pub type int_least16_t = ::std::os::raw::c_short;
pub type int_least32_t = ::std::os::raw::c_int;
pub type int_least64_t = ::std::os::raw::c_longlong;
pub type uint_least8_t = ::std::os::raw::c_uchar;
pub type uint_least16_t = ::std::os::raw::c_ushort;
pub type uint_least32_t = ::std::os::raw::c_uint;
pub type uint_least64_t = ::std::os::raw::c_ulonglong;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_int;
pub type int_fast32_t = ::std::os::raw::c_int;
pub type int_fast64_t = ::std::os::raw::c_longlong;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_uint;
pub type uint_fast32_t = ::std::os::raw::c_uint;
pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
pub type intmax_t = ::std::os::raw::c_longlong;
pub type uintmax_t = ::std::os::raw::c_ulonglong;
#[doc = " The operation completed successfully."]
pub const _eLeapRS_eLeapRS_Success: _eLeapRS = 0;
#[doc = " An undetermined error has occurred."]
#[doc = " This is usually the result of an abnormal operating condition in LeapC,"]
#[doc = " the Leap Motion service, or the host computer itself."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_UnknownError: _eLeapRS = -503250944;
#[doc = " An invalid argument was specified."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_InvalidArgument: _eLeapRS = -503250943;
#[doc = " Insufficient resources existed to complete the request."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_InsufficientResources: _eLeapRS = -503250942;
#[doc = " The specified buffer was not large enough to complete the request."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_InsufficientBuffer: _eLeapRS = -503250941;
#[doc = " The requested operation has timed out."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_Timeout: _eLeapRS = -503250940;
#[doc = " The operation is invalid because there is no current connection."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_NotConnected: _eLeapRS = -503250939;
#[doc = " The operation is invalid because the connection is not complete."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_HandshakeIncomplete: _eLeapRS = -503250938;
#[doc = " The specified buffer size is too large."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_BufferSizeOverflow: _eLeapRS = -503250937;
#[doc = " A communications protocol error occurred."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_ProtocolError: _eLeapRS = -503250936;
#[doc = " The server incorrectly specified zero as a client ID."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_InvalidClientID: _eLeapRS = -503250935;
#[doc = " The connection to the service was unexpectedly closed while reading or writing a message."]
#[doc = " The server may have terminated."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_UnexpectedClosed: _eLeapRS = -503250934;
#[doc = " The specified request token does not appear to be valid"]
#[doc = ""]
#[doc = " Provided that the token value which identifies the request itself was, at one point, valid, this"]
#[doc = " error condition occurs when the request to which the token refers has already been satisfied or"]
#[doc = " is currently being satisfied."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_UnknownImageFrameRequest: _eLeapRS = -503250933;
#[doc = " The specified frame ID is not valid or is no longer valid"]
#[doc = ""]
#[doc = " Provided that frame ID was, at one point, valid, this error condition occurs when the identifier"]
#[doc = " refers to a frame that occurred further in the past than is currently recorded in the rolling"]
#[doc = " frame window."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_UnknownTrackingFrameID: _eLeapRS = -503250932;
#[doc = " The specified timestamp references a future point in time"]
#[doc = ""]
#[doc = " The related routine can only operate on time points having occurred in the past, and the"]
#[doc = " provided timestamp occurs in the future."]
#[doc = " @since 3.1.2"]
pub const _eLeapRS_eLeapRS_RoutineIsNotSeer: _eLeapRS = -503250931;
#[doc = " The specified timestamp references a point too far in the past"]
#[doc = ""]
#[doc = " The related routine can only operate on time points occurring within its immediate record of"]
#[doc = " the past."]
#[doc = " @since 3.1.2"]
pub const _eLeapRS_eLeapRS_TimestampTooEarly: _eLeapRS = -503250930;
#[doc = " LeapPollConnection is called concurrently."]
#[doc = " @since 3.1.2"]
pub const _eLeapRS_eLeapRS_ConcurrentPoll: _eLeapRS = -503250929;
#[doc = " A connection to the Leap Motion service could not be established."]
#[doc = "@since 3.0.0"]
pub const _eLeapRS_eLeapRS_NotAvailable: _eLeapRS = -419364862;
#[doc = " The requested operation can only be performed while the device is sending data."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_NotStreaming: _eLeapRS = -419364860;
#[doc = " The specified device could not be opened. It is possible that the device identifier"]
#[doc = " is invalid, or that the device has been disconnected since being enumerated."]
#[doc = " @since 3.0.0"]
pub const _eLeapRS_eLeapRS_CannotOpenDevice: _eLeapRS = -419364859;
#[doc = " \\ingroup Enum"]
#[doc = " Defines the codes returned by all LeapC functions."]
#[doc = " @since 3.0.0"]
pub type _eLeapRS = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Defines the codes returned by all LeapC functions."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapRS as eLeapRS;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CONNECTION {
_unused: [u8; 0],
}
#[doc = " \\ingroup Structs"]
#[doc = " \\struct LEAP_CONNECTION"]
#[doc = " A handle to the Leap connection object."]
#[doc = " Use this handle to specify the connection for an operation."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONNECTION = *mut _LEAP_CONNECTION;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DEVICE {
_unused: [u8; 0],
}
#[doc = " \\ingroup Structs"]
#[doc = " \\struct LEAP_DEVICE"]
#[doc = " A handle to a Leap device object."]
#[doc = " Use this handle to specify the device for an operation."]
#[doc = " @since 3.0.0"]
pub type LEAP_DEVICE = *mut _LEAP_DEVICE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CALIBRATION {
_unused: [u8; 0],
}
#[doc = " \\ingroup Structs"]
#[doc = " Represents a calibration object."]
#[doc = " Not currently of any particular use."]
#[doc = " @since 3.0.0"]
pub type LEAP_CALIBRATION = *mut _LEAP_CALIBRATION;
#[doc = " \\ingroup Structs"]
#[doc = " A reference to a Leap device."]
#[doc = ""]
#[doc = " Get a LEAP_DEVICE_REF by calling LeapGetDeviceList(). Access a device by"]
#[doc = " calling LeapOpenDevice() with this reference. LeapOpenDevice() provides a"]
#[doc = " LEAP_DEVICE struct, which is a handle to an open device."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DEVICE_REF {
#[doc = " An opaque handle. @since 3.0.0"]
pub handle: *mut ::std::os::raw::c_void,
#[doc = " a generic identifier. @since 3.0.0"]
pub id: u32,
}
#[test]
fn bindgen_test_layout__LEAP_DEVICE_REF() {
assert_eq!(
::std::mem::size_of::<_LEAP_DEVICE_REF>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_DEVICE_REF))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DEVICE_REF>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DEVICE_REF))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_REF>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_REF),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_REF>())).id as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_REF),
"::",
stringify!(id)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A reference to a Leap device."]
#[doc = ""]
#[doc = " Get a LEAP_DEVICE_REF by calling LeapGetDeviceList(). Access a device by"]
#[doc = " calling LeapOpenDevice() with this reference. LeapOpenDevice() provides a"]
#[doc = " LEAP_DEVICE struct, which is a handle to an open device."]
pub type LEAP_DEVICE_REF = _LEAP_DEVICE_REF;
#[doc = " \\ingroup Structs"]
#[doc = " Specifies the configuration for a connection."]
#[doc = " Currently, there are no externally useful configuration options."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CONNECTION_CONFIG {
#[doc = " Set to the final size of the structure. @since 3.0.0"]
pub size: u32,
#[doc = " The connection configuration flags. (currently there are none. @since 3.0.0"]
pub flags: u32,
#[doc = " For internal use. @since 3.0.0"]
pub server_namespace: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout__LEAP_CONNECTION_CONFIG() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONNECTION_CONFIG>(),
16usize,
concat!("Size of: ", stringify!(_LEAP_CONNECTION_CONFIG))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONNECTION_CONFIG>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONNECTION_CONFIG))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_CONFIG>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_CONFIG),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_CONFIG>())).flags as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_CONFIG),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_CONFIG>())).server_namespace as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_CONFIG),
"::",
stringify!(server_namespace)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Specifies the configuration for a connection."]
#[doc = " Currently, there are no externally useful configuration options."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONNECTION_CONFIG = _LEAP_CONNECTION_CONFIG;
#[doc = " Signed 8-bit integer (char) @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Int8: _eLeapAllocatorType = 0;
#[doc = " Unsigned 8-bit integer (byte) @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Uint8: _eLeapAllocatorType = 1;
#[doc = " Signed 16-bit integer @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Int16: _eLeapAllocatorType = 2;
#[doc = " Unsigned 16-bit integer @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_UInt16: _eLeapAllocatorType = 3;
#[doc = " Signed 32-bit integer @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Int32: _eLeapAllocatorType = 4;
#[doc = " Unsigned 32-bit integer @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_UInt32: _eLeapAllocatorType = 5;
#[doc = " Single-precision 32-bit floating-point @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Float: _eLeapAllocatorType = 6;
#[doc = " Signed 64-bit integer @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Int64: _eLeapAllocatorType = 8;
#[doc = " Unsigned 64-bit integer @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_UInt64: _eLeapAllocatorType = 9;
#[doc = " Double-precision 64-bit floating-point @since 4.0.0"]
pub const _eLeapAllocatorType_eLeapAllocatorType_Double: _eLeapAllocatorType = 10;
#[doc = " \\ingroup Enum"]
#[doc = " Defines the various types of data that may be allocated using the allocator."]
#[doc = " @since 4.0.0"]
pub type _eLeapAllocatorType = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Defines the various types of data that may be allocated using the allocator."]
#[doc = " @since 4.0.0"]
pub use self::_eLeapAllocatorType as eLeapAllocatorType;
#[doc = " \\ingroup Structs"]
#[doc = " Specifies the allocator/deallocator functions to be used when the library"]
#[doc = " needs to dynamically manage memory."]
#[doc = " @since 4.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct LEAP_ALLOCATOR {
#[doc = " Function pointer to an allocator function that is expected to return a"]
#[doc = " pointer to memory of at least the specified size in bytes. This will be"]
#[doc = " called when the library needs a block of memory that will be provided"]
#[doc = " back to the client in a subsequent event or response. A type hint is"]
#[doc = " provided in the case where the underlying buffer type needs to be known"]
#[doc = " at allocation time."]
pub allocate: ::std::option::Option<
unsafe extern "C" fn(
size: u32,
typeHint: eLeapAllocatorType,
state: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void,
>,
#[doc = " Function pointer to a deallocator function. The function receives the"]
#[doc = " address of a previously allocated block of memory from the ``allocate``"]
#[doc = " function pointer. The caller is not required to deallocate the memory,"]
#[doc = " but rather this call is used by the library to indicate to the client"]
#[doc = " that it will no longer reference the memory at this address, and that"]
#[doc = " the callee _may_ deallocate the memory when it is ready to do so."]
pub deallocate: ::std::option::Option<
unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void, state: *mut ::std::os::raw::c_void),
>,
#[doc = " Pointer to state to be passed to the allocate and deallocate functions."]
pub state: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_LEAP_ALLOCATOR() {
assert_eq!(
::std::mem::size_of::<LEAP_ALLOCATOR>(),
24usize,
concat!("Size of: ", stringify!(LEAP_ALLOCATOR))
);
assert_eq!(
::std::mem::align_of::<LEAP_ALLOCATOR>(),
1usize,
concat!("Alignment of ", stringify!(LEAP_ALLOCATOR))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<LEAP_ALLOCATOR>())).allocate as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(LEAP_ALLOCATOR),
"::",
stringify!(allocate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<LEAP_ALLOCATOR>())).deallocate as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(LEAP_ALLOCATOR),
"::",
stringify!(deallocate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<LEAP_ALLOCATOR>())).state as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(LEAP_ALLOCATOR),
"::",
stringify!(state)
)
);
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Samples the universal clock used by the system to timestamp image and tracking frames."]
#[doc = ""]
#[doc = " The returned counter value is given in microseconds since an epoch time. The clock used for the"]
#[doc = " counter itself is implementation-defined, but generally speaking, it is global, monotonic, and"]
#[doc = " makes use of the most accurate high-performance counter available on the system."]
#[doc = " @returns microseconds since an unspecified epoch."]
#[doc = " @since 3.0.0"]
pub fn LeapGetNow() -> i64;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Creates a new LEAP_CONNECTION object."]
#[doc = ""]
#[doc = " Pass the LEAP_CONNECTION pointer to LeapOpenConnection() to establish a"]
#[doc = " connection to the Leap Motion service; and to subsequent operations"]
#[doc = " on the same connection."]
#[doc = ""]
#[doc = " @param pConfig The configuration to be used with the newly created connection."]
#[doc = " If pConfig is null, a connection is created with a default configuration."]
#[doc = " @param[out] phConnection Receives a pointer to the connection object"]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapCreateConnection(
pConfig: *const LEAP_CONNECTION_CONFIG,
phConnection: *mut LEAP_CONNECTION,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Opens a connection to the service."]
#[doc = ""]
#[doc = " This routine will not block. A connection to the service will not be established until the first"]
#[doc = " invocation of LeapPollConnection."]
#[doc = ""]
#[doc = " @param hConnection A handle to the connection object, created by LeapCreateConnection()."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapOpenConnection(hConnection: LEAP_CONNECTION) -> eLeapRS;
}
#[doc = " The service cannot receive frames fast enough from the underlying hardware."]
#[doc = " @since 3.1.3"]
pub const _eLeapServiceDisposition_eLeapServiceState_LowFpsDetected: _eLeapServiceDisposition = 1;
#[doc = " The service has paused itself due to an insufficient frame rate from the hardware."]
#[doc = " @since 3.1.3"]
pub const _eLeapServiceDisposition_eLeapServiceState_PoorPerformancePause:
_eLeapServiceDisposition = 2;
#[doc = " The combination of all valid flags in this enumeration"]
pub const _eLeapServiceDisposition_eLeapServiceState_ALL: _eLeapServiceDisposition = 3;
pub type _eLeapServiceDisposition = i32;
pub use self::_eLeapServiceDisposition as eLeapServiceDisposition;
#[doc = " \\ingroup Structs"]
#[doc = " Received from LeapPollConnection() when a connection to the Leap Motion service is established."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CONNECTION_EVENT {
#[doc = " A combination of eLeapServiceDisposition flags. @since 3.1.3"]
pub flags: u32,
}
#[test]
fn bindgen_test_layout__LEAP_CONNECTION_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONNECTION_EVENT>(),
4usize,
concat!("Size of: ", stringify!(_LEAP_CONNECTION_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONNECTION_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONNECTION_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_EVENT>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_EVENT),
"::",
stringify!(flags)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Received from LeapPollConnection() when a connection to the Leap Motion service is established."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONNECTION_EVENT = _LEAP_CONNECTION_EVENT;
#[doc = " \\ingroup Structs"]
#[doc = " Received from LeapPollConnection() when a connection to the Leap Motion service is lost."]
#[doc = ""]
#[doc = " If a LeapC function that performs a transaction with the Leap Motion service is called"]
#[doc = " after the connection is lost, the next call to LeapPollConnection() will return"]
#[doc = " this event. Otherwise, it can take up to 5 seconds of polling the connection to"]
#[doc = " receive this event."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CONNECTION_LOST_EVENT {
#[doc = " Reserved for future use. @since 3.0.0"]
pub flags: u32,
}
#[test]
fn bindgen_test_layout__LEAP_CONNECTION_LOST_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONNECTION_LOST_EVENT>(),
4usize,
concat!("Size of: ", stringify!(_LEAP_CONNECTION_LOST_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONNECTION_LOST_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONNECTION_LOST_EVENT))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_LOST_EVENT>())).flags as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_LOST_EVENT),
"::",
stringify!(flags)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Received from LeapPollConnection() when a connection to the Leap Motion service is lost."]
#[doc = ""]
#[doc = " If a LeapC function that performs a transaction with the Leap Motion service is called"]
#[doc = " after the connection is lost, the next call to LeapPollConnection() will return"]
#[doc = " this event. Otherwise, it can take up to 5 seconds of polling the connection to"]
#[doc = " receive this event."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONNECTION_LOST_EVENT = _LEAP_CONNECTION_LOST_EVENT;
#[doc = " The connection is not open."]
#[doc = " Call LeapOpenConnection() to open a connection to the Leap Motion service."]
#[doc = " @since 3.0.0"]
pub const _eLeapConnectionStatus_eLeapConnectionStatus_NotConnected: _eLeapConnectionStatus = 0;
#[doc = " The connection is open."]
#[doc = " @since 3.0.0"]
pub const _eLeapConnectionStatus_eLeapConnectionStatus_Connected: _eLeapConnectionStatus = 1;
#[doc = " Opening the connection is underway, but not complete."]
#[doc = " @since 3.0.0"]
pub const _eLeapConnectionStatus_eLeapConnectionStatus_HandshakeIncomplete: _eLeapConnectionStatus =
2;
#[doc = " The connection could not be opened because the Leap Motion service does not"]
#[doc = " appear to be running."]
#[doc = " @since 3.0.0"]
pub const _eLeapConnectionStatus_eLeapConnectionStatus_NotRunning: _eLeapConnectionStatus =
-419233788;
#[doc = " \\ingroup Enums"]
#[doc = " The connection status codes."]
#[doc = " These codes can be read from the LEAP_CONNECTION_INFO struct created by"]
#[doc = " a call to LeapGetConnectionInfo()."]
#[doc = " @since 3.0.0"]
pub type _eLeapConnectionStatus = i32;
#[doc = " \\ingroup Enums"]
#[doc = " The connection status codes."]
#[doc = " These codes can be read from the LEAP_CONNECTION_INFO struct created by"]
#[doc = " a call to LeapGetConnectionInfo()."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapConnectionStatus as eLeapConnectionStatus;
#[doc = " \\ingroup Structs"]
#[doc = " Information about a connection."]
#[doc = ""]
#[doc = " Call LeapCreateConnection() to generate the handle for the connection;"]
#[doc = " call LeapOpenConnection() to establish the connection; then call"]
#[doc = " LeapGetConnectionInfo(), which creates this struct, to check the connection status."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CONNECTION_INFO {
#[doc = " The size of this structure. @since 3.0.0"]
pub size: u32,
#[doc = " The current status of this connection. @since 3.0.0"]
pub status: eLeapConnectionStatus,
}
#[test]
fn bindgen_test_layout__LEAP_CONNECTION_INFO() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONNECTION_INFO>(),
8usize,
concat!("Size of: ", stringify!(_LEAP_CONNECTION_INFO))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONNECTION_INFO>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONNECTION_INFO))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_INFO>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_INFO),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_INFO>())).status as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_INFO),
"::",
stringify!(status)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Information about a connection."]
#[doc = ""]
#[doc = " Call LeapCreateConnection() to generate the handle for the connection;"]
#[doc = " call LeapOpenConnection() to establish the connection; then call"]
#[doc = " LeapGetConnectionInfo(), which creates this struct, to check the connection status."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONNECTION_INFO = _LEAP_CONNECTION_INFO;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Retrieves status information about the specified connection."]
#[doc = ""]
#[doc = " Call LeapCreateConnection() to generate the handle for the connection;"]
#[doc = " call LeapOpenConnection() to establish the connection; then call"]
#[doc = " this function to check the connection status."]
#[doc = ""]
#[doc = " @param hConnection The handle of the connection of interest. Created by LeapCreateConnection."]
#[doc = " @param[out] pInfo A pointer to a buffer that receives additional connection information. One input,"]
#[doc = " the size field of pInfo is the size of the buffer(i.e. the size of a LEAP_CONNECTION_INFO"]
#[doc = " struct); On output, the size field of pInfo receives the size necessary to hold"]
#[doc = " the entire information block."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapGetConnectionInfo(
hConnection: LEAP_CONNECTION,
pInfo: *mut LEAP_CONNECTION_INFO,
) -> eLeapRS;
}
#[doc = " The policy allowing an application to receive frames in the background. @since 3.0.0"]
pub const _eLeapPolicyFlag_eLeapPolicyFlag_BackgroundFrames: _eLeapPolicyFlag = 1;
#[doc = " The policy specifying whether to automatically stream images from the device. @since 4.0.0"]
pub const _eLeapPolicyFlag_eLeapPolicyFlag_Images: _eLeapPolicyFlag = 2;
#[doc = " The policy specifying whether to optimize tracking for head-mounted device. @since 3.0.0"]
pub const _eLeapPolicyFlag_eLeapPolicyFlag_OptimizeHMD: _eLeapPolicyFlag = 4;
#[doc = " The policy allowing an application to pause or resume service tracking. @since 3.0.0"]
pub const _eLeapPolicyFlag_eLeapPolicyFlag_AllowPauseResume: _eLeapPolicyFlag = 8;
#[doc = " The policy allowing an application to receive per-frame map points. @since 4.0.0"]
pub const _eLeapPolicyFlag_eLeapPolicyFlag_MapPoints: _eLeapPolicyFlag = 128;
#[doc = " \\ingroup Enum"]
#[doc = " Enumerates flags for the service policies."]
pub type _eLeapPolicyFlag = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Enumerates flags for the service policies."]
pub use self::_eLeapPolicyFlag as eLeapPolicyFlag;
#[doc = " \\ingroup Structs"]
#[doc = " The response from a request to get or set a policy."]
#[doc = " LeapPollConnection() creates this struct when the response becomes available."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_POLICY_EVENT {
#[doc = " Reserved for future use. @since 3.0.0"]
pub reserved: u32,
#[doc = " A bitfield containing the policies effective at the"]
#[doc = " time the policy event was processed. @since 3.0.0"]
pub current_policy: u32,
}
#[test]
fn bindgen_test_layout__LEAP_POLICY_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_POLICY_EVENT>(),
8usize,
concat!("Size of: ", stringify!(_LEAP_POLICY_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_POLICY_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_POLICY_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_POLICY_EVENT>())).reserved as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POLICY_EVENT),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_POLICY_EVENT>())).current_policy as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POLICY_EVENT),
"::",
stringify!(current_policy)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " The response from a request to get or set a policy."]
#[doc = " LeapPollConnection() creates this struct when the response becomes available."]
#[doc = " @since 3.0.0"]
pub type LEAP_POLICY_EVENT = _LEAP_POLICY_EVENT;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Sets or clears one or more policy flags."]
#[doc = ""]
#[doc = " Changing policies is asynchronous. After you call this function, a subsequent"]
#[doc = " call to LeapPollConnection provides a LEAP_POLICY_EVENT containing the current"]
#[doc = " policies, reflecting any changes."]
#[doc = ""]
#[doc = " To get the current policies without changes, specify zero for both the set"]
#[doc = " and clear parameters. When ready, LeapPollConnection() provides the"]
#[doc = " a LEAP_POLICY_EVENT containing the current settings."]
#[doc = ""]
#[doc = " The eLeapPolicyFlag enumeration defines the policy flags."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param set A bitwise combination of flags to be set. Set to 0 if not setting any flags."]
#[doc = " @param clear A bitwise combination of flags to be cleared. Set to 0 to if not clearing any flags."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapSetPolicyFlags(hConnection: LEAP_CONNECTION, set: u64, clear: u64) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Pauses the service"]
#[doc = ""]
#[doc = " Attempts to pause or unpause the service depending on the argument."]
#[doc = " This is treated as a 'user pause', as though a user had requested a pause through the"]
#[doc = " Leap Control Panel. The connection must have the AllowPauseResume policy set"]
#[doc = " or it will fail with eLeapRS_InvalidArgument."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param pause Set to 'true' to pause, or 'false' to unpause"]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 4.0.0"]
pub fn LeapSetPause(hConnection: LEAP_CONNECTION, pause: bool) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Fucntions"]
#[doc = " Sets the allocator functions to use for a particular connection."]
#[doc = ""]
#[doc = " If user-supplied allocator functions are not supplied, the functions that require"]
#[doc = " dynamic memory allocation will not be available."]
#[doc = ""]
#[doc = " @param hConnection A handle to the connection object, created by LeapCreateConnection()."]
#[doc = " @param allocator A pointer to a structure containing the allocator functions to be called"]
#[doc = " as needed by the library."]
#[doc = " @since 4.0.0"]
pub fn LeapSetAllocator(
hConnection: LEAP_CONNECTION,
allocator: *const LEAP_ALLOCATOR,
) -> eLeapRS;
}
#[doc = " The type is unknown (which is an abnormal condition). @since 3.0.0"]
pub const _eLeapValueType_eLeapValueType_Unknown: _eLeapValueType = 0;
#[doc = " A boolean value. @since 3.0.0"]
pub const _eLeapValueType_eLeapValueType_Boolean: _eLeapValueType = 1;
#[doc = " An integer value. @since 3.0.0"]
pub const _eLeapValueType_eLeapValueType_Int32: _eLeapValueType = 2;
#[doc = " A floating point value. @since 3.0.0"]
pub const _eLeapValueType_eLeapValueType_Float: _eLeapValueType = 3;
#[doc = " A string value. @since 3.0.0"]
pub const _eLeapValueType_eLeapValueType_String: _eLeapValueType = 4;
#[doc = " A string value. @since 3.0.0"]
pub const _eLeapValueType_FORCE_DWORD: _eLeapValueType = 2147483647;
#[doc = " \\ingroup Enum"]
#[doc = " Identifies the operative data type of a LEAP_VARIANT struct instance."]
#[doc = " @since 3.0.0"]
pub type _eLeapValueType = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Identifies the operative data type of a LEAP_VARIANT struct instance."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapValueType as eLeapValueType;
#[doc = " \\ingroup Structs"]
#[doc = " A variant data type used to get and set service configuration values."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_VARIANT {
#[doc = " The active data type in this instance. @since 3.0.0"]
pub type_: eLeapValueType,
pub __bindgen_anon_1: _LEAP_VARIANT__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union _LEAP_VARIANT__bindgen_ty_1 {
#[doc = " A Boolean value. @since 3.0.0"]
pub boolValue: bool,
#[doc = " An integer value. @since 3.0.0"]
pub iValue: i32,
#[doc = " A floating point value. @since 3.0.0"]
pub fValue: f32,
#[doc = " A pointer to a string buffer. @since 3.0.0"]
pub strValue: *const ::std::os::raw::c_char,
_bindgen_union_align: [u8; 8usize],
}
#[test]
fn bindgen_test_layout__LEAP_VARIANT__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_VARIANT__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(_LEAP_VARIANT__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<_LEAP_VARIANT__bindgen_ty_1>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_VARIANT__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VARIANT__bindgen_ty_1>())).boolValue as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VARIANT__bindgen_ty_1),
"::",
stringify!(boolValue)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VARIANT__bindgen_ty_1>())).iValue as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VARIANT__bindgen_ty_1),
"::",
stringify!(iValue)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VARIANT__bindgen_ty_1>())).fValue as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VARIANT__bindgen_ty_1),
"::",
stringify!(fValue)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VARIANT__bindgen_ty_1>())).strValue as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VARIANT__bindgen_ty_1),
"::",
stringify!(strValue)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_VARIANT() {
assert_eq!(
::std::mem::size_of::<_LEAP_VARIANT>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_VARIANT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_VARIANT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_VARIANT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_VARIANT>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VARIANT),
"::",
stringify!(type_)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A variant data type used to get and set service configuration values."]
#[doc = " @since 3.0.0"]
pub type LEAP_VARIANT = _LEAP_VARIANT;
#[doc = " \\ingroup Structs"]
#[doc = " Contains the response to a configuration value request."]
#[doc = " Call LeapRequestConfigValue() to request a service config value. The value is"]
#[doc = " fetched asynchronously since it requires a service transaction. LeapPollConnection()"]
#[doc = " returns this event structure when the request has been processed. Use the requestID"]
#[doc = " value to correlate the response to the originating request."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_CONFIG_RESPONSE_EVENT {
#[doc = " An identifier for correlating the request and response. @since 3.0.0"]
pub requestID: u32,
#[doc = " The configuration value retrieved from the service. Do not free any memory pointed to by"]
#[doc = " this member. The value held is only valid until the next call to LeapPollConnection()."]
#[doc = " @since 3.0.0"]
pub value: LEAP_VARIANT,
}
#[test]
fn bindgen_test_layout__LEAP_CONFIG_RESPONSE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONFIG_RESPONSE_EVENT>(),
16usize,
concat!("Size of: ", stringify!(_LEAP_CONFIG_RESPONSE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONFIG_RESPONSE_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONFIG_RESPONSE_EVENT))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONFIG_RESPONSE_EVENT>())).requestID as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONFIG_RESPONSE_EVENT),
"::",
stringify!(requestID)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONFIG_RESPONSE_EVENT>())).value as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONFIG_RESPONSE_EVENT),
"::",
stringify!(value)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Contains the response to a configuration value request."]
#[doc = " Call LeapRequestConfigValue() to request a service config value. The value is"]
#[doc = " fetched asynchronously since it requires a service transaction. LeapPollConnection()"]
#[doc = " returns this event structure when the request has been processed. Use the requestID"]
#[doc = " value to correlate the response to the originating request."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONFIG_RESPONSE_EVENT = _LEAP_CONFIG_RESPONSE_EVENT;
#[doc = " \\ingroup Structs"]
#[doc = " The result of a configuration change request. Contains a status of true for a"]
#[doc = " successful change."]
#[doc = " Call LeapSaveConfigValue() to request a service config change. The change is"]
#[doc = " performed asynchronously -- and may fail. LeapPollConnection()"]
#[doc = " returns this event structure when the request has been processed. Use the requestID"]
#[doc = " value to correlate the response to the originating request."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CONFIG_CHANGE_EVENT {
#[doc = " An identifier for correlating the request and response. @since 3.0.0"]
pub requestID: u32,
#[doc = " The result of the change operation: true on success; false on failure. @since 3.0.0"]
pub status: bool,
}
#[test]
fn bindgen_test_layout__LEAP_CONFIG_CHANGE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONFIG_CHANGE_EVENT>(),
5usize,
concat!("Size of: ", stringify!(_LEAP_CONFIG_CHANGE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONFIG_CHANGE_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONFIG_CHANGE_EVENT))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONFIG_CHANGE_EVENT>())).requestID as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONFIG_CHANGE_EVENT),
"::",
stringify!(requestID)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONFIG_CHANGE_EVENT>())).status as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONFIG_CHANGE_EVENT),
"::",
stringify!(status)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " The result of a configuration change request. Contains a status of true for a"]
#[doc = " successful change."]
#[doc = " Call LeapSaveConfigValue() to request a service config change. The change is"]
#[doc = " performed asynchronously -- and may fail. LeapPollConnection()"]
#[doc = " returns this event structure when the request has been processed. Use the requestID"]
#[doc = " value to correlate the response to the originating request."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONFIG_CHANGE_EVENT = _LEAP_CONFIG_CHANGE_EVENT;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Causes the client to commit a configuration change to the Leap Motion service."]
#[doc = ""]
#[doc = " The change is performed asynchronously -- and may fail. LeapPollConnection()"]
#[doc = " returns this event structure when the request has been processed. Use the pRequestID"]
#[doc = " value to correlate the response to the originating request."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param key The key of the configuration to commit."]
#[doc = " @param value The value of the configuration to commit."]
#[doc = " @param[out] pRequestID A pointer to a memory location to which the id for this request is written, or nullptr if this value is not needed."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapSaveConfigValue(
hConnection: LEAP_CONNECTION,
key: *const ::std::os::raw::c_char,
value: *const LEAP_VARIANT,
pRequestID: *mut u32,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Requests the current value of a service configuration setting."]
#[doc = " The value is fetched asynchronously since it requires a service transaction. LeapPollConnection()"]
#[doc = " returns this event structure when the request has been processed. Use the pRequestID"]
#[doc = " value to correlate the response to the originating request."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param key The key of the configuration to request"]
#[doc = " @param[out] pRequestID A pointer to a memory location to which the id for this request is written."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapRequestConfigValue(
hConnection: LEAP_CONNECTION,
key: *const ::std::os::raw::c_char,
pRequestID: *mut u32,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Retrieves a list of Leap Motion devices currently attached to the system."]
#[doc = ""]
#[doc = " To get the number of connected devices, call this function with the pArray parameter"]
#[doc = " set to null. The number of devices is written to the memory specified by pnArray."]
#[doc = " Use the device count to create an array of LEAP_DEVICE_REF structs large enough to"]
#[doc = " hold the number of connected devices. Finally, call LeapGetDeviceList() with this"]
#[doc = " array and known count to get the list of Leap devices. A device must be opened with"]
#[doc = " LeapOpenDevice() before device properties can be queried."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param[out] pArray A pointer to an array that LeapC fills with the device list."]
#[doc = " @param[in,out] pnArray On input, set to the number of elements in pArray; on output,"]
#[doc = " LeapC sets this to the number of valid device handles."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapGetDeviceList(
hConnection: LEAP_CONNECTION,
pArray: *mut LEAP_DEVICE_REF,
pnArray: *mut u32,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Opens a device reference and retrieves a handle to the device."]
#[doc = ""]
#[doc = " To ensure resources are properly freed, users must call LeapCloseDevice()"]
#[doc = " when finished with the device, even if the retrieved device has problems"]
#[doc = " or cannot stream."]
#[doc = ""]
#[doc = " @param rDevice A device reference."]
#[doc = " @param[out] phDevice A pointer that receives the opened device handle."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapOpenDevice(rDevice: LEAP_DEVICE_REF, phDevice: *mut LEAP_DEVICE) -> eLeapRS;
}
#[doc = " The device can send color images. @since 3.0.0"]
pub const eLeapDeviceCaps_eLeapDeviceCaps_Color: eLeapDeviceCaps = 1;
#[doc = " \\ingroup Enum"]
#[doc = " Flags enumerating Leap device capabilities. @since 3.0.0"]
pub type eLeapDeviceCaps = i32;
#[doc = " An unknown device. @since 3.1.3"]
pub const _eLeapDevicePID_eLeapDevicePID_Unknown: _eLeapDevicePID = 0;
#[doc = " The Leap Motion consumer peripheral. @since 3.0.0"]
pub const _eLeapDevicePID_eLeapDevicePID_Peripheral: _eLeapDevicePID = 3;
#[doc = " Internal research product codename \"Dragonfly\". @since 3.0.0"]
pub const _eLeapDevicePID_eLeapDevicePID_Dragonfly: _eLeapDevicePID = 4354;
#[doc = " Internal research product codename \"Nightcrawler\". @since 3.0.0"]
pub const _eLeapDevicePID_eLeapDevicePID_Nightcrawler: _eLeapDevicePID = 4609;
#[doc = " Research product codename \"Rigel\". @since 4.0.0"]
pub const _eLeapDevicePID_eLeapDevicePID_Rigel: _eLeapDevicePID = 4610;
#[doc = " An invalid device type value. @since 3.1.3"]
pub const _eLeapDevicePID_eLeapDevicePID_Invalid: _eLeapDevicePID = -1;
#[doc = " \\ingroup Enum"]
#[doc = " Device hardware types. @since 3.0.0"]
pub type _eLeapDevicePID = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Device hardware types. @since 3.0.0"]
pub use self::_eLeapDevicePID as eLeapDevicePID;
#[doc = " \\ingroup Structs"]
#[doc = " Properties of a Leap device."]
#[doc = " Get a LEAP_DEVICE_INFO by calling LeapGetDeviceInfo() with the handle for"]
#[doc = " device. The device must be open."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DEVICE_INFO {
#[doc = " Size of this structure. @since 3.0.0"]
pub size: u32,
#[doc = " A combination of eLeapDeviceStatus flags. @since 3.0.0"]
pub status: u32,
#[doc = " A combination of eLeapDeviceCaps flags. @since 3.0.0"]
pub caps: u32,
#[doc = " One of the eLeapDevicePID members. @since 3.0.0"]
pub pid: eLeapDevicePID,
#[doc = " The device baseline, in micrometers."]
#[doc = ""]
#[doc = " The baseline is defined as the distance between the center axis of each lens in a stereo camera"]
#[doc = " system. For other camera systems, this value is set to zero."]
#[doc = " @since 3.0.0"]
pub baseline: u32,
#[doc = " The required length of the serial number char buffer including the null character. @since 3.0.0"]
pub serial_length: u32,
#[doc = " A pointer to the null-terminated device serial number string. @since 3.0.0"]
pub serial: *mut ::std::os::raw::c_char,
#[doc = " The horizontal field of view of this device in radians. @since 3.0.0"]
pub h_fov: f32,
#[doc = " The vertical field of view of this device in radians. @since 3.0.0"]
pub v_fov: f32,
#[doc = " The maximum range for this device, in micrometers. @since 3.0.0"]
pub range: u32,
}
#[test]
fn bindgen_test_layout__LEAP_DEVICE_INFO() {
assert_eq!(
::std::mem::size_of::<_LEAP_DEVICE_INFO>(),
44usize,
concat!("Size of: ", stringify!(_LEAP_DEVICE_INFO))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DEVICE_INFO>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DEVICE_INFO))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).status as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).caps as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(caps)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).pid as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(pid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).baseline as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(baseline)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).serial_length as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(serial_length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).serial as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(serial)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).h_fov as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(h_fov)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).v_fov as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(v_fov)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_INFO>())).range as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_INFO),
"::",
stringify!(range)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Properties of a Leap device."]
#[doc = " Get a LEAP_DEVICE_INFO by calling LeapGetDeviceInfo() with the handle for"]
#[doc = " device. The device must be open."]
#[doc = " @since 3.0.0"]
pub type LEAP_DEVICE_INFO = _LEAP_DEVICE_INFO;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Gets device properties."]
#[doc = ""]
#[doc = " To get the device serial number, you must supply a LEAP_DEVICE_INFO struct whose"]
#[doc = " serial member points to a char array large enough to hold the null-terminated"]
#[doc = " serial number string. To get the required length, call LeapGetDeviceInfo() using"]
#[doc = " a LEAP_DEVICE_INFO struct that has serial set to NULL. LeapC sets serial_length field of"]
#[doc = " the struct to the required length. You can then allocate memory for the string,"]
#[doc = " set the serial field, and call this function again."]
#[doc = ""]
#[doc = " @param hDevice A handle to the device to be queried."]
#[doc = " @param[out] info The struct to receive the device property data."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.0.0"]
pub fn LeapGetDeviceInfo(hDevice: LEAP_DEVICE, info: *mut LEAP_DEVICE_INFO) -> eLeapRS;
}
#[doc = " \\ingroup Structs"]
#[doc = " Device event information."]
#[doc = ""]
#[doc = " LeapPollConnection() produces a message containing this event when a new"]
#[doc = " device is detected. You can use the handle provided by the device filed to"]
#[doc = " open a device so that you can access its properties."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DEVICE_EVENT {
#[doc = " Reserved for future use. @since 3.0.0"]
pub flags: u32,
#[doc = " The handle reference of to the newly attached device. @since 3.0.0"]
pub device: LEAP_DEVICE_REF,
#[doc = " The status of the connected device. A combination of flags from the eLeapDeviceStatus collection."]
pub status: u32,
}
#[test]
fn bindgen_test_layout__LEAP_DEVICE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_DEVICE_EVENT>(),
20usize,
concat!("Size of: ", stringify!(_LEAP_DEVICE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DEVICE_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DEVICE_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_EVENT>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_EVENT),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_EVENT>())).device as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_EVENT),
"::",
stringify!(device)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DEVICE_EVENT>())).status as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_EVENT),
"::",
stringify!(status)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Device event information."]
#[doc = ""]
#[doc = " LeapPollConnection() produces a message containing this event when a new"]
#[doc = " device is detected. You can use the handle provided by the device filed to"]
#[doc = " open a device so that you can access its properties."]
#[doc = " @since 3.0.0"]
pub type LEAP_DEVICE_EVENT = _LEAP_DEVICE_EVENT;
#[doc = " The device is sending out frames. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_Streaming: _eLeapDeviceStatus = 1;
#[doc = " Device streaming has been paused. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_Paused: _eLeapDeviceStatus = 2;
#[doc = " There are known sources of infrared interference. Device has transitioned to"]
#[doc = " robust mode in order to compensate. @since 3.1.3"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_Robust: _eLeapDeviceStatus = 4;
#[doc = " The device's window is smudged, tracking may be degraded. @since 3.1.3"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_Smudged: _eLeapDeviceStatus = 8;
#[doc = " The device has entered low-resource mode. @since 4.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_LowResource: _eLeapDeviceStatus = 16;
#[doc = " The device has failed, but the failure reason is not known. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_UnknownFailure: _eLeapDeviceStatus = -402587648;
#[doc = " The device has a bad calibration record and cannot send frames. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadCalibration: _eLeapDeviceStatus = -402587647;
#[doc = " The device reports corrupt firmware or cannot install a required firmware update. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadFirmware: _eLeapDeviceStatus = -402587646;
#[doc = " The device USB connection is faulty. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadTransport: _eLeapDeviceStatus = -402587645;
#[doc = " The device USB control interfaces failed to initialize. @since 3.0.0"]
pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadControl: _eLeapDeviceStatus = -402587644;
#[doc = " \\ingroup Enum"]
#[doc = " Enumerates the device status codes."]
#[doc = " @since 3.0.0"]
pub type _eLeapDeviceStatus = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Enumerates the device status codes."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapDeviceStatus as eLeapDeviceStatus;
#[doc = " \\ingroup Structs"]
#[doc = " Device failure information."]
#[doc = " LeapPollConnection() produces a message containing this event when a"]
#[doc = " device fails. Only partial information may be available. If hDevice is"]
#[doc = " non-null, then you can use it to identify the failed device with a known,"]
#[doc = " open device."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DEVICE_FAILURE_EVENT {
#[doc = " The status of this failure event. @since 3.0.0"]
pub status: eLeapDeviceStatus,
#[doc = " A handle to the device generating this failure event, if available, otherwise NULL."]
#[doc = ""]
#[doc = " You are not responsible for closing this handle."]
#[doc = " @since 3.0.0"]
pub hDevice: LEAP_DEVICE,
}
#[test]
fn bindgen_test_layout__LEAP_DEVICE_FAILURE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_DEVICE_FAILURE_EVENT>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_DEVICE_FAILURE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DEVICE_FAILURE_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DEVICE_FAILURE_EVENT))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DEVICE_FAILURE_EVENT>())).status as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_FAILURE_EVENT),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DEVICE_FAILURE_EVENT>())).hDevice as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_FAILURE_EVENT),
"::",
stringify!(hDevice)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Device failure information."]
#[doc = " LeapPollConnection() produces a message containing this event when a"]
#[doc = " device fails. Only partial information may be available. If hDevice is"]
#[doc = " non-null, then you can use it to identify the failed device with a known,"]
#[doc = " open device."]
#[doc = " @since 3.0.0"]
pub type LEAP_DEVICE_FAILURE_EVENT = _LEAP_DEVICE_FAILURE_EVENT;
#[doc = " \\ingroup Structs"]
#[doc = " Identifying information for a frame of tracking data. @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_FRAME_HEADER {
#[doc = " Reserved, set to zero. @since 3.0.0"]
pub reserved: *mut ::std::os::raw::c_void,
#[doc = " A unique identifier for this frame"]
#[doc = ""]
#[doc = " All frames carrying this frame ID are part of the same unit of processing. This counter"]
#[doc = " is generally an increasing counter, but may reset to another value if the user stops and"]
#[doc = " restarts streaming."]
#[doc = ""]
#[doc = " For interpolated frames, this value corresponds to the identifier of the frame upper bound."]
#[doc = " @since 3.0.0"]
pub frame_id: i64,
#[doc = " The timestamp for this image, in microseconds, referenced against LeapGetNow()."]
#[doc = " @since 3.0.0"]
pub timestamp: i64,
}
#[test]
fn bindgen_test_layout__LEAP_FRAME_HEADER() {
assert_eq!(
::std::mem::size_of::<_LEAP_FRAME_HEADER>(),
24usize,
concat!("Size of: ", stringify!(_LEAP_FRAME_HEADER))
);
assert_eq!(
::std::mem::align_of::<_LEAP_FRAME_HEADER>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_FRAME_HEADER))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_FRAME_HEADER>())).reserved as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_FRAME_HEADER),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_FRAME_HEADER>())).frame_id as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_FRAME_HEADER),
"::",
stringify!(frame_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_FRAME_HEADER>())).timestamp as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_FRAME_HEADER),
"::",
stringify!(timestamp)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Identifying information for a frame of tracking data. @since 3.0.0"]
pub type LEAP_FRAME_HEADER = _LEAP_FRAME_HEADER;
#[doc = " An invalid or unknown type. @since 3.0.0"]
pub const _eLeapImageType_eLeapImageType_UNKNOWN: _eLeapImageType = 0;
#[doc = " Default, processed IR images. @since 3.0.0"]
pub const _eLeapImageType_eLeapImageType_Default: _eLeapImageType = 1;
#[doc = " Raw images from the device. @since 3.0.0"]
pub const _eLeapImageType_eLeapImageType_Raw: _eLeapImageType = 2;
#[doc = " \\ingroup Enum"]
#[doc = " Functional image types (not data formats)."]
pub type _eLeapImageType = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Functional image types (not data formats)."]
pub use self::_eLeapImageType as eLeapImageType;
#[doc = " An invalid or unknown format. @since 3.0.0"]
pub const _eLeapImageFormat_eLeapImageFormat_UNKNOWN: _eLeapImageFormat = 0;
#[doc = " An infrared image. @since 3.0.0"]
pub const _eLeapImageFormat_eLeapImageFormat_IR: _eLeapImageFormat = 3240521;
#[doc = " A Bayer RGBIr image with uncorrected RGB channels. @since 3.0.0"]
pub const _eLeapImageFormat_eLeapImageFormat_RGBIr_Bayer: _eLeapImageFormat = 1229083207;
#[doc = " \\ingroup Enum"]
#[doc = " Image formats."]
#[doc = " @since 3.0.0"]
pub type _eLeapImageFormat = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Image formats."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapImageFormat as eLeapImageFormat;
#[doc = " An unknown or invalid type. @since 3.0.0"]
pub const _eLeapPerspectiveType_eLeapPerspectiveType_invalid: _eLeapPerspectiveType = 0;
#[doc = " A canonically left image. @since 3.0.0"]
pub const _eLeapPerspectiveType_eLeapPerspectiveType_stereo_left: _eLeapPerspectiveType = 1;
#[doc = " A canonically right image. @since 3.0.0"]
pub const _eLeapPerspectiveType_eLeapPerspectiveType_stereo_right: _eLeapPerspectiveType = 2;
#[doc = " Reserved for future use. @since 3.0.0"]
pub const _eLeapPerspectiveType_eLeapPerspectiveType_mono: _eLeapPerspectiveType = 3;
#[doc = " \\ingroup Enum"]
#[doc = " Camera perspective types."]
#[doc = " @since 3.0.0"]
pub type _eLeapPerspectiveType = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Camera perspective types."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapPerspectiveType as eLeapPerspectiveType;
#[doc = " \\ingroup Structs"]
#[doc = " Properties of a sensor image."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_IMAGE_PROPERTIES {
#[doc = " The type of this image. @since 3.0.0"]
pub type_: eLeapImageType,
#[doc = " The format of this image. @since 3.0.0"]
pub format: eLeapImageFormat,
#[doc = " The number of bytes per image pixel. @since 3.0.0"]
pub bpp: u32,
#[doc = " The number of horizontal pixels in the image. @since 3.0.0"]
pub width: u32,
#[doc = " The number of rows of pixels in the image. @since 3.0.0"]
pub height: u32,
#[doc = " Reserved for future use. @since 3.0.0"]
pub x_scale: f32,
#[doc = " Reserved for future use. @since 3.0.0"]
pub y_scale: f32,
#[doc = " Reserved for future use. @since 3.0.0"]
pub x_offset: f32,
#[doc = " Reserved for future use. @since 3.0.0"]
pub y_offset: f32,
}
#[test]
fn bindgen_test_layout__LEAP_IMAGE_PROPERTIES() {
assert_eq!(
::std::mem::size_of::<_LEAP_IMAGE_PROPERTIES>(),
36usize,
concat!("Size of: ", stringify!(_LEAP_IMAGE_PROPERTIES))
);
assert_eq!(
::std::mem::align_of::<_LEAP_IMAGE_PROPERTIES>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_IMAGE_PROPERTIES))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).format as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).bpp as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(bpp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).width as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).height as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).x_scale as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(x_scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).y_scale as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(y_scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).x_offset as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(x_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_PROPERTIES>())).y_offset as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_PROPERTIES),
"::",
stringify!(y_offset)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Properties of a sensor image."]
#[doc = " @since 3.0.0"]
pub type LEAP_IMAGE_PROPERTIES = _LEAP_IMAGE_PROPERTIES;
#[doc = " \\ingroup Structs"]
#[doc = " A matrix containing lens distortion correction coordinates."]
#[doc = ""]
#[doc = " Each point in the grid contains the coordinates of the pixel in the image buffer that"]
#[doc = " contains the data for the pixel in the undistorted image corresponding"]
#[doc = " to that point in the grid."]
#[doc = " Interpolate between points in the matrix to correct image pixels that don't"]
#[doc = " fall directly underneath a point in the distortion grid."]
#[doc = ""]
#[doc = " Current devices use a 64x64 point distortion grid."]
#[doc = " @since 3.0.0"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _LEAP_DISTORTION_MATRIX {
#[doc = " A grid of 2D points. @since 3.0.0"]
pub matrix: [[_LEAP_DISTORTION_MATRIX__bindgen_ty_1; 64usize]; 64usize],
}
#[doc = " A point in the distortion grid. @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DISTORTION_MATRIX__bindgen_ty_1 {
#[doc = " The x-pixel coordinate. @since 3.0.0"]
pub x: f32,
#[doc = " The y-pixel coordinate. @since 3.0.0"]
pub y: f32,
}
#[test]
fn bindgen_test_layout__LEAP_DISTORTION_MATRIX__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>())).x as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>())).y as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1),
"::",
stringify!(y)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_DISTORTION_MATRIX() {
assert_eq!(
::std::mem::size_of::<_LEAP_DISTORTION_MATRIX>(),
32768usize,
concat!("Size of: ", stringify!(_LEAP_DISTORTION_MATRIX))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DISTORTION_MATRIX>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DISTORTION_MATRIX))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DISTORTION_MATRIX>())).matrix as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DISTORTION_MATRIX),
"::",
stringify!(matrix)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A matrix containing lens distortion correction coordinates."]
#[doc = ""]
#[doc = " Each point in the grid contains the coordinates of the pixel in the image buffer that"]
#[doc = " contains the data for the pixel in the undistorted image corresponding"]
#[doc = " to that point in the grid."]
#[doc = " Interpolate between points in the matrix to correct image pixels that don't"]
#[doc = " fall directly underneath a point in the distortion grid."]
#[doc = ""]
#[doc = " Current devices use a 64x64 point distortion grid."]
#[doc = " @since 3.0.0"]
pub type LEAP_DISTORTION_MATRIX = _LEAP_DISTORTION_MATRIX;
#[doc = " \\ingroup Structs"]
#[doc = " Describes the image to request."]
#[doc = " Pass this struct to the LeapImageRequest() function."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_IMAGE_FRAME_DESCRIPTION {
#[doc = " The ID of the frame corresponding to the desired image. @since 3.0.0"]
pub frame_id: i64,
#[doc = " The type of the desired image. @since 3.0.0"]
pub type_: eLeapImageType,
#[doc = " Length of your image buffer. The buffer must be large enough to"]
#[doc = " hold the request image."]
pub buffer_len: u64,
#[doc = " An allocated buffer large enough to contain the requested image. The buffer"]
#[doc = " must remain valid until the image request completes or fails."]
#[doc = " @since 3.0.0"]
pub pBuffer: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout__LEAP_IMAGE_FRAME_DESCRIPTION() {
assert_eq!(
::std::mem::size_of::<_LEAP_IMAGE_FRAME_DESCRIPTION>(),
28usize,
concat!("Size of: ", stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION))
);
assert_eq!(
::std::mem::align_of::<_LEAP_IMAGE_FRAME_DESCRIPTION>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_IMAGE_FRAME_DESCRIPTION>())).frame_id as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
"::",
stringify!(frame_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_IMAGE_FRAME_DESCRIPTION>())).type_ as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_IMAGE_FRAME_DESCRIPTION>())).buffer_len as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
"::",
stringify!(buffer_len)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_IMAGE_FRAME_DESCRIPTION>())).pBuffer as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
"::",
stringify!(pBuffer)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Describes the image to request."]
#[doc = " Pass this struct to the LeapImageRequest() function."]
#[doc = " @since 3.0.0"]
pub type LEAP_IMAGE_FRAME_DESCRIPTION = _LEAP_IMAGE_FRAME_DESCRIPTION;
#[doc = " \\ingroup Structs"]
#[doc = " A three element, floating-point vector."]
#[doc = " @since 3.0.0"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _LEAP_VECTOR {
pub __bindgen_anon_1: _LEAP_VECTOR__bindgen_ty_1,
}
#[doc = " You can access the vector members as either an array or individual float values."]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union _LEAP_VECTOR__bindgen_ty_1 {
#[doc = " The vector as an array. @since 3.0.0"]
pub v: [f32; 3usize],
pub __bindgen_anon_1: _LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: [u8; 12usize],
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The x spatial coordinate. @since 3.0.0"]
pub x: f32,
#[doc = " The y spatial coordinate. @since 3.0.0"]
pub y: f32,
#[doc = " The z spatial coordinate. @since 3.0.0"]
pub z: f32,
}
#[test]
fn bindgen_test_layout__LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>(),
12usize,
concat!(
"Size of: ",
stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>())).x as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>())).y as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>())).z as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(z)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_VECTOR__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_VECTOR__bindgen_ty_1>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_VECTOR__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<_LEAP_VECTOR__bindgen_ty_1>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_VECTOR__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_VECTOR__bindgen_ty_1>())).v as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_VECTOR__bindgen_ty_1),
"::",
stringify!(v)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_VECTOR() {
assert_eq!(
::std::mem::size_of::<_LEAP_VECTOR>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_VECTOR))
);
assert_eq!(
::std::mem::align_of::<_LEAP_VECTOR>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_VECTOR))
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A three element, floating-point vector."]
#[doc = " @since 3.0.0"]
pub type LEAP_VECTOR = _LEAP_VECTOR;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _LEAP_MATRIX_3x3 {
pub m: [LEAP_VECTOR; 3usize],
}
#[test]
fn bindgen_test_layout__LEAP_MATRIX_3x3() {
assert_eq!(
::std::mem::size_of::<_LEAP_MATRIX_3x3>(),
36usize,
concat!("Size of: ", stringify!(_LEAP_MATRIX_3x3))
);
assert_eq!(
::std::mem::align_of::<_LEAP_MATRIX_3x3>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_MATRIX_3x3))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_MATRIX_3x3>())).m as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_MATRIX_3x3),
"::",
stringify!(m)
)
);
}
pub type LEAP_MATRIX_3x3 = _LEAP_MATRIX_3x3;
#[doc = " \\ingroup Structs"]
#[doc = " A four element, floating point quaternion. @since 3.1.2"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _LEAP_QUATERNION {
pub __bindgen_anon_1: _LEAP_QUATERNION__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union _LEAP_QUATERNION__bindgen_ty_1 {
#[doc = " The quaternion as an array. @since 3.1.3"]
pub v: [f32; 4usize],
pub __bindgen_anon_1: _LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: [u8; 16usize],
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The x coefficient of the vector portion of the quaternion. @since 3.1.2"]
pub x: f32,
#[doc = " The y coefficient of the vector portion of the quaternion. @since 3.1.2"]
pub y: f32,
#[doc = " The z coefficient of the vector portion of the quaternion. @since 3.1.2"]
pub z: f32,
#[doc = " The scalar portion of the quaternion. @since 3.1.2"]
pub w: f32,
}
#[test]
fn bindgen_test_layout__LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>())).x as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>())).y as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>())).z as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(z)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>())).w as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(w)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_QUATERNION__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_QUATERNION__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(_LEAP_QUATERNION__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<_LEAP_QUATERNION__bindgen_ty_1>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_QUATERNION__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_QUATERNION__bindgen_ty_1>())).v as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_QUATERNION__bindgen_ty_1),
"::",
stringify!(v)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_QUATERNION() {
assert_eq!(
::std::mem::size_of::<_LEAP_QUATERNION>(),
16usize,
concat!("Size of: ", stringify!(_LEAP_QUATERNION))
);
assert_eq!(
::std::mem::align_of::<_LEAP_QUATERNION>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_QUATERNION))
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A four element, floating point quaternion. @since 3.1.2"]
pub type LEAP_QUATERNION = _LEAP_QUATERNION;
#[doc = " \\ingroup Structs"]
#[doc = " Describes a bone's position and orientation."]
#[doc = ""]
#[doc = " Bones are members of the LEAP_DIGIT struct."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_BONE {
#[doc = " The base of the bone, closer to the heart. The bones origin. @since 3.0.0"]
pub prev_joint: LEAP_VECTOR,
#[doc = " The end of the bone, further from the heart. @since 3.0.0"]
pub next_joint: LEAP_VECTOR,
#[doc = " The average width of the flesh around the bone in millimeters. @since 3.0.0"]
pub width: f32,
#[doc = " Rotation in world space from the forward direction."]
#[doc = " Convert the quaternion to a matrix to derive the basis vectors."]
#[doc = " @since 3.1.2"]
pub rotation: LEAP_QUATERNION,
}
#[test]
fn bindgen_test_layout__LEAP_BONE() {
assert_eq!(
::std::mem::size_of::<_LEAP_BONE>(),
44usize,
concat!("Size of: ", stringify!(_LEAP_BONE))
);
assert_eq!(
::std::mem::align_of::<_LEAP_BONE>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_BONE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_BONE>())).prev_joint as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_BONE),
"::",
stringify!(prev_joint)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_BONE>())).next_joint as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_BONE),
"::",
stringify!(next_joint)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_BONE>())).width as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_BONE),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_BONE>())).rotation as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_BONE),
"::",
stringify!(rotation)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Describes a bone's position and orientation."]
#[doc = ""]
#[doc = " Bones are members of the LEAP_DIGIT struct."]
#[doc = " @since 3.0.0"]
pub type LEAP_BONE = _LEAP_BONE;
#[doc = " \\ingroup Structs"]
#[doc = " Describes the digit of a hand."]
#[doc = " Digits are members of the LEAP_HAND struct."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_DIGIT {
#[doc = " The Leap identifier of this finger. @since 3.0.0"]
pub finger_id: i32,
pub __bindgen_anon_1: _LEAP_DIGIT__bindgen_ty_1,
#[doc = " Reports whether the finger is more or less straight. @since 3.0.0"]
pub is_extended: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _LEAP_DIGIT__bindgen_ty_1 {
#[doc = " All the bones of a digit as an iterable collection. @since 3.0.0"]
pub bones: [LEAP_BONE; 4usize],
pub __bindgen_anon_1: _LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: [u8; 176usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The finger bone wholly inside the hand."]
#[doc = " For thumbs, this bone is set to have zero length and width, an identity basis matrix,"]
#[doc = " and its joint positions are equal."]
#[doc = " Note that this is anatomically incorrect; in anatomical terms, the intermediate phalange"]
#[doc = " is absent in a real thumb, rather than the metacarpal bone. In the Leap Motion model,"]
#[doc = " however, we use a \"zero\" metacarpal bone instead for ease of programming."]
#[doc = " @since 3.0.0"]
pub metacarpal: LEAP_BONE,
#[doc = " The phalange extending from the knuckle. @since 3.0.0"]
pub proximal: LEAP_BONE,
#[doc = " The bone between the proximal phalange and the distal phalange. @since 3.0.0"]
pub intermediate: LEAP_BONE,
#[doc = " The distal phalange terminating at the finger tip. @since 3.0.0"]
pub distal: LEAP_BONE,
}
#[test]
fn bindgen_test_layout__LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>(),
176usize,
concat!(
"Size of: ",
stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>())).metacarpal
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(metacarpal)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>())).proximal as *const _
as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(proximal)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>())).intermediate
as *const _ as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(intermediate)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>())).distal as *const _
as usize
},
132usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(distal)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_DIGIT__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_DIGIT__bindgen_ty_1>(),
176usize,
concat!("Size of: ", stringify!(_LEAP_DIGIT__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DIGIT__bindgen_ty_1>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DIGIT__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DIGIT__bindgen_ty_1>())).bones as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT__bindgen_ty_1),
"::",
stringify!(bones)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_DIGIT() {
assert_eq!(
::std::mem::size_of::<_LEAP_DIGIT>(),
184usize,
concat!("Size of: ", stringify!(_LEAP_DIGIT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DIGIT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DIGIT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DIGIT>())).finger_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT),
"::",
stringify!(finger_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DIGIT>())).is_extended as *const _ as usize },
180usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DIGIT),
"::",
stringify!(is_extended)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Describes the digit of a hand."]
#[doc = " Digits are members of the LEAP_HAND struct."]
#[doc = " @since 3.0.0"]
pub type LEAP_DIGIT = _LEAP_DIGIT;
#[doc = " \\ingroup Structs"]
#[doc = " Properties associated with the palm of the hand."]
#[doc = " The Palm is a member of the LEAP_HAND struct."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_PALM {
#[doc = " The center position of the palm in millimeters from the Leap Motion origin."]
#[doc = " @since 3.0.0"]
pub position: LEAP_VECTOR,
#[doc = " The time-filtered and stabilized position of the palm."]
#[doc = ""]
#[doc = " Smoothing and stabilization is performed in order to make"]
#[doc = " this value more suitable for interaction with 2D content. The stabilized"]
#[doc = " position lags behind the palm position by a variable amount, depending"]
#[doc = " primarily on the speed of movement."]
#[doc = " @since 3.0.0"]
pub stabilized_position: LEAP_VECTOR,
#[doc = " The rate of change of the palm position in millimeters per second."]
#[doc = " @since 3.0.0"]
pub velocity: LEAP_VECTOR,
#[doc = " The normal vector to the palm. If your hand is flat, this vector will"]
#[doc = " point downward, or \"out\" of the front surface of your palm."]
#[doc = " @since 3.0.0"]
pub normal: LEAP_VECTOR,
#[doc = " The estimated width of the palm when the hand is in a flat position."]
#[doc = " @since 3.0.0"]
pub width: f32,
#[doc = " The unit direction vector pointing from the palm position toward the fingers."]
#[doc = " @since 3.0.0"]
pub direction: LEAP_VECTOR,
#[doc = " The quaternion representing the palm's orientation"]
#[doc = " corresponding to the basis {normal x direction, -normal, -direction}"]
#[doc = " @since 3.1.3"]
pub orientation: LEAP_QUATERNION,
}
#[test]
fn bindgen_test_layout__LEAP_PALM() {
assert_eq!(
::std::mem::size_of::<_LEAP_PALM>(),
80usize,
concat!("Size of: ", stringify!(_LEAP_PALM))
);
assert_eq!(
::std::mem::align_of::<_LEAP_PALM>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_PALM))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).position as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(position)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).stabilized_position as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(stabilized_position)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).velocity as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(velocity)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).normal as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(normal)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).width as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).direction as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_PALM>())).orientation as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_PALM),
"::",
stringify!(orientation)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Properties associated with the palm of the hand."]
#[doc = " The Palm is a member of the LEAP_HAND struct."]
#[doc = " @since 3.0.0"]
pub type LEAP_PALM = _LEAP_PALM;
#[doc = " A left hand. @since 3.0.0"]
pub const _eLeapHandType_eLeapHandType_Left: _eLeapHandType = 0;
#[doc = " A right hand. @since 3.0.0"]
pub const _eLeapHandType_eLeapHandType_Right: _eLeapHandType = 1;
#[doc = " \\ingroup Enum"]
#[doc = " The Hand chirality types."]
#[doc = " Used in the LEAP_HAND struct."]
#[doc = " @since 3.0.0"]
pub type _eLeapHandType = i32;
#[doc = " \\ingroup Enum"]
#[doc = " The Hand chirality types."]
#[doc = " Used in the LEAP_HAND struct."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapHandType as eLeapHandType;
#[doc = " \\ingroup Structs"]
#[doc = " Describes a tracked hand. @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_HAND {
#[doc = " A unique ID for a hand tracked across frames."]
#[doc = " If tracking of a physical hand is lost, a new ID is assigned when"]
#[doc = " tracking is reacquired."]
#[doc = " @since 3.0.0"]
pub id: u32,
#[doc = " Reserved for future use. @since 3.0.0"]
pub flags: u32,
#[doc = " Identifies the chirality of this hand. @since 3.0.0"]
pub type_: eLeapHandType,
#[doc = " How confident we are with a given hand pose. Not currently used (always 1.0)."]
#[doc = " @since 3.0.0"]
pub confidence: f32,
#[doc = " The total amount of time this hand has been tracked, in microseconds."]
#[doc = " @since 3.0.0"]
pub visible_time: u64,
#[doc = " The distance between index finger and thumb. @since 3.0.0"]
pub pinch_distance: f32,
#[doc = " The average angle of fingers to palm. @since 3.0.0"]
pub grab_angle: f32,
#[doc = " The normalized estimate of the pinch pose."]
#[doc = " Zero is not pinching; one is fully pinched."]
#[doc = " @since 3.0.0"]
pub pinch_strength: f32,
#[doc = " The normalized estimate of the grab hand pose."]
#[doc = " Zero is not grabbing; one is fully grabbing."]
#[doc = " @since 3.0.0"]
pub grab_strength: f32,
#[doc = " Additional information associated with the palm. @since 3.0.0"]
pub palm: LEAP_PALM,
pub __bindgen_anon_1: _LEAP_HAND__bindgen_ty_1,
#[doc = " The arm to which this hand is attached."]
#[doc = " An arm consists of a single LEAP_BONE struct."]
#[doc = " @since 3.0.0"]
pub arm: LEAP_BONE,
}
#[doc = " The fingers of this hand. @since 3.0.0"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union _LEAP_HAND__bindgen_ty_1 {
pub __bindgen_anon_1: _LEAP_HAND__bindgen_ty_1__bindgen_ty_1,
#[doc = " The fingers of the hand as an array. @since 3.0.0"]
pub digits: [LEAP_DIGIT; 5usize],
_bindgen_union_align: [u8; 920usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _LEAP_HAND__bindgen_ty_1__bindgen_ty_1 {
#[doc = " The thumb. @since 3.0.0"]
pub thumb: LEAP_DIGIT,
#[doc = " The index finger. @since 3.0.0"]
pub index: LEAP_DIGIT,
#[doc = " The middle finger. @since 3.0.0"]
pub middle: LEAP_DIGIT,
#[doc = " The ring finger. @since 3.0.0"]
pub ring: LEAP_DIGIT,
#[doc = " The pinky finger. @since 3.0.0"]
pub pinky: LEAP_DIGIT,
}
#[test]
fn bindgen_test_layout__LEAP_HAND__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>(),
920usize,
concat!(
"Size of: ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>())).thumb as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(thumb)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>())).index as *const _
as usize
},
184usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(index)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>())).middle as *const _
as usize
},
368usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(middle)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>())).ring as *const _
as usize
},
552usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ring)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>())).pinky as *const _
as usize
},
736usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(pinky)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_HAND__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_HAND__bindgen_ty_1>(),
920usize,
concat!("Size of: ", stringify!(_LEAP_HAND__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<_LEAP_HAND__bindgen_ty_1>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_HAND__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND__bindgen_ty_1>())).digits as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND__bindgen_ty_1),
"::",
stringify!(digits)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_HAND() {
assert_eq!(
::std::mem::size_of::<_LEAP_HAND>(),
1084usize,
concat!("Size of: ", stringify!(_LEAP_HAND))
);
assert_eq!(
::std::mem::align_of::<_LEAP_HAND>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_HAND))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).flags as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).confidence as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(confidence)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).visible_time as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(visible_time)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).pinch_distance as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(pinch_distance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).grab_angle as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(grab_angle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).pinch_strength as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(pinch_strength)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).grab_strength as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(grab_strength)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).palm as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(palm)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HAND>())).arm as *const _ as usize },
1040usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HAND),
"::",
stringify!(arm)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Describes a tracked hand. @since 3.0.0"]
pub type LEAP_HAND = _LEAP_HAND;
#[doc = " \\ingroup Structs"]
#[doc = " A snapshot, or frame of data, containing the tracking data for a single moment in time."]
#[doc = " The LEAP_FRAME struct is the container for all the tracking data."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_TRACKING_EVENT {
#[doc = " A universal frame identification header. @since 3.0.0"]
pub info: LEAP_FRAME_HEADER,
#[doc = " An identifier for this tracking frame. This identifier is meant to be monotonically"]
#[doc = " increasing, but values may be skipped if the client application does not poll for messages"]
#[doc = " fast enough. This number also generally increases at the same rate as info.frame_id, but"]
#[doc = " if the server cannot process every image received from the device cameras, the info.frame_id"]
#[doc = " identifier may increase faster."]
#[doc = " @since 3.0.0"]
pub tracking_frame_id: i64,
#[doc = " The number of hands tracked in this frame, i.e. the number of elements in"]
#[doc = " the pHands array."]
#[doc = " @since 3.0.0"]
pub nHands: u32,
#[doc = " A pointer to the array of hands tracked in this frame."]
#[doc = " @since 3.0.0"]
pub pHands: *mut LEAP_HAND,
#[doc = " Current tracking frame rate in hertz."]
#[doc = ""]
#[doc = " This frame rate is distinct from the image frame rate, which is the rate that images are"]
#[doc = " being read from the device. Depending on host CPU limitations, the tracking frame rate"]
#[doc = " may be substantially less than the device frame rate."]
#[doc = ""]
#[doc = " This number is generally equal to or less than the device frame rate, but there is one"]
#[doc = " case where this number may be _higher_ than the device frame rate: When the device rate"]
#[doc = " drops. In this case, the device frame rate will fall sooner than the tracking frame rate."]
#[doc = ""]
#[doc = " This number is equal to zero if there are not enough frames to estimate frame rate."]
#[doc = ""]
#[doc = " This number cannot be negative."]
#[doc = " @since 3.0.0"]
pub framerate: f32,
}
#[test]
fn bindgen_test_layout__LEAP_TRACKING_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_TRACKING_EVENT>(),
48usize,
concat!("Size of: ", stringify!(_LEAP_TRACKING_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_TRACKING_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_TRACKING_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TRACKING_EVENT>())).info as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TRACKING_EVENT),
"::",
stringify!(info)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_TRACKING_EVENT>())).tracking_frame_id as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TRACKING_EVENT),
"::",
stringify!(tracking_frame_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TRACKING_EVENT>())).nHands as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TRACKING_EVENT),
"::",
stringify!(nHands)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TRACKING_EVENT>())).pHands as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TRACKING_EVENT),
"::",
stringify!(pHands)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TRACKING_EVENT>())).framerate as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TRACKING_EVENT),
"::",
stringify!(framerate)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A snapshot, or frame of data, containing the tracking data for a single moment in time."]
#[doc = " The LEAP_FRAME struct is the container for all the tracking data."]
#[doc = " @since 3.0.0"]
pub type LEAP_TRACKING_EVENT = _LEAP_TRACKING_EVENT;
#[doc = " The message severity is not known or was not specified. @since 3.0.0"]
pub const _eLeapLogSeverity_eLeapLogSeverity_Unknown: _eLeapLogSeverity = 0;
#[doc = " A message about a fault that could render the software or device non-functional. @since 3.0.0"]
pub const _eLeapLogSeverity_eLeapLogSeverity_Critical: _eLeapLogSeverity = 1;
#[doc = " A message warning about a condition that could degrade device capabilities. @since 3.0.0"]
pub const _eLeapLogSeverity_eLeapLogSeverity_Warning: _eLeapLogSeverity = 2;
#[doc = " A system status message. @since 3.0.0"]
pub const _eLeapLogSeverity_eLeapLogSeverity_Information: _eLeapLogSeverity = 3;
#[doc = " \\ingroup Enum"]
#[doc = " System message severity types. @since 3.0.0"]
pub type _eLeapLogSeverity = i32;
#[doc = " \\ingroup Enum"]
#[doc = " System message severity types. @since 3.0.0"]
pub use self::_eLeapLogSeverity as eLeapLogSeverity;
#[doc = " \\ingroup Structs"]
#[doc = " A system log message. @since 3.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_LOG_EVENT {
#[doc = " The type of message. @since 4.0.0"]
pub severity: eLeapLogSeverity,
#[doc = " The timestamp of the message in microseconds."]
#[doc = " Compare with the current values of LeapGetNow() and the system clock to"]
#[doc = " calculate the absolute time of the message."]
#[doc = " @since 4.0.0"]
pub timestamp: i64,
#[doc = " A pointer to a null-terminated string containing the current log message."]
#[doc = " @since 4.0.0"]
pub message: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout__LEAP_LOG_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_LOG_EVENT>(),
20usize,
concat!("Size of: ", stringify!(_LEAP_LOG_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_LOG_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_LOG_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_LOG_EVENT>())).severity as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_LOG_EVENT),
"::",
stringify!(severity)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_LOG_EVENT>())).timestamp as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_LOG_EVENT),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_LOG_EVENT>())).message as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_LOG_EVENT),
"::",
stringify!(message)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A system log message. @since 3.0.0"]
pub type LEAP_LOG_EVENT = _LEAP_LOG_EVENT;
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_LOG_EVENTS {
#[doc = " The number of log events being pointed to by the events field."]
#[doc = " @since 4.0.0"]
pub nEvents: u32,
#[doc = " An array of ``nEvent`` LEAP_LOG_EVENT structures."]
#[doc = " @since 4.0.0"]
pub events: *mut LEAP_LOG_EVENT,
}
#[test]
fn bindgen_test_layout__LEAP_LOG_EVENTS() {
assert_eq!(
::std::mem::size_of::<_LEAP_LOG_EVENTS>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_LOG_EVENTS))
);
assert_eq!(
::std::mem::align_of::<_LEAP_LOG_EVENTS>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_LOG_EVENTS))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_LOG_EVENTS>())).nEvents as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_LOG_EVENTS),
"::",
stringify!(nEvents)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_LOG_EVENTS>())).events as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_LOG_EVENTS),
"::",
stringify!(events)
)
);
}
pub type LEAP_LOG_EVENTS = _LEAP_LOG_EVENTS;
#[doc = " \\ingroup Structs"]
#[doc = " A notification that a device's status has changed. One of these messages is received by the client"]
#[doc = " as soon as the service is connected, or when a new device is attached."]
#[doc = " @since 3.1.3"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DEVICE_STATUS_CHANGE_EVENT {
#[doc = " A reference to the device whose status has changed"]
pub device: LEAP_DEVICE_REF,
#[doc = " The last known status of the device. This is a combination of eLeapDeviceStatus flags. @since 3.1.3"]
pub last_status: u32,
#[doc = " The current status of the device. This is a combination of eLeapDeviceStatus flags. @since 3.1.3"]
pub status: u32,
}
#[test]
fn bindgen_test_layout__LEAP_DEVICE_STATUS_CHANGE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>(),
20usize,
concat!("Size of: ", stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>())).device as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT),
"::",
stringify!(device)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>())).last_status as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT),
"::",
stringify!(last_status)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>())).status as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT),
"::",
stringify!(status)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A notification that a device's status has changed. One of these messages is received by the client"]
#[doc = " as soon as the service is connected, or when a new device is attached."]
#[doc = " @since 3.1.3"]
pub type LEAP_DEVICE_STATUS_CHANGE_EVENT = _LEAP_DEVICE_STATUS_CHANGE_EVENT;
pub const _eLeapDroppedFrameType_eLeapDroppedFrameType_PreprocessingQueue: _eLeapDroppedFrameType =
0;
pub const _eLeapDroppedFrameType_eLeapDroppedFrameType_TrackingQueue: _eLeapDroppedFrameType = 1;
pub const _eLeapDroppedFrameType_eLeapDroppedFrameType_Other: _eLeapDroppedFrameType = 2;
pub type _eLeapDroppedFrameType = i32;
pub use self::_eLeapDroppedFrameType as eLeapDroppedFrameType;
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_DROPPED_FRAME_EVENT {
pub frame_id: i64,
pub type_: eLeapDroppedFrameType,
}
#[test]
fn bindgen_test_layout__LEAP_DROPPED_FRAME_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_DROPPED_FRAME_EVENT>(),
12usize,
concat!("Size of: ", stringify!(_LEAP_DROPPED_FRAME_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_DROPPED_FRAME_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_DROPPED_FRAME_EVENT))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_DROPPED_FRAME_EVENT>())).frame_id as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DROPPED_FRAME_EVENT),
"::",
stringify!(frame_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_DROPPED_FRAME_EVENT>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_DROPPED_FRAME_EVENT),
"::",
stringify!(type_)
)
);
}
pub type LEAP_DROPPED_FRAME_EVENT = _LEAP_DROPPED_FRAME_EVENT;
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_IMAGE {
#[doc = " The properties of the received image."]
pub properties: LEAP_IMAGE_PROPERTIES,
#[doc = " A version number for the distortion matrix. When the distortion matrix"]
#[doc = " changes, this number is updated. This number is guaranteed not to repeat"]
#[doc = " for the lifetime of the connection. This version number is also guaranteed"]
#[doc = " to be distinct for each perspective of an image."]
#[doc = ""]
#[doc = " This value is guaranteed to be nonzero if it is valid."]
#[doc = ""]
#[doc = " The distortion matrix only changes when the streaming device changes or when the"]
#[doc = " device orientation flips -- inverting the image and the distortion grid."]
#[doc = " Since building a matrix to undistort an image can be a time-consuming task,"]
#[doc = " you can optimize the process by only rebuilding this matrix (or whatever"]
#[doc = " data type you use to correct image distortion) when the grid actually changes."]
pub matrix_version: u64,
#[doc = " Pointers to the camera's distortion matrix."]
pub distortion_matrix: *mut LEAP_DISTORTION_MATRIX,
#[doc = " A pointer to the image data."]
pub data: *mut ::std::os::raw::c_void,
#[doc = " Offset, in bytes, from the beginning of the data ptr to the actual beginning of the image data"]
pub offset: u32,
}
#[test]
fn bindgen_test_layout__LEAP_IMAGE() {
assert_eq!(
::std::mem::size_of::<_LEAP_IMAGE>(),
64usize,
concat!("Size of: ", stringify!(_LEAP_IMAGE))
);
assert_eq!(
::std::mem::align_of::<_LEAP_IMAGE>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_IMAGE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE>())).properties as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE),
"::",
stringify!(properties)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE>())).matrix_version as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE),
"::",
stringify!(matrix_version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE>())).distortion_matrix as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE),
"::",
stringify!(distortion_matrix)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE>())).data as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE>())).offset as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE),
"::",
stringify!(offset)
)
);
}
pub type LEAP_IMAGE = _LEAP_IMAGE;
#[doc = " \\ingroup Structs"]
#[doc = " A notification that a device's point mapping has changed."]
#[doc = " @since 4.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_POINT_MAPPING_CHANGE_EVENT {
#[doc = " The ID of the frame corresponding to the source of the currently tracked points. @since 4.0.0"]
pub frame_id: i64,
#[doc = " The timestamp of the frame, in microseconds, referenced against LeapGetNow(). @since 4.0.0"]
pub timestamp: i64,
#[doc = " The number of points being tracked. @since 4.0.0"]
pub nPoints: u32,
}
#[test]
fn bindgen_test_layout__LEAP_POINT_MAPPING_CHANGE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_POINT_MAPPING_CHANGE_EVENT>(),
20usize,
concat!("Size of: ", stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_POINT_MAPPING_CHANGE_EVENT>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_POINT_MAPPING_CHANGE_EVENT>())).frame_id as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT),
"::",
stringify!(frame_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_POINT_MAPPING_CHANGE_EVENT>())).timestamp as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_POINT_MAPPING_CHANGE_EVENT>())).nPoints as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT),
"::",
stringify!(nPoints)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A notification that a device's point mapping has changed."]
#[doc = " @since 4.0.0"]
pub type LEAP_POINT_MAPPING_CHANGE_EVENT = _LEAP_POINT_MAPPING_CHANGE_EVENT;
#[doc = " \\ingroup Structs"]
#[doc = " A notification that a device's point mapping has changed. It contains"]
#[doc = " the entire set of points being mapped."]
#[doc = " @since 4.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_POINT_MAPPING {
#[doc = " The ID of the frame corresponding to the source of the currently tracked points. @since 4.0.0"]
pub frame_id: i64,
#[doc = " The timestamp of the frame, in microseconds, referenced against LeapGetNow(). @since 4.0.0"]
pub timestamp: i64,
#[doc = " The number of points being tracked. @since 4.0.0"]
pub nPoints: u32,
#[doc = " The 3D points being mapped. @since 4.0.0"]
pub pPoints: *mut LEAP_VECTOR,
#[doc = " The IDs of the 3D points being mapped. @since 4.0.0"]
pub pIDs: *mut u32,
}
#[test]
fn bindgen_test_layout__LEAP_POINT_MAPPING() {
assert_eq!(
::std::mem::size_of::<_LEAP_POINT_MAPPING>(),
36usize,
concat!("Size of: ", stringify!(_LEAP_POINT_MAPPING))
);
assert_eq!(
::std::mem::align_of::<_LEAP_POINT_MAPPING>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_POINT_MAPPING))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_POINT_MAPPING>())).frame_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING),
"::",
stringify!(frame_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_POINT_MAPPING>())).timestamp as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_POINT_MAPPING>())).nPoints as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING),
"::",
stringify!(nPoints)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_POINT_MAPPING>())).pPoints as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING),
"::",
stringify!(pPoints)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_POINT_MAPPING>())).pIDs as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_POINT_MAPPING),
"::",
stringify!(pIDs)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " A notification that a device's point mapping has changed. It contains"]
#[doc = " the entire set of points being mapped."]
#[doc = " @since 4.0.0"]
pub type LEAP_POINT_MAPPING = _LEAP_POINT_MAPPING;
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_HEAD_POSE_EVENT {
#[doc = " The timestamp for this image, in microseconds, referenced against LeapGetNow()."]
#[doc = " @since 3.2.1"]
pub timestamp: i64,
#[doc = " The position and orientation of the user's head. Positional tracking must be enabled."]
#[doc = " @since 3.2.1"]
pub head_position: LEAP_VECTOR,
pub head_orientation: LEAP_QUATERNION,
}
#[test]
fn bindgen_test_layout__LEAP_HEAD_POSE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_HEAD_POSE_EVENT>(),
36usize,
concat!("Size of: ", stringify!(_LEAP_HEAD_POSE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_HEAD_POSE_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_HEAD_POSE_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_HEAD_POSE_EVENT>())).timestamp as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HEAD_POSE_EVENT),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HEAD_POSE_EVENT>())).head_position as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HEAD_POSE_EVENT),
"::",
stringify!(head_position)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_HEAD_POSE_EVENT>())).head_orientation as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_HEAD_POSE_EVENT),
"::",
stringify!(head_orientation)
)
);
}
pub type LEAP_HEAD_POSE_EVENT = _LEAP_HEAD_POSE_EVENT;
#[doc = " \\ingroup Structs"]
#[doc = " Streaming stereo image pairs from the device."]
#[doc = ""]
#[doc = " LeapPollConnection() produces this message when an image is available."]
#[doc = " The struct contains image properties, the distortion grid, and a pointer to"]
#[doc = " the buffer containing the image data -- which was allocated using the allocator"]
#[doc = " function passed to LeapC using the LeapSetAllocator."]
#[doc = " @since 4.0.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_IMAGE_EVENT {
#[doc = " The information header identifying the images tracking frame."]
pub info: LEAP_FRAME_HEADER,
#[doc = " The left and right images."]
pub image: [LEAP_IMAGE; 2usize],
#[doc = " For internal use only."]
pub calib: LEAP_CALIBRATION,
}
#[test]
fn bindgen_test_layout__LEAP_IMAGE_EVENT() {
assert_eq!(
::std::mem::size_of::<_LEAP_IMAGE_EVENT>(),
160usize,
concat!("Size of: ", stringify!(_LEAP_IMAGE_EVENT))
);
assert_eq!(
::std::mem::align_of::<_LEAP_IMAGE_EVENT>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_IMAGE_EVENT))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_EVENT>())).info as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_EVENT),
"::",
stringify!(info)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_EVENT>())).image as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_EVENT),
"::",
stringify!(image)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_IMAGE_EVENT>())).calib as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_IMAGE_EVENT),
"::",
stringify!(calib)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Streaming stereo image pairs from the device."]
#[doc = ""]
#[doc = " LeapPollConnection() produces this message when an image is available."]
#[doc = " The struct contains image properties, the distortion grid, and a pointer to"]
#[doc = " the buffer containing the image data -- which was allocated using the allocator"]
#[doc = " function passed to LeapC using the LeapSetAllocator."]
#[doc = " @since 4.0.0"]
pub type LEAP_IMAGE_EVENT = _LEAP_IMAGE_EVENT;
#[doc = " No event has occurred within the timeout period specified when calling LeapPollConnection()."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_None: _eLeapEventType = 0;
#[doc = " A connection to the Leap Motion service has been established."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_Connection: _eLeapEventType = 1;
#[doc = " The connection to the Leap Motion service has been lost."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_ConnectionLost: _eLeapEventType = 2;
#[doc = " A device has been detected or plugged-in."]
#[doc = " A device event is dispatched after a connection is established for any"]
#[doc = " devices already plugged in. (The system currently only supports one"]
#[doc = " streaming device at a time.)"]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_Device: _eLeapEventType = 3;
#[doc = " A device has failed."]
#[doc = " Device failure could be caused by hardware failure, USB controller issues, or"]
#[doc = " other system instability. Note that unplugging a device generates an"]
#[doc = " eLeapEventType_DeviceLost event message, not a failure message."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_DeviceFailure: _eLeapEventType = 4;
#[doc = " A policy change has occurred."]
#[doc = " This can be due to setting a policy with LeapSetPolicyFlags() or due to changing"]
#[doc = " or policy-related config settings, including images_mode."]
#[doc = " (A user can also change these policies using the Leap Motion Control Panel.)"]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_Policy: _eLeapEventType = 5;
#[doc = " A tracking frame. The message contains the tracking data for the frame."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_Tracking: _eLeapEventType = 256;
#[doc = " The request for an image has failed."]
#[doc = " The message contains information about the failure. The client application"]
#[doc = " will not receive the requested image set."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_ImageRequestError: _eLeapEventType = 257;
#[doc = " The request for an image is complete."]
#[doc = " The image data has been completely written to the application-provided"]
#[doc = " buffer."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_ImageComplete: _eLeapEventType = 258;
#[doc = " A system message. @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_LogEvent: _eLeapEventType = 259;
#[doc = " The device connection has been lost."]
#[doc = ""]
#[doc = " This event is generally asserted when the device has been detached from the system, when the"]
#[doc = " connection to the service has been lost, or if the device is closed while streaming. Generally,"]
#[doc = " any event where the system can conclude no further frames will be received will result in this"]
#[doc = " message. The DeviceEvent field will be filled with the id of the formerly attached device."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_DeviceLost: _eLeapEventType = 260;
#[doc = " The asynchronous response to a call to LeapRequestConfigValue()."]
#[doc = " Contains the value of requested configuration item."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_ConfigResponse: _eLeapEventType = 261;
#[doc = " The asynchronous response to a call to LeapSaveConfigValue()."]
#[doc = " Reports whether the change succeeded or failed."]
#[doc = " @since 3.0.0"]
pub const _eLeapEventType_eLeapEventType_ConfigChange: _eLeapEventType = 262;
#[doc = " Notification that a status change has been detected on an attached device"]
#[doc = ""]
#[doc = " @since 3.1.3"]
pub const _eLeapEventType_eLeapEventType_DeviceStatusChange: _eLeapEventType = 263;
#[doc = " Notification that a status change has been detected on an attached device"]
#[doc = ""]
#[doc = " @since 3.1.3"]
pub const _eLeapEventType_eLeapEventType_DroppedFrame: _eLeapEventType = 264;
#[doc = " Notification that an unrequested stereo image pair is available"]
#[doc = ""]
#[doc = " @since 4.0.0"]
pub const _eLeapEventType_eLeapEventType_Image: _eLeapEventType = 265;
#[doc = " Notification that point mapping has changed"]
#[doc = ""]
#[doc = " @since 4.0.0"]
pub const _eLeapEventType_eLeapEventType_PointMappingChange: _eLeapEventType = 266;
#[doc = " An array of system messages. @since 4.0.0"]
pub const _eLeapEventType_eLeapEventType_LogEvents: _eLeapEventType = 267;
#[doc = " An array of system messages. @since 4.0.0"]
pub const _eLeapEventType_eLeapEventType_HeadPose: _eLeapEventType = 268;
#[doc = " \\ingroup Enum"]
#[doc = " The types of event messages resulting from calling LeapPollConnection()."]
#[doc = " @since 3.0.0"]
pub type _eLeapEventType = i32;
#[doc = " \\ingroup Enum"]
#[doc = " The types of event messages resulting from calling LeapPollConnection()."]
#[doc = " @since 3.0.0"]
pub use self::_eLeapEventType as eLeapEventType;
#[doc = " \\ingroup Structs"]
#[doc = " Defines a basic message from the LeapC message queue."]
#[doc = " Set by calling LeapPollConnection()."]
#[doc = " @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct _LEAP_CONNECTION_MESSAGE {
#[doc = " The size of this message struct. @since 3.0.0"]
pub size: u32,
#[doc = " The message type. @since 3.0.0"]
pub type_: eLeapEventType,
pub __bindgen_anon_1: _LEAP_CONNECTION_MESSAGE__bindgen_ty_1,
}
#[doc = " A pointer to the event data for the current type of message. @since 3.0.0"]
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union _LEAP_CONNECTION_MESSAGE__bindgen_ty_1 {
#[doc = " An untyped pointer. @since 3.0.0"]
pub pointer: *const ::std::os::raw::c_void,
#[doc = " A connection message. @since 3.0.0"]
pub connection_event: *const LEAP_CONNECTION_EVENT,
#[doc = " A connection lost. @since 3.0.0"]
pub connection_lost_event: *const LEAP_CONNECTION_LOST_EVENT,
#[doc = " A device detected message. @since 3.0.0"]
pub device_event: *const LEAP_DEVICE_EVENT,
#[doc = " A device's status has changed. @since 3.1.3"]
pub device_status_change_event: *const LEAP_DEVICE_STATUS_CHANGE_EVENT,
#[doc = " A policy message. @since 3.0.0"]
pub policy_event: *const LEAP_POLICY_EVENT,
#[doc = " A device failure message. @since 3.0.0"]
pub device_failure_event: *const LEAP_DEVICE_FAILURE_EVENT,
#[doc = " A tracking message. @since 3.0.0"]
pub tracking_event: *const LEAP_TRACKING_EVENT,
#[doc = " A log message. @since 3.0.0"]
pub log_event: *const LEAP_LOG_EVENT,
#[doc = " A log messages. @since 4.0.0"]
pub log_events: *const LEAP_LOG_EVENTS,
#[doc = " A get config value message. @since 3.0.0"]
pub config_response_event: *const LEAP_CONFIG_RESPONSE_EVENT,
#[doc = " A set config value message. @since 3.0.0"]
pub config_change_event: *const LEAP_CONFIG_CHANGE_EVENT,
pub dropped_frame_event: *const LEAP_DROPPED_FRAME_EVENT,
#[doc = " A streaming image message. @since 4.0.0"]
pub image_event: *const LEAP_IMAGE_EVENT,
#[doc = " A point mapping message. @since 4.0.0"]
pub point_mapping_change_event: *const LEAP_POINT_MAPPING_CHANGE_EVENT,
pub head_pose_event: *const LEAP_HEAD_POSE_EVENT,
_bindgen_union_align: [u8; 8usize],
}
#[test]
fn bindgen_test_layout__LEAP_CONNECTION_MESSAGE__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).pointer as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(pointer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).connection_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(connection_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).connection_lost_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(connection_lost_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).device_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(device_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>()))
.device_status_change_event as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(device_status_change_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).policy_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(policy_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).device_failure_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(device_failure_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).tracking_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(tracking_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).log_event as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(log_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).log_events
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(log_events)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).config_response_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(config_response_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).config_change_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(config_change_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).dropped_frame_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(dropped_frame_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).image_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(image_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>()))
.point_mapping_change_event as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(point_mapping_change_event)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>())).head_pose_event
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
"::",
stringify!(head_pose_event)
)
);
}
#[test]
fn bindgen_test_layout__LEAP_CONNECTION_MESSAGE() {
assert_eq!(
::std::mem::size_of::<_LEAP_CONNECTION_MESSAGE>(),
16usize,
concat!("Size of: ", stringify!(_LEAP_CONNECTION_MESSAGE))
);
assert_eq!(
::std::mem::align_of::<_LEAP_CONNECTION_MESSAGE>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_CONNECTION_MESSAGE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_CONNECTION_MESSAGE>())).type_ as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_CONNECTION_MESSAGE),
"::",
stringify!(type_)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Defines a basic message from the LeapC message queue."]
#[doc = " Set by calling LeapPollConnection()."]
#[doc = " @since 3.0.0"]
pub type LEAP_CONNECTION_MESSAGE = _LEAP_CONNECTION_MESSAGE;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Polls the connection for a new event."]
#[doc = ""]
#[doc = " The specific types of events that may be received are not configurable in this entrypoint. Configure"]
#[doc = " the device or connection object directly to change what events will be received."]
#[doc = ""]
#[doc = " Pointers in the retrieved event message structure will be valid until the associated connection or device is"]
#[doc = " closed, or the next call to LeapPollConnection()."]
#[doc = ""]
#[doc = " Calling this method concurrently will return eLeapRS_ConcurrentCall."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param timeout The maximum amount of time to wait, in milliseconds. If this value is zero,"]
#[doc = " the evt pointer references the next queued message, if there is one, and returns immediately."]
#[doc = " @param[out] evt A pointer to a structure that is filled with event information. This structure will be valid"]
#[doc = " as long as the LEAP_CONNECTION object is valid."]
#[doc = ""]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration. If the operation"]
#[doc = " times out, this method will return eLeapRS_Timeout. The evt pointer will reference a"]
#[doc = " message of type eLeapEventType_None."]
#[doc = " @since 3.0.0"]
pub fn LeapPollConnection(
hConnection: LEAP_CONNECTION,
timeout: u32,
evt: *mut LEAP_CONNECTION_MESSAGE,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Retrieves the number of bytes required to allocate an interpolated frame at the specified time."]
#[doc = ""]
#[doc = " Use this function to determine the size of the buffer to allocate when calling"]
#[doc = " LeapInterpolateFrame()."]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param timestamp The timestamp of the frame whose size is to be queried."]
#[doc = " @param[out] pncbEvent A pointer that receives the number of bytes required to store the specified frame."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.1"]
pub fn LeapGetFrameSize(
hConnection: LEAP_CONNECTION,
timestamp: i64,
pncbEvent: *mut u64,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Constructs a frame at the specified timestamp by interpolating between measured"]
#[doc = " frames."]
#[doc = ""]
#[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
#[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
#[doc = ""]
#[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
#[doc = " synchronize time measurements in the application with time measurements in"]
#[doc = " the Leap Motion service. This process is required to achieve accurate, smooth"]
#[doc = " interpolation."]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param timestamp The timestamp at which to interpolate the frame data."]
#[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
#[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.1"]
pub fn LeapInterpolateFrame(
hConnection: LEAP_CONNECTION,
timestamp: i64,
pEvent: *mut LEAP_TRACKING_EVENT,
ncbEvent: u64,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Constructs a frame at the specified timestamp by interpolating between a frame near the timestamp"]
#[doc = " and a frame near the sourceTimestamp."]
#[doc = ""]
#[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
#[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
#[doc = ""]
#[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
#[doc = " synchronize time measurements in the application with time measurements in"]
#[doc = " the Leap Motion service. This process is required to achieve accurate, smooth"]
#[doc = " interpolation."]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param timestamp The timestamp to which to interpolate the frame data."]
#[doc = " @param sourceTimestamp The timestamp of the beginning frame from which to interpolate the frame data."]
#[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
#[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.1"]
pub fn LeapInterpolateFrameFromTime(
hConnection: LEAP_CONNECTION,
timestamp: i64,
sourceTimestamp: i64,
pEvent: *mut LEAP_TRACKING_EVENT,
ncbEvent: u64,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Gets the head tracking pose at the specified timestamp by interpolating between measured"]
#[doc = " frames."]
#[doc = ""]
#[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
#[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
#[doc = ""]
#[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
#[doc = " synchronize time measurements in the application with time measurements in"]
#[doc = " the Leap Motion service. This process is required to achieve accurate, smooth"]
#[doc = " interpolation."]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param timestamp The timestamp at which to interpolate the frame data."]
#[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.1"]
pub fn LeapInterpolateHeadPose(
hConnection: LEAP_CONNECTION,
timestamp: i64,
pEvent: *mut LEAP_HEAD_POSE_EVENT,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Closes a device handle previously opened with LeapOpenDevice."]
#[doc = ""]
#[doc = " @param hDevice The device handle to close."]
#[doc = " @since 3.0.0"]
pub fn LeapCloseDevice(hDevice: LEAP_DEVICE);
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Closes a previously opened connection."]
#[doc = ""]
#[doc = " This method closes the specified connection object if it is opened"]
#[doc = ""]
#[doc = " This method never fails."]
#[doc = ""]
#[doc = " @param hConnection A handle to the connection object to be closed."]
#[doc = " @since 4.0.0"]
pub fn LeapCloseConnection(hConnection: LEAP_CONNECTION);
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Destroys a previously opened connection."]
#[doc = ""]
#[doc = " This method closes the specified connection object if it is opened, destroys the underlying"]
#[doc = " object, and releases all resources associated with it."]
#[doc = ""]
#[doc = " This method never fails."]
#[doc = ""]
#[doc = " Be sure that no other functions are accessing the connection when this function is called."]
#[doc = ""]
#[doc = " @param hConnection A handle to the connection object to be destroyed."]
#[doc = " @since 3.0.0"]
pub fn LeapDestroyConnection(hConnection: LEAP_CONNECTION);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_CLOCK_REBASER {
_unused: [u8; 0],
}
#[doc = " \\ingroup Structs"]
#[doc = " \\struct LEAP_CLOCK_REBASER"]
#[doc = " An opaque clock rebase state structure. @since 3.1.2"]
pub type LEAP_CLOCK_REBASER = *mut _LEAP_CLOCK_REBASER;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Initializes a new Leap clock-rebaser handle object."]
#[doc = ""]
#[doc = " Pass the filled-in LEAP_CLOCK_REBASER object to calls to LeapUpdateRebase(),"]
#[doc = " LeapRebaseClock(), and LeapDestroyClockRebaser()."]
#[doc = ""]
#[doc = " @param[out] phClockRebaser The pointer to the clock-rebaser object to be initialized."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.2"]
pub fn LeapCreateClockRebaser(phClockRebaser: *mut LEAP_CLOCK_REBASER) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Updates the relationship between the Leap Motion clock and the user clock."]
#[doc = ""]
#[doc = " When using LeapInterpolateFrame(), call this function for every graphics frame"]
#[doc = " rendered by your application. The function should be called as close to the"]
#[doc = " actual point of rendering as possible."]
#[doc = ""]
#[doc = " The relationship between the application clock and the Leap Motion clock is"]
#[doc = " neither fixed nor stable. Simulation restarts can cause user clock values to change"]
#[doc = " instantaneously. Certain systems simulate slow motion, or respond to heavy load, by reducing the tick rate"]
#[doc = " of the user clock. As a result, the LeapUpdateRebase() function must be called for every rendered frame."]
#[doc = ""]
#[doc = " @param hClockRebaser The handle to a rebaser object created by LeapCreateClockRebaser()."]
#[doc = " @param userClock A clock value supplied by the application, sampled at about the same time as LeapGetNow() was sampled."]
#[doc = " @param leapClock The Leap Motion clock value sampled by a call to LeapGetNow()."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.2"]
pub fn LeapUpdateRebase(
hClockRebaser: LEAP_CLOCK_REBASER,
userClock: i64,
leapClock: i64,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Computes the Leap Motion clock corresponding to a specified application clock value."]
#[doc = ""]
#[doc = " Use this function to translate your application clock to the Leap Motion clock"]
#[doc = " when interpolating frames. LeapUpdateRebase() must be called for every rendered"]
#[doc = " frame for the relationship between the two clocks to remain synchronized."]
#[doc = ""]
#[doc = " @param hClockRebaser The handle to a rebaser object created by LeapCreateClockRebaser()."]
#[doc = " @param userClock The clock in microseconds referenced to the application clock."]
#[doc = " @param[out] pLeapClock The corresponding Leap Motion clock value."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.1.2"]
pub fn LeapRebaseClock(
hClockRebaser: LEAP_CLOCK_REBASER,
userClock: i64,
pLeapClock: *mut i64,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Destroys a previously created clock-rebaser object."]
#[doc = ""]
#[doc = " This method destroys the specified clock-rebaser object, and releases all resources associated with it."]
#[doc = ""]
#[doc = " @param hClockRebaser A handle to the clock-rebaser object to be destroyed."]
#[doc = " @since 3.1.2"]
pub fn LeapDestroyClockRebaser(hClockRebaser: LEAP_CLOCK_REBASER);
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Provides the corrected camera ray intercepting the specified point on the image."]
#[doc = ""]
#[doc = " Given a point on the image, ``LeapPixelToRectilinear()`` corrects for camera distortion"]
#[doc = " and returns the true direction from the camera to the source of that image point"]
#[doc = " within the Leap Motion field of view."]
#[doc = ""]
#[doc = " This direction vector has an x and y component [x, y, 1], with the third element"]
#[doc = " always 1. Note that this vector uses the 2D camera coordinate system"]
#[doc = " where the x-axis parallels the longer (typically horizontal) dimension and"]
#[doc = " the y-axis parallels the shorter (vertical) dimension. The camera coordinate"]
#[doc = " system does not correlate to the 3D Leap Motion coordinate system."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
#[doc = " @param pixel A Vector containing the position of a pixel in the image."]
#[doc = " @returns A Vector containing the ray direction (the z-component of the vector is always 1)."]
#[doc = " @since 3.1.3"]
pub fn LeapPixelToRectilinear(
hConnection: LEAP_CONNECTION,
camera: eLeapPerspectiveType,
pixel: LEAP_VECTOR,
) -> LEAP_VECTOR;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Provides the point in the image corresponding to a ray projecting"]
#[doc = " from the camera."]
#[doc = ""]
#[doc = " Given a ray projected from the camera in the specified direction, ``LeapRectilinearToPixel()``"]
#[doc = " corrects for camera distortion and returns the corresponding pixel"]
#[doc = " coordinates in the image."]
#[doc = ""]
#[doc = " The ray direction is specified in relationship to the camera. The first"]
#[doc = " vector element is the tangent of the \"horizontal\" view angle; the second"]
#[doc = " element is the tangent of the \"vertical\" view angle."]
#[doc = ""]
#[doc = " The ``LeapRectilinearToPixel()`` function returns pixel coordinates outside of the image bounds"]
#[doc = " if you project a ray toward a point for which there is no recorded data."]
#[doc = ""]
#[doc = " ``LeapRectilinearToPixel()`` is typically not fast enough for realtime distortion correction."]
#[doc = " For better performance, use a shader program executed on a GPU."]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
#[doc = " @param rectilinear A Vector containing the ray direction."]
#[doc = " @returns A Vector containing the pixel coordinates [x, y, 1] (with z always 1)."]
#[doc = " @since 3.1.3"]
pub fn LeapRectilinearToPixel(
hConnection: LEAP_CONNECTION,
camera: eLeapPerspectiveType,
rectilinear: LEAP_VECTOR,
) -> LEAP_VECTOR;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Returns an OpenCV-compatible camera matrix"]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
#[doc = " @param[out] dest A pointer to a single-precision float array of size 9"]
#[doc = " @since 3.2.1"]
pub fn LeapCameraMatrix(
hConnection: LEAP_CONNECTION,
camera: eLeapPerspectiveType,
dest: *mut f32,
);
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Returns an OpenCV-compatible lens distortion using the 8-parameter rational model"]
#[doc = ""]
#[doc = " The order of the returned array is: [k1, k2, p1, p2, k3, k4, k5, k6]"]
#[doc = ""]
#[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
#[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
#[doc = " @param[out] dest A pointer to a single-precision float array of size 8."]
#[doc = " @since 3.2.1"]
pub fn LeapDistortionCoeffs(
hConnection: LEAP_CONNECTION,
camera: eLeapPerspectiveType,
dest: *mut f32,
);
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Provides the human-readable canonical name of the specified device model."]
#[doc = ""]
#[doc = " This method is guaranteed to never return null for the LEAP_DEVICE_INFO.pid field"]
#[doc = " returned by a successful call to LeapGetDeviceInfo"]
#[doc = ""]
#[doc = " @param pid The pid of the device"]
#[doc = " @returns The string name of the device model, or null if the device type string is invalid."]
#[doc = ""]
pub fn LeapDevicePIDToString(pid: eLeapDevicePID) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn LeapGetPointMappingSize(hConnection: LEAP_CONNECTION, pSize: *mut u64) -> eLeapRS;
}
extern "C" {
pub fn LeapGetPointMapping(
hConnection: LEAP_CONNECTION,
pointMapping: *mut LEAP_POINT_MAPPING,
pSize: *mut u64,
) -> eLeapRS;
}
pub const _eLeapRecordingFlags_eLeapRecordingFlags_Error: _eLeapRecordingFlags = 0;
pub const _eLeapRecordingFlags_eLeapRecordingFlags_Reading: _eLeapRecordingFlags = 1;
pub const _eLeapRecordingFlags_eLeapRecordingFlags_Writing: _eLeapRecordingFlags = 2;
pub const _eLeapRecordingFlags_eLeapRecordingFlags_Flushing: _eLeapRecordingFlags = 4;
pub const _eLeapRecordingFlags_eLeapRecordingFlags_Compressed: _eLeapRecordingFlags = 8;
#[doc = " \\ingroup Enum"]
#[doc = " Defines the recording mode provided to the LeapRecordingOpen()"]
#[doc = " function. Also used in members of LEAP_RECORDING_PARAMETERS and LEAP_RECORDING_STATUS."]
#[doc = " @since 3.2.0"]
pub type _eLeapRecordingFlags = i32;
#[doc = " \\ingroup Enum"]
#[doc = " Defines the recording mode provided to the LeapRecordingOpen()"]
#[doc = " function. Also used in members of LEAP_RECORDING_PARAMETERS and LEAP_RECORDING_STATUS."]
#[doc = " @since 3.2.0"]
pub use self::_eLeapRecordingFlags as eLeapRecordingFlags;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_RECORDING {
_unused: [u8; 0],
}
#[doc = " \\ingroup Structs"]
#[doc = " A Leap recording."]
#[doc = " @since 3.2.0"]
pub type LEAP_RECORDING = *mut _LEAP_RECORDING;
#[doc = " \\ingroup Structs"]
#[doc = " Read/Write mode for opening a LEAP_RECORDING."]
#[doc = " since 3.2.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_RECORDING_PARAMETERS {
#[doc = " A combination of eLeapRecordingFlags indicating the desired operations. @since 3.2.0"]
pub mode: u32,
}
#[test]
fn bindgen_test_layout__LEAP_RECORDING_PARAMETERS() {
assert_eq!(
::std::mem::size_of::<_LEAP_RECORDING_PARAMETERS>(),
4usize,
concat!("Size of: ", stringify!(_LEAP_RECORDING_PARAMETERS))
);
assert_eq!(
::std::mem::align_of::<_LEAP_RECORDING_PARAMETERS>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_RECORDING_PARAMETERS))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_RECORDING_PARAMETERS>())).mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_RECORDING_PARAMETERS),
"::",
stringify!(mode)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Read/Write mode for opening a LEAP_RECORDING."]
#[doc = " since 3.2.0"]
pub type LEAP_RECORDING_PARAMETERS = _LEAP_RECORDING_PARAMETERS;
#[doc = " \\ingroup Structs"]
#[doc = " Information about a current LEAP_RECORDING."]
#[doc = " Filled in by a call to LeapRecordingGetStatus()."]
#[doc = " @since 3.2.0"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_RECORDING_STATUS {
#[doc = " Some combination of eLeapRecordingFlags indicating the status of the recording. @since 3.2.0"]
pub mode: u32,
}
#[test]
fn bindgen_test_layout__LEAP_RECORDING_STATUS() {
assert_eq!(
::std::mem::size_of::<_LEAP_RECORDING_STATUS>(),
4usize,
concat!("Size of: ", stringify!(_LEAP_RECORDING_STATUS))
);
assert_eq!(
::std::mem::align_of::<_LEAP_RECORDING_STATUS>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_RECORDING_STATUS))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_RECORDING_STATUS>())).mode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_RECORDING_STATUS),
"::",
stringify!(mode)
)
);
}
#[doc = " \\ingroup Structs"]
#[doc = " Information about a current LEAP_RECORDING."]
#[doc = " Filled in by a call to LeapRecordingGetStatus()."]
#[doc = " @since 3.2.0"]
pub type LEAP_RECORDING_STATUS = _LEAP_RECORDING_STATUS;
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Opens or creates a LEAP_RECORDING."]
#[doc = ""]
#[doc = " Pass the LEAP_RECORDING pointer to LeapRecordingOpen() to initiate reading from"]
#[doc = " or writing to a recording. The recording path is relative to the \"user path\""]
#[doc = " which is the SD card on Android."]
#[doc = ""]
#[doc = " @param ppRecording The recording being opened."]
#[doc = " @param filePath The file path. This will be passed directly to the OS without modification. An \".lmt\" suffix is suggested."]
#[doc = " @param params The LEAP_RECORDING_PARAMETERS describing what operations are requested."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.2.0"]
pub fn LeapRecordingOpen(
ppRecording: *mut LEAP_RECORDING,
filePath: *const ::std::os::raw::c_char,
params: LEAP_RECORDING_PARAMETERS,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Closes a LEAP_RECORDING."]
#[doc = ""]
#[doc = " @param[out] ppRecording The recording being closed. Will modify *ppRecording to be null."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.2.0"]
pub fn LeapRecordingClose(ppRecording: *mut LEAP_RECORDING) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Fills in a LEAP_RECORDING_STATUS struct for an open recording."]
#[doc = " This struct provides the applicable eLeapRecordingFlags."]
#[doc = ""]
#[doc = " @param pRecording The open recording."]
#[doc = " @param[out] pstatus A LEAP_RECORDING_STATUS struct to receive the recording status."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.2.0"]
pub fn LeapRecordingGetStatus(
pRecording: LEAP_RECORDING,
pstatus: *mut LEAP_RECORDING_STATUS,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Retrieves the number of bytes required to allocate the next frame in a recording."]
#[doc = ""]
#[doc = " Use this function to determine the size of the buffer to allocate before calling"]
#[doc = " LeapRecordingRead()."]
#[doc = ""]
#[doc = " @param pRecording The recording being read from."]
#[doc = " @param[out] pncbEvent A pointer that receives the number of bytes required to store the next frame."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.2.0"]
pub fn LeapRecordingReadSize(pRecording: LEAP_RECORDING, pncbEvent: *mut u64) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Reads a tracking frame from a LEAP_RECORDING file."]
#[doc = ""]
#[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
#[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
#[doc = ""]
#[doc = " @param pRecording The recording being read from."]
#[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with the next recorded frame."]
#[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.2.0"]
pub fn LeapRecordingRead(
pRecording: LEAP_RECORDING,
pEvent: *mut LEAP_TRACKING_EVENT,
ncbEvent: u64,
) -> eLeapRS;
}
extern "C" {
#[doc = " \\ingroup Functions"]
#[doc = " Writes a tracking frame to a LEAP_RECORDING file."]
#[doc = ""]
#[doc = " @param pRecording The recording being written to."]
#[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
#[doc = " @param pnBytesWritten If non-null the number of bytes written."]
#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
#[doc = " @since 3.2.0"]
pub fn LeapRecordingWrite(
pRecording: LEAP_RECORDING,
pEvent: *mut LEAP_TRACKING_EVENT,
pnBytesWritten: *mut u64,
) -> eLeapRS;
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _LEAP_TELEMETRY_DATA {
pub thread_id: u32,
pub start_time: u64,
pub end_time: u64,
pub zone_depth: u32,
pub file_name: *const ::std::os::raw::c_char,
pub line_number: u32,
pub zone_name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout__LEAP_TELEMETRY_DATA() {
assert_eq!(
::std::mem::size_of::<_LEAP_TELEMETRY_DATA>(),
44usize,
concat!("Size of: ", stringify!(_LEAP_TELEMETRY_DATA))
);
assert_eq!(
::std::mem::align_of::<_LEAP_TELEMETRY_DATA>(),
1usize,
concat!("Alignment of ", stringify!(_LEAP_TELEMETRY_DATA))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).thread_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(thread_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).start_time as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(start_time)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).end_time as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(end_time)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).zone_depth as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(zone_depth)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).file_name as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(file_name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).line_number as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(line_number)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_LEAP_TELEMETRY_DATA>())).zone_name as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_LEAP_TELEMETRY_DATA),
"::",
stringify!(zone_name)
)
);
}
pub type LEAP_TELEMETRY_DATA = _LEAP_TELEMETRY_DATA;
extern "C" {
pub fn LeapTelemetryProfiling(
hConnection: LEAP_CONNECTION,
telemetryData: *const LEAP_TELEMETRY_DATA,
) -> eLeapRS;
}
extern "C" {
pub fn LeapTelemetryGetNow() -> u64;
}