textinput/peninputarc/src/peninputserverapp/peninputserver.cpp
branchRCL_3
changeset 10 6defe5d1bd39
parent 8 6ceef9a83b1a
child 19 5e18d8c489d6
equal deleted inserted replaced
8:6ceef9a83b1a 10:6defe5d1bd39
   210 // ---------------------------------------------------------------------------
   210 // ---------------------------------------------------------------------------
   211 //
   211 //
   212 void CPeninputServer::ConstructL( )
   212 void CPeninputServer::ConstructL( )
   213     {
   213     {
   214 #ifdef RD_TACTILE_FEEDBACK     
   214 #ifdef RD_TACTILE_FEEDBACK     
   215 	//KS: QUICK FIX FOR EGSN-7BCBWS 
       
   216 	FeatureManager::InitializeLibL();
   215 	FeatureManager::InitializeLibL();
   217 	//KS: QUICK FIX FOR EGSN-7BCBWS 
       
   218    	iSupportFeedback = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
   216    	iSupportFeedback = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
   219 
   217 
   220 #endif //RD_TACTILE_FEEDBACK   
   218 #endif //RD_TACTILE_FEEDBACK   
   221     
   219     
   222     // start server, leaves if server already running
   220     // start server, leaves if server already running
   331         delete iFlushTimer;
   329         delete iFlushTimer;
   332         }
   330         }
   333         
   331         
   334 
   332 
   335 #ifdef RD_TACTILE_FEEDBACK
   333 #ifdef RD_TACTILE_FEEDBACK
   336 	//KS: QUICK FIX FOR EGSN-7BCBWS 
       
   337 	FeatureManager::UnInitializeLib();
   334 	FeatureManager::UnInitializeLib();
   338 	//KS: QUICK FIX FOR EGSN-7BCBWS 
       
   339     iFeedbackAreaArray.Close();
   335     iFeedbackAreaArray.Close();
   340 #endif // RD_TACTILE_FEEDBACK    
   336 #endif // RD_TACTILE_FEEDBACK    
   341     delete iPenUiCtrl;
   337     delete iPenUiCtrl;
   342     delete iInternalBackgroundCtrl;
   338     delete iInternalBackgroundCtrl;
   343 
   339 
  1112                 iPenUiCtrl->SetResourceChange(iResourceChange);                           
  1108                 iPenUiCtrl->SetResourceChange(iResourceChange);                           
  1113             } 
  1109             } 
  1114             break;
  1110             break;
  1115     	case EPeninputRequestSupportInputMode:
  1111     	case EPeninputRequestSupportInputMode:
  1116     	    {
  1112     	    {
  1117             TInt supportMode = GetSupportModeL();
  1113     	    TInt language = 0;
  1118 
  1114     	    TPckg<TInt> msgLanguage( language );
  1119             TPckg<TInt> msg(supportMode);
  1115     	    aMessage.ReadL( 1, msgLanguage );    	    
  1120             
  1116     	    TInt supportMode = GetSupportModeByLanguageL( language );                      
       
  1117             TPckg<TInt> msg(supportMode);           
  1121             aMessage.WriteL(0,msg);
  1118             aMessage.WriteL(0,msg);
  1122     	    }
  1119     	    }
  1123     	    break;            
  1120     	    break;            
  1124             
  1121             
  1125     	case EPeninputRequestSetInputLanguage:
  1122     	case EPeninputRequestSetInputLanguage:
  2737             }
  2734             }
  2738         tempMode<<=1;
  2735         tempMode<<=1;
  2739         }    
  2736         }    
  2740     return supportMode;
  2737     return supportMode;
  2741     }
  2738     }
       
  2739 
       
  2740 TInt CPeninputServer::GetSupportModeByLanguageL( TInt aInputLanguage )
       
  2741 	{
       
  2742     TInt curLanguage = aInputLanguage;
       
  2743     
       
  2744     if ( curLanguage == 401 )
       
  2745     	{
       
  2746         curLanguage = 102;
       
  2747     	}    
       
  2748     if (curLanguage == 402)
       
  2749     	{
       
  2750         curLanguage = 103;
       
  2751     	}        
       
  2752     TInt supportMode = EPluginInputModeNone;
       
  2753     TInt tempMode = EPluginInputModeHwr;
       
  2754     
       
  2755     iLayoutEng->InitializeL();
       
  2756     
       
  2757     while ( tempMode < EPluginInputModeAll )
       
  2758         {
       
  2759         if ( iLayoutEng->IsSupportPluginMode( ( TLanguage )curLanguage, 
       
  2760                                               ( TPluginInputMode )tempMode ) )
       
  2761             {
       
  2762             supportMode |= tempMode;
       
  2763             }
       
  2764         tempMode<<=1;
       
  2765         }    
       
  2766     return supportMode;	
       
  2767 	}
  2742 	
  2768 	
  2743 // ---------------------------------------------------------------------------
  2769 // ---------------------------------------------------------------------------
  2744 // CPeninputServer::DiscreetPopChangeNotification
  2770 // CPeninputServer::DiscreetPopChangeNotification
  2745 // handle notification of discreept pop changing
  2771 // handle notification of discreept pop changing
  2746 // ---------------------------------------------------------------------------
  2772 // ---------------------------------------------------------------------------