videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbuih_stub.cpp
equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: Implementation of playback view's input handler |
14 * Description: Implementation of playback view's input handler |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: 7 % |
18 // Version : %version: 8 % |
19 |
19 |
20 |
20 |
21 |
21 |
22 // INCLUDE FILES |
22 // INCLUDE FILES |
23 #include <w32std.h> // RWindowBase |
23 #include <w32std.h> // RWindowBase |
99 const TPointerEvent& aPointerEvent, |
99 const TPointerEvent& aPointerEvent, |
100 TMPXVideoControlType /*aMPXControl*/ ) |
100 TMPXVideoControlType /*aMPXControl*/ ) |
101 { |
101 { |
102 MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ProcessPointerEvent")); |
102 MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ProcessPointerEvent")); |
103 |
103 |
104 MPX_DEBUG(_L(" iType = %d, iPosition = (%d,%d)"), |
104 MPX_DEBUG(_L(" iType = %d, iPosition = (%d,%d)"), |
105 aPointerEvent.iType, aPointerEvent.iPosition.iX, aPointerEvent.iPosition.iY ); |
105 aPointerEvent.iType, aPointerEvent.iPosition.iX, aPointerEvent.iPosition.iY ); |
106 |
106 |
107 switch (iProcessingInputType) |
107 switch (iProcessingInputType) |
108 { |
108 { |
109 case EMpxVideoNone: |
109 case EMpxVideoNone: |
152 case EMpxVideoNone: |
152 case EMpxVideoNone: |
153 { |
153 { |
154 if (aType == EEventKeyDown) |
154 if (aType == EEventKeyDown) |
155 { |
155 { |
156 iProcessingInputType = EMpxVideoKeyboard; |
156 iProcessingInputType = EMpxVideoKeyboard; |
157 iLastPressedKeyCode = aKeyEvent.iCode; |
|
158 iLastPressedKeyScanCode = aKeyEvent.iScanCode; |
157 iLastPressedKeyScanCode = aKeyEvent.iScanCode; |
159 iContainer->DoHandleKeyEventL(aKeyEvent, aType); |
158 iContainer->DoHandleKeyEventL(aKeyEvent, aType); |
160 } |
159 } |
161 break; |
160 break; |
162 } |
161 } |
163 case EMpxVideoKeyboard: |
162 case EMpxVideoKeyboard: |
164 { |
163 { |
165 if (aType == EEventKeyUp) |
164 if ( aKeyEvent.iScanCode == iLastPressedKeyScanCode ) |
166 { |
165 { |
167 // only handle up event for the key being handled |
166 iContainer->DoHandleKeyEventL( aKeyEvent, aType ); |
168 // ignore spurious key presses |
167 |
169 if (aKeyEvent.iCode == iLastPressedKeyCode && |
168 if ( aType == EEventKeyUp ) |
170 aKeyEvent.iScanCode == iLastPressedKeyScanCode) |
|
171 { |
169 { |
172 iContainer->DoHandleKeyEventL(aKeyEvent, aType); |
|
173 |
|
174 // reset the value only on key up event |
|
175 iProcessingInputType = EMpxVideoNone; |
170 iProcessingInputType = EMpxVideoNone; |
176 } |
171 } |
177 } |
172 } |
|
173 |
178 break; |
174 break; |
179 } |
175 } |
180 default: |
176 default: |
181 { |
177 { |
182 // user input is disallowed |
178 // user input is disallowed |