os/graphics/windowing/windowserver/stdgraphic/wsgraphicdrawercontext.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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 __WSGRAPHICDRAWERCONTEXT_H__
    17 #define __WSGRAPHICDRAWERCONTEXT_H__
    18 
    19 #include <e32base.h>
    20 #include <e32std.h>
    21 
    22 class MWsGc;
    23 class CFbsBitmap;
    24 class CFrameRate;
    25 class MWsClient;
    26 class MWsScreen;
    27 
    28 class MWsGraphicDrawerContext
    29 	{
    30 public:
    31 	virtual void Destroy() = 0;
    32 	virtual MWsClient& Client(MWsGc& aGc) = 0;
    33 	virtual MWsScreen& Screen(MWsGc& aGc) = 0;
    34 	virtual const TTime& Now(MWsGc& aGc) const = 0;
    35 	virtual void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow) = 0;
    36 	virtual void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop) = 0;
    37 	virtual void SetGcOrigin(MWsGc& aGc, const TPoint& aOrigin) = 0;
    38 	virtual TInt Push(MWsGc& aGc) const = 0;
    39 	virtual void Pop(MWsGc& aGc) const = 0;
    40 	virtual void DrawBitmap(MWsGc& aGc, const TPoint& aDestPos, const CFbsBitmap* aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap) const = 0;
    41 	virtual void DrawFrameRate(MWsGc& aGc, const TRect& aRect, const CFrameRate& aFps) const = 0;
    42 	};
    43 
    44 class CWsGraphicDrawerNgaContext : public CBase, public MWsGraphicDrawerContext
    45 	{
    46 public:
    47 	static MWsGraphicDrawerContext* NewL();
    48 public:
    49 	void Destroy();
    50 	MWsClient& Client(MWsGc& aGc);
    51 	MWsScreen& Screen(MWsGc& aGc);
    52 	const TTime& Now(MWsGc& aGc) const;
    53 	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow);
    54 	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop);
    55 	void SetGcOrigin(MWsGc& aGc, const TPoint& aOrigin);
    56 	TInt Push(MWsGc& aGc) const;
    57 	void Pop(MWsGc& aGc) const;
    58 	void DrawBitmap(MWsGc& aGc, const TPoint& aDestPos, const CFbsBitmap* aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap) const;
    59 	void DrawFrameRate(MWsGc& aGc, const TRect& aRect, const CFrameRate& aFps) const;
    60 	};
    61 
    62 class CWsGraphicDrawerNonNgaContext : public CBase, public MWsGraphicDrawerContext
    63 	{
    64 public:
    65 	static MWsGraphicDrawerContext* NewL();
    66 public:
    67 	void Destroy();
    68 	MWsClient& Client(MWsGc& aGc);
    69 	MWsScreen& Screen(MWsGc& aGc);
    70 	const TTime& Now(MWsGc& aGc) const;
    71 	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow);
    72 	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop);
    73 	void SetGcOrigin(MWsGc& aGc, const TPoint& aOrigin);
    74 	TInt Push(MWsGc& aGc) const;
    75 	void Pop(MWsGc& aGc) const;
    76 	void DrawBitmap(MWsGc& aGc, const TPoint& aDestPos, const CFbsBitmap* aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap) const;
    77 	void DrawFrameRate(MWsGc& aGc, const TRect& aRect, const CFrameRate& aFps) const;
    78 	};
    79 
    80 #endif // __WSGRAPHICDRAWERCONTEXT_H__