Inherits from NSObject
Declared in LeapObjectiveC.h

Overview

The LeapConfig class provides access to Leap system configuration information.

You can get and set gesture configuration parameters using the LeapConfig object
obtained from a connected LeapController object. The key strings required to
identify a configuration parameter include:

Key string Value type Default value Units
Gesture.Circle.MinRadius float 5.0 mm
Gesture.Circle.MinArc float 1.5*pi radians
Gesture.Swipe.MinLength float 150 mm
Gesture.Swipe.MinVelocity float 1000 mm/s
Gesture.KeyTap.MinDownVelocity float 50 mm/s
Gesture.KeyTap.HistorySeconds float 0.1 s
Gesture.KeyTap.MinDistance float 5.0 mm
Gesture.ScreenTap.MinForwardVelocity float 50 mm/s
Gesture.ScreenTap.HistorySeconds float 0.1 s
Gesture.ScreenTap.MinDistance float 3.0 mm

After setting a configuration value, you must call the [Config save] method
to commit the changes. The configuration value changes are not persistent;
your application needs to set the values everytime it runs.

Tasks

Instance Methods

getBool:

Gets the boolean representation for the specified key.

- (BOOL)getBool:(NSString *)key

Discussion

Gets the boolean representation for the specified key.

Declared In

LeapObjectiveC.h

getFloat:

Gets the floating point representation for the specified key.

- (float)getFloat:(NSString *)key

Discussion

Gets the floating point representation for the specified key.

Declared In

LeapObjectiveC.h

getInt32:

Gets the 32-bit integer representation for the specified key.

- (int32_t)getInt32:(NSString *)key

Discussion

Gets the 32-bit integer representation for the specified key.

Declared In

LeapObjectiveC.h

getString:

Gets the NSString representation for the specified key.

- (NSString *)getString:(NSString *)key

Discussion

Gets the NSString representation for the specified key.

Declared In

LeapObjectiveC.h

save

Saves the current state of the config.

- (BOOL)save

Return Value

TRUE on success, NO on failure.

Discussion

Saves the current state of the config.

Call [LeapConfig save:] after making a set of configuration changes. The
[LeapConfig save:] function transfers the configuration changes to the Leap
application. The configuration value changes are not persistent; your
application needs to set the values everytime it runs.

Declared In

LeapObjectiveC.h

setBool:value:

Sets the boolean representation for the specified key.

- (BOOL)setBool:(NSString *)key value:(BOOL)value

Return Value

YES on success, NO on failure.

Discussion

Sets the boolean representation for the specified key.

Declared In

LeapObjectiveC.h

setFloat:value:

Sets the floating point representation for the specified key.

- (BOOL)setFloat:(NSString *)key value:(float)value

Return Value

YES on success, NO on failure.

Discussion

Sets the floating point representation for the specified key.

Declared In

LeapObjectiveC.h

setInt32:value:

Sets the 32-bit integer representation for the specified key.

- (BOOL)setInt32:(NSString *)key value:(int32_t)value

Return Value

YES on success, NO on failure.

Discussion

Sets the 32-bit integer representation for the specified key.

Declared In

LeapObjectiveC.h

setString:value:

Sets the string representation for the specified key.

- (BOOL)setString:(NSString *)key value:(NSString *)value

Return Value

YES on success, NO on failure.

Discussion

Sets the string representation for the specified key.

Declared In

LeapObjectiveC.h

type:

Reports the natural data type for the value related to the specified key.

- (LeapValueType)type:(NSString *)key

Parameters

key

The key for the looking up the value in the configuration dictionary.

Return Value

The native data type of the value, that is, the type that does not
require a data conversion.

Discussion

Reports the natural data type for the value related to the specified key.

The supported data types defined by the members of the LeapValueType
enumeration:

  • TYPE_BOOLEAN = 1
  • TYPE_INT32 = 2
  • TYPE_FLOAT = 6
  • TYPE_STRING = 8
  • TYPE_UNKNOWN = 0 (usually indicates that an error occured)

Declared In

LeapObjectiveC.h