fep/aknfep/src/AknFepManager.cpp
branchRCL_3
changeset 11 c8fb4cf7b3ae
parent 9 e6a39382bb9c
child 12 5e18d8c489d6
equal deleted inserted replaced
9:e6a39382bb9c 11:c8fb4cf7b3ae
  3532             // When go into this section, 
  3532             // When go into this section, 
  3533             // touch ui won't be closed by ClosePluginInputUiL,
  3533             // touch ui won't be closed by ClosePluginInputUiL,
  3534             // but need to restore fep state here            
  3534             // but need to restore fep state here            
  3535             if ( iFepPluginManager )
  3535             if ( iFepPluginManager )
  3536             	{
  3536             	{
  3537             	iFepPluginManager->ResetItiStateL();
  3537                 TRAP_IGNORE(iFepPluginManager->ResetItiStateL());
  3538             	}
  3538             	}
  3539         #endif
  3539         #endif
  3540             // Close UI
  3540             // Close UI
  3541             if ( FepUI())
  3541             if ( FepUI())
  3542                 {
  3542                 {
  3726                 SendEventsToPluginManL( EPluginEditorActivate );
  3726                 SendEventsToPluginManL( EPluginEditorActivate );
  3727                 break;
  3727                 break;
  3728             case EAknClosePenInputRequest:
  3728             case EAknClosePenInputRequest:
  3729                 if ( iFepPluginManager )
  3729                 if ( iFepPluginManager )
  3730                     {
  3730                     {
  3731                     // Fix bug ou1cimx1#225126, editor team asks that the parameter is EFalse.
       
  3732                     iFepPluginManager->ClosePluginInputModeL( EFalse );
  3731                     iFepPluginManager->ClosePluginInputModeL( EFalse );
  3733                     }
  3732                     }
  3734                 break;
  3733                 break;
  3735             case EAknEdwinStatePromptUpdate:
  3734             case EAknEdwinStatePromptUpdate:
  3736                 SendEventsToPluginManL( EPluginPromptChanged ); 
  3735                 SendEventsToPluginManL( EPluginPromptChanged ); 
  3744                 // whenever focus cahnged happen, internally
  3743                 // whenever focus cahnged happen, internally
  3745                 // editor treat cursorposition change.
  3744                 // editor treat cursorposition change.
  3746                 // In between, if editor context not in inline edit state.
  3745                 // In between, if editor context not in inline edit state.
  3747                 // Try to update the case editor gets the focus, and editor
  3746                 // Try to update the case editor gets the focus, and editor
  3748                 // context come in inline state.                
  3747                 // context come in inline state.                
  3749 				//iCaseMan->UpdateCase(ENullNaviEvent);	
  3748 				iCaseMan->UpdateCase( ENullNaviEvent );
  3750                 break;
  3749                 break;
  3751 
  3750 
  3752             default:
  3751             default:
  3753                 break;
  3752                 break;
  3754             }
  3753             }
  3767             CCoeEnv* env = CCoeEnv::Static();
  3766             CCoeEnv* env = CCoeEnv::Static();
  3768             TKeyEvent keyEvent = {EKeyCBA2, EStdKeyNull, 0, 0};
  3767             TKeyEvent keyEvent = {EKeyCBA2, EStdKeyNull, 0, 0};
  3769             env->SimulateKeyEventL(keyEvent,EEventKey);            
  3768             env->SimulateKeyEventL(keyEvent,EEventKey);            
  3770             iFepPluginManager->ResetMenuState();            
  3769             iFepPluginManager->ResetMenuState();            
  3771             iFepPluginManager->RemoveLastFocusedWinFromOpenList();
  3770             iFepPluginManager->RemoveLastFocusedWinFromOpenList();
  3772             // Fix bug ou1cimx1#225126, editor team asks that the parameter is EFalse.
       
  3773             iFepPluginManager->ClosePluginInputModeL( EFalse );
  3771             iFepPluginManager->ClosePluginInputModeL( EFalse );
  3774             }
  3772             }
  3775         }
  3773         }
  3776 #endif // RD_SCALABLE_UI_V2  
  3774 #endif // RD_SCALABLE_UI_V2  
  3777     }
  3775     }
  4091         {
  4089         {
  4092         CommitInlineEditL();
  4090         CommitInlineEditL();
  4093         HBufC* spell = iFepPluginManager->SpellTextInput();
  4091         HBufC* spell = iFepPluginManager->SpellTextInput();
  4094         
  4092         
  4095         iFepPluginManager->SetITUTSpellingStateL(EFalse); 
  4093         iFepPluginManager->SetITUTSpellingStateL(EFalse); 
  4096         iFepPluginManager->HideSpellEditor();
  4094         iFepPluginManager->HideSpellEditor();        
  4097         iFepPluginManager->SetInSpellModeFlag( EFalse );
       
  4098         
  4095         
  4099         if (spell)
  4096         if (spell)
  4100             {
  4097             {
  4101             CleanupStack::PushL(spell);
  4098             CleanupStack::PushL(spell);
  4102             TPtr text = spell->Des();
  4099             TPtr text = spell->Des();
  4151 */
  4148 */
  4152 #ifdef RD_SCALABLE_UI_V2
  4149 #ifdef RD_SCALABLE_UI_V2
  4153     if (iFepPluginManager->IsSpellVisible())
  4150     if (iFepPluginManager->IsSpellVisible())
  4154         {
  4151         {
  4155         TRAP_IGNORE(iFepPluginManager->SetITUTSpellingStateL(EFalse)); 
  4152         TRAP_IGNORE(iFepPluginManager->SetITUTSpellingStateL(EFalse)); 
  4156         iFepPluginManager->HideSpellEditor();
  4153         iFepPluginManager->HideSpellEditor();        
  4157         iFepPluginManager->SetInSpellModeFlag( EFalse );
       
  4158 
  4154 
  4159         TRAP_IGNORE(UpdateCbaL(NULL)); 
  4155         TRAP_IGNORE(UpdateCbaL(NULL)); 
  4160         if (iFepPluginManager->CaseUpdatesSupressed())
  4156         if (iFepPluginManager->CaseUpdatesSupressed())
  4161             {
  4157             {
  4162             SetFlag(EFlagSupressAutoUpdate);
  4158             SetFlag(EFlagSupressAutoUpdate);
  7003 	}
  6999 	}
  7004 
  7000 
  7005 void CAknFepManager::HandleChangeInFocusL()
  7001 void CAknFepManager::HandleChangeInFocusL()
  7006     {
  7002     {
  7007     // Closing SCT has done focus change, so here just reset the flag.
  7003     // Closing SCT has done focus change, so here just reset the flag.
  7008 #ifdef RD_SCALABLE_UI_V2	
       
  7009     if(iDisalbleFocusChangeForSCT)
       
  7010     {
       
  7011     iDisalbleFocusChangeForSCT = EFalse;
       
  7012     return;
       
  7013     }
       
  7014 #endif
       
  7015     // dim state changed, need fetch it again.
  7004     // dim state changed, need fetch it again.
  7016     SendEventsToPluginManL(EPluginEnableFetchDimState);
  7005     SendEventsToPluginManL(EPluginEnableFetchDimState);
  7017 
  7006 
  7018     //The CCPU flag ECcpuStateShiftkeyWasPressedBeforeLosingFocus suggests that the candidate list was closed
  7007     //The CCPU flag ECcpuStateShiftkeyWasPressedBeforeLosingFocus suggests that the candidate list was closed
  7019     //with a long key press of shift key. If so then, FEP needs to set the EFlagShiftKeyDepressed for the CCPU mode to work 
  7008     //with a long key press of shift key. If so then, FEP needs to set the EFlagShiftKeyDepressed for the CCPU mode to work 
 11455             
 11444             
 11456             break;
 11445             break;
 11457             }
 11446             }
 11458         case ELangVietnamese:
 11447         case ELangVietnamese:
 11459             {
 11448             {
 11460             validInlineCharacter = (aCharacter.IsAlpha() &&
 11449             // For full screen qwerty, validInlineCharacter is true
 11461                                     !((category & TChar::ELetterOtherGroup))) ||
 11450             if( !( iFepPluginManager && iFepPluginManager->EnableITIOnFSQ() ) )
 11462                                     ((category == TChar::EMarkGroup) && 
 11451                 {
 11463                                     (bdCategory == TChar::ENonSpacingMark));
 11452                 validInlineCharacter = (aCharacter.IsAlpha() &&
       
 11453                                         !((category & TChar::ELetterOtherGroup))) ||
       
 11454                                         ((category == TChar::EMarkGroup) && 
       
 11455                                         (bdCategory == TChar::ENonSpacingMark));
       
 11456                 }
 11464             break;
 11457             break;
 11465             }
 11458             }
 11466         case ELangThai:
 11459         case ELangThai:
 11467             {
 11460             {
 11468             validInlineCharacter = (!(aCharacter.IsSpace() || (aCharacter == 0x2029))) &&
 11461             validInlineCharacter = (!(aCharacter.IsSpace() || (aCharacter == 0x2029))) &&
 12111 #else
 12104 #else
 12112         InternalFepUI()->SetMode(iMode, IsPredictive(), iQwertyInputMode);
 12105         InternalFepUI()->SetMode(iMode, IsPredictive(), iQwertyInputMode);
 12113 #endif        
 12106 #endif        
 12114         iHashKeyMan->SetMode(iMode, IsPredictive());
 12107         iHashKeyMan->SetMode(iMode, IsPredictive());
 12115         // ensure editor is aware of new fep mode
 12108         // ensure editor is aware of new fep mode
       
 12109         TCursorSelection curSel;
 12116         if ( IsFepAwareTextEditor() )
 12110         if ( IsFepAwareTextEditor() )
 12117             {
 12111             {
 12118             EditorState()->SetCurrentInputMode(EditorModeFromFepMode(aMode));
 12112             EditorState()->SetCurrentInputMode(EditorModeFromFepMode(aMode));
 12119             iInputCapabilities.FepAwareTextEditor()->GetCursorSelectionForFep(iUncommittedText);
 12113             iInputCapabilities.FepAwareTextEditor()->GetCursorSelectionForFep(curSel);
 12120             AdjustCursorTypeForCurrentPosition();
 12114             AdjustCursorTypeForCurrentPosition();
 12121             }
 12115             }
 12122 
 12116 
 12123         // when cursor is in between two words and SCT is launched and
 12117         // when cursor is in between two words and SCT is launched and
 12124         // cancel key is pressed, dont move the cursor at the end of
 12118         // cancel key is pressed, dont move the cursor at the end of
 12125         // second word.     
 12119         // second word.     
 12126          if (WesternPredictive(aMode) && !iUncommittedText.Length()
 12120          if (WesternPredictive(aMode) && !curSel.Length()
 12127             && CursorInsideWord() && !IsCcpuFlagSet(ECcpuStateSupressCursorMoveToEnd)
 12121             && CursorInsideWord() && !IsCcpuFlagSet(ECcpuStateSupressCursorMoveToEnd)
 12128 #ifdef RD_INTELLIGENT_TEXT_INPUT            
 12122 #ifdef RD_INTELLIGENT_TEXT_INPUT            
 12129             && (!iSupressCursorMoveToEndChrKeyPressed)
 12123             && (!iSupressCursorMoveToEndChrKeyPressed)
 12130 #endif //RD_INTELLIGENT_TEXT_INPUT       
 12124 #endif //RD_INTELLIGENT_TEXT_INPUT       
 12131             )
 12125             )
 13076             }
 13070             }
 13077         else
 13071         else
 13078         {
 13072         {
 13079         if ( iLanguageCapabilities.iInputLanguageCode == ELangArabic )
 13073         if ( iLanguageCapabilities.iInputLanguageCode == ELangArabic )
 13080             {
 13074             {
 13081             //iLanguageCapabilities.iLocalDigitType = EDigitTypeArabicIndic;
 13075             iLanguageCapabilities.iLocalDigitType = EDigitTypeArabicIndic;
 13082             aNewState=EArabicIndicNumeric;
 13076             aNewState=EArabicIndicNumeric;
 13083             }
 13077             }
 13084         else if ( iLanguageCapabilities.iInputLanguageCode == ELangFarsi 
 13078         else if ( iLanguageCapabilities.iInputLanguageCode == ELangFarsi 
 13085                || iLanguageCapabilities.iInputLanguageCode == ELangUrdu )
 13079                || iLanguageCapabilities.iInputLanguageCode == ELangUrdu )
 13086             {
 13080             {
 13087             //iLanguageCapabilities.iLocalDigitType = EDigitTypeEasternArabicIndic;
 13081             iLanguageCapabilities.iLocalDigitType = EDigitTypeEasternArabicIndic;
 13088             aNewState=EArabicIndicNumeric;
 13082             aNewState=EArabicIndicNumeric;
 13089             }    
 13083             }    
 13090         else if ( iLanguageCapabilities.iInputLanguageCode == ELangHindi )
 13084         else if ( iLanguageCapabilities.iInputLanguageCode == ELangHindi )
 13091             {
 13085             {
 13092             //iLanguageCapabilities.iLocalDigitType = EDigitTypeDevanagari;
 13086             //iLanguageCapabilities.iLocalDigitType = EDigitTypeDevanagari;
 14524             {
 14518             {
 14525             iSharedDataInterface->ResetPredictiveTextOn();
 14519             iSharedDataInterface->ResetPredictiveTextOn();
 14526             }
 14520             }
 14527         if ( iFepPluginManager && iFepPluginManager->IsSupportITIOnFSQ() )
 14521         if ( iFepPluginManager && iFepPluginManager->IsSupportITIOnFSQ() )
 14528         	{
 14522         	{
 14529             SendEventsToPluginManL( EPluginUpdatePenInputITIStatus );
 14523             TRAP_IGNORE(SendEventsToPluginManL( EPluginUpdatePenInputITIStatus ));
 14530         	}
 14524         	}
 14531         }
 14525         }
 14532     }
 14526     }
 14533 
 14527 
 14534 void CAknFepManager::SetWesternAutoComplete( const TBool aWesternAutoComplete )
 14528 void CAknFepManager::SetWesternAutoComplete( const TBool aWesternAutoComplete )
 18361                 sctChars |= EAknCharMapEmotionUse;
 18355                 sctChars |= EAknCharMapEmotionUse;
 18362                 }
 18356                 }
 18363             }
 18357             }
 18364         ClearExtendedFlag(EExtendedFlagEdwinEditorDestroyed);
 18358         ClearExtendedFlag(EExtendedFlagEdwinEditorDestroyed);
 18365         
 18359         
       
 18360         if ( iFepPluginManager && iFepPluginManager->IsSpellVisible() )
       
 18361         	{
       
 18362             iFepPluginManager->SetLaunchSCTInSpell( ETrue );            
       
 18363         	}        	
       
 18364         
 18366 		if (iUiInterface->CharMapDialogL(
 18365 		if (iUiInterface->CharMapDialogL(
 18367 			sctChars, 
 18366 			sctChars, 
 18368 			specialChars, 
 18367 			specialChars, 
 18369 			charMap,
 18368 			charMap,
 18370 			lockNumericKeys,
 18369 			lockNumericKeys,
 18459                                     TKeyEvent delKey = {8, EStdKeyBackspace, 1, 0};        
 18458                                     TKeyEvent delKey = {8, EStdKeyBackspace, 1, 0};        
 18460                                     CCoeEnv::Static()->SimulateKeyEventL(delKey, EEventKey);                                                                
 18459                                     CCoeEnv::Static()->SimulateKeyEventL(delKey, EEventKey);                                                                
 18461                                     }                               
 18460                                     }                               
 18462 //There may be several char to be inserted, need disable Focus change to avoid multi-focus change.
 18461 //There may be several char to be inserted, need disable Focus change to avoid multi-focus change.
 18463 #ifdef RD_SCALABLE_UI_V2 
 18462 #ifdef RD_SCALABLE_UI_V2 
 18464                                 iDisalbleFocusChangeForSCT = ETrue;
       
 18465 #endif       
 18463 #endif       
 18466                                 InsertTextFromDialogL(charAsDesc, cursorSelection);
 18464                                 InsertTextFromDialogL(charAsDesc, cursorSelection);
 18467                                 }
 18465                                 }
 18468                             // Clear dead key, vowel sequence and vietnamese tone mark states.                         
 18466                             // Clear dead key, vowel sequence and vietnamese tone mark states.                         
 18469                             iPtiEngine->HandleCommandL(EPtiCommandGetAndClearLastVietnameseChar, 
 18467                             iPtiEngine->HandleCommandL(EPtiCommandGetAndClearLastVietnameseChar, 
 18475                             }
 18473                             }
 18476                         }
 18474                         }
 18477                     }
 18475                     }
 18478                 }
 18476                 }
 18479 #ifdef RD_SCALABLE_UI_V2 
 18477 #ifdef RD_SCALABLE_UI_V2 
 18480             
 18478             iNotifyPlugin = EFalse;
 18481             if( iFepFullyConstructed && iFepPluginManager)
 18479             if( iFepFullyConstructed && iFepPluginManager)
 18482                 {
 18480                 {
 18483                  if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut ||
 18481                  if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut ||
 18484                      iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
 18482                      iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
 18485                      iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
 18483                      iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
 18494             else
 18492             else
 18495                 {
 18493                 {
 18496                 HandleChangeInFocus();
 18494                 HandleChangeInFocus();
 18497                 }   
 18495                 }   
 18498             // Set the flag, not change focus for next.
 18496             // Set the flag, not change focus for next.
 18499             iDisalbleFocusChangeForSCT = ETrue;           
 18497             iNotifyPlugin = ETrue;
 18500 #endif
 18498 #endif
 18501             }
 18499             }
 18502         else
 18500         else
 18503             {
 18501             {
 18504             iClosePeninputUi = EFalse;
 18502             iClosePeninputUi = EFalse;
 18505             iStopProcessFocus = EFalse;                   
 18503             iStopProcessFocus = EFalse;                   
 18506             }
 18504             }		   
 18507             
       
 18508         PrepareFepAfterDialogExitL(fepUid);
 18505         PrepareFepAfterDialogExitL(fepUid);
 18509         }
 18506         }
 18510     }
 18507     }
 18511 
 18508 
 18512 /**
 18509 /**