Update contrib.
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This material, including documentation and any related
4 // computer programs, is protected by copyright controlled by
5 // Nokia. All rights are reserved. Copying, including
6 // reproducing, storing, adapting or translating, any
7 // or all of this material requires the prior written consent of
8 // Nokia. This material also contains confidential
9 // information which may not be disclosed to others without the
10 // prior written consent of Nokia.
13 // Render Orientation Tracking and Publication
16 #ifndef renderorientationtracker_h
17 #define renderorientationtracker_h
21 #include <e32property.h>
23 #include <wspublishandsubscribedata.h>
25 // Values for the device orientation that we receive via P&S from the Theme Server
26 // Todo FIX THIS Category UID!!!
27 const TUid KThemeOrientationCategory = {0x20022E82}; // == KHbPsHardwareCoarseOrientationCategoryUid
28 const TUint KThemeOrientationKey = 0x4F726965; // == KHbPsHardwareCoarseOrientationKey
30 typedef TRenderOrientation TRenderOrientationTrackingType;
34 class CWsRenderOrienationTracker : public CActive
37 static CWsRenderOrienationTracker* NewL();
38 ~CWsRenderOrienationTracker();
40 void CheckRenderOrientation();
43 CWsRenderOrienationTracker();
46 void RequestDeviceOrientationNotification();
47 void CancelDeviceOrientationNotification();
53 TInt DoOrientationTracking();
54 TInt GetThemeOrientation(TRenderOrientation& aThemeOrientation);
55 TInt PublishOrientation(const TRenderOrientation aRenderOrientation);
56 TInt DoPublishOrientation(const TRenderOrientation aRenderOrientation);
57 TInt GetIndicatedOrientation(TRenderOrientationTrackingType& aOrientationTrackingType);
58 TInt CheckWindowGroupOrientation(const CWsWindowGroup& aWinGroup, TRenderOrientationTrackingType& aOrientationTrackingType);
59 TBool UseableGroupWindow(const CWsWindowGroup& aWinGroup) const;
60 TInt GetFocusWindowOrientation(TRenderOrientationTrackingType& aOrientationTrackingType);
61 TInt FindOrientationFromWindowTree(TRenderOrientationTrackingType& aOrientationTrackingType);
62 void SetHALOrientation(const TRenderOrientation aRenderOrientation);
65 TRenderOrientationTrackingType iRenderOrientationTrackingType;
66 TRenderOrientation iPublishedRenderOrientation;
67 RProperty iThemeOrientationProperty;
68 RProperty iRenderOrientationPublisher;