lafagnosticuifoundation/animation/src/SpriteAnimationServer.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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 __SPRITEANIMATIONSERVER_H__
       
    17 #define __SPRITEANIMATIONSERVER_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <w32adll.h>
       
    21 #include "AnimationMixins.h"
       
    22 
       
    23 class CAnimator;
       
    24 class TAnimationConfig;
       
    25 class CAnimationTls;
       
    26 class CAnimationTicker;
       
    27 
       
    28 /** @internalComponent */
       
    29 NONSHARABLE_CLASS(CSpriteAnimationServer) : public CSpriteAnim, public MAnimationDrawer
       
    30 	{
       
    31 protected:
       
    32 	enum TFlags
       
    33 		{
       
    34 		EInitialised	=	0x0001,
       
    35 		EVirtualHold	=	0x0002,
       
    36 		};
       
    37 public:
       
    38 	static CSpriteAnimationServer* NewL();
       
    39 	~CSpriteAnimationServer();
       
    40 private:
       
    41 	CSpriteAnimationServer();
       
    42 	void ReceiveEventL(TAny* aData);
       
    43 	// From MAnimatorObserver:
       
    44 	virtual void AnimatorDraw();
       
    45 	virtual void AnimatorInitialisedL(const TSize& aSize);
       
    46 	virtual void AnimatorResetL();
       
    47 	virtual const TPtrC8 AnimatorDataType() const;
       
    48 	virtual CAnimationTicker& AnimatorTicker();
       
    49 	// Pure Virtual function from CSpriteAnim
       
    50 	virtual void ConstructL(TAny *aArgs);
       
    51 	// Virtual functions from CAnim
       
    52 	virtual void Command(TInt aOpcode, TAny* aArgs);
       
    53 	virtual TInt CommandReplyL(TInt aOpcode, TAny *aArgs);
       
    54 	virtual void Animate(TDateTime* aDateTime);
       
    55 	// Pure Virtual function from MEventHandler
       
    56 	virtual TBool OfferRawEvent(const TRawEvent &aRawEvent);
       
    57 private:
       
    58     void PostHostEvent();
       
    59 private:
       
    60 	TInt iFlags;
       
    61 	CAnimationTls* iTls;
       
    62 	CAnimator* iAnimator;
       
    63 	CFbsBitGc* iSpriteGc;
       
    64 	CFbsBitmapDevice* iBitmapDevice;
       
    65 	CFbsBitmapDevice* iMaskDevice;	
       
    66 	TSize iSize;
       
    67 	HBufC8* iDataType;
       
    68 	TInt iFreezeCount;
       
    69 	TInt iHostHandle;
       
    70 	};
       
    71 
       
    72 #endif // __SPRITEANIMATIONSERVER_H__