Gestures with Symbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: symbianyucca (21 Dec 2010)
Last edited: hamishwillee (30 May 2013)

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:

1. EAknTouchGestureFwGroupTap

  • EAknTouchGestureFwTap
  • EAknTouchGestureFwDoubleTap
  • EAknTouchGestureFwLongTap

2. EAknTouchGestureFwGroupFlick

  • EAknTouchGestureFwFlickLeft
  • EAknTouchGestureFwFlickRight
  • EAknTouchGestureFwFlickUp
  • EAknTouchGestureFwFlickDown

3. EAknTouchGestureFwGroupDrag

  • EAknTouchGestureFwDrag

4. EAknTouchGestureFwGroupPinch

  • EAknTouchGestureFwPinch

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

This page was last modified on 30 May 2013, at 07:33.
37 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.