|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Flick Recognizer |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef FLICKGESTURERECOGNISER_H_ |
|
19 #define FLICKGESTURERECOGNISER_H_ |
|
20 |
|
21 #include "rt_gestureengineif.h" |
|
22 #include <rt_gestureif.h> |
|
23 #include <rt_gesturelistener.h> |
|
24 |
|
25 class CCoeControl ; |
|
26 |
|
27 namespace stmGesture |
|
28 { |
|
29 |
|
30 /*! |
|
31 * CFlickGestureRecogniser handles release "gesture" |
|
32 * This is countarpart to touch gesture recogniser, just |
|
33 * informing the app that ERelease has been seen. |
|
34 * This should be placed towards the end of the list of gesture |
|
35 * recognisers, all other recognisers which handle ERelease with |
|
36 * some other events preceding the ERelease must be before this one. |
|
37 * |
|
38 */ |
|
39 NONSHARABLE_CLASS( CFlickGestureRecogniser ): public CGestureRecogniser |
|
40 { |
|
41 public: |
|
42 static const TGestureUid KUid = EGestureUidFlick; |
|
43 |
|
44 /** Two-phase constructor */ |
|
45 static CFlickGestureRecogniser* NewL(MGestureListener* aListener); |
|
46 virtual ~CFlickGestureRecogniser(); |
|
47 |
|
48 /*! |
|
49 * MGestureRecogniserIf methods |
|
50 */ |
|
51 virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ; |
|
52 virtual void release(MGestureEngineIf* ge) ; |
|
53 |
|
54 virtual TGestureUid gestureUid() const |
|
55 { |
|
56 return KUid; |
|
57 } |
|
58 |
|
59 public: |
|
60 void setFlickingSpeed(float aSpeed) __SOFTFP; |
|
61 |
|
62 private: |
|
63 CFlickGestureRecogniser(MGestureListener* aListener) ; |
|
64 |
|
65 private: |
|
66 float m_speed ; |
|
67 }; |
|
68 |
|
69 } // namespace |
|
70 |
|
71 #endif /* FLICKGESTURERECOGNISER_H_ */ |