Update contrib.
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_PSEUDOAPPSURFACEDWINDOW_H__
23 #define __T_PSEUDOAPPSURFACEDWINDOW_H__
26 #include <gdi.h> //Display modes
27 #include <iniparser.h>
29 #include <graphics/surface.h> //TSurfaceId
30 #include <graphics/surfacemanager.h> //RSurfaceManager
32 #include "t_pseudoappwindow.h"
33 #include "t_pseudoappanim.h"
34 #include "t_pseudoapptestresults.h"
35 #include "t_pseudoappshared.h"
37 class CTestSurfacedWindow : public CBase
56 static CTestSurfacedWindow* NewL(TInt aScreenNo, TInt aWindowNumber, TDisplayMode aMode, TInt aFrameDuration, const TSize& aScreenSize, TGceTestResults* aGceTestResults,
57 const TDesC& aConfigFileName, CTPseudoAppShared& aPseudoAppShared);
58 void UpdateL(SurfaceDetails& aSurfDetails);
59 void RotateL(TInt aScreenNo, TInt aWindowNumber, const TSize& aScreenSize, TInt aFrameNumber);
60 TBool RotationSupported();
61 ~CTestSurfacedWindow();
64 CTestSurfacedWindow(TInt aScreenNo, TInt aWindowNumber, CTPseudoAppShared& aPseudoAppShared);
65 void ConstructL(TInt aScreenNo, TInt aWindowNumber, TDisplayMode aMode, TInt aFrameDuration, const TSize& aScreenSize, TGceTestResults* aGceTestResults,
66 const TDesC& aConfigFileName);
67 void CreateSurfaceManager();
68 void DestroySurfaceManager();
69 void DestroySurface();
70 CTestAnimation* CreateAnimationL(TInt aAppType, const TSize& aAnimSize, const TSize& aSurfaceSize,
71 TPtrC& aBitmapFile, TDisplayMode aDisplayMode,
72 TInt aHorizontalRate, TInt aVerticalRate, TPixelFormat aPixelFormat);
73 void ImportWindowConfigL(TInt aScreenNo, TInt aWindowNo, TDisplayMode aMode, TInt aFrameDuration, const TSize& aScreenSize, TGceTestResults* aGceTestResults);
74 void ImportSurfaceConfigL(TInt aScreenNo, TInt aWindowNo, const TSize& aScreenSize, TSize& aSurfaceSize, TInt& aSurfacePresent, TPixelFormat& aPixelFormat);
75 void ImportAnimConfigL(TInt aScreenNo, TInt aWindowNo, TDisplayMode aMode, const TSize& aSurfaceSize, TPixelFormat aPixelFormat);
76 CArrayFixFlat<TInt>* ImportWindowSizeChangeParamsL(const TDesC& tempStore);
77 CArrayFixFlat<TInt>* ImportWindowPositionChangeParamsL(const TDesC& tempStore);
78 CArrayFixFlat<TRect>* ImportWindowBitmapParamsL(const TDesC& tempStore, TInt aMultiBitmapUiFileSize, const TSize& aScreenSize);
79 void BuildDimensionArrayL(const TSize& aScreenSize, TInt aFrameDuration, TInt aWindowChangeGeometry, TInt aWindowChangeBehavior);
80 void ParamChangeCyclicPosition(TDrawParameters& aDrawParams, TInt aFrameCounter, TInt aFrameDuration, const TSize& aScreenSize);
81 void ParamChangeCyclicPositionAndSize(TDrawParameters& aDrawParams, TInt aFrameCounter, TInt aFrameDuration, const TSize& aScreenSize);
82 void ParamChangeOpacity(TInt aFrameCounter, TInt aFrameDuration, TDrawParameters& aDrawParams);
83 void CalcNewWindowLocation(const TSize& aScreensize, TInt aIncrement, TInt aDirection,TDrawParameters& aDrawParams);
86 CTestWindow* iTestWindow;
87 CTestAnimation* iTestAnimation;
88 CArrayFixFlat<TInt>* iSizeArray;
89 CArrayFixFlat<TInt>* iPositionArray;
90 CArrayFixFlat<TRect>* iLoadsarects;
91 CArrayFixFlat<TDrawParameters>* iLoadsaParameters;
92 TGceTestResults* iGceTestResults;
94 TSurfaceId iSurfaceId;
95 RSurfaceManager iSurfaceManager;
96 RSurfaceUpdateSession iSurfaceUpdateSession;
97 TInt iSurfaceScreenNumber;
98 TInt iSurfaceBufferNumber;
99 CTestSurfaceRasterizer* iSurfaceRasterizer;
103 CTPseudoAppShared& iPseudoAppShared;
106 #endif //__T_PSEUDOAPPSURFACEDWINDOW_H__