windowing/windowserver/stdgraphic/stdgraphicdrawer.h
changeset 0 5d03bc08d59c
child 121 d72fc2aace31
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 1995-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 __STDGRAPHICDRAWER_H__
       
    17 #define __STDGRAPHICDRAWER_H__
       
    18 
       
    19 #include "Graphics/WSGRAPHICDRAWER.H"
       
    20 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H>
       
    21 #include <icl/imagedata.h>
       
    22 #include "stdgraphictestdrawer.h"
       
    23 
       
    24 class CFbsBitmap;
       
    25 class MWsGraphicDrawerContext;
       
    26 
       
    27 NONSHARABLE_CLASS(CWsGraphicDrawerBitmap): public CWsGraphicDrawer
       
    28 	{
       
    29 public:
       
    30 	enum 
       
    31 		{
       
    32 		EImplUid = 0x10281921
       
    33 		};
       
    34 	static CWsGraphicDrawerBitmap* CreateL();
       
    35 	~CWsGraphicDrawerBitmap();
       
    36 	void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner,const TDesC8& aData);
       
    37 	void HandleMessage(const TDesC8& aData);
       
    38 private:
       
    39 	CWsGraphicDrawerBitmap();
       
    40 	void DoDraw(MWsGc& aGc,const TRect& aRect,const TDesC8& aData) const;
       
    41 private:
       
    42 	MWsGraphicDrawerContext* iContext;
       
    43 	CFbsBitmap* iBitmap;
       
    44 	CFbsBitmap* iMask;
       
    45 	};
       
    46 
       
    47 NONSHARABLE_CLASS(CWsGraphicDrawerBitmapAnimation): public CWsGraphicDrawer
       
    48 	{
       
    49 public:
       
    50 	enum 
       
    51 		{
       
    52 		EImplUid = 0x10281AAE
       
    53 		};
       
    54 	static CWsGraphicDrawerBitmapAnimation* CreateL();
       
    55 	~CWsGraphicDrawerBitmapAnimation();
       
    56 	void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner,const TDesC8& aData);
       
    57 	void HandleMessage(const TDesC8& aData);
       
    58 private:
       
    59 	CWsGraphicDrawerBitmapAnimation();
       
    60 	void DoDraw(MWsGc& aGc,const TRect& aRect,const TDesC8& aData) const;
       
    61 private:
       
    62 	class CFrame;
       
    63 	MWsGraphicDrawerContext* iContext;
       
    64 	RPointerArray<CFrame> iFrames;
       
    65 	TInt64 iAnimationLength;
       
    66 	CFrameRate iFps;
       
    67 	};
       
    68 
       
    69 #endif //__STDGRAPHICDRAWER_H__