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
23 #ifndef __TMULTCON_H__
24 #define __TMULTCON_H__
29 #include "../tlib/testbase.h"
31 #include "TGraphicsHarness.h"
36 class CMcConnectionBase : public CTClient
39 CMcConnectionBase(CTMultiCon *aTest);
41 virtual void ConstructL();
42 void SubStateChanged();
49 class CMcConnection : public CMcConnectionBase // Sets AutoForeground off
52 CMcConnection(CTMultiCon *aTest);
56 class CMcWindowGroupAf : public CTWindowGroup
59 CMcWindowGroupAf(CTClient *aClient);
60 void KeyL(const TKeyEvent &aKey, const TTime &aTime);
63 class CMcConnectionAf : public CMcConnectionBase // Sets AutoForeground on
66 CMcConnectionAf(CTMultiCon *aTest);
68 void KeyL(const TKeyEvent &aKey);
71 class CMcConnectionDef : public CMcConnectionBase // Leaves AutoForeground as the default value
74 CMcConnectionDef(CTMultiCon *aTest);
78 class CMcWindowBase : public CTWin
81 CMcWindowBase(CTMultiCon *aTest);
82 void SetUpL(TPoint pos,TSize size,CTWinBase *parent, CWindowGc &aGc);
83 virtual void Draw()=0;
84 virtual void PointerL(const TPointerEvent &pointer,const TTime &)=0;
90 class CMcWindow : public CMcWindowBase
93 CMcWindow(CTMultiCon *aTest);
95 virtual void PointerL(const TPointerEvent &pointer,const TTime &);
98 class CMcWindowAf : public CMcWindowBase
101 CMcWindowAf(CTMultiCon *aTest);
103 virtual void PointerL(const TPointerEvent &pointer,const TTime &);
107 class CMcWindowDef : public CMcWindowBase
110 CMcWindowDef(CTMultiCon *aTest);
112 virtual void PointerL(const TPointerEvent &pointer,const TTime &);
115 class CTMultiCon : public CTWsGraphicsBase
118 enum {KTimeOutAfter=10000000}; //10secs
120 CTMultiCon(CTestStep* aStep);
123 void EndAutoForegroundTest();
124 TInt SubState() const;
126 static TInt TimeOut(TAny* aTest);
128 inline TInt ScreenNumber() const {return(iTest->ScreenNumber());}
130 //from CTGraphicsStep
131 virtual void RunTestCaseL(TInt aCurTestCase);
137 CMcConnectionAf *iConn1;
138 CMcConnection *iConn2;
139 CMcConnectionDef *iConn3;
145 class CTMultiConStep : public CTGraphicsStep
150 //from CTGraphicsStep
151 virtual CTGraphicsBase* CreateTestL();
154 _LIT(KTMultiConStep,"TMultiCon");