|
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 @internalComponent - Internal Symbian test code |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __TSYNCH_H__ |
|
23 #define __TSYNCH_H__ |
|
24 |
|
25 #include "AnimationTestStep.h" |
|
26 |
|
27 #include <f32file.h> |
|
28 #include <test/testexecutestepbase.h> |
|
29 |
|
30 #include "TestWindows.h" |
|
31 #include "BasicAnimation.h" |
|
32 #include "SpriteAnimation.h" |
|
33 #include "AnimationGroup.h" |
|
34 #include "ICLAnimationDataProvider.h" |
|
35 |
|
36 _LIT(KSynchStep, "Synch"); |
|
37 |
|
38 // |
|
39 // Windows: |
|
40 // |
|
41 class CSynchAnimationWindow : public CTestWindow |
|
42 { |
|
43 public: |
|
44 CSynchAnimationWindow(RWsSession& aWs, CTestWindowGroup& aGroup, CWindowGc& aGc); |
|
45 void DrawL(); |
|
46 void SetAnimations(RPointerArray<CAnimation>* aAnimations); |
|
47 protected: |
|
48 RPointerArray<CAnimation>* iAnimations; |
|
49 }; |
|
50 |
|
51 // |
|
52 // The test: |
|
53 // |
|
54 class CSynch : public CAnimationTestStep |
|
55 { |
|
56 public: |
|
57 CSynch(); |
|
58 ~CSynch(); |
|
59 |
|
60 // From CActiveTestStep: |
|
61 virtual TVerdict doActiveTestStepL(); |
|
62 protected: |
|
63 void InitialiseL(); |
|
64 void StartStopL(const TAnimationConfig& aConfig, TInt aPeriod=5000000); |
|
65 void TestLoopsForeverL(); |
|
66 void TestLoopsNumberedL(); |
|
67 void TestNotLoopedL(); |
|
68 void TestControlL(); |
|
69 void TestMovingL(); |
|
70 void LoadBasicAnimationsL(); |
|
71 void LoadSpriteAnimationsL(); |
|
72 void UnloadAnimations(); |
|
73 protected: |
|
74 RPointerArray<CAnimation> iAnimations; |
|
75 CAnimationGroup* iAnimationGroup; |
|
76 |
|
77 TInt iExtraColors; |
|
78 TSize iWinSize; |
|
79 TPoint iWinPosition; |
|
80 TRect iWinRect; |
|
81 CSynchAnimationWindow* iWin; |
|
82 }; |
|
83 |
|
84 #endif // __TSYNCH_H__ |