First public contribution.
1 // Copyright (c) 2007-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.
22 #ifndef __T_PSEUDOAPPWINDOW_H__
23 #define __T_PSEUDOAPPWINDOW_H__
25 #include <w32std.h> //RWsSession, CWsScreenDevice etc
27 #include "t_pseudoapptestresults.h"
36 enum TWindowChangeType
41 EWindowPositionAndSize,
42 EWindowPositionAndSizeWithOpacity
45 typedef enum TPixelFormat
51 typedef enum TParamChange
67 TBool operator==(const TDrawParameters& x) const;
77 class CTestWindow : public CBase
80 inline RWindow* Window() {return &iWindow;};
81 IMPORT_C virtual void Rotate(TSize aScreenSize);
82 IMPORT_C virtual void DrawL();
90 IMPORT_C CTestWindow(TInt aScreenNo, TDisplayMode aMode);
93 void ConstructL(TInt aScreenNo, TDisplayMode aMode);
97 CWsScreenDevice* iScreen;
102 CArrayFixFlat<TDrawParameters>* iLoadsaParameters;
103 TGceTestResults* iGceTestResults;
107 class CTestEmptyWindow : public CTestWindow
110 IMPORT_C static CTestEmptyWindow* NewL(TInt aScreen, TDisplayMode aMode, const TSize& aScreenSize);
111 IMPORT_C virtual void Rotate(TSize aScreenSize);
112 IMPORT_C virtual void DrawL();
116 IMPORT_C CTestEmptyWindow(TInt aScreenNo, TDisplayMode aMode);
119 void ConstructL(const TSize& aScreenSize);
125 class CTestEcomWindow : public CTestWindow
128 IMPORT_C static CTestEcomWindow* NewL(TInt aScreenNo, TDisplayMode aMode, const TPtrC& aMultiBitmapEcomFile,
129 TInt aMultiBitmapEcomFileSize, TGceTestResults* aGceTestResults,
130 CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
132 IMPORT_C virtual void Rotate(TSize aScreenSize);
133 IMPORT_C virtual void DrawL();
137 IMPORT_C CTestEcomWindow(TInt aScreenNo, TDisplayMode aMode);
140 void ConstructL(const TPtrC& aMultiBitmapEcomFile, TInt aMultiBitmapEcomFileSize, TGceTestResults* aGceTestResults,
141 CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
142 TParamChange Redraw();
145 TPtrC iMultiBitmapEcomFile;
146 TInt iMultiBitmapEcomFileSize;
150 class CTestUiWindow : public CTestWindow
153 IMPORT_C static CTestUiWindow* NewL(TInt aScreenNo, TDisplayMode aMode, const TPtrC& aMultiBitmapUiFile, TInt aMultiBitmapUiFileSize,
154 CArrayFixFlat<TRect>* aRectArray, TInt aFrameDuration, TInt aMultiBitmapUiFileTransparency,
155 TGceTestResults* aGceTestResults,
156 CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
158 IMPORT_C virtual void Rotate(const TSize& aScreenSize);
159 IMPORT_C virtual void DrawL();
163 IMPORT_C CTestUiWindow(TInt aScreenNo, TDisplayMode aMode);
166 void ConstructL(const TPtrC& aMultiBitmapUiFile, TInt aMultiBitmapUiFileSize, CArrayFixFlat<TRect>* aRectArray,
167 TInt aFrameDuration, TInt aMultiBitmapUiFileTransparency, TGceTestResults* aGceTestResults,
168 CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
169 TParamChange Redraw();
170 void CalcNewWindowExtent(TSize aScreenSize, TInt aIncrement, TInt aDirection);
171 void SetBitmapTransparency(CFbsBitmap* aBitmap, TUint8 aAlphaValue, TInt aAlphaByteLocation);
173 void ParamChangeCyclicPositionAndSize(TDrawParameters& aDrawParams, TInt aFrameCounter);
174 void ParamChangeCyclicPosition(TDrawParameters& aDrawParams, TInt aFrameCounter);
175 void CalcNewWindowLocation(TSize aScreensize, TInt aIncrement, TInt aDirection,TDrawParameters& aDrawParams);
176 void SetBitmapAlpha(CFbsBitmap* aBitmap);
180 TPtrC iMultiBitmapUiFile;
181 TInt iMultiBitmapUiFileSize;
182 CArrayFixFlat<TRect>* iRectArray;
183 TInt iMultiBitmapUiFileTransparency;
187 #endif //__T_PSEUDOAPPWINDOW_H__