|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef _GESTUREDEFS_H_ |
|
19 #define _GESTUREDEFS_H |
|
20 |
|
21 #include <e32std.h> |
|
22 |
|
23 namespace stmUiEventEngine |
|
24 { |
|
25 |
|
26 /// time to hold the stylus in the same position to activate holding |
|
27 const TInt KHoldDuration = 500000; // microseconds |
|
28 |
|
29 /// time to tap again for the second tap to be a double tap |
|
30 const TInt KMaxDoubleTapDuration = 400000; // microseconds |
|
31 |
|
32 /// time in which speed becomes zero if user stops stylus movement before |
|
33 /// lifting the pointer |
|
34 const TInt KSpeedStopTime = 150000; // microseconds |
|
35 |
|
36 /// tolerance in degrees to either side of an angle, for direction to be the |
|
37 /// same as reference angle |
|
38 const TReal KAngleTolerance = 25; |
|
39 |
|
40 /// Nth pointer event before the latest point |
|
41 const TInt KPreviousPointOffset = 3; |
|
42 |
|
43 /// Tolerance for ignoring small movements, percent of longer screen edge |
|
44 const TInt KGestureTolerancePercent = 2; // of 100 |
|
45 |
|
46 const TInt KFingerSize_mm = 8; |
|
47 |
|
48 const TInt KTwipsInInch = 1440; |
|
49 |
|
50 const TReal KTwipsInMm = 56.7; |
|
51 |
|
52 const TInt KMaxTapDuration = 300000; //microseconds |
|
53 |
|
54 const TInt KFlickSpeed = 500; |
|
55 |
|
56 const TInt KDoubleTapMaxActivationInterval = 500000; // 500 ms |
|
57 |
|
58 const TInt KDoubleTapMinActivationInterval = 40000; // 40 ms |
|
59 |
|
60 const TInt KDoubleTapIdleInterval = 700000; // 700 ms, to prevent triple-tap effects |
|
61 |
|
62 const TInt KLongTapDuration = 2000000; //2 sec |
|
63 |
|
64 const TInt KMinTimeBetweenDrags = 20000; // 20 ms |
|
65 /** |
|
66 * Panic codes |
|
67 */ |
|
68 enum TGesturePanic |
|
69 { |
|
70 EGesturePanicIllegalLogic |
|
71 }; |
|
72 |
|
73 /** Panics the thread */ |
|
74 inline void Panic( TGesturePanic aReason ) |
|
75 { |
|
76 _LIT( KComponentName, "GestureHelper" ); |
|
77 User::Panic( KComponentName, aReason ); |
|
78 } |
|
79 |
|
80 } |
|
81 |
|
82 #endif // _GESTUREDEFS_H |