First public contribution.
1 // Copyright (c) 2008-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 #include <ecom/implementationproxy.h>
17 #include <graphics/wsgraphicdrawer.h>
18 #include <graphics/wsgraphicdrawerinterface.h>
19 #include <graphics/wsgraphicscontext.h>
20 #include "stresscrp.h"
22 NONSHARABLE_CLASS(CStressCRP): public CWsGraphicDrawer
25 static CStressCRP* CreateL();
30 void ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner,const TDesC8& aData);
31 void HandleMessage(const TDesC8& aData);
33 void DoDraw(MWsGc& aGc,const TRect& aRect,const TDesC8& aData) const;
34 mutable MWsGraphicDrawerEnvironment* iEnv;
37 CStressCRP* CStressCRP::CreateL()
39 return new(ELeave) CStressCRP;
42 void CStressCRP::ConstructL(MWsGraphicDrawerEnvironment& aEnv,const TGraphicDrawerId& aId,MWsClient& aOwner,const TDesC8& /*aData*/)
44 BaseConstructL(aEnv,aId,aOwner);
48 void CStressCRP::HandleMessage(const TDesC8&/* aData*/)
52 void CStressCRP::DoDraw(MWsGc& aGc,const TRect& aRect,const TDesC8& /*aData*/) const
54 MWsGraphicsContext* context = static_cast<MWsGraphicsContext*>(aGc.ResolveObjectInterface(KMWsGraphicsContext));
56 StressCrpNgaContext::Draw(aGc, aRect);
58 StressCrpNonNgaContext::Draw(aGc, aRect);
61 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) //lint -e714 Suppress 'not referenced'
63 static const TImplementationProxy KImplementationTable[] =
65 IMPLEMENTATION_PROXY_ENTRY(CStressCRP::EImplUid,CStressCRP::CreateL) //lint !e611 Suspicious cast
67 aTableCount = (sizeof(KImplementationTable) / sizeof(TImplementationProxy));
68 return KImplementationTable;