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.
20 #ifndef __WSDYNAMICRESBASIC_H__
21 #define __WSDYNAMICRESBASIC_H__
23 #include "wsdynamicresbase.h"
24 #include <graphics/displayconfiguration.h>
25 #include <graphics/displaycontrol.h>
26 #include <graphics/displaymapping.h>
32 static TBool cSCLogged =EFalse;
35 class CWsDynamicResBasic : public CWsDynamicResBase
37 typedef CWsDynamicResBase MyBase;
39 struct TBitmapRegionPair
48 virtual ~CWsDynamicResBasic();
49 virtual void SetupL();
50 virtual void TearDownL();
51 virtual void TearDownFromDeleteL();
53 static CTestSuite* CreateSuiteL( const TDesC& aName );
61 void GRAPHICS_WSERV_DYNAMICRES_0001L();
62 void GRAPHICS_WSERV_DYNAMICRES_0002L();
63 void GRAPHICS_WSERV_DYNAMICRES_0003L();
64 void GRAPHICS_WSERV_DYNAMICRES_0004L();
65 void GRAPHICS_WSERV_DYNAMICRES_0005L();
66 void GRAPHICS_WSERV_DYNAMICRES_0006L();
67 void GRAPHICS_WSERV_DYNAMICRES_0007L();
68 void GRAPHICS_WSERV_DYNAMICRES_0008L();
69 void GRAPHICS_WSERV_DYNAMICRES_0009L();
70 void GRAPHICS_WSERV_DYNAMICRES_0010L();
71 void GRAPHICS_WSERV_DYNAMICRES_0011L();
72 void GRAPHICS_WSERV_DYNAMICRES_0012L();
73 void GRAPHICS_WSERV_DYNAMICRES_0013L();
74 void GRAPHICS_WSERV_DYNAMICRES_0014L();
75 void GRAPHICS_WSERV_DYNAMICRES_0015L();
76 void GRAPHICS_WSERV_DYNAMICRES_0016L();
77 void GRAPHICS_WSERV_DYNAMICRES_0017L();
78 void GRAPHICS_WSERV_DYNAMICRES_0018L();
81 void GRAPHICS_WSERV_DYNAMICRES_0021L(TBool aScaleMode);
84 void GRAPHICS_WSERV_DYNAMICRES_0031L();
85 void GRAPHICS_WSERV_DYNAMICRES_0032L();
86 void GRAPHICS_WSERV_DYNAMICRES_0033L();
87 void GRAPHICS_WSERV_DYNAMICRES_0034L();
90 void GRAPHICS_WSERV_DYNAMICRES_0041L(TBool aIsSurface);
91 void GRAPHICS_WSERV_DYNAMICRES_0042L(TBool aIsSurface);
94 void GRAPHICS_WSERV_DYNAMICRES_0051L();
95 void GRAPHICS_WSERV_DYNAMICRES_0052L();
96 void GRAPHICS_WSERV_DYNAMICRES_0053L();
99 void GRAPHICS_WSERV_DYNAMICRES_0101L();
100 void GRAPHICS_WSERV_DYNAMICRES_0102L();
103 void SetRotation (TDisplayConfiguration& aConfig, const MDisplayControl::TResolution& aResolution);
104 TBool Compare(const CFbsBitmap& aBitmap, const TRect& aRect1,
105 const TRect& aRect2, RArray<TBitmapRegionPair>& aRegionArray, TBool aIsSurface);
106 TRgb GreatestColor(TRgb& aColor) const;
110 CActiveScheduler iScheduler;
113 class CWsDisplayEvent : public CActive
117 CWsDisplayEvent(RWsSession *aWs);
120 TInt ConfigSpinner() {return iConfigSpinner;}
121 TInt ResListSpinner() {return iResListSpinner;}
122 TInt ReceivedEventCount() {return iReceivedEventCount;}
123 TInt ReceivedDeviceEventCount() {return iReceivedDeviceEventCount;}
124 TInt ReceivedPointerEventCount() {return iReceivedPointerEventCount;}
125 void SetExpectedPointPos(const TPoint& aPos) {iPointerPos = aPos;}
126 TBool PointerTestPassed() {return iPointerPosTestPass;}
134 TInt iResListSpinner;
135 TInt iReceivedEventCount;
136 TInt iReceivedDeviceEventCount;
137 TInt iReceivedPointerEventCount;
139 TBool iPointerPosTestPass;
142 class CEventTimer : public CActive
145 static CEventTimer* NewL();
147 void Wait(TInt aDelay);
161 class CDSATestDrawing: public CTimer, public MDirectScreenAccess
169 static CDSATestDrawing* NewL();
171 //from MDirectScreenAccess
172 void Restart(RDirectScreenAccess::TTerminationReasons aReason);
173 void AbortNow(RDirectScreenAccess::TTerminationReasons aReason);
175 void SetDSA(CDirectScreenAccess *aDSA){iDSA = aDSA;}
176 void SetWindow(RWindow &aWindow){iWin = &aWindow;}
177 void StartDrawingL(CDirectScreenAccess *aDSA);
184 CDirectScreenAccess *iDSA;
187 #endif /*__WSDYNAMICRESBASIC_H__*/