|
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 #ifndef ANIMPROC_H |
|
17 #define ANIMPROC_H |
|
18 |
|
19 // INCLUDES |
|
20 #include <e32std.h> |
|
21 #include <e32base.h> |
|
22 #include "T_TestAnimDll.h" |
|
23 #include "badesca.h" |
|
24 #include "e32cmn.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 #define KAnimTimeSize 3 |
|
28 |
|
29 |
|
30 |
|
31 typedef RArray<TInt> RIntArray; |
|
32 |
|
33 /** |
|
34 * CAnimProc |
|
35 * |
|
36 */ |
|
37 class CAnimProc |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 CAnimProc(CTestAnimDll* aDll,TInt aType); |
|
42 virtual ~CAnimProc(); |
|
43 |
|
44 TInt CmdReply(MAnimGeneralFunctions* pFunc, TInt aOpcode, TAny *aArgs); |
|
45 |
|
46 |
|
47 TInt ConstructWinL(TAny *aArgs,MAnimGeneralFunctions* pFunc); |
|
48 |
|
49 TInt WriteLog(const TDesC& aInfo); |
|
50 TInt WriteLog(const TDesC8& aInfo); |
|
51 protected: |
|
52 |
|
53 CDesCArray* ProcParamLC(const TDesC8& param); |
|
54 void ConvertParam(TDes8& buf,TAny *aArgs); |
|
55 TInt GetIntFromStr(const TDesC& str,RIntArray& ary); |
|
56 |
|
57 void RecordAnimTime(); |
|
58 |
|
59 void RecordLastCmd(TInt cmd); |
|
60 void RecordLastCmd(TInt cmd,const TDesC8& str); |
|
61 void RecordLastCmd(const TDesC8& str); |
|
62 |
|
63 TInt64 iAnimTime[KAnimTimeSize]; // last time of Animate |
|
64 |
|
65 |
|
66 TPoint iNewPoint; // The square's current position |
|
67 TPoint iLastPoint; // The square's last position |
|
68 |
|
69 TInt iStepX; // move step of x-coordinate |
|
70 TInt iStepY; // move step of y-coordinate |
|
71 |
|
72 TSize iSize; // The square's size |
|
73 |
|
74 TRect iScreenSize; // The screen size |
|
75 |
|
76 TInt iDrawType; // draw type |
|
77 |
|
78 TSize iPenSize; // pen size |
|
79 |
|
80 TBool iDrawn; // Has the animation been drawn |
|
81 |
|
82 TRgb iColor; // draw color |
|
83 |
|
84 CTestAnimDll* iDll; // anim dll |
|
85 |
|
86 RBuf iLastCommand; // store last command & parameter |
|
87 |
|
88 TInt iAnimType; // animation type |
|
89 }; |
|
90 |
|
91 #endif // ANIMPROC_H |
|
92 |