os/graphics/windowing/windowserver/test/tauto/TAUTODLL.H
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @test
sl@0
    19
 @internalComponent - Internal Symbian test code
sl@0
    20
*/
sl@0
    21
sl@0
    22
#ifndef __TAUTODLL_H__
sl@0
    23
#define __TAUTODLL_H__
sl@0
    24
sl@0
    25
#include <e32std.h>
sl@0
    26
#include <w32std.h>
sl@0
    27
#include "../tlib/testbase.h"
sl@0
    28
#include "AUTO.H"
sl@0
    29
#include "TGraphicsHarness.h"
sl@0
    30
sl@0
    31
sl@0
    32
#include <w32adll.h>
sl@0
    33
#include "AUTODLL.H"
sl@0
    34
sl@0
    35
#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
sl@0
    36
#include "../nonnga/CLIENT/w32comm.h"
sl@0
    37
#endif
sl@0
    38
sl@0
    39
#ifdef TEST_GRAPHICS_WSERV_TAUTOSERVER_NGA
sl@0
    40
#include "../nga/CLIENT/w32comm.h"
sl@0
    41
#endif
sl@0
    42
sl@0
    43
#include "tdirecta.h"
sl@0
    44
sl@0
    45
sl@0
    46
class CAnimWindow;
sl@0
    47
sl@0
    48
class CAnimRedrawWindow : public CTWin
sl@0
    49
	{
sl@0
    50
public:
sl@0
    51
	CAnimRedrawWindow(CAnimWindow *aAnimWindow, TBool aIsBase);
sl@0
    52
	~CAnimRedrawWindow();
sl@0
    53
	void Draw();
sl@0
    54
private:
sl@0
    55
	CAnimWindow *iAnimWindow;
sl@0
    56
	TBool iIsBase;
sl@0
    57
	};
sl@0
    58
sl@0
    59
class CAnimWindow : public CBase
sl@0
    60
	{
sl@0
    61
	friend class CTAnimDll;
sl@0
    62
	friend class CAnimRedrawWindow;
sl@0
    63
public:
sl@0
    64
	enum TWinType
sl@0
    65
		{
sl@0
    66
		ERedraw,
sl@0
    67
		EBlank,
sl@0
    68
		EBackedUp,
sl@0
    69
		};
sl@0
    70
public:
sl@0
    71
	CAnimWindow(TBool aIsBase, TWinType aWinType);
sl@0
    72
	~CAnimWindow();
sl@0
    73
	void ConstructL(const TPoint &aPos, const TSize &aSize);
sl@0
    74
	void SetRect(const TRect &aRect);
sl@0
    75
	static void Draw(CBitmapContext *aGc, const TSize &aSize, TBool aIsBase,const TRect &aRect, TBool aBlankIt);
sl@0
    76
	static void DrawEllipse(CBitmapContext *aGc, const TRect &aRect);
sl@0
    77
	void DoDraw(TBool aBlankIt=EFalse);
sl@0
    78
	void DoDrawEllipse();
sl@0
    79
	void DoDrawCoverage();
sl@0
    80
	TSize Size();
sl@0
    81
	RWindowBase *BaseWin() const;
sl@0
    82
	CTBaseWin *CtBaseWin();
sl@0
    83
	void Invalidate();
sl@0
    84
	void Invalidate(const TRect &aRect);
sl@0
    85
	static void SetEllipseDrawMode(CGraphicsContext::TDrawMode aEllipseDrawMode);
sl@0
    86
	void DrawTestScreen(CFbsBitmap *aBitmap, CFbsBitmap *aMaskBitmap, CFbsFont *aFont);
sl@0
    87
protected:
sl@0
    88
	CTBaseWin *iCtWin;
sl@0
    89
	TWinType iWinType;
sl@0
    90
	TBool iIsBase;
sl@0
    91
	TRect iRect;
sl@0
    92
	static CGraphicsContext::TDrawMode iEllipseDrawMode;
sl@0
    93
	};
sl@0
    94
sl@0
    95
sl@0
    96
sl@0
    97
class CTAnimDll : public CTWsGraphicsBase
sl@0
    98
	{
sl@0
    99
public:
sl@0
   100
	CTAnimDll(CTestStep* aStep);
sl@0
   101
	~CTAnimDll();
sl@0
   102
	void ConstructL();
sl@0
   103
sl@0
   104
	void TestPanicsL();
sl@0
   105
	void RemoteBuffer();
sl@0
   106
	void Misc();
sl@0
   107
	void ExtraCopyTest();
sl@0
   108
	void SyncMode1();
sl@0
   109
	void TestSyncModes(MAnimGeneralFunctions::TAnimSync aSyncMode);
sl@0
   110
	void TestTimeChange();
sl@0
   111
	void TestLoadApiL();
sl@0
   112
	void KeyClickPriorityL();
sl@0
   113
protected:	//Pure virtual from MTestCases
sl@0
   114
	void RunTestCaseL(TInt aCurTestCase);
sl@0
   115
private:
sl@0
   116
	void InvalidatePauseAndRedraw(const TRect &aRect,TTimeIntervalMicroSeconds32 aInterval);	
sl@0
   117
	void RedrawAndCheckWindows(TBool aBlankIt=EFalse);
sl@0
   118
	void SetUpMember(TSpriteMember &aMember,TInt aType);
sl@0
   119
	void DrawingTestL();
sl@0
   120
	void ShadowDrawingTestL();
sl@0
   121
	void GeneralDrawingTestL();
sl@0
   122
	void CheckWindows();
sl@0
   123
	void DestroyWindowTestL();
sl@0
   124
	void SpriteAnimL();
sl@0
   125
	void FreeTimerL();
sl@0
   126
	void DisableTimerL();
sl@0
   127
	void MultipleAnimsL();
sl@0
   128
	void ClickPlugInL();
sl@0
   129
	void WinFunctionsL();
sl@0
   130
	void WinFunctions2L();
sl@0
   131
	void TestNotificationsL();
sl@0
   132
	void TestCoverageL();
sl@0
   133
	void TestPanicCoverageL();
sl@0
   134
	void TestWindowInfo(RTestAnim& aAnim,TInt aScreen,TInt aPos,TInt aId);
sl@0
   135
	void TestEventHandlerRemovalL();
sl@0
   136
	void ParameterValueTestL();
sl@0
   137
	void TestSetIntervalL();
sl@0
   138
	TInt CheckError(TInt aError,TInt aExpected);
sl@0
   139
	TRgb PixelColour(const TPoint& aPoint) const;
sl@0
   140
private:
sl@0
   141
	RAnimDll iAnimDll;
sl@0
   142
	TSize iWinSize;
sl@0
   143
	CAnimWindow *iTestWin;
sl@0
   144
	CAnimWindow *iRedrawWin;
sl@0
   145
	CAnimWindow *iBaseWin;
sl@0
   146
	CAnimWindow *iBackedUpTestWin;
sl@0
   147
	CAnimWindow *iBlankTestWin;
sl@0
   148
	};
sl@0
   149
sl@0
   150
class CTAnimDllStep : public CTGraphicsStep
sl@0
   151
	{
sl@0
   152
public:
sl@0
   153
	CTAnimDllStep();
sl@0
   154
protected:
sl@0
   155
	//from CTGraphicsStep
sl@0
   156
	virtual CTGraphicsBase* CreateTestL();
sl@0
   157
	};
sl@0
   158
sl@0
   159
_LIT(KTAnimDllStep,"TAnimDll");
sl@0
   160
sl@0
   161
sl@0
   162
#endif