windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP
changeset 152 9f1c3fea0f87
parent 36 01a6848ebfd7
--- a/windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP	Tue Jul 06 15:45:57 2010 +0300
+++ b/windowing/windowserver/nga/SERVER/openwfc/WSTOP.CPP	Wed Aug 18 11:05:09 2010 +0300
@@ -32,7 +32,7 @@
 #include "pointer.h"
 #include "WSGRAPHICDRAWERFACTORY.H"
 #include "redrawmsgwindow.h"
-#include <Graphics/WSGRAPHICDRAWERINTERFACE.H>
+#include <graphics/WSGRAPHICDRAWERINTERFACE.H>
 #include "WsMemMgr.h"
 #include "backedupwindow.h"
 #include "wsfont.h"
@@ -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__)