os/graphics/windowing/windowserver/nga/SERVER/advancedpointereventhelper.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Helper to initialise and set/get info from TAdvancedPointerEvent
    15 // 
    16 //
    17 
    18 #include "advancedpointereventhelper.h"
    19 
    20 
    21 void TAdvancedPointerEventHelper::InitAdvancedPointerEvent(TWsEvent& aEvent, TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, TUint8 aPointerNumber)
    22 	{
    23 	aEvent.Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber);
    24 	};
    25 
    26 void TAdvancedPointerEventHelper::InitAdvancedPointerEvent(TWsEvent& aEvent, TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, const TPoint &aParentPosition, TUint8 aPointerNumber)
    27 	{
    28 	aEvent.Pointer()->Init(aType, aModifiers, aPoint3D, aPointerNumber);
    29 	aEvent.Pointer()->iParentPosition = aParentPosition;
    30 	};
    31 
    32 TUint8 TAdvancedPointerEventHelper::PointerNumber(const TWsEvent& aWsEvent)
    33 	{
    34 	return aWsEvent.Pointer()->iData.multiPos3D.iPointerNumber;
    35 	}
    36 
    37 void TAdvancedPointerEventHelper::SetPointerNumber(TWsEvent& aWsEvent, TUint8 aPointerNumber)
    38 	{
    39 	aWsEvent.Pointer()->SetPointerNumber(aPointerNumber);
    40 	}
    41 
    42 TInt TAdvancedPointerEventHelper::Z(const TWsEvent& aWsEvent)
    43 	{
    44 	return aWsEvent.Pointer()->iData.multiPos3D.iPosZ;
    45 	}
    46 
    47 void TAdvancedPointerEventHelper::SetZ(TWsEvent& aWsEvent, TInt aPosZ)
    48 	{
    49 	aWsEvent.Pointer()->SetPointerZ(aPosZ);
    50 	}
    51 
    52 void TAdvancedPointerEventHelper::Copy(const TAdvancedPointerEvent& aSrcEvent, TAdvancedPointerEvent& aDestEvent)
    53 	{
    54 	aDestEvent.Copy(aSrcEvent);
    55 	}