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 // inline implementations for TAdvancedPointerEvent
18 #ifndef ADVANCEDPOINTEREVENT_INL_
19 #define ADVANCEDPOINTEREVENT_INL_
22 /** Does basic initialisation of a TAdvancedPointerEvent
23 @internalTechnology */
24 inline void TAdvancedPointerEvent::Init()
26 iModifiers=EModifierAdvancedPointerEvent;
31 /** Does specific initialisation of a TAdvancedPointerEvent
32 @param aType The pointer event type.
33 @param aModifiers Additional modifiers for the event.
34 @param aPoint3D The 3D coordinated of the event.
35 @param aPointerNumber The pointer number for the event.
36 @internalTechnology */
37 inline void TAdvancedPointerEvent::Init(const TPointerEvent::TType aType, const TUint aModifiers, const TPoint3D &aPoint3D, const TUint8 aPointerNumber)
41 iModifiers|=aModifiers; //add the new modifiers to EModifierAdvancedPointerEvent
42 iPosition.iX=aPoint3D.iX;
43 iPosition.iY=aPoint3D.iY;
44 iData.multiPos3D.iPosZ=aPoint3D.iZ;
45 iData.multiPos3D.iPointerNumber=aPointerNumber;
48 /** Sets the pointer number and enforces pointer event to an advanced pointer event.
49 @internalTechnology */
50 inline void TAdvancedPointerEvent::SetPointerNumber(TUint8 aPointerNumber)
52 iModifiers|=EModifierAdvancedPointerEvent; // ensure we're an AdvancePointerEvent
53 iData.multiPos3D.iPointerNumber=aPointerNumber;
56 /** Sets Z and enforces pointer event to advanced pointer event
57 @internalTechnology */
58 inline void TAdvancedPointerEvent::SetPointerZ(TInt aZ)
60 iModifiers|=EModifierAdvancedPointerEvent; // ensure we're an advanced pointer event
61 iData.multiPos3D.iPosZ=aZ;
64 inline void TAdvancedPointerEvent::Copy(const TAdvancedPointerEvent& aPointerEvent)
66 if(aPointerEvent.iModifiers&EModifierAdvancedPointerEvent)
68 iType=aPointerEvent.iType;
69 iModifiers=aPointerEvent.iModifiers;
70 iPosition=aPointerEvent.iPosition;
71 iParentPosition=aPointerEvent.iParentPosition;
72 iData=aPointerEvent.iData;
76 // delegate to TPointerEvent::Copy
77 TPointerEvent::Copy(aPointerEvent);
81 #endif /*ADVANCEDPOINTEREVENT_INL_*/