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