1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicstest/uibench/src/trenderorientation.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,106 @@
1.4 +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @test
1.22 + @internalComponent - Internal Symbian test code
1.23 +*/
1.24 +
1.25 +#ifndef TRENDERORIENTATION_H
1.26 +#define TRENDERORIENTATION_H
1.27 +
1.28 +#include <e32property.h>
1.29 +#include "te_graphicsperformanceSuiteStepBase.h"
1.30 +
1.31 +/**
1.32 +CTWindowSet contains a window server session, a group window and a child window.
1.33 + */
1.34 +class CTWindowSet : public CBase
1.35 + {
1.36 +public:
1.37 + ~CTWindowSet();
1.38 + void ConstructL();
1.39 + void Destroy();
1.40 +
1.41 + inline RWsSession& Session()
1.42 + {return iWs;};
1.43 + inline RWindowGroup& WindowGroup()
1.44 + {return iWindowGroup;};
1.45 +
1.46 +private:
1.47 + RWsSession iWs;
1.48 + RWindowGroup iWindowGroup;
1.49 + RWindow iChildWindow;
1.50 + };
1.51 +
1.52 +/**
1.53 +Test case to test the performance of various use cases which affect the render orientation RProperty
1.54 +*/
1.55 +class CTRenderOrientation : public CTe_graphicsperformanceSuiteStepBase
1.56 + {
1.57 +public:
1.58 + CTRenderOrientation();
1.59 + ~CTRenderOrientation();
1.60 +
1.61 + // From CTestStep
1.62 + virtual TVerdict doTestStepPreambleL();
1.63 + virtual TVerdict doTestStepPostambleL();
1.64 +
1.65 + virtual TVerdict doTestStepL();
1.66 +
1.67 +private:
1.68 + enum TWindowSet
1.69 + {
1.70 + // One per orientation
1.71 + EFirstWindowSet,
1.72 + ESecondWindowSet,
1.73 + EThirdWindowSet,
1.74 + EFourthWindowSet,
1.75 +
1.76 + ENumWindowSets
1.77 + };
1.78 +
1.79 + enum TTestPhase
1.80 + {
1.81 + EIndicatedOrientationChange, // window indicates a new render orientation
1.82 + EWindowOrdinalChange, // window order changed, render orientation dictated by a different window with a different orientation
1.83 + EThemeOrientationChange, // theme orientation changed, render orienation dictated by this due to relevant window being set to EDisplayOrientationAuto
1.84 + EThemeOrientationChangeOnly, // theme orientation change only, to compare timings to above
1.85 +
1.86 + ENumTestPhases
1.87 + };
1.88 +
1.89 + void TestOrientationChangeL(const TDesC& aStepName, TTestPhase aTestPhase);
1.90 +
1.91 + TRenderOrientation GetRenderOrientationL();
1.92 + TRenderOrientation GetThemeOrientationL();
1.93 + TRenderOrientation GetOrientationL(RProperty& aProperty);
1.94 + void ThemeServerProperty(const TDesC& aCmd);
1.95 +
1.96 +private:
1.97 + CTWindowSet iWindowSet[ENumWindowSets];
1.98 + RProperty iWsRenderOrientationProperty;
1.99 + RProperty iThemeOrientationProperty;
1.100 +
1.101 + RTimer iTimeoutTimer;
1.102 + TRequestStatus iTimeoutStatus;
1.103 + TRequestStatus iOrientationStatus;
1.104 + TInt iTimingsTaken;
1.105 + };
1.106 +
1.107 +_LIT(KTRenderOrientation,"trenderorientation");
1.108 +
1.109 +#endif /* TRENDERORIENTATION_H */