windowing/windowserver/tauto/tdirecta2.h
changeset 110 7f25ef56562d
parent 98 bf7481649c98
child 111 29ddb8a72f0e
equal deleted inserted replaced
98:bf7481649c98 110:7f25ef56562d
     1 // Copyright (c) 2008-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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code
       
    20 */
       
    21 
       
    22 #ifndef __TDIRECTA2_H__
       
    23 #define __TDIRECTA2_H__
       
    24 
       
    25 #include "AUTO.H"
       
    26 #include "TGraphicsHarness.h"
       
    27 
       
    28 // This DSA test code only works when run using a screen that supports transparency.
       
    29 class CTDirect2 : public CTWsGraphicsBase, public MDirectScreenAccess
       
    30 	{
       
    31 public:
       
    32 	CTDirect2(CTestStep* aStep);
       
    33 	~CTDirect2();
       
    34 	void ConstructL();
       
    35 
       
    36 	static TInt Timeout(TAny* aAbortTest);
       
    37 
       
    38 	// from MAbortDirectScreenAccess
       
    39 	void AbortNow(RDirectScreenAccess::TTerminationReasons aReason);
       
    40 	// from MDirectScreenAccess
       
    41 	void Restart(RDirectScreenAccess::TTerminationReasons aReason);
       
    42 
       
    43 protected:
       
    44 	//from CTGraphicsStep
       
    45 	void RunTestCaseL(TInt aCurTestCase);
       
    46 
       
    47 private:
       
    48 	void StartTranslucentWindowOverDsaL();
       
    49 	void HandleTimeout();
       
    50 
       
    51 private:
       
    52 	CWsScreenDevice* iScreenDevice;
       
    53 	CTWindowGroup* iWindowGroup;
       
    54 	CTBlankWindow* iUnderWindow; // window to perform DSA on
       
    55 	CTTitledWindow* iOverWindow; // translucent window to overlap DSA window
       
    56 	CDirectScreenAccess* iDsa;
       
    57 	CPeriodic* iTimer;
       
    58 	TBool iTestCaseComplete;
       
    59 	TBool iOnceOnly;
       
    60 	};
       
    61 
       
    62 class CTDirect2Step : public CTGraphicsStep
       
    63 	{
       
    64 public:
       
    65 	CTDirect2Step();
       
    66 protected:
       
    67 	//from CTGraphicsStep
       
    68 	virtual CTGraphicsBase* CreateTestL();
       
    69 	};
       
    70 
       
    71 _LIT(KTDirect2Step,"TDirect2");
       
    72 
       
    73 #endif