os/graphics/windowing/windowserver/test/tauto/TWINDOW.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/TWINDOW.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,149 @@
     1.4 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent - Internal Symbian test code
    1.23 +*/
    1.24 +
    1.25 +#ifndef __TWINDOW_H__
    1.26 +#define __TWINDOW_H__
    1.27 +
    1.28 +#include <e32std.h>
    1.29 +#include <w32std.h>
    1.30 +#include "AUTO.H"
    1.31 +
    1.32 +#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
    1.33 +#include "../nonnga/CLIENT/w32comm.h"
    1.34 +#endif
    1.35 +
    1.36 +#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
    1.37 +#include "../nga/CLIENT/w32comm.h"
    1.38 +#endif
    1.39 +
    1.40 +#include "../tlib/testbase.h"
    1.41 +#include "TGraphicsHarness.h"
    1.42 +
    1.43 +struct TWindowThreadParam
    1.44 +	{
    1.45 +	TInt iCommand;
    1.46 +	TInt iScreenNumber;
    1.47 +	};
    1.48 +
    1.49 +class CWinTestWindow : public CBlankWindow
    1.50 +	{
    1.51 +public:
    1.52 +	CWinTestWindow(TRgb aCol);
    1.53 +	~CWinTestWindow();
    1.54 +	void ConstructL(TPoint pos,TSize size,CTWinBase *parent, CWindowGc &aGc, TInt aDepth);
    1.55 +public:
    1.56 +	CWinTestWindow *iChild;
    1.57 +	};
    1.58 +
    1.59 +class CEvWindowGroup : public CTWindowGroup
    1.60 +	{
    1.61 +public:
    1.62 +	static CEvWindowGroup* NewLC(CTClient* aClient,CTWsGraphicsBase* aTest);
    1.63 +	CEvWindowGroup(CTClient* aClient,CTWsGraphicsBase* aTest);
    1.64 +	void SetExpectedEvent(TInt aType);
    1.65 +	void SendEvent(TInt aType);
    1.66 +	//Virtual functions from CTWindowGroup
    1.67 +	void ConstructL();
    1.68 +	void UserEvent(TInt aEventType);
    1.69 +private:
    1.70 +	CTWsGraphicsBase* iTest;
    1.71 +	TInt iExpectedEvent;
    1.72 +	TBool iExpectingEvent;
    1.73 +	};
    1.74 +
    1.75 +class CTWindowTest : public CTWsGraphicsBase
    1.76 +	{
    1.77 +public:
    1.78 +	enum {EWinTypeFactor=1000};
    1.79 +	enum
    1.80 +		{
    1.81 +		EIdMask=0x0000FFFF,
    1.82 +		EPosMask=0xFFFF0000,
    1.83 +		EPosShift=16
    1.84 +		};
    1.85 +private:
    1.86 +	enum TCorner {ECornerTL,ECornerTR,ECornerBL,ECornerBR};
    1.87 +public:
    1.88 +	CTWindowTest(CTestStep* aStep);
    1.89 +	~CTWindowTest();
    1.90 +	TestState DoTestL();
    1.91 +	void ConstructL();
    1.92 +	void CreateTestWindowL();
    1.93 +	void CheckAndDestroyWindows();
    1.94 +	void DestroyWindowWithActiveGc();
    1.95 +	void DestroyWindowWithActiveGc2L();
    1.96 +	void DrawWindows(CWinTestWindow *aWin);
    1.97 +	void ClearRedraw(RWindow &aWindow, TRgb aRgb);
    1.98 +	void TestInvalidFunctionsL();
    1.99 +	void ShadowAutoClearTest();
   1.100 +	void CreateMegaTree();
   1.101 +	void TiledWindowTestL();
   1.102 +	void TiledWindowTest2L();
   1.103 +	void CornerTests();
   1.104 +	void ColorTestL();
   1.105 +	void TestInvalidFunctions2L();
   1.106 +	void Bug1L();
   1.107 +	void Bug2L();
   1.108 +	void Bug3L();
   1.109 +	void TestDeletedParentPanics1L();
   1.110 +	void TestDeletedParentPanics2L();
   1.111 +	void BackColorBugL();
   1.112 +	void FocusChangedL();
   1.113 +	void FadeRegionsL();
   1.114 +	void FadeRegionsWithRedrawStoringL();
   1.115 +	void EventsToAllL();
   1.116 +	void ErrorCodesL();
   1.117 +	void GroupIdL();
   1.118 +	void doCornerTestsL();
   1.119 +	void doCornerTest(TCornerType aCornerType, TInt aFlags);
   1.120 +	void CheckCorner(TCorner aCorner, const TInt *aInsetList);
   1.121 +	void ShadowTestL();
   1.122 +	void TestWindowDelete();
   1.123 +	void SaturateSendEvent();
   1.124 +	void TestNotSupportedFunctionality();
   1.125 +protected:
   1.126 +//from 	CTGraphicsStep
   1.127 +	virtual void RunTestCaseL(TInt aCurTestCase);
   1.128 +private:
   1.129 +	static TInt MoveGroup(TAny* aParam);
   1.130 +	void DoFadeRegionsL(TBool aRedrawStoring);
   1.131 +private:
   1.132 +	CWinTestWindow *iWin;
   1.133 +	CTBlankWindow *iBlankWin1;
   1.134 +	CTBlankWindow *iBlankWin2;
   1.135 +	CWsScreenDevice *iScreenDev;
   1.136 +	TThreadStartUp iFirstFunction;
   1.137 +	TWindowThreadParam iThreadParam;
   1.138 +	};
   1.139 +
   1.140 +class CTWindowTestStep : public CTGraphicsStep
   1.141 +	{
   1.142 +public:
   1.143 +	CTWindowTestStep();
   1.144 +protected:
   1.145 +	//from CTGraphicsStep
   1.146 +	virtual CTGraphicsBase* CreateTestL();
   1.147 +	};
   1.148 +
   1.149 +_LIT(KTWindowTestStep,"TWindowTest");
   1.150 +
   1.151 +
   1.152 +#endif