epoc32/include/spriteanimation.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- a/epoc32/include/spriteanimation.h	Tue Mar 16 16:12:26 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,109 +0,0 @@
     1.4 -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#ifndef __SPRITEANIMATION_H__
    1.20 -#define __SPRITEANIMATION_H__
    1.21 -
    1.22 -#include <animation.h>
    1.23 -
    1.24 -#include <e32base.h>
    1.25 -#include <w32std.h>
    1.26 -
    1.27 -#include <animationconfig.h>
    1.28 -#include <spriteanimationclient.h>
    1.29 -
    1.30 -class CAnimationDataProvider;
    1.31 -class CCoeControl;
    1.32 -class CSpriteAnimationExt;
    1.33 -
    1.34 -/**
    1.35 -Implementation of CAnimation for sprite based animations.
    1.36 -
    1.37 -A sprite animation displays the image using a sprite, which is a server side
    1.38 -graphic object.  This is likely to be more efficient than a basic animation,
    1.39 -and requires slightly less work in the client application.  However, it also
    1.40 -provides less control over the actual rendering of the image.
    1.41 -
    1.42 -A sprite animation must be associated with an RWindow.  However, no redraw
    1.43 -events will be generated for it by the animation, and the client application
    1.44 -does not need to take any action once the animation has started.  Holding the
    1.45 -animation when the sprite is not visible is handled automatically on the server
    1.46 -side.
    1.47 -
    1.48 -@see CAnimationDataProvider
    1.49 -@publishedAll
    1.50 -@released
    1.51 -*/
    1.52 -class CSpriteAnimation : public CAnimation, public MAnimationDataProviderObserver
    1.53 -	{
    1.54 -public:
    1.55 -	IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWsSession, RWindow& aWindow, MAnimationObserver* aObserver = 0);
    1.56 -	IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWsSession, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver = 0);
    1.57 -	IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver = NULL, const CCoeControl* aHost = NULL);
    1.58 -	IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, const TDesC8& aDataType, MAnimationObserver* aObserver = NULL, const CCoeControl* aHost = NULL);
    1.59 -	IMPORT_C ~CSpriteAnimation();
    1.60 -	IMPORT_C TSize Size() const;
    1.61 -
    1.62 -	/** Provides an CSpriteAnimation DataProvider interface to the client application.
    1.63 -	@return iDataProvider A CAnimationDataProvider */
    1.64 -	inline CAnimationDataProvider* DataProvider() { return iDataProvider; }
    1.65 -	// From CAnimationBase:
    1.66 -	virtual void Start(const TAnimationConfig& aConfig);
    1.67 -	virtual void Stop();
    1.68 -	virtual void Pause();
    1.69 -	virtual void Resume();
    1.70 -	virtual void Hold();
    1.71 -	virtual void Unhold();
    1.72 -	virtual void SetPosition(const TPoint& aPoint);
    1.73 -	virtual void Freeze();
    1.74 -	virtual void Unfreeze();	
    1.75 -public:
    1.76 -	IMPORT_C virtual void SetHostL(const CCoeControl* aHost);
    1.77 -		
    1.78 -protected:
    1.79 -	CSpriteAnimation();
    1.80 -	CSpriteAnimation(CAnimationDataProvider* aDataProvider, RWsSession& aWsSession);
    1.81 -	CSpriteAnimation(CAnimationDataProvider* aDataProvider, MAnimationObserver* aObserver, const CCoeControl* aHost);
    1.82 -	void ConstructL(const TPoint& aPoint, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver);
    1.83 -	virtual void CSpriteAnimation_Reserved2();
    1.84 -	void ConstructL(const TPoint& aPoint, const TDesC8& aDataType);
    1.85 -	void ConstructL();
    1.86 -private:
    1.87 -	CSpriteAnimation(const CSpriteAnimation&);	// no implementation
    1.88 -	CSpriteAnimation& operator=(const CSpriteAnimation&);			// no implementation
    1.89 -	void InitializeL();
    1.90 -	void Reset();
    1.91 -	// from MAnimationDataProviderObserver
    1.92 -	virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize);
    1.93 -
    1.94 -private:
    1.95 -	enum TFlags 
    1.96 -		{
    1.97 -		EAnimationInitialized = 0x1	// Is the animation initialized?
    1.98 -		};
    1.99 -private:
   1.100 -	CSpriteAnimationExt* iSpriteAnimationExt;
   1.101 -	MAnimationObserver* iObserver;
   1.102 -//note the following data member is accessed via an inline function!
   1.103 -	CAnimationDataProvider* iDataProvider;
   1.104 -	RWsSession* iWsSession;
   1.105 -	RWsSprite* iWsSprite;
   1.106 -	RAnimDll iAnimDll;
   1.107 -	RSpriteAnimationClient* iClient;
   1.108 -	const CCoeControl* iHost;
   1.109 -	TInt iFlags;
   1.110 -	};
   1.111 -
   1.112 -#endif