graphicstest/uibench/src/trenderorientation.h
changeset 188 1b081cb0800b
child 136 62bb7c97884c
equal deleted inserted replaced
187:9f66f99ee56f 188:1b081cb0800b
       
     1 // Copyright (c) 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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code 
       
    20 */
       
    21 
       
    22 #ifndef TRENDERORIENTATION_H
       
    23 #define TRENDERORIENTATION_H
       
    24 
       
    25 #include <e32property.h>
       
    26 #include "te_graphicsperformanceSuiteStepBase.h"
       
    27 
       
    28 class CWindowStuff : public CBase
       
    29     {
       
    30 public:
       
    31     ~CWindowStuff();
       
    32     void ConstructL();
       
    33     void Destroy();
       
    34 
       
    35     inline RWsSession&     Session()
       
    36         {return iWs;};
       
    37     inline RWindowGroup&   WindowGroup()
       
    38         {return iWindowGroup;};
       
    39 
       
    40 private:
       
    41     RWsSession      iWs;
       
    42     RWindowGroup    iWindowGroup;
       
    43     RWindow         iChildWindow;    
       
    44     };
       
    45 
       
    46 class CTRenderOrientation : public CTe_graphicsperformanceSuiteStepBase
       
    47     {
       
    48 public:
       
    49     CTRenderOrientation();
       
    50     ~CTRenderOrientation();
       
    51 
       
    52     // From CTestStep
       
    53     virtual TVerdict doTestStepPreambleL();
       
    54     virtual TVerdict doTestStepPostambleL();
       
    55     
       
    56     virtual TVerdict doTestStepL();
       
    57 
       
    58 private:
       
    59     enum TWindowThing
       
    60         {
       
    61         // One per orientation
       
    62         EFirstWindowThing,
       
    63         ESecondWindowThing,
       
    64         EThirdWindowThing,
       
    65         EFourthWindowThing,
       
    66         
       
    67         ENumWindowThings
       
    68         };
       
    69     
       
    70     enum TTestPhase
       
    71         {
       
    72         EIndicatedOrientationChange,
       
    73         EWindowOrdinalChange,
       
    74         EThemeOrientationChange,
       
    75         
       
    76         ENumTestPhases
       
    77         };    
       
    78     
       
    79     void TestOrientationChangeL(const TDesC& aStepName, TTestPhase aTestPhase);
       
    80     
       
    81     TRenderOrientation  GetRenderOrientationL();
       
    82     TRenderOrientation  GetThemeOrientationL();
       
    83     TRenderOrientation  GetOrientationL(RProperty& aProperty);
       
    84     void                ThemeServerProperty(const TDesC& aCmd);
       
    85     
       
    86 private:    
       
    87     CWindowStuff    iWindowStuff[ENumWindowThings];
       
    88     RProperty       iWsRenderOrientationProperty;
       
    89     RProperty       iThemeOrientationProperty;
       
    90     
       
    91     RTimer          iTimeoutTimer;
       
    92     TRequestStatus  iTimeoutStatus;
       
    93     TRequestStatus  iRenderOrientationStatus;
       
    94     TInt            iTimingsTaken;
       
    95     };
       
    96 
       
    97 _LIT(KTRenderOrientation,"trenderorientation");
       
    98 
       
    99 #endif /* TRENDERORIENTATION_H */