1pub const LEAP_DISTORTION_MATRIX_N: u32 = 64;
4#[doc = " The operation completed successfully."]
5pub const _eLeapRS_eLeapRS_Success: _eLeapRS = 0;
6#[doc = " An undetermined error has occurred."]
7#[doc = " This is usually the result of an abnormal operating condition in LeapC,"]
8#[doc = " the Ultraleap Tracking Service, or the host computer itself."]
9#[doc = " @since 3.0.0"]
10pub const _eLeapRS_eLeapRS_UnknownError: _eLeapRS = -503250944;
11#[doc = " An invalid argument was specified."]
12#[doc = " @since 3.0.0"]
13pub const _eLeapRS_eLeapRS_InvalidArgument: _eLeapRS = -503250943;
14#[doc = " Insufficient resources existed to complete the request."]
15#[doc = " @since 3.0.0"]
16pub const _eLeapRS_eLeapRS_InsufficientResources: _eLeapRS = -503250942;
17#[doc = " The specified buffer was not large enough to complete the request."]
18#[doc = " @since 3.0.0"]
19pub const _eLeapRS_eLeapRS_InsufficientBuffer: _eLeapRS = -503250941;
20#[doc = " The requested operation has timed out."]
21#[doc = " @since 3.0.0"]
22pub const _eLeapRS_eLeapRS_Timeout: _eLeapRS = -503250940;
23#[doc = " The operation is invalid because there is no current connection."]
24#[doc = " @since 3.0.0"]
25pub const _eLeapRS_eLeapRS_NotConnected: _eLeapRS = -503250939;
26#[doc = " The operation is invalid because the connection is not complete."]
27#[doc = " @since 3.0.0"]
28pub const _eLeapRS_eLeapRS_HandshakeIncomplete: _eLeapRS = -503250938;
29#[doc = " The specified buffer size is too large."]
30#[doc = " @since 3.0.0"]
31pub const _eLeapRS_eLeapRS_BufferSizeOverflow: _eLeapRS = -503250937;
32#[doc = " A communications protocol error occurred."]
33#[doc = " @since 3.0.0"]
34pub const _eLeapRS_eLeapRS_ProtocolError: _eLeapRS = -503250936;
35#[doc = " The server incorrectly specified zero as a client ID."]
36#[doc = " @since 3.0.0"]
37pub const _eLeapRS_eLeapRS_InvalidClientID: _eLeapRS = -503250935;
38#[doc = " The connection to the service was unexpectedly closed while reading or writing a message."]
39#[doc = " The server may have terminated."]
40#[doc = " @since 3.0.0"]
41pub const _eLeapRS_eLeapRS_UnexpectedClosed: _eLeapRS = -503250934;
42#[doc = " The specified request token does not appear to be valid"]
43#[doc = ""]
44#[doc = " Provided that the token value which identifies the request itself was, at one point, valid, this"]
45#[doc = " error condition occurs when the request to which the token refers has already been satisfied or"]
46#[doc = " is currently being satisfied."]
47#[doc = " @since 3.0.0"]
48pub const _eLeapRS_eLeapRS_UnknownImageFrameRequest: _eLeapRS = -503250933;
49#[doc = " The specified frame ID is not valid or is no longer valid"]
50#[doc = ""]
51#[doc = " Provided that frame ID was, at one point, valid, this error condition occurs when the identifier"]
52#[doc = " refers to a frame that occurred further in the past than is currently recorded in the rolling"]
53#[doc = " frame window."]
54#[doc = " @since 3.0.0"]
55pub const _eLeapRS_eLeapRS_UnknownTrackingFrameID: _eLeapRS = -503250932;
56#[doc = " The specified timestamp references a future point in time"]
57#[doc = ""]
58#[doc = " The related routine can only operate on time points having occurred in the past, and the"]
59#[doc = " provided timestamp occurs in the future."]
60#[doc = " @since 3.1.2"]
61pub const _eLeapRS_eLeapRS_RoutineIsNotSeer: _eLeapRS = -503250931;
62#[doc = " The specified timestamp references a point too far in the past"]
63#[doc = ""]
64#[doc = " The related routine can only operate on time points occurring within its immediate record of"]
65#[doc = " the past."]
66#[doc = " @since 3.1.2"]
67pub const _eLeapRS_eLeapRS_TimestampTooEarly: _eLeapRS = -503250930;
68#[doc = " LeapPollConnection is called concurrently."]
69#[doc = " @since 3.1.2"]
70pub const _eLeapRS_eLeapRS_ConcurrentPoll: _eLeapRS = -503250929;
71#[doc = " A connection to the Ultraleap Tracking Service could not be established."]
72#[doc = "@since 3.0.0"]
73pub const _eLeapRS_eLeapRS_NotAvailable: _eLeapRS = -419364862;
74#[doc = " The requested operation can only be performed while the device is sending data."]
75#[doc = " @since 3.0.0"]
76pub const _eLeapRS_eLeapRS_NotStreaming: _eLeapRS = -419364860;
77#[doc = " The specified device could not be opened. It is possible that the device identifier"]
78#[doc = " is invalid, or that the device has been disconnected since being enumerated."]
79#[doc = " @since 3.0.0"]
80pub const _eLeapRS_eLeapRS_CannotOpenDevice: _eLeapRS = -419364859;
81#[doc = " The request is not supported by this version of the service."]
82#[doc = " @since 5.4.0"]
83pub const _eLeapRS_eLeapRS_Unsupported: _eLeapRS = -419364858;
84#[doc = " \\ingroup Enum"]
85#[doc = " Defines the codes returned by all LeapC functions."]
86#[doc = " @since 3.0.0"]
87pub type _eLeapRS = ::std::os::raw::c_int;
88#[doc = " \\ingroup Enum"]
89#[doc = " Defines the codes returned by all LeapC functions."]
90#[doc = " @since 3.0.0"]
91pub use self::_eLeapRS as eLeapRS;
92#[doc = " The tracking mode optimised for desktop devices @since 5.0.0"]
93pub const _eLeapTrackingMode_eLeapTrackingMode_Desktop: _eLeapTrackingMode = 0;
94#[doc = " The tracking mode optimised for head-mounted devices @since 5.0.0"]
95pub const _eLeapTrackingMode_eLeapTrackingMode_HMD: _eLeapTrackingMode = 1;
96#[doc = " The tracking mode optimised for screen top-mounted devices @since 5.0.0"]
97pub const _eLeapTrackingMode_eLeapTrackingMode_ScreenTop: _eLeapTrackingMode = 2;
98#[doc = " Tracking mode is not known (allows triggering of a new LEAP_TRACKING_MODE_EVENT) @since 5.0.0"]
99pub const _eLeapTrackingMode_eLeapTrackingMode_Unknown: _eLeapTrackingMode = 3;
100#[doc = " \\ingroup Enum"]
101#[doc = " Enumerates values for the tracking mode."]
102pub type _eLeapTrackingMode = ::std::os::raw::c_int;
103#[doc = " \\ingroup Enum"]
104#[doc = " Enumerates values for the tracking mode."]
105pub use self::_eLeapTrackingMode as eLeapTrackingMode;
106#[repr(C)]
107#[derive(Debug, Copy, Clone)]
108pub struct _LEAP_CONNECTION {
109 _unused: [u8; 0],
110}
111#[doc = " \\ingroup Structs"]
112#[doc = " \\struct LEAP_CONNECTION"]
113#[doc = " A handle to the Leap connection object."]
114#[doc = " Use this handle to specify the connection for an operation."]
115#[doc = " @since 3.0.0"]
116pub type LEAP_CONNECTION = *mut _LEAP_CONNECTION;
117#[repr(C)]
118#[derive(Debug, Copy, Clone)]
119pub struct _LEAP_DEVICE {
120 _unused: [u8; 0],
121}
122#[doc = " \\ingroup Structs"]
123#[doc = " \\struct LEAP_DEVICE"]
124#[doc = " A handle to a Leap device object."]
125#[doc = " Use this handle to specify the device for an operation."]
126#[doc = " @since 3.0.0"]
127pub type LEAP_DEVICE = *mut _LEAP_DEVICE;
128#[repr(C)]
129#[derive(Debug, Copy, Clone)]
130pub struct _LEAP_CALIBRATION {
131 _unused: [u8; 0],
132}
133#[doc = " \\ingroup Structs"]
134#[doc = " Represents a calibration object."]
135#[doc = " Not currently of any particular use."]
136#[doc = " @since 3.0.0"]
137pub type LEAP_CALIBRATION = *mut _LEAP_CALIBRATION;
138#[doc = " \\ingroup Structs"]
139#[doc = " A reference to a Leap device."]
140#[doc = ""]
141#[doc = " Get a LEAP_DEVICE_REF by calling LeapGetDeviceList(). Access a device by"]
142#[doc = " calling LeapOpenDevice() with this reference. LeapOpenDevice() provides a"]
143#[doc = " LEAP_DEVICE struct, which is a handle to an open device."]
144#[repr(C, packed)]
145#[derive(Debug, Copy, Clone)]
146pub struct _LEAP_DEVICE_REF {
147 #[doc = " An opaque handle. @since 3.0.0"]
148 pub handle: *mut ::std::os::raw::c_void,
149 #[doc = " a generic identifier. @since 3.0.0"]
150 pub id: u32,
151}
152#[test]
153fn bindgen_test_layout__LEAP_DEVICE_REF() {
154 assert_eq!(
155 ::std::mem::size_of::<_LEAP_DEVICE_REF>(),
156 12usize,
157 concat!("Size of: ", stringify!(_LEAP_DEVICE_REF))
158 );
159 assert_eq!(
160 ::std::mem::align_of::<_LEAP_DEVICE_REF>(),
161 1usize,
162 concat!("Alignment of ", stringify!(_LEAP_DEVICE_REF))
163 );
164 fn test_field_handle() {
165 assert_eq!(
166 unsafe {
167 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_REF>::uninit();
168 let ptr = uninit.as_ptr();
169 ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize
170 },
171 0usize,
172 concat!(
173 "Offset of field: ",
174 stringify!(_LEAP_DEVICE_REF),
175 "::",
176 stringify!(handle)
177 )
178 );
179 }
180 test_field_handle();
181 fn test_field_id() {
182 assert_eq!(
183 unsafe {
184 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_REF>::uninit();
185 let ptr = uninit.as_ptr();
186 ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize
187 },
188 8usize,
189 concat!(
190 "Offset of field: ",
191 stringify!(_LEAP_DEVICE_REF),
192 "::",
193 stringify!(id)
194 )
195 );
196 }
197 test_field_id();
198}
199#[doc = " \\ingroup Structs"]
200#[doc = " A reference to a Leap device."]
201#[doc = ""]
202#[doc = " Get a LEAP_DEVICE_REF by calling LeapGetDeviceList(). Access a device by"]
203#[doc = " calling LeapOpenDevice() with this reference. LeapOpenDevice() provides a"]
204#[doc = " LEAP_DEVICE struct, which is a handle to an open device."]
205pub type LEAP_DEVICE_REF = _LEAP_DEVICE_REF;
206#[doc = " The client is aware of how to handle multiple devices through the API."]
207#[doc = " @since 4.1.0"]
208pub const _eLeapConnectionConfig_eLeapConnectionConfig_MultiDeviceAware: _eLeapConnectionConfig = 1;
209pub type _eLeapConnectionConfig = ::std::os::raw::c_int;
210pub use self::_eLeapConnectionConfig as eLeapConnectionConfig;
211#[doc = " \\ingroup Structs"]
212#[doc = " Specifies the configuration for a connection."]
213#[doc = " @since 3.0.0"]
214#[repr(C, packed)]
215#[derive(Debug, Copy, Clone)]
216pub struct _LEAP_CONNECTION_CONFIG {
217 #[doc = " Set to the final size of the structure. @since 3.0.0"]
218 pub size: u32,
219 #[doc = " A combination of eLeapConnectionConfig flags. Set to 0 to indicate no"]
220 #[doc = " special flags. @since 3.0.0"]
221 pub flags: u32,
222 #[doc = " Specifies the server namespace to be used. Leave NULL to use the default namespace."]
223 #[doc = ""]
224 #[doc = " It is possible to launch the service with a different IPC connection namespace"]
225 #[doc = " (using internal service functions). Clients wishing to connect to a different"]
226 #[doc = " server namespace may specify that namespace here."]
227 #[doc = ""]
228 #[doc = " The default connection namespace is \"Leap Service\"."]
229 pub server_namespace: *const ::std::os::raw::c_char,
230}
231#[test]
232fn bindgen_test_layout__LEAP_CONNECTION_CONFIG() {
233 assert_eq!(
234 ::std::mem::size_of::<_LEAP_CONNECTION_CONFIG>(),
235 16usize,
236 concat!("Size of: ", stringify!(_LEAP_CONNECTION_CONFIG))
237 );
238 assert_eq!(
239 ::std::mem::align_of::<_LEAP_CONNECTION_CONFIG>(),
240 1usize,
241 concat!("Alignment of ", stringify!(_LEAP_CONNECTION_CONFIG))
242 );
243 fn test_field_size() {
244 assert_eq!(
245 unsafe {
246 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_CONFIG>::uninit();
247 let ptr = uninit.as_ptr();
248 ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize
249 },
250 0usize,
251 concat!(
252 "Offset of field: ",
253 stringify!(_LEAP_CONNECTION_CONFIG),
254 "::",
255 stringify!(size)
256 )
257 );
258 }
259 test_field_size();
260 fn test_field_flags() {
261 assert_eq!(
262 unsafe {
263 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_CONFIG>::uninit();
264 let ptr = uninit.as_ptr();
265 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize
266 },
267 4usize,
268 concat!(
269 "Offset of field: ",
270 stringify!(_LEAP_CONNECTION_CONFIG),
271 "::",
272 stringify!(flags)
273 )
274 );
275 }
276 test_field_flags();
277 fn test_field_server_namespace() {
278 assert_eq!(
279 unsafe {
280 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_CONFIG>::uninit();
281 let ptr = uninit.as_ptr();
282 ::std::ptr::addr_of!((*ptr).server_namespace) as usize - ptr as usize
283 },
284 8usize,
285 concat!(
286 "Offset of field: ",
287 stringify!(_LEAP_CONNECTION_CONFIG),
288 "::",
289 stringify!(server_namespace)
290 )
291 );
292 }
293 test_field_server_namespace();
294}
295#[doc = " \\ingroup Structs"]
296#[doc = " Specifies the configuration for a connection."]
297#[doc = " @since 3.0.0"]
298pub type LEAP_CONNECTION_CONFIG = _LEAP_CONNECTION_CONFIG;
299#[doc = " Signed 8-bit integer (char) @since 4.0.0"]
300pub const _eLeapAllocatorType_eLeapAllocatorType_Int8: _eLeapAllocatorType = 0;
301#[doc = " Unsigned 8-bit integer (byte) @since 4.0.0"]
302pub const _eLeapAllocatorType_eLeapAllocatorType_Uint8: _eLeapAllocatorType = 1;
303#[doc = " Signed 16-bit integer @since 4.0.0"]
304pub const _eLeapAllocatorType_eLeapAllocatorType_Int16: _eLeapAllocatorType = 2;
305#[doc = " Unsigned 16-bit integer @since 4.0.0"]
306pub const _eLeapAllocatorType_eLeapAllocatorType_UInt16: _eLeapAllocatorType = 3;
307#[doc = " Signed 32-bit integer @since 4.0.0"]
308pub const _eLeapAllocatorType_eLeapAllocatorType_Int32: _eLeapAllocatorType = 4;
309#[doc = " Unsigned 32-bit integer @since 4.0.0"]
310pub const _eLeapAllocatorType_eLeapAllocatorType_UInt32: _eLeapAllocatorType = 5;
311#[doc = " Single-precision 32-bit floating-point @since 4.0.0"]
312pub const _eLeapAllocatorType_eLeapAllocatorType_Float: _eLeapAllocatorType = 6;
313#[doc = " Signed 64-bit integer @since 4.0.0"]
314pub const _eLeapAllocatorType_eLeapAllocatorType_Int64: _eLeapAllocatorType = 8;
315#[doc = " Unsigned 64-bit integer @since 4.0.0"]
316pub const _eLeapAllocatorType_eLeapAllocatorType_UInt64: _eLeapAllocatorType = 9;
317#[doc = " Double-precision 64-bit floating-point @since 4.0.0"]
318pub const _eLeapAllocatorType_eLeapAllocatorType_Double: _eLeapAllocatorType = 10;
319#[doc = " \\ingroup Enum"]
320#[doc = " Defines the various types of data that may be allocated using the allocator."]
321#[doc = " @since 4.0.0"]
322pub type _eLeapAllocatorType = ::std::os::raw::c_int;
323#[doc = " \\ingroup Enum"]
324#[doc = " Defines the various types of data that may be allocated using the allocator."]
325#[doc = " @since 4.0.0"]
326pub use self::_eLeapAllocatorType as eLeapAllocatorType;
327#[doc = " \\ingroup Structs"]
328#[doc = " Specifies the allocator/deallocator functions to be used when the library"]
329#[doc = " needs to dynamically manage memory."]
330#[doc = " @since 4.0.0"]
331#[repr(C, packed)]
332#[derive(Debug, Copy, Clone)]
333pub struct LEAP_ALLOCATOR {
334 #[doc = " Function pointer to an allocator function that is expected to return a"]
335 #[doc = " pointer to memory of at least the specified size in bytes. This will be"]
336 #[doc = " called when the library needs a block of memory that will be provided"]
337 #[doc = " back to the client in a subsequent event or response. A type hint is"]
338 #[doc = " provided in the case where the underlying buffer type needs to be known"]
339 #[doc = " at allocation time."]
340 pub allocate: ::std::option::Option<
341 unsafe extern "C" fn(
342 size: u32,
343 typeHint: eLeapAllocatorType,
344 state: *mut ::std::os::raw::c_void,
345 ) -> *mut ::std::os::raw::c_void,
346 >,
347 #[doc = " Function pointer to a deallocator function. The function receives the"]
348 #[doc = " address of a previously allocated block of memory from the ``allocate``"]
349 #[doc = " function pointer. The caller is not required to deallocate the memory,"]
350 #[doc = " but rather this call is used by the library to indicate to the client"]
351 #[doc = " that it will no longer reference the memory at this address, and that"]
352 #[doc = " the callee _may_ deallocate the memory when it is ready to do so."]
353 pub deallocate: ::std::option::Option<
354 unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void, state: *mut ::std::os::raw::c_void),
355 >,
356 #[doc = " Pointer to state to be passed to the allocate and deallocate functions."]
357 pub state: *mut ::std::os::raw::c_void,
358}
359#[test]
360fn bindgen_test_layout_LEAP_ALLOCATOR() {
361 assert_eq!(
362 ::std::mem::size_of::<LEAP_ALLOCATOR>(),
363 24usize,
364 concat!("Size of: ", stringify!(LEAP_ALLOCATOR))
365 );
366 assert_eq!(
367 ::std::mem::align_of::<LEAP_ALLOCATOR>(),
368 1usize,
369 concat!("Alignment of ", stringify!(LEAP_ALLOCATOR))
370 );
371 fn test_field_allocate() {
372 assert_eq!(
373 unsafe {
374 let uninit = ::std::mem::MaybeUninit::<LEAP_ALLOCATOR>::uninit();
375 let ptr = uninit.as_ptr();
376 ::std::ptr::addr_of!((*ptr).allocate) as usize - ptr as usize
377 },
378 0usize,
379 concat!(
380 "Offset of field: ",
381 stringify!(LEAP_ALLOCATOR),
382 "::",
383 stringify!(allocate)
384 )
385 );
386 }
387 test_field_allocate();
388 fn test_field_deallocate() {
389 assert_eq!(
390 unsafe {
391 let uninit = ::std::mem::MaybeUninit::<LEAP_ALLOCATOR>::uninit();
392 let ptr = uninit.as_ptr();
393 ::std::ptr::addr_of!((*ptr).deallocate) as usize - ptr as usize
394 },
395 8usize,
396 concat!(
397 "Offset of field: ",
398 stringify!(LEAP_ALLOCATOR),
399 "::",
400 stringify!(deallocate)
401 )
402 );
403 }
404 test_field_deallocate();
405 fn test_field_state() {
406 assert_eq!(
407 unsafe {
408 let uninit = ::std::mem::MaybeUninit::<LEAP_ALLOCATOR>::uninit();
409 let ptr = uninit.as_ptr();
410 ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize
411 },
412 16usize,
413 concat!(
414 "Offset of field: ",
415 stringify!(LEAP_ALLOCATOR),
416 "::",
417 stringify!(state)
418 )
419 );
420 }
421 test_field_state();
422}
423extern "C" {
424 #[doc = " \\ingroup Functions"]
425 #[doc = " Samples the universal clock used by the system to timestamp image and tracking frames."]
426 #[doc = ""]
427 #[doc = " The returned counter value is given in microseconds since an epoch time. The clock used for the"]
428 #[doc = " counter itself is implementation-defined, but generally speaking, it is global, monotonic, and"]
429 #[doc = " makes use of the most accurate high-performance counter available on the system."]
430 #[doc = " @returns microseconds since an unspecified epoch."]
431 #[doc = " @since 3.0.0"]
432 pub fn LeapGetNow() -> i64;
433}
434extern "C" {
435 #[doc = " \\ingroup Functions"]
436 #[doc = " Creates a new LEAP_CONNECTION object."]
437 #[doc = ""]
438 #[doc = " Pass the LEAP_CONNECTION pointer to LeapOpenConnection() to establish a"]
439 #[doc = " connection to the Ultraleap Tracking Service; and to subsequent operations"]
440 #[doc = " on the same connection."]
441 #[doc = ""]
442 #[doc = " @param pConfig The configuration to be used with the newly created connection."]
443 #[doc = " If pConfig is null, a connection is created with a default configuration."]
444 #[doc = " @param[out] phConnection Receives a pointer to the connection object, set to invalid on failure"]
445 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
446 #[doc = " @since 3.0.0"]
447 pub fn LeapCreateConnection(
448 pConfig: *const LEAP_CONNECTION_CONFIG,
449 phConnection: *mut LEAP_CONNECTION,
450 ) -> eLeapRS;
451}
452extern "C" {
453 #[doc = " \\ingroup Functions"]
454 #[doc = " Opens a connection to the service."]
455 #[doc = ""]
456 #[doc = " This routine will not block. A connection to the service will not be established until the first"]
457 #[doc = " invocation of LeapPollConnection."]
458 #[doc = ""]
459 #[doc = " @param hConnection A handle to the connection object, created by LeapCreateConnection()."]
460 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
461 #[doc = " @since 3.0.0"]
462 pub fn LeapOpenConnection(hConnection: LEAP_CONNECTION) -> eLeapRS;
463}
464#[doc = " The service cannot receive frames fast enough from the underlying hardware."]
465#[doc = " @since 3.1.3"]
466pub const _eLeapServiceDisposition_eLeapServiceState_LowFpsDetected: _eLeapServiceDisposition = 1;
467#[doc = " The service has paused itself due to an insufficient frame rate from the hardware."]
468#[doc = " @since 3.1.3"]
469pub const _eLeapServiceDisposition_eLeapServiceState_PoorPerformancePause:
470 _eLeapServiceDisposition = 2;
471#[doc = " The service has failed to start tracking due to unknown reasons."]
472#[doc = " @since 5.1.16"]
473pub const _eLeapServiceDisposition_eLeapServiceState_TrackingErrorUnknown:
474 _eLeapServiceDisposition = 4;
475#[doc = " The combination of all valid flags in this enumeration"]
476pub const _eLeapServiceDisposition_eLeapServiceState_ALL: _eLeapServiceDisposition = 7;
477pub type _eLeapServiceDisposition = ::std::os::raw::c_int;
478pub use self::_eLeapServiceDisposition as eLeapServiceDisposition;
479#[doc = " \\ingroup Structs"]
480#[doc = " Received from LeapPollConnection() when a connection to the Ultraleap Tracking Service is established."]
481#[doc = " @since 3.0.0"]
482#[repr(C, packed)]
483#[derive(Debug, Copy, Clone)]
484pub struct _LEAP_CONNECTION_EVENT {
485 #[doc = " A combination of eLeapServiceDisposition flags. @since 3.1.3"]
486 pub flags: u32,
487}
488#[test]
489fn bindgen_test_layout__LEAP_CONNECTION_EVENT() {
490 assert_eq!(
491 ::std::mem::size_of::<_LEAP_CONNECTION_EVENT>(),
492 4usize,
493 concat!("Size of: ", stringify!(_LEAP_CONNECTION_EVENT))
494 );
495 assert_eq!(
496 ::std::mem::align_of::<_LEAP_CONNECTION_EVENT>(),
497 1usize,
498 concat!("Alignment of ", stringify!(_LEAP_CONNECTION_EVENT))
499 );
500 fn test_field_flags() {
501 assert_eq!(
502 unsafe {
503 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_EVENT>::uninit();
504 let ptr = uninit.as_ptr();
505 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize
506 },
507 0usize,
508 concat!(
509 "Offset of field: ",
510 stringify!(_LEAP_CONNECTION_EVENT),
511 "::",
512 stringify!(flags)
513 )
514 );
515 }
516 test_field_flags();
517}
518#[doc = " \\ingroup Structs"]
519#[doc = " Received from LeapPollConnection() when a connection to the Ultraleap Tracking Service is established."]
520#[doc = " @since 3.0.0"]
521pub type LEAP_CONNECTION_EVENT = _LEAP_CONNECTION_EVENT;
522#[doc = " \\ingroup Structs"]
523#[doc = " Received from LeapPollConnection() when a connection to the Ultraleap Tracking Service is lost."]
524#[doc = ""]
525#[doc = " If a LeapC function that performs a transaction with the Ultraleap Tracking Service is called"]
526#[doc = " after the connection is lost, the next call to LeapPollConnection() will return"]
527#[doc = " this event. Otherwise, it can take up to 5 seconds of polling the connection to"]
528#[doc = " receive this event."]
529#[doc = " @since 3.0.0"]
530#[repr(C, packed)]
531#[derive(Debug, Copy, Clone)]
532pub struct _LEAP_CONNECTION_LOST_EVENT {
533 #[doc = " Reserved for future use. @since 3.0.0"]
534 pub flags: u32,
535}
536#[test]
537fn bindgen_test_layout__LEAP_CONNECTION_LOST_EVENT() {
538 assert_eq!(
539 ::std::mem::size_of::<_LEAP_CONNECTION_LOST_EVENT>(),
540 4usize,
541 concat!("Size of: ", stringify!(_LEAP_CONNECTION_LOST_EVENT))
542 );
543 assert_eq!(
544 ::std::mem::align_of::<_LEAP_CONNECTION_LOST_EVENT>(),
545 1usize,
546 concat!("Alignment of ", stringify!(_LEAP_CONNECTION_LOST_EVENT))
547 );
548 fn test_field_flags() {
549 assert_eq!(
550 unsafe {
551 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_LOST_EVENT>::uninit();
552 let ptr = uninit.as_ptr();
553 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize
554 },
555 0usize,
556 concat!(
557 "Offset of field: ",
558 stringify!(_LEAP_CONNECTION_LOST_EVENT),
559 "::",
560 stringify!(flags)
561 )
562 );
563 }
564 test_field_flags();
565}
566#[doc = " \\ingroup Structs"]
567#[doc = " Received from LeapPollConnection() when a connection to the Ultraleap Tracking Service is lost."]
568#[doc = ""]
569#[doc = " If a LeapC function that performs a transaction with the Ultraleap Tracking Service is called"]
570#[doc = " after the connection is lost, the next call to LeapPollConnection() will return"]
571#[doc = " this event. Otherwise, it can take up to 5 seconds of polling the connection to"]
572#[doc = " receive this event."]
573#[doc = " @since 3.0.0"]
574pub type LEAP_CONNECTION_LOST_EVENT = _LEAP_CONNECTION_LOST_EVENT;
575#[doc = " The connection is not open."]
576#[doc = " Call LeapOpenConnection() to open a connection to the Ultraleap Tracking Service."]
577#[doc = " @since 3.0.0"]
578pub const _eLeapConnectionStatus_eLeapConnectionStatus_NotConnected: _eLeapConnectionStatus = 0;
579#[doc = " The connection is open."]
580#[doc = " @since 3.0.0"]
581pub const _eLeapConnectionStatus_eLeapConnectionStatus_Connected: _eLeapConnectionStatus = 1;
582#[doc = " Opening the connection is underway, but not complete."]
583#[doc = " @since 3.0.0"]
584pub const _eLeapConnectionStatus_eLeapConnectionStatus_HandshakeIncomplete: _eLeapConnectionStatus =
585 2;
586#[doc = " The connection could not be opened because the Ultraleap Tracking Service does not"]
587#[doc = " appear to be running."]
588#[doc = " @since 3.0.0"]
589pub const _eLeapConnectionStatus_eLeapConnectionStatus_NotRunning: _eLeapConnectionStatus =
590 -419233788;
591#[doc = " \\ingroup Enums"]
592#[doc = " The connection status codes."]
593#[doc = " These codes can be read from the LEAP_CONNECTION_INFO struct created by"]
594#[doc = " a call to LeapGetConnectionInfo()."]
595#[doc = " @since 3.0.0"]
596pub type _eLeapConnectionStatus = ::std::os::raw::c_int;
597#[doc = " \\ingroup Enums"]
598#[doc = " The connection status codes."]
599#[doc = " These codes can be read from the LEAP_CONNECTION_INFO struct created by"]
600#[doc = " a call to LeapGetConnectionInfo()."]
601#[doc = " @since 3.0.0"]
602pub use self::_eLeapConnectionStatus as eLeapConnectionStatus;
603#[doc = " \\ingroup Structs"]
604#[doc = " Information about a connection."]
605#[doc = ""]
606#[doc = " Call LeapCreateConnection() to generate the handle for the connection;"]
607#[doc = " call LeapOpenConnection() to establish the connection; then call"]
608#[doc = " LeapGetConnectionInfo(), which creates this struct, to check the connection status."]
609#[doc = " @since 3.0.0"]
610#[repr(C, packed)]
611#[derive(Debug, Copy, Clone)]
612pub struct _LEAP_CONNECTION_INFO {
613 #[doc = " The size of this structure. @since 3.0.0"]
614 pub size: u32,
615 #[doc = " The current status of this connection. @since 3.0.0"]
616 pub status: eLeapConnectionStatus,
617}
618#[test]
619fn bindgen_test_layout__LEAP_CONNECTION_INFO() {
620 assert_eq!(
621 ::std::mem::size_of::<_LEAP_CONNECTION_INFO>(),
622 8usize,
623 concat!("Size of: ", stringify!(_LEAP_CONNECTION_INFO))
624 );
625 assert_eq!(
626 ::std::mem::align_of::<_LEAP_CONNECTION_INFO>(),
627 1usize,
628 concat!("Alignment of ", stringify!(_LEAP_CONNECTION_INFO))
629 );
630 fn test_field_size() {
631 assert_eq!(
632 unsafe {
633 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_INFO>::uninit();
634 let ptr = uninit.as_ptr();
635 ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize
636 },
637 0usize,
638 concat!(
639 "Offset of field: ",
640 stringify!(_LEAP_CONNECTION_INFO),
641 "::",
642 stringify!(size)
643 )
644 );
645 }
646 test_field_size();
647 fn test_field_status() {
648 assert_eq!(
649 unsafe {
650 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_INFO>::uninit();
651 let ptr = uninit.as_ptr();
652 ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize
653 },
654 4usize,
655 concat!(
656 "Offset of field: ",
657 stringify!(_LEAP_CONNECTION_INFO),
658 "::",
659 stringify!(status)
660 )
661 );
662 }
663 test_field_status();
664}
665#[doc = " \\ingroup Structs"]
666#[doc = " Information about a connection."]
667#[doc = ""]
668#[doc = " Call LeapCreateConnection() to generate the handle for the connection;"]
669#[doc = " call LeapOpenConnection() to establish the connection; then call"]
670#[doc = " LeapGetConnectionInfo(), which creates this struct, to check the connection status."]
671#[doc = " @since 3.0.0"]
672pub type LEAP_CONNECTION_INFO = _LEAP_CONNECTION_INFO;
673extern "C" {
674 #[doc = " \\ingroup Functions"]
675 #[doc = " Retrieves status information about the specified connection."]
676 #[doc = ""]
677 #[doc = " Call LeapCreateConnection() to generate the handle for the connection;"]
678 #[doc = " call LeapOpenConnection() to establish the connection; then call"]
679 #[doc = " this function to check the connection status."]
680 #[doc = ""]
681 #[doc = " @param hConnection The handle of the connection of interest. Created by LeapCreateConnection."]
682 #[doc = " @param[out] pInfo A pointer to a buffer that receives additional connection information. One input,"]
683 #[doc = " the size field of pInfo is the size of the buffer(i.e. the size of a LEAP_CONNECTION_INFO"]
684 #[doc = " struct); On output, the size field of pInfo receives the size necessary to hold"]
685 #[doc = " the entire information block."]
686 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
687 #[doc = " @since 3.0.0"]
688 pub fn LeapGetConnectionInfo(
689 hConnection: LEAP_CONNECTION,
690 pInfo: *mut LEAP_CONNECTION_INFO,
691 ) -> eLeapRS;
692}
693#[doc = " The policy allowing an application to receive frames in the background. @since 3.0.0"]
694pub const _eLeapPolicyFlag_eLeapPolicyFlag_BackgroundFrames: _eLeapPolicyFlag = 1;
695#[doc = " The policy specifying whether to automatically stream images from the device. @since 4.0.0"]
696pub const _eLeapPolicyFlag_eLeapPolicyFlag_Images: _eLeapPolicyFlag = 2;
697#[doc = " The policy specifying whether to optimize tracking for head-mounted device. @since 3.0.0"]
698pub const _eLeapPolicyFlag_eLeapPolicyFlag_OptimizeHMD: _eLeapPolicyFlag = 4;
699#[doc = " The policy allowing an application to pause or resume service tracking. @since 3.0.0"]
700pub const _eLeapPolicyFlag_eLeapPolicyFlag_AllowPauseResume: _eLeapPolicyFlag = 8;
701#[doc = " The policy allowing an application to receive per-frame map points. @since 4.0.0"]
702pub const _eLeapPolicyFlag_eLeapPolicyFlag_MapPoints: _eLeapPolicyFlag = 128;
703#[doc = " The policy specifying whether to optimize tracking for screen-top device. @since 5.0.0"]
704pub const _eLeapPolicyFlag_eLeapPolicyFlag_OptimizeScreenTop: _eLeapPolicyFlag = 256;
705#[doc = " \\ingroup Enum"]
706#[doc = " Enumerates flags for the service policies."]
707pub type _eLeapPolicyFlag = ::std::os::raw::c_int;
708#[doc = " \\ingroup Enum"]
709#[doc = " Enumerates flags for the service policies."]
710pub use self::_eLeapPolicyFlag as eLeapPolicyFlag;
711#[doc = " \\ingroup Structs"]
712#[doc = " The response from a request to get or set a policy."]
713#[doc = " LeapPollConnection() creates this struct when the response becomes available."]
714#[doc = " @since 3.0.0"]
715#[repr(C, packed)]
716#[derive(Debug, Copy, Clone)]
717pub struct _LEAP_POLICY_EVENT {
718 #[doc = " Reserved for future use. @since 3.0.0"]
719 pub reserved: u32,
720 #[doc = " A bitfield containing the policies effective at the"]
721 #[doc = " time the policy event was processed. @since 3.0.0"]
722 pub current_policy: u32,
723}
724#[test]
725fn bindgen_test_layout__LEAP_POLICY_EVENT() {
726 assert_eq!(
727 ::std::mem::size_of::<_LEAP_POLICY_EVENT>(),
728 8usize,
729 concat!("Size of: ", stringify!(_LEAP_POLICY_EVENT))
730 );
731 assert_eq!(
732 ::std::mem::align_of::<_LEAP_POLICY_EVENT>(),
733 1usize,
734 concat!("Alignment of ", stringify!(_LEAP_POLICY_EVENT))
735 );
736 fn test_field_reserved() {
737 assert_eq!(
738 unsafe {
739 let uninit = ::std::mem::MaybeUninit::<_LEAP_POLICY_EVENT>::uninit();
740 let ptr = uninit.as_ptr();
741 ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize
742 },
743 0usize,
744 concat!(
745 "Offset of field: ",
746 stringify!(_LEAP_POLICY_EVENT),
747 "::",
748 stringify!(reserved)
749 )
750 );
751 }
752 test_field_reserved();
753 fn test_field_current_policy() {
754 assert_eq!(
755 unsafe {
756 let uninit = ::std::mem::MaybeUninit::<_LEAP_POLICY_EVENT>::uninit();
757 let ptr = uninit.as_ptr();
758 ::std::ptr::addr_of!((*ptr).current_policy) as usize - ptr as usize
759 },
760 4usize,
761 concat!(
762 "Offset of field: ",
763 stringify!(_LEAP_POLICY_EVENT),
764 "::",
765 stringify!(current_policy)
766 )
767 );
768 }
769 test_field_current_policy();
770}
771#[doc = " \\ingroup Structs"]
772#[doc = " The response from a request to get or set a policy."]
773#[doc = " LeapPollConnection() creates this struct when the response becomes available."]
774#[doc = " @since 3.0.0"]
775pub type LEAP_POLICY_EVENT = _LEAP_POLICY_EVENT;
776#[doc = " \\ingroup Structs"]
777#[doc = " The response from a request to get or set a policy."]
778#[doc = " LeapPollConnection() creates this struct when the response becomes available."]
779#[doc = " @since 3.0.0"]
780#[repr(C, packed)]
781#[derive(Debug, Copy, Clone)]
782pub struct _LEAP_TRACKING_MODE_EVENT {
783 #[doc = " Reserved for future use. @since 5.0.0"]
784 pub reserved: u32,
785 #[doc = " An enum specifying the tracking mode effective at the"]
786 #[doc = " time the tracking mode event was processed. @since 5.0.0"]
787 pub current_tracking_mode: eLeapTrackingMode,
788}
789#[test]
790fn bindgen_test_layout__LEAP_TRACKING_MODE_EVENT() {
791 assert_eq!(
792 ::std::mem::size_of::<_LEAP_TRACKING_MODE_EVENT>(),
793 8usize,
794 concat!("Size of: ", stringify!(_LEAP_TRACKING_MODE_EVENT))
795 );
796 assert_eq!(
797 ::std::mem::align_of::<_LEAP_TRACKING_MODE_EVENT>(),
798 1usize,
799 concat!("Alignment of ", stringify!(_LEAP_TRACKING_MODE_EVENT))
800 );
801 fn test_field_reserved() {
802 assert_eq!(
803 unsafe {
804 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_MODE_EVENT>::uninit();
805 let ptr = uninit.as_ptr();
806 ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize
807 },
808 0usize,
809 concat!(
810 "Offset of field: ",
811 stringify!(_LEAP_TRACKING_MODE_EVENT),
812 "::",
813 stringify!(reserved)
814 )
815 );
816 }
817 test_field_reserved();
818 fn test_field_current_tracking_mode() {
819 assert_eq!(
820 unsafe {
821 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_MODE_EVENT>::uninit();
822 let ptr = uninit.as_ptr();
823 ::std::ptr::addr_of!((*ptr).current_tracking_mode) as usize - ptr as usize
824 },
825 4usize,
826 concat!(
827 "Offset of field: ",
828 stringify!(_LEAP_TRACKING_MODE_EVENT),
829 "::",
830 stringify!(current_tracking_mode)
831 )
832 );
833 }
834 test_field_current_tracking_mode();
835}
836#[doc = " \\ingroup Structs"]
837#[doc = " The response from a request to get or set a policy."]
838#[doc = " LeapPollConnection() creates this struct when the response becomes available."]
839#[doc = " @since 3.0.0"]
840pub type LEAP_TRACKING_MODE_EVENT = _LEAP_TRACKING_MODE_EVENT;
841extern "C" {
842 #[doc = " \\ingroup Functions"]
843 #[doc = " Sets or clears one or more policy flags."]
844 #[doc = ""]
845 #[doc = " Changing policies is asynchronous. After you call this function, a subsequent"]
846 #[doc = " call to LeapPollConnection provides a LEAP_POLICY_EVENT containing the current"]
847 #[doc = " policies, reflecting any changes."]
848 #[doc = ""]
849 #[doc = " To get the current policies without changes, specify zero for both the set"]
850 #[doc = " and clear parameters. When ready, LeapPollConnection() provides a LEAP_POLICY_EVENT"]
851 #[doc = " containing the current settings."]
852 #[doc = ""]
853 #[doc = " The eLeapPolicyFlag enumeration defines the policy flags."]
854 #[doc = ""]
855 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
856 #[doc = " @param set A bitwise combination of flags to be set. Set to 0 if not setting any flags."]
857 #[doc = " @param clear A bitwise combination of flags to be cleared. Set to 0 to if not clearing any flags."]
858 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
859 #[doc = " @since 3.0.0"]
860 pub fn LeapSetPolicyFlags(hConnection: LEAP_CONNECTION, set: u64, clear: u64) -> eLeapRS;
861}
862extern "C" {
863 #[doc = " \\ingroup Functions"]
864 #[doc = " Sets or clears one or more policy flags for a particular device."]
865 #[doc = ""]
866 #[doc = " Changing policies is asynchronous. After you call this function, a subsequent"]
867 #[doc = " call to LeapPollConnection provides a LEAP_POLICY_EVENT containing the current"]
868 #[doc = " policies, reflecting any changes."]
869 #[doc = ""]
870 #[doc = " To get the current policies without changes, specify zero for both the set"]
871 #[doc = " and clear parameters. When ready, LeapPollConnection() provides a LEAP_POLICY_EVENT"]
872 #[doc = " containing the current settings."]
873 #[doc = ""]
874 #[doc = " The eLeapPolicyFlag enumeration defines the policy flags."]
875 #[doc = ""]
876 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
877 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
878 #[doc = " @param set A bitwise combination of flags to be set. Set to 0 if not setting any flags."]
879 #[doc = " @param clear A bitwise combination of flags to be cleared. Set to 0 if not clearing any flags."]
880 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
881 #[doc = " @since 5.4.0"]
882 pub fn LeapSetPolicyFlagsEx(
883 hConnection: LEAP_CONNECTION,
884 hDevice: LEAP_DEVICE,
885 set: u64,
886 clear: u64,
887 ) -> eLeapRS;
888}
889extern "C" {
890 #[doc = " \\ingroup Functions"]
891 #[doc = " Requests a tracking mode."]
892 #[doc = ""]
893 #[doc = " Changing tracking modes is asynchronous. After you call this function, a subsequent"]
894 #[doc = " call to LeapPollConnection provides a LEAP_POLICY_EVENT containing the current"]
895 #[doc = " policies, reflecting any changes."]
896 #[doc = ""]
897 #[doc = " The eLeapTrackingMode enumeration defines the tracking mode."]
898 #[doc = "."]
899 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
900 #[doc = " @param mode The enum value specifying the requested tracking mode"]
901 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
902 #[doc = " @since 5.0.0"]
903 pub fn LeapSetTrackingMode(hConnection: LEAP_CONNECTION, mode: eLeapTrackingMode) -> eLeapRS;
904}
905extern "C" {
906 #[doc = " \\ingroup Functions"]
907 #[doc = " Requests a tracking mode for a particular device."]
908 #[doc = ""]
909 #[doc = " Changing tracking modes is asynchronous. After you call this function, a subsequent"]
910 #[doc = " call to LeapPollConnection provides a LEAP_POLICY_EVENT containing the current"]
911 #[doc = " policies, reflecting any changes."]
912 #[doc = ""]
913 #[doc = " The eLeapTrackingMode enumeration defines the tracking mode."]
914 #[doc = ""]
915 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
916 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
917 #[doc = " @param mode The enum value specifying the requested tracking mode."]
918 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
919 #[doc = " @since 5.4.0"]
920 pub fn LeapSetTrackingModeEx(
921 hConnection: LEAP_CONNECTION,
922 hDevice: LEAP_DEVICE,
923 mode: eLeapTrackingMode,
924 ) -> eLeapRS;
925}
926extern "C" {
927 #[doc = " \\ingroup Functions"]
928 #[doc = " Requests the currently set tracking mode."]
929 #[doc = ""]
930 #[doc = " Requesting the current tracking mode is asynchronous. After you call this function, a subsequent"]
931 #[doc = " call to LeapPollConnection provides a LEAP_TRACKING_MODE_EVENT containing the current"]
932 #[doc = " tracking mode, reflecting any changes."]
933 #[doc = ""]
934 #[doc = " The eLeapTrackingMode enumeration defines the tracking mode."]
935 #[doc = ""]
936 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
937 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
938 #[doc = " @since 5.0.0"]
939 pub fn LeapGetTrackingMode(hConnection: LEAP_CONNECTION) -> eLeapRS;
940}
941extern "C" {
942 #[doc = " \\ingroup Functions"]
943 #[doc = " Requests the currently set tracking mode for a particular device."]
944 #[doc = ""]
945 #[doc = " Requesting the current tracking mode is asynchronous. After you call this function, a subsequent"]
946 #[doc = " call to LeapPollConnection provides a LEAP_TRACKING_MODE_EVENT containing the current"]
947 #[doc = " tracking mode, reflecting any changes."]
948 #[doc = ""]
949 #[doc = " The eLeapTrackingMode enumeration defines the tracking mode."]
950 #[doc = ""]
951 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
952 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
953 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
954 #[doc = " @since 5.4.0"]
955 pub fn LeapGetTrackingModeEx(hConnection: LEAP_CONNECTION, hDevice: LEAP_DEVICE) -> eLeapRS;
956}
957extern "C" {
958 #[doc = " \\ingroup Functions"]
959 #[doc = " Pauses the service"]
960 #[doc = ""]
961 #[doc = " Attempts to pause or unpause the service depending on the argument."]
962 #[doc = " This is treated as a 'user pause', as though a user had requested a pause through the"]
963 #[doc = " Leap Control Panel. The connection must have the AllowPauseResume policy set"]
964 #[doc = " or it will fail with eLeapRS_InvalidArgument."]
965 #[doc = ""]
966 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
967 #[doc = " @param pause Set to 'true' to pause, or 'false' to unpause."]
968 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
969 #[doc = " @since 4.0.0"]
970 pub fn LeapSetPause(hConnection: LEAP_CONNECTION, pause: bool) -> eLeapRS;
971}
972extern "C" {
973 #[doc = " \\ingroup Functions"]
974 #[doc = " Sets the allocator functions to use for a particular connection."]
975 #[doc = ""]
976 #[doc = " If user-supplied allocator functions are not supplied, the functions that require"]
977 #[doc = " dynamic memory allocation will not be available."]
978 #[doc = ""]
979 #[doc = " @param hConnection A handle to the connection object, created by LeapCreateConnection()."]
980 #[doc = " @param allocator A pointer to a structure containing the allocator functions to be called"]
981 #[doc = " as needed by the library."]
982 #[doc = " @since 4.0.0"]
983 pub fn LeapSetAllocator(
984 hConnection: LEAP_CONNECTION,
985 allocator: *const LEAP_ALLOCATOR,
986 ) -> eLeapRS;
987}
988#[doc = " The type is unknown (which is an abnormal condition). @since 3.0.0"]
989pub const _eLeapValueType_eLeapValueType_Unknown: _eLeapValueType = 0;
990#[doc = " A boolean value. @since 3.0.0"]
991pub const _eLeapValueType_eLeapValueType_Boolean: _eLeapValueType = 1;
992#[doc = " An integer value. @since 3.0.0"]
993pub const _eLeapValueType_eLeapValueType_Int32: _eLeapValueType = 2;
994#[doc = " A floating point value. @since 3.0.0"]
995pub const _eLeapValueType_eLeapValueType_Float: _eLeapValueType = 3;
996#[doc = " A string value. @since 3.0.0"]
997pub const _eLeapValueType_eLeapValueType_String: _eLeapValueType = 4;
998#[doc = " A string value. @since 3.0.0"]
999pub const _eLeapValueType_FORCE_DWORD: _eLeapValueType = 2147483647;
1000#[doc = " \\ingroup Enum"]
1001#[doc = " Identifies the operative data type of a LEAP_VARIANT struct instance."]
1002#[doc = " @since 3.0.0"]
1003pub type _eLeapValueType = ::std::os::raw::c_int;
1004#[doc = " \\ingroup Enum"]
1005#[doc = " Identifies the operative data type of a LEAP_VARIANT struct instance."]
1006#[doc = " @since 3.0.0"]
1007pub use self::_eLeapValueType as eLeapValueType;
1008#[doc = " \\ingroup Structs"]
1009#[doc = " A variant data type used to get and set service configuration values."]
1010#[doc = " @since 3.0.0"]
1011#[repr(C, packed)]
1012#[derive(Copy, Clone)]
1013pub struct _LEAP_VARIANT {
1014 #[doc = " The active data type in this instance. @since 3.0.0"]
1015 pub type_: eLeapValueType,
1016 pub __bindgen_anon_1: _LEAP_VARIANT__bindgen_ty_1,
1017}
1018#[repr(C, packed)]
1019#[derive(Copy, Clone)]
1020pub union _LEAP_VARIANT__bindgen_ty_1 {
1021 #[doc = " A Boolean value. @since 3.0.0"]
1022 pub boolValue: bool,
1023 #[doc = " An integer value. @since 3.0.0"]
1024 pub iValue: i32,
1025 #[doc = " A floating point value. @since 3.0.0"]
1026 pub fValue: f32,
1027 #[doc = " A pointer to a string buffer. @since 3.0.0"]
1028 pub strValue: *const ::std::os::raw::c_char,
1029}
1030#[test]
1031fn bindgen_test_layout__LEAP_VARIANT__bindgen_ty_1() {
1032 assert_eq!(
1033 ::std::mem::size_of::<_LEAP_VARIANT__bindgen_ty_1>(),
1034 8usize,
1035 concat!("Size of: ", stringify!(_LEAP_VARIANT__bindgen_ty_1))
1036 );
1037 assert_eq!(
1038 ::std::mem::align_of::<_LEAP_VARIANT__bindgen_ty_1>(),
1039 1usize,
1040 concat!("Alignment of ", stringify!(_LEAP_VARIANT__bindgen_ty_1))
1041 );
1042 fn test_field_boolValue() {
1043 assert_eq!(
1044 unsafe {
1045 let uninit = ::std::mem::MaybeUninit::<_LEAP_VARIANT__bindgen_ty_1>::uninit();
1046 let ptr = uninit.as_ptr();
1047 ::std::ptr::addr_of!((*ptr).boolValue) as usize - ptr as usize
1048 },
1049 0usize,
1050 concat!(
1051 "Offset of field: ",
1052 stringify!(_LEAP_VARIANT__bindgen_ty_1),
1053 "::",
1054 stringify!(boolValue)
1055 )
1056 );
1057 }
1058 test_field_boolValue();
1059 fn test_field_iValue() {
1060 assert_eq!(
1061 unsafe {
1062 let uninit = ::std::mem::MaybeUninit::<_LEAP_VARIANT__bindgen_ty_1>::uninit();
1063 let ptr = uninit.as_ptr();
1064 ::std::ptr::addr_of!((*ptr).iValue) as usize - ptr as usize
1065 },
1066 0usize,
1067 concat!(
1068 "Offset of field: ",
1069 stringify!(_LEAP_VARIANT__bindgen_ty_1),
1070 "::",
1071 stringify!(iValue)
1072 )
1073 );
1074 }
1075 test_field_iValue();
1076 fn test_field_fValue() {
1077 assert_eq!(
1078 unsafe {
1079 let uninit = ::std::mem::MaybeUninit::<_LEAP_VARIANT__bindgen_ty_1>::uninit();
1080 let ptr = uninit.as_ptr();
1081 ::std::ptr::addr_of!((*ptr).fValue) as usize - ptr as usize
1082 },
1083 0usize,
1084 concat!(
1085 "Offset of field: ",
1086 stringify!(_LEAP_VARIANT__bindgen_ty_1),
1087 "::",
1088 stringify!(fValue)
1089 )
1090 );
1091 }
1092 test_field_fValue();
1093 fn test_field_strValue() {
1094 assert_eq!(
1095 unsafe {
1096 let uninit = ::std::mem::MaybeUninit::<_LEAP_VARIANT__bindgen_ty_1>::uninit();
1097 let ptr = uninit.as_ptr();
1098 ::std::ptr::addr_of!((*ptr).strValue) as usize - ptr as usize
1099 },
1100 0usize,
1101 concat!(
1102 "Offset of field: ",
1103 stringify!(_LEAP_VARIANT__bindgen_ty_1),
1104 "::",
1105 stringify!(strValue)
1106 )
1107 );
1108 }
1109 test_field_strValue();
1110}
1111#[test]
1112fn bindgen_test_layout__LEAP_VARIANT() {
1113 assert_eq!(
1114 ::std::mem::size_of::<_LEAP_VARIANT>(),
1115 12usize,
1116 concat!("Size of: ", stringify!(_LEAP_VARIANT))
1117 );
1118 assert_eq!(
1119 ::std::mem::align_of::<_LEAP_VARIANT>(),
1120 1usize,
1121 concat!("Alignment of ", stringify!(_LEAP_VARIANT))
1122 );
1123 fn test_field_type() {
1124 assert_eq!(
1125 unsafe {
1126 let uninit = ::std::mem::MaybeUninit::<_LEAP_VARIANT>::uninit();
1127 let ptr = uninit.as_ptr();
1128 ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize
1129 },
1130 0usize,
1131 concat!(
1132 "Offset of field: ",
1133 stringify!(_LEAP_VARIANT),
1134 "::",
1135 stringify!(type_)
1136 )
1137 );
1138 }
1139 test_field_type();
1140}
1141#[doc = " \\ingroup Structs"]
1142#[doc = " A variant data type used to get and set service configuration values."]
1143#[doc = " @since 3.0.0"]
1144pub type LEAP_VARIANT = _LEAP_VARIANT;
1145#[doc = " \\ingroup Structs"]
1146#[doc = " Contains the response to a configuration value request."]
1147#[doc = " Call LeapRequestConfigValue() to request a service config value. The value is"]
1148#[doc = " fetched asynchronously since it requires a service transaction. LeapPollConnection()"]
1149#[doc = " returns this event structure when the request has been processed. Use the requestID"]
1150#[doc = " value to correlate the response to the originating request."]
1151#[doc = " @since 3.0.0"]
1152#[repr(C, packed)]
1153#[derive(Copy, Clone)]
1154pub struct _LEAP_CONFIG_RESPONSE_EVENT {
1155 #[doc = " An identifier for correlating the request and response. @since 3.0.0"]
1156 pub requestID: u32,
1157 #[doc = " The configuration value retrieved from the service. Do not free any memory pointed to by"]
1158 #[doc = " this member. The value held is only valid until the next call to LeapPollConnection()."]
1159 #[doc = " @since 3.0.0"]
1160 pub value: LEAP_VARIANT,
1161}
1162#[test]
1163fn bindgen_test_layout__LEAP_CONFIG_RESPONSE_EVENT() {
1164 assert_eq!(
1165 ::std::mem::size_of::<_LEAP_CONFIG_RESPONSE_EVENT>(),
1166 16usize,
1167 concat!("Size of: ", stringify!(_LEAP_CONFIG_RESPONSE_EVENT))
1168 );
1169 assert_eq!(
1170 ::std::mem::align_of::<_LEAP_CONFIG_RESPONSE_EVENT>(),
1171 1usize,
1172 concat!("Alignment of ", stringify!(_LEAP_CONFIG_RESPONSE_EVENT))
1173 );
1174 fn test_field_requestID() {
1175 assert_eq!(
1176 unsafe {
1177 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONFIG_RESPONSE_EVENT>::uninit();
1178 let ptr = uninit.as_ptr();
1179 ::std::ptr::addr_of!((*ptr).requestID) as usize - ptr as usize
1180 },
1181 0usize,
1182 concat!(
1183 "Offset of field: ",
1184 stringify!(_LEAP_CONFIG_RESPONSE_EVENT),
1185 "::",
1186 stringify!(requestID)
1187 )
1188 );
1189 }
1190 test_field_requestID();
1191 fn test_field_value() {
1192 assert_eq!(
1193 unsafe {
1194 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONFIG_RESPONSE_EVENT>::uninit();
1195 let ptr = uninit.as_ptr();
1196 ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize
1197 },
1198 4usize,
1199 concat!(
1200 "Offset of field: ",
1201 stringify!(_LEAP_CONFIG_RESPONSE_EVENT),
1202 "::",
1203 stringify!(value)
1204 )
1205 );
1206 }
1207 test_field_value();
1208}
1209#[doc = " \\ingroup Structs"]
1210#[doc = " Contains the response to a configuration value request."]
1211#[doc = " Call LeapRequestConfigValue() to request a service config value. The value is"]
1212#[doc = " fetched asynchronously since it requires a service transaction. LeapPollConnection()"]
1213#[doc = " returns this event structure when the request has been processed. Use the requestID"]
1214#[doc = " value to correlate the response to the originating request."]
1215#[doc = " @since 3.0.0"]
1216pub type LEAP_CONFIG_RESPONSE_EVENT = _LEAP_CONFIG_RESPONSE_EVENT;
1217#[doc = " \\ingroup Structs"]
1218#[doc = " The result of a configuration change request. Contains a status of true for a"]
1219#[doc = " successful change."]
1220#[doc = " Call LeapSaveConfigValue() to request a service config change. The change is"]
1221#[doc = " performed asynchronously -- and may fail. LeapPollConnection()"]
1222#[doc = " returns this event structure when the request has been processed. Use the requestID"]
1223#[doc = " value to correlate the response to the originating request."]
1224#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1225#[doc = " @since 3.0.0"]
1226#[repr(C, packed)]
1227#[derive(Debug, Copy, Clone)]
1228pub struct _LEAP_CONFIG_CHANGE_EVENT {
1229 #[doc = " An identifier for correlating the request and response. @since 3.0.0"]
1230 pub requestID: u32,
1231 #[doc = " The result of the change operation: true on success; false on failure. @since 3.0.0"]
1232 pub status: bool,
1233}
1234#[test]
1235fn bindgen_test_layout__LEAP_CONFIG_CHANGE_EVENT() {
1236 assert_eq!(
1237 ::std::mem::size_of::<_LEAP_CONFIG_CHANGE_EVENT>(),
1238 5usize,
1239 concat!("Size of: ", stringify!(_LEAP_CONFIG_CHANGE_EVENT))
1240 );
1241 assert_eq!(
1242 ::std::mem::align_of::<_LEAP_CONFIG_CHANGE_EVENT>(),
1243 1usize,
1244 concat!("Alignment of ", stringify!(_LEAP_CONFIG_CHANGE_EVENT))
1245 );
1246 fn test_field_requestID() {
1247 assert_eq!(
1248 unsafe {
1249 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONFIG_CHANGE_EVENT>::uninit();
1250 let ptr = uninit.as_ptr();
1251 ::std::ptr::addr_of!((*ptr).requestID) as usize - ptr as usize
1252 },
1253 0usize,
1254 concat!(
1255 "Offset of field: ",
1256 stringify!(_LEAP_CONFIG_CHANGE_EVENT),
1257 "::",
1258 stringify!(requestID)
1259 )
1260 );
1261 }
1262 test_field_requestID();
1263 fn test_field_status() {
1264 assert_eq!(
1265 unsafe {
1266 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONFIG_CHANGE_EVENT>::uninit();
1267 let ptr = uninit.as_ptr();
1268 ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize
1269 },
1270 4usize,
1271 concat!(
1272 "Offset of field: ",
1273 stringify!(_LEAP_CONFIG_CHANGE_EVENT),
1274 "::",
1275 stringify!(status)
1276 )
1277 );
1278 }
1279 test_field_status();
1280}
1281#[doc = " \\ingroup Structs"]
1282#[doc = " The result of a configuration change request. Contains a status of true for a"]
1283#[doc = " successful change."]
1284#[doc = " Call LeapSaveConfigValue() to request a service config change. The change is"]
1285#[doc = " performed asynchronously -- and may fail. LeapPollConnection()"]
1286#[doc = " returns this event structure when the request has been processed. Use the requestID"]
1287#[doc = " value to correlate the response to the originating request."]
1288#[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1289#[doc = " @since 3.0.0"]
1290pub type LEAP_CONFIG_CHANGE_EVENT = _LEAP_CONFIG_CHANGE_EVENT;
1291extern "C" {
1292 #[doc = " \\ingroup Functions"]
1293 #[doc = " Causes the client to commit a configuration change to the Ultraleap Tracking Service."]
1294 #[doc = ""]
1295 #[doc = " The change is performed asynchronously -- and may fail. LeapPollConnection()"]
1296 #[doc = " returns this event structure when the request has been processed. Use the pRequestID"]
1297 #[doc = " value to correlate the response to the originating request."]
1298 #[doc = ""]
1299 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
1300 #[doc = " @param key The key of the configuration to commit."]
1301 #[doc = " @param value The value of the configuration to commit."]
1302 #[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."]
1303 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1304 #[doc = " @since 3.0.0"]
1305 pub fn LeapSaveConfigValue(
1306 hConnection: LEAP_CONNECTION,
1307 key: *const ::std::os::raw::c_char,
1308 value: *const LEAP_VARIANT,
1309 pRequestID: *mut u32,
1310 ) -> eLeapRS;
1311}
1312extern "C" {
1313 #[doc = " \\ingroup Functions"]
1314 #[doc = " Requests the current value of a service configuration setting."]
1315 #[doc = " The value is fetched asynchronously since it requires a service transaction. LeapPollConnection()"]
1316 #[doc = " returns this event structure when the request has been processed. Use the pRequestID"]
1317 #[doc = " value to correlate the response to the originating request."]
1318 #[doc = ""]
1319 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
1320 #[doc = " @param key The key of the configuration to request"]
1321 #[doc = " @param[out] pRequestID A pointer to a memory location to which the id for this request is written."]
1322 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1323 #[doc = " @since 3.0.0"]
1324 pub fn LeapRequestConfigValue(
1325 hConnection: LEAP_CONNECTION,
1326 key: *const ::std::os::raw::c_char,
1327 pRequestID: *mut u32,
1328 ) -> eLeapRS;
1329}
1330extern "C" {
1331 #[doc = " \\ingroup Functions"]
1332 #[doc = " Retrieves a list of Ultraleap Tracking camera devices currently attached to the system."]
1333 #[doc = ""]
1334 #[doc = " To get the number of connected devices, call this function with the pArray parameter"]
1335 #[doc = " set to null. The number of devices is written to the memory specified by pnArray."]
1336 #[doc = " Use the device count to create an array of LEAP_DEVICE_REF structs large enough to"]
1337 #[doc = " hold the number of connected devices. Finally, call LeapGetDeviceList() with this"]
1338 #[doc = " array and known count to get the list of Leap devices. A device must be opened with"]
1339 #[doc = " LeapOpenDevice() before device properties can be queried."]
1340 #[doc = ""]
1341 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
1342 #[doc = " @param[out] pArray A pointer to an array that LeapC fills with the device list."]
1343 #[doc = " @param[in,out] pnArray On input, set to the number of elements in pArray; on output,"]
1344 #[doc = " LeapC sets this to the number of valid device handles."]
1345 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1346 #[doc = " @since 3.0.0"]
1347 pub fn LeapGetDeviceList(
1348 hConnection: LEAP_CONNECTION,
1349 pArray: *mut LEAP_DEVICE_REF,
1350 pnArray: *mut u32,
1351 ) -> eLeapRS;
1352}
1353extern "C" {
1354 #[doc = " \\ingroup Functions"]
1355 #[doc = " Opens a device reference and retrieves a handle to the device."]
1356 #[doc = ""]
1357 #[doc = " To ensure resources are properly freed, users must call LeapCloseDevice()"]
1358 #[doc = " when finished with the device, even if the retrieved device has problems"]
1359 #[doc = " or cannot stream."]
1360 #[doc = ""]
1361 #[doc = " @param rDevice A device reference."]
1362 #[doc = " @param[out] phDevice A pointer that receives the opened device handle."]
1363 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1364 #[doc = " @since 3.0.0"]
1365 pub fn LeapOpenDevice(rDevice: LEAP_DEVICE_REF, phDevice: *mut LEAP_DEVICE) -> eLeapRS;
1366}
1367extern "C" {
1368 #[doc = " \\ingroup Functions"]
1369 #[doc = " For a multi-device aware client, sets the device to use in the context of"]
1370 #[doc = " non-\"Ex\" API functions which are logically device-specific but don't provide"]
1371 #[doc = " a device parameter."]
1372 #[doc = ""]
1373 #[doc = " Automatically subscribes to the specified device (see LeapSubscribeEvents()),"]
1374 #[doc = " and if \\p unsubscribeOthers is \\c true, then unsubscribes from all other devices"]
1375 #[doc = " as well (see LeapUnsubscribeEvents())."]
1376 #[doc = ""]
1377 #[doc = " Affects future invocations of the following functions:"]
1378 #[doc = " - LeapCameraMatrix()"]
1379 #[doc = " - LeapDistortionCoeffs()"]
1380 #[doc = " - LeapGetFrameSize()"]
1381 #[doc = " - LeapInterpolateFrame()"]
1382 #[doc = " - LeapInterpolateFrameFromTime()"]
1383 #[doc = " - LeapPixelToRectilinear()"]
1384 #[doc = " - LeapRectilinearToPixel()"]
1385 #[doc = ""]
1386 #[doc = " It is not necessary to call this function from a client that does not claim"]
1387 #[doc = " to be multi-device-aware (see ::eLeapConnectionConfig and"]
1388 #[doc = " ::LeapCreateConnection)."]
1389 #[doc = ""]
1390 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
1391 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
1392 #[doc = " @param unsubscribeOthers If \\c true, unsubscribe from all other devices."]
1393 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1394 #[doc = " @since 5.4.0"]
1395 pub fn LeapSetPrimaryDevice(
1396 hConnection: LEAP_CONNECTION,
1397 hDevice: LEAP_DEVICE,
1398 unsubscribeOthers: bool,
1399 ) -> eLeapRS;
1400}
1401extern "C" {
1402 #[doc = " \\ingroup Functions"]
1403 #[doc = " Subscribe to event messages based on device."]
1404 #[doc = ""]
1405 #[doc = " If events from multiple devices are being sent from a service, this function"]
1406 #[doc = " allows the client to receive events from the specified device. Clients that"]
1407 #[doc = " claim to be multi-device-aware (see ::eLeapConnectionConfig and"]
1408 #[doc = " ::LeapCreateConnection) must subscribe to a device to receive various"]
1409 #[doc = " device-specific events."]
1410 #[doc = ""]
1411 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
1412 #[doc = " @param hDevice A handle to the device for which events are desired."]
1413 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1414 #[doc = " @since 5.4.0"]
1415 pub fn LeapSubscribeEvents(hConnection: LEAP_CONNECTION, hDevice: LEAP_DEVICE) -> eLeapRS;
1416}
1417extern "C" {
1418 #[doc = " \\ingroup Functions"]
1419 #[doc = " Unsubscribe from event messages based on device."]
1420 #[doc = ""]
1421 #[doc = " If events from multiple devices are being sent from a service, this function"]
1422 #[doc = " prevents receiving further events from the specified device that had"]
1423 #[doc = " previously been enabled using a call to LeapSubscribeEvents()."]
1424 #[doc = ""]
1425 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
1426 #[doc = " @param hDevice A handle to the device for which events are desired."]
1427 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1428 #[doc = " @since 5.4.0"]
1429 pub fn LeapUnsubscribeEvents(hConnection: LEAP_CONNECTION, hDevice: LEAP_DEVICE) -> eLeapRS;
1430}
1431#[doc = " The device can send color images. @since 3.0.0"]
1432pub const eLeapDeviceCaps_eLeapDeviceCaps_Color: eLeapDeviceCaps = 1;
1433#[doc = " \\ingroup Enum"]
1434#[doc = " Flags enumerating Leap device capabilities. @since 3.0.0"]
1435pub type eLeapDeviceCaps = ::std::os::raw::c_int;
1436#[doc = " An unknown device that is compatible with the tracking software. @since 3.1.3"]
1437pub const _eLeapDevicePID_eLeapDevicePID_Unknown: _eLeapDevicePID = 0;
1438#[doc = " The Leap Motion Controller (the first consumer peripheral). @since 3.0.0"]
1439pub const _eLeapDevicePID_eLeapDevicePID_Peripheral: _eLeapDevicePID = 3;
1440#[doc = " Internal research product codename \"Dragonfly\". @since 3.0.0"]
1441pub const _eLeapDevicePID_eLeapDevicePID_Dragonfly: _eLeapDevicePID = 4354;
1442#[doc = " Internal research product codename \"Nightcrawler\". @since 3.0.0"]
1443pub const _eLeapDevicePID_eLeapDevicePID_Nightcrawler: _eLeapDevicePID = 4609;
1444#[doc = " Research product codename \"Rigel\". @since 4.0.0"]
1445pub const _eLeapDevicePID_eLeapDevicePID_Rigel: _eLeapDevicePID = 4610;
1446#[doc = " The Ultraleap Stereo IR 170 (SIR170) hand tracking module. @since 5.3.0"]
1447pub const _eLeapDevicePID_eLeapDevicePID_SIR170: _eLeapDevicePID = 4611;
1448#[doc = " The Ultraleap 3Di hand tracking camera. @since 5.3.0"]
1449pub const _eLeapDevicePID_eLeapDevicePID_3Di: _eLeapDevicePID = 4612;
1450#[doc = " An invalid device type. Not currently in use. @since 3.1.3"]
1451pub const _eLeapDevicePID_eLeapDevicePID_Invalid: _eLeapDevicePID = -1;
1452#[doc = " \\ingroup Enum"]
1453#[doc = " Device hardware types. @since 3.0.0"]
1454pub type _eLeapDevicePID = ::std::os::raw::c_int;
1455#[doc = " \\ingroup Enum"]
1456#[doc = " Device hardware types. @since 3.0.0"]
1457pub use self::_eLeapDevicePID as eLeapDevicePID;
1458#[doc = " \\ingroup Structs"]
1459#[doc = " Properties of a Leap device."]
1460#[doc = " Get a LEAP_DEVICE_INFO by calling LeapGetDeviceInfo() with the handle for"]
1461#[doc = " device. The device must be open."]
1462#[doc = " @since 3.0.0"]
1463#[repr(C, packed)]
1464#[derive(Debug, Copy, Clone)]
1465pub struct _LEAP_DEVICE_INFO {
1466 #[doc = " Size of this structure. @since 3.0.0"]
1467 pub size: u32,
1468 #[doc = " A combination of eLeapDeviceStatus flags. @since 3.0.0"]
1469 pub status: u32,
1470 #[doc = " A combination of eLeapDeviceCaps flags. @since 3.0.0"]
1471 pub caps: u32,
1472 #[doc = " One of the eLeapDevicePID members. @since 3.0.0"]
1473 pub pid: eLeapDevicePID,
1474 #[doc = " The device baseline, in micrometers."]
1475 #[doc = ""]
1476 #[doc = " The baseline is defined as the distance between the center axis of each lens in a stereo camera"]
1477 #[doc = " system. For other camera systems, this value is set to zero."]
1478 #[doc = " @since 3.0.0"]
1479 pub baseline: u32,
1480 #[doc = " The required length of the serial number char buffer including the null character. @since 3.0.0"]
1481 pub serial_length: u32,
1482 #[doc = " A pointer to the null-terminated device serial number string. @since 3.0.0"]
1483 pub serial: *mut ::std::os::raw::c_char,
1484 #[doc = " The horizontal field of view of this device in radians. @since 3.0.0"]
1485 pub h_fov: f32,
1486 #[doc = " The vertical field of view of this device in radians. @since 3.0.0"]
1487 pub v_fov: f32,
1488 #[doc = " The maximum range for this device, in micrometers. @since 3.0.0"]
1489 pub range: u32,
1490}
1491#[test]
1492fn bindgen_test_layout__LEAP_DEVICE_INFO() {
1493 assert_eq!(
1494 ::std::mem::size_of::<_LEAP_DEVICE_INFO>(),
1495 44usize,
1496 concat!("Size of: ", stringify!(_LEAP_DEVICE_INFO))
1497 );
1498 assert_eq!(
1499 ::std::mem::align_of::<_LEAP_DEVICE_INFO>(),
1500 1usize,
1501 concat!("Alignment of ", stringify!(_LEAP_DEVICE_INFO))
1502 );
1503 fn test_field_size() {
1504 assert_eq!(
1505 unsafe {
1506 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1507 let ptr = uninit.as_ptr();
1508 ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize
1509 },
1510 0usize,
1511 concat!(
1512 "Offset of field: ",
1513 stringify!(_LEAP_DEVICE_INFO),
1514 "::",
1515 stringify!(size)
1516 )
1517 );
1518 }
1519 test_field_size();
1520 fn test_field_status() {
1521 assert_eq!(
1522 unsafe {
1523 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1524 let ptr = uninit.as_ptr();
1525 ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize
1526 },
1527 4usize,
1528 concat!(
1529 "Offset of field: ",
1530 stringify!(_LEAP_DEVICE_INFO),
1531 "::",
1532 stringify!(status)
1533 )
1534 );
1535 }
1536 test_field_status();
1537 fn test_field_caps() {
1538 assert_eq!(
1539 unsafe {
1540 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1541 let ptr = uninit.as_ptr();
1542 ::std::ptr::addr_of!((*ptr).caps) as usize - ptr as usize
1543 },
1544 8usize,
1545 concat!(
1546 "Offset of field: ",
1547 stringify!(_LEAP_DEVICE_INFO),
1548 "::",
1549 stringify!(caps)
1550 )
1551 );
1552 }
1553 test_field_caps();
1554 fn test_field_pid() {
1555 assert_eq!(
1556 unsafe {
1557 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1558 let ptr = uninit.as_ptr();
1559 ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize
1560 },
1561 12usize,
1562 concat!(
1563 "Offset of field: ",
1564 stringify!(_LEAP_DEVICE_INFO),
1565 "::",
1566 stringify!(pid)
1567 )
1568 );
1569 }
1570 test_field_pid();
1571 fn test_field_baseline() {
1572 assert_eq!(
1573 unsafe {
1574 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1575 let ptr = uninit.as_ptr();
1576 ::std::ptr::addr_of!((*ptr).baseline) as usize - ptr as usize
1577 },
1578 16usize,
1579 concat!(
1580 "Offset of field: ",
1581 stringify!(_LEAP_DEVICE_INFO),
1582 "::",
1583 stringify!(baseline)
1584 )
1585 );
1586 }
1587 test_field_baseline();
1588 fn test_field_serial_length() {
1589 assert_eq!(
1590 unsafe {
1591 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1592 let ptr = uninit.as_ptr();
1593 ::std::ptr::addr_of!((*ptr).serial_length) as usize - ptr as usize
1594 },
1595 20usize,
1596 concat!(
1597 "Offset of field: ",
1598 stringify!(_LEAP_DEVICE_INFO),
1599 "::",
1600 stringify!(serial_length)
1601 )
1602 );
1603 }
1604 test_field_serial_length();
1605 fn test_field_serial() {
1606 assert_eq!(
1607 unsafe {
1608 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1609 let ptr = uninit.as_ptr();
1610 ::std::ptr::addr_of!((*ptr).serial) as usize - ptr as usize
1611 },
1612 24usize,
1613 concat!(
1614 "Offset of field: ",
1615 stringify!(_LEAP_DEVICE_INFO),
1616 "::",
1617 stringify!(serial)
1618 )
1619 );
1620 }
1621 test_field_serial();
1622 fn test_field_h_fov() {
1623 assert_eq!(
1624 unsafe {
1625 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1626 let ptr = uninit.as_ptr();
1627 ::std::ptr::addr_of!((*ptr).h_fov) as usize - ptr as usize
1628 },
1629 32usize,
1630 concat!(
1631 "Offset of field: ",
1632 stringify!(_LEAP_DEVICE_INFO),
1633 "::",
1634 stringify!(h_fov)
1635 )
1636 );
1637 }
1638 test_field_h_fov();
1639 fn test_field_v_fov() {
1640 assert_eq!(
1641 unsafe {
1642 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1643 let ptr = uninit.as_ptr();
1644 ::std::ptr::addr_of!((*ptr).v_fov) as usize - ptr as usize
1645 },
1646 36usize,
1647 concat!(
1648 "Offset of field: ",
1649 stringify!(_LEAP_DEVICE_INFO),
1650 "::",
1651 stringify!(v_fov)
1652 )
1653 );
1654 }
1655 test_field_v_fov();
1656 fn test_field_range() {
1657 assert_eq!(
1658 unsafe {
1659 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_INFO>::uninit();
1660 let ptr = uninit.as_ptr();
1661 ::std::ptr::addr_of!((*ptr).range) as usize - ptr as usize
1662 },
1663 40usize,
1664 concat!(
1665 "Offset of field: ",
1666 stringify!(_LEAP_DEVICE_INFO),
1667 "::",
1668 stringify!(range)
1669 )
1670 );
1671 }
1672 test_field_range();
1673}
1674#[doc = " \\ingroup Structs"]
1675#[doc = " Properties of a Leap device."]
1676#[doc = " Get a LEAP_DEVICE_INFO by calling LeapGetDeviceInfo() with the handle for"]
1677#[doc = " device. The device must be open."]
1678#[doc = " @since 3.0.0"]
1679pub type LEAP_DEVICE_INFO = _LEAP_DEVICE_INFO;
1680extern "C" {
1681 #[doc = " \\ingroup Functions"]
1682 #[doc = " Gets device properties."]
1683 #[doc = ""]
1684 #[doc = " To get the device serial number, you must supply a LEAP_DEVICE_INFO struct whose"]
1685 #[doc = " serial member points to a char array large enough to hold the null-terminated"]
1686 #[doc = " serial number string. To get the required length, call LeapGetDeviceInfo() using"]
1687 #[doc = " a LEAP_DEVICE_INFO struct that has serial set to NULL. LeapC sets serial_length field of"]
1688 #[doc = " the struct to the required length. You can then allocate memory for the string,"]
1689 #[doc = " set the serial field, and call this function again."]
1690 #[doc = ""]
1691 #[doc = " @param hDevice A handle to the device to be queried."]
1692 #[doc = " @param[out] info The struct to receive the device property data."]
1693 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1694 #[doc = " @since 3.0.0"]
1695 pub fn LeapGetDeviceInfo(hDevice: LEAP_DEVICE, info: *mut LEAP_DEVICE_INFO) -> eLeapRS;
1696}
1697extern "C" {
1698 #[doc = " \\ingroup Functions"]
1699 #[doc = " Get the transform to world coordinates from 3D Leap coordinates."]
1700 #[doc = ""]
1701 #[doc = " To get the transform, you must supply an array of 16 elements."]
1702 #[doc = ""]
1703 #[doc = " The function will return a an array representing a 4 x 4 matrix of the form:"]
1704 #[doc = ""]
1705 #[doc = " R, t"]
1706 #[doc = " 0, 1"]
1707 #[doc = ""]
1708 #[doc = " where:"]
1709 #[doc = " R is a 3 x 3 rotation matrix"]
1710 #[doc = " t is a 3 x 1 translation vector"]
1711 #[doc = ""]
1712 #[doc = " Note that the matrix is in column major, e.g. transform[12] corresponds to the x coordinate of the"]
1713 #[doc = " translation vector t."]
1714 #[doc = ""]
1715 #[doc = " A possible pipeline would be, for example:"]
1716 #[doc = " 1) Get \"palm_pos\" the position of the center of the palm (as a 3x1 vector)"]
1717 #[doc = " 2) Construct a 4x1 vector using the palm_position: palm_pos_4 = (palm_pos.x; palm_pos.y; palm_pos.z; 1.0f)"]
1718 #[doc = " 3) Create a 4x4 matrix \"trans_mat\" as illustrated above using the returned transform"]
1719 #[doc = " 4) Get the position of the center of the palm in world coordinates by multiplying trans_mat and palm_pos_4:"]
1720 #[doc = " center_world_4 = trans_mat * palm_pos_4"]
1721 #[doc = ""]
1722 #[doc = " This function returns eLeapRS_Unsupported in the case where this functionality is not yet supported."]
1723 #[doc = ""]
1724 #[doc = " @param hDevice A handle to the device to be queried."]
1725 #[doc = " @param[out] transform A pointer to a single-precision float array of size 16, containing"]
1726 #[doc = " the coefficients of the 4x4 matrix in Column Major order."]
1727 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
1728 #[doc = " @since 5.4.0"]
1729 pub fn LeapGetDeviceTransform(hDevice: LEAP_DEVICE, transform: *mut f32) -> eLeapRS;
1730}
1731#[doc = " \\ingroup Structs"]
1732#[doc = " Device event information."]
1733#[doc = ""]
1734#[doc = " LeapPollConnection() produces a message containing this event when a new"]
1735#[doc = " device is detected. You can use the handle provided by the device filed to"]
1736#[doc = " open a device so that you can access its properties."]
1737#[doc = " @since 3.0.0"]
1738#[repr(C, packed)]
1739#[derive(Debug, Copy, Clone)]
1740pub struct _LEAP_DEVICE_EVENT {
1741 #[doc = " Reserved for future use. @since 3.0.0"]
1742 pub flags: u32,
1743 #[doc = " The handle reference of to the newly attached device. @since 3.0.0"]
1744 pub device: LEAP_DEVICE_REF,
1745 #[doc = " The status of the connected device. A combination of flags from the eLeapDeviceStatus collection."]
1746 pub status: u32,
1747}
1748#[test]
1749fn bindgen_test_layout__LEAP_DEVICE_EVENT() {
1750 assert_eq!(
1751 ::std::mem::size_of::<_LEAP_DEVICE_EVENT>(),
1752 20usize,
1753 concat!("Size of: ", stringify!(_LEAP_DEVICE_EVENT))
1754 );
1755 assert_eq!(
1756 ::std::mem::align_of::<_LEAP_DEVICE_EVENT>(),
1757 1usize,
1758 concat!("Alignment of ", stringify!(_LEAP_DEVICE_EVENT))
1759 );
1760 fn test_field_flags() {
1761 assert_eq!(
1762 unsafe {
1763 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_EVENT>::uninit();
1764 let ptr = uninit.as_ptr();
1765 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize
1766 },
1767 0usize,
1768 concat!(
1769 "Offset of field: ",
1770 stringify!(_LEAP_DEVICE_EVENT),
1771 "::",
1772 stringify!(flags)
1773 )
1774 );
1775 }
1776 test_field_flags();
1777 fn test_field_device() {
1778 assert_eq!(
1779 unsafe {
1780 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_EVENT>::uninit();
1781 let ptr = uninit.as_ptr();
1782 ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize
1783 },
1784 4usize,
1785 concat!(
1786 "Offset of field: ",
1787 stringify!(_LEAP_DEVICE_EVENT),
1788 "::",
1789 stringify!(device)
1790 )
1791 );
1792 }
1793 test_field_device();
1794 fn test_field_status() {
1795 assert_eq!(
1796 unsafe {
1797 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_EVENT>::uninit();
1798 let ptr = uninit.as_ptr();
1799 ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize
1800 },
1801 16usize,
1802 concat!(
1803 "Offset of field: ",
1804 stringify!(_LEAP_DEVICE_EVENT),
1805 "::",
1806 stringify!(status)
1807 )
1808 );
1809 }
1810 test_field_status();
1811}
1812#[doc = " \\ingroup Structs"]
1813#[doc = " Device event information."]
1814#[doc = ""]
1815#[doc = " LeapPollConnection() produces a message containing this event when a new"]
1816#[doc = " device is detected. You can use the handle provided by the device filed to"]
1817#[doc = " open a device so that you can access its properties."]
1818#[doc = " @since 3.0.0"]
1819pub type LEAP_DEVICE_EVENT = _LEAP_DEVICE_EVENT;
1820#[doc = " The device is sending out frames. @since 3.0.0"]
1821pub const _eLeapDeviceStatus_eLeapDeviceStatus_Streaming: _eLeapDeviceStatus = 1;
1822#[doc = " Device streaming has been paused. @since 3.0.0"]
1823pub const _eLeapDeviceStatus_eLeapDeviceStatus_Paused: _eLeapDeviceStatus = 2;
1824#[doc = " There are known sources of infrared interference. Device has transitioned to"]
1825#[doc = " robust mode in order to compensate. @since 3.1.3"]
1826pub const _eLeapDeviceStatus_eLeapDeviceStatus_Robust: _eLeapDeviceStatus = 4;
1827#[doc = " The device's window is smudged, tracking may be degraded. @since 3.1.3"]
1828pub const _eLeapDeviceStatus_eLeapDeviceStatus_Smudged: _eLeapDeviceStatus = 8;
1829#[doc = " The device has entered low-resource mode. @since 4.0.0"]
1830pub const _eLeapDeviceStatus_eLeapDeviceStatus_LowResource: _eLeapDeviceStatus = 16;
1831#[doc = " The device has failed, but the failure reason is not known. @since 3.0.0"]
1832pub const _eLeapDeviceStatus_eLeapDeviceStatus_UnknownFailure: _eLeapDeviceStatus = -402587648;
1833#[doc = " The device has a bad calibration record and cannot send frames. @since 3.0.0"]
1834pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadCalibration: _eLeapDeviceStatus = -402587647;
1835#[doc = " The device reports corrupt firmware or cannot install a required firmware update. @since 3.0.0"]
1836pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadFirmware: _eLeapDeviceStatus = -402587646;
1837#[doc = " The device USB connection is faulty. @since 3.0.0"]
1838pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadTransport: _eLeapDeviceStatus = -402587645;
1839#[doc = " The device USB control interfaces failed to initialize. @since 3.0.0"]
1840pub const _eLeapDeviceStatus_eLeapDeviceStatus_BadControl: _eLeapDeviceStatus = -402587644;
1841#[doc = " \\ingroup Enum"]
1842#[doc = " Enumerates the device status codes."]
1843#[doc = " @since 3.0.0"]
1844pub type _eLeapDeviceStatus = ::std::os::raw::c_int;
1845#[doc = " \\ingroup Enum"]
1846#[doc = " Enumerates the device status codes."]
1847#[doc = " @since 3.0.0"]
1848pub use self::_eLeapDeviceStatus as eLeapDeviceStatus;
1849#[doc = " \\ingroup Structs"]
1850#[doc = " Device failure information."]
1851#[doc = " LeapPollConnection() produces a message containing this event when a"]
1852#[doc = " device fails. Only partial information may be available. If hDevice is"]
1853#[doc = " non-null, then you can use it to identify the failed device with a known,"]
1854#[doc = " open device."]
1855#[doc = " @since 3.0.0"]
1856#[repr(C, packed)]
1857#[derive(Debug, Copy, Clone)]
1858pub struct _LEAP_DEVICE_FAILURE_EVENT {
1859 #[doc = " The status of this failure event. @since 3.0.0"]
1860 pub status: eLeapDeviceStatus,
1861 #[doc = " A handle to the device generating this failure event, if available, otherwise NULL."]
1862 #[doc = ""]
1863 #[doc = " You are not responsible for closing this handle."]
1864 #[doc = " @since 3.0.0"]
1865 pub hDevice: LEAP_DEVICE,
1866}
1867#[test]
1868fn bindgen_test_layout__LEAP_DEVICE_FAILURE_EVENT() {
1869 assert_eq!(
1870 ::std::mem::size_of::<_LEAP_DEVICE_FAILURE_EVENT>(),
1871 12usize,
1872 concat!("Size of: ", stringify!(_LEAP_DEVICE_FAILURE_EVENT))
1873 );
1874 assert_eq!(
1875 ::std::mem::align_of::<_LEAP_DEVICE_FAILURE_EVENT>(),
1876 1usize,
1877 concat!("Alignment of ", stringify!(_LEAP_DEVICE_FAILURE_EVENT))
1878 );
1879 fn test_field_status() {
1880 assert_eq!(
1881 unsafe {
1882 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_FAILURE_EVENT>::uninit();
1883 let ptr = uninit.as_ptr();
1884 ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize
1885 },
1886 0usize,
1887 concat!(
1888 "Offset of field: ",
1889 stringify!(_LEAP_DEVICE_FAILURE_EVENT),
1890 "::",
1891 stringify!(status)
1892 )
1893 );
1894 }
1895 test_field_status();
1896 fn test_field_hDevice() {
1897 assert_eq!(
1898 unsafe {
1899 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_FAILURE_EVENT>::uninit();
1900 let ptr = uninit.as_ptr();
1901 ::std::ptr::addr_of!((*ptr).hDevice) as usize - ptr as usize
1902 },
1903 4usize,
1904 concat!(
1905 "Offset of field: ",
1906 stringify!(_LEAP_DEVICE_FAILURE_EVENT),
1907 "::",
1908 stringify!(hDevice)
1909 )
1910 );
1911 }
1912 test_field_hDevice();
1913}
1914#[doc = " \\ingroup Structs"]
1915#[doc = " Device failure information."]
1916#[doc = " LeapPollConnection() produces a message containing this event when a"]
1917#[doc = " device fails. Only partial information may be available. If hDevice is"]
1918#[doc = " non-null, then you can use it to identify the failed device with a known,"]
1919#[doc = " open device."]
1920#[doc = " @since 3.0.0"]
1921pub type LEAP_DEVICE_FAILURE_EVENT = _LEAP_DEVICE_FAILURE_EVENT;
1922#[doc = " \\ingroup Structs"]
1923#[doc = " Identifying information for a frame of tracking data. @since 3.0.0"]
1924#[repr(C, packed)]
1925#[derive(Debug, Copy, Clone)]
1926pub struct _LEAP_FRAME_HEADER {
1927 #[doc = " Reserved, set to zero. @since 3.0.0"]
1928 pub reserved: *mut ::std::os::raw::c_void,
1929 #[doc = " A unique identifier for this frame"]
1930 #[doc = ""]
1931 #[doc = " All frames carrying this frame ID are part of the same unit of processing. This counter"]
1932 #[doc = " is generally an increasing counter, but may reset to another value if the user stops and"]
1933 #[doc = " restarts streaming."]
1934 #[doc = ""]
1935 #[doc = " For interpolated frames, this value corresponds to the identifier of the frame upper bound."]
1936 #[doc = " @since 3.0.0"]
1937 pub frame_id: i64,
1938 #[doc = " The timestamp for this image, in microseconds, referenced against LeapGetNow()."]
1939 #[doc = " @since 3.0.0"]
1940 pub timestamp: i64,
1941}
1942#[test]
1943fn bindgen_test_layout__LEAP_FRAME_HEADER() {
1944 assert_eq!(
1945 ::std::mem::size_of::<_LEAP_FRAME_HEADER>(),
1946 24usize,
1947 concat!("Size of: ", stringify!(_LEAP_FRAME_HEADER))
1948 );
1949 assert_eq!(
1950 ::std::mem::align_of::<_LEAP_FRAME_HEADER>(),
1951 1usize,
1952 concat!("Alignment of ", stringify!(_LEAP_FRAME_HEADER))
1953 );
1954 fn test_field_reserved() {
1955 assert_eq!(
1956 unsafe {
1957 let uninit = ::std::mem::MaybeUninit::<_LEAP_FRAME_HEADER>::uninit();
1958 let ptr = uninit.as_ptr();
1959 ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize
1960 },
1961 0usize,
1962 concat!(
1963 "Offset of field: ",
1964 stringify!(_LEAP_FRAME_HEADER),
1965 "::",
1966 stringify!(reserved)
1967 )
1968 );
1969 }
1970 test_field_reserved();
1971 fn test_field_frame_id() {
1972 assert_eq!(
1973 unsafe {
1974 let uninit = ::std::mem::MaybeUninit::<_LEAP_FRAME_HEADER>::uninit();
1975 let ptr = uninit.as_ptr();
1976 ::std::ptr::addr_of!((*ptr).frame_id) as usize - ptr as usize
1977 },
1978 8usize,
1979 concat!(
1980 "Offset of field: ",
1981 stringify!(_LEAP_FRAME_HEADER),
1982 "::",
1983 stringify!(frame_id)
1984 )
1985 );
1986 }
1987 test_field_frame_id();
1988 fn test_field_timestamp() {
1989 assert_eq!(
1990 unsafe {
1991 let uninit = ::std::mem::MaybeUninit::<_LEAP_FRAME_HEADER>::uninit();
1992 let ptr = uninit.as_ptr();
1993 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
1994 },
1995 16usize,
1996 concat!(
1997 "Offset of field: ",
1998 stringify!(_LEAP_FRAME_HEADER),
1999 "::",
2000 stringify!(timestamp)
2001 )
2002 );
2003 }
2004 test_field_timestamp();
2005}
2006#[doc = " \\ingroup Structs"]
2007#[doc = " Identifying information for a frame of tracking data. @since 3.0.0"]
2008pub type LEAP_FRAME_HEADER = _LEAP_FRAME_HEADER;
2009#[doc = " An invalid or unknown type. @since 3.0.0"]
2010pub const _eLeapImageType_eLeapImageType_UNKNOWN: _eLeapImageType = 0;
2011#[doc = " Default, processed IR images. @since 3.0.0"]
2012pub const _eLeapImageType_eLeapImageType_Default: _eLeapImageType = 1;
2013#[doc = " Raw images from the device. @since 3.0.0"]
2014pub const _eLeapImageType_eLeapImageType_Raw: _eLeapImageType = 2;
2015#[doc = " \\ingroup Enum"]
2016#[doc = " Functional image types (not data formats)."]
2017pub type _eLeapImageType = ::std::os::raw::c_int;
2018#[doc = " \\ingroup Enum"]
2019#[doc = " Functional image types (not data formats)."]
2020pub use self::_eLeapImageType as eLeapImageType;
2021#[doc = " An invalid or unknown format. @since 3.0.0"]
2022pub const _eLeapImageFormat_eLeapImageFormat_UNKNOWN: _eLeapImageFormat = 0;
2023#[doc = " An infrared image. @since 3.0.0"]
2024pub const _eLeapImageFormat_eLeapImageFormat_IR: _eLeapImageFormat = 3240521;
2025#[doc = " A Bayer RGBIr image with uncorrected RGB channels. @since 3.0.0"]
2026pub const _eLeapImageFormat_eLeapImageFormat_RGBIr_Bayer: _eLeapImageFormat = 1229083207;
2027#[doc = " \\ingroup Enum"]
2028#[doc = " Image formats."]
2029#[doc = " @since 3.0.0"]
2030pub type _eLeapImageFormat = ::std::os::raw::c_int;
2031#[doc = " \\ingroup Enum"]
2032#[doc = " Image formats."]
2033#[doc = " @since 3.0.0"]
2034pub use self::_eLeapImageFormat as eLeapImageFormat;
2035#[doc = " An unknown or invalid type. @since 3.0.0"]
2036pub const _eLeapPerspectiveType_eLeapPerspectiveType_invalid: _eLeapPerspectiveType = 0;
2037#[doc = " A canonically left image. @since 3.0.0"]
2038pub const _eLeapPerspectiveType_eLeapPerspectiveType_stereo_left: _eLeapPerspectiveType = 1;
2039#[doc = " A canonically right image. @since 3.0.0"]
2040pub const _eLeapPerspectiveType_eLeapPerspectiveType_stereo_right: _eLeapPerspectiveType = 2;
2041#[doc = " Reserved for future use. @since 3.0.0"]
2042pub const _eLeapPerspectiveType_eLeapPerspectiveType_mono: _eLeapPerspectiveType = 3;
2043#[doc = " \\ingroup Enum"]
2044#[doc = " Camera perspective types."]
2045#[doc = " @since 3.0.0"]
2046pub type _eLeapPerspectiveType = ::std::os::raw::c_int;
2047#[doc = " \\ingroup Enum"]
2048#[doc = " Camera perspective types."]
2049#[doc = " @since 3.0.0"]
2050pub use self::_eLeapPerspectiveType as eLeapPerspectiveType;
2051#[doc = " Infrared calibration (default). @since 4.1.0"]
2052pub const _eLeapCameraCalibrationType_eLeapCameraCalibrationType_infrared:
2053 _eLeapCameraCalibrationType = 0;
2054#[doc = " Visual calibration. @since 4.1.0"]
2055pub const _eLeapCameraCalibrationType_eLeapCameraCalibrationType_visual:
2056 _eLeapCameraCalibrationType = 1;
2057#[doc = " \\ingroup Enum"]
2058#[doc = " Camera calibration types."]
2059#[doc = " @since 3.0.0"]
2060pub type _eLeapCameraCalibrationType = ::std::os::raw::c_int;
2061#[doc = " \\ingroup Enum"]
2062#[doc = " Camera calibration types."]
2063#[doc = " @since 3.0.0"]
2064pub use self::_eLeapCameraCalibrationType as eLeapCameraCalibrationType;
2065#[doc = " \\ingroup Structs"]
2066#[doc = " Properties of a sensor image."]
2067#[doc = " @since 3.0.0"]
2068#[repr(C, packed)]
2069#[derive(Debug, Copy, Clone)]
2070pub struct _LEAP_IMAGE_PROPERTIES {
2071 #[doc = " The type of this image. @since 3.0.0"]
2072 pub type_: eLeapImageType,
2073 #[doc = " The format of this image. @since 3.0.0"]
2074 pub format: eLeapImageFormat,
2075 #[doc = " The number of bytes per image pixel. @since 3.0.0"]
2076 pub bpp: u32,
2077 #[doc = " The number of horizontal pixels in the image. @since 3.0.0"]
2078 pub width: u32,
2079 #[doc = " The number of rows of pixels in the image. @since 3.0.0"]
2080 pub height: u32,
2081 #[doc = " Reserved for future use. @since 3.0.0"]
2082 pub x_scale: f32,
2083 #[doc = " Reserved for future use. @since 3.0.0"]
2084 pub y_scale: f32,
2085 #[doc = " Reserved for future use. @since 3.0.0"]
2086 pub x_offset: f32,
2087 #[doc = " Reserved for future use. @since 3.0.0"]
2088 pub y_offset: f32,
2089}
2090#[test]
2091fn bindgen_test_layout__LEAP_IMAGE_PROPERTIES() {
2092 assert_eq!(
2093 ::std::mem::size_of::<_LEAP_IMAGE_PROPERTIES>(),
2094 36usize,
2095 concat!("Size of: ", stringify!(_LEAP_IMAGE_PROPERTIES))
2096 );
2097 assert_eq!(
2098 ::std::mem::align_of::<_LEAP_IMAGE_PROPERTIES>(),
2099 1usize,
2100 concat!("Alignment of ", stringify!(_LEAP_IMAGE_PROPERTIES))
2101 );
2102 fn test_field_type() {
2103 assert_eq!(
2104 unsafe {
2105 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2106 let ptr = uninit.as_ptr();
2107 ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize
2108 },
2109 0usize,
2110 concat!(
2111 "Offset of field: ",
2112 stringify!(_LEAP_IMAGE_PROPERTIES),
2113 "::",
2114 stringify!(type_)
2115 )
2116 );
2117 }
2118 test_field_type();
2119 fn test_field_format() {
2120 assert_eq!(
2121 unsafe {
2122 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2123 let ptr = uninit.as_ptr();
2124 ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize
2125 },
2126 4usize,
2127 concat!(
2128 "Offset of field: ",
2129 stringify!(_LEAP_IMAGE_PROPERTIES),
2130 "::",
2131 stringify!(format)
2132 )
2133 );
2134 }
2135 test_field_format();
2136 fn test_field_bpp() {
2137 assert_eq!(
2138 unsafe {
2139 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2140 let ptr = uninit.as_ptr();
2141 ::std::ptr::addr_of!((*ptr).bpp) as usize - ptr as usize
2142 },
2143 8usize,
2144 concat!(
2145 "Offset of field: ",
2146 stringify!(_LEAP_IMAGE_PROPERTIES),
2147 "::",
2148 stringify!(bpp)
2149 )
2150 );
2151 }
2152 test_field_bpp();
2153 fn test_field_width() {
2154 assert_eq!(
2155 unsafe {
2156 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2157 let ptr = uninit.as_ptr();
2158 ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize
2159 },
2160 12usize,
2161 concat!(
2162 "Offset of field: ",
2163 stringify!(_LEAP_IMAGE_PROPERTIES),
2164 "::",
2165 stringify!(width)
2166 )
2167 );
2168 }
2169 test_field_width();
2170 fn test_field_height() {
2171 assert_eq!(
2172 unsafe {
2173 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2174 let ptr = uninit.as_ptr();
2175 ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize
2176 },
2177 16usize,
2178 concat!(
2179 "Offset of field: ",
2180 stringify!(_LEAP_IMAGE_PROPERTIES),
2181 "::",
2182 stringify!(height)
2183 )
2184 );
2185 }
2186 test_field_height();
2187 fn test_field_x_scale() {
2188 assert_eq!(
2189 unsafe {
2190 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2191 let ptr = uninit.as_ptr();
2192 ::std::ptr::addr_of!((*ptr).x_scale) as usize - ptr as usize
2193 },
2194 20usize,
2195 concat!(
2196 "Offset of field: ",
2197 stringify!(_LEAP_IMAGE_PROPERTIES),
2198 "::",
2199 stringify!(x_scale)
2200 )
2201 );
2202 }
2203 test_field_x_scale();
2204 fn test_field_y_scale() {
2205 assert_eq!(
2206 unsafe {
2207 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2208 let ptr = uninit.as_ptr();
2209 ::std::ptr::addr_of!((*ptr).y_scale) as usize - ptr as usize
2210 },
2211 24usize,
2212 concat!(
2213 "Offset of field: ",
2214 stringify!(_LEAP_IMAGE_PROPERTIES),
2215 "::",
2216 stringify!(y_scale)
2217 )
2218 );
2219 }
2220 test_field_y_scale();
2221 fn test_field_x_offset() {
2222 assert_eq!(
2223 unsafe {
2224 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2225 let ptr = uninit.as_ptr();
2226 ::std::ptr::addr_of!((*ptr).x_offset) as usize - ptr as usize
2227 },
2228 28usize,
2229 concat!(
2230 "Offset of field: ",
2231 stringify!(_LEAP_IMAGE_PROPERTIES),
2232 "::",
2233 stringify!(x_offset)
2234 )
2235 );
2236 }
2237 test_field_x_offset();
2238 fn test_field_y_offset() {
2239 assert_eq!(
2240 unsafe {
2241 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_PROPERTIES>::uninit();
2242 let ptr = uninit.as_ptr();
2243 ::std::ptr::addr_of!((*ptr).y_offset) as usize - ptr as usize
2244 },
2245 32usize,
2246 concat!(
2247 "Offset of field: ",
2248 stringify!(_LEAP_IMAGE_PROPERTIES),
2249 "::",
2250 stringify!(y_offset)
2251 )
2252 );
2253 }
2254 test_field_y_offset();
2255}
2256#[doc = " \\ingroup Structs"]
2257#[doc = " Properties of a sensor image."]
2258#[doc = " @since 3.0.0"]
2259pub type LEAP_IMAGE_PROPERTIES = _LEAP_IMAGE_PROPERTIES;
2260#[doc = " \\ingroup Structs"]
2261#[doc = " A matrix containing lens distortion correction coordinates."]
2262#[doc = ""]
2263#[doc = " Each point in the grid contains the coordinates of the pixel in the image buffer that"]
2264#[doc = " contains the data for the pixel in the undistorted image corresponding"]
2265#[doc = " to that point in the grid."]
2266#[doc = " Interpolate between points in the matrix to correct image pixels that don't"]
2267#[doc = " fall directly underneath a point in the distortion grid."]
2268#[doc = ""]
2269#[doc = " Current devices use a 64x64 point distortion grid."]
2270#[doc = " @since 3.0.0"]
2271#[repr(C)]
2272#[derive(Debug, Copy, Clone)]
2273pub struct _LEAP_DISTORTION_MATRIX {
2274 #[doc = " A grid of 2D points. @since 3.0.0"]
2275 pub matrix: [[_LEAP_DISTORTION_MATRIX__bindgen_ty_1; 64usize]; 64usize],
2276}
2277#[doc = " A point in the distortion grid. @since 3.0.0"]
2278#[repr(C, packed)]
2279#[derive(Debug, Copy, Clone)]
2280pub struct _LEAP_DISTORTION_MATRIX__bindgen_ty_1 {
2281 #[doc = " The x-pixel coordinate. @since 3.0.0"]
2282 pub x: f32,
2283 #[doc = " The y-pixel coordinate. @since 3.0.0"]
2284 pub y: f32,
2285}
2286#[test]
2287fn bindgen_test_layout__LEAP_DISTORTION_MATRIX__bindgen_ty_1() {
2288 assert_eq!(
2289 ::std::mem::size_of::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>(),
2290 8usize,
2291 concat!(
2292 "Size of: ",
2293 stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1)
2294 )
2295 );
2296 assert_eq!(
2297 ::std::mem::align_of::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>(),
2298 1usize,
2299 concat!(
2300 "Alignment of ",
2301 stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1)
2302 )
2303 );
2304 fn test_field_x() {
2305 assert_eq!(
2306 unsafe {
2307 let uninit =
2308 ::std::mem::MaybeUninit::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>::uninit();
2309 let ptr = uninit.as_ptr();
2310 ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize
2311 },
2312 0usize,
2313 concat!(
2314 "Offset of field: ",
2315 stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1),
2316 "::",
2317 stringify!(x)
2318 )
2319 );
2320 }
2321 test_field_x();
2322 fn test_field_y() {
2323 assert_eq!(
2324 unsafe {
2325 let uninit =
2326 ::std::mem::MaybeUninit::<_LEAP_DISTORTION_MATRIX__bindgen_ty_1>::uninit();
2327 let ptr = uninit.as_ptr();
2328 ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize
2329 },
2330 4usize,
2331 concat!(
2332 "Offset of field: ",
2333 stringify!(_LEAP_DISTORTION_MATRIX__bindgen_ty_1),
2334 "::",
2335 stringify!(y)
2336 )
2337 );
2338 }
2339 test_field_y();
2340}
2341#[test]
2342fn bindgen_test_layout__LEAP_DISTORTION_MATRIX() {
2343 assert_eq!(
2344 ::std::mem::size_of::<_LEAP_DISTORTION_MATRIX>(),
2345 32768usize,
2346 concat!("Size of: ", stringify!(_LEAP_DISTORTION_MATRIX))
2347 );
2348 assert_eq!(
2349 ::std::mem::align_of::<_LEAP_DISTORTION_MATRIX>(),
2350 1usize,
2351 concat!("Alignment of ", stringify!(_LEAP_DISTORTION_MATRIX))
2352 );
2353 fn test_field_matrix() {
2354 assert_eq!(
2355 unsafe {
2356 let uninit = ::std::mem::MaybeUninit::<_LEAP_DISTORTION_MATRIX>::uninit();
2357 let ptr = uninit.as_ptr();
2358 ::std::ptr::addr_of!((*ptr).matrix) as usize - ptr as usize
2359 },
2360 0usize,
2361 concat!(
2362 "Offset of field: ",
2363 stringify!(_LEAP_DISTORTION_MATRIX),
2364 "::",
2365 stringify!(matrix)
2366 )
2367 );
2368 }
2369 test_field_matrix();
2370}
2371#[doc = " \\ingroup Structs"]
2372#[doc = " A matrix containing lens distortion correction coordinates."]
2373#[doc = ""]
2374#[doc = " Each point in the grid contains the coordinates of the pixel in the image buffer that"]
2375#[doc = " contains the data for the pixel in the undistorted image corresponding"]
2376#[doc = " to that point in the grid."]
2377#[doc = " Interpolate between points in the matrix to correct image pixels that don't"]
2378#[doc = " fall directly underneath a point in the distortion grid."]
2379#[doc = ""]
2380#[doc = " Current devices use a 64x64 point distortion grid."]
2381#[doc = " @since 3.0.0"]
2382pub type LEAP_DISTORTION_MATRIX = _LEAP_DISTORTION_MATRIX;
2383#[doc = " \\ingroup Structs"]
2384#[doc = " Describes the image to request."]
2385#[doc = " Pass this struct to the LeapImageRequest() function."]
2386#[doc = " @since 3.0.0"]
2387#[repr(C, packed)]
2388#[derive(Debug, Copy, Clone)]
2389pub struct _LEAP_IMAGE_FRAME_DESCRIPTION {
2390 #[doc = " The ID of the frame corresponding to the desired image. @since 3.0.0"]
2391 pub frame_id: i64,
2392 #[doc = " The type of the desired image. @since 3.0.0"]
2393 pub type_: eLeapImageType,
2394 #[doc = " Length of your image buffer. The buffer must be large enough to"]
2395 #[doc = " hold the request image."]
2396 pub buffer_len: u64,
2397 #[doc = " An allocated buffer large enough to contain the requested image. The buffer"]
2398 #[doc = " must remain valid until the image request completes or fails."]
2399 #[doc = " @since 3.0.0"]
2400 pub pBuffer: *mut ::std::os::raw::c_void,
2401}
2402#[test]
2403fn bindgen_test_layout__LEAP_IMAGE_FRAME_DESCRIPTION() {
2404 assert_eq!(
2405 ::std::mem::size_of::<_LEAP_IMAGE_FRAME_DESCRIPTION>(),
2406 28usize,
2407 concat!("Size of: ", stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION))
2408 );
2409 assert_eq!(
2410 ::std::mem::align_of::<_LEAP_IMAGE_FRAME_DESCRIPTION>(),
2411 1usize,
2412 concat!("Alignment of ", stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION))
2413 );
2414 fn test_field_frame_id() {
2415 assert_eq!(
2416 unsafe {
2417 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_FRAME_DESCRIPTION>::uninit();
2418 let ptr = uninit.as_ptr();
2419 ::std::ptr::addr_of!((*ptr).frame_id) as usize - ptr as usize
2420 },
2421 0usize,
2422 concat!(
2423 "Offset of field: ",
2424 stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
2425 "::",
2426 stringify!(frame_id)
2427 )
2428 );
2429 }
2430 test_field_frame_id();
2431 fn test_field_type() {
2432 assert_eq!(
2433 unsafe {
2434 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_FRAME_DESCRIPTION>::uninit();
2435 let ptr = uninit.as_ptr();
2436 ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize
2437 },
2438 8usize,
2439 concat!(
2440 "Offset of field: ",
2441 stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
2442 "::",
2443 stringify!(type_)
2444 )
2445 );
2446 }
2447 test_field_type();
2448 fn test_field_buffer_len() {
2449 assert_eq!(
2450 unsafe {
2451 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_FRAME_DESCRIPTION>::uninit();
2452 let ptr = uninit.as_ptr();
2453 ::std::ptr::addr_of!((*ptr).buffer_len) as usize - ptr as usize
2454 },
2455 12usize,
2456 concat!(
2457 "Offset of field: ",
2458 stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
2459 "::",
2460 stringify!(buffer_len)
2461 )
2462 );
2463 }
2464 test_field_buffer_len();
2465 fn test_field_pBuffer() {
2466 assert_eq!(
2467 unsafe {
2468 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_FRAME_DESCRIPTION>::uninit();
2469 let ptr = uninit.as_ptr();
2470 ::std::ptr::addr_of!((*ptr).pBuffer) as usize - ptr as usize
2471 },
2472 20usize,
2473 concat!(
2474 "Offset of field: ",
2475 stringify!(_LEAP_IMAGE_FRAME_DESCRIPTION),
2476 "::",
2477 stringify!(pBuffer)
2478 )
2479 );
2480 }
2481 test_field_pBuffer();
2482}
2483#[doc = " \\ingroup Structs"]
2484#[doc = " Describes the image to request."]
2485#[doc = " Pass this struct to the LeapImageRequest() function."]
2486#[doc = " @since 3.0.0"]
2487pub type LEAP_IMAGE_FRAME_DESCRIPTION = _LEAP_IMAGE_FRAME_DESCRIPTION;
2488#[doc = " \\ingroup Structs"]
2489#[doc = " A three element, floating-point vector."]
2490#[doc = " @since 3.0.0"]
2491#[repr(C)]
2492#[derive(Copy, Clone)]
2493pub struct _LEAP_VECTOR {
2494 pub __bindgen_anon_1: _LEAP_VECTOR__bindgen_ty_1,
2495}
2496#[doc = " You can access the vector members as either an array or individual float values."]
2497#[repr(C, packed)]
2498#[derive(Copy, Clone)]
2499pub union _LEAP_VECTOR__bindgen_ty_1 {
2500 #[doc = " The vector as an array. @since 3.0.0"]
2501 pub v: [f32; 3usize],
2502 pub __bindgen_anon_1: _LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1,
2503}
2504#[repr(C, packed)]
2505#[derive(Debug, Copy, Clone)]
2506pub struct _LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1 {
2507 #[doc = " The x spatial coordinate. @since 3.0.0"]
2508 pub x: f32,
2509 #[doc = " The y spatial coordinate. @since 3.0.0"]
2510 pub y: f32,
2511 #[doc = " The z spatial coordinate. @since 3.0.0"]
2512 pub z: f32,
2513}
2514#[test]
2515fn bindgen_test_layout__LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1() {
2516 assert_eq!(
2517 ::std::mem::size_of::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>(),
2518 12usize,
2519 concat!(
2520 "Size of: ",
2521 stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1)
2522 )
2523 );
2524 assert_eq!(
2525 ::std::mem::align_of::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>(),
2526 1usize,
2527 concat!(
2528 "Alignment of ",
2529 stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1)
2530 )
2531 );
2532 fn test_field_x() {
2533 assert_eq!(
2534 unsafe {
2535 let uninit =
2536 ::std::mem::MaybeUninit::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>::uninit();
2537 let ptr = uninit.as_ptr();
2538 ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize
2539 },
2540 0usize,
2541 concat!(
2542 "Offset of field: ",
2543 stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1),
2544 "::",
2545 stringify!(x)
2546 )
2547 );
2548 }
2549 test_field_x();
2550 fn test_field_y() {
2551 assert_eq!(
2552 unsafe {
2553 let uninit =
2554 ::std::mem::MaybeUninit::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>::uninit();
2555 let ptr = uninit.as_ptr();
2556 ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize
2557 },
2558 4usize,
2559 concat!(
2560 "Offset of field: ",
2561 stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1),
2562 "::",
2563 stringify!(y)
2564 )
2565 );
2566 }
2567 test_field_y();
2568 fn test_field_z() {
2569 assert_eq!(
2570 unsafe {
2571 let uninit =
2572 ::std::mem::MaybeUninit::<_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1>::uninit();
2573 let ptr = uninit.as_ptr();
2574 ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize
2575 },
2576 8usize,
2577 concat!(
2578 "Offset of field: ",
2579 stringify!(_LEAP_VECTOR__bindgen_ty_1__bindgen_ty_1),
2580 "::",
2581 stringify!(z)
2582 )
2583 );
2584 }
2585 test_field_z();
2586}
2587#[test]
2588fn bindgen_test_layout__LEAP_VECTOR__bindgen_ty_1() {
2589 assert_eq!(
2590 ::std::mem::size_of::<_LEAP_VECTOR__bindgen_ty_1>(),
2591 12usize,
2592 concat!("Size of: ", stringify!(_LEAP_VECTOR__bindgen_ty_1))
2593 );
2594 assert_eq!(
2595 ::std::mem::align_of::<_LEAP_VECTOR__bindgen_ty_1>(),
2596 1usize,
2597 concat!("Alignment of ", stringify!(_LEAP_VECTOR__bindgen_ty_1))
2598 );
2599 fn test_field_v() {
2600 assert_eq!(
2601 unsafe {
2602 let uninit = ::std::mem::MaybeUninit::<_LEAP_VECTOR__bindgen_ty_1>::uninit();
2603 let ptr = uninit.as_ptr();
2604 ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize
2605 },
2606 0usize,
2607 concat!(
2608 "Offset of field: ",
2609 stringify!(_LEAP_VECTOR__bindgen_ty_1),
2610 "::",
2611 stringify!(v)
2612 )
2613 );
2614 }
2615 test_field_v();
2616}
2617#[test]
2618fn bindgen_test_layout__LEAP_VECTOR() {
2619 assert_eq!(
2620 ::std::mem::size_of::<_LEAP_VECTOR>(),
2621 12usize,
2622 concat!("Size of: ", stringify!(_LEAP_VECTOR))
2623 );
2624 assert_eq!(
2625 ::std::mem::align_of::<_LEAP_VECTOR>(),
2626 1usize,
2627 concat!("Alignment of ", stringify!(_LEAP_VECTOR))
2628 );
2629}
2630#[doc = " \\ingroup Structs"]
2631#[doc = " A three element, floating-point vector."]
2632#[doc = " @since 3.0.0"]
2633pub type LEAP_VECTOR = _LEAP_VECTOR;
2634#[repr(C)]
2635#[derive(Copy, Clone)]
2636pub struct _LEAP_MATRIX_3x3 {
2637 pub m: [LEAP_VECTOR; 3usize],
2638}
2639#[test]
2640fn bindgen_test_layout__LEAP_MATRIX_3x3() {
2641 assert_eq!(
2642 ::std::mem::size_of::<_LEAP_MATRIX_3x3>(),
2643 36usize,
2644 concat!("Size of: ", stringify!(_LEAP_MATRIX_3x3))
2645 );
2646 assert_eq!(
2647 ::std::mem::align_of::<_LEAP_MATRIX_3x3>(),
2648 1usize,
2649 concat!("Alignment of ", stringify!(_LEAP_MATRIX_3x3))
2650 );
2651 fn test_field_m() {
2652 assert_eq!(
2653 unsafe {
2654 let uninit = ::std::mem::MaybeUninit::<_LEAP_MATRIX_3x3>::uninit();
2655 let ptr = uninit.as_ptr();
2656 ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize
2657 },
2658 0usize,
2659 concat!(
2660 "Offset of field: ",
2661 stringify!(_LEAP_MATRIX_3x3),
2662 "::",
2663 stringify!(m)
2664 )
2665 );
2666 }
2667 test_field_m();
2668}
2669pub type LEAP_MATRIX_3x3 = _LEAP_MATRIX_3x3;
2670#[doc = " \\ingroup Structs"]
2671#[doc = " A four element, floating point quaternion. @since 3.1.2"]
2672#[repr(C)]
2673#[derive(Copy, Clone)]
2674pub struct _LEAP_QUATERNION {
2675 pub __bindgen_anon_1: _LEAP_QUATERNION__bindgen_ty_1,
2676}
2677#[repr(C, packed)]
2678#[derive(Copy, Clone)]
2679pub union _LEAP_QUATERNION__bindgen_ty_1 {
2680 #[doc = " The quaternion as an array. @since 3.1.3"]
2681 pub v: [f32; 4usize],
2682 pub __bindgen_anon_1: _LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1,
2683}
2684#[repr(C, packed)]
2685#[derive(Debug, Copy, Clone)]
2686pub struct _LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1 {
2687 #[doc = " The x coefficient of the vector portion of the quaternion. @since 3.1.2"]
2688 pub x: f32,
2689 #[doc = " The y coefficient of the vector portion of the quaternion. @since 3.1.2"]
2690 pub y: f32,
2691 #[doc = " The z coefficient of the vector portion of the quaternion. @since 3.1.2"]
2692 pub z: f32,
2693 #[doc = " The scalar portion of the quaternion. @since 3.1.2"]
2694 pub w: f32,
2695}
2696#[test]
2697fn bindgen_test_layout__LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1() {
2698 assert_eq!(
2699 ::std::mem::size_of::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>(),
2700 16usize,
2701 concat!(
2702 "Size of: ",
2703 stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1)
2704 )
2705 );
2706 assert_eq!(
2707 ::std::mem::align_of::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>(),
2708 1usize,
2709 concat!(
2710 "Alignment of ",
2711 stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1)
2712 )
2713 );
2714 fn test_field_x() {
2715 assert_eq!(
2716 unsafe {
2717 let uninit =
2718 ::std::mem::MaybeUninit::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>::uninit(
2719 );
2720 let ptr = uninit.as_ptr();
2721 ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize
2722 },
2723 0usize,
2724 concat!(
2725 "Offset of field: ",
2726 stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
2727 "::",
2728 stringify!(x)
2729 )
2730 );
2731 }
2732 test_field_x();
2733 fn test_field_y() {
2734 assert_eq!(
2735 unsafe {
2736 let uninit =
2737 ::std::mem::MaybeUninit::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>::uninit(
2738 );
2739 let ptr = uninit.as_ptr();
2740 ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize
2741 },
2742 4usize,
2743 concat!(
2744 "Offset of field: ",
2745 stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
2746 "::",
2747 stringify!(y)
2748 )
2749 );
2750 }
2751 test_field_y();
2752 fn test_field_z() {
2753 assert_eq!(
2754 unsafe {
2755 let uninit =
2756 ::std::mem::MaybeUninit::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>::uninit(
2757 );
2758 let ptr = uninit.as_ptr();
2759 ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize
2760 },
2761 8usize,
2762 concat!(
2763 "Offset of field: ",
2764 stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
2765 "::",
2766 stringify!(z)
2767 )
2768 );
2769 }
2770 test_field_z();
2771 fn test_field_w() {
2772 assert_eq!(
2773 unsafe {
2774 let uninit =
2775 ::std::mem::MaybeUninit::<_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1>::uninit(
2776 );
2777 let ptr = uninit.as_ptr();
2778 ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize
2779 },
2780 12usize,
2781 concat!(
2782 "Offset of field: ",
2783 stringify!(_LEAP_QUATERNION__bindgen_ty_1__bindgen_ty_1),
2784 "::",
2785 stringify!(w)
2786 )
2787 );
2788 }
2789 test_field_w();
2790}
2791#[test]
2792fn bindgen_test_layout__LEAP_QUATERNION__bindgen_ty_1() {
2793 assert_eq!(
2794 ::std::mem::size_of::<_LEAP_QUATERNION__bindgen_ty_1>(),
2795 16usize,
2796 concat!("Size of: ", stringify!(_LEAP_QUATERNION__bindgen_ty_1))
2797 );
2798 assert_eq!(
2799 ::std::mem::align_of::<_LEAP_QUATERNION__bindgen_ty_1>(),
2800 1usize,
2801 concat!("Alignment of ", stringify!(_LEAP_QUATERNION__bindgen_ty_1))
2802 );
2803 fn test_field_v() {
2804 assert_eq!(
2805 unsafe {
2806 let uninit = ::std::mem::MaybeUninit::<_LEAP_QUATERNION__bindgen_ty_1>::uninit();
2807 let ptr = uninit.as_ptr();
2808 ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize
2809 },
2810 0usize,
2811 concat!(
2812 "Offset of field: ",
2813 stringify!(_LEAP_QUATERNION__bindgen_ty_1),
2814 "::",
2815 stringify!(v)
2816 )
2817 );
2818 }
2819 test_field_v();
2820}
2821#[test]
2822fn bindgen_test_layout__LEAP_QUATERNION() {
2823 assert_eq!(
2824 ::std::mem::size_of::<_LEAP_QUATERNION>(),
2825 16usize,
2826 concat!("Size of: ", stringify!(_LEAP_QUATERNION))
2827 );
2828 assert_eq!(
2829 ::std::mem::align_of::<_LEAP_QUATERNION>(),
2830 1usize,
2831 concat!("Alignment of ", stringify!(_LEAP_QUATERNION))
2832 );
2833}
2834#[doc = " \\ingroup Structs"]
2835#[doc = " A four element, floating point quaternion. @since 3.1.2"]
2836pub type LEAP_QUATERNION = _LEAP_QUATERNION;
2837#[doc = " \\ingroup Structs"]
2838#[doc = " Describes a bone's position and orientation."]
2839#[doc = ""]
2840#[doc = " Bones are members of the LEAP_DIGIT struct."]
2841#[doc = " @since 3.0.0"]
2842#[repr(C, packed)]
2843#[derive(Copy, Clone)]
2844pub struct _LEAP_BONE {
2845 #[doc = " The base of the bone, closer to the heart. The bones origin. @since 3.0.0"]
2846 pub prev_joint: LEAP_VECTOR,
2847 #[doc = " The end of the bone, further from the heart. @since 3.0.0"]
2848 pub next_joint: LEAP_VECTOR,
2849 #[doc = " The average width of the flesh around the bone in millimeters. @since 3.0.0"]
2850 pub width: f32,
2851 #[doc = " Rotation in world space from the forward direction."]
2852 #[doc = " Convert the quaternion to a matrix to derive the basis vectors."]
2853 #[doc = " @since 3.1.2"]
2854 pub rotation: LEAP_QUATERNION,
2855}
2856#[test]
2857fn bindgen_test_layout__LEAP_BONE() {
2858 assert_eq!(
2859 ::std::mem::size_of::<_LEAP_BONE>(),
2860 44usize,
2861 concat!("Size of: ", stringify!(_LEAP_BONE))
2862 );
2863 assert_eq!(
2864 ::std::mem::align_of::<_LEAP_BONE>(),
2865 1usize,
2866 concat!("Alignment of ", stringify!(_LEAP_BONE))
2867 );
2868 fn test_field_prev_joint() {
2869 assert_eq!(
2870 unsafe {
2871 let uninit = ::std::mem::MaybeUninit::<_LEAP_BONE>::uninit();
2872 let ptr = uninit.as_ptr();
2873 ::std::ptr::addr_of!((*ptr).prev_joint) as usize - ptr as usize
2874 },
2875 0usize,
2876 concat!(
2877 "Offset of field: ",
2878 stringify!(_LEAP_BONE),
2879 "::",
2880 stringify!(prev_joint)
2881 )
2882 );
2883 }
2884 test_field_prev_joint();
2885 fn test_field_next_joint() {
2886 assert_eq!(
2887 unsafe {
2888 let uninit = ::std::mem::MaybeUninit::<_LEAP_BONE>::uninit();
2889 let ptr = uninit.as_ptr();
2890 ::std::ptr::addr_of!((*ptr).next_joint) as usize - ptr as usize
2891 },
2892 12usize,
2893 concat!(
2894 "Offset of field: ",
2895 stringify!(_LEAP_BONE),
2896 "::",
2897 stringify!(next_joint)
2898 )
2899 );
2900 }
2901 test_field_next_joint();
2902 fn test_field_width() {
2903 assert_eq!(
2904 unsafe {
2905 let uninit = ::std::mem::MaybeUninit::<_LEAP_BONE>::uninit();
2906 let ptr = uninit.as_ptr();
2907 ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize
2908 },
2909 24usize,
2910 concat!(
2911 "Offset of field: ",
2912 stringify!(_LEAP_BONE),
2913 "::",
2914 stringify!(width)
2915 )
2916 );
2917 }
2918 test_field_width();
2919 fn test_field_rotation() {
2920 assert_eq!(
2921 unsafe {
2922 let uninit = ::std::mem::MaybeUninit::<_LEAP_BONE>::uninit();
2923 let ptr = uninit.as_ptr();
2924 ::std::ptr::addr_of!((*ptr).rotation) as usize - ptr as usize
2925 },
2926 28usize,
2927 concat!(
2928 "Offset of field: ",
2929 stringify!(_LEAP_BONE),
2930 "::",
2931 stringify!(rotation)
2932 )
2933 );
2934 }
2935 test_field_rotation();
2936}
2937#[doc = " \\ingroup Structs"]
2938#[doc = " Describes a bone's position and orientation."]
2939#[doc = ""]
2940#[doc = " Bones are members of the LEAP_DIGIT struct."]
2941#[doc = " @since 3.0.0"]
2942pub type LEAP_BONE = _LEAP_BONE;
2943#[doc = " \\ingroup Structs"]
2944#[doc = " Describes the digit of a hand."]
2945#[doc = " Digits are members of the LEAP_HAND struct."]
2946#[doc = " @since 3.0.0"]
2947#[repr(C, packed)]
2948#[derive(Copy, Clone)]
2949pub struct _LEAP_DIGIT {
2950 #[doc = " The Leap identifier of this finger. @since 3.0.0"]
2951 pub finger_id: i32,
2952 pub __bindgen_anon_1: _LEAP_DIGIT__bindgen_ty_1,
2953 #[doc = " Reports whether the finger is more or less straight. @since 3.0.0"]
2954 pub is_extended: u32,
2955}
2956#[repr(C)]
2957#[derive(Copy, Clone)]
2958pub union _LEAP_DIGIT__bindgen_ty_1 {
2959 #[doc = " All the bones of a digit as an iterable collection. @since 3.0.0"]
2960 pub bones: [LEAP_BONE; 4usize],
2961 pub __bindgen_anon_1: _LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1,
2962}
2963#[repr(C)]
2964#[derive(Copy, Clone)]
2965pub struct _LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1 {
2966 #[doc = " The finger bone wholly inside the hand."]
2967 #[doc = " For thumbs, this bone is set to have zero length and width, an identity basis matrix,"]
2968 #[doc = " and its joint positions are equal."]
2969 #[doc = " Note that this is anatomically incorrect; in anatomical terms, the intermediate phalange"]
2970 #[doc = " is absent in a real thumb, rather than the metacarpal bone. In the Ultraleap Tracking model,"]
2971 #[doc = " however, we use a \"zero\" metacarpal bone instead for ease of programming."]
2972 #[doc = " @since 3.0.0"]
2973 pub metacarpal: LEAP_BONE,
2974 #[doc = " The phalange extending from the knuckle. @since 3.0.0"]
2975 pub proximal: LEAP_BONE,
2976 #[doc = " The bone between the proximal phalange and the distal phalange. @since 3.0.0"]
2977 pub intermediate: LEAP_BONE,
2978 #[doc = " The distal phalange terminating at the finger tip. @since 3.0.0"]
2979 pub distal: LEAP_BONE,
2980}
2981#[test]
2982fn bindgen_test_layout__LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1() {
2983 assert_eq!(
2984 ::std::mem::size_of::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>(),
2985 176usize,
2986 concat!(
2987 "Size of: ",
2988 stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1)
2989 )
2990 );
2991 assert_eq!(
2992 ::std::mem::align_of::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>(),
2993 1usize,
2994 concat!(
2995 "Alignment of ",
2996 stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1)
2997 )
2998 );
2999 fn test_field_metacarpal() {
3000 assert_eq!(
3001 unsafe {
3002 let uninit =
3003 ::std::mem::MaybeUninit::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>::uninit();
3004 let ptr = uninit.as_ptr();
3005 ::std::ptr::addr_of!((*ptr).metacarpal) as usize - ptr as usize
3006 },
3007 0usize,
3008 concat!(
3009 "Offset of field: ",
3010 stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
3011 "::",
3012 stringify!(metacarpal)
3013 )
3014 );
3015 }
3016 test_field_metacarpal();
3017 fn test_field_proximal() {
3018 assert_eq!(
3019 unsafe {
3020 let uninit =
3021 ::std::mem::MaybeUninit::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>::uninit();
3022 let ptr = uninit.as_ptr();
3023 ::std::ptr::addr_of!((*ptr).proximal) as usize - ptr as usize
3024 },
3025 44usize,
3026 concat!(
3027 "Offset of field: ",
3028 stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
3029 "::",
3030 stringify!(proximal)
3031 )
3032 );
3033 }
3034 test_field_proximal();
3035 fn test_field_intermediate() {
3036 assert_eq!(
3037 unsafe {
3038 let uninit =
3039 ::std::mem::MaybeUninit::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>::uninit();
3040 let ptr = uninit.as_ptr();
3041 ::std::ptr::addr_of!((*ptr).intermediate) as usize - ptr as usize
3042 },
3043 88usize,
3044 concat!(
3045 "Offset of field: ",
3046 stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
3047 "::",
3048 stringify!(intermediate)
3049 )
3050 );
3051 }
3052 test_field_intermediate();
3053 fn test_field_distal() {
3054 assert_eq!(
3055 unsafe {
3056 let uninit =
3057 ::std::mem::MaybeUninit::<_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1>::uninit();
3058 let ptr = uninit.as_ptr();
3059 ::std::ptr::addr_of!((*ptr).distal) as usize - ptr as usize
3060 },
3061 132usize,
3062 concat!(
3063 "Offset of field: ",
3064 stringify!(_LEAP_DIGIT__bindgen_ty_1__bindgen_ty_1),
3065 "::",
3066 stringify!(distal)
3067 )
3068 );
3069 }
3070 test_field_distal();
3071}
3072#[test]
3073fn bindgen_test_layout__LEAP_DIGIT__bindgen_ty_1() {
3074 assert_eq!(
3075 ::std::mem::size_of::<_LEAP_DIGIT__bindgen_ty_1>(),
3076 176usize,
3077 concat!("Size of: ", stringify!(_LEAP_DIGIT__bindgen_ty_1))
3078 );
3079 assert_eq!(
3080 ::std::mem::align_of::<_LEAP_DIGIT__bindgen_ty_1>(),
3081 1usize,
3082 concat!("Alignment of ", stringify!(_LEAP_DIGIT__bindgen_ty_1))
3083 );
3084 fn test_field_bones() {
3085 assert_eq!(
3086 unsafe {
3087 let uninit = ::std::mem::MaybeUninit::<_LEAP_DIGIT__bindgen_ty_1>::uninit();
3088 let ptr = uninit.as_ptr();
3089 ::std::ptr::addr_of!((*ptr).bones) as usize - ptr as usize
3090 },
3091 0usize,
3092 concat!(
3093 "Offset of field: ",
3094 stringify!(_LEAP_DIGIT__bindgen_ty_1),
3095 "::",
3096 stringify!(bones)
3097 )
3098 );
3099 }
3100 test_field_bones();
3101}
3102#[test]
3103fn bindgen_test_layout__LEAP_DIGIT() {
3104 assert_eq!(
3105 ::std::mem::size_of::<_LEAP_DIGIT>(),
3106 184usize,
3107 concat!("Size of: ", stringify!(_LEAP_DIGIT))
3108 );
3109 assert_eq!(
3110 ::std::mem::align_of::<_LEAP_DIGIT>(),
3111 1usize,
3112 concat!("Alignment of ", stringify!(_LEAP_DIGIT))
3113 );
3114 fn test_field_finger_id() {
3115 assert_eq!(
3116 unsafe {
3117 let uninit = ::std::mem::MaybeUninit::<_LEAP_DIGIT>::uninit();
3118 let ptr = uninit.as_ptr();
3119 ::std::ptr::addr_of!((*ptr).finger_id) as usize - ptr as usize
3120 },
3121 0usize,
3122 concat!(
3123 "Offset of field: ",
3124 stringify!(_LEAP_DIGIT),
3125 "::",
3126 stringify!(finger_id)
3127 )
3128 );
3129 }
3130 test_field_finger_id();
3131 fn test_field_is_extended() {
3132 assert_eq!(
3133 unsafe {
3134 let uninit = ::std::mem::MaybeUninit::<_LEAP_DIGIT>::uninit();
3135 let ptr = uninit.as_ptr();
3136 ::std::ptr::addr_of!((*ptr).is_extended) as usize - ptr as usize
3137 },
3138 180usize,
3139 concat!(
3140 "Offset of field: ",
3141 stringify!(_LEAP_DIGIT),
3142 "::",
3143 stringify!(is_extended)
3144 )
3145 );
3146 }
3147 test_field_is_extended();
3148}
3149#[doc = " \\ingroup Structs"]
3150#[doc = " Describes the digit of a hand."]
3151#[doc = " Digits are members of the LEAP_HAND struct."]
3152#[doc = " @since 3.0.0"]
3153pub type LEAP_DIGIT = _LEAP_DIGIT;
3154#[doc = " \\ingroup Structs"]
3155#[doc = " Properties associated with the palm of the hand."]
3156#[doc = " The Palm is a member of the LEAP_HAND struct."]
3157#[doc = " @since 3.0.0"]
3158#[repr(C, packed)]
3159#[derive(Copy, Clone)]
3160pub struct _LEAP_PALM {
3161 #[doc = " The center position of the palm in millimeters from the Ultraleap Tracking camera device origin."]
3162 #[doc = " @since 3.0.0"]
3163 pub position: LEAP_VECTOR,
3164 #[doc = " The time-filtered and stabilized position of the palm."]
3165 #[doc = ""]
3166 #[doc = " Smoothing and stabilization is performed in order to make"]
3167 #[doc = " this value more suitable for interaction with 2D content. The stabilized"]
3168 #[doc = " position lags behind the palm position by a variable amount, depending"]
3169 #[doc = " primarily on the speed of movement."]
3170 #[doc = " @since 3.0.0"]
3171 pub stabilized_position: LEAP_VECTOR,
3172 #[doc = " The rate of change of the palm position in millimeters per second."]
3173 #[doc = " @since 3.0.0"]
3174 pub velocity: LEAP_VECTOR,
3175 #[doc = " The normal vector to the palm. If your hand is flat, this vector will"]
3176 #[doc = " point downward, or \"out\" of the front surface of your palm."]
3177 #[doc = " @since 3.0.0"]
3178 pub normal: LEAP_VECTOR,
3179 #[doc = " The estimated width of the palm when the hand is in a flat position."]
3180 #[doc = " @since 3.0.0"]
3181 pub width: f32,
3182 #[doc = " The unit direction vector pointing from the palm position toward the fingers."]
3183 #[doc = " @since 3.0.0"]
3184 pub direction: LEAP_VECTOR,
3185 #[doc = " The quaternion representing the palm's orientation"]
3186 #[doc = " corresponding to the basis {normal x direction, -normal, -direction}"]
3187 #[doc = " @since 3.1.3"]
3188 pub orientation: LEAP_QUATERNION,
3189}
3190#[test]
3191fn bindgen_test_layout__LEAP_PALM() {
3192 assert_eq!(
3193 ::std::mem::size_of::<_LEAP_PALM>(),
3194 80usize,
3195 concat!("Size of: ", stringify!(_LEAP_PALM))
3196 );
3197 assert_eq!(
3198 ::std::mem::align_of::<_LEAP_PALM>(),
3199 1usize,
3200 concat!("Alignment of ", stringify!(_LEAP_PALM))
3201 );
3202 fn test_field_position() {
3203 assert_eq!(
3204 unsafe {
3205 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3206 let ptr = uninit.as_ptr();
3207 ::std::ptr::addr_of!((*ptr).position) as usize - ptr as usize
3208 },
3209 0usize,
3210 concat!(
3211 "Offset of field: ",
3212 stringify!(_LEAP_PALM),
3213 "::",
3214 stringify!(position)
3215 )
3216 );
3217 }
3218 test_field_position();
3219 fn test_field_stabilized_position() {
3220 assert_eq!(
3221 unsafe {
3222 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3223 let ptr = uninit.as_ptr();
3224 ::std::ptr::addr_of!((*ptr).stabilized_position) as usize - ptr as usize
3225 },
3226 12usize,
3227 concat!(
3228 "Offset of field: ",
3229 stringify!(_LEAP_PALM),
3230 "::",
3231 stringify!(stabilized_position)
3232 )
3233 );
3234 }
3235 test_field_stabilized_position();
3236 fn test_field_velocity() {
3237 assert_eq!(
3238 unsafe {
3239 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3240 let ptr = uninit.as_ptr();
3241 ::std::ptr::addr_of!((*ptr).velocity) as usize - ptr as usize
3242 },
3243 24usize,
3244 concat!(
3245 "Offset of field: ",
3246 stringify!(_LEAP_PALM),
3247 "::",
3248 stringify!(velocity)
3249 )
3250 );
3251 }
3252 test_field_velocity();
3253 fn test_field_normal() {
3254 assert_eq!(
3255 unsafe {
3256 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3257 let ptr = uninit.as_ptr();
3258 ::std::ptr::addr_of!((*ptr).normal) as usize - ptr as usize
3259 },
3260 36usize,
3261 concat!(
3262 "Offset of field: ",
3263 stringify!(_LEAP_PALM),
3264 "::",
3265 stringify!(normal)
3266 )
3267 );
3268 }
3269 test_field_normal();
3270 fn test_field_width() {
3271 assert_eq!(
3272 unsafe {
3273 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3274 let ptr = uninit.as_ptr();
3275 ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize
3276 },
3277 48usize,
3278 concat!(
3279 "Offset of field: ",
3280 stringify!(_LEAP_PALM),
3281 "::",
3282 stringify!(width)
3283 )
3284 );
3285 }
3286 test_field_width();
3287 fn test_field_direction() {
3288 assert_eq!(
3289 unsafe {
3290 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3291 let ptr = uninit.as_ptr();
3292 ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize
3293 },
3294 52usize,
3295 concat!(
3296 "Offset of field: ",
3297 stringify!(_LEAP_PALM),
3298 "::",
3299 stringify!(direction)
3300 )
3301 );
3302 }
3303 test_field_direction();
3304 fn test_field_orientation() {
3305 assert_eq!(
3306 unsafe {
3307 let uninit = ::std::mem::MaybeUninit::<_LEAP_PALM>::uninit();
3308 let ptr = uninit.as_ptr();
3309 ::std::ptr::addr_of!((*ptr).orientation) as usize - ptr as usize
3310 },
3311 64usize,
3312 concat!(
3313 "Offset of field: ",
3314 stringify!(_LEAP_PALM),
3315 "::",
3316 stringify!(orientation)
3317 )
3318 );
3319 }
3320 test_field_orientation();
3321}
3322#[doc = " \\ingroup Structs"]
3323#[doc = " Properties associated with the palm of the hand."]
3324#[doc = " The Palm is a member of the LEAP_HAND struct."]
3325#[doc = " @since 3.0.0"]
3326pub type LEAP_PALM = _LEAP_PALM;
3327#[doc = " A left hand. @since 3.0.0"]
3328pub const _eLeapHandType_eLeapHandType_Left: _eLeapHandType = 0;
3329#[doc = " A right hand. @since 3.0.0"]
3330pub const _eLeapHandType_eLeapHandType_Right: _eLeapHandType = 1;
3331#[doc = " \\ingroup Enum"]
3332#[doc = " The Hand chirality types."]
3333#[doc = " Used in the LEAP_HAND struct."]
3334#[doc = " @since 3.0.0"]
3335pub type _eLeapHandType = ::std::os::raw::c_int;
3336#[doc = " \\ingroup Enum"]
3337#[doc = " The Hand chirality types."]
3338#[doc = " Used in the LEAP_HAND struct."]
3339#[doc = " @since 3.0.0"]
3340pub use self::_eLeapHandType as eLeapHandType;
3341#[doc = " \\ingroup Structs"]
3342#[doc = " Describes a tracked hand. @since 3.0.0"]
3343#[repr(C, packed)]
3344#[derive(Copy, Clone)]
3345pub struct _LEAP_HAND {
3346 #[doc = " A unique ID for a hand tracked across frames."]
3347 #[doc = " If tracking of a physical hand is lost, a new ID is assigned when"]
3348 #[doc = " tracking is reacquired."]
3349 #[doc = " @since 3.0.0"]
3350 pub id: u32,
3351 #[doc = " Reserved for future use. @since 3.0.0"]
3352 pub flags: u32,
3353 #[doc = " Identifies the chirality of this hand. @since 3.0.0"]
3354 pub type_: eLeapHandType,
3355 #[doc = " How confident we are with a given hand pose. Not currently used (always 1.0)."]
3356 #[doc = " @since 3.0.0"]
3357 pub confidence: f32,
3358 #[doc = " The total amount of time this hand has been tracked, in microseconds."]
3359 #[doc = " @since 3.0.0"]
3360 pub visible_time: u64,
3361 #[doc = " The distance between index finger and thumb. @since 3.0.0"]
3362 pub pinch_distance: f32,
3363 #[doc = " The average angle of fingers to palm. @since 3.0.0"]
3364 pub grab_angle: f32,
3365 #[doc = " The normalized estimate of the pinch pose."]
3366 #[doc = " Zero is not pinching; one is fully pinched."]
3367 #[doc = " @since 3.0.0"]
3368 pub pinch_strength: f32,
3369 #[doc = " The normalized estimate of the grab hand pose."]
3370 #[doc = " Zero is not grabbing; one is fully grabbing."]
3371 #[doc = " @since 3.0.0"]
3372 pub grab_strength: f32,
3373 #[doc = " Additional information associated with the palm. @since 3.0.0"]
3374 pub palm: LEAP_PALM,
3375 pub __bindgen_anon_1: _LEAP_HAND__bindgen_ty_1,
3376 #[doc = " The arm to which this hand is attached."]
3377 #[doc = " An arm consists of a single LEAP_BONE struct."]
3378 #[doc = " @since 3.0.0"]
3379 pub arm: LEAP_BONE,
3380}
3381#[doc = " The fingers of this hand. @since 3.0.0"]
3382#[repr(C)]
3383#[derive(Copy, Clone)]
3384pub union _LEAP_HAND__bindgen_ty_1 {
3385 pub __bindgen_anon_1: _LEAP_HAND__bindgen_ty_1__bindgen_ty_1,
3386 #[doc = " The fingers of the hand as an array. @since 3.0.0"]
3387 pub digits: [LEAP_DIGIT; 5usize],
3388}
3389#[repr(C)]
3390#[derive(Copy, Clone)]
3391pub struct _LEAP_HAND__bindgen_ty_1__bindgen_ty_1 {
3392 #[doc = " The thumb. @since 3.0.0"]
3393 pub thumb: LEAP_DIGIT,
3394 #[doc = " The index finger. @since 3.0.0"]
3395 pub index: LEAP_DIGIT,
3396 #[doc = " The middle finger. @since 3.0.0"]
3397 pub middle: LEAP_DIGIT,
3398 #[doc = " The ring finger. @since 3.0.0"]
3399 pub ring: LEAP_DIGIT,
3400 #[doc = " The pinky finger. @since 3.0.0"]
3401 pub pinky: LEAP_DIGIT,
3402}
3403#[test]
3404fn bindgen_test_layout__LEAP_HAND__bindgen_ty_1__bindgen_ty_1() {
3405 assert_eq!(
3406 ::std::mem::size_of::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>(),
3407 920usize,
3408 concat!(
3409 "Size of: ",
3410 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1)
3411 )
3412 );
3413 assert_eq!(
3414 ::std::mem::align_of::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>(),
3415 1usize,
3416 concat!(
3417 "Alignment of ",
3418 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1)
3419 )
3420 );
3421 fn test_field_thumb() {
3422 assert_eq!(
3423 unsafe {
3424 let uninit =
3425 ::std::mem::MaybeUninit::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>::uninit();
3426 let ptr = uninit.as_ptr();
3427 ::std::ptr::addr_of!((*ptr).thumb) as usize - ptr as usize
3428 },
3429 0usize,
3430 concat!(
3431 "Offset of field: ",
3432 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
3433 "::",
3434 stringify!(thumb)
3435 )
3436 );
3437 }
3438 test_field_thumb();
3439 fn test_field_index() {
3440 assert_eq!(
3441 unsafe {
3442 let uninit =
3443 ::std::mem::MaybeUninit::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>::uninit();
3444 let ptr = uninit.as_ptr();
3445 ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize
3446 },
3447 184usize,
3448 concat!(
3449 "Offset of field: ",
3450 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
3451 "::",
3452 stringify!(index)
3453 )
3454 );
3455 }
3456 test_field_index();
3457 fn test_field_middle() {
3458 assert_eq!(
3459 unsafe {
3460 let uninit =
3461 ::std::mem::MaybeUninit::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>::uninit();
3462 let ptr = uninit.as_ptr();
3463 ::std::ptr::addr_of!((*ptr).middle) as usize - ptr as usize
3464 },
3465 368usize,
3466 concat!(
3467 "Offset of field: ",
3468 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
3469 "::",
3470 stringify!(middle)
3471 )
3472 );
3473 }
3474 test_field_middle();
3475 fn test_field_ring() {
3476 assert_eq!(
3477 unsafe {
3478 let uninit =
3479 ::std::mem::MaybeUninit::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>::uninit();
3480 let ptr = uninit.as_ptr();
3481 ::std::ptr::addr_of!((*ptr).ring) as usize - ptr as usize
3482 },
3483 552usize,
3484 concat!(
3485 "Offset of field: ",
3486 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
3487 "::",
3488 stringify!(ring)
3489 )
3490 );
3491 }
3492 test_field_ring();
3493 fn test_field_pinky() {
3494 assert_eq!(
3495 unsafe {
3496 let uninit =
3497 ::std::mem::MaybeUninit::<_LEAP_HAND__bindgen_ty_1__bindgen_ty_1>::uninit();
3498 let ptr = uninit.as_ptr();
3499 ::std::ptr::addr_of!((*ptr).pinky) as usize - ptr as usize
3500 },
3501 736usize,
3502 concat!(
3503 "Offset of field: ",
3504 stringify!(_LEAP_HAND__bindgen_ty_1__bindgen_ty_1),
3505 "::",
3506 stringify!(pinky)
3507 )
3508 );
3509 }
3510 test_field_pinky();
3511}
3512#[test]
3513fn bindgen_test_layout__LEAP_HAND__bindgen_ty_1() {
3514 assert_eq!(
3515 ::std::mem::size_of::<_LEAP_HAND__bindgen_ty_1>(),
3516 920usize,
3517 concat!("Size of: ", stringify!(_LEAP_HAND__bindgen_ty_1))
3518 );
3519 assert_eq!(
3520 ::std::mem::align_of::<_LEAP_HAND__bindgen_ty_1>(),
3521 1usize,
3522 concat!("Alignment of ", stringify!(_LEAP_HAND__bindgen_ty_1))
3523 );
3524 fn test_field_digits() {
3525 assert_eq!(
3526 unsafe {
3527 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND__bindgen_ty_1>::uninit();
3528 let ptr = uninit.as_ptr();
3529 ::std::ptr::addr_of!((*ptr).digits) as usize - ptr as usize
3530 },
3531 0usize,
3532 concat!(
3533 "Offset of field: ",
3534 stringify!(_LEAP_HAND__bindgen_ty_1),
3535 "::",
3536 stringify!(digits)
3537 )
3538 );
3539 }
3540 test_field_digits();
3541}
3542#[test]
3543fn bindgen_test_layout__LEAP_HAND() {
3544 assert_eq!(
3545 ::std::mem::size_of::<_LEAP_HAND>(),
3546 1084usize,
3547 concat!("Size of: ", stringify!(_LEAP_HAND))
3548 );
3549 assert_eq!(
3550 ::std::mem::align_of::<_LEAP_HAND>(),
3551 1usize,
3552 concat!("Alignment of ", stringify!(_LEAP_HAND))
3553 );
3554 fn test_field_id() {
3555 assert_eq!(
3556 unsafe {
3557 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3558 let ptr = uninit.as_ptr();
3559 ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize
3560 },
3561 0usize,
3562 concat!(
3563 "Offset of field: ",
3564 stringify!(_LEAP_HAND),
3565 "::",
3566 stringify!(id)
3567 )
3568 );
3569 }
3570 test_field_id();
3571 fn test_field_flags() {
3572 assert_eq!(
3573 unsafe {
3574 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3575 let ptr = uninit.as_ptr();
3576 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize
3577 },
3578 4usize,
3579 concat!(
3580 "Offset of field: ",
3581 stringify!(_LEAP_HAND),
3582 "::",
3583 stringify!(flags)
3584 )
3585 );
3586 }
3587 test_field_flags();
3588 fn test_field_type() {
3589 assert_eq!(
3590 unsafe {
3591 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3592 let ptr = uninit.as_ptr();
3593 ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize
3594 },
3595 8usize,
3596 concat!(
3597 "Offset of field: ",
3598 stringify!(_LEAP_HAND),
3599 "::",
3600 stringify!(type_)
3601 )
3602 );
3603 }
3604 test_field_type();
3605 fn test_field_confidence() {
3606 assert_eq!(
3607 unsafe {
3608 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3609 let ptr = uninit.as_ptr();
3610 ::std::ptr::addr_of!((*ptr).confidence) as usize - ptr as usize
3611 },
3612 12usize,
3613 concat!(
3614 "Offset of field: ",
3615 stringify!(_LEAP_HAND),
3616 "::",
3617 stringify!(confidence)
3618 )
3619 );
3620 }
3621 test_field_confidence();
3622 fn test_field_visible_time() {
3623 assert_eq!(
3624 unsafe {
3625 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3626 let ptr = uninit.as_ptr();
3627 ::std::ptr::addr_of!((*ptr).visible_time) as usize - ptr as usize
3628 },
3629 16usize,
3630 concat!(
3631 "Offset of field: ",
3632 stringify!(_LEAP_HAND),
3633 "::",
3634 stringify!(visible_time)
3635 )
3636 );
3637 }
3638 test_field_visible_time();
3639 fn test_field_pinch_distance() {
3640 assert_eq!(
3641 unsafe {
3642 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3643 let ptr = uninit.as_ptr();
3644 ::std::ptr::addr_of!((*ptr).pinch_distance) as usize - ptr as usize
3645 },
3646 24usize,
3647 concat!(
3648 "Offset of field: ",
3649 stringify!(_LEAP_HAND),
3650 "::",
3651 stringify!(pinch_distance)
3652 )
3653 );
3654 }
3655 test_field_pinch_distance();
3656 fn test_field_grab_angle() {
3657 assert_eq!(
3658 unsafe {
3659 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3660 let ptr = uninit.as_ptr();
3661 ::std::ptr::addr_of!((*ptr).grab_angle) as usize - ptr as usize
3662 },
3663 28usize,
3664 concat!(
3665 "Offset of field: ",
3666 stringify!(_LEAP_HAND),
3667 "::",
3668 stringify!(grab_angle)
3669 )
3670 );
3671 }
3672 test_field_grab_angle();
3673 fn test_field_pinch_strength() {
3674 assert_eq!(
3675 unsafe {
3676 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3677 let ptr = uninit.as_ptr();
3678 ::std::ptr::addr_of!((*ptr).pinch_strength) as usize - ptr as usize
3679 },
3680 32usize,
3681 concat!(
3682 "Offset of field: ",
3683 stringify!(_LEAP_HAND),
3684 "::",
3685 stringify!(pinch_strength)
3686 )
3687 );
3688 }
3689 test_field_pinch_strength();
3690 fn test_field_grab_strength() {
3691 assert_eq!(
3692 unsafe {
3693 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3694 let ptr = uninit.as_ptr();
3695 ::std::ptr::addr_of!((*ptr).grab_strength) as usize - ptr as usize
3696 },
3697 36usize,
3698 concat!(
3699 "Offset of field: ",
3700 stringify!(_LEAP_HAND),
3701 "::",
3702 stringify!(grab_strength)
3703 )
3704 );
3705 }
3706 test_field_grab_strength();
3707 fn test_field_palm() {
3708 assert_eq!(
3709 unsafe {
3710 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3711 let ptr = uninit.as_ptr();
3712 ::std::ptr::addr_of!((*ptr).palm) as usize - ptr as usize
3713 },
3714 40usize,
3715 concat!(
3716 "Offset of field: ",
3717 stringify!(_LEAP_HAND),
3718 "::",
3719 stringify!(palm)
3720 )
3721 );
3722 }
3723 test_field_palm();
3724 fn test_field_arm() {
3725 assert_eq!(
3726 unsafe {
3727 let uninit = ::std::mem::MaybeUninit::<_LEAP_HAND>::uninit();
3728 let ptr = uninit.as_ptr();
3729 ::std::ptr::addr_of!((*ptr).arm) as usize - ptr as usize
3730 },
3731 1040usize,
3732 concat!(
3733 "Offset of field: ",
3734 stringify!(_LEAP_HAND),
3735 "::",
3736 stringify!(arm)
3737 )
3738 );
3739 }
3740 test_field_arm();
3741}
3742#[doc = " \\ingroup Structs"]
3743#[doc = " Describes a tracked hand. @since 3.0.0"]
3744pub type LEAP_HAND = _LEAP_HAND;
3745#[doc = " \\ingroup Structs"]
3746#[doc = " A snapshot, or frame of data, containing the tracking data for a single moment in time."]
3747#[doc = " The LEAP_FRAME struct is the container for all the tracking data."]
3748#[doc = " @since 3.0.0"]
3749#[repr(C, packed)]
3750#[derive(Debug, Copy, Clone)]
3751pub struct _LEAP_TRACKING_EVENT {
3752 #[doc = " A universal frame identification header. @since 3.0.0"]
3753 pub info: LEAP_FRAME_HEADER,
3754 #[doc = " An identifier for this tracking frame. This identifier is meant to be monotonically"]
3755 #[doc = " increasing, but values may be skipped if the client application does not poll for messages"]
3756 #[doc = " fast enough. This number also generally increases at the same rate as info.frame_id, but"]
3757 #[doc = " if the server cannot process every image received from the device cameras, the info.frame_id"]
3758 #[doc = " identifier may increase faster."]
3759 #[doc = " @since 3.0.0"]
3760 pub tracking_frame_id: i64,
3761 #[doc = " The number of hands tracked in this frame, i.e. the number of elements in"]
3762 #[doc = " the pHands array."]
3763 #[doc = " @since 3.0.0"]
3764 pub nHands: u32,
3765 #[doc = " A pointer to the array of hands tracked in this frame."]
3766 #[doc = " @since 3.0.0"]
3767 pub pHands: *mut LEAP_HAND,
3768 #[doc = " Current tracking frame rate in hertz."]
3769 #[doc = ""]
3770 #[doc = " This frame rate is distinct from the image frame rate, which is the rate that images are"]
3771 #[doc = " being read from the device. Depending on host CPU limitations, the tracking frame rate"]
3772 #[doc = " may be substantially less than the device frame rate."]
3773 #[doc = ""]
3774 #[doc = " This number is generally equal to or less than the device frame rate, but there is one"]
3775 #[doc = " case where this number may be _higher_ than the device frame rate: When the device rate"]
3776 #[doc = " drops. In this case, the device frame rate will fall sooner than the tracking frame rate."]
3777 #[doc = ""]
3778 #[doc = " This number is equal to zero if there are not enough frames to estimate frame rate."]
3779 #[doc = ""]
3780 #[doc = " This number cannot be negative."]
3781 #[doc = " @since 3.0.0"]
3782 pub framerate: f32,
3783}
3784#[test]
3785fn bindgen_test_layout__LEAP_TRACKING_EVENT() {
3786 assert_eq!(
3787 ::std::mem::size_of::<_LEAP_TRACKING_EVENT>(),
3788 48usize,
3789 concat!("Size of: ", stringify!(_LEAP_TRACKING_EVENT))
3790 );
3791 assert_eq!(
3792 ::std::mem::align_of::<_LEAP_TRACKING_EVENT>(),
3793 1usize,
3794 concat!("Alignment of ", stringify!(_LEAP_TRACKING_EVENT))
3795 );
3796 fn test_field_info() {
3797 assert_eq!(
3798 unsafe {
3799 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_EVENT>::uninit();
3800 let ptr = uninit.as_ptr();
3801 ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize
3802 },
3803 0usize,
3804 concat!(
3805 "Offset of field: ",
3806 stringify!(_LEAP_TRACKING_EVENT),
3807 "::",
3808 stringify!(info)
3809 )
3810 );
3811 }
3812 test_field_info();
3813 fn test_field_tracking_frame_id() {
3814 assert_eq!(
3815 unsafe {
3816 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_EVENT>::uninit();
3817 let ptr = uninit.as_ptr();
3818 ::std::ptr::addr_of!((*ptr).tracking_frame_id) as usize - ptr as usize
3819 },
3820 24usize,
3821 concat!(
3822 "Offset of field: ",
3823 stringify!(_LEAP_TRACKING_EVENT),
3824 "::",
3825 stringify!(tracking_frame_id)
3826 )
3827 );
3828 }
3829 test_field_tracking_frame_id();
3830 fn test_field_nHands() {
3831 assert_eq!(
3832 unsafe {
3833 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_EVENT>::uninit();
3834 let ptr = uninit.as_ptr();
3835 ::std::ptr::addr_of!((*ptr).nHands) as usize - ptr as usize
3836 },
3837 32usize,
3838 concat!(
3839 "Offset of field: ",
3840 stringify!(_LEAP_TRACKING_EVENT),
3841 "::",
3842 stringify!(nHands)
3843 )
3844 );
3845 }
3846 test_field_nHands();
3847 fn test_field_pHands() {
3848 assert_eq!(
3849 unsafe {
3850 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_EVENT>::uninit();
3851 let ptr = uninit.as_ptr();
3852 ::std::ptr::addr_of!((*ptr).pHands) as usize - ptr as usize
3853 },
3854 36usize,
3855 concat!(
3856 "Offset of field: ",
3857 stringify!(_LEAP_TRACKING_EVENT),
3858 "::",
3859 stringify!(pHands)
3860 )
3861 );
3862 }
3863 test_field_pHands();
3864 fn test_field_framerate() {
3865 assert_eq!(
3866 unsafe {
3867 let uninit = ::std::mem::MaybeUninit::<_LEAP_TRACKING_EVENT>::uninit();
3868 let ptr = uninit.as_ptr();
3869 ::std::ptr::addr_of!((*ptr).framerate) as usize - ptr as usize
3870 },
3871 44usize,
3872 concat!(
3873 "Offset of field: ",
3874 stringify!(_LEAP_TRACKING_EVENT),
3875 "::",
3876 stringify!(framerate)
3877 )
3878 );
3879 }
3880 test_field_framerate();
3881}
3882#[doc = " \\ingroup Structs"]
3883#[doc = " A snapshot, or frame of data, containing the tracking data for a single moment in time."]
3884#[doc = " The LEAP_FRAME struct is the container for all the tracking data."]
3885#[doc = " @since 3.0.0"]
3886pub type LEAP_TRACKING_EVENT = _LEAP_TRACKING_EVENT;
3887#[doc = " The message severity is not known or was not specified. @since 3.0.0"]
3888pub const _eLeapLogSeverity_eLeapLogSeverity_Unknown: _eLeapLogSeverity = 0;
3889#[doc = " A message about a fault that could render the software or device non-functional. @since 3.0.0"]
3890pub const _eLeapLogSeverity_eLeapLogSeverity_Critical: _eLeapLogSeverity = 1;
3891#[doc = " A message warning about a condition that could degrade device capabilities. @since 3.0.0"]
3892pub const _eLeapLogSeverity_eLeapLogSeverity_Warning: _eLeapLogSeverity = 2;
3893#[doc = " A system status message. @since 3.0.0"]
3894pub const _eLeapLogSeverity_eLeapLogSeverity_Information: _eLeapLogSeverity = 3;
3895#[doc = " \\ingroup Enum"]
3896#[doc = " System message severity types. @since 3.0.0"]
3897pub type _eLeapLogSeverity = ::std::os::raw::c_int;
3898#[doc = " \\ingroup Enum"]
3899#[doc = " System message severity types. @since 3.0.0"]
3900pub use self::_eLeapLogSeverity as eLeapLogSeverity;
3901#[doc = " \\ingroup Structs"]
3902#[doc = " A system log message. @since 3.0.0"]
3903#[repr(C, packed)]
3904#[derive(Debug, Copy, Clone)]
3905pub struct _LEAP_LOG_EVENT {
3906 #[doc = " The type of message. @since 4.0.0"]
3907 pub severity: eLeapLogSeverity,
3908 #[doc = " The timestamp of the message in microseconds."]
3909 #[doc = " Compare with the current values of LeapGetNow() and the system clock to"]
3910 #[doc = " calculate the absolute time of the message."]
3911 #[doc = " @since 4.0.0"]
3912 pub timestamp: i64,
3913 #[doc = " A pointer to a null-terminated string containing the current log message."]
3914 #[doc = " @since 4.0.0"]
3915 pub message: *const ::std::os::raw::c_char,
3916}
3917#[test]
3918fn bindgen_test_layout__LEAP_LOG_EVENT() {
3919 assert_eq!(
3920 ::std::mem::size_of::<_LEAP_LOG_EVENT>(),
3921 20usize,
3922 concat!("Size of: ", stringify!(_LEAP_LOG_EVENT))
3923 );
3924 assert_eq!(
3925 ::std::mem::align_of::<_LEAP_LOG_EVENT>(),
3926 1usize,
3927 concat!("Alignment of ", stringify!(_LEAP_LOG_EVENT))
3928 );
3929 fn test_field_severity() {
3930 assert_eq!(
3931 unsafe {
3932 let uninit = ::std::mem::MaybeUninit::<_LEAP_LOG_EVENT>::uninit();
3933 let ptr = uninit.as_ptr();
3934 ::std::ptr::addr_of!((*ptr).severity) as usize - ptr as usize
3935 },
3936 0usize,
3937 concat!(
3938 "Offset of field: ",
3939 stringify!(_LEAP_LOG_EVENT),
3940 "::",
3941 stringify!(severity)
3942 )
3943 );
3944 }
3945 test_field_severity();
3946 fn test_field_timestamp() {
3947 assert_eq!(
3948 unsafe {
3949 let uninit = ::std::mem::MaybeUninit::<_LEAP_LOG_EVENT>::uninit();
3950 let ptr = uninit.as_ptr();
3951 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
3952 },
3953 4usize,
3954 concat!(
3955 "Offset of field: ",
3956 stringify!(_LEAP_LOG_EVENT),
3957 "::",
3958 stringify!(timestamp)
3959 )
3960 );
3961 }
3962 test_field_timestamp();
3963 fn test_field_message() {
3964 assert_eq!(
3965 unsafe {
3966 let uninit = ::std::mem::MaybeUninit::<_LEAP_LOG_EVENT>::uninit();
3967 let ptr = uninit.as_ptr();
3968 ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize
3969 },
3970 12usize,
3971 concat!(
3972 "Offset of field: ",
3973 stringify!(_LEAP_LOG_EVENT),
3974 "::",
3975 stringify!(message)
3976 )
3977 );
3978 }
3979 test_field_message();
3980}
3981#[doc = " \\ingroup Structs"]
3982#[doc = " A system log message. @since 3.0.0"]
3983pub type LEAP_LOG_EVENT = _LEAP_LOG_EVENT;
3984#[repr(C, packed)]
3985#[derive(Debug, Copy, Clone)]
3986pub struct _LEAP_LOG_EVENTS {
3987 #[doc = " The number of log events being pointed to by the events field."]
3988 #[doc = " @since 4.0.0"]
3989 pub nEvents: u32,
3990 #[doc = " An array of ``nEvent`` LEAP_LOG_EVENT structures."]
3991 #[doc = " @since 4.0.0"]
3992 pub events: *mut LEAP_LOG_EVENT,
3993}
3994#[test]
3995fn bindgen_test_layout__LEAP_LOG_EVENTS() {
3996 assert_eq!(
3997 ::std::mem::size_of::<_LEAP_LOG_EVENTS>(),
3998 12usize,
3999 concat!("Size of: ", stringify!(_LEAP_LOG_EVENTS))
4000 );
4001 assert_eq!(
4002 ::std::mem::align_of::<_LEAP_LOG_EVENTS>(),
4003 1usize,
4004 concat!("Alignment of ", stringify!(_LEAP_LOG_EVENTS))
4005 );
4006 fn test_field_nEvents() {
4007 assert_eq!(
4008 unsafe {
4009 let uninit = ::std::mem::MaybeUninit::<_LEAP_LOG_EVENTS>::uninit();
4010 let ptr = uninit.as_ptr();
4011 ::std::ptr::addr_of!((*ptr).nEvents) as usize - ptr as usize
4012 },
4013 0usize,
4014 concat!(
4015 "Offset of field: ",
4016 stringify!(_LEAP_LOG_EVENTS),
4017 "::",
4018 stringify!(nEvents)
4019 )
4020 );
4021 }
4022 test_field_nEvents();
4023 fn test_field_events() {
4024 assert_eq!(
4025 unsafe {
4026 let uninit = ::std::mem::MaybeUninit::<_LEAP_LOG_EVENTS>::uninit();
4027 let ptr = uninit.as_ptr();
4028 ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize
4029 },
4030 4usize,
4031 concat!(
4032 "Offset of field: ",
4033 stringify!(_LEAP_LOG_EVENTS),
4034 "::",
4035 stringify!(events)
4036 )
4037 );
4038 }
4039 test_field_events();
4040}
4041pub type LEAP_LOG_EVENTS = _LEAP_LOG_EVENTS;
4042#[doc = " \\ingroup Structs"]
4043#[doc = " A notification that a device's status has changed. One of these messages is received by the client"]
4044#[doc = " as soon as the service is connected, or when a new device is attached."]
4045#[doc = " @since 3.1.3"]
4046#[repr(C, packed)]
4047#[derive(Debug, Copy, Clone)]
4048pub struct _LEAP_DEVICE_STATUS_CHANGE_EVENT {
4049 #[doc = " A reference to the device whose status has changed"]
4050 pub device: LEAP_DEVICE_REF,
4051 #[doc = " The last known status of the device. This is a combination of eLeapDeviceStatus flags. @since 3.1.3"]
4052 pub last_status: u32,
4053 #[doc = " The current status of the device. This is a combination of eLeapDeviceStatus flags. @since 3.1.3"]
4054 pub status: u32,
4055}
4056#[test]
4057fn bindgen_test_layout__LEAP_DEVICE_STATUS_CHANGE_EVENT() {
4058 assert_eq!(
4059 ::std::mem::size_of::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>(),
4060 20usize,
4061 concat!("Size of: ", stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT))
4062 );
4063 assert_eq!(
4064 ::std::mem::align_of::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>(),
4065 1usize,
4066 concat!(
4067 "Alignment of ",
4068 stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT)
4069 )
4070 );
4071 fn test_field_device() {
4072 assert_eq!(
4073 unsafe {
4074 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>::uninit();
4075 let ptr = uninit.as_ptr();
4076 ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize
4077 },
4078 0usize,
4079 concat!(
4080 "Offset of field: ",
4081 stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT),
4082 "::",
4083 stringify!(device)
4084 )
4085 );
4086 }
4087 test_field_device();
4088 fn test_field_last_status() {
4089 assert_eq!(
4090 unsafe {
4091 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>::uninit();
4092 let ptr = uninit.as_ptr();
4093 ::std::ptr::addr_of!((*ptr).last_status) as usize - ptr as usize
4094 },
4095 12usize,
4096 concat!(
4097 "Offset of field: ",
4098 stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT),
4099 "::",
4100 stringify!(last_status)
4101 )
4102 );
4103 }
4104 test_field_last_status();
4105 fn test_field_status() {
4106 assert_eq!(
4107 unsafe {
4108 let uninit = ::std::mem::MaybeUninit::<_LEAP_DEVICE_STATUS_CHANGE_EVENT>::uninit();
4109 let ptr = uninit.as_ptr();
4110 ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize
4111 },
4112 16usize,
4113 concat!(
4114 "Offset of field: ",
4115 stringify!(_LEAP_DEVICE_STATUS_CHANGE_EVENT),
4116 "::",
4117 stringify!(status)
4118 )
4119 );
4120 }
4121 test_field_status();
4122}
4123#[doc = " \\ingroup Structs"]
4124#[doc = " A notification that a device's status has changed. One of these messages is received by the client"]
4125#[doc = " as soon as the service is connected, or when a new device is attached."]
4126#[doc = " @since 3.1.3"]
4127pub type LEAP_DEVICE_STATUS_CHANGE_EVENT = _LEAP_DEVICE_STATUS_CHANGE_EVENT;
4128pub const _eLeapDroppedFrameType_eLeapDroppedFrameType_PreprocessingQueue: _eLeapDroppedFrameType =
4129 0;
4130pub const _eLeapDroppedFrameType_eLeapDroppedFrameType_TrackingQueue: _eLeapDroppedFrameType = 1;
4131pub const _eLeapDroppedFrameType_eLeapDroppedFrameType_Other: _eLeapDroppedFrameType = 2;
4132pub type _eLeapDroppedFrameType = ::std::os::raw::c_int;
4133pub use self::_eLeapDroppedFrameType as eLeapDroppedFrameType;
4134#[repr(C, packed)]
4135#[derive(Debug, Copy, Clone)]
4136pub struct _LEAP_DROPPED_FRAME_EVENT {
4137 pub frame_id: i64,
4138 pub type_: eLeapDroppedFrameType,
4139}
4140#[test]
4141fn bindgen_test_layout__LEAP_DROPPED_FRAME_EVENT() {
4142 assert_eq!(
4143 ::std::mem::size_of::<_LEAP_DROPPED_FRAME_EVENT>(),
4144 12usize,
4145 concat!("Size of: ", stringify!(_LEAP_DROPPED_FRAME_EVENT))
4146 );
4147 assert_eq!(
4148 ::std::mem::align_of::<_LEAP_DROPPED_FRAME_EVENT>(),
4149 1usize,
4150 concat!("Alignment of ", stringify!(_LEAP_DROPPED_FRAME_EVENT))
4151 );
4152 fn test_field_frame_id() {
4153 assert_eq!(
4154 unsafe {
4155 let uninit = ::std::mem::MaybeUninit::<_LEAP_DROPPED_FRAME_EVENT>::uninit();
4156 let ptr = uninit.as_ptr();
4157 ::std::ptr::addr_of!((*ptr).frame_id) as usize - ptr as usize
4158 },
4159 0usize,
4160 concat!(
4161 "Offset of field: ",
4162 stringify!(_LEAP_DROPPED_FRAME_EVENT),
4163 "::",
4164 stringify!(frame_id)
4165 )
4166 );
4167 }
4168 test_field_frame_id();
4169 fn test_field_type() {
4170 assert_eq!(
4171 unsafe {
4172 let uninit = ::std::mem::MaybeUninit::<_LEAP_DROPPED_FRAME_EVENT>::uninit();
4173 let ptr = uninit.as_ptr();
4174 ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize
4175 },
4176 8usize,
4177 concat!(
4178 "Offset of field: ",
4179 stringify!(_LEAP_DROPPED_FRAME_EVENT),
4180 "::",
4181 stringify!(type_)
4182 )
4183 );
4184 }
4185 test_field_type();
4186}
4187pub type LEAP_DROPPED_FRAME_EVENT = _LEAP_DROPPED_FRAME_EVENT;
4188#[doc = " \\ingroup Structs"]
4189#[doc = " An image associated with a frame of data."]
4190#[doc = " @since 4.0.0"]
4191#[repr(C, packed)]
4192#[derive(Debug, Copy, Clone)]
4193pub struct _LEAP_IMAGE {
4194 #[doc = " The properties of the received image."]
4195 pub properties: LEAP_IMAGE_PROPERTIES,
4196 #[doc = " A version number for the distortion matrix. When the distortion matrix"]
4197 #[doc = " changes, this number is updated. This number is guaranteed not to repeat"]
4198 #[doc = " for the lifetime of the connection. This version number is also guaranteed"]
4199 #[doc = " to be distinct for each perspective of an image."]
4200 #[doc = ""]
4201 #[doc = " This value is guaranteed to be nonzero if it is valid."]
4202 #[doc = ""]
4203 #[doc = " The distortion matrix only changes when the streaming device changes or when the"]
4204 #[doc = " device orientation flips -- inverting the image and the distortion grid."]
4205 #[doc = " Since building a matrix to undistort an image can be a time-consuming task,"]
4206 #[doc = " you can optimize the process by only rebuilding this matrix (or whatever"]
4207 #[doc = " data type you use to correct image distortion) when the grid actually changes."]
4208 pub matrix_version: u64,
4209 #[doc = " Pointers to the camera's distortion matrix."]
4210 pub distortion_matrix: *mut LEAP_DISTORTION_MATRIX,
4211 #[doc = " A pointer to the image data."]
4212 pub data: *mut ::std::os::raw::c_void,
4213 #[doc = " Offset, in bytes, from the beginning of the data ptr to the actual beginning of the image data"]
4214 pub offset: u32,
4215}
4216#[test]
4217fn bindgen_test_layout__LEAP_IMAGE() {
4218 assert_eq!(
4219 ::std::mem::size_of::<_LEAP_IMAGE>(),
4220 64usize,
4221 concat!("Size of: ", stringify!(_LEAP_IMAGE))
4222 );
4223 assert_eq!(
4224 ::std::mem::align_of::<_LEAP_IMAGE>(),
4225 1usize,
4226 concat!("Alignment of ", stringify!(_LEAP_IMAGE))
4227 );
4228 fn test_field_properties() {
4229 assert_eq!(
4230 unsafe {
4231 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE>::uninit();
4232 let ptr = uninit.as_ptr();
4233 ::std::ptr::addr_of!((*ptr).properties) as usize - ptr as usize
4234 },
4235 0usize,
4236 concat!(
4237 "Offset of field: ",
4238 stringify!(_LEAP_IMAGE),
4239 "::",
4240 stringify!(properties)
4241 )
4242 );
4243 }
4244 test_field_properties();
4245 fn test_field_matrix_version() {
4246 assert_eq!(
4247 unsafe {
4248 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE>::uninit();
4249 let ptr = uninit.as_ptr();
4250 ::std::ptr::addr_of!((*ptr).matrix_version) as usize - ptr as usize
4251 },
4252 36usize,
4253 concat!(
4254 "Offset of field: ",
4255 stringify!(_LEAP_IMAGE),
4256 "::",
4257 stringify!(matrix_version)
4258 )
4259 );
4260 }
4261 test_field_matrix_version();
4262 fn test_field_distortion_matrix() {
4263 assert_eq!(
4264 unsafe {
4265 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE>::uninit();
4266 let ptr = uninit.as_ptr();
4267 ::std::ptr::addr_of!((*ptr).distortion_matrix) as usize - ptr as usize
4268 },
4269 44usize,
4270 concat!(
4271 "Offset of field: ",
4272 stringify!(_LEAP_IMAGE),
4273 "::",
4274 stringify!(distortion_matrix)
4275 )
4276 );
4277 }
4278 test_field_distortion_matrix();
4279 fn test_field_data() {
4280 assert_eq!(
4281 unsafe {
4282 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE>::uninit();
4283 let ptr = uninit.as_ptr();
4284 ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize
4285 },
4286 52usize,
4287 concat!(
4288 "Offset of field: ",
4289 stringify!(_LEAP_IMAGE),
4290 "::",
4291 stringify!(data)
4292 )
4293 );
4294 }
4295 test_field_data();
4296 fn test_field_offset() {
4297 assert_eq!(
4298 unsafe {
4299 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE>::uninit();
4300 let ptr = uninit.as_ptr();
4301 ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize
4302 },
4303 60usize,
4304 concat!(
4305 "Offset of field: ",
4306 stringify!(_LEAP_IMAGE),
4307 "::",
4308 stringify!(offset)
4309 )
4310 );
4311 }
4312 test_field_offset();
4313}
4314#[doc = " \\ingroup Structs"]
4315#[doc = " An image associated with a frame of data."]
4316#[doc = " @since 4.0.0"]
4317pub type LEAP_IMAGE = _LEAP_IMAGE;
4318#[repr(C, packed)]
4319#[derive(Debug, Copy, Clone)]
4320pub struct _LEAP_POINT_MAPPING_CHANGE_EVENT {
4321 #[doc = " The ID of the frame corresponding to the source of the currently tracked points. @since 4.0.0"]
4322 pub frame_id: i64,
4323 #[doc = " The timestamp of the frame, in microseconds, referenced against LeapGetNow(). @since 4.0.0"]
4324 pub timestamp: i64,
4325 #[doc = " The number of points being tracked. @since 4.0.0"]
4326 pub nPoints: u32,
4327}
4328#[test]
4329fn bindgen_test_layout__LEAP_POINT_MAPPING_CHANGE_EVENT() {
4330 assert_eq!(
4331 ::std::mem::size_of::<_LEAP_POINT_MAPPING_CHANGE_EVENT>(),
4332 20usize,
4333 concat!("Size of: ", stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT))
4334 );
4335 assert_eq!(
4336 ::std::mem::align_of::<_LEAP_POINT_MAPPING_CHANGE_EVENT>(),
4337 1usize,
4338 concat!(
4339 "Alignment of ",
4340 stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT)
4341 )
4342 );
4343 fn test_field_frame_id() {
4344 assert_eq!(
4345 unsafe {
4346 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING_CHANGE_EVENT>::uninit();
4347 let ptr = uninit.as_ptr();
4348 ::std::ptr::addr_of!((*ptr).frame_id) as usize - ptr as usize
4349 },
4350 0usize,
4351 concat!(
4352 "Offset of field: ",
4353 stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT),
4354 "::",
4355 stringify!(frame_id)
4356 )
4357 );
4358 }
4359 test_field_frame_id();
4360 fn test_field_timestamp() {
4361 assert_eq!(
4362 unsafe {
4363 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING_CHANGE_EVENT>::uninit();
4364 let ptr = uninit.as_ptr();
4365 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
4366 },
4367 8usize,
4368 concat!(
4369 "Offset of field: ",
4370 stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT),
4371 "::",
4372 stringify!(timestamp)
4373 )
4374 );
4375 }
4376 test_field_timestamp();
4377 fn test_field_nPoints() {
4378 assert_eq!(
4379 unsafe {
4380 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING_CHANGE_EVENT>::uninit();
4381 let ptr = uninit.as_ptr();
4382 ::std::ptr::addr_of!((*ptr).nPoints) as usize - ptr as usize
4383 },
4384 16usize,
4385 concat!(
4386 "Offset of field: ",
4387 stringify!(_LEAP_POINT_MAPPING_CHANGE_EVENT),
4388 "::",
4389 stringify!(nPoints)
4390 )
4391 );
4392 }
4393 test_field_nPoints();
4394}
4395pub type LEAP_POINT_MAPPING_CHANGE_EVENT = _LEAP_POINT_MAPPING_CHANGE_EVENT;
4396#[repr(C, packed)]
4397#[derive(Debug, Copy, Clone)]
4398pub struct _LEAP_POINT_MAPPING {
4399 #[doc = " The ID of the frame corresponding to the source of the currently tracked points. @since 4.0.0"]
4400 pub frame_id: i64,
4401 #[doc = " The timestamp of the frame, in microseconds, referenced against LeapGetNow(). @since 4.0.0"]
4402 pub timestamp: i64,
4403 #[doc = " The number of points being tracked. @since 4.0.0"]
4404 pub nPoints: u32,
4405 #[doc = " The 3D points being mapped. @since 4.0.0"]
4406 pub pPoints: *mut LEAP_VECTOR,
4407 #[doc = " The IDs of the 3D points being mapped. @since 4.0.0"]
4408 pub pIDs: *mut u32,
4409}
4410#[test]
4411fn bindgen_test_layout__LEAP_POINT_MAPPING() {
4412 assert_eq!(
4413 ::std::mem::size_of::<_LEAP_POINT_MAPPING>(),
4414 36usize,
4415 concat!("Size of: ", stringify!(_LEAP_POINT_MAPPING))
4416 );
4417 assert_eq!(
4418 ::std::mem::align_of::<_LEAP_POINT_MAPPING>(),
4419 1usize,
4420 concat!("Alignment of ", stringify!(_LEAP_POINT_MAPPING))
4421 );
4422 fn test_field_frame_id() {
4423 assert_eq!(
4424 unsafe {
4425 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING>::uninit();
4426 let ptr = uninit.as_ptr();
4427 ::std::ptr::addr_of!((*ptr).frame_id) as usize - ptr as usize
4428 },
4429 0usize,
4430 concat!(
4431 "Offset of field: ",
4432 stringify!(_LEAP_POINT_MAPPING),
4433 "::",
4434 stringify!(frame_id)
4435 )
4436 );
4437 }
4438 test_field_frame_id();
4439 fn test_field_timestamp() {
4440 assert_eq!(
4441 unsafe {
4442 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING>::uninit();
4443 let ptr = uninit.as_ptr();
4444 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
4445 },
4446 8usize,
4447 concat!(
4448 "Offset of field: ",
4449 stringify!(_LEAP_POINT_MAPPING),
4450 "::",
4451 stringify!(timestamp)
4452 )
4453 );
4454 }
4455 test_field_timestamp();
4456 fn test_field_nPoints() {
4457 assert_eq!(
4458 unsafe {
4459 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING>::uninit();
4460 let ptr = uninit.as_ptr();
4461 ::std::ptr::addr_of!((*ptr).nPoints) as usize - ptr as usize
4462 },
4463 16usize,
4464 concat!(
4465 "Offset of field: ",
4466 stringify!(_LEAP_POINT_MAPPING),
4467 "::",
4468 stringify!(nPoints)
4469 )
4470 );
4471 }
4472 test_field_nPoints();
4473 fn test_field_pPoints() {
4474 assert_eq!(
4475 unsafe {
4476 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING>::uninit();
4477 let ptr = uninit.as_ptr();
4478 ::std::ptr::addr_of!((*ptr).pPoints) as usize - ptr as usize
4479 },
4480 20usize,
4481 concat!(
4482 "Offset of field: ",
4483 stringify!(_LEAP_POINT_MAPPING),
4484 "::",
4485 stringify!(pPoints)
4486 )
4487 );
4488 }
4489 test_field_pPoints();
4490 fn test_field_pIDs() {
4491 assert_eq!(
4492 unsafe {
4493 let uninit = ::std::mem::MaybeUninit::<_LEAP_POINT_MAPPING>::uninit();
4494 let ptr = uninit.as_ptr();
4495 ::std::ptr::addr_of!((*ptr).pIDs) as usize - ptr as usize
4496 },
4497 28usize,
4498 concat!(
4499 "Offset of field: ",
4500 stringify!(_LEAP_POINT_MAPPING),
4501 "::",
4502 stringify!(pIDs)
4503 )
4504 );
4505 }
4506 test_field_pIDs();
4507}
4508pub type LEAP_POINT_MAPPING = _LEAP_POINT_MAPPING;
4509#[repr(C, packed)]
4510#[derive(Copy, Clone)]
4511pub struct _LEAP_HEAD_POSE_EVENT {
4512 #[doc = " The timestamp for this image, in microseconds, referenced against LeapGetNow()."]
4513 #[doc = " @since 4.1.0"]
4514 pub timestamp: i64,
4515 #[doc = " The position and orientation of the user's head. Positional tracking must be enabled."]
4516 #[doc = " @since 4.1.0"]
4517 pub head_position: LEAP_VECTOR,
4518 pub head_orientation: LEAP_QUATERNION,
4519 #[doc = " The linear and angular velocity of the user's head. Positional tracking must be enabled."]
4520 #[doc = " @since 4.1.0"]
4521 pub head_linear_velocity: LEAP_VECTOR,
4522 pub head_angular_velocity: LEAP_VECTOR,
4523}
4524#[test]
4525fn bindgen_test_layout__LEAP_HEAD_POSE_EVENT() {
4526 assert_eq!(
4527 ::std::mem::size_of::<_LEAP_HEAD_POSE_EVENT>(),
4528 60usize,
4529 concat!("Size of: ", stringify!(_LEAP_HEAD_POSE_EVENT))
4530 );
4531 assert_eq!(
4532 ::std::mem::align_of::<_LEAP_HEAD_POSE_EVENT>(),
4533 1usize,
4534 concat!("Alignment of ", stringify!(_LEAP_HEAD_POSE_EVENT))
4535 );
4536 fn test_field_timestamp() {
4537 assert_eq!(
4538 unsafe {
4539 let uninit = ::std::mem::MaybeUninit::<_LEAP_HEAD_POSE_EVENT>::uninit();
4540 let ptr = uninit.as_ptr();
4541 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
4542 },
4543 0usize,
4544 concat!(
4545 "Offset of field: ",
4546 stringify!(_LEAP_HEAD_POSE_EVENT),
4547 "::",
4548 stringify!(timestamp)
4549 )
4550 );
4551 }
4552 test_field_timestamp();
4553 fn test_field_head_position() {
4554 assert_eq!(
4555 unsafe {
4556 let uninit = ::std::mem::MaybeUninit::<_LEAP_HEAD_POSE_EVENT>::uninit();
4557 let ptr = uninit.as_ptr();
4558 ::std::ptr::addr_of!((*ptr).head_position) as usize - ptr as usize
4559 },
4560 8usize,
4561 concat!(
4562 "Offset of field: ",
4563 stringify!(_LEAP_HEAD_POSE_EVENT),
4564 "::",
4565 stringify!(head_position)
4566 )
4567 );
4568 }
4569 test_field_head_position();
4570 fn test_field_head_orientation() {
4571 assert_eq!(
4572 unsafe {
4573 let uninit = ::std::mem::MaybeUninit::<_LEAP_HEAD_POSE_EVENT>::uninit();
4574 let ptr = uninit.as_ptr();
4575 ::std::ptr::addr_of!((*ptr).head_orientation) as usize - ptr as usize
4576 },
4577 20usize,
4578 concat!(
4579 "Offset of field: ",
4580 stringify!(_LEAP_HEAD_POSE_EVENT),
4581 "::",
4582 stringify!(head_orientation)
4583 )
4584 );
4585 }
4586 test_field_head_orientation();
4587 fn test_field_head_linear_velocity() {
4588 assert_eq!(
4589 unsafe {
4590 let uninit = ::std::mem::MaybeUninit::<_LEAP_HEAD_POSE_EVENT>::uninit();
4591 let ptr = uninit.as_ptr();
4592 ::std::ptr::addr_of!((*ptr).head_linear_velocity) as usize - ptr as usize
4593 },
4594 36usize,
4595 concat!(
4596 "Offset of field: ",
4597 stringify!(_LEAP_HEAD_POSE_EVENT),
4598 "::",
4599 stringify!(head_linear_velocity)
4600 )
4601 );
4602 }
4603 test_field_head_linear_velocity();
4604 fn test_field_head_angular_velocity() {
4605 assert_eq!(
4606 unsafe {
4607 let uninit = ::std::mem::MaybeUninit::<_LEAP_HEAD_POSE_EVENT>::uninit();
4608 let ptr = uninit.as_ptr();
4609 ::std::ptr::addr_of!((*ptr).head_angular_velocity) as usize - ptr as usize
4610 },
4611 48usize,
4612 concat!(
4613 "Offset of field: ",
4614 stringify!(_LEAP_HEAD_POSE_EVENT),
4615 "::",
4616 stringify!(head_angular_velocity)
4617 )
4618 );
4619 }
4620 test_field_head_angular_velocity();
4621}
4622pub type LEAP_HEAD_POSE_EVENT = _LEAP_HEAD_POSE_EVENT;
4623#[repr(C, packed)]
4624#[derive(Copy, Clone)]
4625pub struct _LEAP_EYE_EVENT {
4626 #[doc = " The ID of the frame corresponding to the source of the currently tracked"]
4627 #[doc = " eye positions."]
4628 #[doc = " @since 4.1.0"]
4629 pub frame_id: i64,
4630 #[doc = " The timestamp for this image, in microseconds, referenced against"]
4631 #[doc = " LeapGetNow()."]
4632 #[doc = " @since 4.1.0"]
4633 pub timestamp: i64,
4634 #[doc = " The position of the user's left eye."]
4635 #[doc = " @since 4.1.0"]
4636 pub left_eye_position: LEAP_VECTOR,
4637 #[doc = " The position of the user's right eye."]
4638 #[doc = " @since 4.1.0"]
4639 pub right_eye_position: LEAP_VECTOR,
4640 #[doc = " An error estimate of the tracked left eye position. Higher values indicate"]
4641 #[doc = " uncertain tracking and a higher likelihood of there being no such eye in"]
4642 #[doc = " view of the sensor."]
4643 #[doc = " @since 4.1.0"]
4644 pub left_eye_estimated_error: f32,
4645 #[doc = " An error estimate of the tracked right eye position. Higher values indicate"]
4646 #[doc = " uncertain tracking and a higher likelihood of there being no such eye in"]
4647 #[doc = " view of the sensor."]
4648 #[doc = " @since 4.1.0"]
4649 pub right_eye_estimated_error: f32,
4650}
4651#[test]
4652fn bindgen_test_layout__LEAP_EYE_EVENT() {
4653 assert_eq!(
4654 ::std::mem::size_of::<_LEAP_EYE_EVENT>(),
4655 48usize,
4656 concat!("Size of: ", stringify!(_LEAP_EYE_EVENT))
4657 );
4658 assert_eq!(
4659 ::std::mem::align_of::<_LEAP_EYE_EVENT>(),
4660 1usize,
4661 concat!("Alignment of ", stringify!(_LEAP_EYE_EVENT))
4662 );
4663 fn test_field_frame_id() {
4664 assert_eq!(
4665 unsafe {
4666 let uninit = ::std::mem::MaybeUninit::<_LEAP_EYE_EVENT>::uninit();
4667 let ptr = uninit.as_ptr();
4668 ::std::ptr::addr_of!((*ptr).frame_id) as usize - ptr as usize
4669 },
4670 0usize,
4671 concat!(
4672 "Offset of field: ",
4673 stringify!(_LEAP_EYE_EVENT),
4674 "::",
4675 stringify!(frame_id)
4676 )
4677 );
4678 }
4679 test_field_frame_id();
4680 fn test_field_timestamp() {
4681 assert_eq!(
4682 unsafe {
4683 let uninit = ::std::mem::MaybeUninit::<_LEAP_EYE_EVENT>::uninit();
4684 let ptr = uninit.as_ptr();
4685 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
4686 },
4687 8usize,
4688 concat!(
4689 "Offset of field: ",
4690 stringify!(_LEAP_EYE_EVENT),
4691 "::",
4692 stringify!(timestamp)
4693 )
4694 );
4695 }
4696 test_field_timestamp();
4697 fn test_field_left_eye_position() {
4698 assert_eq!(
4699 unsafe {
4700 let uninit = ::std::mem::MaybeUninit::<_LEAP_EYE_EVENT>::uninit();
4701 let ptr = uninit.as_ptr();
4702 ::std::ptr::addr_of!((*ptr).left_eye_position) as usize - ptr as usize
4703 },
4704 16usize,
4705 concat!(
4706 "Offset of field: ",
4707 stringify!(_LEAP_EYE_EVENT),
4708 "::",
4709 stringify!(left_eye_position)
4710 )
4711 );
4712 }
4713 test_field_left_eye_position();
4714 fn test_field_right_eye_position() {
4715 assert_eq!(
4716 unsafe {
4717 let uninit = ::std::mem::MaybeUninit::<_LEAP_EYE_EVENT>::uninit();
4718 let ptr = uninit.as_ptr();
4719 ::std::ptr::addr_of!((*ptr).right_eye_position) as usize - ptr as usize
4720 },
4721 28usize,
4722 concat!(
4723 "Offset of field: ",
4724 stringify!(_LEAP_EYE_EVENT),
4725 "::",
4726 stringify!(right_eye_position)
4727 )
4728 );
4729 }
4730 test_field_right_eye_position();
4731 fn test_field_left_eye_estimated_error() {
4732 assert_eq!(
4733 unsafe {
4734 let uninit = ::std::mem::MaybeUninit::<_LEAP_EYE_EVENT>::uninit();
4735 let ptr = uninit.as_ptr();
4736 ::std::ptr::addr_of!((*ptr).left_eye_estimated_error) as usize - ptr as usize
4737 },
4738 40usize,
4739 concat!(
4740 "Offset of field: ",
4741 stringify!(_LEAP_EYE_EVENT),
4742 "::",
4743 stringify!(left_eye_estimated_error)
4744 )
4745 );
4746 }
4747 test_field_left_eye_estimated_error();
4748 fn test_field_right_eye_estimated_error() {
4749 assert_eq!(
4750 unsafe {
4751 let uninit = ::std::mem::MaybeUninit::<_LEAP_EYE_EVENT>::uninit();
4752 let ptr = uninit.as_ptr();
4753 ::std::ptr::addr_of!((*ptr).right_eye_estimated_error) as usize - ptr as usize
4754 },
4755 44usize,
4756 concat!(
4757 "Offset of field: ",
4758 stringify!(_LEAP_EYE_EVENT),
4759 "::",
4760 stringify!(right_eye_estimated_error)
4761 )
4762 );
4763 }
4764 test_field_right_eye_estimated_error();
4765}
4766pub type LEAP_EYE_EVENT = _LEAP_EYE_EVENT;
4767#[doc = " Has accelerometer measurements. @since 4.1.0"]
4768pub const _eLeapIMUFlag_eLeapIMUFlag_HasAccelerometer: _eLeapIMUFlag = 1;
4769#[doc = " Has gyroscope measurements. @since 4.1.0"]
4770pub const _eLeapIMUFlag_eLeapIMUFlag_HasGyroscope: _eLeapIMUFlag = 2;
4771#[doc = " Has a temperature measurement. @since 4.1.0"]
4772pub const _eLeapIMUFlag_eLeapIMUFlag_HasTemperature: _eLeapIMUFlag = 4;
4773pub type _eLeapIMUFlag = ::std::os::raw::c_int;
4774pub use self::_eLeapIMUFlag as eLeapIMUFlag;
4775#[repr(C, packed)]
4776#[derive(Copy, Clone)]
4777pub struct _LEAP_IMU_EVENT {
4778 #[doc = " The timestamp for these measurements, in microseconds, referenced against"]
4779 #[doc = " LeapGetNow()."]
4780 #[doc = " @since 4.1.0"]
4781 pub timestamp: i64,
4782 #[doc = " The timestamp for these measurements, in microseconds, referenced against"]
4783 #[doc = " the device's internal clock."]
4784 #[doc = " @since 4.1.0"]
4785 pub timestamp_hw: i64,
4786 #[doc = " A combination of eLeapIMUFlag flags."]
4787 #[doc = " @since 4.1.0"]
4788 pub flags: u32,
4789 #[doc = " The accelerometer measurements, in m/s^2."]
4790 #[doc = " @since 4.1.0"]
4791 pub accelerometer: LEAP_VECTOR,
4792 #[doc = " The gyroscope measurements, in rad/s."]
4793 #[doc = " @since 4.1.0"]
4794 pub gyroscope: LEAP_VECTOR,
4795 #[doc = " The measured temperature, in deg C."]
4796 #[doc = " @since 4.1.0"]
4797 pub temperature: f32,
4798}
4799#[test]
4800fn bindgen_test_layout__LEAP_IMU_EVENT() {
4801 assert_eq!(
4802 ::std::mem::size_of::<_LEAP_IMU_EVENT>(),
4803 48usize,
4804 concat!("Size of: ", stringify!(_LEAP_IMU_EVENT))
4805 );
4806 assert_eq!(
4807 ::std::mem::align_of::<_LEAP_IMU_EVENT>(),
4808 1usize,
4809 concat!("Alignment of ", stringify!(_LEAP_IMU_EVENT))
4810 );
4811 fn test_field_timestamp() {
4812 assert_eq!(
4813 unsafe {
4814 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMU_EVENT>::uninit();
4815 let ptr = uninit.as_ptr();
4816 ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize
4817 },
4818 0usize,
4819 concat!(
4820 "Offset of field: ",
4821 stringify!(_LEAP_IMU_EVENT),
4822 "::",
4823 stringify!(timestamp)
4824 )
4825 );
4826 }
4827 test_field_timestamp();
4828 fn test_field_timestamp_hw() {
4829 assert_eq!(
4830 unsafe {
4831 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMU_EVENT>::uninit();
4832 let ptr = uninit.as_ptr();
4833 ::std::ptr::addr_of!((*ptr).timestamp_hw) as usize - ptr as usize
4834 },
4835 8usize,
4836 concat!(
4837 "Offset of field: ",
4838 stringify!(_LEAP_IMU_EVENT),
4839 "::",
4840 stringify!(timestamp_hw)
4841 )
4842 );
4843 }
4844 test_field_timestamp_hw();
4845 fn test_field_flags() {
4846 assert_eq!(
4847 unsafe {
4848 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMU_EVENT>::uninit();
4849 let ptr = uninit.as_ptr();
4850 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize
4851 },
4852 16usize,
4853 concat!(
4854 "Offset of field: ",
4855 stringify!(_LEAP_IMU_EVENT),
4856 "::",
4857 stringify!(flags)
4858 )
4859 );
4860 }
4861 test_field_flags();
4862 fn test_field_accelerometer() {
4863 assert_eq!(
4864 unsafe {
4865 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMU_EVENT>::uninit();
4866 let ptr = uninit.as_ptr();
4867 ::std::ptr::addr_of!((*ptr).accelerometer) as usize - ptr as usize
4868 },
4869 20usize,
4870 concat!(
4871 "Offset of field: ",
4872 stringify!(_LEAP_IMU_EVENT),
4873 "::",
4874 stringify!(accelerometer)
4875 )
4876 );
4877 }
4878 test_field_accelerometer();
4879 fn test_field_gyroscope() {
4880 assert_eq!(
4881 unsafe {
4882 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMU_EVENT>::uninit();
4883 let ptr = uninit.as_ptr();
4884 ::std::ptr::addr_of!((*ptr).gyroscope) as usize - ptr as usize
4885 },
4886 32usize,
4887 concat!(
4888 "Offset of field: ",
4889 stringify!(_LEAP_IMU_EVENT),
4890 "::",
4891 stringify!(gyroscope)
4892 )
4893 );
4894 }
4895 test_field_gyroscope();
4896 fn test_field_temperature() {
4897 assert_eq!(
4898 unsafe {
4899 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMU_EVENT>::uninit();
4900 let ptr = uninit.as_ptr();
4901 ::std::ptr::addr_of!((*ptr).temperature) as usize - ptr as usize
4902 },
4903 44usize,
4904 concat!(
4905 "Offset of field: ",
4906 stringify!(_LEAP_IMU_EVENT),
4907 "::",
4908 stringify!(temperature)
4909 )
4910 );
4911 }
4912 test_field_temperature();
4913}
4914pub type LEAP_IMU_EVENT = _LEAP_IMU_EVENT;
4915#[doc = " \\ingroup Structs"]
4916#[doc = " Streaming stereo image pairs from the device."]
4917#[doc = ""]
4918#[doc = " LeapPollConnection() produces this message when an image is available."]
4919#[doc = " The struct contains image properties, the distortion grid, and a pointer to"]
4920#[doc = " the buffer containing the image data -- which was allocated using the allocator"]
4921#[doc = " function passed to LeapC using the LeapSetAllocator."]
4922#[doc = " @since 4.0.0"]
4923#[repr(C, packed)]
4924#[derive(Debug, Copy, Clone)]
4925pub struct _LEAP_IMAGE_EVENT {
4926 #[doc = " The information header identifying the images tracking frame."]
4927 pub info: LEAP_FRAME_HEADER,
4928 #[doc = " The left and right images."]
4929 pub image: [LEAP_IMAGE; 2usize],
4930 #[doc = " For internal use only."]
4931 pub calib: LEAP_CALIBRATION,
4932}
4933#[test]
4934fn bindgen_test_layout__LEAP_IMAGE_EVENT() {
4935 assert_eq!(
4936 ::std::mem::size_of::<_LEAP_IMAGE_EVENT>(),
4937 160usize,
4938 concat!("Size of: ", stringify!(_LEAP_IMAGE_EVENT))
4939 );
4940 assert_eq!(
4941 ::std::mem::align_of::<_LEAP_IMAGE_EVENT>(),
4942 1usize,
4943 concat!("Alignment of ", stringify!(_LEAP_IMAGE_EVENT))
4944 );
4945 fn test_field_info() {
4946 assert_eq!(
4947 unsafe {
4948 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_EVENT>::uninit();
4949 let ptr = uninit.as_ptr();
4950 ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize
4951 },
4952 0usize,
4953 concat!(
4954 "Offset of field: ",
4955 stringify!(_LEAP_IMAGE_EVENT),
4956 "::",
4957 stringify!(info)
4958 )
4959 );
4960 }
4961 test_field_info();
4962 fn test_field_image() {
4963 assert_eq!(
4964 unsafe {
4965 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_EVENT>::uninit();
4966 let ptr = uninit.as_ptr();
4967 ::std::ptr::addr_of!((*ptr).image) as usize - ptr as usize
4968 },
4969 24usize,
4970 concat!(
4971 "Offset of field: ",
4972 stringify!(_LEAP_IMAGE_EVENT),
4973 "::",
4974 stringify!(image)
4975 )
4976 );
4977 }
4978 test_field_image();
4979 fn test_field_calib() {
4980 assert_eq!(
4981 unsafe {
4982 let uninit = ::std::mem::MaybeUninit::<_LEAP_IMAGE_EVENT>::uninit();
4983 let ptr = uninit.as_ptr();
4984 ::std::ptr::addr_of!((*ptr).calib) as usize - ptr as usize
4985 },
4986 152usize,
4987 concat!(
4988 "Offset of field: ",
4989 stringify!(_LEAP_IMAGE_EVENT),
4990 "::",
4991 stringify!(calib)
4992 )
4993 );
4994 }
4995 test_field_calib();
4996}
4997#[doc = " \\ingroup Structs"]
4998#[doc = " Streaming stereo image pairs from the device."]
4999#[doc = ""]
5000#[doc = " LeapPollConnection() produces this message when an image is available."]
5001#[doc = " The struct contains image properties, the distortion grid, and a pointer to"]
5002#[doc = " the buffer containing the image data -- which was allocated using the allocator"]
5003#[doc = " function passed to LeapC using the LeapSetAllocator."]
5004#[doc = " @since 4.0.0"]
5005pub type LEAP_IMAGE_EVENT = _LEAP_IMAGE_EVENT;
5006#[doc = " No event has occurred within the timeout period specified when calling LeapPollConnection()."]
5007#[doc = " @since 3.0.0"]
5008pub const _eLeapEventType_eLeapEventType_None: _eLeapEventType = 0;
5009#[doc = " A connection to the Ultraleap Tracking Service has been established."]
5010#[doc = " @since 3.0.0"]
5011pub const _eLeapEventType_eLeapEventType_Connection: _eLeapEventType = 1;
5012#[doc = " The connection to the Ultraleap Tracking Service has been lost."]
5013#[doc = " @since 3.0.0"]
5014pub const _eLeapEventType_eLeapEventType_ConnectionLost: _eLeapEventType = 2;
5015#[doc = " A device has been detected or plugged-in."]
5016#[doc = " A device event is dispatched after a connection is established for any"]
5017#[doc = " devices already plugged in. (The system currently only supports one"]
5018#[doc = " streaming device at a time.)"]
5019#[doc = " @since 3.0.0"]
5020pub const _eLeapEventType_eLeapEventType_Device: _eLeapEventType = 3;
5021#[doc = " A device has failed."]
5022#[doc = " Device failure could be caused by hardware failure, USB controller issues, or"]
5023#[doc = " other system instability. Note that unplugging a device generates an"]
5024#[doc = " eLeapEventType_DeviceLost event message, not a failure message."]
5025#[doc = " @since 3.0.0"]
5026pub const _eLeapEventType_eLeapEventType_DeviceFailure: _eLeapEventType = 4;
5027#[doc = " A policy change has occurred."]
5028#[doc = " This can be due to setting a policy with LeapSetPolicyFlags() or due to changing"]
5029#[doc = " or policy-related config settings, including images_mode."]
5030#[doc = " (A user can also change these policies using the Ultraleap Tracking Control Panel.)"]
5031#[doc = " @since 3.0.0"]
5032pub const _eLeapEventType_eLeapEventType_Policy: _eLeapEventType = 5;
5033#[doc = " A tracking frame. The message contains the tracking data for the frame."]
5034#[doc = " @since 3.0.0"]
5035pub const _eLeapEventType_eLeapEventType_Tracking: _eLeapEventType = 256;
5036#[doc = " The request for an image has failed."]
5037#[doc = " The message contains information about the failure. The client application"]
5038#[doc = " will not receive the requested image set."]
5039#[doc = " @since 3.0.0"]
5040pub const _eLeapEventType_eLeapEventType_ImageRequestError: _eLeapEventType = 257;
5041#[doc = " The request for an image is complete."]
5042#[doc = " The image data has been completely written to the application-provided"]
5043#[doc = " buffer."]
5044#[doc = " @since 3.0.0"]
5045pub const _eLeapEventType_eLeapEventType_ImageComplete: _eLeapEventType = 258;
5046#[doc = " A system message. @since 3.0.0"]
5047pub const _eLeapEventType_eLeapEventType_LogEvent: _eLeapEventType = 259;
5048#[doc = " The device connection has been lost."]
5049#[doc = ""]
5050#[doc = " This event is generally asserted when the device has been detached from the system, when the"]
5051#[doc = " connection to the service has been lost, or if the device is closed while streaming. Generally,"]
5052#[doc = " any event where the system can conclude no further frames will be received will result in this"]
5053#[doc = " message. The DeviceEvent field will be filled with the id of the formerly attached device."]
5054#[doc = " @since 3.0.0"]
5055pub const _eLeapEventType_eLeapEventType_DeviceLost: _eLeapEventType = 260;
5056#[doc = " The asynchronous response to a call to LeapRequestConfigValue()."]
5057#[doc = " Contains the value of requested configuration item."]
5058#[doc = " @since 3.0.0"]
5059pub const _eLeapEventType_eLeapEventType_ConfigResponse: _eLeapEventType = 261;
5060#[doc = " The asynchronous response to a call to LeapSaveConfigValue()."]
5061#[doc = " Reports whether the change succeeded or failed."]
5062#[doc = " @since 3.0.0"]
5063pub const _eLeapEventType_eLeapEventType_ConfigChange: _eLeapEventType = 262;
5064#[doc = " Notification that a status change has been detected on an attached device"]
5065#[doc = ""]
5066#[doc = " @since 3.1.3"]
5067pub const _eLeapEventType_eLeapEventType_DeviceStatusChange: _eLeapEventType = 263;
5068#[doc = " Notification that a status change has been detected on an attached device"]
5069#[doc = ""]
5070#[doc = " @since 3.1.3"]
5071pub const _eLeapEventType_eLeapEventType_DroppedFrame: _eLeapEventType = 264;
5072#[doc = " Notification that an unrequested stereo image pair is available"]
5073#[doc = ""]
5074#[doc = " @since 4.0.0"]
5075pub const _eLeapEventType_eLeapEventType_Image: _eLeapEventType = 265;
5076#[doc = " Notification that point mapping has changed"]
5077#[doc = ""]
5078#[doc = " @since 4.0.0"]
5079pub const _eLeapEventType_eLeapEventType_PointMappingChange: _eLeapEventType = 266;
5080#[doc = " A tracking mode change has occurred."]
5081#[doc = " This can be due to changing the hmd or screentop policy with LeapSetPolicyFlags()."]
5082#[doc = " or setting the tracking mode using LeapSetTrackingMode()."]
5083#[doc = " @since 5.0.0"]
5084pub const _eLeapEventType_eLeapEventType_TrackingMode: _eLeapEventType = 267;
5085#[doc = " An array of system messages. @since 4.0.0"]
5086pub const _eLeapEventType_eLeapEventType_LogEvents: _eLeapEventType = 268;
5087#[doc = " A head pose. The message contains the timestamped head position and orientation."]
5088#[doc = " @since 4.1.0"]
5089pub const _eLeapEventType_eLeapEventType_HeadPose: _eLeapEventType = 269;
5090#[doc = " Tracked eye positions. @since 4.1.0"]
5091pub const _eLeapEventType_eLeapEventType_Eyes: _eLeapEventType = 270;
5092#[doc = " An IMU reading. @since 4.1.0"]
5093pub const _eLeapEventType_eLeapEventType_IMU: _eLeapEventType = 271;
5094#[doc = " \\ingroup Enum"]
5095#[doc = " The types of event messages resulting from calling LeapPollConnection()."]
5096#[doc = " @since 3.0.0"]
5097pub type _eLeapEventType = ::std::os::raw::c_int;
5098#[doc = " \\ingroup Enum"]
5099#[doc = " The types of event messages resulting from calling LeapPollConnection()."]
5100#[doc = " @since 3.0.0"]
5101pub use self::_eLeapEventType as eLeapEventType;
5102#[doc = " \\ingroup Structs"]
5103#[doc = " Defines a basic message from the LeapC message queue."]
5104#[doc = " Set by calling LeapPollConnection()."]
5105#[doc = " @since 3.0.0"]
5106#[repr(C, packed)]
5107#[derive(Copy, Clone)]
5108pub struct _LEAP_CONNECTION_MESSAGE {
5109 #[doc = " The size of this message struct. @since 3.0.0"]
5110 pub size: u32,
5111 #[doc = " The message type. @since 3.0.0"]
5112 pub type_: eLeapEventType,
5113 pub __bindgen_anon_1: _LEAP_CONNECTION_MESSAGE__bindgen_ty_1,
5114 #[doc = " A unique ID for the attached device that sent this message. A value of"]
5115 #[doc = " 0 indicates that it was a system-wide message, and not device specific."]
5116 #[doc = " Use this ID to distinguish messages sent from multiple attached devices."]
5117 #[doc = " @since 4.1.0"]
5118 pub device_id: u32,
5119}
5120#[doc = " A pointer to the event data for the current type of message. @since 3.0.0"]
5121#[repr(C, packed)]
5122#[derive(Copy, Clone)]
5123pub union _LEAP_CONNECTION_MESSAGE__bindgen_ty_1 {
5124 #[doc = " An untyped pointer. @since 3.0.0"]
5125 pub pointer: *const ::std::os::raw::c_void,
5126 #[doc = " A connection message. @since 3.0.0"]
5127 pub connection_event: *const LEAP_CONNECTION_EVENT,
5128 #[doc = " A connection lost. @since 3.0.0"]
5129 pub connection_lost_event: *const LEAP_CONNECTION_LOST_EVENT,
5130 #[doc = " A device detected message. @since 3.0.0"]
5131 pub device_event: *const LEAP_DEVICE_EVENT,
5132 #[doc = " A device's status has changed. @since 3.1.3"]
5133 pub device_status_change_event: *const LEAP_DEVICE_STATUS_CHANGE_EVENT,
5134 #[doc = " A policy message. @since 3.0.0"]
5135 pub policy_event: *const LEAP_POLICY_EVENT,
5136 #[doc = " A device failure message. @since 3.0.0"]
5137 pub device_failure_event: *const LEAP_DEVICE_FAILURE_EVENT,
5138 #[doc = " A tracking message. @since 3.0.0"]
5139 pub tracking_event: *const LEAP_TRACKING_EVENT,
5140 #[doc = " A tracking mode message. @since 5.0.0"]
5141 pub tracking_mode_event: *const LEAP_TRACKING_MODE_EVENT,
5142 #[doc = " A log message. @since 3.0.0"]
5143 pub log_event: *const LEAP_LOG_EVENT,
5144 #[doc = " A log messages. @since 4.0.0"]
5145 pub log_events: *const LEAP_LOG_EVENTS,
5146 #[doc = " A get config value message. @since 3.0.0"]
5147 pub config_response_event: *const LEAP_CONFIG_RESPONSE_EVENT,
5148 #[doc = " A set config value message. @since 3.0.0"]
5149 pub config_change_event: *const LEAP_CONFIG_CHANGE_EVENT,
5150 pub dropped_frame_event: *const LEAP_DROPPED_FRAME_EVENT,
5151 #[doc = " A streaming image message. @since 4.0.0"]
5152 pub image_event: *const LEAP_IMAGE_EVENT,
5153 #[doc = " A point mapping message. @since 4.0.0"]
5154 pub point_mapping_change_event: *const LEAP_POINT_MAPPING_CHANGE_EVENT,
5155 #[doc = " A head pose message. @since 4.1.0"]
5156 pub head_pose_event: *const LEAP_HEAD_POSE_EVENT,
5157 #[doc = " An eye positions message for both the left and right eyes. @since 4.1.0"]
5158 pub eye_event: *const LEAP_EYE_EVENT,
5159 #[doc = " An IMU message. @since 4.1.0"]
5160 pub imu_event: *const LEAP_IMU_EVENT,
5161}
5162#[test]
5163fn bindgen_test_layout__LEAP_CONNECTION_MESSAGE__bindgen_ty_1() {
5164 assert_eq!(
5165 ::std::mem::size_of::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>(),
5166 8usize,
5167 concat!(
5168 "Size of: ",
5169 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1)
5170 )
5171 );
5172 assert_eq!(
5173 ::std::mem::align_of::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>(),
5174 1usize,
5175 concat!(
5176 "Alignment of ",
5177 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1)
5178 )
5179 );
5180 fn test_field_pointer() {
5181 assert_eq!(
5182 unsafe {
5183 let uninit =
5184 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5185 let ptr = uninit.as_ptr();
5186 ::std::ptr::addr_of!((*ptr).pointer) as usize - ptr as usize
5187 },
5188 0usize,
5189 concat!(
5190 "Offset of field: ",
5191 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5192 "::",
5193 stringify!(pointer)
5194 )
5195 );
5196 }
5197 test_field_pointer();
5198 fn test_field_connection_event() {
5199 assert_eq!(
5200 unsafe {
5201 let uninit =
5202 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5203 let ptr = uninit.as_ptr();
5204 ::std::ptr::addr_of!((*ptr).connection_event) as usize - ptr as usize
5205 },
5206 0usize,
5207 concat!(
5208 "Offset of field: ",
5209 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5210 "::",
5211 stringify!(connection_event)
5212 )
5213 );
5214 }
5215 test_field_connection_event();
5216 fn test_field_connection_lost_event() {
5217 assert_eq!(
5218 unsafe {
5219 let uninit =
5220 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5221 let ptr = uninit.as_ptr();
5222 ::std::ptr::addr_of!((*ptr).connection_lost_event) as usize - ptr as usize
5223 },
5224 0usize,
5225 concat!(
5226 "Offset of field: ",
5227 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5228 "::",
5229 stringify!(connection_lost_event)
5230 )
5231 );
5232 }
5233 test_field_connection_lost_event();
5234 fn test_field_device_event() {
5235 assert_eq!(
5236 unsafe {
5237 let uninit =
5238 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5239 let ptr = uninit.as_ptr();
5240 ::std::ptr::addr_of!((*ptr).device_event) as usize - ptr as usize
5241 },
5242 0usize,
5243 concat!(
5244 "Offset of field: ",
5245 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5246 "::",
5247 stringify!(device_event)
5248 )
5249 );
5250 }
5251 test_field_device_event();
5252 fn test_field_device_status_change_event() {
5253 assert_eq!(
5254 unsafe {
5255 let uninit =
5256 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5257 let ptr = uninit.as_ptr();
5258 ::std::ptr::addr_of!((*ptr).device_status_change_event) as usize - ptr as usize
5259 },
5260 0usize,
5261 concat!(
5262 "Offset of field: ",
5263 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5264 "::",
5265 stringify!(device_status_change_event)
5266 )
5267 );
5268 }
5269 test_field_device_status_change_event();
5270 fn test_field_policy_event() {
5271 assert_eq!(
5272 unsafe {
5273 let uninit =
5274 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5275 let ptr = uninit.as_ptr();
5276 ::std::ptr::addr_of!((*ptr).policy_event) as usize - ptr as usize
5277 },
5278 0usize,
5279 concat!(
5280 "Offset of field: ",
5281 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5282 "::",
5283 stringify!(policy_event)
5284 )
5285 );
5286 }
5287 test_field_policy_event();
5288 fn test_field_device_failure_event() {
5289 assert_eq!(
5290 unsafe {
5291 let uninit =
5292 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5293 let ptr = uninit.as_ptr();
5294 ::std::ptr::addr_of!((*ptr).device_failure_event) as usize - ptr as usize
5295 },
5296 0usize,
5297 concat!(
5298 "Offset of field: ",
5299 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5300 "::",
5301 stringify!(device_failure_event)
5302 )
5303 );
5304 }
5305 test_field_device_failure_event();
5306 fn test_field_tracking_event() {
5307 assert_eq!(
5308 unsafe {
5309 let uninit =
5310 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5311 let ptr = uninit.as_ptr();
5312 ::std::ptr::addr_of!((*ptr).tracking_event) as usize - ptr as usize
5313 },
5314 0usize,
5315 concat!(
5316 "Offset of field: ",
5317 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5318 "::",
5319 stringify!(tracking_event)
5320 )
5321 );
5322 }
5323 test_field_tracking_event();
5324 fn test_field_tracking_mode_event() {
5325 assert_eq!(
5326 unsafe {
5327 let uninit =
5328 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5329 let ptr = uninit.as_ptr();
5330 ::std::ptr::addr_of!((*ptr).tracking_mode_event) as usize - ptr as usize
5331 },
5332 0usize,
5333 concat!(
5334 "Offset of field: ",
5335 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5336 "::",
5337 stringify!(tracking_mode_event)
5338 )
5339 );
5340 }
5341 test_field_tracking_mode_event();
5342 fn test_field_log_event() {
5343 assert_eq!(
5344 unsafe {
5345 let uninit =
5346 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5347 let ptr = uninit.as_ptr();
5348 ::std::ptr::addr_of!((*ptr).log_event) as usize - ptr as usize
5349 },
5350 0usize,
5351 concat!(
5352 "Offset of field: ",
5353 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5354 "::",
5355 stringify!(log_event)
5356 )
5357 );
5358 }
5359 test_field_log_event();
5360 fn test_field_log_events() {
5361 assert_eq!(
5362 unsafe {
5363 let uninit =
5364 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5365 let ptr = uninit.as_ptr();
5366 ::std::ptr::addr_of!((*ptr).log_events) as usize - ptr as usize
5367 },
5368 0usize,
5369 concat!(
5370 "Offset of field: ",
5371 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5372 "::",
5373 stringify!(log_events)
5374 )
5375 );
5376 }
5377 test_field_log_events();
5378 fn test_field_config_response_event() {
5379 assert_eq!(
5380 unsafe {
5381 let uninit =
5382 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5383 let ptr = uninit.as_ptr();
5384 ::std::ptr::addr_of!((*ptr).config_response_event) as usize - ptr as usize
5385 },
5386 0usize,
5387 concat!(
5388 "Offset of field: ",
5389 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5390 "::",
5391 stringify!(config_response_event)
5392 )
5393 );
5394 }
5395 test_field_config_response_event();
5396 fn test_field_config_change_event() {
5397 assert_eq!(
5398 unsafe {
5399 let uninit =
5400 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5401 let ptr = uninit.as_ptr();
5402 ::std::ptr::addr_of!((*ptr).config_change_event) as usize - ptr as usize
5403 },
5404 0usize,
5405 concat!(
5406 "Offset of field: ",
5407 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5408 "::",
5409 stringify!(config_change_event)
5410 )
5411 );
5412 }
5413 test_field_config_change_event();
5414 fn test_field_dropped_frame_event() {
5415 assert_eq!(
5416 unsafe {
5417 let uninit =
5418 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5419 let ptr = uninit.as_ptr();
5420 ::std::ptr::addr_of!((*ptr).dropped_frame_event) as usize - ptr as usize
5421 },
5422 0usize,
5423 concat!(
5424 "Offset of field: ",
5425 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5426 "::",
5427 stringify!(dropped_frame_event)
5428 )
5429 );
5430 }
5431 test_field_dropped_frame_event();
5432 fn test_field_image_event() {
5433 assert_eq!(
5434 unsafe {
5435 let uninit =
5436 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5437 let ptr = uninit.as_ptr();
5438 ::std::ptr::addr_of!((*ptr).image_event) as usize - ptr as usize
5439 },
5440 0usize,
5441 concat!(
5442 "Offset of field: ",
5443 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5444 "::",
5445 stringify!(image_event)
5446 )
5447 );
5448 }
5449 test_field_image_event();
5450 fn test_field_point_mapping_change_event() {
5451 assert_eq!(
5452 unsafe {
5453 let uninit =
5454 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5455 let ptr = uninit.as_ptr();
5456 ::std::ptr::addr_of!((*ptr).point_mapping_change_event) as usize - ptr as usize
5457 },
5458 0usize,
5459 concat!(
5460 "Offset of field: ",
5461 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5462 "::",
5463 stringify!(point_mapping_change_event)
5464 )
5465 );
5466 }
5467 test_field_point_mapping_change_event();
5468 fn test_field_head_pose_event() {
5469 assert_eq!(
5470 unsafe {
5471 let uninit =
5472 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5473 let ptr = uninit.as_ptr();
5474 ::std::ptr::addr_of!((*ptr).head_pose_event) as usize - ptr as usize
5475 },
5476 0usize,
5477 concat!(
5478 "Offset of field: ",
5479 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5480 "::",
5481 stringify!(head_pose_event)
5482 )
5483 );
5484 }
5485 test_field_head_pose_event();
5486 fn test_field_eye_event() {
5487 assert_eq!(
5488 unsafe {
5489 let uninit =
5490 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5491 let ptr = uninit.as_ptr();
5492 ::std::ptr::addr_of!((*ptr).eye_event) as usize - ptr as usize
5493 },
5494 0usize,
5495 concat!(
5496 "Offset of field: ",
5497 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5498 "::",
5499 stringify!(eye_event)
5500 )
5501 );
5502 }
5503 test_field_eye_event();
5504 fn test_field_imu_event() {
5505 assert_eq!(
5506 unsafe {
5507 let uninit =
5508 ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE__bindgen_ty_1>::uninit();
5509 let ptr = uninit.as_ptr();
5510 ::std::ptr::addr_of!((*ptr).imu_event) as usize - ptr as usize
5511 },
5512 0usize,
5513 concat!(
5514 "Offset of field: ",
5515 stringify!(_LEAP_CONNECTION_MESSAGE__bindgen_ty_1),
5516 "::",
5517 stringify!(imu_event)
5518 )
5519 );
5520 }
5521 test_field_imu_event();
5522}
5523#[test]
5524fn bindgen_test_layout__LEAP_CONNECTION_MESSAGE() {
5525 assert_eq!(
5526 ::std::mem::size_of::<_LEAP_CONNECTION_MESSAGE>(),
5527 20usize,
5528 concat!("Size of: ", stringify!(_LEAP_CONNECTION_MESSAGE))
5529 );
5530 assert_eq!(
5531 ::std::mem::align_of::<_LEAP_CONNECTION_MESSAGE>(),
5532 1usize,
5533 concat!("Alignment of ", stringify!(_LEAP_CONNECTION_MESSAGE))
5534 );
5535 fn test_field_size() {
5536 assert_eq!(
5537 unsafe {
5538 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE>::uninit();
5539 let ptr = uninit.as_ptr();
5540 ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize
5541 },
5542 0usize,
5543 concat!(
5544 "Offset of field: ",
5545 stringify!(_LEAP_CONNECTION_MESSAGE),
5546 "::",
5547 stringify!(size)
5548 )
5549 );
5550 }
5551 test_field_size();
5552 fn test_field_type() {
5553 assert_eq!(
5554 unsafe {
5555 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE>::uninit();
5556 let ptr = uninit.as_ptr();
5557 ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize
5558 },
5559 4usize,
5560 concat!(
5561 "Offset of field: ",
5562 stringify!(_LEAP_CONNECTION_MESSAGE),
5563 "::",
5564 stringify!(type_)
5565 )
5566 );
5567 }
5568 test_field_type();
5569 fn test_field_device_id() {
5570 assert_eq!(
5571 unsafe {
5572 let uninit = ::std::mem::MaybeUninit::<_LEAP_CONNECTION_MESSAGE>::uninit();
5573 let ptr = uninit.as_ptr();
5574 ::std::ptr::addr_of!((*ptr).device_id) as usize - ptr as usize
5575 },
5576 16usize,
5577 concat!(
5578 "Offset of field: ",
5579 stringify!(_LEAP_CONNECTION_MESSAGE),
5580 "::",
5581 stringify!(device_id)
5582 )
5583 );
5584 }
5585 test_field_device_id();
5586}
5587#[doc = " \\ingroup Structs"]
5588#[doc = " Defines a basic message from the LeapC message queue."]
5589#[doc = " Set by calling LeapPollConnection()."]
5590#[doc = " @since 3.0.0"]
5591pub type LEAP_CONNECTION_MESSAGE = _LEAP_CONNECTION_MESSAGE;
5592extern "C" {
5593 #[doc = " \\ingroup Functions"]
5594 #[doc = " Polls the connection for a new event."]
5595 #[doc = ""]
5596 #[doc = " The specific types of events that may be received are not configurable in this entrypoint. Configure"]
5597 #[doc = " the device or connection object directly to change what events will be received."]
5598 #[doc = ""]
5599 #[doc = " Pointers in the retrieved event message structure will be valid until the associated connection or device is"]
5600 #[doc = " closed, or the next call to LeapPollConnection()."]
5601 #[doc = ""]
5602 #[doc = " Calling this method concurrently will return eLeapRS_ConcurrentPoll."]
5603 #[doc = ""]
5604 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5605 #[doc = " @param timeout The maximum amount of time to wait, in milliseconds. If this value is zero,"]
5606 #[doc = " the evt pointer references the next queued message, if there is one, and returns immediately."]
5607 #[doc = " @param[out] evt A pointer to a structure that is filled with event information. This structure will be valid"]
5608 #[doc = " as long as the LEAP_CONNECTION object is valid."]
5609 #[doc = ""]
5610 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration. If the operation"]
5611 #[doc = " times out, this method will return eLeapRS_Timeout. The evt pointer will reference a"]
5612 #[doc = " message of type eLeapEventType_None."]
5613 #[doc = " @since 3.0.0"]
5614 pub fn LeapPollConnection(
5615 hConnection: LEAP_CONNECTION,
5616 timeout: u32,
5617 evt: *mut LEAP_CONNECTION_MESSAGE,
5618 ) -> eLeapRS;
5619}
5620extern "C" {
5621 #[doc = " \\ingroup Functions"]
5622 #[doc = " Retrieves the number of bytes required to allocate an interpolated frame at the specified time."]
5623 #[doc = ""]
5624 #[doc = " Use this function to determine the size of the buffer to allocate when calling"]
5625 #[doc = " LeapInterpolateFrame()."]
5626 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5627 #[doc = " @param timestamp The timestamp of the frame whose size is to be queried."]
5628 #[doc = " @param[out] pncbEvent A pointer that receives the number of bytes required to store the specified frame."]
5629 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5630 #[doc = " @since 3.1.1"]
5631 pub fn LeapGetFrameSize(
5632 hConnection: LEAP_CONNECTION,
5633 timestamp: i64,
5634 pncbEvent: *mut u64,
5635 ) -> eLeapRS;
5636}
5637extern "C" {
5638 #[doc = " \\ingroup Functions"]
5639 #[doc = " Retrieves the number of bytes required to allocate an interpolated frame at the specified time"]
5640 #[doc = " for a particular device."]
5641 #[doc = ""]
5642 #[doc = " Use this function to determine the size of the buffer to allocate when calling"]
5643 #[doc = " LeapInterpolateFrameEx()."]
5644 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5645 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
5646 #[doc = " @param timestamp The timestamp of the frame whose size is to be queried."]
5647 #[doc = " @param[out] pncbEvent A pointer that receives the number of bytes required to store the specified frame."]
5648 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5649 #[doc = " @since 5.4.0"]
5650 pub fn LeapGetFrameSizeEx(
5651 hConnection: LEAP_CONNECTION,
5652 hDevice: LEAP_DEVICE,
5653 timestamp: i64,
5654 pncbEvent: *mut u64,
5655 ) -> eLeapRS;
5656}
5657extern "C" {
5658 #[doc = " \\ingroup Functions"]
5659 #[doc = " Constructs a frame at the specified timestamp by interpolating between measured"]
5660 #[doc = " frames."]
5661 #[doc = ""]
5662 #[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
5663 #[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
5664 #[doc = ""]
5665 #[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
5666 #[doc = " synchronize time measurements in the application with time measurements in"]
5667 #[doc = " the Ultraleap Tracking Service. This process is required to achieve accurate, smooth"]
5668 #[doc = " interpolation."]
5669 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5670 #[doc = " @param timestamp The timestamp at which to interpolate the frame data."]
5671 #[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
5672 #[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
5673 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5674 #[doc = " @since 3.1.1"]
5675 pub fn LeapInterpolateFrame(
5676 hConnection: LEAP_CONNECTION,
5677 timestamp: i64,
5678 pEvent: *mut LEAP_TRACKING_EVENT,
5679 ncbEvent: u64,
5680 ) -> eLeapRS;
5681}
5682extern "C" {
5683 #[doc = " \\ingroup Functions"]
5684 #[doc = " Constructs a frame at the specified timestamp for a particular device by"]
5685 #[doc = " interpolating between measured frames."]
5686 #[doc = ""]
5687 #[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
5688 #[doc = " Use LeapGetFrameSizeEx() to calculate the minimum size of this buffer."]
5689 #[doc = ""]
5690 #[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
5691 #[doc = " synchronize time measurements in the application with time measurements in"]
5692 #[doc = " the Ultraleap Tracking Service. This process is required to achieve accurate, smooth"]
5693 #[doc = " interpolation."]
5694 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5695 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
5696 #[doc = " @param timestamp The timestamp at which to interpolate the frame data."]
5697 #[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
5698 #[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
5699 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5700 #[doc = " @since 5.4.0"]
5701 pub fn LeapInterpolateFrameEx(
5702 hConnection: LEAP_CONNECTION,
5703 hDevice: LEAP_DEVICE,
5704 timestamp: i64,
5705 pEvent: *mut LEAP_TRACKING_EVENT,
5706 ncbEvent: u64,
5707 ) -> eLeapRS;
5708}
5709extern "C" {
5710 #[doc = " \\ingroup Functions"]
5711 #[doc = " Constructs a frame at the specified timestamp by interpolating between a frame near the timestamp"]
5712 #[doc = " and a frame near the sourceTimestamp."]
5713 #[doc = ""]
5714 #[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
5715 #[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
5716 #[doc = ""]
5717 #[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
5718 #[doc = " synchronize time measurements in the application with time measurements in"]
5719 #[doc = " the Ultraleap Tracking Service. This process is required to achieve accurate, smooth"]
5720 #[doc = " interpolation."]
5721 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5722 #[doc = " @param timestamp The timestamp to which to interpolate the frame data."]
5723 #[doc = " @param sourceTimestamp The timestamp of the beginning frame from which to interpolate the frame data."]
5724 #[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
5725 #[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
5726 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5727 #[doc = " @since 3.1.1"]
5728 pub fn LeapInterpolateFrameFromTime(
5729 hConnection: LEAP_CONNECTION,
5730 timestamp: i64,
5731 sourceTimestamp: i64,
5732 pEvent: *mut LEAP_TRACKING_EVENT,
5733 ncbEvent: u64,
5734 ) -> eLeapRS;
5735}
5736extern "C" {
5737 #[doc = " \\ingroup Functions"]
5738 #[doc = " Constructs a frame at the specified timestamp for a particular device by"]
5739 #[doc = " interpolating between a frame near the timestamp and a frame near the"]
5740 #[doc = " sourceTimestamp."]
5741 #[doc = ""]
5742 #[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
5743 #[doc = " Use LeapGetFrameSizeEx() to calculate the minimum size of this buffer."]
5744 #[doc = ""]
5745 #[doc = " Use LeapCreateClockRebaser(), LeapUpdateRebase(), and LeapRebaseClock() to"]
5746 #[doc = " synchronize time measurements in the application with time measurements in"]
5747 #[doc = " the Ultraleap Tracking Service. This process is required to achieve accurate, smooth"]
5748 #[doc = " interpolation."]
5749 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5750 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
5751 #[doc = " @param timestamp The timestamp to which to interpolate the frame data."]
5752 #[doc = " @param sourceTimestamp The timestamp of the beginning frame from which to interpolate the frame data."]
5753 #[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
5754 #[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
5755 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5756 #[doc = " @since 5.4.0"]
5757 pub fn LeapInterpolateFrameFromTimeEx(
5758 hConnection: LEAP_CONNECTION,
5759 hDevice: LEAP_DEVICE,
5760 timestamp: i64,
5761 sourceTimestamp: i64,
5762 pEvent: *mut LEAP_TRACKING_EVENT,
5763 ncbEvent: u64,
5764 ) -> eLeapRS;
5765}
5766extern "C" {
5767 #[doc = " \\ingroup Functions"]
5768 #[doc = " Closes a device handle previously opened with LeapOpenDevice."]
5769 #[doc = ""]
5770 #[doc = " @param hDevice The device handle to close."]
5771 #[doc = " @since 3.0.0"]
5772 pub fn LeapCloseDevice(hDevice: LEAP_DEVICE);
5773}
5774extern "C" {
5775 #[doc = " \\ingroup Functions"]
5776 #[doc = " Closes a previously opened connection."]
5777 #[doc = ""]
5778 #[doc = " This method closes the specified connection object if it is opened"]
5779 #[doc = ""]
5780 #[doc = " This method never fails."]
5781 #[doc = ""]
5782 #[doc = " @param hConnection A handle to the connection object to be closed."]
5783 #[doc = " @since 4.0.0"]
5784 pub fn LeapCloseConnection(hConnection: LEAP_CONNECTION);
5785}
5786extern "C" {
5787 #[doc = " \\ingroup Functions"]
5788 #[doc = " Destroys a previously opened connection."]
5789 #[doc = ""]
5790 #[doc = " This method closes the specified connection object if it is opened, destroys the underlying"]
5791 #[doc = " object, and releases all resources associated with it."]
5792 #[doc = ""]
5793 #[doc = " This method never fails."]
5794 #[doc = ""]
5795 #[doc = " Be sure that no other functions are accessing the connection when this function is called."]
5796 #[doc = ""]
5797 #[doc = " @param hConnection A handle to the connection object to be destroyed."]
5798 #[doc = " @since 3.0.0"]
5799 pub fn LeapDestroyConnection(hConnection: LEAP_CONNECTION);
5800}
5801#[repr(C)]
5802#[derive(Debug, Copy, Clone)]
5803pub struct _LEAP_CLOCK_REBASER {
5804 _unused: [u8; 0],
5805}
5806#[doc = " \\ingroup Structs"]
5807#[doc = " \\struct LEAP_CLOCK_REBASER"]
5808#[doc = " An opaque clock rebase state structure. @since 3.1.2"]
5809pub type LEAP_CLOCK_REBASER = *mut _LEAP_CLOCK_REBASER;
5810extern "C" {
5811 #[doc = " \\ingroup Functions"]
5812 #[doc = " Initializes a new Leap clock-rebaser handle object."]
5813 #[doc = ""]
5814 #[doc = " Pass the filled-in LEAP_CLOCK_REBASER object to calls to LeapUpdateRebase(),"]
5815 #[doc = " LeapRebaseClock(), and LeapDestroyClockRebaser()."]
5816 #[doc = ""]
5817 #[doc = " @param[out] phClockRebaser The pointer to the clock-rebaser object to be initialized."]
5818 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5819 #[doc = " @since 3.1.2"]
5820 pub fn LeapCreateClockRebaser(phClockRebaser: *mut LEAP_CLOCK_REBASER) -> eLeapRS;
5821}
5822extern "C" {
5823 #[doc = " \\ingroup Functions"]
5824 #[doc = " Updates the relationship between the Ultraleap Tracking Service clock and the user clock."]
5825 #[doc = ""]
5826 #[doc = " When using LeapInterpolateFrame(), call this function for every graphics frame"]
5827 #[doc = " rendered by your application. The function should be called as close to the"]
5828 #[doc = " actual point of rendering as possible."]
5829 #[doc = ""]
5830 #[doc = " The relationship between the application clock and the Ultraleap Tracking Service clock is"]
5831 #[doc = " neither fixed nor stable. Simulation restarts can cause user clock values to change"]
5832 #[doc = " instantaneously. Certain systems simulate slow motion, or respond to heavy load, by reducing the tick rate"]
5833 #[doc = " of the user clock. As a result, the LeapUpdateRebase() function must be called for every rendered frame."]
5834 #[doc = ""]
5835 #[doc = " @param hClockRebaser The handle to a rebaser object created by LeapCreateClockRebaser()."]
5836 #[doc = " @param userClock A clock value supplied by the application, sampled at about the same time as LeapGetNow() was sampled."]
5837 #[doc = " @param leapClock The Ultraleap Tracking Service clock value sampled by a call to LeapGetNow()."]
5838 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5839 #[doc = " @since 3.1.2"]
5840 pub fn LeapUpdateRebase(
5841 hClockRebaser: LEAP_CLOCK_REBASER,
5842 userClock: i64,
5843 leapClock: i64,
5844 ) -> eLeapRS;
5845}
5846extern "C" {
5847 #[doc = " \\ingroup Functions"]
5848 #[doc = " Computes the Ultraleap Tracking Service clock corresponding to a specified application clock value."]
5849 #[doc = ""]
5850 #[doc = " Use this function to translate your application clock to the Ultraleap Tracking Service clock"]
5851 #[doc = " when interpolating frames. LeapUpdateRebase() must be called for every rendered"]
5852 #[doc = " frame for the relationship between the two clocks to remain synchronized."]
5853 #[doc = ""]
5854 #[doc = " @param hClockRebaser The handle to a rebaser object created by LeapCreateClockRebaser()."]
5855 #[doc = " @param userClock The clock in microseconds referenced to the application clock."]
5856 #[doc = " @param[out] pLeapClock The corresponding Ultraleap Tracking Service clock value."]
5857 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
5858 #[doc = " @since 3.1.2"]
5859 pub fn LeapRebaseClock(
5860 hClockRebaser: LEAP_CLOCK_REBASER,
5861 userClock: i64,
5862 pLeapClock: *mut i64,
5863 ) -> eLeapRS;
5864}
5865extern "C" {
5866 #[doc = " \\ingroup Functions"]
5867 #[doc = " Destroys a previously created clock-rebaser object."]
5868 #[doc = ""]
5869 #[doc = " This method destroys the specified clock-rebaser object, and releases all resources associated with it."]
5870 #[doc = ""]
5871 #[doc = " @param hClockRebaser A handle to the clock-rebaser object to be destroyed."]
5872 #[doc = " @since 3.1.2"]
5873 pub fn LeapDestroyClockRebaser(hClockRebaser: LEAP_CLOCK_REBASER);
5874}
5875extern "C" {
5876 #[doc = " \\ingroup Functions"]
5877 #[doc = " Provides the corrected camera ray intercepting the specified point on the image."]
5878 #[doc = ""]
5879 #[doc = " Given a point on the image, ``LeapPixelToRectilinear()`` corrects for camera distortion"]
5880 #[doc = " and returns the true direction from the camera to the source of that image point"]
5881 #[doc = " within the Ultraleap Tracking camera field of view."]
5882 #[doc = ""]
5883 #[doc = " This direction vector has an x and y component [x, y, 1], with the third element"]
5884 #[doc = " always 1. Note that this vector uses the 2D camera coordinate system"]
5885 #[doc = " where the x-axis parallels the longer (typically horizontal) dimension and"]
5886 #[doc = " the y-axis parallels the shorter (vertical) dimension. The camera coordinate"]
5887 #[doc = " system does not correlate to the 3D Ultraleap Tracking coordinate system."]
5888 #[doc = ""]
5889 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5890 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
5891 #[doc = " @param pixel A Vector containing the position of a pixel in the image."]
5892 #[doc = " @returns A Vector containing the ray direction (the z-component of the vector is always 1)."]
5893 #[doc = " @since 3.1.3"]
5894 pub fn LeapPixelToRectilinear(
5895 hConnection: LEAP_CONNECTION,
5896 camera: eLeapPerspectiveType,
5897 pixel: LEAP_VECTOR,
5898 ) -> LEAP_VECTOR;
5899}
5900extern "C" {
5901 #[doc = " \\ingroup Functions"]
5902 #[doc = " Provides the corrected camera ray intercepting the specified point"]
5903 #[doc = " on the image for a particular device."]
5904 #[doc = ""]
5905 #[doc = " Given a point on the image, ``LeapPixelToRectilinearEx()`` corrects for camera distortion"]
5906 #[doc = " and returns the true direction from the camera to the source of that image point"]
5907 #[doc = " within the Devices field of view."]
5908 #[doc = ""]
5909 #[doc = " This direction vector has an x and y component [x, y, 1], with the third element"]
5910 #[doc = " always 1. Note that this vector uses the 2D camera coordinate system"]
5911 #[doc = " where the x-axis parallels the longer (typically horizontal) dimension and"]
5912 #[doc = " the y-axis parallels the shorter (vertical) dimension. The camera coordinate"]
5913 #[doc = " system does not correlate to the 3D Ultraleap coordinate system."]
5914 #[doc = ""]
5915 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5916 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
5917 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
5918 #[doc = " @param pixel A Vector containing the position of a pixel in the image."]
5919 #[doc = " @returns A Vector containing the ray direction (the z-component of the vector is always 1)."]
5920 #[doc = " @since 5.4.0"]
5921 pub fn LeapPixelToRectilinearEx(
5922 hConnection: LEAP_CONNECTION,
5923 hDevice: LEAP_DEVICE,
5924 camera: eLeapPerspectiveType,
5925 pixel: LEAP_VECTOR,
5926 ) -> LEAP_VECTOR;
5927}
5928extern "C" {
5929 #[doc = " \\ingroup Functions"]
5930 #[doc = " Provides the point in the image corresponding to a ray projecting"]
5931 #[doc = " from the camera."]
5932 #[doc = ""]
5933 #[doc = " Given a ray projected from the camera in the specified direction, ``LeapRectilinearToPixel()``"]
5934 #[doc = " corrects for camera distortion and returns the corresponding pixel"]
5935 #[doc = " coordinates in the image."]
5936 #[doc = ""]
5937 #[doc = " The ray direction is specified in relationship to the camera. The first"]
5938 #[doc = " vector element is the tangent of the \"horizontal\" view angle; the second"]
5939 #[doc = " element is the tangent of the \"vertical\" view angle."]
5940 #[doc = ""]
5941 #[doc = " The ``LeapRectilinearToPixel()`` function returns pixel coordinates outside of the image bounds"]
5942 #[doc = " if you project a ray toward a point for which there is no recorded data."]
5943 #[doc = ""]
5944 #[doc = " ``LeapRectilinearToPixel()`` is typically not fast enough for realtime distortion correction."]
5945 #[doc = " For better performance, use a shader program executed on a GPU."]
5946 #[doc = ""]
5947 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5948 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
5949 #[doc = " @param rectilinear A Vector containing the ray direction."]
5950 #[doc = " @returns A Vector containing the pixel coordinates [x, y, 1] (with z always 1)."]
5951 #[doc = " @since 3.1.3"]
5952 pub fn LeapRectilinearToPixel(
5953 hConnection: LEAP_CONNECTION,
5954 camera: eLeapPerspectiveType,
5955 rectilinear: LEAP_VECTOR,
5956 ) -> LEAP_VECTOR;
5957}
5958extern "C" {
5959 #[doc = " \\ingroup Functions"]
5960 #[doc = " Provides the point in the image corresponding to a ray projecting"]
5961 #[doc = " from the camera for a particular device."]
5962 #[doc = ""]
5963 #[doc = " Given a ray projected from the camera in the specified direction, ``LeapRectilinearToPixelEx()``"]
5964 #[doc = " corrects for camera distortion and returns the corresponding pixel"]
5965 #[doc = " coordinates in the image."]
5966 #[doc = ""]
5967 #[doc = " The ray direction is specified in relationship to the camera. The first"]
5968 #[doc = " vector element is the tangent of the \"horizontal\" view angle; the second"]
5969 #[doc = " element is the tangent of the \"vertical\" view angle."]
5970 #[doc = ""]
5971 #[doc = " The ``LeapRectilinearToPixelEx()`` function returns pixel coordinates outside of the image bounds"]
5972 #[doc = " if you project a ray toward a point for which there is no recorded data."]
5973 #[doc = ""]
5974 #[doc = " ``LeapRectilinearToPixelEx()`` is typically not fast enough for realtime distortion correction."]
5975 #[doc = " For better performance, use a shader program executed on a GPU."]
5976 #[doc = ""]
5977 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5978 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
5979 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
5980 #[doc = " @param rectilinear A Vector containing the ray direction."]
5981 #[doc = " @returns A Vector containing the pixel coordinates [x, y, 1] (with z always 1)."]
5982 #[doc = " @since 5.4.0"]
5983 pub fn LeapRectilinearToPixelEx(
5984 hConnection: LEAP_CONNECTION,
5985 hDevice: LEAP_DEVICE,
5986 camera: eLeapPerspectiveType,
5987 rectilinear: LEAP_VECTOR,
5988 ) -> LEAP_VECTOR;
5989}
5990extern "C" {
5991 #[doc = " \\ingroup Functions"]
5992 #[doc = " Returns an OpenCV-compatible camera matrix."]
5993 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
5994 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
5995 #[doc = " @param[out] dest A pointer to a single-precision float array of size 9"]
5996 #[doc = " @since 3.2.1"]
5997 pub fn LeapCameraMatrix(
5998 hConnection: LEAP_CONNECTION,
5999 camera: eLeapPerspectiveType,
6000 dest: *mut f32,
6001 );
6002}
6003extern "C" {
6004 #[doc = " \\ingroup Functions"]
6005 #[doc = " Returns an OpenCV-compatible camera matrix for a particular device."]
6006 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6007 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
6008 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6009 #[doc = " @param[out] dest A pointer to a single-precision float array of size 9"]
6010 #[doc = " @since 5.4.0"]
6011 pub fn LeapCameraMatrixEx(
6012 hConnection: LEAP_CONNECTION,
6013 hDevice: LEAP_DEVICE,
6014 camera: eLeapPerspectiveType,
6015 dest: *mut f32,
6016 );
6017}
6018extern "C" {
6019 #[doc = " \\ingroup Functions"]
6020 #[doc = " This finds the default device and returns the result LeapExtrinsicCameraMatrixEx()"]
6021 #[doc = ""]
6022 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6023 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6024 #[doc = " @param[out] dest A pointer to a single-precision float array of size 16, containing"]
6025 #[doc = " the coefficients of the 4x4 matrix in Column Major order"]
6026 #[doc = " @since 5.1.0"]
6027 pub fn LeapExtrinsicCameraMatrix(
6028 hConnection: LEAP_CONNECTION,
6029 camera: eLeapPerspectiveType,
6030 dest: *mut f32,
6031 );
6032}
6033extern "C" {
6034 #[doc = " \\ingroup Functions"]
6035 #[doc = ""]
6036 #[doc = " Returns a transformation matrix from 3D Leap coordinate space to the coordinate system of the requested camera"]
6037 #[doc = " This is composed of a 4 x 4 matrix of the form:"]
6038 #[doc = ""]
6039 #[doc = " R, t <br>"]
6040 #[doc = " 0, 1"]
6041 #[doc = ""]
6042 #[doc = " R is a 3 x 3 rotation matrix <br>"]
6043 #[doc = " t is a 3 x 1 translation vector"]
6044 #[doc = ""]
6045 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6046 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
6047 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6048 #[doc = " @param[out] dest A pointer to a single-precision float array of size 16, containing"]
6049 #[doc = " the coefficients of the 4x4 matrix in Column Major order"]
6050 #[doc = " @since 5.1.0"]
6051 pub fn LeapExtrinsicCameraMatrixEx(
6052 hConnection: LEAP_CONNECTION,
6053 hDevice: LEAP_DEVICE,
6054 camera: eLeapPerspectiveType,
6055 dest: *mut f32,
6056 );
6057}
6058extern "C" {
6059 #[doc = " \\ingroup Functions"]
6060 #[doc = " Returns an OpenCV-compatible lens distortion using the 8-parameter rational"]
6061 #[doc = " model."]
6062 #[doc = ""]
6063 #[doc = " The order of the returned array is: [k1, k2, p1, p2, k3, k4, k5, k6]"]
6064 #[doc = ""]
6065 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6066 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6067 #[doc = " @param[out] dest A pointer to a single-precision float array of size 8."]
6068 #[doc = " @since 3.2.1"]
6069 pub fn LeapDistortionCoeffs(
6070 hConnection: LEAP_CONNECTION,
6071 camera: eLeapPerspectiveType,
6072 dest: *mut f32,
6073 );
6074}
6075extern "C" {
6076 #[doc = " \\ingroup Functions"]
6077 #[doc = " Returns an OpenCV-compatible lens distortion for a particular device, using"]
6078 #[doc = " the 8-parameter rational model."]
6079 #[doc = ""]
6080 #[doc = " The order of the returned array is: [k1, k2, p1, p2, k3, k4, k5, k6]"]
6081 #[doc = ""]
6082 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6083 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
6084 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6085 #[doc = " @param[out] dest A pointer to a single-precision float array of size 8."]
6086 #[doc = " @since 5.4.0"]
6087 pub fn LeapDistortionCoeffsEx(
6088 hConnection: LEAP_CONNECTION,
6089 hDevice: LEAP_DEVICE,
6090 camera: eLeapPerspectiveType,
6091 dest: *mut f32,
6092 );
6093}
6094extern "C" {
6095 #[doc = " \\ingroup Functions"]
6096 #[doc = " Provides the human-readable canonical name of the specified device model."]
6097 #[doc = ""]
6098 #[doc = " This method is guaranteed to never return null for the LEAP_DEVICE_INFO.pid field"]
6099 #[doc = " returned by a successful call to LeapGetDeviceInfo"]
6100 #[doc = ""]
6101 #[doc = " @param pid The pid of the device"]
6102 #[doc = " @returns The string name of the device model, or null if the device type string is invalid."]
6103 #[doc = ""]
6104 pub fn LeapDevicePIDToString(pid: eLeapDevicePID) -> *const ::std::os::raw::c_char;
6105}
6106pub const _eLeapRecordingFlags_eLeapRecordingFlags_Error: _eLeapRecordingFlags = 0;
6107pub const _eLeapRecordingFlags_eLeapRecordingFlags_Reading: _eLeapRecordingFlags = 1;
6108pub const _eLeapRecordingFlags_eLeapRecordingFlags_Writing: _eLeapRecordingFlags = 2;
6109pub const _eLeapRecordingFlags_eLeapRecordingFlags_Flushing: _eLeapRecordingFlags = 4;
6110pub const _eLeapRecordingFlags_eLeapRecordingFlags_Compressed: _eLeapRecordingFlags = 8;
6111#[doc = " \\ingroup Enum"]
6112#[doc = " Defines the recording mode provided to the LeapRecordingOpen()"]
6113#[doc = " function. Also used in members of LEAP_RECORDING_PARAMETERS and LEAP_RECORDING_STATUS."]
6114#[doc = " @since 3.2.0"]
6115pub type _eLeapRecordingFlags = ::std::os::raw::c_int;
6116#[doc = " \\ingroup Enum"]
6117#[doc = " Defines the recording mode provided to the LeapRecordingOpen()"]
6118#[doc = " function. Also used in members of LEAP_RECORDING_PARAMETERS and LEAP_RECORDING_STATUS."]
6119#[doc = " @since 3.2.0"]
6120pub use self::_eLeapRecordingFlags as eLeapRecordingFlags;
6121#[repr(C)]
6122#[derive(Debug, Copy, Clone)]
6123pub struct _LEAP_RECORDING {
6124 _unused: [u8; 0],
6125}
6126#[doc = " \\ingroup Structs"]
6127#[doc = " A Leap recording."]
6128#[doc = " @since 3.2.0"]
6129pub type LEAP_RECORDING = *mut _LEAP_RECORDING;
6130#[doc = " \\ingroup Structs"]
6131#[doc = " Read/Write mode for opening a LEAP_RECORDING."]
6132#[doc = " since 3.2.0"]
6133#[repr(C, packed)]
6134#[derive(Debug, Copy, Clone)]
6135pub struct _LEAP_RECORDING_PARAMETERS {
6136 #[doc = " A combination of eLeapRecordingFlags indicating the desired operations. @since 3.2.0"]
6137 pub mode: u32,
6138}
6139#[test]
6140fn bindgen_test_layout__LEAP_RECORDING_PARAMETERS() {
6141 assert_eq!(
6142 ::std::mem::size_of::<_LEAP_RECORDING_PARAMETERS>(),
6143 4usize,
6144 concat!("Size of: ", stringify!(_LEAP_RECORDING_PARAMETERS))
6145 );
6146 assert_eq!(
6147 ::std::mem::align_of::<_LEAP_RECORDING_PARAMETERS>(),
6148 1usize,
6149 concat!("Alignment of ", stringify!(_LEAP_RECORDING_PARAMETERS))
6150 );
6151 fn test_field_mode() {
6152 assert_eq!(
6153 unsafe {
6154 let uninit = ::std::mem::MaybeUninit::<_LEAP_RECORDING_PARAMETERS>::uninit();
6155 let ptr = uninit.as_ptr();
6156 ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize
6157 },
6158 0usize,
6159 concat!(
6160 "Offset of field: ",
6161 stringify!(_LEAP_RECORDING_PARAMETERS),
6162 "::",
6163 stringify!(mode)
6164 )
6165 );
6166 }
6167 test_field_mode();
6168}
6169#[doc = " \\ingroup Structs"]
6170#[doc = " Read/Write mode for opening a LEAP_RECORDING."]
6171#[doc = " since 3.2.0"]
6172pub type LEAP_RECORDING_PARAMETERS = _LEAP_RECORDING_PARAMETERS;
6173#[doc = " \\ingroup Structs"]
6174#[doc = " Information about a current LEAP_RECORDING."]
6175#[doc = " Filled in by a call to LeapRecordingGetStatus()."]
6176#[doc = " @since 3.2.0"]
6177#[repr(C, packed)]
6178#[derive(Debug, Copy, Clone)]
6179pub struct _LEAP_RECORDING_STATUS {
6180 #[doc = " Some combination of eLeapRecordingFlags indicating the status of the recording. @since 3.2.0"]
6181 pub mode: u32,
6182}
6183#[test]
6184fn bindgen_test_layout__LEAP_RECORDING_STATUS() {
6185 assert_eq!(
6186 ::std::mem::size_of::<_LEAP_RECORDING_STATUS>(),
6187 4usize,
6188 concat!("Size of: ", stringify!(_LEAP_RECORDING_STATUS))
6189 );
6190 assert_eq!(
6191 ::std::mem::align_of::<_LEAP_RECORDING_STATUS>(),
6192 1usize,
6193 concat!("Alignment of ", stringify!(_LEAP_RECORDING_STATUS))
6194 );
6195 fn test_field_mode() {
6196 assert_eq!(
6197 unsafe {
6198 let uninit = ::std::mem::MaybeUninit::<_LEAP_RECORDING_STATUS>::uninit();
6199 let ptr = uninit.as_ptr();
6200 ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize
6201 },
6202 0usize,
6203 concat!(
6204 "Offset of field: ",
6205 stringify!(_LEAP_RECORDING_STATUS),
6206 "::",
6207 stringify!(mode)
6208 )
6209 );
6210 }
6211 test_field_mode();
6212}
6213#[doc = " \\ingroup Structs"]
6214#[doc = " Information about a current LEAP_RECORDING."]
6215#[doc = " Filled in by a call to LeapRecordingGetStatus()."]
6216#[doc = " @since 3.2.0"]
6217pub type LEAP_RECORDING_STATUS = _LEAP_RECORDING_STATUS;
6218extern "C" {
6219 #[doc = " \\ingroup Functions"]
6220 #[doc = " Opens or creates a LEAP_RECORDING."]
6221 #[doc = ""]
6222 #[doc = " Pass the LEAP_RECORDING pointer to LeapRecordingOpen() to initiate reading from"]
6223 #[doc = " or writing to a recording. The recording path is relative to the \"user path\""]
6224 #[doc = " which is the SD card on Android."]
6225 #[doc = ""]
6226 #[doc = " @param ppRecording The recording being opened."]
6227 #[doc = " @param filePath The file path. This will be passed directly to the OS without modification. An \".lmt\" suffix is suggested."]
6228 #[doc = " @param params The LEAP_RECORDING_PARAMETERS describing what operations are requested."]
6229 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6230 #[doc = " @since 3.2.0"]
6231 pub fn LeapRecordingOpen(
6232 ppRecording: *mut LEAP_RECORDING,
6233 filePath: *const ::std::os::raw::c_char,
6234 params: LEAP_RECORDING_PARAMETERS,
6235 ) -> eLeapRS;
6236}
6237extern "C" {
6238 #[doc = " \\ingroup Functions"]
6239 #[doc = " Closes a LEAP_RECORDING."]
6240 #[doc = ""]
6241 #[doc = " @param[out] ppRecording The recording being closed. Will modify *ppRecording to be null."]
6242 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6243 #[doc = " @since 3.2.0"]
6244 pub fn LeapRecordingClose(ppRecording: *mut LEAP_RECORDING) -> eLeapRS;
6245}
6246extern "C" {
6247 #[doc = " \\ingroup Functions"]
6248 #[doc = " Fills in a LEAP_RECORDING_STATUS struct for an open recording."]
6249 #[doc = " This struct provides the applicable eLeapRecordingFlags."]
6250 #[doc = ""]
6251 #[doc = " @param pRecording The open recording."]
6252 #[doc = " @param[out] pstatus A LEAP_RECORDING_STATUS struct to receive the recording status."]
6253 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6254 #[doc = " @since 3.2.0"]
6255 pub fn LeapRecordingGetStatus(
6256 pRecording: LEAP_RECORDING,
6257 pstatus: *mut LEAP_RECORDING_STATUS,
6258 ) -> eLeapRS;
6259}
6260extern "C" {
6261 #[doc = " \\ingroup Functions"]
6262 #[doc = " Retrieves the number of bytes required to allocate the next frame in a recording."]
6263 #[doc = ""]
6264 #[doc = " Use this function to determine the size of the buffer to allocate before calling"]
6265 #[doc = " LeapRecordingRead()."]
6266 #[doc = ""]
6267 #[doc = " @param pRecording The recording being read from."]
6268 #[doc = " @param[out] pncbEvent A pointer that receives the number of bytes required to store the next frame."]
6269 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6270 #[doc = " @since 3.2.0"]
6271 pub fn LeapRecordingReadSize(pRecording: LEAP_RECORDING, pncbEvent: *mut u64) -> eLeapRS;
6272}
6273extern "C" {
6274 #[doc = " \\ingroup Functions"]
6275 #[doc = " Reads a tracking frame from a LEAP_RECORDING file."]
6276 #[doc = ""]
6277 #[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
6278 #[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
6279 #[doc = ""]
6280 #[doc = " @param pRecording The recording being read from."]
6281 #[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with the next recorded frame."]
6282 #[doc = " @param ncbEvent The number of bytes pointed to by pEvent."]
6283 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6284 #[doc = " @since 3.2.0"]
6285 pub fn LeapRecordingRead(
6286 pRecording: LEAP_RECORDING,
6287 pEvent: *mut LEAP_TRACKING_EVENT,
6288 ncbEvent: u64,
6289 ) -> eLeapRS;
6290}
6291extern "C" {
6292 #[doc = " \\ingroup Functions"]
6293 #[doc = " Writes a tracking frame to a LEAP_RECORDING file."]
6294 #[doc = ""]
6295 #[doc = " @param pRecording The recording being written to."]
6296 #[doc = " @param[out] pEvent A pointer to a flat buffer which is filled with an interpolated frame."]
6297 #[doc = " @param pnBytesWritten If non-null the number of bytes written."]
6298 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6299 #[doc = " @since 3.2.0"]
6300 pub fn LeapRecordingWrite(
6301 pRecording: LEAP_RECORDING,
6302 pEvent: *mut LEAP_TRACKING_EVENT,
6303 pnBytesWritten: *mut u64,
6304 ) -> eLeapRS;
6305}
6306extern "C" {
6307 #[doc = " \\ingroup Functions"]
6308 #[doc = " This finds the default device and returns the result of LeapScaleOffsetMatrixEx()"]
6309 #[doc = " @sa LeapScaleOffsetMatrixEx for additional information"]
6310 #[doc = ""]
6311 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6312 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6313 #[doc = " @param[out] dest A pointer to a single-precision float array of size 16, containing"]
6314 #[doc = " the coefficients of the 4x4 matrix in Column Major order"]
6315 #[doc = " @since 5.x.x"]
6316 pub fn LeapScaleOffsetMatrix(
6317 hConnection: LEAP_CONNECTION,
6318 camera: eLeapPerspectiveType,
6319 dest: *mut f32,
6320 );
6321}
6322extern "C" {
6323 #[doc = " \\ingroup Functions"]
6324 #[doc = ""]
6325 #[doc = " Returns the appropriate scale and offset coefficients required to project"]
6326 #[doc = " normalised Rectilinear coordinates to image-scale coordinates."]
6327 #[doc = ""]
6328 #[doc = " This is composed of a 4 x 4 matrix of the form:"]
6329 #[doc = ""]
6330 #[doc = " scale_x, 0, 0, offset_x,"]
6331 #[doc = " 0, 1, 0, 0,"]
6332 #[doc = " 0, 0, scale_z, offset_z"]
6333 #[doc = " 0, 0, 0, 1"]
6334 #[doc = ""]
6335 #[doc = " This matrix is specific to the size of the current image as contained within LEAP_IMAGE."]
6336 #[doc = ""]
6337 #[doc = " In practical terms, use this matrix in combination with normalised rays"]
6338 #[doc = " to project 3D points into a rectilinear image space (i.e. to visualise hands on an undistorted image)."]
6339 #[doc = ""]
6340 #[doc = " The pipeline would be:"]
6341 #[doc = " 1) Take 3D points from hand tracking."]
6342 #[doc = " 2) Apply an extrinsic transformation to a specific camera's coordinate system (@sa LeapExtrinsicCameraMatrixEx)"]
6343 #[doc = " 3) Apply a perspective division to transform 3D points to rays."]
6344 #[doc = " 4) Apply the ScaleOffset matrix to these points."]
6345 #[doc = ""]
6346 #[doc = " These points will now be in the correct coordinate system consistent with the undistorted rectilinear image"]
6347 #[doc = " provided by LEAP_IMAGE::distortion_matrix."]
6348 #[doc = ""]
6349 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6350 #[doc = " @param hDevice A device handle returned by LeapOpenDevice()."]
6351 #[doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration"]
6352 #[doc = " @param[out] dest A pointer to a single-precision float array of size 16, containing"]
6353 #[doc = " the coefficients of the 4x4 matrix in Column Major order"]
6354 #[doc = " @since 5.x.x"]
6355 pub fn LeapScaleOffsetMatrixEx(
6356 hConnection: LEAP_CONNECTION,
6357 hDevice: LEAP_DEVICE,
6358 camera: eLeapPerspectiveType,
6359 dest: *mut f32,
6360 );
6361}
6362#[doc = " The parameter for requesting the version of the client."]
6363#[doc = " @since 5.2.x"]
6364pub const _eLeapVersionPart_eLeapVersionPart_ClientLibrary: _eLeapVersionPart = 0;
6365#[doc = " The parameter for requesting the protocol version of the client."]
6366#[doc = " @since 5.2.x"]
6367pub const _eLeapVersionPart_eLeapVersionPart_ClientProtocol: _eLeapVersionPart = 1;
6368#[doc = " The parameter for requesting the version of the server."]
6369#[doc = " @since 5.2.x"]
6370pub const _eLeapVersionPart_eLeapVersionPart_ServerLibrary: _eLeapVersionPart = 2;
6371#[doc = " The parameter for requesting the protocol version of the server."]
6372#[doc = " @since 5.2.x"]
6373pub const _eLeapVersionPart_eLeapVersionPart_ServerProtocol: _eLeapVersionPart = 3;
6374#[doc = " \\ingroup Enum"]
6375#[doc = " Defines the parameters used to access version information."]
6376#[doc = " @since 5.2.x"]
6377pub type _eLeapVersionPart = ::std::os::raw::c_int;
6378#[doc = " \\ingroup Enum"]
6379#[doc = " Defines the parameters used to access version information."]
6380#[doc = " @since 5.2.x"]
6381pub use self::_eLeapVersionPart as eLeapVersionPart;
6382#[doc = " \\ingroup Structs"]
6383#[doc = " Version information."]
6384#[doc = ""]
6385#[doc = " The members can be converted to a version string using the format:"]
6386#[doc = ""]
6387#[doc = " major.minor.patch.build"]
6388#[doc = ""]
6389#[doc = " @since 5.2.0"]
6390#[repr(C, packed)]
6391#[derive(Debug, Copy, Clone)]
6392pub struct _LEAP_VERSION {
6393 #[doc = " The major version."]
6394 #[doc = " @since 5.2.0"]
6395 pub major: i32,
6396 #[doc = " The minor version."]
6397 #[doc = " @since 5.2.0"]
6398 pub minor: i32,
6399 #[doc = " The patch version."]
6400 #[doc = " @since 5.2.0"]
6401 pub patch: i32,
6402}
6403#[test]
6404fn bindgen_test_layout__LEAP_VERSION() {
6405 assert_eq!(
6406 ::std::mem::size_of::<_LEAP_VERSION>(),
6407 12usize,
6408 concat!("Size of: ", stringify!(_LEAP_VERSION))
6409 );
6410 assert_eq!(
6411 ::std::mem::align_of::<_LEAP_VERSION>(),
6412 1usize,
6413 concat!("Alignment of ", stringify!(_LEAP_VERSION))
6414 );
6415 fn test_field_major() {
6416 assert_eq!(
6417 unsafe {
6418 let uninit = ::std::mem::MaybeUninit::<_LEAP_VERSION>::uninit();
6419 let ptr = uninit.as_ptr();
6420 ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize
6421 },
6422 0usize,
6423 concat!(
6424 "Offset of field: ",
6425 stringify!(_LEAP_VERSION),
6426 "::",
6427 stringify!(major)
6428 )
6429 );
6430 }
6431 test_field_major();
6432 fn test_field_minor() {
6433 assert_eq!(
6434 unsafe {
6435 let uninit = ::std::mem::MaybeUninit::<_LEAP_VERSION>::uninit();
6436 let ptr = uninit.as_ptr();
6437 ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize
6438 },
6439 4usize,
6440 concat!(
6441 "Offset of field: ",
6442 stringify!(_LEAP_VERSION),
6443 "::",
6444 stringify!(minor)
6445 )
6446 );
6447 }
6448 test_field_minor();
6449 fn test_field_patch() {
6450 assert_eq!(
6451 unsafe {
6452 let uninit = ::std::mem::MaybeUninit::<_LEAP_VERSION>::uninit();
6453 let ptr = uninit.as_ptr();
6454 ::std::ptr::addr_of!((*ptr).patch) as usize - ptr as usize
6455 },
6456 8usize,
6457 concat!(
6458 "Offset of field: ",
6459 stringify!(_LEAP_VERSION),
6460 "::",
6461 stringify!(patch)
6462 )
6463 );
6464 }
6465 test_field_patch();
6466}
6467#[doc = " \\ingroup Structs"]
6468#[doc = " Version information."]
6469#[doc = ""]
6470#[doc = " The members can be converted to a version string using the format:"]
6471#[doc = ""]
6472#[doc = " major.minor.patch.build"]
6473#[doc = ""]
6474#[doc = " @since 5.2.0"]
6475pub type LEAP_VERSION = _LEAP_VERSION;
6476extern "C" {
6477 #[doc = " \\ingroup Functions"]
6478 #[doc = ""]
6479 #[doc = " Returns the version of a specified part of the system."]
6480 #[doc = ""]
6481 #[doc = " If an invalid connection handle is provided only the version details of the client will be available."]
6482 #[doc = ""]
6483 #[doc = " @param hConnection The connection handle created by LeapCreateConnection()."]
6484 #[doc = " @param versionPart The version part to return, this will reference one part of the system."]
6485 #[doc = " @param[out] pVersion A pointer to a struct used to store the version number."]
6486 #[doc = " @returns The operation result code, a member of the eLeapRS enumeration."]
6487 #[doc = " @since 5.2.x"]
6488 pub fn LeapGetVersion(
6489 hConnection: LEAP_CONNECTION,
6490 versionPart: eLeapVersionPart,
6491 pVersion: *mut LEAP_VERSION,
6492 ) -> eLeapRS;
6493}
6494extern "C" {
6495 #[doc = " Not Supported:"]
6496 #[doc = ""]
6497 #[doc = " The following functions are included for API compatibility with earlier LeapC version."]
6498 #[doc = " They are no longer supported and calling them will have no effects."]
6499 pub fn LeapGetPointMappingSize(hConnection: LEAP_CONNECTION, pSize: *mut u64) -> eLeapRS;
6500}
6501extern "C" {
6502 pub fn LeapGetPointMapping(
6503 hConnection: LEAP_CONNECTION,
6504 pointMapping: *mut LEAP_POINT_MAPPING,
6505 pSize: *mut u64,
6506 ) -> eLeapRS;
6507}
6508#[repr(C, packed)]
6509#[derive(Debug, Copy, Clone)]
6510pub struct _LEAP_TELEMETRY_DATA {
6511 pub thread_id: u32,
6512 pub start_time: u64,
6513 pub end_time: u64,
6514 pub zone_depth: u32,
6515 pub file_name: *const ::std::os::raw::c_char,
6516 pub line_number: u32,
6517 pub zone_name: *const ::std::os::raw::c_char,
6518}
6519#[test]
6520fn bindgen_test_layout__LEAP_TELEMETRY_DATA() {
6521 assert_eq!(
6522 ::std::mem::size_of::<_LEAP_TELEMETRY_DATA>(),
6523 44usize,
6524 concat!("Size of: ", stringify!(_LEAP_TELEMETRY_DATA))
6525 );
6526 assert_eq!(
6527 ::std::mem::align_of::<_LEAP_TELEMETRY_DATA>(),
6528 1usize,
6529 concat!("Alignment of ", stringify!(_LEAP_TELEMETRY_DATA))
6530 );
6531 fn test_field_thread_id() {
6532 assert_eq!(
6533 unsafe {
6534 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6535 let ptr = uninit.as_ptr();
6536 ::std::ptr::addr_of!((*ptr).thread_id) as usize - ptr as usize
6537 },
6538 0usize,
6539 concat!(
6540 "Offset of field: ",
6541 stringify!(_LEAP_TELEMETRY_DATA),
6542 "::",
6543 stringify!(thread_id)
6544 )
6545 );
6546 }
6547 test_field_thread_id();
6548 fn test_field_start_time() {
6549 assert_eq!(
6550 unsafe {
6551 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6552 let ptr = uninit.as_ptr();
6553 ::std::ptr::addr_of!((*ptr).start_time) as usize - ptr as usize
6554 },
6555 4usize,
6556 concat!(
6557 "Offset of field: ",
6558 stringify!(_LEAP_TELEMETRY_DATA),
6559 "::",
6560 stringify!(start_time)
6561 )
6562 );
6563 }
6564 test_field_start_time();
6565 fn test_field_end_time() {
6566 assert_eq!(
6567 unsafe {
6568 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6569 let ptr = uninit.as_ptr();
6570 ::std::ptr::addr_of!((*ptr).end_time) as usize - ptr as usize
6571 },
6572 12usize,
6573 concat!(
6574 "Offset of field: ",
6575 stringify!(_LEAP_TELEMETRY_DATA),
6576 "::",
6577 stringify!(end_time)
6578 )
6579 );
6580 }
6581 test_field_end_time();
6582 fn test_field_zone_depth() {
6583 assert_eq!(
6584 unsafe {
6585 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6586 let ptr = uninit.as_ptr();
6587 ::std::ptr::addr_of!((*ptr).zone_depth) as usize - ptr as usize
6588 },
6589 20usize,
6590 concat!(
6591 "Offset of field: ",
6592 stringify!(_LEAP_TELEMETRY_DATA),
6593 "::",
6594 stringify!(zone_depth)
6595 )
6596 );
6597 }
6598 test_field_zone_depth();
6599 fn test_field_file_name() {
6600 assert_eq!(
6601 unsafe {
6602 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6603 let ptr = uninit.as_ptr();
6604 ::std::ptr::addr_of!((*ptr).file_name) as usize - ptr as usize
6605 },
6606 24usize,
6607 concat!(
6608 "Offset of field: ",
6609 stringify!(_LEAP_TELEMETRY_DATA),
6610 "::",
6611 stringify!(file_name)
6612 )
6613 );
6614 }
6615 test_field_file_name();
6616 fn test_field_line_number() {
6617 assert_eq!(
6618 unsafe {
6619 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6620 let ptr = uninit.as_ptr();
6621 ::std::ptr::addr_of!((*ptr).line_number) as usize - ptr as usize
6622 },
6623 32usize,
6624 concat!(
6625 "Offset of field: ",
6626 stringify!(_LEAP_TELEMETRY_DATA),
6627 "::",
6628 stringify!(line_number)
6629 )
6630 );
6631 }
6632 test_field_line_number();
6633 fn test_field_zone_name() {
6634 assert_eq!(
6635 unsafe {
6636 let uninit = ::std::mem::MaybeUninit::<_LEAP_TELEMETRY_DATA>::uninit();
6637 let ptr = uninit.as_ptr();
6638 ::std::ptr::addr_of!((*ptr).zone_name) as usize - ptr as usize
6639 },
6640 36usize,
6641 concat!(
6642 "Offset of field: ",
6643 stringify!(_LEAP_TELEMETRY_DATA),
6644 "::",
6645 stringify!(zone_name)
6646 )
6647 );
6648 }
6649 test_field_zone_name();
6650}
6651pub type LEAP_TELEMETRY_DATA = _LEAP_TELEMETRY_DATA;
6652extern "C" {
6653 pub fn LeapTelemetryProfiling(
6654 hConnection: LEAP_CONNECTION,
6655 telemetryData: *const LEAP_TELEMETRY_DATA,
6656 ) -> eLeapRS;
6657}
6658extern "C" {
6659 pub fn LeapTelemetryGetNow() -> u64;
6660}
6661extern "C" {
6662 pub fn LeapInterpolateHeadPose(
6663 hConnection: LEAP_CONNECTION,
6664 timestamp: i64,
6665 pEvent: *mut LEAP_HEAD_POSE_EVENT,
6666 ) -> eLeapRS;
6667}
6668extern "C" {
6669 pub fn LeapInterpolateHeadPoseEx(
6670 hConnection: LEAP_CONNECTION,
6671 hDevice: LEAP_DEVICE,
6672 timestamp: i64,
6673 pEvent: *mut LEAP_HEAD_POSE_EVENT,
6674 ) -> eLeapRS;
6675}
6676extern "C" {
6677 pub fn LeapInterpolateEyePositions(
6678 hConnection: LEAP_CONNECTION,
6679 timestamp: i64,
6680 pEvent: *mut LEAP_EYE_EVENT,
6681 ) -> eLeapRS;
6682}