os/graphics/graphicstest/uibench/s60/src/tests_pan/tpan.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicstest/uibench/s60/src/tests_pan/tpan.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,100 @@
     1.4 +// Copyright (c) 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 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent - Internal Symbian test code 
    1.23 +*/
    1.24 +
    1.25 +#ifndef __TPAN_H__
    1.26 +#define __TPAN_H__
    1.27 +
    1.28 +
    1.29 +#include "te_conestepbase.h"
    1.30 +
    1.31 +#include <coecntrl.h> 
    1.32 +#include <eikappui.h>
    1.33 +
    1.34 +
    1.35 +_LIT(KTPan,"tpan");
    1.36 +
    1.37 +
    1.38 +class CPanAppUi;
    1.39 +class CPanControl;
    1.40 +
    1.41 +
    1.42 +class CTPan : public CTe_ConeStepBase
    1.43 +	{
    1.44 +public:
    1.45 +	CTPan();
    1.46 +
    1.47 +private:
    1.48 +    void PanBitmapL();
    1.49 +    
    1.50 +	// from CTestStep
    1.51 +    virtual TVerdict doTestStepPreambleL();
    1.52 +	virtual TVerdict doTestStepL();
    1.53 +	virtual TVerdict doTestStepPostambleL();
    1.54 +	
    1.55 +	// from CTe_graphicsperformanceSuiteStepBase
    1.56 +	virtual void InitUIL(CCoeEnv* aCoeEnv);
    1.57 +	
    1.58 +private:
    1.59 +    RSemaphore iSemaphore; // used to wait for font control to finish drawing
    1.60 +    CPanAppUi*  iAppUi;
    1.61 +	};
    1.62 +
    1.63 +
    1.64 +class CPanAppUi : public CEikAppUi 
    1.65 +    {
    1.66 +public:
    1.67 +    CPanAppUi();
    1.68 +    ~CPanAppUi();
    1.69 +    void ConstructL(const TRect& aRect);
    1.70 +    CPanControl* PanControl();
    1.71 +    
    1.72 +private:
    1.73 +    CPanControl* iPanControl;
    1.74 +    };
    1.75 +
    1.76 +
    1.77 +class CPanControl : public CCoeControl
    1.78 +	{	
    1.79 +public:
    1.80 +    static CPanControl* NewL(const TRect& aRect, const CCoeControl* aParent = NULL);
    1.81 +    static CPanControl* NewLC(const TRect& aRect, const CCoeControl* aParent = NULL);
    1.82 +    virtual ~CPanControl();
    1.83 +    TInt Iterations();
    1.84 +    CFbsBitmap* Bitmap();
    1.85 +
    1.86 +private: 
    1.87 +	CPanControl();
    1.88 +    void ConstructL(const TRect& aRect, const CCoeControl* aParent);
    1.89 +    
    1.90 +    // from CCoeControl
    1.91 +    void Draw(const TRect& aRect) const;
    1.92 +    void HandlePointerEventL(const TPointerEvent& aPointerEvent);
    1.93 +    
    1.94 +private:
    1.95 +    RSemaphore iSemaphore; // handle to a Semaphore which is owned by the test step
    1.96 +	// The pixel position of the most recent PointerEvent
    1.97 +	TPoint iCurrentPointerPos;	
    1.98 +	CFbsBitmap* iSourceBitmap;
    1.99 +	TInt iIterations;
   1.100 +	RWsSession& iWsSession;
   1.101 +	};
   1.102 +
   1.103 +#endif