os/graphics/windowing/windowserver/test/tauto/TSCRMODE.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/TSCRMODE.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,128 @@
     1.4 +
     1.5 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +/**
    1.21 + @file
    1.22 + @test
    1.23 + @internalComponent - Internal Symbian test code
    1.24 +*/
    1.25 +
    1.26 +#ifndef __TSCRMODE_H__
    1.27 +#define __TSCRMODE_H__
    1.28 +
    1.29 +#include <e32std.h>
    1.30 +#include <w32std.h>
    1.31 +#include "../tlib/testbase.h"
    1.32 +#include "AUTO.H"
    1.33 +#include "TGraphicsHarness.h"
    1.34 +
    1.35 +class CSecondConnection;
    1.36 +
    1.37 +class CSecondConnectionGroup : public CTWindowGroup
    1.38 +	{
    1.39 +public:
    1.40 +	CSecondConnectionGroup(CTClient *aClient, CSecondConnection *aSecondConnection, CTestBase *aTest, CTestStep* aTestStep);
    1.41 +	void ScreenDeviceChanged();
    1.42 +private:
    1.43 +	CTestBase *iTest;
    1.44 +	CSecondConnection *iSecondConnection;
    1.45 +	CTestStep* iTestStep;
    1.46 +	};
    1.47 +
    1.48 +class CSecondConnection : public CBase
    1.49 +	{
    1.50 +public:
    1.51 +	~CSecondConnection();
    1.52 +	void ConstructL(TInt aScreenNumber,const TRect &aWinRect, CTestBase *aTest, CTestStep* aTestStep);
    1.53 +	void EnableMessages();
    1.54 +	void DisableMessages();
    1.55 +	TInt DeviceMessageCount() const;
    1.56 +	void ScreenDeviceChanged();
    1.57 +	void SetWindow2Visibility(TBool aVisible);
    1.58 +public:
    1.59 +	CSecondConnectionGroup *iGroup;
    1.60 +private:
    1.61 +	CTClient *iClient;
    1.62 +	CTBlankWindow *iWindow;
    1.63 +	CTBlankWindow *iWindow2;
    1.64 +	TInt iMessageCount;
    1.65 +	};
    1.66 +	
    1.67 +class SecondClientConnection : public CTClient
    1.68 +	{
    1.69 +public:
    1.70 +	SecondClientConnection();
    1.71 +	~SecondClientConnection();
    1.72 +	void ConstructL(TInt aScreenMode, const TPixelsTwipsAndRotation &aSizeAndRotation);
    1.73 +	};
    1.74 +
    1.75 +class CTScrMode : public CTWsGraphicsBase
    1.76 +	{
    1.77 +public:
    1.78 +	CTScrMode(CTestStep* aStep);
    1.79 +	~CTScrMode();
    1.80 +protected:
    1.81 +//from 	CTGraphicsStep
    1.82 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.83 +private:
    1.84 +	void ConstructL();
    1.85 +	void doMoveWindowTest();
    1.86 +	TBool MoveWindow();
    1.87 +	void TestPanicsL();
    1.88 +	void ScaledDrawingL();
    1.89 +	void SetScreenModeEnforcement(TScreenModeEnforcement aMode);
    1.90 +	void CheckWindows(TBool aWinIsVis);
    1.91 +	void ValidateWin(TestWindow *aWin, TRgb aColor);
    1.92 +	void RedrawWin(RWindow &aWin, TRgb aColor);
    1.93 +	void ScreenRotationsL();
    1.94 +	void MoreScreenRotationsL();
    1.95 +	TBool RectClearBugL();
    1.96 +	void ScreenModeChange1L();
    1.97 +	void ScreenModeChange2L();
    1.98 +	TInt FindCurrentMode();
    1.99 +	TBool Equal(const TPixelsTwipsAndRotation& aLeft,const TPixelsTwipsAndRotation& aRight);
   1.100 +	void InvisibleWndAndInfiniteRedrawBugL();
   1.101 +	void GetScreenDisplayMode();
   1.102 +	void SetScreenModeAfterScreenDeviceDeletedL();
   1.103 +	void TestRotateAndScreenModeL();
   1.104 +private:
   1.105 +	void DrawTestBmpL(CFbsBitmap* aTestBitmap);
   1.106 +	void TestDrawingToWindows(CWindowGc* aWinGc1, CWindowGc* aWinGc2, RWindow& aWindow1,RWindow& aWindow2,CFbsBitmap* aBitmap64K,CFbsBitmap* aBitmap16M,CFbsFont* aFont,TBool aAllInRedraw, TBool aUseSystemGc, TBool aUseBmp16M);
   1.107 +private:
   1.108 +	TInt iSubState;
   1.109 +	CSecondConnection *iSecondConnection;
   1.110 +	TSize iWinSize;
   1.111 +	TPoint iWinPos;
   1.112 +	TInt iWinState;
   1.113 +	TScreenModeEnforcement iOldEnfMode;
   1.114 +	TScreenModeEnforcement iCurEnforcement;
   1.115 +	};
   1.116 +
   1.117 +
   1.118 +	
   1.119 +class CTScrModeStep : public CTGraphicsStep
   1.120 +	{
   1.121 +public:
   1.122 +	CTScrModeStep();
   1.123 +protected:	
   1.124 +	//from CTGraphicsStep
   1.125 +	virtual CTGraphicsBase* CreateTestL();
   1.126 +	};
   1.127 +
   1.128 +_LIT(KTScrModeStep,"TScrMode");
   1.129 +
   1.130 +
   1.131 +#endif