sl@0: sl@0: // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent - Internal Symbian test code sl@0: */ sl@0: sl@0: #ifndef __TSCRMODE_H__ sl@0: #define __TSCRMODE_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include "../tlib/testbase.h" sl@0: #include "AUTO.H" sl@0: #include "TGraphicsHarness.h" sl@0: sl@0: class CSecondConnection; sl@0: sl@0: class CSecondConnectionGroup : public CTWindowGroup sl@0: { sl@0: public: sl@0: CSecondConnectionGroup(CTClient *aClient, CSecondConnection *aSecondConnection, CTestBase *aTest, CTestStep* aTestStep); sl@0: void ScreenDeviceChanged(); sl@0: private: sl@0: CTestBase *iTest; sl@0: CSecondConnection *iSecondConnection; sl@0: CTestStep* iTestStep; sl@0: }; sl@0: sl@0: class CSecondConnection : public CBase sl@0: { sl@0: public: sl@0: ~CSecondConnection(); sl@0: void ConstructL(TInt aScreenNumber,const TRect &aWinRect, CTestBase *aTest, CTestStep* aTestStep); sl@0: void EnableMessages(); sl@0: void DisableMessages(); sl@0: TInt DeviceMessageCount() const; sl@0: void ScreenDeviceChanged(); sl@0: void SetWindow2Visibility(TBool aVisible); sl@0: public: sl@0: CSecondConnectionGroup *iGroup; sl@0: private: sl@0: CTClient *iClient; sl@0: CTBlankWindow *iWindow; sl@0: CTBlankWindow *iWindow2; sl@0: TInt iMessageCount; sl@0: }; sl@0: sl@0: class SecondClientConnection : public CTClient sl@0: { sl@0: public: sl@0: SecondClientConnection(); sl@0: ~SecondClientConnection(); sl@0: void ConstructL(TInt aScreenMode, const TPixelsTwipsAndRotation &aSizeAndRotation); sl@0: }; sl@0: sl@0: class CTScrMode : public CTWsGraphicsBase sl@0: { sl@0: public: sl@0: CTScrMode(CTestStep* aStep); sl@0: ~CTScrMode(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual void RunTestCaseL(TInt aCurTestCase); sl@0: private: sl@0: void ConstructL(); sl@0: void doMoveWindowTest(); sl@0: TBool MoveWindow(); sl@0: void TestPanicsL(); sl@0: void ScaledDrawingL(); sl@0: void SetScreenModeEnforcement(TScreenModeEnforcement aMode); sl@0: void CheckWindows(TBool aWinIsVis); sl@0: void ValidateWin(TestWindow *aWin, TRgb aColor); sl@0: void RedrawWin(RWindow &aWin, TRgb aColor); sl@0: void ScreenRotationsL(); sl@0: void MoreScreenRotationsL(); sl@0: TBool RectClearBugL(); sl@0: void ScreenModeChange1L(); sl@0: void ScreenModeChange2L(); sl@0: TInt FindCurrentMode(); sl@0: TBool Equal(const TPixelsTwipsAndRotation& aLeft,const TPixelsTwipsAndRotation& aRight); sl@0: void InvisibleWndAndInfiniteRedrawBugL(); sl@0: void GetScreenDisplayMode(); sl@0: void SetScreenModeAfterScreenDeviceDeletedL(); sl@0: void TestRotateAndScreenModeL(); sl@0: private: sl@0: void DrawTestBmpL(CFbsBitmap* aTestBitmap); sl@0: void TestDrawingToWindows(CWindowGc* aWinGc1, CWindowGc* aWinGc2, RWindow& aWindow1,RWindow& aWindow2,CFbsBitmap* aBitmap64K,CFbsBitmap* aBitmap16M,CFbsFont* aFont,TBool aAllInRedraw, TBool aUseSystemGc, TBool aUseBmp16M); sl@0: private: sl@0: TInt iSubState; sl@0: CSecondConnection *iSecondConnection; sl@0: TSize iWinSize; sl@0: TPoint iWinPos; sl@0: TInt iWinState; sl@0: TScreenModeEnforcement iOldEnfMode; sl@0: TScreenModeEnforcement iCurEnforcement; sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTScrModeStep : public CTGraphicsStep sl@0: { sl@0: public: sl@0: CTScrModeStep(); sl@0: protected: sl@0: //from CTGraphicsStep sl@0: virtual CTGraphicsBase* CreateTestL(); sl@0: }; sl@0: sl@0: _LIT(KTScrModeStep,"TScrMode"); sl@0: sl@0: sl@0: #endif