author | William Roberts <williamr@symbian.org> |
Mon, 19 Jul 2010 15:53:40 +0100 | |
changeset 213 | cd1a471fd308 |
parent 90 | 947f0dc9f7a8 |
child 257 | 3e88ff8f41d5 |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 1995-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 the License "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". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// e32\kernel\eventq.cpp |
|
15 |
// |
|
16 |
// |
|
17 |
||
18 |
#include <kernel/kern_priv.h> |
|
19 |
#include "execs.h" |
|
20 |
#include <e32btrace.h> |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
21 |
#include <kerncorestats.h> |
0 | 22 |
/****************************************************** |
23 |
* Event Queue |
|
24 |
******************************************************/ |
|
25 |
||
26 |
/** Release the event queue mutex and panic the current thread with a KERN-EXEC panic. |
|
27 |
*/ |
|
28 |
void EventQueuePanic(TInt aReason) |
|
29 |
{ |
|
30 |
NKern::FMSignal(&K::EventQueueMutex); |
|
31 |
Kern::PanicCurrentThread(KLitKernExec, aReason); |
|
32 |
} |
|
33 |
||
34 |
void K::CreateEventQueue(TInt aSize) |
|
35 |
// |
|
36 |
// Create the event queue |
|
37 |
// |
|
38 |
{ |
|
39 |
||
40 |
__KTRACE_OPT(KBOOT,Kern::Printf("CreateEventQueue")); |
|
41 |
K::EventBufferStart=(TRawEvent *)Kern::Alloc(sizeof(TRawEvent)*aSize); |
|
42 |
if (!K::EventBufferStart) |
|
43 |
K::Fault(K::ECreateEventQueueFailed); |
|
44 |
K::EventBufferEnd=K::EventBufferStart+aSize; |
|
45 |
K::EventHeadPtr=K::EventTailPtr=K::EventBufferStart; |
|
46 |
if (Kern::CreateClientDataRequest(K::EventRequest) != KErrNone) |
|
47 |
K::Fault(K::ECreateEventQueueFailed); |
|
48 |
} |
|
49 |
||
50 |
TInt ExecHandler::AddEvent(const TRawEvent &aEvent) |
|
51 |
// |
|
52 |
// Add an event to the queue. |
|
53 |
// |
|
54 |
{ |
|
55 |
__KTRACE_OPT(KEVENT,Kern::Printf("Exec::AddEvent")); |
|
56 |
if(!Kern::CurrentThreadHasCapability(ECapabilitySwEvent,__PLATSEC_DIAGNOSTIC_STRING("Checked by UserSvr::AddEvent"))) |
|
57 |
return KErrPermissionDenied; |
|
58 |
TRawEvent event; |
|
59 |
kumemget32(&event,&aEvent,sizeof(TRawEvent)); |
|
60 |
TRawEvent::TType type = event.Type(); |
|
61 |
if( (type==TRawEvent::ESwitchOff || type==TRawEvent::ECaseOpen || type==TRawEvent::ECaseClose || type==TRawEvent::ERestartSystem) && |
|
62 |
!Kern::CurrentThreadHasCapability(ECapabilityPowerMgmt,__PLATSEC_DIAGNOSTIC_STRING("Checked by UserSvr::AddEvent"))) |
|
63 |
return KErrPermissionDenied; |
|
64 |
#ifdef BTRACE_TRAWEVENT |
|
65 |
BTraceContext4(BTrace::ERawEvent, BTrace::EUserAddEvent ,(TUint32)type); |
|
66 |
#endif |
|
67 |
NKern::ThreadEnterCS(); |
|
68 |
TInt r=Kern::AddEvent(event); |
|
69 |
NKern::ThreadLeaveCS(); |
|
70 |
return r; |
|
71 |
} |
|
72 |
||
73 |
/** Adds an event to the event queue. |
|
74 |
Invoking this will reset the user inactivity timer. |
|
75 |
@param "const TRawEvent& aEvent" a reference to the event to be added to the event queue. |
|
76 |
||
77 |
@return KErrNone, if successful; KErrOverflow if event queue is already full. |
|
78 |
||
79 |
@pre No fast mutex can be held. |
|
80 |
@pre Calling thread must be in a critical section. |
|
81 |
@pre Kernel must be unlocked |
|
82 |
@pre interrupts enabled |
|
83 |
@pre Call in a thread context |
|
84 |
*/ |
|
85 |
EXPORT_C TInt Kern::AddEvent(const TRawEvent& aEvent) |
|
86 |
{ |
|
87 |
return Kern::AddEvent(aEvent, ETrue); |
|
88 |
} |
|
89 |
||
90 |
/** Adds an event to the event queue. |
|
91 |
||
92 |
@param "const TRawEvent& aEvent" a reference to the event to be added to the event queue. |
|
93 |
@param "TBool aResetUserActivity" Specifies whether this event should reset the user inactivity timer. |
|
94 |
For most cases this should be set to ETrue |
|
95 |
||
96 |
@return KErrNone, if successful; KErrOverflow if event queue is already full. |
|
97 |
||
98 |
@pre No fast mutex can be held. |
|
99 |
@pre Calling thread must be in a critical section. |
|
100 |
@pre Kernel must be unlocked |
|
101 |
@pre interrupts enabled |
|
102 |
@pre Call in a thread context |
|
103 |
*/ |
|
104 |
EXPORT_C TInt Kern::AddEvent(const TRawEvent& aEvent, TBool aResetUserActivity) |
|
105 |
{ |
|
106 |
CHECK_PRECONDITIONS(MASK_THREAD_CRITICAL,"Kern::AddEvent"); |
|
107 |
__KTRACE_OPT(KEVENT,Kern::Printf("Kern::AddEvent %x, %x",K::EventHeadPtr,K::EventTailPtr)); |
|
108 |
||
109 |
if (aResetUserActivity) |
|
110 |
{ |
|
111 |
K::InactivityQ->Reset(); |
|
112 |
if (K::PowerModel) |
|
113 |
K::PowerModel->RegisterUserActivity(aEvent); |
|
114 |
} |
|
115 |
#ifdef BTRACE_TRAWEVENT |
|
116 |
BTraceContext4(BTrace::ERawEvent, BTrace::EKernelAddEvent ,(TUint32)aEvent.Type()); |
|
117 |
#endif |
|
118 |
NKern::FMWait(&K::EventQueueMutex); |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
119 |
KernCoreStats::AddEvent(); |
0 | 120 |
TInt r=KErrOverflow; |
121 |
TRawEvent *pE=K::EventHeadPtr+1; |
|
122 |
if (pE>=K::EventBufferEnd) |
|
123 |
pE=K::EventBufferStart; |
|
124 |
if (pE!=K::EventTailPtr) |
|
125 |
{ |
|
126 |
*K::EventHeadPtr=aEvent; |
|
127 |
K::EventHeadPtr=pE; |
|
128 |
r=KErrNone; |
|
129 |
} |
|
130 |
K::TryDeliverEvent(); |
|
131 |
return r; |
|
132 |
} |
|
133 |
||
134 |
void K::TryDeliverEvent() |
|
135 |
// |
|
136 |
// Deliver an event if one is pending. |
|
137 |
// Enter with event queue mutex held, leave with it released. |
|
138 |
// |
|
139 |
{ |
|
140 |
||
141 |
if (K::EventHeadPtr!=K::EventTailPtr && K::EventRequest->IsReady()) |
|
142 |
{ |
|
143 |
K::EventRequest->Data() = *K::EventTailPtr; |
|
144 |
K::EventTailPtr++; |
|
145 |
if (K::EventTailPtr>=K::EventBufferEnd) |
|
146 |
K::EventTailPtr=K::EventBufferStart; |
|
147 |
Kern::QueueRequestComplete(K::EventThread,K::EventRequest,KErrNone); |
|
148 |
__KTRACE_OPT(KEVENT,Kern::Printf("Delivered event")); |
|
149 |
} |
|
150 |
NKern::FMSignal(&K::EventQueueMutex); |
|
151 |
} |
|
152 |
||
153 |
void ExecHandler::CaptureEventHook() |
|
154 |
// |
|
155 |
// Capture the event hook. |
|
156 |
// Enter and leave with system unlocked. |
|
157 |
// |
|
158 |
{ |
|
159 |
__KTRACE_OPT(KEVENT,Kern::Printf("Exec::CaptureEventHook")); |
|
160 |
||
161 |
if(TheCurrentThread->iOwningProcess!=K::TheWindowServerProcess) |
|
162 |
{ |
|
163 |
NKern::LockSystem(); |
|
164 |
K::ProcessIsolationFailure(__PLATSEC_DIAGNOSTIC_STRING("Checked by UserSvr::CaptureEventHook")); |
|
165 |
} |
|
166 |
NKern::FMWait(&K::EventQueueMutex); |
|
167 |
if (!K::EventThread) |
|
168 |
K::EventThread=TheCurrentThread; |
|
169 |
else |
|
170 |
EventQueuePanic(EEventAlreadyCaptured); |
|
171 |
NKern::FMSignal(&K::EventQueueMutex); |
|
172 |
} |
|
173 |
||
174 |
void ExecHandler::ReleaseEventHook() |
|
175 |
// |
|
176 |
// Release the event hook. |
|
177 |
// Enter and leave with system unlocked. |
|
178 |
// |
|
179 |
{ |
|
180 |
__KTRACE_OPT(KEVENT,Kern::Printf("Exec::ReleaseEventHook")); |
|
181 |
DThread* pT=TheCurrentThread; |
|
182 |
NKern::FMWait(&K::EventQueueMutex); |
|
183 |
if (K::EventThread==pT) |
|
184 |
{ |
|
185 |
K::EventThread=NULL; |
|
186 |
Kern::QueueRequestComplete(K::EventThread,K::EventRequest,KErrCancel); |
|
187 |
} |
|
188 |
else |
|
189 |
EventQueuePanic(EEventNotCaptured); |
|
190 |
NKern::FMSignal(&K::EventQueueMutex); |
|
191 |
} |
|
192 |
||
193 |
void ExecHandler::RequestEvent(TRawEventBuf& aEvent, TRequestStatus& aStatus) |
|
194 |
// |
|
195 |
// Request the next event. |
|
196 |
// Enter and leave with system unlocked. |
|
197 |
// |
|
198 |
{ |
|
199 |
__KTRACE_OPT(KEVENT,Kern::Printf("Exec::RequestEvent")); |
|
200 |
NKern::FMWait(&K::EventQueueMutex); |
|
201 |
if (K::EventThread!=TheCurrentThread) |
|
202 |
EventQueuePanic(EEventNotCaptured); |
|
203 |
if (K::EventRequest->SetStatus(&aStatus) != KErrNone) |
|
204 |
EventQueuePanic(EEventRequestPending); |
|
205 |
||
206 |
// This could be simpler if the API was changed to pass a pointer to a TRawEvent instead of a |
|
207 |
// TRawEventBuf descriptor. We cheat here and assume the descriptor is always a TRawEventBuf; |
|
208 |
// this should be safe since the API specifies a TRawEventBuf. |
|
209 |
K::EventRequest->SetDestPtr(((TUint8*)&aEvent) + sizeof(TDes8)); |
|
210 |
||
211 |
K::TryDeliverEvent(); |
|
212 |
} |
|
213 |
||
214 |
void ExecHandler::RequestEventCancel() |
|
215 |
// |
|
216 |
// Cancel the event request. |
|
217 |
// Enter and leave with system unlocked. |
|
218 |
// |
|
219 |
{ |
|
220 |
__KTRACE_OPT(KEVENT,Kern::Printf("Exec::RequestEventCancel")); |
|
221 |
NKern::FMWait(&K::EventQueueMutex); |
|
222 |
if (K::EventThread!=TheCurrentThread) |
|
223 |
EventQueuePanic(EEventNotCaptured); |
|
224 |
Kern::QueueRequestComplete(K::EventThread,K::EventRequest,KErrCancel); |
|
225 |
NKern::FMSignal(&K::EventQueueMutex); |
|
226 |
} |
|
227 |
||
228 |
||
229 |
/** Gets the mouse or digitiser X-Y position. |
|
230 |
||
231 |
@return The position. |
|
232 |
||
233 |
@pre Call in any context. |
|
234 |
*/ |
|
235 |
EXPORT_C TPoint TRawEvent::Pos() const |
|
236 |
{ |
|
237 |
TPoint p; |
|
238 |
p.iX=iU.pos.x; |
|
239 |
p.iY=iU.pos.y; |
|
240 |
return p; |
|
241 |
} |
|
242 |
||
243 |
/** Gets the 3D pointing device Cartesian coordinates. |
|
244 |
||
245 |
@return The position. |
|
246 |
||
247 |
@pre Call in any context. |
|
248 |
*/ |
|
249 |
EXPORT_C TPoint3D TRawEvent::Pos3D() const |
|
250 |
{ |
|
251 |
TPoint3D p; |
|
252 |
p.iX=iU.pos.x; |
|
253 |
p.iY=iU.pos.y; |
|
254 |
p.iZ=iU.pos3D.z; |
|
255 |
return p; |
|
256 |
} |
|
257 |
||
258 |
/** Gets the angular spherical polar coordinates of the 3D pointer end that is closer to the screen. |
|
259 |
||
260 |
@return The angular spherical polar coordinates of the point defined by the end of the 3D pointing device that is closer to the screen. |
|
261 |
||
262 |
@pre Call in any context. |
|
263 |
*/ |
|
264 |
EXPORT_C TAngle3D TRawEvent::Tilt() const |
|
265 |
{ |
|
266 |
TAngle3D p; |
|
267 |
p.iPhi=iU.pos3D.phi; |
|
268 |
p.iTheta=iU.pos3D.theta; |
|
269 |
return p; |
|
270 |
} |
|
271 |
||
272 |
/** Gets the rotation angle of 3D pointing device. |
|
273 |
||
274 |
@return The rotation angle of the 3D pointing device. |
|
275 |
||
276 |
@pre Call in any context. |
|
277 |
*/ |
|
278 |
EXPORT_C TInt TRawEvent::Rotation() const |
|
279 |
{ |
|
280 |
return (iU.pos3D.alpha); |
|
281 |
} |
|
282 |
||
283 |
/** Sets the event up as a scancode event. |
|
284 |
||
285 |
@param aType The event type. |
|
286 |
@param aScanCode The scancode. |
|
287 |
||
288 |
@pre Call in any context. |
|
289 |
*/ |
|
290 |
EXPORT_C void TRawEvent::Set(TType aType,TInt aScanCode) |
|
291 |
{ |
|
292 |
iType=(TUint8)aType; |
|
293 |
iU.key.scanCode=aScanCode; |
|
294 |
iU.key.repeats=0; |
|
295 |
#ifdef BTRACE_TRAWEVENT |
|
296 |
BTraceContext8(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType, (TUint32)aScanCode); |
|
297 |
#endif |
|
298 |
iTicks=Kern::TickCount(); |
|
299 |
} |
|
300 |
||
301 |
||
302 |
/** Sets the event up as a repeating scancode event. |
|
303 |
||
304 |
@param aType The event type. |
|
305 |
@param aScanCode The scancode. |
|
306 |
@param aRepeats The repeat count. |
|
307 |
||
308 |
@pre Call in any context. |
|
309 |
*/ |
|
310 |
EXPORT_C void TRawEvent::SetRepeat(TType aType,TInt aScanCode,TInt aRepeats) |
|
311 |
{ |
|
312 |
iType=(TUint8)aType; |
|
313 |
iU.key.scanCode=aScanCode; |
|
314 |
iU.key.repeats=aRepeats; |
|
315 |
#ifdef BTRACE_TRAWEVENT |
|
316 |
BTraceContext12(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType, (TUint32)aScanCode, (TUint32)aRepeats); |
|
317 |
#endif |
|
318 |
iTicks=Kern::TickCount(); |
|
319 |
} |
|
320 |
||
321 |
||
322 |
/** Sets the event up as a mouse/pen event. |
|
323 |
||
324 |
@param aType The event type. |
|
325 |
@param aX The X position. |
|
326 |
@param aY The Y position. |
|
327 |
||
328 |
@pre Call in any context. |
|
329 |
*/ |
|
330 |
EXPORT_C void TRawEvent::Set(TType aType,TInt aX,TInt aY) |
|
331 |
{ |
|
332 |
iType=(TUint8)aType; |
|
333 |
iU.pos.x=aX; |
|
334 |
iU.pos.y=aY; |
|
335 |
#ifdef BTRACE_TRAWEVENT |
|
336 |
BTraceContext12(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType, (TUint32)aX,(TUint32)aY); |
|
337 |
#endif |
|
338 |
iTicks=Kern::TickCount(); |
|
339 |
} |
|
340 |
||
341 |
||
342 |
/** Sets the event up as a 3D pointer linear move event. |
|
343 |
||
344 |
@param aType The event type. |
|
345 |
@param aX The X position. |
|
346 |
@param aY The Y position. |
|
347 |
@param aZ The Z position (defaults to 0 on 2D detection devices). |
|
348 |
||
349 |
@pre Call in any context. |
|
350 |
*/ |
|
351 |
EXPORT_C void TRawEvent::Set(TType aType,TInt aX,TInt aY,TInt aZ) |
|
352 |
{ |
|
353 |
iType=(TUint8)aType; |
|
354 |
iU.pos.x=aX; |
|
355 |
iU.pos.y=aY; |
|
356 |
iU.pos3D.z=aZ; |
|
357 |
||
358 |
#ifdef BTRACE_TRAWEVENT |
|
359 |
//Form the Trace Data |
|
360 |
TUint32 traceData[2]; |
|
361 |
traceData[0] =aY; |
|
362 |
traceData[1] =aZ; |
|
363 |
BTraceContextN(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType, (TUint32)aX,traceData, sizeof(traceData)); |
|
364 |
#endif |
|
365 |
iTicks=Kern::TickCount(); |
|
366 |
} |
|
367 |
||
368 |
/** Sets up an event without parameters. |
|
369 |
||
370 |
@param aType The event type. |
|
371 |
||
372 |
@pre Call in any context. |
|
373 |
*/ |
|
374 |
EXPORT_C void TRawEvent::Set(TType aType) |
|
375 |
{ |
|
376 |
iType=(TUint8)aType; |
|
377 |
#ifdef BTRACE_TRAWEVENT |
|
378 |
BTraceContext4(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType); |
|
379 |
#endif |
|
380 |
iTicks=Kern::TickCount(); |
|
381 |
} |
|
382 |
||
383 |
/** Sets the event up as a 3D pointer linear move and tilt and rotation change event. |
|
384 |
||
385 |
@param aType The event type. |
|
386 |
@param aX The X position (or TPhi polar coordinate). |
|
387 |
@param aY The Y position (or Theta polar coordinate). |
|
388 |
@param aZ The Z position (or rotation). |
|
389 |
@param aPhi The Phi polar coordinate. |
|
390 |
@param aTheta The Theta polar coordinate. |
|
391 |
@param aAlpha The rotation angle. |
|
392 |
||
393 |
@pre Call in any context. |
|
394 |
*/ |
|
395 |
EXPORT_C void TRawEvent::Set(TType aType,TInt aX,TInt aY,TInt aZ,TInt aPhi,TInt aTheta,TInt aAlpha) |
|
396 |
{ |
|
397 |
iType=(TUint8)aType; |
|
398 |
iU.pos.x=aX; |
|
399 |
iU.pos.y=aY; |
|
400 |
iU.pos3D.z=aZ; |
|
401 |
iU.pos3D.phi=aPhi; |
|
402 |
iU.pos3D.theta=aTheta; |
|
403 |
iU.pos3D.alpha=aAlpha; |
|
404 |
#ifdef BTRACE_TRAWEVENT |
|
405 |
//Form the Trace Data |
|
406 |
TUint32 traceData[5]; |
|
407 |
traceData[0] =aY; |
|
408 |
traceData[1] =aZ; |
|
409 |
traceData[2] =aPhi; |
|
410 |
traceData[3] =aTheta; |
|
411 |
traceData[4] =aAlpha; |
|
412 |
BTraceContextN(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType, (TUint32)aX,traceData, sizeof(traceData)); |
|
413 |
#endif |
|
414 |
iTicks=Kern::TickCount(); |
|
415 |
} |
|
416 |
||
417 |
/** Sets the event up as 3D pointer tilt change event. |
|
418 |
||
419 |
@param aType The event type. |
|
420 |
@param aPhi The Phi coordinate. |
|
421 |
@param aTheta The Theta coordinate. |
|
422 |
||
423 |
@pre Call in any context. |
|
424 |
*/ |
|
425 |
EXPORT_C void TRawEvent::SetTilt(TType aType,TInt aPhi,TInt aTheta) |
|
426 |
{ |
|
427 |
iType=(TUint8)aType; |
|
428 |
iU.pos3D.phi=aPhi; |
|
429 |
iU.pos3D.theta=aTheta; |
|
430 |
#ifdef BTRACE_TRAWEVENT |
|
431 |
BTraceContext12(BTrace::ERawEvent, BTrace::ESetTiltEvent ,(TUint32)aType, (TUint32)aPhi,(TUint32)aTheta); |
|
432 |
#endif |
|
433 |
iTicks=Kern::TickCount(); |
|
434 |
} |
|
435 |
||
436 |
/** Sets the event up as 3D pointer rotation event. |
|
437 |
||
438 |
@param aType The event type. |
|
439 |
@param aAlpha The rotation angle. |
|
440 |
||
441 |
@pre Call in any context. |
|
442 |
*/ |
|
443 |
EXPORT_C void TRawEvent::SetRotation(TType aType,TInt aAlpha) |
|
444 |
{ |
|
445 |
iType=(TUint8)aType; |
|
446 |
iU.pos3D.alpha=aAlpha; |
|
447 |
#ifdef BTRACE_TRAWEVENT |
|
448 |
BTraceContext8(BTrace::ERawEvent, BTrace::ESetRotationtEvent,(TUint32)aType, (TUint32)aAlpha); |
|
449 |
#endif |
|
450 |
iTicks=Kern::TickCount(); |
|
451 |
} |
|
452 |
||
453 |
||
454 |
||
455 |
/** Returns the scancode. |
|
456 |
||
457 |
@return The scancode. |
|
458 |
||
459 |
@pre Call in any context. |
|
460 |
*/ |
|
461 |
EXPORT_C TInt TRawEvent::ScanCode() const |
|
462 |
{ |
|
463 |
return iU.key.scanCode; |
|
464 |
} |
|
465 |
||
466 |
||
467 |
/** Returns the repeat count. |
|
468 |
||
469 |
@return The repeat count. |
|
470 |
||
471 |
@pre Call in any context. |
|
472 |
*/ |
|
473 |
EXPORT_C TInt TRawEvent::Repeats() const |
|
474 |
{ |
|
475 |
return iU.key.repeats; |
|
476 |
} |
|
477 |
||
478 |
||
479 |
/** Sets the event up as a 3D pointer linear move event with pointer number |
|
480 |
@param aType The event type. |
|
481 |
@param aX The X position. |
|
482 |
@param aY The Y position. |
|
483 |
@param aZ The Z position . |
|
484 |
@param aPointerNumber The pointer number for the event |
|
485 |
||
486 |
@pre Call in any context. |
|
487 |
||
488 |
*/ |
|
489 |
||
490 |
EXPORT_C void TRawEvent::Set (TType aType, TInt aX, TInt aY, TInt aZ, TUint8 aPointerNumber) |
|
491 |
{ |
|
492 |
||
493 |
iType=(TUint8)aType; |
|
494 |
iU.pos3D.x=aX; |
|
495 |
iU.pos3D.y=aY; |
|
496 |
iU.pos3D.z=aZ; |
|
497 |
iPointerNumber=aPointerNumber; |
|
498 |
#ifdef BTRACE_TRAWEVENT |
|
499 |
//Form the Trace Data |
|
500 |
TUint32 traceData[3]; |
|
501 |
traceData[0] =aY; |
|
502 |
traceData[1] =aZ; |
|
503 |
traceData[2] =aPointerNumber; |
|
504 |
BTraceContextN(BTrace::ERawEvent, BTrace::ESetEvent ,(TUint32)aType, (TUint32)aX,traceData, sizeof(traceData)); |
|
505 |
#endif |
|
506 |
iTicks=Kern::TickCount(); |
|
507 |
} |