AknTouchGestureFw::CAknTouchGestureFw Class Reference

class AknTouchGestureFw::CAknTouchGestureFw : public CBase

CAknTouchGestureFw

Touch gesture framework provides functionality to convert a stream of pointer events into a logical gesture.

Pointer to a control (CCoeControl deriving object) is provided for the framework and gestures are recognized in the area of the control. Recognized gestures are reported to the gesture observer. The gesture observer should always set the gesture interest in order to receive gesture events.

Each gesture has its own gesture group (type TAknTouchGestureFwGroup). The events that are sent to gesture observer vary according to the gesture group.

Example of gesture fw creation:
     CAknTouchGestureFw* gestureFw =
         CAknTouchGestureFw::NewL( this, gestureControl );
     // Set gesture interest (drag and flick gestures)
     gestureFw->SetGestureInterestL(
         EAknTouchGestureFwGroupDrag | EAknTouchGestureFwGroupFlick );
Reset gesture interest (no events are sent to gesture observer):
     gestureFw->SetGestureInterestL( EAknTouchGestureFwNoGroup );
akntouchgesturefw
Since
S60 v5.2

Inherits from

  • AknTouchGestureFw::CAknTouchGestureFw

Constructor & Destructor Documentation

CAknTouchGestureFw()

CAknTouchGestureFw()[private]

C++ constructor.

~CAknTouchGestureFw()

~CAknTouchGestureFw()[virtual]

Destructor.

Member Functions Documentation

ConstructL(MAknTouchGestureFwObserver &, CCoeControl &)

voidConstructL(MAknTouchGestureFwObserver &aObserver,
CCoeControl &aControl
)[private]

Symbian second-phase constructor.

Parameters

MAknTouchGestureFwObserver & aObserverObserver of the Gesture framework.
CCoeControl & aControlSubscriber control for pointer events.

Extension_(TUint, TAny *&, TAny *)

TInt Extension_(TUintaExtensionId,
TAny *&a0,
TAny *a1
)[virtual]

Extension function.

Parameters

TUint aExtensionIdExtension id.
TAny *& a0First extension method parameter.
TAny * a1Second extension method parameter.

NewL(MAknTouchGestureFwObserver &, CCoeControl &)

IMPORT_C CAknTouchGestureFw *NewL(MAknTouchGestureFwObserver &aObserver,
CCoeControl &aControl
)[static]

Two-phased constructor.

The gesture observer and gesture receiving control need to be provided to CAknTouchGestureFw upon construction. Observer is notified about recognized gestures. Reference to the subscriber control is needed so that gesture framework can monitor the pointer events of the gesture receiving control.

Note that the subscriber control must have a window (either be a window-owning control itself or have a window-owning control as an ancestor). Also the window hiearchy must not be changed for the subscriber control after constructing the gesture framework (e.g. changing the parent of the subscriber control).

If the observer is interested in gestures that need advanced pointer events when recognizing the gestures, advanced pointer events are enabled for the control window. This means that if the device is able to handle more than one pointer at the same time, then events are delivered to control window from all detected pointers.

If the observer is interested in gestures that need pointer drag events when recognizing the gestures, drag events are enabled for the control window.

For those control windows that have advanced pointer or drag events enabled are also enabled pointer grab. This ensures that gestures are recognized also outside the control area (when gesture recognition has begun inside control area).

leave
KErrNotFound In case the subscriber control has no window.

Parameters

MAknTouchGestureFwObserver & aObserverObserver of the Gesture framework.
CCoeControl & aControlSubscriber control for pointer events.

SetFeedbackForGroupsL(TUint)

IMPORT_C voidSetFeedbackForGroupsL(TUintaGestureGroups)

Defines gesture groups, which trigger tactile feedback automatically.

Tactile feedback is triggered according to default behaviour of each group, that means that both vibra and audio feedback are on for each gesture type in defined gesture groups.

Use SetFeedbackForTypesL function for more fine-grained control over the generated feedback.

Notice that any group must have been set as interested gesture group with SetGestureInterestL function before it can trigger tactile feedback at all.

Tactile feedback is off for all gesture groups as default (if this function or SetFeedbackForGroupsL is not called).

Since
S60 v5.2

Parameters

TUint aGestureGroups- Those gesture groups, which trigger tactile feedback automatically as touch gestures are recognized or being in the process of recognizing.

SetFeedbackForTypesL(TAknTouchGestureFwGroup, TUint, TUint)

IMPORT_C voidSetFeedbackForTypesL(TAknTouchGestureFwGroupaGestureGroup,
TUintaGestureTypesForTactile,
TUintaGestureTypesForAudio
)

Defines gesture types, which trigger tactile feedback automatically.

This function defines, which gesture types in given gesture group trigger feedback automatically according to default behaviour.

It is possible to define tactile (haptic) and audio feedback behaviour separately, although it is recommended that same bitmasks are used for both of these.

Notice that given gesture group must have been set as interested gesture group with SetGestureInterestL function before it can trigger tactile feedback at all.

Example use for enabling double tap and long tap haptic feedback, but no feedback for single tap event, and no audio feedback:
     SetFeedbackForTypesL( 
         EAknTouchGestureFwGroupTap, 
         EAknTouchGestureFwDoubleTap | EAknTouchGestureFwLongTap,
         0 )
Since
S60 v5.2

Parameters

TAknTouchGestureFwGroup aGestureGroup- Gesture group, which tactile- and audio feedback is affected by this function call.
TUint aGestureTypesForTactile- Bitmask of gesture types, which trigger tactile feedback automatically.
TUint aGestureTypesForAudio- Bitmask of gesture types, which trigger audio feedback automatically.

SetGestureInterestL(TUint, TUint)

IMPORT_C voidSetGestureInterestL(TUintaGestureGroups,
TUintaFlags = 0
)

Sets gesture interest. Use binary OR to choose several gesture groups. Default value for the interest is EGestureNoGroup.

This method may modify window attributes and so it should be called before activating the window.

TAknTouchGestureFwGroup

Parameters

TUint aGestureGroupsInterested gesture groups.
TUint aFlags = 0Additional flags, not used currently.

Member Data Documentation

CAknTouchGestureFwImpl * iImpl

CAknTouchGestureFwImpl *iImpl[private]

Interface implementation. Own.