os/graphics/windowing/windowserver/test/tauto/TAUTODLL.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/TAUTODLL.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,162 @@
     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 __TAUTODLL_H__
    1.26 +#define __TAUTODLL_H__
    1.27 +
    1.28 +#include <e32std.h>
    1.29 +#include <w32std.h>
    1.30 +#include "../tlib/testbase.h"
    1.31 +#include "AUTO.H"
    1.32 +#include "TGraphicsHarness.h"
    1.33 +
    1.34 +
    1.35 +#include <w32adll.h>
    1.36 +#include "AUTODLL.H"
    1.37 +
    1.38 +#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
    1.39 +#include "../nonnga/CLIENT/w32comm.h"
    1.40 +#endif
    1.41 +
    1.42 +#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
    1.43 +#include "../nga/CLIENT/w32comm.h"
    1.44 +#endif
    1.45 +
    1.46 +#include "tdirecta.h"
    1.47 +
    1.48 +
    1.49 +class CAnimWindow;
    1.50 +
    1.51 +class CAnimRedrawWindow : public CTWin
    1.52 +	{
    1.53 +public:
    1.54 +	CAnimRedrawWindow(CAnimWindow *aAnimWindow, TBool aIsBase);
    1.55 +	~CAnimRedrawWindow();
    1.56 +	void Draw();
    1.57 +private:
    1.58 +	CAnimWindow *iAnimWindow;
    1.59 +	TBool iIsBase;
    1.60 +	};
    1.61 +
    1.62 +class CAnimWindow : public CBase
    1.63 +	{
    1.64 +	friend class CTAnimDll;
    1.65 +	friend class CAnimRedrawWindow;
    1.66 +public:
    1.67 +	enum TWinType
    1.68 +		{
    1.69 +		ERedraw,
    1.70 +		EBlank,
    1.71 +		EBackedUp,
    1.72 +		};
    1.73 +public:
    1.74 +	CAnimWindow(TBool aIsBase, TWinType aWinType);
    1.75 +	~CAnimWindow();
    1.76 +	void ConstructL(const TPoint &aPos, const TSize &aSize);
    1.77 +	void SetRect(const TRect &aRect);
    1.78 +	static void Draw(CBitmapContext *aGc, const TSize &aSize, TBool aIsBase,const TRect &aRect, TBool aBlankIt);
    1.79 +	static void DrawEllipse(CBitmapContext *aGc, const TRect &aRect);
    1.80 +	void DoDraw(TBool aBlankIt=EFalse);
    1.81 +	void DoDrawEllipse();
    1.82 +	void DoDrawCoverage();
    1.83 +	TSize Size();
    1.84 +	RWindowBase *BaseWin() const;
    1.85 +	CTBaseWin *CtBaseWin();
    1.86 +	void Invalidate();
    1.87 +	void Invalidate(const TRect &aRect);
    1.88 +	static void SetEllipseDrawMode(CGraphicsContext::TDrawMode aEllipseDrawMode);
    1.89 +	void DrawTestScreen(CFbsBitmap *aBitmap, CFbsBitmap *aMaskBitmap, CFbsFont *aFont);
    1.90 +protected:
    1.91 +	CTBaseWin *iCtWin;
    1.92 +	TWinType iWinType;
    1.93 +	TBool iIsBase;
    1.94 +	TRect iRect;
    1.95 +	static CGraphicsContext::TDrawMode iEllipseDrawMode;
    1.96 +	};
    1.97 +
    1.98 +
    1.99 +
   1.100 +class CTAnimDll : public CTWsGraphicsBase
   1.101 +	{
   1.102 +public:
   1.103 +	CTAnimDll(CTestStep* aStep);
   1.104 +	~CTAnimDll();
   1.105 +	void ConstructL();
   1.106 +
   1.107 +	void TestPanicsL();
   1.108 +	void RemoteBuffer();
   1.109 +	void Misc();
   1.110 +	void ExtraCopyTest();
   1.111 +	void SyncMode1();
   1.112 +	void TestSyncModes(MAnimGeneralFunctions::TAnimSync aSyncMode);
   1.113 +	void TestTimeChange();
   1.114 +	void TestLoadApiL();
   1.115 +	void KeyClickPriorityL();
   1.116 +protected:	//Pure virtual from MTestCases
   1.117 +	void RunTestCaseL(TInt aCurTestCase);
   1.118 +private:
   1.119 +	void InvalidatePauseAndRedraw(const TRect &aRect,TTimeIntervalMicroSeconds32 aInterval);	
   1.120 +	void RedrawAndCheckWindows(TBool aBlankIt=EFalse);
   1.121 +	void SetUpMember(TSpriteMember &aMember,TInt aType);
   1.122 +	void DrawingTestL();
   1.123 +	void ShadowDrawingTestL();
   1.124 +	void GeneralDrawingTestL();
   1.125 +	void CheckWindows();
   1.126 +	void DestroyWindowTestL();
   1.127 +	void SpriteAnimL();
   1.128 +	void FreeTimerL();
   1.129 +	void DisableTimerL();
   1.130 +	void MultipleAnimsL();
   1.131 +	void ClickPlugInL();
   1.132 +	void WinFunctionsL();
   1.133 +	void WinFunctions2L();
   1.134 +	void TestNotificationsL();
   1.135 +	void TestCoverageL();
   1.136 +	void TestPanicCoverageL();
   1.137 +	void TestWindowInfo(RTestAnim& aAnim,TInt aScreen,TInt aPos,TInt aId);
   1.138 +	void TestEventHandlerRemovalL();
   1.139 +	void ParameterValueTestL();
   1.140 +	void TestSetIntervalL();
   1.141 +	TInt CheckError(TInt aError,TInt aExpected);
   1.142 +	TRgb PixelColour(const TPoint& aPoint) const;
   1.143 +private:
   1.144 +	RAnimDll iAnimDll;
   1.145 +	TSize iWinSize;
   1.146 +	CAnimWindow *iTestWin;
   1.147 +	CAnimWindow *iRedrawWin;
   1.148 +	CAnimWindow *iBaseWin;
   1.149 +	CAnimWindow *iBackedUpTestWin;
   1.150 +	CAnimWindow *iBlankTestWin;
   1.151 +	};
   1.152 +
   1.153 +class CTAnimDllStep : public CTGraphicsStep
   1.154 +	{
   1.155 +public:
   1.156 +	CTAnimDllStep();
   1.157 +protected:
   1.158 +	//from CTGraphicsStep
   1.159 +	virtual CTGraphicsBase* CreateTestL();
   1.160 +	};
   1.161 +
   1.162 +_LIT(KTAnimDllStep,"TAnimDll");
   1.163 +
   1.164 +
   1.165 +#endif