82 if (iKeyboardLayoutStatusSubscriber) |
82 if (iKeyboardLayoutStatusSubscriber) |
83 { |
83 { |
84 iKeyboardLayoutStatusSubscriber->StopSubscribe(); |
84 iKeyboardLayoutStatusSubscriber->StopSubscribe(); |
85 } |
85 } |
86 iKeyboardLayoutStatusProperty.Close(); |
86 iKeyboardLayoutStatusProperty.Close(); |
87 delete iKeyboardLayoutStatusSubscriber; |
87 delete iKeyboardLayoutStatusSubscriber; |
|
88 |
|
89 #ifdef RD_SCALABLE_UI_V2 |
|
90 if ( iVirtualKeyboardLayoutStatusSubscriber ) |
|
91 { |
|
92 iVirtualKeyboardLayoutStatusSubscriber->StopSubscribe(); |
|
93 } |
|
94 delete iVirtualKeyboardLayoutStatusSubscriber; |
|
95 iVirtualKeyboardLayoutStatusProperty.Close(); |
|
96 #endif |
88 #endif |
97 #endif |
89 iQwertyModeStatusProperty.Close(); |
98 iQwertyModeStatusProperty.Close(); |
90 delete iQwertyModeStatusSubscriber; |
99 delete iQwertyModeStatusSubscriber; |
91 } |
100 } |
92 |
101 |
416 } |
425 } |
417 |
426 |
418 #ifdef RD_INTELLIGENT_TEXT_INPUT |
427 #ifdef RD_INTELLIGENT_TEXT_INPUT |
419 TInt CAknFepSharedDataInterface::KeyboardLayout() //const |
428 TInt CAknFepSharedDataInterface::KeyboardLayout() //const |
420 { |
429 { |
421 TInt value = 0; |
430 return ActiveKeyboardType(); |
422 iKeyboardLayoutStatusProperty.Get(value); |
|
423 return value; |
|
424 } |
431 } |
425 |
432 |
426 #ifdef FF_DUAL_LANGUAGE_SUPPORT |
433 #ifdef FF_DUAL_LANGUAGE_SUPPORT |
427 TInt CAknFepSharedDataInterface::InputTextLanguageSecondary() |
434 TInt CAknFepSharedDataInterface::InputTextLanguageSecondary() |
428 { |
435 { |
490 User::LeaveIfError(iKeyboardLayoutStatusProperty.Attach(KCRUidAvkon, KAknKeyBoardLayout)); |
497 User::LeaveIfError(iKeyboardLayoutStatusProperty.Attach(KCRUidAvkon, KAknKeyBoardLayout)); |
491 iKeyboardLayoutStatusSubscriber = new (ELeave) CSubscriber( |
498 iKeyboardLayoutStatusSubscriber = new (ELeave) CSubscriber( |
492 TCallBack(HandleKeyboardLayoutChangeNotification, this), |
499 TCallBack(HandleKeyboardLayoutChangeNotification, this), |
493 iKeyboardLayoutStatusProperty); |
500 iKeyboardLayoutStatusProperty); |
494 iKeyboardLayoutStatusSubscriber->SubscribeL(); |
501 iKeyboardLayoutStatusSubscriber->SubscribeL(); |
|
502 |
|
503 #ifdef RD_SCALABLE_UI_V2 |
|
504 User::LeaveIfError( iVirtualKeyboardLayoutStatusProperty.Attach |
|
505 ( KPSUidAknFep, KAknFepVirtualKeyboardType ) ); |
|
506 iVirtualKeyboardLayoutStatusSubscriber = new (ELeave) CSubscriber( |
|
507 TCallBack( HandleVirtualKeyboardLayoutChangeNotification, this ), |
|
508 iVirtualKeyboardLayoutStatusProperty ); |
|
509 iVirtualKeyboardLayoutStatusSubscriber->SubscribeL(); |
|
510 #endif // RD_SCALABLE_UI_V2 |
495 #endif |
511 #endif |
496 iQwertyModeStatusSubscriber = new (ELeave) CSubscriber( |
512 iQwertyModeStatusSubscriber = new (ELeave) CSubscriber( |
497 TCallBack(QwertyModeChangeNotification, this), |
513 TCallBack(QwertyModeChangeNotification, this), |
498 iQwertyModeStatusProperty); |
514 iQwertyModeStatusProperty); |
499 iQwertyModeStatusSubscriber->SubscribeL(); |
515 iQwertyModeStatusSubscriber->SubscribeL(); |
726 error = PredictiveTextPrimaryCandidateChangeNotification(aPtr); |
742 error = PredictiveTextPrimaryCandidateChangeNotification(aPtr); |
727 } |
743 } |
728 |
744 |
729 return error; |
745 return error; |
730 } |
746 } |
|
747 |
|
748 TPtiKeyboardType CAknFepSharedDataInterface::ActiveKeyboardType() const |
|
749 { |
|
750 TInt keyboardType = EPtiKeyboardNone; |
|
751 #ifdef RD_SCALABLE_UI_V2 |
|
752 // Get physical keyboard type |
|
753 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType ); |
|
754 |
|
755 // When active keyboard is virtual keyboard, |
|
756 // need to get the active virtual keyboard type |
|
757 // and set keyboardType again. |
|
758 |
|
759 // When the default physical keyboard is 0, |
|
760 // it means that there is no physical keyboard, |
|
761 // also need to get the active virtual keyboard type. |
|
762 TInt isVirtualInputActive = 0; |
|
763 RProperty::Get( KPSUidAknFep, KAknFepTouchInputActive, |
|
764 isVirtualInputActive ); |
|
765 if ( isVirtualInputActive > 0 || keyboardType == 0 ) |
|
766 { |
|
767 // Active keyboard is virtual keyboard |
|
768 RProperty::Get( KPSUidAknFep, KAknFepVirtualKeyboardType, |
|
769 keyboardType ); |
|
770 } |
|
771 #else if |
|
772 // Get physical keyboard type |
|
773 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType ); |
731 #endif |
774 #endif |
|
775 |
|
776 if ( keyboardType <= 0 || keyboardType >= EPtiKeyboardMaxLayout ) |
|
777 { |
|
778 keyboardType = EPtiKeyboardNone; |
|
779 } |
|
780 return (TPtiKeyboardType)keyboardType; |
|
781 } |
|
782 #endif // RD_INTELLIGENT_TEXT_INPUT |
|
783 |
732 TInt CAknFepSharedDataInterface::HandleRepositoryCallBack(TAny* aPtr) |
784 TInt CAknFepSharedDataInterface::HandleRepositoryCallBack(TAny* aPtr) |
733 { |
785 { |
734 CAknFepSharedDataInterface *self = STATIC_CAST(CAknFepSharedDataInterface*, aPtr); |
786 CAknFepSharedDataInterface *self = STATIC_CAST(CAknFepSharedDataInterface*, aPtr); |
735 #ifdef RD_INTELLIGENT_TEXT_INPUT |
787 #ifdef RD_INTELLIGENT_TEXT_INPUT |
736 |
788 |
1276 iFepManager->SetFnKeyMappingState(); |
1344 iFepManager->SetFnKeyMappingState(); |
1277 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
1345 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
1278 iFepManager->StopDisplayingMenuBar(); |
1346 iFepManager->StopDisplayingMenuBar(); |
1279 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
1347 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
1280 } |
1348 } |
|
1349 |
|
1350 #ifdef RD_SCALABLE_UI_V2 |
|
1351 // --------------------------------------------------------------------------- |
|
1352 // Handles the change to virtual keyboard layout. |
|
1353 // |
|
1354 // --------------------------------------------------------------------------- |
|
1355 // |
|
1356 void CAknFepSharedDataInterface::HandleVirtualKeyboardLayoutChange() |
|
1357 { |
|
1358 TInt value = 0; |
|
1359 TPtiKeyboardType keyboardType; |
|
1360 iVirtualKeyboardLayoutStatusProperty.Get(value); |
|
1361 keyboardType = (TPtiKeyboardType)value; |
|
1362 iFepManager->SetKeyboardLayout(keyboardType); |
|
1363 iFepManager->SetFnKeyMappingState(); |
|
1364 } |
|
1365 #endif // RD_SCALABLE_UI_V2 |
|
1366 |
1281 TInt CAknFepSharedDataInterface::PredictiveTextAutoCompleteOn() |
1367 TInt CAknFepSharedDataInterface::PredictiveTextAutoCompleteOn() |
1282 { |
1368 { |
1283 TInt value = 0; |
1369 TInt value = 0; |
1284 if (iAknFepRepository) |
1370 if (iAknFepRepository) |
1285 { |
1371 { |