Gestures with Symbian
Symbian^3 introduced a new API called CAknTouchGestureFw that can be used for detecting single touch as well as with multitouch gestures.
This API is not part of the public SDK, but the API is included in Symbian open source packages. The API usage is straightforward and only required following two lines of code:
iGestureHelper = AknTouchGestureFw::CAknTouchGestureFw::NewL(*this, *this);
The CAknTouchGestureFw::NewL() takes two arguments, where the first one is the MAknTouchGestureFwObserver interface for the gesture events, and the second one is the CCoeControl derived class that gets the pointer events from which the gestures are determined from.
The SetGestureInterestL() then is used for telling the API on which gestures we are interested, by using the EAknTouchGestureFwAll, all gestures should be forwarded to the specified interface.
The MAknTouchGestureFwObserver callback interface only defines one function named HandleTouchGestureL() that has one argument typed MAknTouchGestureFwEvent. This argument implements two functions for retrieving the gesture:
- Group(): Identified the gesture group type
- Type(): identifies the actual gesture inside the group
Currently supported groups and types are as follows:
The API only identifies the gesture, and the actual value changes for gestures should be determined by checking the actual advanced pointer event values.
And example utilizing the API can be found from Advanced Pointer.zip