1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/TKEY.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,115 @@
1.4 +// Copyright (c) 1996-2009 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 __TKEY_H__
1.26 +#define __TKEY_H__
1.27 +
1.28 +#include <e32std.h>
1.29 +#include <w32std.h>
1.30 +#include "../tlib/testbase.h"
1.31 +#include "AUTO.H"
1.32 +#include <hal.h>
1.33 +#include "TGraphicsHarness.h"
1.34 +
1.35 +_LIT(KSemaphoreName,"KeyProcSem");
1.36 +
1.37 +
1.38 +class CVisibleGroup: public CBase
1.39 + {
1.40 +public:
1.41 + CVisibleGroup(TInt aScreenNo);
1.42 + ~CVisibleGroup();
1.43 + void ConstructL();
1.44 + void SetMode(TInt aMode);
1.45 +private:
1.46 + RWsSession iWs;
1.47 + RWindowGroup iGroup;
1.48 + CWsScreenDevice* iScr;
1.49 + TInt iScreenNo;
1.50 + TInt iMode;
1.51 + };
1.52 +
1.53 +
1.54 +class ClientToKill : public CTClient
1.55 + {
1.56 +public:
1.57 + ClientToKill();
1.58 + ~ClientToKill();
1.59 + void ConstructL();
1.60 +private:
1.61 + TestWindow *iTestWin;
1.62 + };
1.63 +
1.64 +
1.65 +
1.66 +class CTKey : public CTWsGraphicsBase
1.67 + {
1.68 +public:
1.69 + enum {EFuncCtrlShift=EModifierFunc|EModifierCtrl|EModifierShift};
1.70 +public:
1.71 + CTKey(CTestStep* aStep);
1.72 + ~CTKey();
1.73 + void ConstructL();
1.74 +
1.75 + void KeyOfDeathL();
1.76 + void KeyOfOrientation();
1.77 + void CycleDisplaySize();
1.78 + void ContrastKeysL();
1.79 + void BackLightKeysL();
1.80 + void BrightnessKeysL();
1.81 + void ScreenSizeModeKeysL();
1.82 +protected:
1.83 + virtual void RunTestCaseL(TInt aCurTestCase);
1.84 +private:
1.85 + void SendKey(TInt aScanCode);
1.86 + void SendUpDown(TInt aScanCode);
1.87 + void SendCtrlAltShift(TInt aScanCode);
1.88 + void SendCtrlAltShift(TRawEvent::TType aType);
1.89 + void SetHotKey(THotKey aType, TUint aKeyCode);
1.90 + void LogWindowGroupIds();
1.91 + void TestContrastL(TBool aChange);
1.92 + void TestDefaultContrastL(TBool aChange);
1.93 + void TestBackLightL(TBool aChange);
1.94 + void TestDefaultBackLightL(TBool aChange);
1.95 + void TestBrightnessL(TBool aChange);
1.96 + void TestDefaultBrightnessL(TBool aChange);
1.97 + void TestScreenSizeModeL(TInt aKeys,TBool aChange);
1.98 + void TestDefaultScreenSizeModeL(TInt aKeys,TBool aChange);
1.99 +
1.100 +private:
1.101 + RSemaphore iSem;
1.102 + TSize iWinSize;
1.103 + CVisibleGroup* iVisibleGroup;
1.104 + };
1.105 +
1.106 +class CTKeyStep : public CTGraphicsStep
1.107 + {
1.108 +public:
1.109 + CTKeyStep();
1.110 +protected:
1.111 + //from CTGraphicsStep
1.112 + virtual CTGraphicsBase* CreateTestL();
1.113 + };
1.114 +
1.115 +_LIT(KTKeyStep,"TKey");
1.116 +
1.117 +
1.118 +#endif