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