Leap Motion C API  3.1
The API to the LeapC library.
Enumerations

Enumerations used by the LeapC functions and data structures. More...

Enumerations

enum  eLeapRS {
  eLeapRS_Success,
  eLeapRS_UnknownError,
  eLeapRS_InvalidArgument,
  eLeapRS_InsufficientResources,
  eLeapRS_InsufficientBuffer,
  eLeapRS_Timeout,
  eLeapRS_NotConnected,
  eLeapRS_HandshakeIncomplete,
  eLeapRS_BufferSizeOverflow,
  eLeapRS_ProtocolError,
  eLeapRS_InvalidClientID,
  eLeapRS_UnexpectedClosed,
  eLeapRS_UnknownImageFrameRequest,
  eLeapRS_UnknownTrackingFrameID,
  eLeapRS_RoutineIsNotSeer,
  eLeapRS_TimestampTooEarly,
  eLeapRS_ConcurrentPoll,
  eLeapRS_NotAvailable,
  eLeapRS_NotStreaming,
  eLeapRS_CannotOpenDevice
}
 Defines the codes returned by all LeapC functions. More...
 
enum  eLeapValueType {
  eLeapValueType_Unknown,
  eLeapValueType_Boolean,
  eLeapValueType_Int32,
  eLeapValueType_Float,
  eLeapValueType_String
}
 Identifies the operative data type of a LEAP_VARIANT struct instance. More...
 
enum  eLeapDeviceCaps { eLeapDeviceCaps_Color }
 Flags enumerating Leap device capabilities. More...
 
enum  eLeapDevicePID {
  eLeapDevicePID_Unknown,
  eLeapDevicePID_Peripheral,
  eLeapDevicePID_Dragonfly,
  eLeapDevicePID_Nightcrawler,
  eLeapDevicePID_Invalid
}
 Device hardware types. More...
 
enum  eLeapPolicyFlag {
  eLeapPolicyFlag_BackgroundFrames,
  eLeapPolicyFlag_OptimizeHMD,
  eLeapPolicyFlag_AllowPauseResume
}
 Enumerates flags for the service policies. More...
 
enum  eLeapDeviceFlag { eLeapDeviceFlag_Stream }
 Defines the Device flags. More...
 
enum  eLeapDeviceStatus {
  eLeapDeviceStatus_Streaming,
  eLeapDeviceStatus_Paused,
  eLeapDeviceStatus_Robust,
  eLeapDeviceStatus_Smudged,
  eLeapDeviceStatus_UnknownFailure,
  eLeapDeviceStatus_BadCalibration,
  eLeapDeviceStatus_BadFirmware,
  eLeapDeviceStatus_BadTransport,
  eLeapDeviceStatus_BadControl
}
 Enumerates the device status codes. More...
 
enum  eLeapImageType {
  eLeapImageType_UNKNOWN,
  eLeapImageType_Default,
  eLeapImageType_Raw
}
 Functional image types (not data formats). More...
 
enum  eLeapImageFormat {
  eLeapImageFormat_UNKNOWN,
  eLeapImageFormat_IR,
  eLeapImageFormat_RGBIr_Bayer
}
 Image formats. More...
 
enum  eLeapPerspectiveType {
  eLeapPerspectiveType_invalid,
  eLeapPerspectiveType_stereo_left,
  eLeapPerspectiveType_stereo_right,
  eLeapPerspectiveType_mono
}
 Camera perspective types. More...
 
enum  eLeapImageRequestError {
  eLeapImageRequestError_Unknown,
  eLeapImageRequestError_ImagesDisabled,
  eLeapImageRequestError_Unavailable,
  eLeapImageRequestError_InsufficientBuffer
}
 Error codes describing failed image requests. More...
 
enum  eLeapImageFrameRequestStatus {
  eLeapImageFrameRequestStatus_Waiting,
  eLeapImageFrameRequestStatus_Underway,
  eLeapImageFrameRequestStatus_Cancelling
}
 Enumerates the codes for image request status. More...
 
enum  eLeapHandType {
  eLeapHandType_Left,
  eLeapHandType_Right
}
 The Hand chirality types. More...
 
