1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
337 Sets the information on which end of the pointing device is closer to the screen |
341 Sets the information on which end of the pointing device is closer to the screen |
338 |
342 |
339 @param aTip A Boolean indicating which end of the pointing device is closer to the screen. |
343 @param aTip A Boolean indicating which end of the pointing device is closer to the screen. |
340 */ |
344 */ |
341 inline void SetTip(TBool aTip) |
345 inline void SetTip(TBool aTip) |
342 {iTip = TUint8(aTip);} |
346 {iTip = TUint8(aTip); |
|
347 #ifdef BTRACE_TRAWEVENT |
|
348 BTraceContext4(BTrace::ERawEvent, BTrace::ESetTipEvent,(TUint32)aTip); |
|
349 #endif |
|
350 } |
343 |
351 |
344 IMPORT_C void Set(TType aType,TInt aScanCode); |
352 IMPORT_C void Set(TType aType,TInt aScanCode); |
345 IMPORT_C void Set(TType aType,TInt aX,TInt aY); |
353 IMPORT_C void Set(TType aType,TInt aX,TInt aY); |
346 IMPORT_C void Set(TType aType); |
354 IMPORT_C void Set(TType aType); |
347 |
355 |
348 IMPORT_C void Set(TType aType,TInt aX,TInt aY,TInt aZ); |
356 IMPORT_C void Set(TType aType,TInt aX,TInt aY,TInt aZ); |
349 IMPORT_C void Set(TType aType,TInt aX,TInt aY,TInt aZ,TInt aPhi,TInt aTheta,TInt aAlpha); |
357 IMPORT_C void Set(TType aType,TInt aX,TInt aY,TInt aZ,TInt aPhi,TInt aTheta,TInt aAlpha); |
350 |
358 |
351 IMPORT_C void SetTilt(TType aType,TInt aPhi,TInt aTheta); |
359 IMPORT_C void SetTilt(TType aType,TInt aPhi,TInt aTheta); |
352 IMPORT_C void SetRotation(TType aType,TInt aAlpha); |
360 IMPORT_C void SetRotation(TType aType,TInt aAlpha); |
353 |
361 IMPORT_C void SetRepeat(TType aType,TInt aScanCode,TInt aRepeats); |
|
362 |
|
363 /** |
|
364 @return the pointer number of the the event |
|
365 */ |
|
366 inline TUint8 PointerNumber() const |
|
367 { |
|
368 return iPointerNumber; |
|
369 } |
|
370 |
|
371 |
|
372 /** |
|
373 The pointer number for the event is set |
|
374 The pointer number should be more or equal 0 and should be less than HALData::EPointerMaxPointers, |
|
375 otherwise WSERV would ignore the event,ie 0 <= aPointerNumber < HALData::EPointerMaxPointers |
|
376 @param aPointerNumber |
|
377 Error conditions: None. |
|
378 */ |
|
379 inline void SetPointerNumber(const TUint8 aPointerNumber) |
|
380 { |
|
381 iPointerNumber=aPointerNumber; |
|
382 #ifdef BTRACE_TRAWEVENT |
|
383 BTraceContext4(BTrace::ERawEvent, BTrace::ESetPointerNumberEvent,(TUint32)aPointerNumber); |
|
384 #endif |
|
385 } |
|
386 |
|
387 /** |
|
388 Initialises the event with the supplied information |
|
389 @param aType The event type. |
|
390 @param aX The X position. |
|
391 @param aY The Y position. |
|
392 @param aZ The Z position. |
|
393 @param aPointerNumber The pointer number for the event |
|
394 */ |
|
395 IMPORT_C void Set (TType aType, TInt aX, TInt aY, TInt aZ, TUint8 aPointerNumber); |
|
396 |
354 protected: |
397 protected: |
355 TUint8 iType; |
398 TUint8 iType; |
356 TUint8 iTip; /**< Indicates whether the tip or head of pointing device is closer to screen.*/ |
399 TUint8 iTip; /**< Indicates whether the tip or head of pointing device is closer to screen.*/ |
357 TUint8 iSpare2; |
400 TUint8 iPointerNumber; // |
358 TUint8 iDeviceNumber; |
401 TUint8 iDeviceNumber; |
359 TUint iTicks; |
402 TUint iTicks; |
360 union |
403 union |
361 { |
404 { |
362 struct {TInt x;TInt y;} pos; |
405 struct {TInt x;TInt y;} pos; |
363 struct {TInt x;TInt y;TInt z;TInt phi;TInt theta;TInt alpha;} pos3D; |
406 struct {TInt x;TInt y;TInt z;TInt phi;TInt theta;TInt alpha;} pos3D; |
364 TInt scanCode; |
407 struct {TInt scanCode;TInt repeats;} key; |
365 TInt modifiers; |
408 TInt modifiers; |
366 } iU; |
409 } iU; |
367 }; |
410 }; |
368 |
411 |
369 |
412 |