sl@0: // Copyright (c) 2005-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 __TSCALE_H__ sl@0: #define __TSCALE_H__ sl@0: sl@0: sl@0: #include "te_conestepbase.h" sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: class CScaleAppUi; sl@0: sl@0: sl@0: class CTScale : public CTe_ConeStepBase sl@0: { sl@0: public: sl@0: CTScale(); sl@0: sl@0: private: 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: CScaleAppUi* iAppUi; sl@0: }; sl@0: sl@0: _LIT(KTScale,"tscale"); sl@0: sl@0: sl@0: class CScaleControl : public CCoeControl sl@0: { sl@0: public: sl@0: static CScaleControl* NewL(const TRect& aRect,const CCoeControl* aParent=NULL); sl@0: static CScaleControl* NewLC(const TRect& aRect,const CCoeControl* aParent=NULL); sl@0: ~CScaleControl(); sl@0: TInt Iterations(); sl@0: sl@0: // from CCoeControl sl@0: void HandlePointerEventL(const TPointerEvent& aPointerEvent); sl@0: sl@0: private: sl@0: CScaleControl(); sl@0: void ConstructL(const TRect& aRect,const CCoeControl* aParent = NULL); sl@0: sl@0: // from CCoeControl sl@0: void Draw(const TRect& aRect) const; sl@0: sl@0: private: sl@0: RSemaphore iSemaphore; // handle to a Semaphore which is owned by the test step sl@0: // The current zoom rectangle into the image sl@0: TRect iSourceRect; sl@0: // The pixel position of the most recent PointerEvent sl@0: TPoint iCurrentPointerPos; sl@0: CFbsBitmap* iSourceBitmap; sl@0: TReal iSourceRatio; sl@0: TInt iIterations; sl@0: RWsSession& iWsSession; sl@0: }; sl@0: sl@0: class CScaleAppUi : public CEikAppUi sl@0: { sl@0: public: sl@0: CScaleAppUi(); sl@0: ~CScaleAppUi(); sl@0: void ConstructL(); sl@0: CScaleControl* ScaleControl(); sl@0: sl@0: private: sl@0: CScaleControl* iScale; sl@0: }; sl@0: sl@0: #endif