fep/aknfep/src/AknFepPluginManager.cpp
branchRCL_3
changeset 15 6c2c2d3ab788
parent 12 5e18d8c489d6
child 16 857bebeecec0
equal deleted inserted replaced
12:5e18d8c489d6 15:6c2c2d3ab788
   684                 }
   684                 }
   685                 break;
   685                 break;
   686             case ESignalEnterSpellMode:
   686             case ESignalEnterSpellMode:
   687                 {
   687                 {
   688                 iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue);
   688                 iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue);
       
   689                 // this will allow the layout to be redraw even if the layout was activeated
       
   690                 iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputEnalbeLayoutReDrawWhenActive,ETrue);
   689                 iFepMan.LaunchEditWordQueryL();
   691                 iFepMan.LaunchEditWordQueryL();
   690                 }
   692                 }
   691                 break;
   693                 break;
   692             case ESignalExitSpellMode:
   694             case ESignalExitSpellMode:
   693                 {
   695                 {
   696 
   698 
   697 				//remove spell mode editor will cause focus change, so as pen UI is closed and opened again.
   699 				//remove spell mode editor will cause focus change, so as pen UI is closed and opened again.
   698 				iFocuschangedForSpellEditor = ETrue;
   700 				iFocuschangedForSpellEditor = ETrue;
   699 				iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue);
   701 				iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue);
   700 				
   702 				
       
   703                 // this will allow the layout to be redraw even if the layout was activeated
       
   704                 iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputEnalbeLayoutReDrawWhenActive,ETrue);
   701                 exitbyok ? iFepMan.ExitPluginSpellModeByOk() : 
   705                 exitbyok ? iFepMan.ExitPluginSpellModeByOk() : 
   702                            iFepMan.ExitPluginSpellModeByCancel();
   706                            iFepMan.ExitPluginSpellModeByCancel();
   703                 }
   707                 }
   704                 break;
   708                 break;
   705             case ESignalLaunchSCT:
   709             case ESignalLaunchSCT:
  1077                 {
  1081                 {
  1078                 iCurrentPluginInputFepUI->HandleCommandL(
  1082                 iCurrentPluginInputFepUI->HandleCommandL(
  1079                         ECmdPeninputArabicNumModeChanged,aEventData);                            
  1083                         ECmdPeninputArabicNumModeChanged,aEventData);                            
  1080                 }
  1084                 }
  1081             break;
  1085             break;
       
  1086 		case EPluginEnablePriorityChangeOnOriChange:
       
  1087             if(iCurrentPluginInputFepUI)
       
  1088                 {
       
  1089                 if(ConnectServer())
       
  1090                     {
       
  1091                     iPenInputServer.EnablePriorityChangeOnOriChange(TBool(aEventData));  
       
  1092                     }
       
  1093                 }
       
  1094 
  1082         default:
  1095         default:
  1083             break;
  1096             break;
  1084         }
  1097         }
  1085     }
  1098     }
  1086             
  1099             
  1161     iPenInputServer.BackgroudDefaultOri( iDefaultOrientation );
  1174     iPenInputServer.BackgroudDefaultOri( iDefaultOrientation );
  1162     
  1175     
  1163     TPixelsTwipsAndRotation size; 
  1176     TPixelsTwipsAndRotation size; 
  1164     CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size);
  1177     CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size);
  1165     TBool landscape = size.iPixelSize.iWidth > size.iPixelSize.iHeight;     
  1178     TBool landscape = size.iPixelSize.iWidth > size.iPixelSize.iHeight;     
  1166     TBool disableFSQ = 
  1179     // For portrait only mode, need to disable FSQ.
  1167         (  aSuggestMode == EPluginInputModeFSQ &&
  1180     TBool disableFSQ = iDefaultOrientation == CAknAppUiBase::EAppUiOrientationPortrait 
  1168            ( iDefaultOrientation == CAknAppUiBase::EAppUiOrientationPortrait ||
  1181     		           || ( !landscape && !iAvkonAppUi->OrientationCanBeChanged() );         
  1169 		     ( !landscape && !iAvkonAppUi->OrientationCanBeChanged() ) ) );
       
  1170 
       
  1171           
       
  1172     if ( disableFSQ )
  1182     if ( disableFSQ )
  1173         {
  1183         {
  1174         iPenInputServer.SetDisabledLayout( EPluginInputModeFSQ );
  1184         iPenInputServer.SetDisabledLayout( EPluginInputModeFSQ );
       
  1185         }
       
  1186     else
       
  1187         {
       
  1188         // if fsq had been disabled before and now application is not portrait only,
       
  1189         // need to enable fsq again;
       
  1190         TInt disableMode = iPenInputServer.DisabledLayout();
       
  1191         if( disableMode & EPluginInputModeFSQ )
       
  1192             {
       
  1193             iPenInputServer.SetDisabledLayout( -1 );//reset disable type
       
  1194             iPenInputServer.SetDisabledLayout( disableMode & ~EPluginInputModeFSQ );
       
  1195             }
  1175         }
  1196         }
  1176     
  1197     
  1177     TBool disableITUT = 
  1198     TBool disableITUT = 
  1178                ( iDefaultOrientation == CAknAppUiBase::EAppUiOrientationLandscape ||
  1199                ( iDefaultOrientation == CAknAppUiBase::EAppUiOrientationLandscape ||
  1179                       ( landscape && !iAvkonAppUi->OrientationCanBeChanged() ) ) ;
  1200                       ( landscape && !iAvkonAppUi->OrientationCanBeChanged() ) ) ;
  1181     if( disableITUT )
  1202     if( disableITUT )
  1182          {
  1203          {
  1183          //disable V-ITUT, and if current aSuggestMode is EPluginInputModeItut, replace it with EPluginInputModeFSQ;
  1204          //disable V-ITUT, and if current aSuggestMode is EPluginInputModeItut, replace it with EPluginInputModeFSQ;
  1184          iPenInputServer.SetDisabledLayout( EPluginInputModeItut );
  1205          iPenInputServer.SetDisabledLayout( EPluginInputModeItut );
  1185          if( aSuggestMode == EPluginInputModeItut )
  1206          if( aSuggestMode == EPluginInputModeItut )
  1186           {
  1207              {
  1187               aSuggestMode = EPluginInputModeFSQ;
  1208              aSuggestMode = EPluginInputModeFSQ;
  1188           }
  1209              }
  1189          }
  1210          }
  1190     else
  1211     else
  1191          {
  1212          {
  1192          // if V-ITUT had been disabled before, enable it now;
  1213          // if V-ITUT had been disabled before, enable it now;
  1193          TInt disableMode = iPenInputServer.DisabledLayout();
  1214          TInt disableMode = iPenInputServer.DisabledLayout();
  1194          if( disableMode & EPluginInputModeItut )
  1215          if( disableMode & EPluginInputModeItut )
  1195           {
  1216              {
  1196 			iPenInputServer.SetDisabledLayout( -1 );//reset
  1217 			 iPenInputServer.SetDisabledLayout( -1 );//reset
  1197 			iPenInputServer.SetDisabledLayout( disableMode & ~EPluginInputModeItut );
  1218 			 iPenInputServer.SetDisabledLayout( disableMode & ~EPluginInputModeItut );
  1198           }
  1219              }
  1199          }
  1220          }
  1200 
  1221 
  1201 
  1222 
  1202     if ( aSuggestMode == EPluginInputModeFSQ)
  1223     if ( aSuggestMode == EPluginInputModeFSQ)
  1203         {
  1224         {
  1268     	 inputLang == ELangTaiwanChinese ||
  1289     	 inputLang == ELangTaiwanChinese ||
  1269     	 inputLang == ELangHongKongChinese )
  1290     	 inputLang == ELangHongKongChinese )
  1270         {
  1291         {
  1271         isSplit = EFalse;
  1292         isSplit = EFalse;
  1272         }    
  1293         }    
  1273 
       
  1274     if ( iLangMan.IsSplitView() && !isSplit )
       
  1275         {
       
  1276         NotifyAppUiImeTouchWndStateL( EFalse ); //restore layout
       
  1277         }
       
  1278 
  1294 
  1279     iLangMan.SetSplitView(isSplit);
  1295     iLangMan.SetSplitView(isSplit);
  1280 
  1296 
  1281  
  1297  
  1282     MAknFepManagerInterface* fepUI = iLangMan.GetPluginInputFepUiL(
  1298     MAknFepManagerInterface* fepUI = iLangMan.GetPluginInputFepUiL(
  1532         iPenInputServer.SetResourceChange(ETrue);    
  1548         iPenInputServer.SetResourceChange(ETrue);    
  1533         }
  1549         }
  1534     
  1550     
  1535     iResourceChange = ETrue;   
  1551     iResourceChange = ETrue;   
  1536 
  1552 
       
  1553     TBool needToChangeInputMode = ETrue;
  1537     if ( iSharedData.AutoRotateEnabled() && 
  1554     if ( iSharedData.AutoRotateEnabled() && 
  1538         ( iPluginInputMode == EPluginInputModeFSQ || iPluginInputMode == EPluginInputModeItut ) )
  1555         ( iPluginInputMode == EPluginInputModeFSQ || iPluginInputMode == EPluginInputModeItut ) )
  1539         {
  1556         {
  1540         if ( IsSpellVisible() )
  1557         if ( IsSpellVisible() )
  1541             {
  1558             {
  1542             iFepMan.ExitPluginSpellModeByCancel();
  1559             iFepMan.ExitPluginSpellModeByCancel();
  1543             }
  1560             iFepMan.SetNotifyPlugin( EFalse );
  1544         
  1561             iFepMan.HandleChangeInFocusForSettingFep();
  1545         if ( iPenInputMenu && iPenInputMenu->IsShowing() )
  1562             iFepMan.SetNotifyPlugin( ETrue );
  1546             {
  1563             }
  1547             iPenInputMenu->Hide();
       
  1548             ResetMenuState();
       
  1549             }
       
  1550         ClosePluginInputModeL(ETrue);               
       
  1551         iFepMan.TryCloseUiL(); 
       
  1552         TPixelsTwipsAndRotation size; 
  1564         TPixelsTwipsAndRotation size; 
  1553         CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size);
  1565         CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size);
  1554 
  1566 
  1555         iPluginInputMode = ( size.iPixelSize.iWidth < size.iPixelSize.iHeight ) ? 
  1567         TPluginInputMode inputModeBeforeOri = ( size.iPixelSize.iWidth < size.iPixelSize.iHeight ) ? 
  1556             EPluginInputModeItut : EPluginInputModeFSQ;
  1568             EPluginInputModeItut : EPluginInputModeFSQ;
  1557         }
  1569         
  1558     TryChangePluginInputModeByModeL( iPluginInputMode,
  1570             if ( iPenInputMenu && iPenInputMenu->IsShowing() )
       
  1571                 {
       
  1572                 iPenInputMenu->Hide();
       
  1573                 ResetMenuState(EFalse);
       
  1574                 }
       
  1575             
       
  1576         if(inputModeBeforeOri != iPluginInputMode)
       
  1577             {
       
  1578             iPluginInputMode = inputModeBeforeOri; 
       
  1579             ClosePluginInputModeL(ETrue);               
       
  1580             iFepMan.TryCloseUiL();
       
  1581             }
       
  1582         else
       
  1583             {
       
  1584             needToChangeInputMode = EFalse;
       
  1585             }
       
  1586         }
       
  1587     
       
  1588     if(needToChangeInputMode)
       
  1589 	    {
       
  1590 		TryChangePluginInputModeByModeL( iPluginInputMode,
  1559                                      EPenInputOpenManually,
  1591                                      EPenInputOpenManually,
  1560                                      ERangeInvalid ); 
  1592                                      ERangeInvalid ); 
       
  1593 		}
       
  1594     
  1561     /*if(size.iPixelSize.iWidth > size.iPixelSize.iHeight ) //landscape
  1595     /*if(size.iPixelSize.iWidth > size.iPixelSize.iHeight ) //landscape
  1562         {
  1596         {
  1563         if ( iPluginInputMode == EPluginInputModeVkb )
  1597         if ( iPluginInputMode == EPluginInputModeVkb )
  1564             {        	
  1598             {        	
  1565             // Get store value from CenRep
  1599             // Get store value from CenRep
  1583     if ( /*!hasChanged &&*/ iCurrentPluginInputFepUI )
  1617     if ( /*!hasChanged &&*/ iCurrentPluginInputFepUI )
  1584         {
  1618         {
  1585         iCurrentPluginInputFepUI->ResourceChanged(aType);
  1619         iCurrentPluginInputFepUI->ResourceChanged(aType);
  1586         }
  1620         }
  1587     
  1621     
  1588     if (iInMenu)
  1622 	if(needToChangeInputMode)
  1589         {
  1623 	    {
  1590         SetMenuState(EFalse);
  1624 		if (iInMenu)
  1591         }
  1625 			{
  1592         
  1626 			SetMenuState(EFalse);
  1593     if (setResChange)    
  1627 			}
       
  1628 		}
       
  1629 
       
  1630 	if (setResChange)    
  1594         {
  1631         {
  1595         iPenInputServer.SetResourceChange(EFalse);         
  1632         iPenInputServer.SetResourceChange(EFalse);         
  1596         }
  1633         }
  1597 
  1634 
  1598     iResourceChange = EFalse;
  1635     iResourceChange = EFalse;
  5945 // Check if current editor support partial screen IMEs
  5982 // Check if current editor support partial screen IMEs
  5946 // -----------------------------------------------------------------------------
  5983 // -----------------------------------------------------------------------------
  5947 //
  5984 //
  5948 TBool CAknFepPluginManager::IsEditorSupportSplitIme()
  5985 TBool CAknFepPluginManager::IsEditorSupportSplitIme()
  5949     {
  5986     {
       
  5987 	
       
  5988 	TBool disablePartialInput = FeatureManager::FeatureSupported( KFeatureIdChinese ) 
       
  5989 	                            || FeatureManager::FeatureSupported( KFeatureIdKorean );
       
  5990 	if ( disablePartialInput )
       
  5991 	    {
       
  5992 	    return EFalse;
       
  5993 	    }
       
  5994 
  5950     //Mfne editors
  5995     //Mfne editors
  5951     if ( iFepMan.IsMfneEditor() )
  5996     if ( iFepMan.IsMfneEditor() )
  5952         {
  5997         {
  5953         TUint caps = iFepMan.ExtendedInputCapabilities();
  5998         TUint caps = iFepMan.ExtendedInputCapabilities();
  5954         return CAknExtendedInputCapabilities::EInputEditorPartialScreen == 
  5999         return CAknExtendedInputCapabilities::EInputEditorPartialScreen ==