sl@0
|
1 |
// Copyright (c) 1996-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
/**
|
sl@0
|
17 |
@file
|
sl@0
|
18 |
@test
|
sl@0
|
19 |
@internalComponent - Internal Symbian test code
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
|
sl@0
|
23 |
#ifndef __TEVENT_H__
|
sl@0
|
24 |
#define __TEVENT_H__
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <e32std.h>
|
sl@0
|
27 |
#include <e32cmn.h>
|
sl@0
|
28 |
#include <w32std.h>
|
sl@0
|
29 |
#include "../tlib/testbase.h"
|
sl@0
|
30 |
#include "AUTO.H"
|
sl@0
|
31 |
#include "AUTODLL.H"
|
sl@0
|
32 |
#include "../TClick/CLICK.H"
|
sl@0
|
33 |
#include "TGraphicsHarness.h"
|
sl@0
|
34 |
#ifndef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
35 |
#include <graphics/surfacemanager.h>
|
sl@0
|
36 |
#include <graphics/surfaceupdateclient.h>
|
sl@0
|
37 |
#endif //TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
38 |
|
sl@0
|
39 |
const TInt EMaxEventQueueSize=32;
|
sl@0
|
40 |
const TInt EMinQueueSize = 2;
|
sl@0
|
41 |
const TUint KModifiersIgnore = 0xffffffff;
|
sl@0
|
42 |
|
sl@0
|
43 |
|
sl@0
|
44 |
class CTEventTest;
|
sl@0
|
45 |
class CTQueueClient;
|
sl@0
|
46 |
|
sl@0
|
47 |
class TWsQTEvent : public TWsEvent
|
sl@0
|
48 |
{
|
sl@0
|
49 |
friend class CTEventTest;
|
sl@0
|
50 |
public:
|
sl@0
|
51 |
inline TTime& Time() {return iTime;}
|
sl@0
|
52 |
};
|
sl@0
|
53 |
|
sl@0
|
54 |
class CTQueueTestEvent : public CTEvent
|
sl@0
|
55 |
{
|
sl@0
|
56 |
enum {EEventBufferSize=40};
|
sl@0
|
57 |
public:
|
sl@0
|
58 |
CTQueueTestEvent(RWsSession *aWs, CTEventTest *aTest);
|
sl@0
|
59 |
void ConstructL();
|
sl@0
|
60 |
void AddExpectedEvent(TWsEvent &aEvent);
|
sl@0
|
61 |
inline void ResetCount(TInt aSet) {iEventCount=0;iEventSet=aSet;iLastEventError=EFalse;}
|
sl@0
|
62 |
TInt EventsLeft();
|
sl@0
|
63 |
inline void SetCheckTimeStamp(TBool aCheck) {iCheckTimeStamp = aCheck;}
|
sl@0
|
64 |
protected:
|
sl@0
|
65 |
void doRunL();
|
sl@0
|
66 |
private:
|
sl@0
|
67 |
void TestL(TInt aTest);
|
sl@0
|
68 |
private:
|
sl@0
|
69 |
CCirBuf<TWsEvent> iEventBuffer;
|
sl@0
|
70 |
CTEventTest *iTest;
|
sl@0
|
71 |
TInt iEventCount;
|
sl@0
|
72 |
TInt iEventSet;
|
sl@0
|
73 |
TBool iCheckTimeStamp;
|
sl@0
|
74 |
TPartialRedrawType iRedrawType;
|
sl@0
|
75 |
TBool iLastEventError;
|
sl@0
|
76 |
};
|
sl@0
|
77 |
|
sl@0
|
78 |
const TInt EWinPositionX=6;
|
sl@0
|
79 |
const TInt EWinPositionY=9;
|
sl@0
|
80 |
const TInt EWinWidth=100;
|
sl@0
|
81 |
const TInt EWinHeight=50;
|
sl@0
|
82 |
// (6,9)
|
sl@0
|
83 |
// +----------------------+
|
sl@0
|
84 |
// | (31,21) |
|
sl@0
|
85 |
// | +--------------+ |
|
sl@0
|
86 |
// | | | |
|
sl@0
|
87 |
// | | | |
|
sl@0
|
88 |
// | +--------------+ |
|
sl@0
|
89 |
// | (81,46) |
|
sl@0
|
90 |
// +----------------------+ (106,59)
|
sl@0
|
91 |
|
sl@0
|
92 |
class CTQueueClient : public CTClient
|
sl@0
|
93 |
{
|
sl@0
|
94 |
private:
|
sl@0
|
95 |
enum {EMaxKeysDown=50};
|
sl@0
|
96 |
public:
|
sl@0
|
97 |
CTQueueClient(CTEventTest *aTest);
|
sl@0
|
98 |
~CTQueueClient();
|
sl@0
|
99 |
void ConstructL(TBool aCreateChild);
|
sl@0
|
100 |
void ConstructEventHandlerL();
|
sl@0
|
101 |
void AddExpectedEvent(TWsEvent &aEvent);
|
sl@0
|
102 |
TInt WindowGroupIdentifier();
|
sl@0
|
103 |
CTWinBase* GetHandle(TPoint& aPos);
|
sl@0
|
104 |
void SetChildCapture(TInt aCaptureFlags);
|
sl@0
|
105 |
inline void ResetCount(TInt aSet) {EventQueue()->ResetCount(aSet);}
|
sl@0
|
106 |
inline void EnableFocusChangeEvents() {iGroup->GroupWin()->EnableFocusChangeEvents();}
|
sl@0
|
107 |
inline void DisableFocusChangeEvents() {iGroup->GroupWin()->DisableFocusChangeEvents();}
|
sl@0
|
108 |
inline void EnableGroupListChangeEvents() {iGroup->GroupWin()->EnableGroupListChangeEvents();}
|
sl@0
|
109 |
inline void DisableGroupListChangeEvents() {iGroup->GroupWin()->DisableGroupListChangeEvents();}
|
sl@0
|
110 |
inline CTQueueTestEvent* EventQueue() {return STATIC_CAST(CTQueueTestEvent*,iEventHandler);}
|
sl@0
|
111 |
inline TPoint ChildTopLeft() {return TPoint(EWinWidth/4,EWinHeight/4);}
|
sl@0
|
112 |
inline TSize ChildSize() {return TSize(EWinWidth/2,EWinHeight/2);}
|
sl@0
|
113 |
void CreateEventTestGroupOnSecondScreenL();
|
sl@0
|
114 |
void CloseEventTestGroupOnSecondScreen();
|
sl@0
|
115 |
private:
|
sl@0
|
116 |
inline TPoint ParentTopLeft() {return TPoint(EWinPositionX,EWinPositionY);}
|
sl@0
|
117 |
inline TPoint ChildAbsTopLeft() {return ParentTopLeft()+ChildTopLeft();}
|
sl@0
|
118 |
private:
|
sl@0
|
119 |
TInt iKeysDown[EMaxKeysDown];
|
sl@0
|
120 |
TInt iNumKeysDown;
|
sl@0
|
121 |
CTEventTest *iTest;
|
sl@0
|
122 |
public:
|
sl@0
|
123 |
CTBackedUpWin *iChildWin;
|
sl@0
|
124 |
CTBackedUpWin *iWin;
|
sl@0
|
125 |
TBool iChildCapturing;
|
sl@0
|
126 |
TBool iCapturing;
|
sl@0
|
127 |
CWsScreenDevice* iSndScreen;
|
sl@0
|
128 |
RWindowGroup* iWinGp1;
|
sl@0
|
129 |
RWindowGroup* iWinGp2;
|
sl@0
|
130 |
};
|
sl@0
|
131 |
|
sl@0
|
132 |
class REventAnimBase : public RTestAnim
|
sl@0
|
133 |
{
|
sl@0
|
134 |
public:
|
sl@0
|
135 |
enum EAnimationType
|
sl@0
|
136 |
{
|
sl@0
|
137 |
EEventAnim,
|
sl@0
|
138 |
EEventPostingAnim
|
sl@0
|
139 |
};
|
sl@0
|
140 |
REventAnimBase(RAnimDll* aDll) :RTestAnim(*aDll) {}
|
sl@0
|
141 |
virtual void Destroy();
|
sl@0
|
142 |
void Reset();
|
sl@0
|
143 |
TInt ErrorCode();
|
sl@0
|
144 |
TInt NumberOfEventsReceived();
|
sl@0
|
145 |
TInt AddExpectedEvent(TBool aEat, const TRawEvent& aEvent);
|
sl@0
|
146 |
TInt AddExpectedEvent(const TAnimRawEvent& aEvent);
|
sl@0
|
147 |
static RAnimDll* LoadL();
|
sl@0
|
148 |
};
|
sl@0
|
149 |
|
sl@0
|
150 |
/**
|
sl@0
|
151 |
Client side handle to server-side anim class used for Anim Event tests
|
sl@0
|
152 |
@internalComponent
|
sl@0
|
153 |
@test
|
sl@0
|
154 |
*/
|
sl@0
|
155 |
class REventAnim : public REventAnimBase
|
sl@0
|
156 |
{
|
sl@0
|
157 |
public:
|
sl@0
|
158 |
static REventAnim* NewL(RWindowBase* aWin, RAnimDll* aDll, REventAnimBase::EAnimationType aType=EEventAnim);
|
sl@0
|
159 |
inline REventAnim(RAnimDll* aDll) : REventAnimBase(aDll) {}
|
sl@0
|
160 |
inline TInt AddEvent(const TAnimRawEvent& aEvent) {return REventAnimBase::AddExpectedEvent(aEvent);};
|
sl@0
|
161 |
inline TInt GetError() {return REventAnimBase::ErrorCode();};
|
sl@0
|
162 |
inline TInt GetNumEvents() {return REventAnimBase::NumberOfEventsReceived();};
|
sl@0
|
163 |
TInt TestFail(TInt aNoEvents);
|
sl@0
|
164 |
};
|
sl@0
|
165 |
|
sl@0
|
166 |
/**
|
sl@0
|
167 |
Client side handle to server-side anim class used for Event Handler Removal tests
|
sl@0
|
168 |
|
sl@0
|
169 |
RRemovableAnim is an anim which removes itself from the event handler list
|
sl@0
|
170 |
after receiving n events, where n is the 'lifetime' of the anim measured in events received.
|
sl@0
|
171 |
|
sl@0
|
172 |
@internalComponent
|
sl@0
|
173 |
@test
|
sl@0
|
174 |
*/
|
sl@0
|
175 |
class RRemovableAnim : public REventAnimBase
|
sl@0
|
176 |
{
|
sl@0
|
177 |
public:
|
sl@0
|
178 |
static RRemovableAnim* NewLC(RWindowBase* aWin, RAnimDll* aDll);
|
sl@0
|
179 |
inline RRemovableAnim(RAnimDll* aDll) : REventAnimBase(aDll) {}
|
sl@0
|
180 |
inline TInt AddExpectedEvent(const TRawEvent& aEvent) {return REventAnimBase::AddExpectedEvent(EFalse, aEvent);};
|
sl@0
|
181 |
TInt SetEventHandlerLifetime(TInt aEventCount);
|
sl@0
|
182 |
TInt EventHandlerLifetime();
|
sl@0
|
183 |
TInt AddToEventHandlers();
|
sl@0
|
184 |
TInt RemoveFromEventHandlers();
|
sl@0
|
185 |
TBool TestPassed();
|
sl@0
|
186 |
};
|
sl@0
|
187 |
|
sl@0
|
188 |
class CTEventTest : public CTWsGraphicsBase
|
sl@0
|
189 |
{
|
sl@0
|
190 |
enum {
|
sl@0
|
191 |
EKeyboardInitialRepeat1=1234567,
|
sl@0
|
192 |
EKeyboardRepeat1=555666,
|
sl@0
|
193 |
EKeyboardInitialRepeat2=2121212,
|
sl@0
|
194 |
EKeyboardRepeat2=20000,
|
sl@0
|
195 |
EDoubleClickTime1=900000,
|
sl@0
|
196 |
EDoubleClickGap1=10,
|
sl@0
|
197 |
EDoubleClickTime2=4000000,
|
sl@0
|
198 |
EDoubleClickGap2=5,
|
sl@0
|
199 |
ENumVisWins=2,
|
sl@0
|
200 |
EPointerCursorUpdateGap=50000, //0.05secs Same as WsPointer::EPointerUpdateGapInMicroSeconds
|
sl@0
|
201 |
EKeyboardInitialRepeat3=2147483447, // Max value
|
sl@0
|
202 |
EKeyboardRepeat3=8000, // for repeat 3
|
sl@0
|
203 |
EKeyboardInitialRepeat4=-2, // Min value
|
sl@0
|
204 |
EKeyboardRepeat4=6000, // for repeat 4
|
sl@0
|
205 |
EKeyboardRepeat5=7000, // for repeat 4z
|
sl@0
|
206 |
EKeyboardRepeat6=-30000, // for repeat 4
|
sl@0
|
207 |
EKeyboardRepeat7=2147483447, // for repeat 4
|
sl@0
|
208 |
};
|
sl@0
|
209 |
public:
|
sl@0
|
210 |
CTEventTest(CTestStep* aStep);
|
sl@0
|
211 |
~CTEventTest();
|
sl@0
|
212 |
//TestState DoTestL();
|
sl@0
|
213 |
void ConstructL();
|
sl@0
|
214 |
void General();
|
sl@0
|
215 |
void General2();
|
sl@0
|
216 |
void Failed();
|
sl@0
|
217 |
//void QueuePurgingL();
|
sl@0
|
218 |
//void SendEventL();
|
sl@0
|
219 |
//void InvisibleWindowL();
|
sl@0
|
220 |
//void JavaAdditionsL();
|
sl@0
|
221 |
void WindowCapBugL();
|
sl@0
|
222 |
//void XyInputTypeL();
|
sl@0
|
223 |
//void MovingPointerCursorL();
|
sl@0
|
224 |
//void RotatedModeL();
|
sl@0
|
225 |
//void AnimEvent();
|
sl@0
|
226 |
void CheckTimeInterval(const TTimeIntervalMicroSeconds32 &aTime,TInt EKeyboardRepeat1);
|
sl@0
|
227 |
void KeyRepeatRate(TInt aInitialRepeat, TInt aRepeat);
|
sl@0
|
228 |
void KeyRepeatRateNegTest(TInt aInitialRepeat, TInt aRepeat);
|
sl@0
|
229 |
void DoubleClickSettings(TInt aInterval, TInt aDistance);
|
sl@0
|
230 |
void NextSetOfEventsL();
|
sl@0
|
231 |
inline void ResetCount(TInt aSet) {iQueueClient->ResetCount(aSet);}
|
sl@0
|
232 |
protected:
|
sl@0
|
233 |
//from CTGraphicsStep
|
sl@0
|
234 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
sl@0
|
235 |
private:
|
sl@0
|
236 |
enum
|
sl@0
|
237 |
{
|
sl@0
|
238 |
EDoRot0 =0x01,
|
sl@0
|
239 |
EDoRot90 =0x02,
|
sl@0
|
240 |
EDoRot180=0x04,
|
sl@0
|
241 |
EDoScale=0x80,
|
sl@0
|
242 |
};
|
sl@0
|
243 |
enum TClients
|
sl@0
|
244 |
{
|
sl@0
|
245 |
ETheClient,
|
sl@0
|
246 |
EQueueClient,
|
sl@0
|
247 |
};
|
sl@0
|
248 |
enum TCaptureKeyApis
|
sl@0
|
249 |
{
|
sl@0
|
250 |
ECaptureKey1,
|
sl@0
|
251 |
ECaptureKey2,
|
sl@0
|
252 |
ECaptureKeyUpAndDowns1,
|
sl@0
|
253 |
ECaptureKeyUpAndDowns2,
|
sl@0
|
254 |
ECaptureLongKey1,
|
sl@0
|
255 |
ECaptureLongKey2,
|
sl@0
|
256 |
// Add additional enum values before this line
|
sl@0
|
257 |
EMaxCaptureKeyApis
|
sl@0
|
258 |
};
|
sl@0
|
259 |
enum TCancelCaptureKeyApis
|
sl@0
|
260 |
{
|
sl@0
|
261 |
ECancelCaptureKey,
|
sl@0
|
262 |
ECancelCaptureKeyUpAndDowns,
|
sl@0
|
263 |
ECancelCaptureLongKey,
|
sl@0
|
264 |
// Add additional enum values before this line
|
sl@0
|
265 |
EMaxCancelCaptureKeyApis
|
sl@0
|
266 |
};
|
sl@0
|
267 |
enum TLongkeyCapPriorityTests
|
sl@0
|
268 |
{
|
sl@0
|
269 |
ELongkeyCaptureSamePriority,
|
sl@0
|
270 |
ELongkeyCaptureDiffPriority
|
sl@0
|
271 |
};
|
sl@0
|
272 |
private:
|
sl@0
|
273 |
void RunTestsL(TBool aNeedChildWindows=EFalse);
|
sl@0
|
274 |
void RunTestsRestoreAreaL(TBool aNeedChildWindows);
|
sl@0
|
275 |
void QueuePurge_NextSetOfEventsL();
|
sl@0
|
276 |
void InitializeQueueSizeTestL(TBool aEventReadyCancel);
|
sl@0
|
277 |
void SendEventTest_NextSetOfEvents();
|
sl@0
|
278 |
void InvisibleWindow_NextSetOfEvents();
|
sl@0
|
279 |
void JavaAdditions_NextSetOfEvents();
|
sl@0
|
280 |
void XyInputType_NextSetOfEvents();
|
sl@0
|
281 |
void MovingPointerCursor_NextSetOfEventsL();
|
sl@0
|
282 |
void WinCap_NextSetOfEvents();
|
sl@0
|
283 |
void RotatedMode_NextSetOfEventsL();
|
sl@0
|
284 |
void ScreenScaling_NextSetOfEventsL();
|
sl@0
|
285 |
void AnimEvent_NextSetOfEventsL();
|
sl@0
|
286 |
void FocusChanged_NextSetOfEventsL();
|
sl@0
|
287 |
void StopEvents_NextSetOfEventsL();
|
sl@0
|
288 |
void VirtualKeyboard_NextSetOfEventsL();
|
sl@0
|
289 |
void KeyClicks_NextSetOfEvents();
|
sl@0
|
290 |
void CaptureLong_NextSetOfEventsL();
|
sl@0
|
291 |
void Password_NextSetOfEvents();
|
sl@0
|
292 |
void GroupListChanged_NextSetOfEventsL();
|
sl@0
|
293 |
void VisibilityChanged_NextSetOfEventsL();
|
sl@0
|
294 |
#ifndef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
295 |
void KeyEventTranslation_NextSetOfEventsL();
|
sl@0
|
296 |
void KeyEventBlocking_NextSetOfEventsL();
|
sl@0
|
297 |
void KeyEventAppRestriction_NextSetOfEventsL();
|
sl@0
|
298 |
void KeyEventAppPriority_NextSetOfEventsL();
|
sl@0
|
299 |
#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
|
sl@0
|
300 |
void SurfaceVisibilityChanged1_NextSetOfEventsL();
|
sl@0
|
301 |
void SurfaceVisibilityChanged2_NextSetOfEventsL();
|
sl@0
|
302 |
void SurfaceVisibilityChanged3_NextSetOfEventsL();
|
sl@0
|
303 |
#endif //SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
|
sl@0
|
304 |
#endif //TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
305 |
void CheckTimeStamp_NextSetOfEventsL();
|
sl@0
|
306 |
void RepeatableKeysL();
|
sl@0
|
307 |
void PointerCapture_NextSetOfEventsL();
|
sl@0
|
308 |
void PointerBufferPurge_NextSetOfEventsL();
|
sl@0
|
309 |
void MismatchedCapture_NextSetOfEventsL();
|
sl@0
|
310 |
void EventHandlerRemoval_NextSetOfEventsL();
|
sl@0
|
311 |
void EventHandlerRemoval_CreateAnimsL(TInt aAnimCount);
|
sl@0
|
312 |
void EventHandlerRemoval_PrepareAnims(const TInt* aLifeTimes, TInt aAnimCount);
|
sl@0
|
313 |
void EventHandlerRemoval_CreateExpectedEvents(TInt aEventCount, TInt aLiveAnimCount);
|
sl@0
|
314 |
void EventHandlerRemoval_AddExpectedEvent(TRawEvent aEvent, TInt aLiveAnimCount);
|
sl@0
|
315 |
void EventHandlerRemoval_CheckExpectedEventsReceivedByAnims();
|
sl@0
|
316 |
void EventHandlerRemoval_CheckRecursionOfProcessRawEvent();
|
sl@0
|
317 |
void EventHandlerRemoval_ManuallyRemoveAllAnims();
|
sl@0
|
318 |
void EventHandlerRemoval_ResetAllAnims();
|
sl@0
|
319 |
void EventHandlerRemoval_RemoveAndResetAllAnims();
|
sl@0
|
320 |
void EventHandlerRemoval_DestroyAllAnims();
|
sl@0
|
321 |
void EventHandlerRemoval_AddEventHandlerMultipleTimes();
|
sl@0
|
322 |
void CheckPointerCursorInDifferentScreenMode(TSizeMode aMode,TPoint aOrigin);
|
sl@0
|
323 |
void SimulateAndCheck(TPoint aOrigin,TSize aScale,TInt aXOffset,TInt aYOffset,TPointerEvent::TType aEventType,TRect aPointerCursorArea);
|
sl@0
|
324 |
void AddExpectedKey(TInt aEventCode, TInt aScanCode, TInt aCode=0, TInt aRepeats=0, TUint aModifiers=KModifiersIgnore);
|
sl@0
|
325 |
void AddExpectedKeyDownUp(TInt aScanCode, TInt aCode=0, TInt aRepeats=0, TUint aModifiers=KModifiersIgnore);
|
sl@0
|
326 |
void AddExpectedEvent(TInt aEventCode, CTWinBase* aWin);
|
sl@0
|
327 |
void AddExpectedEvent(TInt aEventCode);
|
sl@0
|
328 |
void AddExpectedEvent(TInt aEventCode,RWindowGroup* aWindow);
|
sl@0
|
329 |
void AddExpectedErrorMessage(TWsErrorMessage::TErrorCategory aCategory, TInt aError);
|
sl@0
|
330 |
void CalculatePointerEvent(TWsEvent& aEvent,TPointerEvent::TType aType, TPoint aPos);
|
sl@0
|
331 |
void CalculatePointerCaptureEvent(TWsEvent& aEvent,TPointerEvent::TType aType, TPoint aPos, TInt aHandle=0);
|
sl@0
|
332 |
void AddExpectedPointer(TPointerEvent::TType aType, TPoint aPos);
|
sl@0
|
333 |
void AddExpectedPointerCapture(TPointerEvent::TType aType, TPoint aPos, TInt aHandle=0);
|
sl@0
|
334 |
void AddExpectedPointerClick(TPointerEvent::TType aType, TPoint aPos);
|
sl@0
|
335 |
void AddExpectedPointerDownUp(TPoint aPos);
|
sl@0
|
336 |
inline void AddExpectedPointerScr(TPointerEvent::TType aType, TPoint aPos);
|
sl@0
|
337 |
inline void AddExpectedPointerDownUpScr(TPoint aPos);
|
sl@0
|
338 |
void AddExpectedModifiersChanged(TInt aChangedModifiers, TInt aModifiers);
|
sl@0
|
339 |
void AddExpectedEnterExit(TInt aEventCode, TPoint aPos);
|
sl@0
|
340 |
void AddExpectedKeyAnim(TRawEvent::TType aEventCode, TInt aScanCode,TBool aEat);
|
sl@0
|
341 |
void AddExpectedPointerAnim(TRawEvent::TType aEventCode, TPoint aPoint, TBool aEat=ETrue);
|
sl@0
|
342 |
void AddExpectedVisibilityChange(TUint aFlags);
|
sl@0
|
343 |
void AddExpectedVisibilityChange(TUint aFlags, CTBlankWindow* aWindow);
|
sl@0
|
344 |
inline void SimulatePointerWin(TRawEvent::TType aType, TInt aX, TInt aY);
|
sl@0
|
345 |
inline void SimulatePointerDownUpWin(TInt aX, TInt aY);
|
sl@0
|
346 |
inline void SimulatePointer(TRawEvent::TType aType, TInt aX, TInt aY);
|
sl@0
|
347 |
void doSendEvent(TWsEvent &aEvent);
|
sl@0
|
348 |
void SendKey(TInt aEventCode, TInt aScanCode, TInt aCode=0, TInt iRepeats=0);
|
sl@0
|
349 |
void SendEvent(TInt aEventCode);
|
sl@0
|
350 |
void CreateEventTestGroup();
|
sl@0
|
351 |
void CloseEventTestGroup();
|
sl@0
|
352 |
void CreateAndCloseEventTestGroup();
|
sl@0
|
353 |
void TriggerOomMessage(TTimeIntervalMinutes aPeriod);
|
sl@0
|
354 |
TBool SetClickType(TClickOutputModes aType);
|
sl@0
|
355 |
CTBlankWindow* NewBlueForgroundWindowL();
|
sl@0
|
356 |
CTBlankWindow* NewBlueForgroundWindow();
|
sl@0
|
357 |
TInt KeyRepeatTime() const;
|
sl@0
|
358 |
void EventQueuePtrCrashTest();
|
sl@0
|
359 |
TInt ClickCommandReply(TInt aCommand,TInt aData);
|
sl@0
|
360 |
TInt CreateGroupWindow(RWindowGroup& aWinGp,TClients aClient,TInt& aWinGpId);
|
sl@0
|
361 |
void CloseGroupWindow(RWindowGroup& aWinGp,TInt aWinGpId);
|
sl@0
|
362 |
void CloseWindow(RWindowBase& aWin,TInt aHandle,TInt aWinGpId);
|
sl@0
|
363 |
void EventQueueExpansionTestL();
|
sl@0
|
364 |
void RawEventRepeatTest_NextSetOfEventsL();
|
sl@0
|
365 |
void SimulateRepeatEvent(TInt aScanCode, TInt aRepeats=0);
|
sl@0
|
366 |
#if !defined(TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA)
|
sl@0
|
367 |
void SimulateButton1DownWithSimulatedMove(TInt aX, TInt aY);
|
sl@0
|
368 |
#endif
|
sl@0
|
369 |
void TestCaptureAndCancelCapturePair(TCaptureKeyApis aCaptureApi, TCancelCaptureKeyApis aCancelCaptureApi);
|
sl@0
|
370 |
static TInt GenerateAnEvent(TAny* aEventTest);
|
sl@0
|
371 |
void CheckLongkeyCaptureWithPriority(TLongkeyCapPriorityTests aTestType);
|
sl@0
|
372 |
void DelayForRepeatEvents(TInt aNumeratorFracVal, TInt aDenominatorFracVal);
|
sl@0
|
373 |
#ifndef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
374 |
void SpawnCaptureAppL(RProcess& aProcess);
|
sl@0
|
375 |
#endif
|
sl@0
|
376 |
private:
|
sl@0
|
377 |
CTBlankWindow* iBlankWin;
|
sl@0
|
378 |
RBlankWindow iBackingWindow;
|
sl@0
|
379 |
TSize iPhysicalScreenSize;
|
sl@0
|
380 |
TSize iWinSize;
|
sl@0
|
381 |
RWindowGroup iEventTestGroup;
|
sl@0
|
382 |
CTWindowGroup *iEventTestGroup2;
|
sl@0
|
383 |
CTWindowGroup *iEventTestGroup3;
|
sl@0
|
384 |
CTWindowGroup *iEventTestGroup4;
|
sl@0
|
385 |
TInt iEventSet;
|
sl@0
|
386 |
CTQueueClient *iQueueClient;
|
sl@0
|
387 |
TBool iFailed;
|
sl@0
|
388 |
REventAnim* iAnim;
|
sl@0
|
389 |
TUint iScreenModeTests; //currently contains supported rotation and if screen scaling is possible
|
sl@0
|
390 |
TInt iNumScrModes;
|
sl@0
|
391 |
RSoundPlugIn iClick;
|
sl@0
|
392 |
TBool iAddToClick;
|
sl@0
|
393 |
TInt iCaptureKey;
|
sl@0
|
394 |
TBool iTurnBackOnCapsLock;
|
sl@0
|
395 |
TInt iCurrentMode;
|
sl@0
|
396 |
TSizeMode iSizeMode;
|
sl@0
|
397 |
TBool iTheClientFlush;
|
sl@0
|
398 |
TBool iQuequeClientFlush;
|
sl@0
|
399 |
CTBlankWindow* iVisWins1;
|
sl@0
|
400 |
CTBlankWindow* iVisWins2;
|
sl@0
|
401 |
CTBlankWindow* iVisWins3;
|
sl@0
|
402 |
CTransWindow* iTransWin;
|
sl@0
|
403 |
RAnimDll* iAnimDll;
|
sl@0
|
404 |
RPointerArray<RRemovableAnim>* iRemovableAnims;
|
sl@0
|
405 |
TBool iIs3DPointer;
|
sl@0
|
406 |
TBool iPtrPluginLoaded;
|
sl@0
|
407 |
TInt iYOffset;
|
sl@0
|
408 |
TTimeIntervalMicroSeconds32 iKeyBoardRepeatInitialDelay;
|
sl@0
|
409 |
TTimeIntervalMicroSeconds32 iKeyBoardRepeatNextDelay;
|
sl@0
|
410 |
#ifndef TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
411 |
RProcess iCaptureApp1;
|
sl@0
|
412 |
RProcess iCaptureApp2;
|
sl@0
|
413 |
#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
|
sl@0
|
414 |
TSurfaceId iSurfaceId;
|
sl@0
|
415 |
RSurfaceManager iSurfaceManager;
|
sl@0
|
416 |
CPeriodic* iTimeOutCallback;
|
sl@0
|
417 |
#endif // SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
|
sl@0
|
418 |
#endif // TEST_GRAPHICS_WSERV_TAUTOSERVER_NONNGA
|
sl@0
|
419 |
};
|
sl@0
|
420 |
|
sl@0
|
421 |
class CTQueueWindowGroup : public CTWindowGroup
|
sl@0
|
422 |
{
|
sl@0
|
423 |
public:
|
sl@0
|
424 |
CTQueueWindowGroup(CTClient *aClient);
|
sl@0
|
425 |
void ConstructL();
|
sl@0
|
426 |
private:
|
sl@0
|
427 |
TInt iNumOnEvents;
|
sl@0
|
428 |
};
|
sl@0
|
429 |
|
sl@0
|
430 |
class CTEventTestStep : public CTGraphicsStep
|
sl@0
|
431 |
{
|
sl@0
|
432 |
public:
|
sl@0
|
433 |
CTEventTestStep();
|
sl@0
|
434 |
protected:
|
sl@0
|
435 |
//from CTGraphicsStep
|
sl@0
|
436 |
virtual CTGraphicsBase* CreateTestL();
|
sl@0
|
437 |
};
|
sl@0
|
438 |
|
sl@0
|
439 |
_LIT(KTEventTestStep,"TEventTest");
|
sl@0
|
440 |
|
sl@0
|
441 |
|
sl@0
|
442 |
#endif
|