epoc32/include/animator.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// 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
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef __ANIMATOR_H__
williamr@2
    17
#define __ANIMATOR_H__
williamr@2
    18
williamr@2
    19
#include <e32base.h>
williamr@2
    20
williamr@2
    21
const TUid KAnimatorInterfaceUid = {0x10204F59};
williamr@2
    22
williamr@2
    23
class MAnimationDrawer;
williamr@2
    24
class CBitmapContext;
williamr@2
    25
class TAnimationConfig;
williamr@2
    26
williamr@2
    27
/**
williamr@2
    28
Pure virtual base class for animators.
williamr@2
    29
williamr@2
    30
Each data type supported by the animation framework is represented by an
williamr@2
    31
animator, which handles the data interpretation, timing and control.  Each
williamr@2
    32
animator is provided in the form of an ECOM plugin.
williamr@2
    33
williamr@2
    34
You do not need to instatiate animators in a client application.  This is
williamr@2
    35
handled by the animation classes.
williamr@2
    36
williamr@2
    37
@see CAnimation
williamr@2
    38
@publishedAll
williamr@2
    39
@released
williamr@2
    40
*/
williamr@2
    41
class CAnimator : public CBase
williamr@2
    42
	{
williamr@2
    43
public:
williamr@2
    44
    // ECOM instatiation and destruction:
williamr@2
    45
    IMPORT_C static CAnimator* NewL(MAnimationDrawer* aRenderer);
williamr@2
    46
    IMPORT_C virtual ~CAnimator();
williamr@2
    47
	/** Starts the animation running.
williamr@2
    48
	@see TAnimationConfig
williamr@2
    49
	@param aConfig Runtime settings*/
williamr@2
    50
	virtual void Start(const TAnimationConfig& aConfig) = 0;
williamr@2
    51
	/** Stops the animation and rewinds it.*/
williamr@2
    52
	virtual void Stop() = 0;
williamr@2
    53
	/** Pauses the animation.*/
williamr@2
    54
	virtual void Pause() = 0;
williamr@2
    55
	/** Resumes a paused animation.*/
williamr@2
    56
	virtual void Resume() = 0;
williamr@2
    57
	/** Puts an animation on hold. */
williamr@2
    58
	virtual void Hold() = 0;
williamr@2
    59
	/** Restores a held animation and brings it back into synch. */
williamr@2
    60
	virtual void Unhold() = 0;
williamr@2
    61
	/** Receives data from a data provider.  The mechanism by which data is
williamr@2
    62
	actually passed depends on the animation type.
williamr@2
    63
	
williamr@2
    64
	@see MAnimationDataProviderObserver
williamr@2
    65
	@param aEvent The event identifier
williamr@2
    66
	@param aData A pointer to any data for the event
williamr@2
    67
	@param aDataSize The length of the data in aData*/
williamr@2
    68
	virtual void DataEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0;
williamr@2
    69
	/** Called from the renderer and draws the animation.
williamr@2
    70
	@param aBitmapContext The context on which the animation will be drawn*/
williamr@2
    71
	virtual void Draw(CBitmapContext& aBitmapContext) const = 0;
williamr@2
    72
	/** Called from the renderer and draws the mask for the animation.
williamr@2
    73
	@param aBitmapContext The context on which the mask will be drawn*/
williamr@2
    74
	virtual void DrawMask(CBitmapContext& aBitmapContext) const = 0;
williamr@2
    75
protected:
williamr@2
    76
	/** Animator ECOM Plugin identifier */
williamr@2
    77
	TUid iDtor_ID_Key;
williamr@2
    78
	/** Data */
williamr@2
    79
	TInt iLoop;
williamr@2
    80
	};
williamr@2
    81
williamr@2
    82
#endif //__ANIMATOR_H__