sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
/**
|
sl@0
|
17 |
@file
|
sl@0
|
18 |
@test
|
sl@0
|
19 |
@internalComponent
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __T_PSEUDOAPPWINDOW_H__
|
sl@0
|
23 |
#define __T_PSEUDOAPPWINDOW_H__
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <w32std.h> //RWsSession, CWsScreenDevice etc
|
sl@0
|
26 |
|
sl@0
|
27 |
#include "t_pseudoapptestresults.h"
|
sl@0
|
28 |
|
sl@0
|
29 |
enum TWindowChange
|
sl@0
|
30 |
{
|
sl@0
|
31 |
ENoChange = 0,
|
sl@0
|
32 |
EIncremental,
|
sl@0
|
33 |
ECyclic
|
sl@0
|
34 |
};
|
sl@0
|
35 |
|
sl@0
|
36 |
enum TWindowChangeType
|
sl@0
|
37 |
{
|
sl@0
|
38 |
ENoChanges,
|
sl@0
|
39 |
EWindowSize,
|
sl@0
|
40 |
EWindowPosition,
|
sl@0
|
41 |
EWindowPositionAndSize,
|
sl@0
|
42 |
EWindowPositionAndSizeWithOpacity
|
sl@0
|
43 |
};
|
sl@0
|
44 |
|
sl@0
|
45 |
typedef enum TPixelFormat
|
sl@0
|
46 |
{
|
sl@0
|
47 |
EFormatRgb,
|
sl@0
|
48 |
EFormatYuv
|
sl@0
|
49 |
}TPixelFormat;
|
sl@0
|
50 |
|
sl@0
|
51 |
typedef enum TParamChange
|
sl@0
|
52 |
{
|
sl@0
|
53 |
ENoParamChange,
|
sl@0
|
54 |
EFirstFrame,
|
sl@0
|
55 |
EBitmapScale,
|
sl@0
|
56 |
ESizeChange,
|
sl@0
|
57 |
EPositionChange,
|
sl@0
|
58 |
EExtentChange,
|
sl@0
|
59 |
EOpacityChange
|
sl@0
|
60 |
} TParamChange;
|
sl@0
|
61 |
|
sl@0
|
62 |
class TDrawParameters
|
sl@0
|
63 |
{
|
sl@0
|
64 |
public:
|
sl@0
|
65 |
TDrawParameters();
|
sl@0
|
66 |
~TDrawParameters();
|
sl@0
|
67 |
TBool operator==(const TDrawParameters& x) const;
|
sl@0
|
68 |
|
sl@0
|
69 |
public:
|
sl@0
|
70 |
TBool iRedraw;
|
sl@0
|
71 |
TInt iBitmapScale;
|
sl@0
|
72 |
TInt iBitmapAlpha;
|
sl@0
|
73 |
TSize iWindowSize;
|
sl@0
|
74 |
TPoint iWindowPos;
|
sl@0
|
75 |
};
|
sl@0
|
76 |
|
sl@0
|
77 |
class CTestWindow : public CBase
|
sl@0
|
78 |
{
|
sl@0
|
79 |
public:
|
sl@0
|
80 |
inline RWindow* Window() {return &iWindow;};
|
sl@0
|
81 |
IMPORT_C virtual void Rotate(TSize aScreenSize);
|
sl@0
|
82 |
IMPORT_C virtual void DrawL();
|
sl@0
|
83 |
~CTestWindow();
|
sl@0
|
84 |
|
sl@0
|
85 |
void SetPosition();
|
sl@0
|
86 |
void SetSize();
|
sl@0
|
87 |
void SetExtent();
|
sl@0
|
88 |
|
sl@0
|
89 |
protected:
|
sl@0
|
90 |
IMPORT_C CTestWindow(TInt aScreenNo, TDisplayMode aMode);
|
sl@0
|
91 |
|
sl@0
|
92 |
private:
|
sl@0
|
93 |
void ConstructL(TInt aScreenNo, TDisplayMode aMode);
|
sl@0
|
94 |
|
sl@0
|
95 |
protected:
|
sl@0
|
96 |
RWsSession iSession;
|
sl@0
|
97 |
CWsScreenDevice* iScreen;
|
sl@0
|
98 |
CWindowGc* iWindowGc;
|
sl@0
|
99 |
RWindow iWindow;
|
sl@0
|
100 |
RWindowGroup iGroup;
|
sl@0
|
101 |
TDisplayMode iMode;
|
sl@0
|
102 |
CArrayFixFlat<TDrawParameters>* iLoadsaParameters;
|
sl@0
|
103 |
TGceTestResults* iGceTestResults;
|
sl@0
|
104 |
TInt iFrameCounter;
|
sl@0
|
105 |
};
|
sl@0
|
106 |
|
sl@0
|
107 |
class CTestEmptyWindow : public CTestWindow
|
sl@0
|
108 |
{
|
sl@0
|
109 |
public:
|
sl@0
|
110 |
IMPORT_C static CTestEmptyWindow* NewL(TInt aScreen, TDisplayMode aMode, const TSize& aScreenSize);
|
sl@0
|
111 |
IMPORT_C virtual void Rotate(TSize aScreenSize);
|
sl@0
|
112 |
IMPORT_C virtual void DrawL();
|
sl@0
|
113 |
~CTestEmptyWindow();
|
sl@0
|
114 |
|
sl@0
|
115 |
protected:
|
sl@0
|
116 |
IMPORT_C CTestEmptyWindow(TInt aScreenNo, TDisplayMode aMode);
|
sl@0
|
117 |
|
sl@0
|
118 |
private:
|
sl@0
|
119 |
void ConstructL(const TSize& aScreenSize);
|
sl@0
|
120 |
|
sl@0
|
121 |
private:
|
sl@0
|
122 |
TInt iWindowDrawn;
|
sl@0
|
123 |
};
|
sl@0
|
124 |
|
sl@0
|
125 |
class CTestEcomWindow : public CTestWindow
|
sl@0
|
126 |
{
|
sl@0
|
127 |
public:
|
sl@0
|
128 |
IMPORT_C static CTestEcomWindow* NewL(TInt aScreenNo, TDisplayMode aMode, const TPtrC& aMultiBitmapEcomFile,
|
sl@0
|
129 |
TInt aMultiBitmapEcomFileSize, TGceTestResults* aGceTestResults,
|
sl@0
|
130 |
CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
|
sl@0
|
131 |
~CTestEcomWindow();
|
sl@0
|
132 |
IMPORT_C virtual void Rotate(TSize aScreenSize);
|
sl@0
|
133 |
IMPORT_C virtual void DrawL();
|
sl@0
|
134 |
|
sl@0
|
135 |
|
sl@0
|
136 |
protected:
|
sl@0
|
137 |
IMPORT_C CTestEcomWindow(TInt aScreenNo, TDisplayMode aMode);
|
sl@0
|
138 |
|
sl@0
|
139 |
private:
|
sl@0
|
140 |
void ConstructL(const TPtrC& aMultiBitmapEcomFile, TInt aMultiBitmapEcomFileSize, TGceTestResults* aGceTestResults,
|
sl@0
|
141 |
CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
|
sl@0
|
142 |
TParamChange Redraw();
|
sl@0
|
143 |
|
sl@0
|
144 |
private:
|
sl@0
|
145 |
TPtrC iMultiBitmapEcomFile;
|
sl@0
|
146 |
TInt iMultiBitmapEcomFileSize;
|
sl@0
|
147 |
TInt iBitmapCounter;
|
sl@0
|
148 |
};
|
sl@0
|
149 |
|
sl@0
|
150 |
class CTestUiWindow : public CTestWindow
|
sl@0
|
151 |
{
|
sl@0
|
152 |
public:
|
sl@0
|
153 |
IMPORT_C static CTestUiWindow* NewL(TInt aScreenNo, TDisplayMode aMode, const TPtrC& aMultiBitmapUiFile, TInt aMultiBitmapUiFileSize,
|
sl@0
|
154 |
CArrayFixFlat<TRect>* aRectArray, TInt aFrameDuration, TInt aMultiBitmapUiFileTransparency,
|
sl@0
|
155 |
TGceTestResults* aGceTestResults,
|
sl@0
|
156 |
CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
|
sl@0
|
157 |
|
sl@0
|
158 |
IMPORT_C virtual void Rotate(const TSize& aScreenSize);
|
sl@0
|
159 |
IMPORT_C virtual void DrawL();
|
sl@0
|
160 |
~CTestUiWindow();
|
sl@0
|
161 |
|
sl@0
|
162 |
protected:
|
sl@0
|
163 |
IMPORT_C CTestUiWindow(TInt aScreenNo, TDisplayMode aMode);
|
sl@0
|
164 |
|
sl@0
|
165 |
private:
|
sl@0
|
166 |
void ConstructL(const TPtrC& aMultiBitmapUiFile, TInt aMultiBitmapUiFileSize, CArrayFixFlat<TRect>* aRectArray,
|
sl@0
|
167 |
TInt aFrameDuration, TInt aMultiBitmapUiFileTransparency, TGceTestResults* aGceTestResults,
|
sl@0
|
168 |
CArrayFixFlat<TDrawParameters>* aLoadsaParameters);
|
sl@0
|
169 |
TParamChange Redraw();
|
sl@0
|
170 |
void CalcNewWindowExtent(TSize aScreenSize, TInt aIncrement, TInt aDirection);
|
sl@0
|
171 |
void SetBitmapTransparency(CFbsBitmap* aBitmap, TUint8 aAlphaValue, TInt aAlphaByteLocation);
|
sl@0
|
172 |
|
sl@0
|
173 |
void ParamChangeCyclicPositionAndSize(TDrawParameters& aDrawParams, TInt aFrameCounter);
|
sl@0
|
174 |
void ParamChangeCyclicPosition(TDrawParameters& aDrawParams, TInt aFrameCounter);
|
sl@0
|
175 |
void CalcNewWindowLocation(TSize aScreensize, TInt aIncrement, TInt aDirection,TDrawParameters& aDrawParams);
|
sl@0
|
176 |
void SetBitmapAlpha(CFbsBitmap* aBitmap);
|
sl@0
|
177 |
|
sl@0
|
178 |
protected:
|
sl@0
|
179 |
TBool iSimUiDrawn;
|
sl@0
|
180 |
TPtrC iMultiBitmapUiFile;
|
sl@0
|
181 |
TInt iMultiBitmapUiFileSize;
|
sl@0
|
182 |
CArrayFixFlat<TRect>* iRectArray;
|
sl@0
|
183 |
TInt iMultiBitmapUiFileTransparency;
|
sl@0
|
184 |
TInt iFrameDuration;
|
sl@0
|
185 |
};
|
sl@0
|
186 |
|
sl@0
|
187 |
#endif //__T_PSEUDOAPPWINDOW_H__
|