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 __ANIMATOR_H__ williamr@2: #define __ANIMATOR_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: const TUid KAnimatorInterfaceUid = {0x10204F59}; williamr@2: williamr@2: class MAnimationDrawer; williamr@2: class CBitmapContext; williamr@2: class TAnimationConfig; williamr@2: williamr@2: /** williamr@2: Pure virtual base class for animators. williamr@2: williamr@2: Each data type supported by the animation framework is represented by an williamr@2: animator, which handles the data interpretation, timing and control. Each williamr@2: animator is provided in the form of an ECOM plugin. williamr@2: williamr@2: You do not need to instatiate animators in a client application. This is williamr@2: handled by the animation classes. williamr@2: williamr@2: @see CAnimation williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: class CAnimator : public CBase williamr@2: { williamr@2: public: williamr@2: // ECOM instatiation and destruction: williamr@2: IMPORT_C static CAnimator* NewL(MAnimationDrawer* aRenderer); williamr@2: IMPORT_C virtual ~CAnimator(); williamr@2: /** Starts the animation running. williamr@2: @see TAnimationConfig williamr@2: @param aConfig Runtime settings*/ williamr@2: virtual void Start(const TAnimationConfig& aConfig) = 0; williamr@2: /** Stops the animation and rewinds it.*/ williamr@2: virtual void Stop() = 0; williamr@2: /** Pauses the animation.*/ williamr@2: virtual void Pause() = 0; williamr@2: /** Resumes a paused animation.*/ williamr@2: virtual void Resume() = 0; williamr@2: /** Puts an animation on hold. */ williamr@2: virtual void Hold() = 0; williamr@2: /** Restores a held animation and brings it back into synch. */ williamr@2: virtual void Unhold() = 0; williamr@2: /** Receives data from a data provider. The mechanism by which data is williamr@2: actually passed depends on the animation type. williamr@2: williamr@2: @see MAnimationDataProviderObserver williamr@2: @param aEvent The event identifier williamr@2: @param aData A pointer to any data for the event williamr@2: @param aDataSize The length of the data in aData*/ williamr@2: virtual void DataEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0; williamr@2: /** Called from the renderer and draws the animation. williamr@2: @param aBitmapContext The context on which the animation will be drawn*/ williamr@2: virtual void Draw(CBitmapContext& aBitmapContext) const = 0; williamr@2: /** Called from the renderer and draws the mask for the animation. williamr@2: @param aBitmapContext The context on which the mask will be drawn*/ williamr@2: virtual void DrawMask(CBitmapContext& aBitmapContext) const = 0; williamr@2: protected: williamr@2: /** Animator ECOM Plugin identifier */ williamr@2: TUid iDtor_ID_Key; williamr@2: /** Data */ williamr@2: TInt iLoop; williamr@2: }; williamr@2: williamr@2: #endif //__ANIMATOR_H__