sl@0: // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Helper to initialise and set/get info from TAdvancedPointerEvent sl@0: // sl@0: // sl@0: sl@0: #include "advancedpointereventhelper.h" sl@0: sl@0: sl@0: void TAdvancedPointerEventHelper::InitAdvancedPointerEvent(TWsEvent& aEvent, TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, TUint8 aPointerNumber) sl@0: { sl@0: aEvent.Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber); sl@0: }; sl@0: sl@0: void TAdvancedPointerEventHelper::InitAdvancedPointerEvent(TWsEvent& aEvent, TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, const TPoint &aParentPosition, TUint8 aPointerNumber) sl@0: { sl@0: aEvent.Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber); sl@0: aEvent.Pointer()->iParentPosition = aParentPosition; sl@0: }; sl@0: sl@0: TUint8 TAdvancedPointerEventHelper::PointerNumber(const TWsEvent& aWsEvent) sl@0: { sl@0: return aWsEvent.Pointer()->iData.multiPos3D.iPointerNumber; sl@0: } sl@0: sl@0: void TAdvancedPointerEventHelper::SetPointerNumber(TWsEvent& aWsEvent, TUint8 aPointerNumber) sl@0: { sl@0: aWsEvent.Pointer()->SetPointerNumber(aPointerNumber); sl@0: } sl@0: sl@0: TInt TAdvancedPointerEventHelper::Z(const TWsEvent& aWsEvent) sl@0: { sl@0: return aWsEvent.Pointer()->iData.multiPos3D.iPosZ; sl@0: } sl@0: sl@0: void TAdvancedPointerEventHelper::SetZ(TWsEvent& aWsEvent, TInt aPosZ) sl@0: { sl@0: aWsEvent.Pointer()->SetPointerZ(aPosZ); sl@0: } sl@0: sl@0: void TAdvancedPointerEventHelper::Copy(const TAdvancedPointerEvent& aSrcEvent, TAdvancedPointerEvent& aDestEvent) sl@0: { sl@0: aDestEvent.Copy(aSrcEvent); sl@0: }