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: // inline implementations for TAdvancedPointerEvent sl@0: // sl@0: // sl@0: sl@0: #ifndef ADVANCEDPOINTEREVENT_INL_ sl@0: #define ADVANCEDPOINTEREVENT_INL_ sl@0: sl@0: sl@0: /** Does basic initialisation of a TAdvancedPointerEvent sl@0: @internalTechnology */ sl@0: inline void TAdvancedPointerEvent::Init() sl@0: { sl@0: iModifiers=EModifierAdvancedPointerEvent; sl@0: iData.ints.iSpare1=0; sl@0: iData.ints.iSpare2=0; sl@0: } sl@0: sl@0: /** Does specific initialisation of a TAdvancedPointerEvent sl@0: @param aType The pointer event type. sl@0: @param aModifiers Additional modifiers for the event. sl@0: @param aPoint3D The 3D coordinated of the event. sl@0: @param aPointerNumber The pointer number for the event. sl@0: @internalTechnology */ sl@0: inline void TAdvancedPointerEvent::Init(const TPointerEvent::TType aType, const TUint aModifiers, const TPoint3D &aPoint3D, const TUint8 aPointerNumber) sl@0: { sl@0: Init(); sl@0: iType=aType; sl@0: iModifiers|=aModifiers; //add the new modifiers to EModifierAdvancedPointerEvent sl@0: iPosition.iX=aPoint3D.iX; sl@0: iPosition.iY=aPoint3D.iY; sl@0: iData.multiPos3D.iPosZ=aPoint3D.iZ; sl@0: iData.multiPos3D.iPointerNumber=aPointerNumber; sl@0: } sl@0: sl@0: /** Sets the pointer number and enforces pointer event to an advanced pointer event. sl@0: @internalTechnology */ sl@0: inline void TAdvancedPointerEvent::SetPointerNumber(TUint8 aPointerNumber) sl@0: { sl@0: iModifiers|=EModifierAdvancedPointerEvent; // ensure we're an AdvancePointerEvent sl@0: iData.multiPos3D.iPointerNumber=aPointerNumber; sl@0: } sl@0: sl@0: /** Sets Z and enforces pointer event to advanced pointer event sl@0: @internalTechnology */ sl@0: inline void TAdvancedPointerEvent::SetPointerZ(TInt aZ) sl@0: { sl@0: iModifiers|=EModifierAdvancedPointerEvent; // ensure we're an advanced pointer event sl@0: iData.multiPos3D.iPosZ=aZ; sl@0: } sl@0: sl@0: inline void TAdvancedPointerEvent::Copy(const TAdvancedPointerEvent& aPointerEvent) sl@0: { sl@0: if(aPointerEvent.iModifiers&EModifierAdvancedPointerEvent) sl@0: { sl@0: iType=aPointerEvent.iType; sl@0: iModifiers=aPointerEvent.iModifiers; sl@0: iPosition=aPointerEvent.iPosition; sl@0: iParentPosition=aPointerEvent.iParentPosition; sl@0: iData=aPointerEvent.iData; sl@0: } sl@0: else sl@0: { sl@0: // delegate to TPointerEvent::Copy sl@0: TPointerEvent::Copy(aPointerEvent); sl@0: } sl@0: } sl@0: sl@0: #endif /*ADVANCEDPOINTEREVENT_INL_*/