windowing/windowserver/tauto/TFLICKERFREE.H
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Tests the usage of Off-Screen Bitmap
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @test
       
    21  @internalComponent - Internal Symbian test code
       
    22 */
       
    23 
       
    24 #ifndef __TFLICKERFREE_H__
       
    25 #define __TFLICKERFREE_H__
       
    26 
       
    27 #include <e32std.h>
       
    28 #include <w32std.h>
       
    29 #include "../tlib/testbase.h"
       
    30 #include "AUTO.H"
       
    31 #include <e32math.h>    //to include math finction rand()
       
    32 #include "TGraphicsHarness.h"
       
    33 
       
    34 //===================================================
       
    35 // CBGWin Definition
       
    36 //===================================================
       
    37 
       
    38 class CBGWin : public CTWin
       
    39 	{
       
    40 public:
       
    41 	CBGWin();
       
    42 	~CBGWin();
       
    43 	/*Draws and colors the rectagles that are to fill the screen.*/
       
    44 	void Draw();
       
    45 	void ConstructWin(TPoint, TSize, TBool);
       
    46 	void EnableOSBd(TBool);
       
    47 	};
       
    48 
       
    49 
       
    50 //===================================================
       
    51 // CFlickerTest Definition
       
    52 //===================================================
       
    53 class CTFlickerFree : public CTWsGraphicsBase
       
    54 	{
       
    55 public:
       
    56 	CTFlickerFree(CTestStep* aStep);
       
    57 	~CTFlickerFree();
       
    58 	/*Sets the windowing environment,*/
       
    59 	void ConstructL();
       
    60 
       
    61 protected:
       
    62 //from 	CTGraphicsStep - Calls the flicker-drawing test.
       
    63 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    64 private:
       
    65 	/*Starts first with flickering screen and after 4 senconds it
       
    66 	  switches to flicker free drawing.*/
       
    67 	void TestFlickering();
       
    68 
       
    69 private:
       
    70 	CBGWin *iBgWin;
       
    71 	};
       
    72 
       
    73 class CTFlickerFreeStep : public CTGraphicsStep
       
    74 	{
       
    75 public:
       
    76 	CTFlickerFreeStep();
       
    77 protected:
       
    78 	//from CTGraphicsStep
       
    79 	virtual CTGraphicsBase* CreateTestL();
       
    80 	};
       
    81 
       
    82 _LIT(KTFlickerFreeStep,"TFlickerFree");
       
    83 
       
    84 #endif