os/graphics/windowing/windowserver/test/tauto/TBACKUPW.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
sl@0
     2
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
// All rights reserved.
sl@0
     4
// This component and the accompanying materials are made available
sl@0
     5
// under the terms of "Eclipse Public License v1.0"
sl@0
     6
// which accompanies this distribution, and is available
sl@0
     7
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
//
sl@0
     9
// Initial Contributors:
sl@0
    10
// Nokia Corporation - initial contribution.
sl@0
    11
//
sl@0
    12
// Contributors:
sl@0
    13
//
sl@0
    14
// Description:
sl@0
    15
//
sl@0
    16
sl@0
    17
/**
sl@0
    18
 @file
sl@0
    19
 @test
sl@0
    20
 @internalComponent - Internal Symbian test code
sl@0
    21
*/
sl@0
    22
sl@0
    23
#ifndef __TBACKUPW_H__
sl@0
    24
#define __TBACKUPW_H__
sl@0
    25
sl@0
    26
#include <e32std.h>
sl@0
    27
#include <w32std.h>
sl@0
    28
#include "../tlib/testbase.h"
sl@0
    29
#include <bitstd.h>
sl@0
    30
#include "AUTO.H"
sl@0
    31
#include "TGraphicsHarness.h"
sl@0
    32
sl@0
    33
const TInt KLastSubtest = 13;
sl@0
    34
sl@0
    35
class CTBackedUpWindow : public CTWsGraphicsBase
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
	CTBackedUpWindow(CTestStep* aStep);
sl@0
    39
	~CTBackedUpWindow();
sl@0
    40
	void DoTestL();
sl@0
    41
	void DoSubTestL(TInt iState);
sl@0
    42
	void CheckWindow();
sl@0
    43
	void CheckWindow(CFbsBitmap *aBitmap);
sl@0
    44
	void Draw(TInt aDrawFunc, TAny *aParam);
sl@0
    45
	void Draw(TInt aDrawFunc, TAny *aParam, CBitmapContext *aGc1, CBitmapContext *aGc2);
sl@0
    46
	void DrawWithTwoGcsL();
sl@0
    47
	void ConstructL();
sl@0
    48
	void InvisVis();
sl@0
    49
	void WindowOnTop();
sl@0
    50
	void Resize();
sl@0
    51
	void ChildWindows();
sl@0
    52
	void DupBitmapTestL();
sl@0
    53
	void UpdateBitmapTestL();
sl@0
    54
	void OOML();
sl@0
    55
	void TestPanicsL();
sl@0
    56
	void doGraphicFunctionsL(CBitmapContext *gc,TBool aExtraDrawBitMap);
sl@0
    57
	void AllGraphicFunctionsL(RBlankWindow &aBlank,TBool aExtraDrawBitMap=ETrue);
sl@0
    58
	void AllGraphicFunctionsTestsL();
sl@0
    59
protected:
sl@0
    60
//from 	CTGraphicsStep
sl@0
    61
	virtual void RunTestCaseL(TInt aCurTestCase);
sl@0
    62
private:
sl@0
    63
	TInt iSupState;
sl@0
    64
	TSize iSize;
sl@0
    65
	TPoint iCheckPos;
sl@0
    66
	TPoint iWinPos;
sl@0
    67
	RWindow iCheckWindow;
sl@0
    68
	RBackedUpWindow iBackedUpWindow;
sl@0
    69
	RBlankWindow iOomFrontWindow;
sl@0
    70
	CFbsBitmap iBitmap;
sl@0
    71
	CFbsBitGc *iBitGc;
sl@0
    72
	CFbsDevice *iBitmapDevice;
sl@0
    73
	CFbsBitmap* iTestBitmap;
sl@0
    74
	CFbsBitmap* iMaskBitmap;
sl@0
    75
	};
sl@0
    76
sl@0
    77
LOCAL_D const TPoint moveList[]={TPoint(1,0),TPoint(10,20),TPoint(-50,0),TPoint(30,-1),TPoint(-1000,20)};
sl@0
    78
sl@0
    79
sl@0
    80
sl@0
    81
class CTBackedUpWindowStep : public CTGraphicsStep
sl@0
    82
	{
sl@0
    83
public:
sl@0
    84
	CTBackedUpWindowStep();
sl@0
    85
protected:	
sl@0
    86
	//from CTGraphicsStep
sl@0
    87
	virtual CTGraphicsBase* CreateTestL();
sl@0
    88
	};
sl@0
    89
sl@0
    90
_LIT(KTBackedUpWindowStep,"TBackedUpWindow");
sl@0
    91
sl@0
    92
sl@0
    93
#endif