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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __ANIMATOR_H__
17 #define __ANIMATOR_H__
21 const TUid KAnimatorInterfaceUid = {0x10204F59};
23 class MAnimationDrawer;
25 class TAnimationConfig;
28 Pure virtual base class for animators.
30 Each data type supported by the animation framework is represented by an
31 animator, which handles the data interpretation, timing and control. Each
32 animator is provided in the form of an ECOM plugin.
34 You do not need to instatiate animators in a client application. This is
35 handled by the animation classes.
41 class CAnimator : public CBase
44 // ECOM instatiation and destruction:
45 IMPORT_C static CAnimator* NewL(MAnimationDrawer* aRenderer);
46 IMPORT_C virtual ~CAnimator();
47 /** Starts the animation running.
49 @param aConfig Runtime settings*/
50 virtual void Start(const TAnimationConfig& aConfig) = 0;
51 /** Stops the animation and rewinds it.*/
52 virtual void Stop() = 0;
53 /** Pauses the animation.*/
54 virtual void Pause() = 0;
55 /** Resumes a paused animation.*/
56 virtual void Resume() = 0;
57 /** Puts an animation on hold. */
58 virtual void Hold() = 0;
59 /** Restores a held animation and brings it back into synch. */
60 virtual void Unhold() = 0;
61 /** Receives data from a data provider. The mechanism by which data is
62 actually passed depends on the animation type.
64 @see MAnimationDataProviderObserver
65 @param aEvent The event identifier
66 @param aData A pointer to any data for the event
67 @param aDataSize The length of the data in aData*/
68 virtual void DataEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0;
69 /** Called from the renderer and draws the animation.
70 @param aBitmapContext The context on which the animation will be drawn*/
71 virtual void Draw(CBitmapContext& aBitmapContext) const = 0;
72 /** Called from the renderer and draws the mask for the animation.
73 @param aBitmapContext The context on which the mask will be drawn*/
74 virtual void DrawMask(CBitmapContext& aBitmapContext) const = 0;
76 /** Animator ECOM Plugin identifier */
82 #endif //__ANIMATOR_H__