windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP
changeset 188 1b081cb0800b
parent 36 01a6848ebfd7
--- a/windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP	Fri Sep 24 16:14:28 2010 +0300
+++ b/windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP	Fri Sep 24 16:44:34 2010 +0300
@@ -46,6 +46,7 @@
 #include "registeredsurfacemap.h"
 #include "windowelementset.h"
 #include "wspluginmanager.h"
+#include "renderorientationtracker.h"
 
 // IDs of p&s properties that optionally contain callbacks that may be used
 // to release singletons owned by libraries at shutdown in order to make 
@@ -209,6 +210,7 @@
 TInt CWsTop::iCheckHeapResult=KErrNotReady;
 TBool CWsTop::iDoHeapCheckAndRestart=EFalse;
 #define RFbsSession_SendCommand_ShutDownMessage 1	// A FBS message that is not published yet and probably never will be.
+CWsRenderOrienationTracker* CWsTop::iRenderOrientationTracker=NULL;
 
 static void DefineSingletonKey(const TUid& aSingletonKey)
 /**
@@ -281,6 +283,8 @@
 void CWsTop::DeleteStaticsL()
 	{
 	iShuttingDown=ETrue;
+	delete iRenderOrientationTracker;	
+	
 	CClick::DeleteStatics();
 	TWsPointer::Stop();
 	CWsClient::DeleteStatics();
@@ -553,6 +557,8 @@
 		StartShell();
 		}
 	UserSvr::WsRegisterSwitchOnScreenHandling(ETrue);
+	
+	iRenderOrientationTracker = CWsRenderOrienationTracker::NewL();	
 	}
 
 
@@ -958,6 +964,18 @@
 	return EFalse;
 	}
 
+/**
+Checks to see if the render orientation has changed, and publishes any new orientaion
+via publish and subscribe
+
+@see KRenderOrientationCategory
+@see KRenderOrientationKey 
+*/
+void CWsTop::CheckRenderOrientation()
+    {
+    iRenderOrientationTracker->CheckRenderOrientation();
+    }
+
 typedef TInt (*ShellEntryPoint)(TAny *);
 
 #if defined(__WINS__)