os/graphics/windowing/windowserver/stdgraphic/wsgraphicdrawercontext.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/stdgraphic/wsgraphicdrawercontext.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,80 @@
     1.4 +// Copyright (c) 1995-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 "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.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 __WSGRAPHICDRAWERCONTEXT_H__
    1.20 +#define __WSGRAPHICDRAWERCONTEXT_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <e32std.h>
    1.24 +
    1.25 +class MWsGc;
    1.26 +class CFbsBitmap;
    1.27 +class CFrameRate;
    1.28 +class MWsClient;
    1.29 +class MWsScreen;
    1.30 +
    1.31 +class MWsGraphicDrawerContext
    1.32 +	{
    1.33 +public:
    1.34 +	virtual void Destroy() = 0;
    1.35 +	virtual MWsClient& Client(MWsGc& aGc) = 0;
    1.36 +	virtual MWsScreen& Screen(MWsGc& aGc) = 0;
    1.37 +	virtual const TTime& Now(MWsGc& aGc) const = 0;
    1.38 +	virtual void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow) = 0;
    1.39 +	virtual void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop) = 0;
    1.40 +	virtual void SetGcOrigin(MWsGc& aGc, const TPoint& aOrigin) = 0;
    1.41 +	virtual TInt Push(MWsGc& aGc) const = 0;
    1.42 +	virtual void Pop(MWsGc& aGc) const = 0;
    1.43 +	virtual void DrawBitmap(MWsGc& aGc, const TPoint& aDestPos, const CFbsBitmap* aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap) const = 0;
    1.44 +	virtual void DrawFrameRate(MWsGc& aGc, const TRect& aRect, const CFrameRate& aFps) const = 0;
    1.45 +	};
    1.46 +
    1.47 +class CWsGraphicDrawerNgaContext : public CBase, public MWsGraphicDrawerContext
    1.48 +	{
    1.49 +public:
    1.50 +	static MWsGraphicDrawerContext* NewL();
    1.51 +public:
    1.52 +	void Destroy();
    1.53 +	MWsClient& Client(MWsGc& aGc);
    1.54 +	MWsScreen& Screen(MWsGc& aGc);
    1.55 +	const TTime& Now(MWsGc& aGc) const;
    1.56 +	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow);
    1.57 +	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop);
    1.58 +	void SetGcOrigin(MWsGc& aGc, const TPoint& aOrigin);
    1.59 +	TInt Push(MWsGc& aGc) const;
    1.60 +	void Pop(MWsGc& aGc) const;
    1.61 +	void DrawBitmap(MWsGc& aGc, const TPoint& aDestPos, const CFbsBitmap* aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap) const;
    1.62 +	void DrawFrameRate(MWsGc& aGc, const TRect& aRect, const CFrameRate& aFps) const;
    1.63 +	};
    1.64 +
    1.65 +class CWsGraphicDrawerNonNgaContext : public CBase, public MWsGraphicDrawerContext
    1.66 +	{
    1.67 +public:
    1.68 +	static MWsGraphicDrawerContext* NewL();
    1.69 +public:
    1.70 +	void Destroy();
    1.71 +	MWsClient& Client(MWsGc& aGc);
    1.72 +	MWsScreen& Screen(MWsGc& aGc);
    1.73 +	const TTime& Now(MWsGc& aGc) const;
    1.74 +	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow);
    1.75 +	void ScheduleAnimation(MWsGc& aGc, const TRect& aRect,const TTimeIntervalMicroSeconds& aFromNow,const TTimeIntervalMicroSeconds& aFreq,const TTimeIntervalMicroSeconds& aStop);
    1.76 +	void SetGcOrigin(MWsGc& aGc, const TPoint& aOrigin);
    1.77 +	TInt Push(MWsGc& aGc) const;
    1.78 +	void Pop(MWsGc& aGc) const;
    1.79 +	void DrawBitmap(MWsGc& aGc, const TPoint& aDestPos, const CFbsBitmap* aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap) const;
    1.80 +	void DrawFrameRate(MWsGc& aGc, const TRect& aRect, const CFrameRate& aFps) const;
    1.81 +	};
    1.82 +
    1.83 +#endif // __WSGRAPHICDRAWERCONTEXT_H__