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