graphicstest/uibench/src/ttranslucent.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     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 __TTRANSLUCENT_H__
       
    23 #define __TTRANSLUCENT_H__
       
    24 
       
    25 #include "te_graphicsperformanceSuiteStepBase.h"
       
    26 #include <w32std.h>
       
    27 #include <test/ttmsgraphicsstep.h>
       
    28 
       
    29 
       
    30 
       
    31 class CTTranslucent : public CTe_graphicsperformanceSuiteStepBase
       
    32 	{
       
    33 public:
       
    34 	CTTranslucent();
       
    35 	~CTTranslucent();
       
    36 		
       
    37 private:
       
    38 	class CWin : public CBase
       
    39 	    {
       
    40 	public:
       
    41 	    CWin(RWsSession& aWsSession, RWindowGroup& aWindowGroup);
       
    42 	    void ConstructL(const TRect& aRect);
       
    43 	    ~CWin();
       
    44 	    
       
    45 	    RWindow& Window();
       
    46 
       
    47 	protected:
       
    48 		RWsSession& iWsSession;
       
    49 		RWindowGroup& iWindowGroup;
       
    50 	    RWindow iWindow;
       
    51 	    TRect iRect;
       
    52 	    };
       
    53 
       
    54 	// From CTestStep
       
    55 	TVerdict doTestStepPreambleL();
       
    56 	TVerdict doTestStepL();
       
    57 
       
    58 	enum TTestCase 
       
    59 		{
       
    60 		EBlankWindows,
       
    61 		ETextWindows,
       
    62 		EEllipseWindows,
       
    63 		EBitmapWindows,
       
    64 		};
       
    65 
       
    66 	void RunTestCaseL(const TDesC& aTestName, TTestCase aTestCase, TInt aHorizontalWindows, TInt aVerticalWindows);
       
    67 	void ConstructWindowsL(TInt aHorizontalWindows, TInt aVerticalWindows);
       
    68 	void DestroyWindows();
       
    69 	void DrawWindowL(CWin* aWindow, const TRect& aRect);
       
    70 
       
    71 private:	
       
    72 	RWsSession iWsSession;
       
    73 	RWindowGroup iWindowGroup;
       
    74 	CWsScreenDevice* iScreen;
       
    75 	CWindowGc* iGc;
       
    76 	TRect iScreenRect;
       
    77 
       
    78 	TTestCase iTestCase;    
       
    79     CWin* iTopWindow;
       
    80     CWin* iBottomWindow;
       
    81 	RPointerArray<CWin> iWindowArray;
       
    82 	CFbsBitmap* iBitmap;
       
    83 	};
       
    84 
       
    85 _LIT(KTTranslucent,"ttranslucent");
       
    86 
       
    87 #endif //__TTRANSLUCENT_H__