|
1 /* |
|
2 * Copyright (c) 2007 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: Gesture helper interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // class include |
|
20 #include "rt_gesturehelper.h" |
|
21 |
|
22 // local includes |
|
23 #include "gesturehelperimpl.h" |
|
24 |
|
25 using namespace RT_GestureHelper; |
|
26 |
|
27 // ---------------------------------------------------------------------------- |
|
28 // Two-phase constructor |
|
29 // ---------------------------------------------------------------------------- |
|
30 // |
|
31 EXPORT_C CGestureHelper* CGestureHelper::NewL( MGestureObserver& aObserver ) |
|
32 { |
|
33 CGestureHelper* self = new ( ELeave ) CGestureHelper; |
|
34 CleanupStack::PushL( self ); |
|
35 self->iImpl = CGestureHelperImpl::NewL( aObserver ); |
|
36 CleanupStack::Pop( self ); |
|
37 return self; |
|
38 } |
|
39 |
|
40 // ---------------------------------------------------------------------------- |
|
41 // Destructor |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 EXPORT_C CGestureHelper::~CGestureHelper() |
|
45 { |
|
46 delete iImpl; |
|
47 } |
|
48 |
|
49 // ---------------------------------------------------------------------------- |
|
50 // SetHoldingEnabled |
|
51 // ---------------------------------------------------------------------------- |
|
52 // |
|
53 EXPORT_C void CGestureHelper::SetHoldingEnabled( TBool aEnabled ) |
|
54 { |
|
55 iImpl->SetHoldingEnabled( aEnabled ); |
|
56 } |
|
57 |
|
58 // ---------------------------------------------------------------------------- |
|
59 // IsHoldingEnabled |
|
60 // ---------------------------------------------------------------------------- |
|
61 // |
|
62 EXPORT_C TBool CGestureHelper::IsHoldingEnabled() const |
|
63 { |
|
64 return iImpl->IsHoldingEnabled(); |
|
65 } |
|
66 |
|
67 // ---------------------------------------------------------------------------- |
|
68 // SetDoubleTapEnabled |
|
69 // ---------------------------------------------------------------------------- |
|
70 // |
|
71 EXPORT_C void CGestureHelper::SetDoubleTapEnabled( TBool aEnabled ) |
|
72 { |
|
73 iImpl->SetDoubleTapEnabled( aEnabled ); |
|
74 } |
|
75 |
|
76 // ---------------------------------------------------------------------------- |
|
77 // IsDoubleTapEnabled |
|
78 // ---------------------------------------------------------------------------- |
|
79 // |
|
80 EXPORT_C TBool CGestureHelper::IsDoubleTapEnabled() const |
|
81 { |
|
82 return iImpl->IsDoubleTapEnabled(); |
|
83 } |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 // ---------------------------------------------------------------------------- |
|
89 // HandlePointerEventL |
|
90 // ---------------------------------------------------------------------------- |
|
91 // |
|
92 EXPORT_C TBool CGestureHelper::HandlePointerEventL( const TPointerEvent& aEvent ) |
|
93 { |
|
94 return iImpl->HandlePointerEventL( aEvent ); |
|
95 } |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 // ---------------------------------------------------------------------------- |
|
102 // Cancel |
|
103 // ---------------------------------------------------------------------------- |
|
104 // |
|
105 EXPORT_C void CGestureHelper::Cancel() |
|
106 { |
|
107 iImpl->Reset(); |
|
108 } |
|
109 |