equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 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 * gestureeventfilter.h |
|
19 * |
|
20 * Created on: Jan 22, 2009 |
|
21 * Author: tyutyuni |
|
22 */ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <e32std.h> |
|
26 #include <w32std.h> |
|
27 |
|
28 |
|
29 #ifndef GESTUREEVENTFILTER_H_ |
|
30 #define GESTUREEVENTFILTER_H_ |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 namespace RT_GestureHelper |
|
36 { |
|
37 |
|
38 enum TFilterReason |
|
39 { |
|
40 EFilteredNoReason, |
|
41 EFilteredBySize, |
|
42 EFilteredByTime |
|
43 }; |
|
44 |
|
45 NONSHARABLE_CLASS(CGestureEventFilter) : public CBase |
|
46 { |
|
47 public: |
|
48 CGestureEventFilter(TInt aTapSize); |
|
49 ~CGestureEventFilter(); |
|
50 TBool FilterDrag(const TPointerEvent& aPointerEvent, TTime& eventTime, TInt& aReason); |
|
51 TBool FilterDrag(const TPointerEvent& aPointerEvent, TInt& aReason); |
|
52 private: |
|
53 TTime iTouchDownTime; |
|
54 TPoint iTouchDownPos; |
|
55 TBool iIsTouchDown; |
|
56 TTime iLastEventTime; |
|
57 TInt iTapSize; |
|
58 }; |
|
59 |
|
60 } |
|
61 #endif /* GESTUREEVENTFILTER_H_ */ |
|