Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __WSGRAPHICDRAWERCONTEXT_H__
17 #define __WSGRAPHICDRAWERCONTEXT_H__
28 class MWsGraphicDrawerContext
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;
44 class CWsGraphicDrawerNgaContext : public CBase, public MWsGraphicDrawerContext
47 static MWsGraphicDrawerContext* NewL();
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;
62 class CWsGraphicDrawerNonNgaContext : public CBase, public MWsGraphicDrawerContext
65 static MWsGraphicDrawerContext* NewL();
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;
80 #endif // __WSGRAPHICDRAWERCONTEXT_H__