|
1 // Copyright (c) 2005-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 __TSCALE_H__ |
|
23 #define __TSCALE_H__ |
|
24 |
|
25 |
|
26 #include "te_conestepbase.h" |
|
27 |
|
28 #include <coecntrl.h> |
|
29 #include <coeaui.h> |
|
30 #include <eikappui.h> |
|
31 |
|
32 |
|
33 class CScaleAppUi; |
|
34 |
|
35 |
|
36 class CTScale : public CTe_ConeStepBase |
|
37 { |
|
38 public: |
|
39 CTScale(); |
|
40 |
|
41 private: |
|
42 // From CTestStep |
|
43 virtual TVerdict doTestStepPreambleL(); |
|
44 virtual TVerdict doTestStepL(); |
|
45 virtual TVerdict doTestStepPostambleL(); |
|
46 |
|
47 // from CTe_graphicsperformanceSuiteStepBase |
|
48 virtual void InitUIL(CCoeEnv* aCoeEnv); |
|
49 |
|
50 private: |
|
51 RSemaphore iSemaphore; // used to wait for font control to finish drawing |
|
52 CScaleAppUi* iAppUi; |
|
53 }; |
|
54 |
|
55 _LIT(KTScale,"tscale"); |
|
56 |
|
57 |
|
58 class CScaleControl : public CCoeControl |
|
59 { |
|
60 public: |
|
61 static CScaleControl* NewL(const TRect& aRect,const CCoeControl* aParent=NULL); |
|
62 static CScaleControl* NewLC(const TRect& aRect,const CCoeControl* aParent=NULL); |
|
63 ~CScaleControl(); |
|
64 TInt Iterations(); |
|
65 |
|
66 // from CCoeControl |
|
67 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
68 |
|
69 private: |
|
70 CScaleControl(); |
|
71 void ConstructL(const TRect& aRect,const CCoeControl* aParent = NULL); |
|
72 |
|
73 // from CCoeControl |
|
74 void Draw(const TRect& aRect) const; |
|
75 |
|
76 private: |
|
77 RSemaphore iSemaphore; // handle to a Semaphore which is owned by the test step |
|
78 // The current zoom rectangle into the image |
|
79 TRect iSourceRect; |
|
80 // The pixel position of the most recent PointerEvent |
|
81 TPoint iCurrentPointerPos; |
|
82 CFbsBitmap* iSourceBitmap; |
|
83 TReal iSourceRatio; |
|
84 TInt iIterations; |
|
85 RWsSession& iWsSession; |
|
86 }; |
|
87 |
|
88 class CScaleAppUi : public CEikAppUi |
|
89 { |
|
90 public: |
|
91 CScaleAppUi(); |
|
92 ~CScaleAppUi(); |
|
93 void ConstructL(); |
|
94 CScaleControl* ScaleControl(); |
|
95 |
|
96 private: |
|
97 CScaleControl* iScale; |
|
98 }; |
|
99 |
|
100 #endif |