author | Simon Howkins <simonh@symbian.org> |
Mon, 15 Nov 2010 14:00:51 +0000 | |
branch | RCL_3 |
changeset 59 | 7febbd162ded |
parent 56 | 8152b1f1763a |
permissions | -rw-r--r-- |
44 | 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 "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 |
#ifndef T_PENINPUTCHNITUTDATA_H |
|
18 |
#define T_PENINPUTCHNITUTDATA_H |
|
19 |
||
20 |
#include <peninputlayoutbasecontrol.h> |
|
21 |
#include <aknfeppeninputenums.h> |
|
22 |
#include <PtiDefs.h> |
|
23 |
#include <e32keys.h> |
|
24 |
||
25 |
#include "peninputgenericitutcustomization.h" |
|
26 |
||
27 |
const TInt KInvalidScanCode = -1; |
|
28 |
const TInt KInvalidCtrlId = -1; |
|
29 |
||
30 |
enum TItutDataType |
|
31 |
{ |
|
32 |
EScreenSize = EItutPosConfigurableLast + 1, |
|
33 |
ELayoutOffset, |
|
34 |
ELayoutRect, |
|
35 |
EIcfRect, |
|
36 |
EIcfFont, |
|
37 |
EBackspaceRect, |
|
38 |
ESwitchRect, |
|
39 |
EArrowLeftRect, |
|
40 |
EArrowRightRect, |
|
41 |
EArrowUpRect, |
|
42 |
EArrowDownRect, |
|
43 |
EOptionsRect, |
|
44 |
ECloseRect, |
|
45 |
EImIndicatorRect, // whole rect of label like indicator |
|
46 |
EImIndicatorOuterRect, // rect of button like indicator, it is also need EImIndicatorRect info |
|
47 |
EKeypadRect, |
|
48 |
EKeypadCellRects, |
|
49 |
EKeypadLeftTextLine, |
|
50 |
EKeypadRightTextLine1, |
|
51 |
EKeypadRightTextLine2, |
|
52 |
EKeypadRightTextLine3, |
|
53 |
EDropdownlistUnitWidth, |
|
54 |
EDropdownlistUnitHeight, |
|
55 |
EDropdownlistHorizontalMargin, |
|
56 |
EDropdownlistVerticalMargin, |
|
57 |
EDropdownListNaviWidth, |
|
58 |
EDropdownListSpinBtnHeight, |
|
59 |
EDropdownListSpellLTPos, |
|
60 |
EDropdownListCandsLTPos, |
|
61 |
EDropdownListPuncLTPos, |
|
62 |
EDropdownListFont, |
|
63 |
EDropdownListTextMargin, |
|
64 |
EDropdownListTextColor, |
|
65 |
ESpellRect, // used to indicate stroke and zhuyin spelling |
|
66 |
ESpellFont, |
|
67 |
ESpellTextColor, |
|
68 |
ELanguage, |
|
69 |
EInputMode, |
|
70 |
ECase, |
|
71 |
EChnCandidates, |
|
72 |
EChnPuncCandidates, |
|
73 |
EMatchSelectionTlPos, |
|
74 |
EMatchSelectionItemSize, |
|
75 |
EMatchSelectionItemMargin, |
|
76 |
EMatchSelectionTextLine, |
|
77 |
ESwitchInnerRect, |
|
78 |
ELeftInnerRect, |
|
79 |
ERightInnerRect, |
|
80 |
EBackspaceInnerRect, |
|
81 |
EUpInnerRect, |
|
82 |
EDownInnerRect, |
|
83 |
ECloseInnerRect, |
|
84 |
EOptionInnerRect, |
|
85 |
EBtnTextLine, |
|
86 |
ESpellICFRect, |
|
87 |
ESpellClrRect, |
|
88 |
ESpellClrInnerRect, |
|
89 |
ESpellEditIndicatorRect, |
|
90 |
ESpellTextCancle, |
|
91 |
ESpellQueryPaneRect, |
|
92 |
ELatinOnly, |
|
93 |
EPreviewBubbleRect, |
|
94 |
EPreviewBubbleInnerRect, |
|
95 |
EPreviewBubbleFont, |
|
96 |
EPreviewBubbleTextlayout, |
|
97 |
EIndiPaneWithTextRect, |
|
98 |
EIndiPaneWithoutTextRect, |
|
99 |
EIndiIconWithTextRect, |
|
100 |
EIndiIconWithoutTextRect, |
|
101 |
EIndiTextLine, |
|
102 |
ESpellIndiPaneWithoutTextRect, |
|
103 |
ESpellIndiIconWithoutTextRect, |
|
104 |
ESpellArrowLeft, |
|
105 |
ESpellArrowLeftInner, |
|
106 |
ESpellArrowRight, |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
107 |
ESpellArrowRightInner |
44 | 108 |
}; |
109 |
||
110 |
enum TControlId |
|
111 |
{ |
|
112 |
ECtrlIdICF = 1000, |
|
113 |
ECtrlIdBackspace, |
|
114 |
ECtrlIdSwitch, |
|
115 |
ECtrlIdArrowLeft, |
|
116 |
ECtrlIdArrowRight, |
|
117 |
ECtrlIdArrowUp, |
|
118 |
ECtrlIdArrowDown, |
|
119 |
ECtrlIdOptions, |
|
120 |
ECtrlIdClose, |
|
121 |
ECtrlIdStdItut, |
|
122 |
ECtrlIdSpellICF, // used to display spelling of stroke and zhuyin |
|
123 |
ECtrlIdSpellCandsList, |
|
124 |
ECtrlIdStdCandsList, |
|
125 |
ECtrlIdPuncCandsList, |
|
126 |
ECtrlIdInputSwitch, |
|
127 |
ECtrlIdMatchSelection, |
|
128 |
ECtrlIdBackground, // used to display background |
|
129 |
ECtrlIdIndicator, |
|
130 |
ECtrlIdSpellIndicator, |
|
131 |
ECtrlIdOkBtn, |
|
132 |
ECtrlIdCancelBtn, |
|
133 |
ECtrlIdCancelWindow, |
|
134 |
ECtrlIdEditorMenu, |
|
135 |
ECtrlIdLastStdCtrl = ECtrlIdCancelBtn + 1 |
|
136 |
}; |
|
137 |
||
138 |
enum TItutCommand |
|
139 |
{ |
|
140 |
EItutCmdCandidateSelected = EItutExtCmdLast + 1, |
|
141 |
EItutCmdGetNextCandidatePage, |
|
142 |
EItutCmdGetPreviousCandidatePage, |
|
143 |
EItutCmdCandidateExisted, |
|
144 |
EItutCmdPredictItemSelected, |
|
145 |
EItutCmdEnterSpellMode, |
|
146 |
EItutCmdArrowUp, |
|
147 |
EItutCmdArrowDown, |
|
148 |
EItutCmdCheckIcfEmpty |
|
149 |
}; |
|
150 |
||
151 |
enum TItutCandidatesIdx |
|
152 |
{ |
|
153 |
EItutCandidates, |
|
154 |
EItutPuncCandidates |
|
155 |
}; |
|
156 |
||
157 |
class TItutKeyMapping |
|
158 |
{ |
|
159 |
public: |
|
160 |
TInt iKeyIdx; |
|
161 |
TInt iCtrlId; // only valid when key is a button |
|
162 |
TInt iScanCode; // only valid when key is a virtual key in keyboard |
|
163 |
}; |
|
164 |
||
165 |
const TItutKeyMapping ItutKeymap[] = |
|
166 |
{ |
|
167 |
{EItutKeyArrowLeft, ECtrlIdArrowLeft, KInvalidScanCode}, |
|
168 |
{EItutKeyArrowRight, ECtrlIdArrowRight, KInvalidScanCode}, |
|
169 |
{EItutKeyArrowUp, ECtrlIdArrowUp, KInvalidScanCode}, |
|
170 |
{EItutKeyArrowDown, ECtrlIdArrowDown, KInvalidScanCode}, |
|
171 |
{EItutKeyClear, ECtrlIdBackspace, KInvalidScanCode}, |
|
172 |
{EItutKeySwitchLayout, ECtrlIdSwitch, KInvalidScanCode}, |
|
173 |
{EItutKey1, KInvalidCtrlId, EPtiKey1}, |
|
174 |
{EItutKey2, KInvalidCtrlId, EPtiKey2}, |
|
175 |
{EItutKey3, KInvalidCtrlId, EPtiKey3}, |
|
176 |
{EItutKey4, KInvalidCtrlId, EPtiKey4}, |
|
177 |
{EItutKey5, KInvalidCtrlId, EPtiKey5}, |
|
178 |
{EItutKey6, KInvalidCtrlId, EPtiKey6}, |
|
179 |
{EItutKey7, KInvalidCtrlId, EPtiKey7}, |
|
180 |
{EItutKey8, KInvalidCtrlId, EPtiKey8}, |
|
181 |
{EItutKey9, KInvalidCtrlId, EPtiKey9}, |
|
182 |
{EItutKeyStar, KInvalidCtrlId, EStdKeyNkpAsterisk}, |
|
183 |
{EItutKey0, KInvalidCtrlId, EPtiKey0}, |
|
184 |
{EItutKeyHash, KInvalidCtrlId, EStdKeyHash}, |
|
185 |
}; |
|
186 |
||
187 |
const TInt LangsArr[] = |
|
188 |
{ |
|
189 |
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
|
190 |
11, 12, 13, 14, 15, 17, 18, 20, 21, 22, |
|
191 |
23, 24, 25, 26, 27, 28, 39, 44, 45, 46, |
|
192 |
47, 48, 49, 51, 59, 67, 68, 70, 76, 78, |
|
193 |
79, 82, 83, 85, 91, 96, 102, 103, 401, 402, |
|
194 |
16, 42, 93, 54, 55, 57, 37, 50, 94, 33, |
|
195 |
29, 30, 31, 58, 72, 65, |
|
196 |
}; |
|
197 |
||
198 |
_LIT(KLatinExt, "latin"); |
|
199 |
_LIT(KCyrillicExt, "cyrillic"); |
|
200 |
_LIT(KGreekExt, "greek"); |
|
201 |
_LIT(KHebrewExt, "hebrew"); |
|
202 |
_LIT(KArabicExt, "arabic"); |
|
203 |
_LIT(KFarsiExt, "farsi"); |
|
204 |
_LIT(KUrduExt, "urdu"); |
|
205 |
_LIT(KThaiExt, "thai"); |
|
206 |
_LIT(KChnExt, "chinese"); |
|
207 |
_LIT(KDevanagiriExt, "devanagari"); |
|
208 |
_LIT(KHangulExt, "korean"); |
|
209 |
||
210 |
enum TScriptExtIndex |
|
211 |
{ |
|
212 |
ELatinExt, |
|
213 |
ECyrillicExt, |
|
214 |
EGreekExt, |
|
215 |
EHebrewExt, |
|
216 |
EArabicExt, |
|
217 |
EFarsiExt, |
|
218 |
EUrduExt, |
|
219 |
EThaiExt, |
|
220 |
EChnExt, |
|
221 |
EDevanagiriExt, |
|
222 |
EHangulExt |
|
223 |
}; |
|
224 |
||
225 |
struct TScriptInfo |
|
226 |
{ |
|
227 |
TBool iCaseSensitive; |
|
228 |
TInt iStartIdx; // lang start index in langs |
|
229 |
TInt iEndIdx; // lang end index in langs |
|
230 |
TScriptExtIndex iScriptExt; |
|
231 |
}; |
|
232 |
||
233 |
const TScriptInfo TScriptMapping[] = |
|
234 |
{ |
|
235 |
{ETrue, 0, 49, ELatinExt}, |
|
236 |
{ETrue, 50, 52, ECyrillicExt}, |
|
237 |
{ETrue, 53, 54, EGreekExt}, |
|
238 |
{EFalse, 55, 55, EHebrewExt}, |
|
239 |
{EFalse, 56, 56, EArabicExt}, |
|
240 |
{EFalse, 57, 57, EFarsiExt}, |
|
241 |
{EFalse, 58, 58, EUrduExt}, |
|
242 |
{EFalse, 59, 59, EThaiExt}, |
|
243 |
{ETrue, 60, 62, EChnExt}, // chinese also include abc |
|
244 |
{ETrue, 63, 64, EDevanagiriExt}, |
|
245 |
{ETrue, 65, 65, EHangulExt}, |
|
246 |
}; |
|
247 |
||
248 |
#endif // T_PENINPUTCHNITUTDATA_H |
|
249 |
||
250 |
//End Of File |