First public contribution.
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".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
20 @internalComponent - Internal Symbian test code
23 #ifndef __TSCRMODE_H__
24 #define __TSCRMODE_H__
28 #include "../tlib/testbase.h"
30 #include "TGraphicsHarness.h"
32 class CSecondConnection;
34 class CSecondConnectionGroup : public CTWindowGroup
37 CSecondConnectionGroup(CTClient *aClient, CSecondConnection *aSecondConnection, CTestBase *aTest, CTestStep* aTestStep);
38 void ScreenDeviceChanged();
41 CSecondConnection *iSecondConnection;
45 class CSecondConnection : public CBase
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);
56 CSecondConnectionGroup *iGroup;
59 CTBlankWindow *iWindow;
60 CTBlankWindow *iWindow2;
64 class SecondClientConnection : public CTClient
67 SecondClientConnection();
68 ~SecondClientConnection();
69 void ConstructL(TInt aScreenMode, const TPixelsTwipsAndRotation &aSizeAndRotation);
72 class CTScrMode : public CTWsGraphicsBase
75 CTScrMode(CTestStep* aStep);
79 virtual void RunTestCaseL(TInt aCurTestCase);
82 void doMoveWindowTest();
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();
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);
106 CSecondConnection *iSecondConnection;
110 TScreenModeEnforcement iOldEnfMode;
111 TScreenModeEnforcement iCurEnforcement;
116 class CTScrModeStep : public CTGraphicsStep
121 //from CTGraphicsStep
122 virtual CTGraphicsBase* CreateTestL();
125 _LIT(KTScrModeStep,"TScrMode");