enum  eLeapLogSeverity {
  eLeapLogSeverity_Unknown,
  eLeapLogSeverity_Critical,
  eLeapLogSeverity_Warning,
  eLeapLogSeverity_Information
}
 System message severity types. More...
 
enum  eLeapEventType {
  eLeapEventType_None,
  eLeapEventType_Connection,
  eLeapEventType_ConnectionLost,
  eLeapEventType_Device,
  eLeapEventType_DeviceFailure,
  eLeapEventType_Policy,
  eLeapEventType_Tracking,
  eLeapEventType_ImageRequestError,
  eLeapEventType_ImageComplete,
  eLeapEventType_LogEvent,
  eLeapEventType_DeviceLost,
  eLeapEventType_ConfigResponse,
  eLeapEventType_ConfigChange,
  eLeapEventType_DeviceStatusChange
}
 The types of event messages resulting from calling LeapPollConnection(). More...
 
enum  eLeapRecordingFlags
 Defines the recording mode provided to the LeapRecordingOpen() function. More...
 

Detailed Description

Enumerations used by the LeapC functions and data structures.

Enumeration Type Documentation

Flags enumerating Leap device capabilities.

Since
3.0.0
Enumerator
eLeapDeviceCaps_Color 

The device can send color images.

Since
3.0.0

Defines the Device flags.

Currently there is only one device flag. Use with the LeapSetDeviceFlags() function and the

Enumerator
eLeapDeviceFlag_Stream 

Flag set if the device is presently streaming frames.

This flag is updated when the user pauses or resumes tracking on the device from the Leap control panel. Modification of this flag will fail if the AllowPauseResume policy is not set on this device object.

Device hardware types.

Since
3.0.0
Enumerator
eLeapDevicePID_Unknown 

An unknown device.

Since
3.1.3
eLeapDevicePID_Peripheral 

The Leap Motion consumer peripheral.

Since
3.0.0
eLeapDevicePID_Dragonfly 

Internal research product codename "Dragonfly".

Since
3.0.0
eLeapDevicePID_Nightcrawler 

Internal research product codename "Nightcrawler".

Since
3.0.0
eLeapDevicePID_Invalid 

An invalid device type value.

Since
3.1.3

Enumerates the device status codes.

Since
3.0.0
Enumerator
eLeapDeviceStatus_Streaming 

The device is sending out frames.

Since
3.0.0
eLeapDeviceStatus_Paused 

Device streaming has been paused.

Since
3.0.0
eLeapDeviceStatus_Robust 

There are known sources of infrared interference.

Device has transitioned to robust mode in order to compensate.

Since
3.1.3
eLeapDeviceStatus_Smudged 

The device's window is smudged, tracking may be degraded.

Since
3.1.3
eLeapDeviceStatus_UnknownFailure 

The device has failed, but the failure reason is not known.

Since
3.0.0
eLeapDeviceStatus_BadCalibration 

The device has a bad calibration record and cannot send frames.

Since
3.0.0
eLeapDeviceStatus_BadFirmware 

The device reports corrupt firmware or cannot install a required firmware update.

Since
3.0.0
eLeapDeviceStatus_BadTransport 

The device USB connection is faulty.

Since
3.0.0
eLeapDeviceStatus_BadControl 

The device USB control interfaces failed to initialize.

Since
3.0.0

The types of event messages resulting from calling LeapPollConnection().

Since
3.0.0
Enumerator
eLeapEventType_None 

No event has occurred within the timeout period specified when calling LeapPollConnection().

Since
3.0.0
eLeapEventType_Connection 

A connection to the Leap Motion service has been established.

Since
3.0.0
eLeapEventType_ConnectionLost 

The connection to the Leap Motion service has been lost.

Since
3.0.0
eLeapEventType_Device 

A device has been detected or plugged-in.

A device event is dispatched after a connection is established for any devices already plugged in. (The system currently only supports one streaming device at a time.)

Since
3.0.0
eLeapEventType_DeviceFailure 

A device has failed.

Device failure could be caused by hardware failure, USB controller issues, or other system instability. Note that unplugging a device generates an eLeapEventType_DeviceLost event message, not a failure message.

