Update contrib.
1 // Copyright (c) 2008-2010 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 // TAdvancedPointerEvent encapsulates additional information to that contained in TPointerEvent.
15 // For multi-touch, pressure and proximity.
22 EXPORT_C TInt TAdvancedPointerEvent::DoGetPointerNumber() const
23 /** Gets the pointer number for the event
25 @return TInt. The pointer number for the event
26 @internalTechnology */
28 return iData.multiPos3D.iPointerNumber;
31 EXPORT_C TInt TAdvancedPointerEvent::DoGetProximity() const
32 /** Gets the pointer event proximity
34 @return TInt. The pointer event proximity
35 @internalTechnology */
37 return Min(iData.multiPos3D.iPosZ,EPressureProximityCrossover);
40 EXPORT_C TInt TAdvancedPointerEvent::DoGetPressure() const
41 /** Gets the pointer event pressure
43 @return TInt. The pointer event pressure
44 @internalTechnology */
46 return Max(iData.multiPos3D.iPosZ,EPressureProximityCrossover);
49 EXPORT_C TInt TAdvancedPointerEvent::DoGetProximityAndPressure() const
50 /** Gets the pointer event combined proximity and pressure.
52 Negative values are proximity, positive values are pressure.
54 @return TInt. The pointer event combined proximity and pressure
55 @internalTechnology */
57 return iData.multiPos3D.iPosZ;
60 EXPORT_C TAdvancedPointerEvent::TAdvancedPointerEvent(const TAdvancedPointerEvent& aPointerEvent)
61 /** Copy Constructor for TAdvancedPointerEvent
63 @param const TAdvancedPointerEvent& aPointerEvent. The event to copy.
64 @internalTechnology */
69 EXPORT_C TAdvancedPointerEvent& TAdvancedPointerEvent::operator=(const TAdvancedPointerEvent& aPointerEvent) // Operator = overload
70 /** Operator= overload for TAdvancedPointerEvent
72 @param const TAdvancedPointerEvent& aPointerEvent. The event to copy.
73 @internalTechnology */
75 if(this != &aPointerEvent)
82 EXPORT_C void TWsEvent::InitAdvancedPointerEvent(TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, TUint8 aPointerNumber)
83 /** Initializes TAdvancedPointerEvent contained in this TWsEvent.
84 @param aType type of TAdvancedPointerEvent
85 @param aModifiers the state of the modifier keys at the time when the event occured,
86 defined in TEventModifier
87 @param aPoint3D x and y coordinates of the pointer plus z coordinate representing proximity of the pointer
88 combined with its pressure, as returned by TAdvancedPointerEvent::PositionAndPressure3D()
89 @param aPointerNumber pointer number of the pointer whose state change is described by this event
90 @see TWsEvent::Pointer()
91 @see TAdvancedPointerEvent::PositionAndPressure3D()
92 @see TAdvancedPointerEvent::PointerNumber()
93 @publishedPartner To become publishedAll with WSERV NGA APIs
94 @prototype To become released with WSERV NGA APIs */
96 Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber);
99 EXPORT_C void TWsEvent::SetPointerNumber(TUint8 aPointerNumber)
100 /** Changes pointer number of TAdvancedPointerEvent contained in this TWsEvent.
101 @param aPointerNumber new pointer number to set in TAdvancedPointerEvent contained in this
103 @see TWsEvent::Pointer()
104 @see TAdvancedPointerEvent::PointerNumber()
105 @publishedPartner To become publishedAll with WSERV NGA APIs
106 @prototype To become released with WSERV NGA APIs */
108 Pointer()->SetPointerNumber(aPointerNumber);
111 EXPORT_C void TWsEvent::SetPointerZ(TInt aZ)
112 /** Changes pressure and proximity of TAdvancedPointerEvent contained in this TWsEvent.
113 @param aZ new pressure and proximity to set, combined the same way as returned
114 by TAdvancedPointerEvent::ProximityAndPressure()
115 @see TWsEvent::Pointer()
116 @see TAdvancedPointerEvent::ProximityAndPressure()
117 @publishedPartner To become publishedAll with WSERV NGA APIs
118 @prototype To become released with WSERV NGA APIs */
120 Pointer()->SetPointerZ(aZ);