williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __ANIMATIONTICKER_H__ williamr@2: #define __ANIMATIONTICKER_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class MAnimationTickee; williamr@2: williamr@2: /** This provides timing information for animators. williamr@2: williamr@2: You do not need to instantiate an object of this type unless you are writing a williamr@2: new animation type. williamr@2: williamr@2: @see MAnimationTickee williamr@2: @see CAnimationTls williamr@2: @publishedAll williamr@2: @released*/ williamr@2: NONSHARABLE_CLASS(CAnimationTicker) : public CBase williamr@2: { williamr@2: public: williamr@2: IMPORT_C static CAnimationTicker* NewL(TTimeIntervalMicroSeconds32 aTickLength = 100000); williamr@2: IMPORT_C ~CAnimationTicker(); williamr@2: williamr@2: IMPORT_C TInt Add(MAnimationTickee* aTickee); williamr@2: IMPORT_C TInt Remove(MAnimationTickee* aTickee); williamr@2: IMPORT_C void Freeze(); williamr@2: IMPORT_C void Unfreeze(); williamr@2: williamr@2: /** This provides the resolution of the timer. williamr@2: @return iTickLength The resolution of the timer */ williamr@2: inline const TTimeIntervalMicroSeconds32& TickLength() const { return iTickLength; } williamr@2: void OnTick(); williamr@2: protected: williamr@2: IMPORT_C virtual void CAnimationTicker_Reserved1(); williamr@2: IMPORT_C virtual void CAnimationTicker_Reserved2(); williamr@2: private: williamr@2: TInt iCAnimationTicker_Reserved; williamr@2: private: williamr@2: CAnimationTicker(); williamr@2: void ConstructL(TTimeIntervalMicroSeconds32 aTickLength); williamr@2: void StartTickingL(); williamr@2: void StopTicking(); williamr@2: private: williamr@2: TInt iFreeze; williamr@2: TTimeIntervalMicroSeconds32 iTickLength; williamr@2: CPeriodic* iPeriodic; williamr@2: RPointerArray iTickees; williamr@2: }; williamr@2: williamr@2: #endif //__ANIMATIONTICKER_H__