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