Since
3.0.0
eLeapEventType_Policy 

A policy change has occurred.

This can be due to setting a policy with LeapSetPolicyFlags() or due to changing or policy-related config settings, including as images_mode and background_app_mode. (A user can also change these policies using the Leap Motion Control Panel.)

Since
3.0.0
eLeapEventType_Tracking 

A tracking frame.

The message contains the tracking data for the frame.

Since
3.0.0
eLeapEventType_ImageRequestError 

The request for an image has failed.

The message contains information about the failure. The client application will not receive the requested image set.

Since
3.0.0
eLeapEventType_ImageComplete 

The request for an image is complete.

The image data has been completely written to the application-provided buffer.

Since
3.0.0
eLeapEventType_LogEvent 

A system message.

Since
3.0.0
eLeapEventType_DeviceLost 

The device connection has been lost.

This event is generally asserted when the device has been detached from the system, when the connection to the service has been lost, or if the device is closed while streaming. Generally, any event where the system can conclude no further frames will be received will result in this message.

Since
3.0.0
eLeapEventType_ConfigResponse 

The asynchronous response to a call to LeapRequestConfigValue().

Contains the value of requested configuration item.

Since
3.0.0
eLeapEventType_ConfigChange 

The asynchronous response to a call to LeapSaveConfigValue().

Reports whether the change succeeded or failed.

Since
3.0.0
eLeapEventType_DeviceStatusChange 

Notification that a status change has been detected on an attached device.

Since
3.1.3

The Hand chirality types.

Used in the LEAP_HAND struct.

Since
3.0.0
Enumerator
eLeapHandType_Left 

A left hand.

Since
3.0.0
eLeapHandType_Right 

A right hand.

Since
3.0.0

Image formats.

Since
3.0.0
Enumerator
eLeapImageFormat_UNKNOWN 

An invalid or unknown format.

Since
3.0.0
eLeapImageFormat_IR 

An infrared image.

Since
3.0.0
eLeapImageFormat_RGBIr_Bayer 

A Bayer RGBIr image with uncorrected RGB channels.

Since
3.0.0

Enumerates the codes for image request status.

Use the LeapGetImageRequestStatus() function to check on the status of a request that is not complete.

Since
3.0.0
Enumerator
eLeapImageFrameRequestStatus_Waiting 

The request is still being serviced by the service.

@3.0.0

eLeapImageFrameRequestStatus_Underway 

The request is currently being received by the application.

@3.0.0

eLeapImageFrameRequestStatus_Cancelling 

The request is being cancelled by the user.

@3.0.0

Error codes describing failed image requests.

Since
3.0.0
Enumerator
eLeapImageRequestError_Unknown 

An unknown error has occurred.

Since
3.0.0
eLeapImageRequestError_ImagesDisabled 

Images are turned off.

(The config value with key 'image_mode' is set to 0.)

Since
3.0.0
eLeapImageRequestError_Unavailable 

The requested images are not available.

This could occur if LeapC processed the requests after the images were discarded or if the requested format is not available from the attached hardware device.

Since
3.0.0
eLeapImageRequestError_InsufficientBuffer 

The provided buffer is not large enough for the requested images.

Since
3.0.0

Functional image types (not data formats).

Enumerator
eLeapImageType_UNKNOWN 

An invalid or unknown type.

Since
3.0.0
eLeapImageType_Default 

Default, processed IR images.

Since
3.0.0
eLeapImageType_Raw 

Raw images from the device.

Since
3.0.0

System message severity types.

Since
3.0.0
Enumerator
eLeapLogSeverity_Unknown 

The message severity is not known or was not specified.

Since
3.0.0
eLeapLogSeverity_Critical 

A message about a fault that could render the software or device non-functional.

Since
3.0.0
eLeapLogSeverity_Warning 

A message warning about a condition that could degrade device capabilities.

Since
3.0.0
eLeapLogSeverity_Information 

A system status message.

Since
3.0.0

Camera perspective types.

Since
3.0.0
Enumerator
eLeapPerspectiveType_invalid 

An unknown or invalid type.

Since
3.0.0
eLeapPerspectiveType_stereo_left 

A canonically left image.

