Grabba Driver for Android
Unified driver for Grabba devices on the Android operating system
ButtonInterface Interface Reference

Description

Interface class for Grabba device button press and release events.

Objects which implement this interface may receive callbacks when these events occur, via delegation from a ButtonListener object.

Note that this interface need not be directly implemented; it may be simpler to subclass ButtonListener and thereby receive the events directly.

Thread safety: This interface is intended to be thread-safe; any classes deriving from it should ensure that the relevant methods are callable from any thread.

See also
ButtonAPI for related API functions, and ButtonListener for more detailed descriptions of each event.
Inheritance diagram for ButtonInterface:
ButtonListener

Public Member Functions

void leftButtonEvent (boolean pressed)
 Callback which is invoked when a connected Grabba device's left button is pressed or released. More...
 
void rightButtonEvent (boolean pressed)
 Callback which is invoked when a connected Grabba device's right button is pressed or released. More...
 

Member Function Documentation

◆ leftButtonEvent()

void leftButtonEvent ( boolean  pressed)

Callback which is invoked when a connected Grabba device's left button is pressed or released.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
pressedSet true if this event indicates a button press; false if it indicates a button release

Implemented in ButtonListener.

◆ rightButtonEvent()

void rightButtonEvent ( boolean  pressed)

Callback which is invoked when a connected Grabba device's right button is pressed or released.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
pressedSet true if this event indicates a button press; false if it indicates a button release

Implemented in ButtonListener.