uiacceltk/hitchcock/ServerCore/Src/alfscreen.cpp
changeset 13 8f67d927ea57
parent 0 15bf7259bb7c
child 24 f93c875b566e
equal deleted inserted replaced
0:15bf7259bb7c 13:8f67d927ea57
    46 //_LIT8(KAlfSessionContainerControlTag, "Session container");
    46 //_LIT8(KAlfSessionContainerControlTag, "Session container");
    47 _LIT8(KAlfWindowFloatingSpriteContainerControlTag, "FSPRITE");
    47 _LIT8(KAlfWindowFloatingSpriteContainerControlTag, "FSPRITE");
    48 _LIT8(KAlfFullScreenEffectContainerControlTag, "EFFECT");
    48 _LIT8(KAlfFullScreenEffectContainerControlTag, "EFFECT");
    49 //_LIT8(KAlfWindowGroupTemporaryRemoveControlTag, "WGTEMP");
    49 //_LIT8(KAlfWindowGroupTemporaryRemoveControlTag, "WGTEMP");
    50 
    50 
       
    51 const TInt KAlfNumberOfFixedControlGroups = 2;
    51 
    52 
    52 // ======== MEMBER FUNCTIONS ========
    53 // ======== MEMBER FUNCTIONS ========
    53 
    54 
    54 // ---------------------------------------------------------------------------
    55 // ---------------------------------------------------------------------------
    55 // ---------------------------------------------------------------------------
    56 // ---------------------------------------------------------------------------
   161 #ifdef SYMBIAN_BUILD_GCE
   162 #ifdef SYMBIAN_BUILD_GCE
   162 #ifndef __WINSCW__
   163 #ifndef __WINSCW__
   163     _LIT(KRDSupport, "c:\\resource\\errrd" );
   164     _LIT(KRDSupport, "c:\\resource\\errrd" );
   164     if (CHuiStatic::FsSession().Handle() && BaflUtils::FileExists( CHuiStatic::FsSession(), KRDSupport ))
   165     if (CHuiStatic::FsSession().Handle() && BaflUtils::FileExists( CHuiStatic::FsSession(), KRDSupport ))
   165         {
   166         {
       
   167         iFpsControlGroup = &aHuiEnv.NewControlGroupL(0xDEADBEEF + 20 + iScreenNum); // TODO
       
   168     	
       
   169     	CHuiControl* fpsCntrl = new (ELeave) CHuiControl(aHuiEnv);	    
       
   170 	    CleanupStack::PushL(fpsCntrl);
       
   171 	    fpsCntrl->ConstructL();
       
   172 	    fpsCntrl->SetRole(EAlfFpsIndicatorContainer);
       
   173 	    iFpsControlGroup->AppendL(fpsCntrl);
       
   174 	    CleanupStack::Pop(fpsCntrl);
       
   175         
   166         // FPS Counter with hitchcock drawing
   176         // FPS Counter with hitchcock drawing
   167         iFPSText = CHuiTextVisual::AddNewL(*effectCntrl, effectLayout);
   177         iFPSText = CHuiTextVisual::AddNewL(*fpsCntrl, NULL);
   168         iFPSText->SetColor(KRgbBlue);
   178         iFPSText->SetColor(KRgbBlue);
   169         iFPSText->SetFlag(EHuiVisualFlagManualLayout);
   179         iFPSText->SetFlag(EHuiVisualFlagManualLayout);
   170         iFPSText->SetPos(THuiRealPoint(300,20)); // could be adjusted
   180         iFPSText->SetPos(THuiRealPoint(300,20)); // could be adjusted
   171         iFPSText->SetSize(THuiRealSize(50,50));
   181         iFPSText->SetSize(THuiRealSize(50,50));
   172         }
   182         }
   192 	delete iFullscreenEffectControlGroup; 
   202 	delete iFullscreenEffectControlGroup; 
   193 	
   203 	
   194 	// this deletes also control and layout
   204 	// this deletes also control and layout
   195 	delete iFloatingSpriteControlGroup;
   205 	delete iFloatingSpriteControlGroup;
   196 	
   206 	
       
   207 	delete iFpsControlGroup;
       
   208 	
   197 	delete iDisplay;
   209 	delete iDisplay;
   198 	iControlGroups.Close();
   210 	iControlGroups.Close();
   199 	
   211 	
   200 	delete iCoeControl;
   212 	delete iCoeControl;
   201 	
   213 	
   220 TBool CAlfScreen::IsVisualTreeVisibilityChanged()
   232 TBool CAlfScreen::IsVisualTreeVisibilityChanged()
   221     {
   233     {
   222     return iVisualTreeVisibilityChanged;    
   234     return iVisualTreeVisibilityChanged;    
   223     }
   235     }
   224      
   236      
       
   237 // ---------------------------------------------------------------------------
       
   238 // ---------------------------------------------------------------------------
       
   239 // 
       
   240 TInt CAlfScreen::FixedControlGroupCount() const
       
   241     {
       
   242     return !iFpsControlGroup ? 
       
   243         KAlfNumberOfFixedControlGroups :
       
   244         KAlfNumberOfFixedControlGroups + 1;
       
   245     }