First public contribution.
2 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
3 // All rights reserved.
4 // This component and the accompanying materials are made available
5 // under the terms of "Eclipse Public License v1.0"
6 // which accompanies this distribution, and is available
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
20 @internalComponent - Internal Symbian test code
29 #include "../tlib/testbase.h"
31 #include "TGraphicsHarness.h"
34 class CTModifiersChanged;
36 class CMCWindow : public CTWin
39 CMCWindow(CTModifiersChanged *aTest);
40 void SetUpL(TPoint pos,TSize size,CTWinBase *parent, CWindowGc &aGc);
42 void DrawModSetLine(const TDesC &aDes,TInt aModifier,TInt iSettableModifiers);
44 CTModifiersChanged *iTest;
53 class CTEventWindowGroup : public CTWindowGroup
56 CTEventWindowGroup(CTClient *aClient, CTModifiersChanged *iTest);
58 void ModifiersChanged(const TModifiersChangedEvent &aModifiersChanged ,const TTime &aTime);
59 void KeyL(const TKeyEvent &aKey,const TTime &aTime);
61 CTModifiersChanged *iTest;
64 class CTModifiersChanged : public CTWsGraphicsBase
67 CTModifiersChanged(CTestStep* aStep);
68 ~CTModifiersChanged();
72 TInt SubState() const;
75 void ModifierChangedEventsL();
77 void CheckModifier(TEventModifier aModifier);
78 void TestModifiersState(const TModifiersChangedEvent &aModifiersChanged);
81 virtual void RunTestCaseL(TInt aCurTestCase);
83 inline TestClient* Client() {return TheClient;}
85 void ResetModifiers();
86 static TInt TimeOut(TAny* aTest);
92 enum {KTimeOutAfter=30000000}; // 30 seconds (test takes 8 sec on h4)
96 CTEventWindowGroup *iEventGroup;
98 TBool iSkipFirstModifierEvents;
101 TBool iSubSchedulerRunning;
104 class CTModifiersChangedStep : public CTGraphicsStep
107 CTModifiersChangedStep();
109 //from CTGraphicsStep
110 virtual CTGraphicsBase* CreateTestL();
113 _LIT(KTModifiersChangedStep,"TModifiersChanged");