UPDD API - Gestures

Revision 1.0 – 17th August 2015

www.touch-base.com\documentation\API

 

 

 

 

 

Contact

This document describes the gesture API function for notification of performed gestures on the touch screen via the UPDD API.

Starting with build 5.1.1421, UPDD for Windows; Linux and Mac supports a gesture engine which delivers information about detected on screen gestures via the UPDD API.

For Mac OS X the engine is part of the comprehensive gesture software that can perform system actions associated with the gesture before the gesture is posted into the OS to invoke any gesture related functionality on the desktop or specific application.

Under Windows and Linux the gesture engine is supplied to determine the gesture being performed and post gesture data to the driver for onward dispatch to UPDD Client applications.

Deliverables

The gesture software is supplied in compressed files as follows:

File

Description

updd-gestures-A-macosx.zip

Mac OS X gesture file.

updd-gestures-linux32.tar.gz

Linux 32 bit gesture file

updd-gestures-linux64.tar.gz

Linux 64 bit gesture file

updd-gestures-win32.zip

Window 32 bit gesture file

updd-gestures-win64.zip

Windows 64 bit gesture files

API specifics

The method for receiving gesture information via the UPDD API is the same as for other data types, although a couple of additional steps are required in setting up the software to build.

 

Add the following 2 lines before inclusion of tbapi.h

#define UPDD_GESTURES
#include "TBGestureAnalysisTypes.h"
#include "TBApi.h"

Ensure that the files TBGesturesAnalysisTypes.h and gestures_event.inl are both in the include path.

Having done this simply use the constant _ReadDataTypeGestureEvent in an appropriate call to TBApiRegisterDataCallback

e.g.

    TBApiRegisterDataCallback(0, (unsigned long)this, _ReadDataTypeGestureEvent, MyGestureCallback);

 

Data specific to the gesture will be reported in the GestureEvent section of the PointerData structure to the registered callback.

e.g.

void _stdcall MyGestureCallback(unsigned long /*context*/, _PointerData* data)
{
  if(data->pd.gestureEvent.type == kTBGestureTwoFingerTap)
  {
    cout << "Saw a two finger tap" << endl;
  }
}

The gestures software must be running to utilise the gestures API.

Please refer to the Gestures documentation for your target platform for details of how to run the software.

Given the limited support for gestures in Linux it is our intention to expand the Linux gesture software to be able to associate system and application actions against performed gestures.

Contact

For further information or technical assistance please email the technical support team at technical@touch-base.com.