windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP
changeset 188 1b081cb0800b
parent 36 01a6848ebfd7
equal deleted inserted replaced
187:9f66f99ee56f 188:1b081cb0800b
    44 #endif
    44 #endif
    45 
    45 
    46 #include "registeredsurfacemap.h"
    46 #include "registeredsurfacemap.h"
    47 #include "windowelementset.h"
    47 #include "windowelementset.h"
    48 #include "wspluginmanager.h"
    48 #include "wspluginmanager.h"
       
    49 #include "renderorientationtracker.h"
    49 
    50 
    50 // IDs of p&s properties that optionally contain callbacks that may be used
    51 // IDs of p&s properties that optionally contain callbacks that may be used
    51 // to release singletons owned by libraries at shutdown in order to make 
    52 // to release singletons owned by libraries at shutdown in order to make 
    52 // the memory leak tests work.
    53 // the memory leak tests work.
    53 // By convention, the ID is the same as the UID3 of the libary.
    54 // By convention, the ID is the same as the UID3 of the libary.
   207 const CWsClient* CWsTop::iTriggerHeapCheckOnClientExit=NULL;
   208 const CWsClient* CWsTop::iTriggerHeapCheckOnClientExit=NULL;
   208 TWsCheckHeapOnDisconnectMode CWsTop::iHeapCheckMode=EWsCheckHeapOnDisconnectModeNone;
   209 TWsCheckHeapOnDisconnectMode CWsTop::iHeapCheckMode=EWsCheckHeapOnDisconnectModeNone;
   209 TInt CWsTop::iCheckHeapResult=KErrNotReady;
   210 TInt CWsTop::iCheckHeapResult=KErrNotReady;
   210 TBool CWsTop::iDoHeapCheckAndRestart=EFalse;
   211 TBool CWsTop::iDoHeapCheckAndRestart=EFalse;
   211 #define RFbsSession_SendCommand_ShutDownMessage 1	// A FBS message that is not published yet and probably never will be.
   212 #define RFbsSession_SendCommand_ShutDownMessage 1	// A FBS message that is not published yet and probably never will be.
       
   213 CWsRenderOrienationTracker* CWsTop::iRenderOrientationTracker=NULL;
   212 
   214 
   213 static void DefineSingletonKey(const TUid& aSingletonKey)
   215 static void DefineSingletonKey(const TUid& aSingletonKey)
   214 /**
   216 /**
   215  * Defines a new property for a singleton key. WServ must only process 
   217  * Defines a new property for a singleton key. WServ must only process 
   216  * singleton keys that it created to prevent a malicious process with the 
   218  * singleton keys that it created to prevent a malicious process with the 
   279     }
   281     }
   280 
   282 
   281 void CWsTop::DeleteStaticsL()
   283 void CWsTop::DeleteStaticsL()
   282 	{
   284 	{
   283 	iShuttingDown=ETrue;
   285 	iShuttingDown=ETrue;
       
   286 	delete iRenderOrientationTracker;	
       
   287 	
   284 	CClick::DeleteStatics();
   288 	CClick::DeleteStatics();
   285 	TWsPointer::Stop();
   289 	TWsPointer::Stop();
   286 	CWsClient::DeleteStatics();
   290 	CWsClient::DeleteStatics();
   287 //
   291 //
   288 	delete iShellStarter;
   292 	delete iShellStarter;
   551 	if(startShell)
   555 	if(startShell)
   552 		{
   556 		{
   553 		StartShell();
   557 		StartShell();
   554 		}
   558 		}
   555 	UserSvr::WsRegisterSwitchOnScreenHandling(ETrue);
   559 	UserSvr::WsRegisterSwitchOnScreenHandling(ETrue);
       
   560 	
       
   561 	iRenderOrientationTracker = CWsRenderOrienationTracker::NewL();	
   556 	}
   562 	}
   557 
   563 
   558 
   564 
   559 void CWsTop::InitScreenL( TInt aScreenNumber)  // static
   565 void CWsTop::InitScreenL( TInt aScreenNumber)  // static
   560 	{
   566 	{
   956 			}
   962 			}
   957 		}
   963 		}
   958 	return EFalse;
   964 	return EFalse;
   959 	}
   965 	}
   960 
   966 
       
   967 /**
       
   968 Checks to see if the render orientation has changed, and publishes any new orientaion
       
   969 via publish and subscribe
       
   970 
       
   971 @see KRenderOrientationCategory
       
   972 @see KRenderOrientationKey 
       
   973 */
       
   974 void CWsTop::CheckRenderOrientation()
       
   975     {
       
   976     iRenderOrientationTracker->CheckRenderOrientation();
       
   977     }
       
   978 
   961 typedef TInt (*ShellEntryPoint)(TAny *);
   979 typedef TInt (*ShellEntryPoint)(TAny *);
   962 
   980 
   963 #if defined(__WINS__)
   981 #if defined(__WINS__)
   964 LOCAL_D const TUint KHeapSize=0x10000;
   982 LOCAL_D const TUint KHeapSize=0x10000;
   965 LOCAL_D const TUint KMaxHeapSize=0x400000;
   983 LOCAL_D const TUint KMaxHeapSize=0x400000;