os/graphics/windowing/windowserver/test/tauto/TFLICKERFREE.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/TFLICKERFREE.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,84 @@
     1.4 +// Copyright (c) 2007-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 +// Tests the usage of Off-Screen Bitmap
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @test
    1.24 + @internalComponent - Internal Symbian test code
    1.25 +*/
    1.26 +
    1.27 +#ifndef __TFLICKERFREE_H__
    1.28 +#define __TFLICKERFREE_H__
    1.29 +
    1.30 +#include <e32std.h>
    1.31 +#include <w32std.h>
    1.32 +#include "../tlib/testbase.h"
    1.33 +#include "AUTO.H"
    1.34 +#include <e32math.h>    //to include math finction rand()
    1.35 +#include "TGraphicsHarness.h"
    1.36 +
    1.37 +//===================================================
    1.38 +// CBGWin Definition
    1.39 +//===================================================
    1.40 +
    1.41 +class CBGWin : public CTWin
    1.42 +	{
    1.43 +public:
    1.44 +	CBGWin();
    1.45 +	~CBGWin();
    1.46 +	/*Draws and colors the rectagles that are to fill the screen.*/
    1.47 +	void Draw();
    1.48 +	void ConstructWin(TPoint, TSize, TBool);
    1.49 +	void EnableOSBd(TBool);
    1.50 +	};
    1.51 +
    1.52 +
    1.53 +//===================================================
    1.54 +// CFlickerTest Definition
    1.55 +//===================================================
    1.56 +class CTFlickerFree : public CTWsGraphicsBase
    1.57 +	{
    1.58 +public:
    1.59 +	CTFlickerFree(CTestStep* aStep);
    1.60 +	~CTFlickerFree();
    1.61 +	/*Sets the windowing environment,*/
    1.62 +	void ConstructL();
    1.63 +
    1.64 +protected:
    1.65 +//from 	CTGraphicsStep - Calls the flicker-drawing test.
    1.66 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.67 +private:
    1.68 +	/*Starts first with flickering screen and after 4 senconds it
    1.69 +	  switches to flicker free drawing.*/
    1.70 +	void TestFlickering();
    1.71 +
    1.72 +private:
    1.73 +	CBGWin *iBgWin;
    1.74 +	};
    1.75 +
    1.76 +class CTFlickerFreeStep : public CTGraphicsStep
    1.77 +	{
    1.78 +public:
    1.79 +	CTFlickerFreeStep();
    1.80 +protected:
    1.81 +	//from CTGraphicsStep
    1.82 +	virtual CTGraphicsBase* CreateTestL();
    1.83 +	};
    1.84 +
    1.85 +_LIT(KTFlickerFreeStep,"TFlickerFree");
    1.86 +
    1.87 +#endif