Update contrib.
1 // Copyright (c) 2008-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.
14 // teventhandlingperf.h
21 @internalComponent - Internal Symbian test code
25 #ifndef __TMULTIPTREVENTHANDLINGPERF_H__
26 #define __TMULTIPTREVENTHANDLINGPERF_H__
33 _LIT(KChunkName,"MULTIPOINTERSHAREDCHUNK");
36 enum TMultiPtrPerfPanics
38 EMultiPtrPerfPanicWrongTest,
41 class CMultiPtrPerfTestAppUi;
43 class CMultiPtrPerfTestControl : public CCoeControl
45 enum {EEventBufferSize=32};
47 ~CMultiPtrPerfTestControl();
49 void ConstructL(TPoint aOrigin, TSize aSize);
50 TInt CalculateLatencyAndStartThread();
51 void AddExpectedEvent(TAdvancedPointerEvent& aExpEvent);
52 TInt Failed(TPoint3D aExp3DPoint, TPoint3D aActual3DPoint, TInt aErrorCode = 0, TInt aExpPtrNum = 0, TInt aActPtrNum = 0);
53 TInt PointerEventsNotSupported();
56 void HandlePointerEventL(const TPointerEvent& aPointerEvent);
59 CCirBuf<TAdvancedPointerEvent> iEventBuffer;
60 CMultiPtrPerfTestAppUi* iPtrAppUi;
62 TInt iLatLenInLetters;
63 TInt64 iAverageLatency;
66 TBool iPointerEventNotSupported;
69 class CMultiPtrPerfTestAppUi : public CCoeAppUi
72 CMultiPtrPerfTestAppUi();
73 ~CMultiPtrPerfTestAppUi();
76 TInt CreateEventSimulatingThreads();
77 TInt64 TestStartTime() {return iTestStartTime;}
78 TInt& TestCaseNum() {return iTestCaseNum;}
79 void AddExpectedEvent(TAdvancedPointerEvent& aExpEvent);
80 void Failed(TPoint3D aExp3DPoint, TPoint3D aActual3DPoint, TInt aErrorCode = 0, TInt aExpPtrNum = 0, TInt aActPtrNum = 0);
81 void PointerEventsNotSupported();
82 void CloseThread() {iThread.Close();}
83 void SetNumberOfEvents(TInt aNumEvents) {iNumEvents = aNumEvents;}
84 void DecrementEventCount() {--iNumEvents;}
85 TInt EventCount() {return iNumEvents;}
86 RThread& ChildThread() {return iThread;}
90 TInt64 iTestStartTime;
91 CMultiPtrPerfTestControl* iControl;
96 #endif // __TMULTIPTREVENTHANDLINGPERF_H__