sl@0
|
1 |
// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// inline implementations for TAdvancedPointerEvent
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef ADVANCEDPOINTEREVENT_INL_
|
sl@0
|
19 |
#define ADVANCEDPOINTEREVENT_INL_
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
/** Does basic initialisation of a TAdvancedPointerEvent
|
sl@0
|
23 |
@internalTechnology */
|
sl@0
|
24 |
inline void TAdvancedPointerEvent::Init()
|
sl@0
|
25 |
{
|
sl@0
|
26 |
iModifiers=EModifierAdvancedPointerEvent;
|
sl@0
|
27 |
iData.ints.iSpare1=0;
|
sl@0
|
28 |
iData.ints.iSpare2=0;
|
sl@0
|
29 |
}
|
sl@0
|
30 |
|
sl@0
|
31 |
/** Does specific initialisation of a TAdvancedPointerEvent
|
sl@0
|
32 |
@param aType The pointer event type.
|
sl@0
|
33 |
@param aModifiers Additional modifiers for the event.
|
sl@0
|
34 |
@param aPoint3D The 3D coordinated of the event.
|
sl@0
|
35 |
@param aPointerNumber The pointer number for the event.
|
sl@0
|
36 |
@internalTechnology */
|
sl@0
|
37 |
inline void TAdvancedPointerEvent::Init(const TPointerEvent::TType aType, const TUint aModifiers, const TPoint3D &aPoint3D, const TUint8 aPointerNumber)
|
sl@0
|
38 |
{
|
sl@0
|
39 |
Init();
|
sl@0
|
40 |
iType=aType;
|
sl@0
|
41 |
iModifiers|=aModifiers; //add the new modifiers to EModifierAdvancedPointerEvent
|
sl@0
|
42 |
iPosition.iX=aPoint3D.iX;
|
sl@0
|
43 |
iPosition.iY=aPoint3D.iY;
|
sl@0
|
44 |
iData.multiPos3D.iPosZ=aPoint3D.iZ;
|
sl@0
|
45 |
iData.multiPos3D.iPointerNumber=aPointerNumber;
|
sl@0
|
46 |
}
|
sl@0
|
47 |
|
sl@0
|
48 |
/** Sets the pointer number and enforces pointer event to an advanced pointer event.
|
sl@0
|
49 |
@internalTechnology */
|
sl@0
|
50 |
inline void TAdvancedPointerEvent::SetPointerNumber(TUint8 aPointerNumber)
|
sl@0
|
51 |
{
|
sl@0
|
52 |
iModifiers|=EModifierAdvancedPointerEvent; // ensure we're an AdvancePointerEvent
|
sl@0
|
53 |
iData.multiPos3D.iPointerNumber=aPointerNumber;
|
sl@0
|
54 |
}
|
sl@0
|
55 |
|
sl@0
|
56 |
/** Sets Z and enforces pointer event to advanced pointer event
|
sl@0
|
57 |
@internalTechnology */
|
sl@0
|
58 |
inline void TAdvancedPointerEvent::SetPointerZ(TInt aZ)
|
sl@0
|
59 |
{
|
sl@0
|
60 |
iModifiers|=EModifierAdvancedPointerEvent; // ensure we're an advanced pointer event
|
sl@0
|
61 |
iData.multiPos3D.iPosZ=aZ;
|
sl@0
|
62 |
}
|
sl@0
|
63 |
|
sl@0
|
64 |
inline void TAdvancedPointerEvent::Copy(const TAdvancedPointerEvent& aPointerEvent)
|
sl@0
|
65 |
{
|
sl@0
|
66 |
if(aPointerEvent.iModifiers&EModifierAdvancedPointerEvent)
|
sl@0
|
67 |
{
|
sl@0
|
68 |
iType=aPointerEvent.iType;
|
sl@0
|
69 |
iModifiers=aPointerEvent.iModifiers;
|
sl@0
|
70 |
iPosition=aPointerEvent.iPosition;
|
sl@0
|
71 |
iParentPosition=aPointerEvent.iParentPosition;
|
sl@0
|
72 |
iData=aPointerEvent.iData;
|
sl@0
|
73 |
}
|
sl@0
|
74 |
else
|
sl@0
|
75 |
{
|
sl@0
|
76 |
// delegate to TPointerEvent::Copy
|
sl@0
|
77 |
TPointerEvent::Copy(aPointerEvent);
|
sl@0
|
78 |
}
|
sl@0
|
79 |
}
|
sl@0
|
80 |
|
sl@0
|
81 |
#endif /*ADVANCEDPOINTEREVENT_INL_*/
|