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 // Helper to initialise and set/get info from TAdvancedPointerEvent
18 #include "advancedpointereventhelper.h"
21 void TAdvancedPointerEventHelper::InitAdvancedPointerEvent(TWsEvent& aEvent, TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, TUint8 aPointerNumber)
23 aEvent.Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber);
26 void TAdvancedPointerEventHelper::InitAdvancedPointerEvent(TWsEvent& aEvent, TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, const TPoint &aParentPosition, TUint8 aPointerNumber)
28 aEvent.Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber);
29 aEvent.Pointer()->iParentPosition = aParentPosition;
32 TUint8 TAdvancedPointerEventHelper::PointerNumber(const TWsEvent& aWsEvent)
34 return aWsEvent.Pointer()->iData.multiPos3D.iPointerNumber;
37 void TAdvancedPointerEventHelper::SetPointerNumber(TWsEvent& aWsEvent, TUint8 aPointerNumber)
39 aWsEvent.Pointer()->SetPointerNumber(aPointerNumber);
42 TInt TAdvancedPointerEventHelper::Z(const TWsEvent& aWsEvent)
44 return aWsEvent.Pointer()->iData.multiPos3D.iPosZ;
47 void TAdvancedPointerEventHelper::SetZ(TWsEvent& aWsEvent, TInt aPosZ)
49 aWsEvent.Pointer()->SetPointerZ(aPosZ);
52 void TAdvancedPointerEventHelper::Copy(const TAdvancedPointerEvent& aSrcEvent, TAdvancedPointerEvent& aDestEvent)
54 aDestEvent.Copy(aSrcEvent);