|
1 // Copyright (c) 2004-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 __ANIMATIONTICKER_H__ |
|
17 #define __ANIMATIONTICKER_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 class MAnimationTickee; |
|
22 |
|
23 /** This provides timing information for animators. |
|
24 |
|
25 You do not need to instantiate an object of this type unless you are writing a |
|
26 new animation type. |
|
27 |
|
28 @see MAnimationTickee |
|
29 @see CAnimationTls |
|
30 @publishedAll |
|
31 @released*/ |
|
32 NONSHARABLE_CLASS(CAnimationTicker) : public CBase |
|
33 { |
|
34 public: |
|
35 IMPORT_C static CAnimationTicker* NewL(TTimeIntervalMicroSeconds32 aTickLength = 100000); |
|
36 IMPORT_C ~CAnimationTicker(); |
|
37 |
|
38 IMPORT_C TInt Add(MAnimationTickee* aTickee); |
|
39 IMPORT_C TInt Remove(MAnimationTickee* aTickee); |
|
40 IMPORT_C void Freeze(); |
|
41 IMPORT_C void Unfreeze(); |
|
42 |
|
43 /** This provides the resolution of the timer. |
|
44 @return iTickLength The resolution of the timer */ |
|
45 inline const TTimeIntervalMicroSeconds32& TickLength() const { return iTickLength; } |
|
46 void OnTick(); |
|
47 protected: |
|
48 IMPORT_C virtual void CAnimationTicker_Reserved1(); |
|
49 IMPORT_C virtual void CAnimationTicker_Reserved2(); |
|
50 private: |
|
51 TInt iCAnimationTicker_Reserved; |
|
52 private: |
|
53 CAnimationTicker(); |
|
54 void ConstructL(TTimeIntervalMicroSeconds32 aTickLength); |
|
55 void StartTickingL(); |
|
56 void StopTicking(); |
|
57 private: |
|
58 TInt iFreeze; |
|
59 TTimeIntervalMicroSeconds32 iTickLength; |
|
60 CPeriodic* iPeriodic; |
|
61 RPointerArray<MAnimationTickee> iTickees; |
|
62 }; |
|
63 |
|
64 #endif //__ANIMATIONTICKER_H__ |