sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent - Internal Symbian test code sl@0: */ sl@0: sl@0: #ifndef __TPAN_H__ sl@0: #define __TPAN_H__ sl@0: sl@0: sl@0: #include "te_conestepbase.h" sl@0: sl@0: #include <coecntrl.h> sl@0: #include <eikappui.h> sl@0: sl@0: sl@0: _LIT(KTPan,"tpan"); sl@0: sl@0: sl@0: class CPanAppUi; sl@0: class CPanControl; sl@0: sl@0: sl@0: class CTPan : public CTe_ConeStepBase sl@0: { sl@0: public: sl@0: CTPan(); sl@0: sl@0: private: sl@0: void PanBitmapL(); sl@0: sl@0: // from CTestStep sl@0: virtual TVerdict doTestStepPreambleL(); sl@0: virtual TVerdict doTestStepL(); sl@0: virtual TVerdict doTestStepPostambleL(); sl@0: sl@0: // from CTe_graphicsperformanceSuiteStepBase sl@0: virtual void InitUIL(CCoeEnv* aCoeEnv); sl@0: sl@0: private: sl@0: RSemaphore iSemaphore; // used to wait for font control to finish drawing sl@0: CPanAppUi* iAppUi; sl@0: }; sl@0: sl@0: sl@0: class CPanAppUi : public CEikAppUi sl@0: { sl@0: public: sl@0: CPanAppUi(); sl@0: ~CPanAppUi(); sl@0: void ConstructL(const TRect& aRect); sl@0: CPanControl* PanControl(); sl@0: sl@0: private: sl@0: CPanControl* iPanControl; sl@0: }; sl@0: sl@0: sl@0: class CPanControl : public CCoeControl sl@0: { sl@0: public: sl@0: static CPanControl* NewL(const TRect& aRect, const CCoeControl* aParent = NULL); sl@0: static CPanControl* NewLC(const TRect& aRect, const CCoeControl* aParent = NULL); sl@0: virtual ~CPanControl(); sl@0: TInt Iterations(); sl@0: CFbsBitmap* Bitmap(); sl@0: sl@0: private: sl@0: CPanControl(); sl@0: void ConstructL(const TRect& aRect, const CCoeControl* aParent); sl@0: sl@0: // from CCoeControl sl@0: void Draw(const TRect& aRect) const; sl@0: void HandlePointerEventL(const TPointerEvent& aPointerEvent); sl@0: sl@0: private: sl@0: RSemaphore iSemaphore; // handle to a Semaphore which is owned by the test step sl@0: // The pixel position of the most recent PointerEvent sl@0: TPoint iCurrentPointerPos; sl@0: CFbsBitmap* iSourceBitmap; sl@0: TInt iIterations; sl@0: RWsSession& iWsSession; sl@0: }; sl@0: sl@0: #endif