|
def | __disown__ (self) |
|
def | __init__ (self) |
|
LEAP_EXPORT | Listener () |
|
def | on_connect (self, arg0) |
|
def | on_device_change (self, arg0) |
|
def | on_disconnect (self, arg0) |
|
def | on_exit (self, arg0) |
|
def | on_focus_gained (self, arg0) |
|
def | on_focus_lost (self, arg0) |
|
def | on_frame (self, arg0) |
|
def | on_images (self, arg0) |
|
def | on_init (self, arg0) |
|
def | on_service_connect (self, arg0) |
|
def | on_service_disconnect (self, arg0) |
|
virtual LEAP_EXPORT void | onConnect (const Controller &) |
|
virtual LEAP_EXPORT void | onDeviceChange (const Controller &) |
|
virtual LEAP_EXPORT void | onDisconnect (const Controller &) |
|
virtual LEAP_EXPORT void | onExit (const Controller &) |
|
virtual LEAP_EXPORT void | onFocusGained (const Controller &) |
|
virtual LEAP_EXPORT void | onFocusLost (const Controller &) |
|
virtual LEAP_EXPORT void | onFrame (const Controller &) |
|
virtual LEAP_EXPORT void | onImages (const Controller &) |
|
virtual LEAP_EXPORT void | onInit (const Controller &) |
|
virtual LEAP_EXPORT void | onServiceConnect (const Controller &) |
|
virtual LEAP_EXPORT void | onServiceDisconnect (const Controller &) |
|
virtual LEAP_EXPORT | ~Listener () |
|
The Listener class defines a set of callback functions that you can override in a subclass to respond to events dispatched by the Controller object.
To handle Leap Motion events, create an instance of a Listener subclass and assign it to the Controller instance. The Controller calls the relevant Listener callback function when an event occurs, passing in a reference to itself. You do not have to implement callbacks for events you do not want to handle.
The Controller object calls these Listener functions from a thread created by the Leap Motion library, not the thread used to create or set the Listener instance.
- Since
- 1.0
Definition at line 5943 of file Leap.h.
Called when a Leap Motion controller plugged in, unplugged, or the device changes state.
State changes include changes in frame rate and entering or leaving "robust" mode. Note that there is currently no way to query whether a device is in robust mode. You can use Frame::currentFramerate() to get the framerate.
- Parameters
-
controller | The Controller object invoking this callback function. |
- Since
- 1.2
Reimplemented in CameraListener, CameraListener, and HandsListener.
Definition at line 6096 of file Leap.h.
Called when the Controller object disconnects from the Leap Motion software or the Leap Motion hardware is unplugged. The controller can disconnect when the Leap Motion device is unplugged, the user shuts the Leap Motion software down, or the Leap Motion software encounters an unrecoverable error.
Note: When you launch a Leap-enabled application in a debugger, the Leap Motion library does not disconnect from the application. This is to allow you to step through code without losing the connection because of time outs.
- Parameters
-
controller | The Controller object invoking this callback function. |
- Since
- 1.0
Reimplemented in CameraListener, CameraListener, HandsListener, and LeapListener.
Definition at line 5998 of file Leap.h.
Called when a new frame of hand and finger tracking data is available. Access the new frame data using the Controller::frame() function.
Note, the Controller skips any pending onFrame events while your onFrame handler executes. If your implementation takes too long to return, one or more frames can be skipped. The Controller still inserts the skipped frames into the frame history. You can access recent frames by setting the history parameter when calling the Controller::frame() function. You can determine if any pending onFrame events were skipped by comparing the ID of the most recent frame with the ID of the last received frame.
- Parameters
-
controller | The Controller object invoking this callback function. |
- Since
- 1.0
Reimplemented in CameraListener, CameraListener, HandsListener, and LeapListener.
Definition at line 6028 of file Leap.h.
Called if the Leap Motion daemon/service disconnects from your application Controller.
Normally, this callback is not invoked. It is only called if some external event or problem shuts down the service or otherwise interrupts the connection.
- Parameters
-
controller | The Controller object invoking this callback function. |
- Since
- 1.2
Reimplemented in CameraListener, CameraListener, and HandsListener.
Definition at line 6082 of file Leap.h.