|
1 /* |
|
2 * Copyright (c) 2010 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 "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: header file of peninput ui layout |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PENINPUTTAPSETTINGMANAGER_H |
|
20 #define PENINPUTTAPSETTINGMANAGER_H |
|
21 |
|
22 #include <e32cmn.h> |
|
23 #include <e32base.h> |
|
24 #include <gdi.h> |
|
25 |
|
26 NONSHARABLE_CLASS(CPeninputTapSettingManager) : public CBase |
|
27 { |
|
28 public: //constructors |
|
29 /** |
|
30 * Symbian constructor. |
|
31 * |
|
32 * @since Symbian^3 |
|
33 * @return Pointer to created object |
|
34 */ |
|
35 static CPeninputTapSettingManager* NewL(); |
|
36 |
|
37 /** |
|
38 * Symbian constructor. |
|
39 * |
|
40 * @since Symbian^3 |
|
41 * @return Pointer to created object |
|
42 */ |
|
43 static CPeninputTapSettingManager* NewLC(); |
|
44 |
|
45 /* |
|
46 * Standard c++ destructor. |
|
47 * @since Symbian^3 |
|
48 */ |
|
49 virtual ~CPeninputTapSettingManager(); |
|
50 |
|
51 public: |
|
52 /** |
|
53 * Load all parameters of tap accuracy enhancement for specified layout. |
|
54 * |
|
55 * @since Symbian^3 |
|
56 * @param aLayoutType layout type, refer to TPluginInputMode |
|
57 * @return none |
|
58 */ |
|
59 void Load( TInt aLayoutType ); |
|
60 |
|
61 /** |
|
62 * Load all parameters of tap accuracy enhancement for specified layout. |
|
63 * |
|
64 * @since Symbian^3 |
|
65 * @param aLayoutType layout type, refer to TPluginInputMode |
|
66 * @param aFileName path name of configuration file |
|
67 * @return none |
|
68 */ |
|
69 void Load( TInt aLayoutType, const TDesC& aFileName ); |
|
70 |
|
71 /** |
|
72 * Get configuration of PointerMove event suppressor. |
|
73 * |
|
74 * @since Symbian^3 |
|
75 * @param aMaxMovement output max movement of PointerMove event |
|
76 * @param aTimeout output timeout(in microsecond) of PointerMove event |
|
77 * @return none |
|
78 */ |
|
79 void GetPointerMoveSuppressor( TSize& aMaxMovement, TInt& aTimeout ); |
|
80 |
|
81 /** |
|
82 * Get configuration of PointerUp event suppressor. |
|
83 * |
|
84 * @since Symbian^3 |
|
85 * @param aMaxMovement output max movement of PointerUp event |
|
86 * @param aTimeout output timeout(in microsecond) of PointerUp event |
|
87 * @return none |
|
88 */ |
|
89 void GetPointerUpSuppressor( TSize& aMaxMovement, TInt& aTimeout ); |
|
90 |
|
91 /** |
|
92 * Get extra response area of virtual key controls. |
|
93 * |
|
94 * @since Symbian^3 |
|
95 * @param aMargins output the margins around the original response area. |
|
96 * @return none |
|
97 */ |
|
98 void GetKeyExtResponseArea( TMargins& aMargins ); |
|
99 |
|
100 /** |
|
101 * Get extra response area of button controls. |
|
102 * |
|
103 * @since Symbian^3 |
|
104 * @param aMargins output the margins around the original response area. |
|
105 * @return none |
|
106 */ |
|
107 void GetButtonExtResponseArea( TMargins& aMargins ); |
|
108 |
|
109 private: |
|
110 /** |
|
111 * C++ constructor |
|
112 * |
|
113 * @since Symbian^3 |
|
114 * @return None |
|
115 */ |
|
116 CPeninputTapSettingManager(); |
|
117 |
|
118 /** |
|
119 * Symbian second-phase constructor |
|
120 * |
|
121 * @since Symbian^3 |
|
122 * @return None |
|
123 */ |
|
124 void ConstructL(); |
|
125 private: |
|
126 /** |
|
127 * Load all parameters of tap accuracy enhancement for specified layout. |
|
128 * |
|
129 * @since Symbian^3 |
|
130 * @param aLayoutType layout type, refer to TPluginInputMode |
|
131 * @return none |
|
132 */ |
|
133 void LoadFromRepositoryL( TInt aLayoutType ); |
|
134 |
|
135 /** |
|
136 * Load all parameters of tap accuracy enhancement for specified layout |
|
137 * |
|
138 * @since Symbian^3 |
|
139 * @param aLayoutType layout type, refer to TPluginInputMode |
|
140 * @param aFileName path name of configuration file |
|
141 * @return none |
|
142 */ |
|
143 void LoadFromFileL( TInt aLayoutType, const TDesC& aFileName ); |
|
144 |
|
145 /** |
|
146 * Load default parameters |
|
147 * |
|
148 * @since Symbian^3 |
|
149 * @return none |
|
150 */ |
|
151 void LoadDefault(); |
|
152 |
|
153 /** |
|
154 * parse a TPoint from a comma separated values string. |
|
155 * |
|
156 * @since Symbian^3 |
|
157 * @return number of values in aText |
|
158 */ |
|
159 TInt ParsePoints( TPoint& aPoint, const TDesC& aText ); |
|
160 |
|
161 /** |
|
162 * parse a TMargins from a comma separated values string. |
|
163 * |
|
164 * @since Symbian^3 |
|
165 * @param aMargins output parse result |
|
166 * @param aText source string |
|
167 * @return number of values in aText |
|
168 */ |
|
169 TInt ParseMargins( TMargins& aMargins, const TDesC& aText ); |
|
170 |
|
171 private: |
|
172 /** |
|
173 * max movement of PointerMove event |
|
174 */ |
|
175 TSize iPointerMoveMaxMovement; |
|
176 |
|
177 /** |
|
178 * timeout of PointerMove event, microsecond |
|
179 */ |
|
180 TInt iPointerMoveTimeout; |
|
181 |
|
182 /** |
|
183 * max movement of PointerUp event |
|
184 */ |
|
185 TSize iPointerUpMaxMovement; |
|
186 |
|
187 /** |
|
188 * timeout of PointerUp event, microsecond |
|
189 */ |
|
190 TInt iPointerUpTimeout; |
|
191 |
|
192 /** |
|
193 * extra response area of virtual key controls |
|
194 */ |
|
195 TMargins iKeyMargins; |
|
196 |
|
197 /** |
|
198 * extra response area of button controls |
|
199 */ |
|
200 TMargins iButtonMargins; |
|
201 }; |
|
202 |
|
203 #endif // PENINPUTTAPSETTINGMANAGER_H |