Documentation
Tutorials
Gesture Documentation
Related
Documentation
Tutorials
Gesture Documentation
Related
This is an old revision of the document!
The GestureWorks Core API consists of a series of methods, functions and data structures which are used to connect applications to GestureWorks, prompt the core to analyze and process gestures, then return structured gesture event data to the application layer.
The functions available through GestureWorks are as follows:
Initializes GestureWorks with a default set of gestures. This returns an instance of GestureWorks to use on future function calls.
Initializes GestureWorks with default options and a default set of gestures. This is used for screen mode, where gestures are global and not attached to individual touch objects.
Initializes GestureWorks with a custom gml file.
Deletes an instance of GestureWorks.
Removes a touch object from GestureWorks.
Adds a gesture to an object. This passes in the name of the object and the gesture to associate.
Associates a touch event with a TouchObject. The touch_event_id is the point id, x and y are the coordinates for the point, and touch_status is one of:
const int GW_TOUCHUPDATE = 0; const int GW_TOUCHADDED = 1; const int GW_TOUCHREMOVED = 2;
Retrieves the current touch events GestureWorks has. These points are retrieved and then addTouchPointToObject is called to associate a touch event with a GestureWorks TouchObject. The PointInfo structure is:
struct PointInfo { int point_id; int status; float position_x; float position_y; int timestamp; };