epoc32/include/mw/animator.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 __ANIMATOR_H__
    17 #define __ANIMATOR_H__
    18 
    19 #include <e32base.h>
    20 
    21 const TUid KAnimatorInterfaceUid = {0x10204F59};
    22 
    23 class MAnimationDrawer;
    24 class CBitmapContext;
    25 class TAnimationConfig;
    26 
    27 /**
    28 Pure virtual base class for animators.
    29 
    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.
    33 
    34 You do not need to instatiate animators in a client application.  This is
    35 handled by the animation classes.
    36 
    37 @see CAnimation
    38 @publishedAll
    39 @released
    40 */
    41 class CAnimator : public CBase
    42 	{
    43 public:
    44     // ECOM instatiation and destruction:
    45     IMPORT_C static CAnimator* NewL(MAnimationDrawer* aRenderer);
    46     IMPORT_C virtual ~CAnimator();
    47 	/** Starts the animation running.
    48 	@see TAnimationConfig
    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.
    63 	
    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;
    75 protected:
    76 	/** Animator ECOM Plugin identifier */
    77 	TUid iDtor_ID_Key;
    78 	/** Data */
    79 	TInt iLoop;
    80 	};
    81 
    82 #endif //__ANIMATOR_H__
    83