First public contribution.
1 // Copyright (c) 1996-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.
19 @internalComponent - Internal Symbian test code
22 #ifndef __TKREPEAT_H__
23 #define __TKREPEAT_H__
28 #include "../tlib/testbase.h"
30 #include "TGraphicsHarness.h"
34 class CTKRepeat : public CTWsGraphicsBase
36 friend class CRKWindow;
38 CTKRepeat(CTestStep* aStep);
41 void TestKeyboardRepeatRateL(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime);
47 virtual void RunTestCaseL(TInt aCurTestCase);
49 inline TestClient *Client() {return TheClient;}
51 TTimeIntervalMicroSeconds32 iOldInitialTime;
52 TTimeIntervalMicroSeconds32 iOldTime;
58 class CRKWindow : public CTWin
61 EStateWaitingForKeyDown,
62 EStateWaitingForKeyCode,
63 EStateWaitingForFirstRepeat,
64 EStateWaitingForNthRepeat,
65 EStateWaitingForKeyUp,
70 CRKWindow(CTKRepeat *aTest);
71 void SetUpL(TPoint pos,TSize size,CTWinBase *parent, CWindowGc &aGc);
72 void SetState(TRKStates aState);
73 void SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime);
74 void WinKeyL(const TKeyEvent &,const TTime &);
75 void KeyUpL(const TKeyEvent &aKey,const TTime &aTime);
76 void KeyDownL(const TKeyEvent &aKey,const TTime &aTime);
88 TTimeIntervalMicroSeconds32 iInitialRepeatSet;
89 TTimeIntervalMicroSeconds32 iRepeatSet;
91 TTimeIntervalMicroSeconds32 iInitialGap;
92 TTimeIntervalMicroSeconds32 iTotalGap;
93 TTimeIntervalMicroSeconds32 iMinGap;
94 TTimeIntervalMicroSeconds32 iMaxGap;
98 class CTKRepeatStep : public CTGraphicsStep
103 //from CTGraphicsStep
104 virtual CTGraphicsBase* CreateTestL();
107 _LIT(KTKRepeatStep,"TKRepeat");