1 /* |
|
2 * Copyright (c) 2002-2005 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: Input mode plugin implementation file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 // System includes |
|
30 #include <ecom.h> |
|
31 #include <AknFepManagerInterface.h> |
|
32 #include <eikmenup.h> |
|
33 #include <coemain.h> |
|
34 |
|
35 // User includes |
|
36 #include "peninputimepluginitut.h" |
|
37 #include "peninputimepluginitutdebug.h" |
|
38 #include "pluginfepmanageritut.h" |
|
39 |
|
40 const TInt KInvalidImplId = 0; |
|
41 |
|
42 _LIT(KItutImeName,"vitut Itut"); |
|
43 _LIT(KSplitItutImeName, "split vitut Itut"); |
|
44 |
|
45 class TScriptPair |
|
46 { |
|
47 public: |
|
48 const TInt* iData; |
|
49 TInt iLen; |
|
50 CPenInputImePluginItut::TScriptIndex iScriptIdx; |
|
51 }; |
|
52 |
|
53 const TInt LatinLangs[] = |
|
54 { |
|
55 65, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
|
56 11, 12, 13, 14, 15, 17, 18, 20, 21, 22, |
|
57 23, 24, 25, 26, 27, 28, 39, 44, 45, 46, |
|
58 47, 48, 49, 51, 59, 67, 68, 70, 76, 78, |
|
59 79, 82, 83, 85, 91, 96, 102, 103, 401, 402 |
|
60 }; |
|
61 const TInt CyrillicLangs[] = {16, 42, 93,}; |
|
62 const TInt GreekLangs[] = {54, 55,}; |
|
63 const TInt HebrewLangs[] = {57,}; |
|
64 const TInt ArabicLangs[] = {37,}; |
|
65 const TInt FarsiLangs[] = {50,}; |
|
66 const TInt UrduLangs[] = {94,}; |
|
67 const TInt ThaiLangs[] = {33,}; |
|
68 const TInt ChnLangs[] = {29, 30, 31,}; |
|
69 const TInt IndicLangs[] = {58, 72}; |
|
70 |
|
71 _LIT(KPluginResourcePath, "z:\\RESOURCE\\Plugins\\"); |
|
72 _LIT(KResFilePattern, "peninputitutconfig_*.rsc"); |
|
73 _LIT(KResFilePatternSplit, "peninputsplititutconfig_*.rsc"); |
|
74 |
|
75 _LIT(KLatinResFile, "peninputitutconfig_latin.rsc"); |
|
76 _LIT(KLatinResFileSplit, "peninputsplititutconfig_latin.rsc"); |
|
77 _LIT(KCyrillicResFile, "peninputitutconfig_cyrillic.rsc"); |
|
78 _LIT(KCyrillicResFileSplit, "peninputsplititutconfig_cyrillic.rsc"); |
|
79 _LIT(KGreekResFile, "peninputitutconfig_greek.rsc"); |
|
80 _LIT(KGreekResFileSplit, "peninputsplititutconfig_greek.rsc"); |
|
81 _LIT(KHebrewResFile, "peninputitutconfig_hebrew.rsc"); |
|
82 _LIT(KHebrewResFileSplit, "peninputsplititutconfig_hebrew.rsc"); |
|
83 _LIT(KArabicResFile, "peninputitutconfig_arabic.rsc"); |
|
84 _LIT(KArabicResFileSplit, "peninputsplititutconfig_arabic.rsc"); |
|
85 _LIT(KFarsiResFile, "peninputitutconfig_farsi.rsc"); |
|
86 _LIT(KFarsiResFileSplit, "peninputsplititutconfig_farsi.rsc"); |
|
87 _LIT(KUrduResFile, "peninputitutconfig_urdu.rsc"); |
|
88 _LIT(KUrduResFileSplit, "peninputsplititutconfig_urdu.rsc"); |
|
89 _LIT(KThaiResFile, "peninputitutconfig_thai.rsc"); |
|
90 _LIT(KThaiResFileSplit, "peninputsplititutconfig_thai.rsc"); |
|
91 _LIT(KChnResFile, "peninputitutconfig_chinese.rsc"); |
|
92 _LIT(KChnResFileSplit, "peninputsplititutconfig_chinese.rsc"); |
|
93 |
|
94 _LIT(KDevanagiriResFile, "peninputitutconfig_devanagari.rsc"); |
|
95 _LIT(KDevanagiriResFileSplit, "peninputsplititutconfig_devanagari.rsc"); |
|
96 const TScriptPair KSupportScripts[] = |
|
97 { |
|
98 {LatinLangs, 50, CPenInputImePluginItut::ELatinLang}, |
|
99 {CyrillicLangs, 3, CPenInputImePluginItut::ECyrillicLang}, |
|
100 {GreekLangs, 2, CPenInputImePluginItut::EGreekLang}, |
|
101 {HebrewLangs, 1, CPenInputImePluginItut::EHebrewLang}, |
|
102 {ArabicLangs, 1, CPenInputImePluginItut::EArabicLang}, |
|
103 {FarsiLangs, 1, CPenInputImePluginItut::EFarsiLang}, |
|
104 {UrduLangs, 1, CPenInputImePluginItut::EUrduLang}, |
|
105 {ThaiLangs, 1, CPenInputImePluginItut::EThaiLang}, |
|
106 {ChnLangs, 3, CPenInputImePluginItut::EChnLang}, |
|
107 {IndicLangs, 2, CPenInputImePluginItut::EIndicLang} |
|
108 }; |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // RImplInfoPtrArray cleanup function |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 void Cleanup( TAny* aAny ) |
|
115 { |
|
116 RImplInfoPtrArray* implArray = |
|
117 reinterpret_cast< RImplInfoPtrArray*> ( aAny ); |
|
118 implArray->ResetAndDestroy(); |
|
119 implArray->Close(); |
|
120 } |
|
121 |
|
122 //lint -esym( 960, 58, * ) lint notes: break used outside of a switch |
|
123 |
|
124 // ======== MEMBER FUNCTIONS ======== |
|
125 |
|
126 // ----------------------------------------------------------------------------- |
|
127 // CPenInputImePluginItut::NewL |
|
128 // Factory function |
|
129 // (other items were commented in a header). |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 CPenInputImePluginItut* CPenInputImePluginItut::NewL(TAny* aInitParams) |
|
133 { |
|
134 CPenInputImePluginItut* self = new ( ELeave ) CPenInputImePluginItut( |
|
135 static_cast<RPeninputServer*>( |
|
136 aInitParams ) ); |
|
137 CleanupStack::PushL( self ); |
|
138 self->ConstructL(); |
|
139 CleanupStack::Pop( self ); |
|
140 return self; |
|
141 } |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // CPenInputImePluginItut::NewLC |
|
145 // factory function |
|
146 // (other items were commented in a header). |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 CPenInputImePluginItut* CPenInputImePluginItut::NewLC( |
|
150 TAny* aInitParams ) |
|
151 { |
|
152 CPenInputImePluginItut* self = new ( ELeave ) CPenInputImePluginItut( |
|
153 static_cast<RPeninputServer*>( |
|
154 aInitParams ) ); |
|
155 CleanupStack::PushL( self ); |
|
156 self->ConstructL(); |
|
157 return self; |
|
158 } |
|
159 |
|
160 // ----------------------------------------------------------------------------- |
|
161 // CPenInputImePluginItut::~CPenInputImePluginItut |
|
162 // Destructor |
|
163 // (other items were commented in a header). |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 CPenInputImePluginItut::~CPenInputImePluginItut() |
|
167 { |
|
168 DeActivate(); |
|
169 iUiLayoutImpIdList.Close(); |
|
170 delete iPluginUiManager; |
|
171 } |
|
172 |
|
173 // ----------------------------------------------------------------------------- |
|
174 // CPenInputImePluginItut::GetInputMethodUiL |
|
175 // Create layout UI interface |
|
176 // (other items were commented in a header). |
|
177 // ----------------------------------------------------------------------------- |
|
178 // |
|
179 MAknFepManagerInterface* CPenInputImePluginItut::GetInputMethodUiL( |
|
180 MAknFepManagerUIInterface* aFepManager, |
|
181 TLanguage aLanguage, |
|
182 TInt aMode, |
|
183 const TDesC8& /*aData*/, |
|
184 const TBool aIsSplitView) |
|
185 { |
|
186 iFepManager = aFepManager; |
|
187 iLanguage = aLanguage; |
|
188 CPluginFepManagerBase* fepmanager = NULL; |
|
189 |
|
190 TUid layoutId; |
|
191 TInt i; |
|
192 |
|
193 switch ( aMode ) |
|
194 { |
|
195 case EPluginInputModeItut: |
|
196 { |
|
197 if(aIsSplitView) |
|
198 { |
|
199 layoutId.iUid = KSplitItutUiId; |
|
200 } |
|
201 else |
|
202 { |
|
203 layoutId.iUid = KItutUiId; |
|
204 } |
|
205 } |
|
206 break; |
|
207 default: |
|
208 return NULL; |
|
209 } |
|
210 fepmanager = GetPluginUiL( aMode ); |
|
211 |
|
212 for ( i = 0; i < iUiLayoutImpIdList.Count(); ++i ) |
|
213 { |
|
214 if( iUiLayoutImpIdList[i] == layoutId.iUid ) |
|
215 { |
|
216 break; |
|
217 } |
|
218 } |
|
219 |
|
220 if ( i < iUiLayoutImpIdList.Count() ) |
|
221 { |
|
222 iPenInputMode = aMode; |
|
223 TInt errCode = iPenInputServer->SetUiLayoutId( layoutId ); |
|
224 if ( errCode == KErrNone ) |
|
225 { |
|
226 fepmanager->OnInit(); |
|
227 return fepmanager; |
|
228 } |
|
229 } |
|
230 |
|
231 return NULL; |
|
232 } |
|
233 |
|
234 // ----------------------------------------------------------------------------- |
|
235 // CPenInputImePluginItut::GetInputMethodUiL |
|
236 // Create layout UI interface |
|
237 // (other items were commented in a header). |
|
238 // ----------------------------------------------------------------------------- |
|
239 // |
|
240 MAknFepManagerInterface* CPenInputImePluginItut::GetInputMethodUiL( |
|
241 MAknFepManagerUIInterface* aFepManager, |
|
242 TInt aLayoutId, |
|
243 const TDesC8& aData ) |
|
244 { |
|
245 iFepManager = aFepManager; |
|
246 CPluginFepManagerBase* fepmanager = NULL; |
|
247 TInt i; |
|
248 TInt mode; |
|
249 |
|
250 if ( aLayoutId == KItutUiId || aLayoutId == KSplitItutUiId) |
|
251 { |
|
252 mode = EPluginInputModeItut; |
|
253 } |
|
254 else |
|
255 { |
|
256 mode = EPluginInputModeNone; |
|
257 return NULL; |
|
258 } |
|
259 |
|
260 fepmanager = GetPluginUiL( mode ); |
|
261 for ( i = 0; i < iUiLayoutImpIdList.Count(); ++i ) |
|
262 { |
|
263 if ( iUiLayoutImpIdList[i] == aLayoutId ) |
|
264 { |
|
265 break; |
|
266 } |
|
267 } |
|
268 |
|
269 if ( i < iUiLayoutImpIdList.Count() ) |
|
270 { |
|
271 iPenInputMode = mode; |
|
272 iPenInputServer->SetUiLayoutId( TUid::Uid( aLayoutId ), aData ); |
|
273 fepmanager->OnInit(); |
|
274 return fepmanager; |
|
275 } |
|
276 |
|
277 return NULL; |
|
278 } |
|
279 |
|
280 // ----------------------------------------------------------------------------- |
|
281 // CPenInputImePluginItut::Activate |
|
282 // Activate current IME plugin. |
|
283 // (other items were commented in a header). |
|
284 // ----------------------------------------------------------------------------- |
|
285 // |
|
286 void CPenInputImePluginItut::Activate() |
|
287 { |
|
288 if(iPenInputServer) |
|
289 { |
|
290 iPenInputServer->ActivateLayout(ETrue); |
|
291 } |
|
292 } |
|
293 |
|
294 // ----------------------------------------------------------------------------- |
|
295 // CPenInputImePluginItut::DeActivate |
|
296 // Deactivate current IME plugin. |
|
297 // (other items were commented in a header). |
|
298 // ----------------------------------------------------------------------------- |
|
299 // |
|
300 void CPenInputImePluginItut::DeActivate() |
|
301 { |
|
302 if (iPenInputServer && iPenInputServer->IsVisible()) |
|
303 { |
|
304 iPenInputServer->ActivateLayout(EFalse); |
|
305 } |
|
306 } |
|
307 |
|
308 // ----------------------------------------------------------------------------- |
|
309 // CPenInputImePluginItut::ImeImplId |
|
310 // Get current IME plugin implementation ID. |
|
311 // (other items were commented in a header). |
|
312 // ----------------------------------------------------------------------------- |
|
313 // |
|
314 TInt CPenInputImePluginItut::ImeImplId() |
|
315 { |
|
316 return KInputMethodImplementationId; |
|
317 } |
|
318 |
|
319 // ----------------------------------------------------------------------------- |
|
320 // CPenInputImePluginItut::LayoutUiImplId |
|
321 // Get current layout UI implementation id. |
|
322 // (other items were commented in a header). |
|
323 // ----------------------------------------------------------------------------- |
|
324 // |
|
325 TInt CPenInputImePluginItut::LayoutUiImplId() |
|
326 { |
|
327 TInt id; |
|
328 switch ( iPenInputMode ) |
|
329 { |
|
330 case EPluginInputModeItut: |
|
331 { |
|
332 id = KItutUiId; |
|
333 } |
|
334 break; |
|
335 default: |
|
336 { |
|
337 id = KInvalidImplId; |
|
338 } |
|
339 break; |
|
340 } |
|
341 return id; |
|
342 } |
|
343 |
|
344 |
|
345 // ----------------------------------------------------------------------------- |
|
346 // CPenInputImePluginItut::SupportModes |
|
347 // Get suppored layout UI modes(VKB/HWR). |
|
348 // (other items were commented in a header). |
|
349 // ----------------------------------------------------------------------------- |
|
350 // |
|
351 TInt CPenInputImePluginItut::SupportModes(CPtiEngine* aPtiEngine, |
|
352 RArray<TImePlguinImplDetail>& aSupportList) const |
|
353 { |
|
354 TInt ret = KErrNone; |
|
355 TRAP_IGNORE( ret = SupportModesL( aPtiEngine, aSupportList ) ); |
|
356 return ret; |
|
357 } |
|
358 |
|
359 // ----------------------------------------------------------------------------- |
|
360 // CPenInputImePluginItut::SupportModesL |
|
361 // Get suppored layout UI modes(VKB/HWR). |
|
362 // (other items were commented in a header). |
|
363 // ----------------------------------------------------------------------------- |
|
364 // |
|
365 TBool IsFileInDir( CDir* aDir, const TDesC& aFileName ) |
|
366 { |
|
367 if( aDir ) |
|
368 { |
|
369 for( TInt k = 0; k < aDir->Count(); ++k ) |
|
370 { |
|
371 if( aFileName.CompareF( (*aDir)[k].iName ) == 0 ) |
|
372 { |
|
373 return ETrue; |
|
374 } |
|
375 } |
|
376 } |
|
377 return EFalse; |
|
378 } |
|
379 |
|
380 |
|
381 TInt CPenInputImePluginItut::SupportModesL(CPtiEngine* /*aPtiEngine*/, |
|
382 RArray<TImePlguinImplDetail>& aSupportList) const |
|
383 { |
|
384 RImplInfoPtrArray infoArray; |
|
385 TUid id; |
|
386 id.iUid = KHwrLayoutInterfaceId; |
|
387 TBool itut = EFalse; |
|
388 TBool splititut = EFalse; |
|
389 |
|
390 CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) ); |
|
391 REComSession::ListImplementationsL(id, infoArray); |
|
392 |
|
393 for (TInt i = 0; i < infoArray.Count(); ++i) |
|
394 { |
|
395 if (infoArray[i]->ImplementationUid().iUid == KItutUiId) |
|
396 { |
|
397 itut = ETrue; |
|
398 } |
|
399 |
|
400 if (infoArray[i]->ImplementationUid().iUid == KSplitItutUiId) |
|
401 { |
|
402 splititut = ETrue; |
|
403 } |
|
404 } |
|
405 |
|
406 TImePlguinImplDetail detail; |
|
407 |
|
408 detail.iImplementationId = KInputMethodImplementationId; |
|
409 |
|
410 if (itut) |
|
411 { |
|
412 detail.iMode = EPluginInputModeItut; |
|
413 detail.iDisplayName.Copy(KItutImeName()); |
|
414 detail.iMeritValue = EImeMerit_Preferred; |
|
415 |
|
416 TFindFile fileFinder(CCoeEnv::Static()->FsSession()); |
|
417 |
|
418 CDir* dir = NULL; |
|
419 TInt result = fileFinder.FindWildByDir( KResFilePattern, KPluginResourcePath, dir ); |
|
420 if( result == KErrNone ) |
|
421 { |
|
422 for (TInt i = 0; i < sizeof(KSupportScripts)/sizeof(KSupportScripts[0]); i++) |
|
423 { |
|
424 if ( IsFileInDir( dir, ResFileNameByScriptIdx(KSupportScripts[i].iScriptIdx) ) ) |
|
425 { |
|
426 TInt* data = const_cast<TInt*>(KSupportScripts[i].iData); |
|
427 for (TInt j = 0; j < KSupportScripts[i].iLen; j++) |
|
428 { |
|
429 detail.iLanguage = *(data); |
|
430 data++; |
|
431 aSupportList.AppendL(detail); |
|
432 } |
|
433 } |
|
434 } |
|
435 } |
|
436 delete dir; |
|
437 } |
|
438 |
|
439 if (splititut) |
|
440 { |
|
441 detail.iMode = EPluginInputModeItut; |
|
442 detail.iDisplayName.Copy(KSplitItutImeName()); |
|
443 detail.iMeritValue = EImeMerit_Preferred; |
|
444 |
|
445 TFindFile fileFinder(CCoeEnv::Static()->FsSession()); |
|
446 |
|
447 CDir* dir = NULL; |
|
448 TInt result = fileFinder.FindWildByDir( KResFilePatternSplit, KPluginResourcePath, dir ); |
|
449 if( result == KErrNone ) |
|
450 { |
|
451 for (TInt i = 0; i < sizeof(KSupportScripts)/sizeof(KSupportScripts[0]); i++) |
|
452 { |
|
453 if ( IsFileInDir( dir, ResFileNameByScriptIdxForSplit(KSupportScripts[i].iScriptIdx) ) ) |
|
454 { |
|
455 TInt* data = const_cast<TInt*>(KSupportScripts[i].iData); |
|
456 for (TInt j = 0; j < KSupportScripts[i].iLen; j++) |
|
457 { |
|
458 detail.iLanguage = *(data); |
|
459 data++; |
|
460 aSupportList.AppendL(detail); |
|
461 } |
|
462 } |
|
463 } |
|
464 } |
|
465 delete dir; |
|
466 } |
|
467 |
|
468 CleanupStack::PopAndDestroy(&infoArray); // infoArray |
|
469 |
|
470 return 0; |
|
471 } |
|
472 |
|
473 // ----------------------------------------------------------------------------- |
|
474 // CPenInputImePluginItut::CurrentMode |
|
475 // Get current layout UI mode. |
|
476 // (other items were commented in a header). |
|
477 // ----------------------------------------------------------------------------- |
|
478 // |
|
479 TInt CPenInputImePluginItut::CurrentMode() const |
|
480 { |
|
481 return iPenInputMode; |
|
482 } |
|
483 |
|
484 // ----------------------------------------------------------------------------- |
|
485 // CPenInputImePluginItut::HandleServerEventL |
|
486 // Handle pen input server event.. |
|
487 // (other items were commented in a header). |
|
488 // ----------------------------------------------------------------------------- |
|
489 // |
|
490 TBool CPenInputImePluginItut::HandleServerEventL( TInt aEventId, const TDesC& aData ) |
|
491 { |
|
492 TBool bHandled = EFalse; |
|
493 switch ( aEventId ) |
|
494 { |
|
495 case ESignalLayoutICFLengthChanged: |
|
496 { |
|
497 GetCurrentUi()->RetrieveEditorMaxLength(); |
|
498 } |
|
499 break; |
|
500 case ESignalCaseMode: |
|
501 { |
|
502 TInt data = *(TInt*)( aData.Ptr() ); |
|
503 ASSERT( data >= 0 ); |
|
504 //lint !e728 |
|
505 GetCurrentUi()->UpdateCaseMode( data ); |
|
506 } |
|
507 break; |
|
508 default: |
|
509 break; |
|
510 } |
|
511 |
|
512 return bHandled; |
|
513 } |
|
514 |
|
515 // ----------------------------------------------------------------------------- |
|
516 // CPenInputImePluginItut::HandleMenuCommandL |
|
517 // Handle the menu command. |
|
518 // (other items were commented in a header). |
|
519 // ----------------------------------------------------------------------------- |
|
520 // |
|
521 TBool CPenInputImePluginItut::HandleMenuCommandL( TInt /*aCommandId*/ ) |
|
522 { |
|
523 return EFalse; |
|
524 } |
|
525 |
|
526 // ----------------------------------------------------------------------------- |
|
527 // CPenInputImePluginItut::DynInitMenuPaneL |
|
528 // Dynamiclly update menu items during it displays. |
|
529 // (other items were commented in a header). |
|
530 // ----------------------------------------------------------------------------- |
|
531 // |
|
532 void CPenInputImePluginItut::DynInitMenuPaneL( CAknFepUiInterfaceMenuPane* /*aMenuPane*/ ) |
|
533 { |
|
534 } |
|
535 |
|
536 |
|
537 // ----------------------------------------------------------------------------- |
|
538 // CPenInputImePluginItut::CPenInputImePluginItut |
|
539 // C++ default constructor. |
|
540 // (other items were commented in a header). |
|
541 // ----------------------------------------------------------------------------- |
|
542 // |
|
543 CPenInputImePluginItut::CPenInputImePluginItut( RPeninputServer* aHwrServer ) |
|
544 :iPenInputServer( aHwrServer ) |
|
545 { |
|
546 } |
|
547 |
|
548 // ----------------------------------------------------------------------------- |
|
549 // CPenInputImePluginItut::ConstructL |
|
550 // 2nd phase constructor. |
|
551 // (other items were commented in a header). |
|
552 // ----------------------------------------------------------------------------- |
|
553 // |
|
554 void CPenInputImePluginItut::ConstructL() |
|
555 { |
|
556 FindUiLayoutImplementationL(); |
|
557 } |
|
558 |
|
559 // ----------------------------------------------------------------------------- |
|
560 // CPenInputImePluginItut::FindUiLayoutImplementationL |
|
561 // Enumuate all layout UI ids. |
|
562 // (other items were commented in a header). |
|
563 // ----------------------------------------------------------------------------- |
|
564 // |
|
565 void CPenInputImePluginItut::FindUiLayoutImplementationL() |
|
566 { |
|
567 RImplInfoPtrArray infoArray; |
|
568 TUid id; |
|
569 id.iUid = KHwrLayoutInterfaceId; |
|
570 |
|
571 iUiLayoutImpIdList.Reset(); |
|
572 CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) ); |
|
573 REComSession::ListImplementationsL( id, infoArray ); |
|
574 |
|
575 for ( TInt i = 0; i < infoArray.Count(); ++i ) |
|
576 { |
|
577 iUiLayoutImpIdList.AppendL( infoArray[i]->ImplementationUid().iUid ); |
|
578 } |
|
579 |
|
580 CleanupStack::PopAndDestroy( &infoArray ); // infoArray |
|
581 } |
|
582 |
|
583 // ----------------------------------------------------------------------------- |
|
584 // CPenInputImePluginItut::GetPluginUiL |
|
585 // Get HWR UI interface. |
|
586 // (other items were commented in a header). |
|
587 // ----------------------------------------------------------------------------- |
|
588 // |
|
589 CPluginFepManagerBase* CPenInputImePluginItut::GetPluginUiL( TInt aMode ) |
|
590 { |
|
591 switch ( aMode ) |
|
592 { |
|
593 case EPluginInputModeItut: |
|
594 { |
|
595 delete iPluginUiManager; |
|
596 iPluginUiManager = NULL; |
|
597 iPluginUiManager = CPluginFepManagerItut::NewL(*this, iPenInputServer); |
|
598 return iPluginUiManager; |
|
599 } |
|
600 default: |
|
601 { |
|
602 return NULL; |
|
603 } |
|
604 } |
|
605 } |
|
606 |
|
607 // ----------------------------------------------------------------------------- |
|
608 // CPenInputImePluginItut::ResFileNameByScriptIdx |
|
609 // Get HWR UI interface. |
|
610 // (other items were commented in a header). |
|
611 // ----------------------------------------------------------------------------- |
|
612 // |
|
613 const TDesC& CPenInputImePluginItut::ResFileNameByScriptIdx(const TScriptIndex aIndex) |
|
614 { |
|
615 switch (aIndex) |
|
616 { |
|
617 case ELatinLang: |
|
618 return KLatinResFile; |
|
619 case ECyrillicLang: |
|
620 return KCyrillicResFile; |
|
621 case EGreekLang: |
|
622 return KGreekResFile; |
|
623 case EHebrewLang: |
|
624 return KHebrewResFile; |
|
625 case EArabicLang: |
|
626 return KArabicResFile; |
|
627 case EFarsiLang: |
|
628 return KFarsiResFile; |
|
629 case EUrduLang: |
|
630 return KUrduResFile; |
|
631 case EThaiLang: |
|
632 return KThaiResFile; |
|
633 case EChnLang: |
|
634 return KChnResFile; |
|
635 case EIndicLang: |
|
636 return KDevanagiriResFile; |
|
637 default: |
|
638 break; |
|
639 } |
|
640 |
|
641 return KNullDesC; |
|
642 } |
|
643 |
|
644 const TDesC& CPenInputImePluginItut::ResFileNameByScriptIdxForSplit(const TScriptIndex aIndex) |
|
645 { |
|
646 switch (aIndex) |
|
647 { |
|
648 case ELatinLang: |
|
649 return KLatinResFileSplit; |
|
650 |
|
651 case ECyrillicLang: |
|
652 return KCyrillicResFileSplit; |
|
653 |
|
654 case EGreekLang: |
|
655 return KGreekResFileSplit; |
|
656 |
|
657 case EHebrewLang: |
|
658 return KHebrewResFileSplit; |
|
659 |
|
660 case EArabicLang: |
|
661 return KArabicResFileSplit; |
|
662 |
|
663 case EFarsiLang: |
|
664 return KFarsiResFileSplit; |
|
665 |
|
666 case EUrduLang: |
|
667 return KUrduResFileSplit; |
|
668 |
|
669 case EThaiLang: |
|
670 return KThaiResFileSplit; |
|
671 |
|
672 case EChnLang: |
|
673 return KChnResFileSplit; |
|
674 |
|
675 case EIndicLang: |
|
676 return KDevanagiriResFileSplit; |
|
677 |
|
678 default: |
|
679 break; |
|
680 } |
|
681 |
|
682 return KNullDesC; |
|
683 } |
|
684 |
|
685 //End Of File |
|