55 ETapScreen = 0x10, |
55 ETapScreen = 0x10, |
56 ETapAndDrag = 0x11, |
56 ETapAndDrag = 0x11, |
57 ETapAndDragMultipoint = 0x12, |
57 ETapAndDragMultipoint = 0x12, |
58 EPressPointerDown = 0x13, |
58 EPressPointerDown = 0x13, |
59 ELiftPointerUp = 0x14, |
59 ELiftPointerUp = 0x14, |
|
60 EAdvancedTapScreen = 0x15, //for advanced |
|
61 EPinchZoom = 0x16, //for advanced |
60 EResultOk = 0xFF // only for response message |
62 EResultOk = 0xFF // only for response message |
61 }; |
63 }; |
62 |
64 |
63 enum TPointerState |
65 enum TPointerState |
64 { |
66 { |
65 EPointerUp, |
67 EPointerUp, |
66 EPointerDown, |
68 EPointerDown, |
67 EPointerMoving |
69 EPointerMoving |
68 }; |
70 }; |
|
71 |
|
72 struct TAdvancedPointer |
|
73 { |
|
74 TUint8 PointerNum; |
|
75 TInt X; |
|
76 TInt Y; |
|
77 TInt Z; |
|
78 }; |
|
79 |
|
80 |
69 |
81 |
70 /** |
82 /** |
71 * Two-phased constructor. |
83 * Two-phased constructor. |
72 */ |
84 */ |
73 static CPointerEventHandler* NewL(); |
85 static CPointerEventHandler* NewL(); |
115 // Helper methods |
127 // Helper methods |
116 void HandleTapScreenL( const TDesC8& aData ); |
128 void HandleTapScreenL( const TDesC8& aData ); |
117 void HandleTapAndDragL( const TDesC8& aData ); |
129 void HandleTapAndDragL( const TDesC8& aData ); |
118 void HandleTapAndDragMultipointL( const TDesC8& aData ); |
130 void HandleTapAndDragMultipointL( const TDesC8& aData ); |
119 void HandlePointerDownOrUpL( const TDesC8& aData ); |
131 void HandlePointerDownOrUpL( const TDesC8& aData ); |
|
132 void HandleAdvancedTapScreenL( const TDesC8& aData ); //for advanced |
|
133 void HandlePinchZoomL( const TDesC8& aData ); //for advanced |
120 |
134 |
121 void SendOkMsgL(); |
135 void SendOkMsgL(); |
122 void SendErrorMessageL( TInt aError, const TDesC8& aDescription ); |
136 void SendErrorMessageL( TInt aError, const TDesC8& aDescription ); |
123 |
137 |
124 void ChangePointerStateL(); |
138 void ChangePointerStateL(); |
125 void MoveToNextPointL(); |
139 void MoveToNextPointL(); |
126 void PointerDown(); |
140 void PointerDown(); |
127 void PointerUp(); |
141 void PointerUp(); |
128 void PointerMove(); |
142 void PointerMove(); |
129 void SimulatePointerEvent( TRawEvent::TType aType ); |
143 void SimulatePointerEvent( TRawEvent::TType aType ); |
|
144 TBool IsMultitouch(); |
|
145 void AdvanceAddMiddlePointL(TInt aPointNumber,TInt aX1,TInt aY1, TInt aZ1,TInt aX2,TInt aY2, TInt aZ2 , TInt aStepCount ); |
|
146 void AdvancedAddDelayArray(TTimeIntervalMicroSeconds32 aDelay , TInt aStepCount ); |
|
147 TBool AdvancedStartDelay(); |
130 |
148 |
131 |
149 |
132 private: // data |
150 private: // data |
133 |
151 |
134 RWsSession iWsSession; |
152 RWsSession iWsSession; |
142 TInt iTapCount; |
160 TInt iTapCount; |
143 TTimeIntervalMicroSeconds32 iEventDelay; |
161 TTimeIntervalMicroSeconds32 iEventDelay; |
144 TTimeIntervalMicroSeconds32 iActionDelay; |
162 TTimeIntervalMicroSeconds32 iActionDelay; |
145 TPointerState iState; |
163 TPointerState iState; |
146 RArray<TInt>* iCoords; |
164 RArray<TInt>* iCoords; |
147 }; |
165 RPointerArray<TAdvancedPointer> iAdvancedPointers; |
|
166 |
|
167 RPointerArray<TAdvancedPointer> iAdvPointerMoveArray; |
|
168 RPointerArray<TTimeIntervalMicroSeconds32> iDelayArray; |
|
169 }; |
148 |
170 |
149 #endif // CKEYEVENTHANDLER_H |
171 #endif // CKEYEVENTHANDLER_H |