epoc32/include/mw/animationframe.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/animationframe.h	Wed Mar 31 12:27:01 2010 +0100
     1.3 @@ -0,0 +1,92 @@
     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 __ANIMATIONFRAME_H__
    1.20 +#define __ANIMATIONFRAME_H__
    1.21 +
    1.22 +#include <icl/imagedata.h>
    1.23 +
    1.24 +class CFbsBitmap;
    1.25 +
    1.26 +/**
    1.27 +Data format for individual bitmap format animation frames.
    1.28 +
    1.29 +Animators and data providers which use the "bitmap" data type use objects
    1.30 +of this type to transfer data.
    1.31 +
    1.32 +You do not need to instantiate an object of this type unless you are writing
    1.33 +a new data provider.
    1.34 +
    1.35 +@see CBitmapAnimator
    1.36 +@see CICLAnimationDataProvider
    1.37 +@publishedAll
    1.38 +@released
    1.39 +*/
    1.40 +class CAnimationFrame : public CBase
    1.41 +	{
    1.42 +public:
    1.43 +	/** Structure used for passing a CAnimationFrame safely over a
    1.44 +	client/server connection.*/
    1.45 +	struct THandles
    1.46 +		{
    1.47 +		/** A handle to the bitmap into which the decoded frame(s) are put */
    1.48 +		TInt iBitmapHandle;
    1.49 +		/**	The bitmap mask for the changed area for this frame */
    1.50 +		TInt iMaskHandle;
    1.51 +		/** General frame info provided by all plugins */
    1.52 +		TFrameInfo iFrameInfo;
    1.53 +		};
    1.54 +public:
    1.55 +	virtual ~CAnimationFrame();
    1.56 +	IMPORT_C static CAnimationFrame* NewL();
    1.57 +	IMPORT_C static CAnimationFrame* NewL(const THandles& aHandles);
    1.58 +	IMPORT_C void GetHandles(THandles & aHandles) const;
    1.59 +	IMPORT_C void SetHandlesL(const THandles & aHandles);
    1.60 +	IMPORT_C void CreateL(const TFrameInfo& aFrameInfo);
    1.61 +	/** Returns the bitmap image for the changed area for this frame
    1.62 +	@return A pointer to a CFbsBitmap */
    1.63 +	CFbsBitmap* Bitmap()				{ return iBitmap; }
    1.64 +	/** Returns the bitmap image for the changed area for this frame
    1.65 +	@return A pointer to a const CFbsBitmap */
    1.66 +	const CFbsBitmap* Bitmap() const	{ return iBitmap; }
    1.67 +	/** Returns the bitmap mask for the changed area for this frame
    1.68 +	@return A pointer to a CFbsBitmap */
    1.69 +	CFbsBitmap* Mask()					{ return iMask; }
    1.70 +	/** Returns the bitmap mask for the changed area for this frame
    1.71 +	@return A pointer to a const CFbsBitmap */
    1.72 +	const CFbsBitmap* Mask() const		{ return iMask; }
    1.73 +	/** Returns information about the frame.
    1.74 +  	@return A TFrameInfo */
    1.75 +  	TFrameInfo& FrameInfo() 			{ return iFrameInfo; }
    1.76 +  	/** Returns information about the frame.	
    1.77 +	@return A const TFrameInfo */
    1.78 +	const TFrameInfo& FrameInfo() const	{ return iFrameInfo; }
    1.79 +protected:
    1.80 +	IMPORT_C virtual void CAnimationFrame_Reserved1();
    1.81 +	IMPORT_C virtual void CAnimationFrame_Reserved2();
    1.82 +private:
    1.83 +	TInt iCAnimationFrame_Reserved;
    1.84 +private:
    1.85 +	CAnimationFrame() {};
    1.86 +	CAnimationFrame(const CAnimationFrame&); // no implementation
    1.87 +	CAnimationFrame& operator=(const CAnimationFrame&); // no implementation
    1.88 +	void ConstructL();
    1.89 +private:
    1.90 +	CFbsBitmap* iBitmap;
    1.91 +	CFbsBitmap* iMask;
    1.92 +	TFrameInfo iFrameInfo;
    1.93 +	};
    1.94 +
    1.95 +#endif //__ANIMATIONFRAME_H__