Since
3.0.0
eLeapPerspectiveType_stereo_right 

A canonically right image.

Since
3.0.0
eLeapPerspectiveType_mono 

Reserved for future use.

Since
3.0.0

Enumerates flags for the service policies.

Enumerator
eLeapPolicyFlag_BackgroundFrames 

The policy allowing an application to receive frames in the background.

Since
3.0.0
eLeapPolicyFlag_OptimizeHMD 

The policy specifying whether to optimize tracking for head-mounted device.

Since
3.0.0
eLeapPolicyFlag_AllowPauseResume 

The policy allowing an application to pause or resume service tracking.

Since
3.0.0

Defines the recording mode provided to the LeapRecordingOpen() function.

Also used in members of LEAP_RECORDING_PARAMETERS and LEAP_RECORDING_STATUS.

Since
3.2.0
enum eLeapRS

Defines the codes returned by all LeapC functions.

Since
3.0.0
Enumerator
eLeapRS_Success 

The operation completed successfully.

eLeapRS_UnknownError 

An undetermined error has occurred.

This is usually the result of an abnormal operating condition in LeapC, the Leap Motion service, or the host computer itself.

Since
3.0.0
eLeapRS_InvalidArgument 

An invalid argument was specified.

Since
3.0.0
eLeapRS_InsufficientResources 

Insufficient resources existed to complete the request.

Since
3.0.0
eLeapRS_InsufficientBuffer 

The specified buffer was not large enough to complete the request.

Since
3.0.0
eLeapRS_Timeout 

The requested operation has timed out.

Since
3.0.0
eLeapRS_NotConnected 

The operation is invalid because there is no current connection.

Since
3.0.0
eLeapRS_HandshakeIncomplete 

The operation is invalid because the connection is not complete.

Since
3.0.0
eLeapRS_BufferSizeOverflow 

The specified buffer size is too large.

Since
3.0.0
eLeapRS_ProtocolError 

A communications protocol error occurred.

Since
3.0.0
eLeapRS_InvalidClientID 

The server incorrectly specified zero as a client ID.

Since
3.0.0
eLeapRS_UnexpectedClosed 

The connection to the service was unexpectedly closed while reading or writing a message.

The server may have terminated.

Since
3.0.0
eLeapRS_UnknownImageFrameRequest 

The specified request token does not appear to be valid.

Provided that the token value which identifies the request itself was, at one point, valid, this error condition occurs when the request to which the token refers has already been satisfied or is currently being satisfied.

Since
3.0.0
eLeapRS_UnknownTrackingFrameID 

The specified frame ID is not valid or is no longer valid.

Provided that frame ID was, at one point, valid, this error condition occurs when the identifier refers to a frame that occurred further in the past than is currently recorded in the rolling frame window.

Since
3.0.0
eLeapRS_RoutineIsNotSeer 

The specified timestamp references a future point in time.

The related routine can only operate on time points having occurred in the past, and the provided timestamp occurs in the future.

Since
3.1.2
eLeapRS_TimestampTooEarly 

The specified timestamp references a point too far in the past.

The related routine can only operate on time points occurring within its immediate record of the past.

Since
3.1.2
eLeapRS_ConcurrentPoll 

LeapPollConnection is called concurrently.

Since
3.1.2
eLeapRS_NotAvailable 

A connection to the Leap Motion service could not be established.

Since
3.0.0
eLeapRS_NotStreaming 

The requested operation can only be performed while the device is sending data.

Since
3.0.0
eLeapRS_CannotOpenDevice 

The specified device could not be opened.

It is possible that the device identifier is invalid, or that the device has been disconnected since being enumerated.

Since
3.0.0

Identifies the operative data type of a LEAP_VARIANT struct instance.

Since
3.0.0
Enumerator
eLeapValueType_Unknown 

The type is unknown (which is an abnormal condition).

Since
3.0.0
eLeapValueType_Boolean 

A boolean value.

Since
3.0.0
eLeapValueType_Int32 

An integer value.

Since
3.0.0
eLeapValueType_Float 

A floating point value.

Since
3.0.0
eLeapValueType_String 

A string value.

Since
3.0.0