epoc32/include/animationframe.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
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __ANIMATIONFRAME_H__
    17 #define __ANIMATIONFRAME_H__
    18 
    19 #include <icl/imagedata.h>
    20 
    21 class CFbsBitmap;
    22 
    23 /**
    24 Data format for individual bitmap format animation frames.
    25 
    26 Animators and data providers which use the "bitmap" data type use objects
    27 of this type to transfer data.
    28 
    29 You do not need to instantiate an object of this type unless you are writing
    30 a new data provider.
    31 
    32 @see CBitmapAnimator
    33 @see CICLAnimationDataProvider
    34 @publishedAll
    35 @released
    36 */
    37 class CAnimationFrame : public CBase
    38 	{
    39 public:
    40 	/** Structure used for passing a CAnimationFrame safely over a
    41 	client/server connection.*/
    42 	struct THandles
    43 		{
    44 		/** A handle to the bitmap into which the decoded frame(s) are put */
    45 		TInt iBitmapHandle;
    46 		/**	The bitmap mask for the changed area for this frame */
    47 		TInt iMaskHandle;
    48 		/** General frame info provided by all plugins */
    49 		TFrameInfo iFrameInfo;
    50 		};
    51 public:
    52 	virtual ~CAnimationFrame();
    53 	IMPORT_C static CAnimationFrame* NewL();
    54 	IMPORT_C static CAnimationFrame* NewL(const THandles& aHandles);
    55 	IMPORT_C void GetHandles(THandles & aHandles) const;
    56 	IMPORT_C void SetHandlesL(const THandles & aHandles);
    57 	IMPORT_C void CreateL(const TFrameInfo& aFrameInfo);
    58 	/** Returns the bitmap image for the changed area for this frame
    59 	@return A pointer to a CFbsBitmap */
    60 	CFbsBitmap* Bitmap()				{ return iBitmap; }
    61 	/** Returns the bitmap image for the changed area for this frame
    62 	@return A pointer to a const CFbsBitmap */
    63 	const CFbsBitmap* Bitmap() const	{ return iBitmap; }
    64 	/** Returns the bitmap mask for the changed area for this frame
    65 	@return A pointer to a CFbsBitmap */
    66 	CFbsBitmap* Mask()					{ return iMask; }
    67 	/** Returns the bitmap mask for the changed area for this frame
    68 	@return A pointer to a const CFbsBitmap */
    69 	const CFbsBitmap* Mask() const		{ return iMask; }
    70 	/** Returns information about the frame.
    71   	@return A TFrameInfo */
    72   	TFrameInfo& FrameInfo() 			{ return iFrameInfo; }
    73   	/** Returns information about the frame.	
    74 	@return A const TFrameInfo */
    75 	const TFrameInfo& FrameInfo() const	{ return iFrameInfo; }
    76 protected:
    77 	IMPORT_C virtual void CAnimationFrame_Reserved1();
    78 	IMPORT_C virtual void CAnimationFrame_Reserved2();
    79 private:
    80 	TInt iCAnimationFrame_Reserved;
    81 private:
    82 	CAnimationFrame() {};
    83 	CAnimationFrame(const CAnimationFrame&); // no implementation
    84 	CAnimationFrame& operator=(const CAnimationFrame&); // no implementation
    85 	void ConstructL();
    86 private:
    87 	CFbsBitmap* iBitmap;
    88 	CFbsBitmap* iMask;
    89 	TFrameInfo iFrameInfo;
    90 	};
    91 
    92 #endif //__ANIMATIONFRAME_H__