equal
deleted
inserted
replaced
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
23 #define TRENDERORIENTATION_H |
23 #define TRENDERORIENTATION_H |
24 |
24 |
25 #include <e32property.h> |
25 #include <e32property.h> |
26 #include "te_graphicsperformanceSuiteStepBase.h" |
26 #include "te_graphicsperformanceSuiteStepBase.h" |
27 |
27 |
28 class CWindowStuff : public CBase |
28 /** |
|
29 CTWindowSet contains a window server session, a group window and a child window. |
|
30 */ |
|
31 class CTWindowSet : public CBase |
29 { |
32 { |
30 public: |
33 public: |
31 ~CWindowStuff(); |
34 ~CTWindowSet(); |
32 void ConstructL(); |
35 void ConstructL(); |
33 void Destroy(); |
36 void Destroy(); |
34 |
37 |
35 inline RWsSession& Session() |
38 inline RWsSession& Session() |
36 {return iWs;}; |
39 {return iWs;}; |
41 RWsSession iWs; |
44 RWsSession iWs; |
42 RWindowGroup iWindowGroup; |
45 RWindowGroup iWindowGroup; |
43 RWindow iChildWindow; |
46 RWindow iChildWindow; |
44 }; |
47 }; |
45 |
48 |
|
49 /** |
|
50 Test case to test the performance of various use cases which affect the render orientation RProperty |
|
51 */ |
46 class CTRenderOrientation : public CTe_graphicsperformanceSuiteStepBase |
52 class CTRenderOrientation : public CTe_graphicsperformanceSuiteStepBase |
47 { |
53 { |
48 public: |
54 public: |
49 CTRenderOrientation(); |
55 CTRenderOrientation(); |
50 ~CTRenderOrientation(); |
56 ~CTRenderOrientation(); |
54 virtual TVerdict doTestStepPostambleL(); |
60 virtual TVerdict doTestStepPostambleL(); |
55 |
61 |
56 virtual TVerdict doTestStepL(); |
62 virtual TVerdict doTestStepL(); |
57 |
63 |
58 private: |
64 private: |
59 enum TWindowThing |
65 enum TWindowSet |
60 { |
66 { |
61 // One per orientation |
67 // One per orientation |
62 EFirstWindowThing, |
68 EFirstWindowSet, |
63 ESecondWindowThing, |
69 ESecondWindowSet, |
64 EThirdWindowThing, |
70 EThirdWindowSet, |
65 EFourthWindowThing, |
71 EFourthWindowSet, |
66 |
72 |
67 ENumWindowThings |
73 ENumWindowSets |
68 }; |
74 }; |
69 |
75 |
70 enum TTestPhase |
76 enum TTestPhase |
71 { |
77 { |
72 EIndicatedOrientationChange, |
78 EIndicatedOrientationChange, // window indicates a new render orientation |
73 EWindowOrdinalChange, |
79 EWindowOrdinalChange, // window order changed, render orientation dictated by a different window with a different orientation |
74 EThemeOrientationChange, |
80 EThemeOrientationChange, // theme orientation changed, render orienation dictated by this due to relevant window being set to EDisplayOrientationAuto |
|
81 EThemeOrientationChangeOnly, // theme orientation change only, to compare timings to above |
75 |
82 |
76 ENumTestPhases |
83 ENumTestPhases |
77 }; |
84 }; |
78 |
85 |
79 void TestOrientationChangeL(const TDesC& aStepName, TTestPhase aTestPhase); |
86 void TestOrientationChangeL(const TDesC& aStepName, TTestPhase aTestPhase); |
82 TRenderOrientation GetThemeOrientationL(); |
89 TRenderOrientation GetThemeOrientationL(); |
83 TRenderOrientation GetOrientationL(RProperty& aProperty); |
90 TRenderOrientation GetOrientationL(RProperty& aProperty); |
84 void ThemeServerProperty(const TDesC& aCmd); |
91 void ThemeServerProperty(const TDesC& aCmd); |
85 |
92 |
86 private: |
93 private: |
87 CWindowStuff iWindowStuff[ENumWindowThings]; |
94 CTWindowSet iWindowSet[ENumWindowSets]; |
88 RProperty iWsRenderOrientationProperty; |
95 RProperty iWsRenderOrientationProperty; |
89 RProperty iThemeOrientationProperty; |
96 RProperty iThemeOrientationProperty; |
90 |
97 |
91 RTimer iTimeoutTimer; |
98 RTimer iTimeoutTimer; |
92 TRequestStatus iTimeoutStatus; |
99 TRequestStatus iTimeoutStatus; |
93 TRequestStatus iRenderOrientationStatus; |
100 TRequestStatus iOrientationStatus; |
94 TInt iTimingsTaken; |
101 TInt iTimingsTaken; |
95 }; |
102 }; |
96 |
103 |
97 _LIT(KTRenderOrientation,"trenderorientation"); |
104 _LIT(KTRenderOrientation,"trenderorientation"); |
98 |
105 |