151 const TInt KAknNotifySrvUid = 0x10281EF2; |
151 const TInt KAknNotifySrvUid = 0x10281EF2; |
152 if(aUid.iUid == KAknCapServerUid || aUid.iUid == KAknNotifySrvUid) |
152 if(aUid.iUid == KAknCapServerUid || aUid.iUid == KAknNotifySrvUid) |
153 return ETrue; |
153 return ETrue; |
154 return EFalse; |
154 return EFalse; |
155 } |
155 } |
|
156 |
|
157 // ----------------------------------------------------------------------------- |
|
158 // Check if the app specified by aUid is avkon notify server |
|
159 // ----------------------------------------------------------------------------- |
|
160 // |
|
161 TBool IsAknNotifyServerApp( const TUid& aUid ) |
|
162 { |
|
163 const TInt KAknNotifySrvUid = 0x10281EF2; |
|
164 return aUid.iUid == KAknNotifySrvUid; |
|
165 } |
|
166 |
156 #ifdef RD_SCALABLE_UI_V2 |
167 #ifdef RD_SCALABLE_UI_V2 |
157 inline TBool IsAbleTouseCallBubble() |
168 inline TBool IsAbleTouseCallBubble() |
158 { |
169 { |
159 const TInt KAknCapServerUid = 0x10207218; |
170 const TInt KAknCapServerUid = 0x10207218; |
160 return GetCurAppUid().iUid != KAknCapServerUid; |
171 return GetCurAppUid().iUid != KAknCapServerUid; |
303 void CAknFepPluginManager::ActivatePenInputL() |
314 void CAknFepPluginManager::ActivatePenInputL() |
304 { |
315 { |
305 if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() ) |
316 if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() ) |
306 { |
317 { |
307 if( iFepMan.FepAwareTextEditor() ) |
318 if( iFepMan.FepAwareTextEditor() ) |
308 { |
319 { |
|
320 // Enable transition effect when close pen ui |
|
321 // by pressing close button. |
|
322 iPenInputServer.EnableGfxTransEffect( ETrue ); |
309 iPreferredUiMode = ETrue; |
323 iPreferredUiMode = ETrue; |
310 TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()), |
324 TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()), |
311 EPenInputOpenManually, |
325 EPenInputOpenManually, |
312 ERangeInvalid); |
326 ERangeInvalid); |
313 } |
327 } |
561 } |
575 } |
562 LaunchPenInputMenuL(R_AVKON_PENINPUT_OPTION_MENU_BAR); |
576 LaunchPenInputMenuL(R_AVKON_PENINPUT_OPTION_MENU_BAR); |
563 } |
577 } |
564 break; |
578 break; |
565 case ESignalLayoutClosed: |
579 case ESignalLayoutClosed: |
|
580 // Enable transition effect when close pen ui by pressing close button. |
|
581 iPenInputServer.EnableGfxTransEffect( ETrue ); |
566 if(iPluginInputMode == EPluginInputModeItut) |
582 if(iPluginInputMode == EPluginInputModeItut) |
567 { |
583 { |
568 iFepMan.PtiEngine()->CancelTimerActivity(); |
584 iFepMan.PtiEngine()->CancelTimerActivity(); |
569 } |
585 } |
570 ClosePluginInputModeL(ETrue); |
586 ClosePluginInputModeL(ETrue); |
1011 OnFocusChangedL( aEventData ); |
1027 OnFocusChangedL( aEventData ); |
1012 } |
1028 } |
1013 break; |
1029 break; |
1014 case EPluginResourceChanged: |
1030 case EPluginResourceChanged: |
1015 { |
1031 { |
1016 iOrientationChangedfromUI = ETrue; |
1032 iOrientationChangedfromUI = ETrue; |
1017 OnResourceChangedL( aEventData ); |
1033 |
1018 iOrientationChangedfromUI = EFalse; |
1034 TUid uid = GetCurAppUid(); |
|
1035 if ( IsAknNotifyServerApp( uid ) ) |
|
1036 { |
|
1037 //turn off AutoForeground feature of global query temporarily during layout switching |
|
1038 //if not, global query may be shown on top of virtual input by unexpected tap events. |
|
1039 CCoeEnv::Static()->RootWin().AutoForeground( EFalse ); |
|
1040 TRAPD( err, OnResourceChangedL( aEventData ) ); |
|
1041 CCoeEnv::Static()->RootWin().AutoForeground( ETrue ); |
|
1042 User::LeaveIfError( err ); |
|
1043 } |
|
1044 else |
|
1045 { |
|
1046 OnResourceChangedL( aEventData ); |
|
1047 } |
|
1048 |
|
1049 iOrientationChangedfromUI = EFalse; |
1019 } |
1050 } |
1020 break; |
1051 break; |
1021 case EPluginFaseSwap: |
1052 case EPluginFaseSwap: |
1022 { |
1053 { |
1023 iFastSwapByMenu = aEventData; |
1054 iFastSwapByMenu = aEventData; |
2822 |
2853 |
2823 if (SetSyncIcfDataL( icfData, lastEditorContent, currentEditorContent)) |
2854 if (SetSyncIcfDataL( icfData, lastEditorContent, currentEditorContent)) |
2824 { |
2855 { |
2825 iCurrentPluginInputFepUI->HandleCommandL |
2856 iCurrentPluginInputFepUI->HandleCommandL |
2826 (ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData)); |
2857 (ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData)); |
2827 iFepMan.TryPopExactWordInICFL(); |
2858 if ( icfData.iMidPos >= 0 ) |
|
2859 { |
|
2860 // icfData.iMidPos >= 0 means the text which will be sent to ICF is inline text. |
|
2861 iFepMan.TryPopExactWordInICFL(); |
|
2862 } |
2828 } |
2863 } |
2829 |
2864 |
2830 if ( secretEditor ) |
2865 if ( secretEditor ) |
2831 { |
2866 { |
2832 TBool cursorDisabled = IsEditorCursorDisabled(); |
2867 TBool cursorDisabled = IsEditorCursorDisabled(); |
5947 { |
5982 { |
5948 return EFalse; |
5983 return EFalse; |
5949 } |
5984 } |
5950 |
5985 |
5951 TInt flags = editorState->Flags(); |
5986 TInt flags = editorState->Flags(); |
5952 return ( flags & EEikEdwinAvkonDisableCursor ) == EEikEdwinAvkonDisableCursor; |
5987 return ( flags & EAknEditorFlagAvkonSecretEditor ) == EAknEditorFlagAvkonSecretEditor; |
|
5988 |
5953 } |
5989 } |
5954 |
5990 |
5955 // --------------------------------------------------------------------------- |
5991 // --------------------------------------------------------------------------- |
5956 // Check if the cusror in editor is visible. |
5992 // Check if the cusror in editor is visible. |
5957 // --------------------------------------------------------------------------- |
5993 // --------------------------------------------------------------------------- |
6100 EPtiCaseChrLower, EPtiCaseChrUpper, |
6136 EPtiCaseChrLower, EPtiCaseChrUpper, |
6101 EPtiCaseFnLower, EPtiCaseFnUpper }; |
6137 EPtiCaseFnLower, EPtiCaseFnUpper }; |
6102 TPtiTextCase caseCalculated = EPtiCaseLower; |
6138 TPtiTextCase caseCalculated = EPtiCaseLower; |
6103 TBuf<KDefaulCoreMaximumWordLength> mappedCharacters; |
6139 TBuf<KDefaulCoreMaximumWordLength> mappedCharacters; |
6104 TBool isMappingFound = EFalse; |
6140 TBool isMappingFound = EFalse; |
|
6141 TPtiEngineInputMode oldInputMode = iFepMan.PtiEngine()->InputMode(); |
|
6142 if ( oldInputMode != EPtiEngineQwertyPredictive ) |
|
6143 { |
|
6144 // if current input mode isn't EPtiEngineQwertyPredictive, |
|
6145 // change it to EPtiEngineQwertyPredictive temporarily, |
|
6146 // so that during the process of searching in qwerty keymapping afterward, |
|
6147 // qwerty keymapping can be gained. |
|
6148 iFepMan.PtiEngine()->SetInputMode( EPtiEngineQwertyPredictive ); |
|
6149 } |
|
6150 |
6105 TPtiKey key = iFepMan.PtiEngine()->CharacterToKey( aCharacter ); |
6151 TPtiKey key = iFepMan.PtiEngine()->CharacterToKey( aCharacter ); |
6106 |
6152 |
6107 //It loops through all the key mappings to find the character in the key mappings and |
6153 //It loops through all the key mappings to find the character in the key mappings and |
6108 //if the character available in the key mapping, fetches the corresponding case. |
6154 //if the character available in the key mapping, fetches the corresponding case. |
6109 for( TInt i=0; i< KNumberOfCases ; i++) |
6155 for( TInt i=0; i< KNumberOfCases ; i++) |
6122 if ( isMappingFound ) |
6168 if ( isMappingFound ) |
6123 { |
6169 { |
6124 break; |
6170 break; |
6125 } |
6171 } |
6126 } |
6172 } |
|
6173 |
|
6174 if ( oldInputMode != EPtiEngineQwertyPredictive ) |
|
6175 { |
|
6176 // if current input mode isn't EPtiEngineQwertyPredictive, |
|
6177 // current input mode has been set to EPtiEngineQwertyPredictive temporarily before, |
|
6178 // now we need to restore it, |
|
6179 // because state machine is responsible for changing it practically. |
|
6180 iFepMan.PtiEngine()->SetInputMode( oldInputMode ); |
|
6181 } |
6127 //Now if there is no key mapping found for the character, then use the default TChar |
6182 //Now if there is no key mapping found for the character, then use the default TChar |
6128 //APIs to find the case of the character. |
6183 //APIs to find the case of the character. |
6129 if( !isMappingFound ) |
6184 if( !isMappingFound ) |
6130 { |
6185 { |
6131 caseCalculated = aCharacter.IsUpper()?EPtiCaseUpper:EPtiCaseLower; |
6186 caseCalculated = aCharacter.IsUpper()?EPtiCaseUpper:EPtiCaseLower; |