|
1 |
|
2 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 |
|
17 /** |
|
18 @file |
|
19 @test |
|
20 @internalComponent - Internal Symbian test code |
|
21 */ |
|
22 |
|
23 #ifndef __TSCRMODE_H__ |
|
24 #define __TSCRMODE_H__ |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <w32std.h> |
|
28 #include "../tlib/testbase.h" |
|
29 #include "AUTO.H" |
|
30 #include "TGraphicsHarness.h" |
|
31 |
|
32 class CSecondConnection; |
|
33 |
|
34 class CSecondConnectionGroup : public CTWindowGroup |
|
35 { |
|
36 public: |
|
37 CSecondConnectionGroup(CTClient *aClient, CSecondConnection *aSecondConnection, CTestBase *aTest, CTestStep* aTestStep); |
|
38 void ScreenDeviceChanged(); |
|
39 private: |
|
40 CTestBase *iTest; |
|
41 CSecondConnection *iSecondConnection; |
|
42 CTestStep* iTestStep; |
|
43 }; |
|
44 |
|
45 class CSecondConnection : public CBase |
|
46 { |
|
47 public: |
|
48 ~CSecondConnection(); |
|
49 void ConstructL(TInt aScreenNumber,const TRect &aWinRect, CTestBase *aTest, CTestStep* aTestStep); |
|
50 void EnableMessages(); |
|
51 void DisableMessages(); |
|
52 TInt DeviceMessageCount() const; |
|
53 void ScreenDeviceChanged(); |
|
54 void SetWindow2Visibility(TBool aVisible); |
|
55 public: |
|
56 CSecondConnectionGroup *iGroup; |
|
57 private: |
|
58 CTClient *iClient; |
|
59 CTBlankWindow *iWindow; |
|
60 CTBlankWindow *iWindow2; |
|
61 TInt iMessageCount; |
|
62 }; |
|
63 |
|
64 class SecondClientConnection : public CTClient |
|
65 { |
|
66 public: |
|
67 SecondClientConnection(); |
|
68 ~SecondClientConnection(); |
|
69 void ConstructL(TInt aScreenMode, const TPixelsTwipsAndRotation &aSizeAndRotation); |
|
70 }; |
|
71 |
|
72 class CTScrMode : public CTWsGraphicsBase |
|
73 { |
|
74 public: |
|
75 CTScrMode(CTestStep* aStep); |
|
76 ~CTScrMode(); |
|
77 protected: |
|
78 //from CTGraphicsStep |
|
79 virtual void RunTestCaseL(TInt aCurTestCase); |
|
80 private: |
|
81 void ConstructL(); |
|
82 void doMoveWindowTest(); |
|
83 TBool MoveWindow(); |
|
84 void TestPanicsL(); |
|
85 void ScaledDrawingL(); |
|
86 void SetScreenModeEnforcement(TScreenModeEnforcement aMode); |
|
87 void CheckWindows(TBool aWinIsVis); |
|
88 void ValidateWin(TestWindow *aWin, TRgb aColor); |
|
89 void RedrawWin(RWindow &aWin, TRgb aColor); |
|
90 void ScreenRotationsL(); |
|
91 void MoreScreenRotationsL(); |
|
92 TBool RectClearBugL(); |
|
93 void ScreenModeChange1L(); |
|
94 void ScreenModeChange2L(); |
|
95 TInt FindCurrentMode(); |
|
96 TBool Equal(const TPixelsTwipsAndRotation& aLeft,const TPixelsTwipsAndRotation& aRight); |
|
97 void InvisibleWndAndInfiniteRedrawBugL(); |
|
98 void GetScreenDisplayMode(); |
|
99 void SetScreenModeAfterScreenDeviceDeletedL(); |
|
100 void TestRotateAndScreenModeL(); |
|
101 private: |
|
102 void DrawTestBmpL(CFbsBitmap* aTestBitmap); |
|
103 void TestDrawingToWindows(CWindowGc* aWinGc1, CWindowGc* aWinGc2, RWindow& aWindow1,RWindow& aWindow2,CFbsBitmap* aBitmap64K,CFbsBitmap* aBitmap16M,CFbsFont* aFont,TBool aAllInRedraw, TBool aUseSystemGc, TBool aUseBmp16M); |
|
104 private: |
|
105 TInt iSubState; |
|
106 CSecondConnection *iSecondConnection; |
|
107 TSize iWinSize; |
|
108 TPoint iWinPos; |
|
109 TInt iWinState; |
|
110 TScreenModeEnforcement iOldEnfMode; |
|
111 TScreenModeEnforcement iCurEnforcement; |
|
112 }; |
|
113 |
|
114 |
|
115 |
|
116 class CTScrModeStep : public CTGraphicsStep |
|
117 { |
|
118 public: |
|
119 CTScrModeStep(); |
|
120 protected: |
|
121 //from CTGraphicsStep |
|
122 virtual CTGraphicsBase* CreateTestL(); |
|
123 }; |
|
124 |
|
125 _LIT(KTScrModeStep,"TScrMode"); |
|
126 |
|
127 |
|
128 #endif |