326 // |
326 // |
327 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent ) |
327 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent ) |
328 { |
328 { |
329 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()")); |
329 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()")); |
330 |
330 |
331 if ( iController->IsTvOutPlaybackAllowed() ) |
331 if ( iSeekingTimer->IsActive() ) |
332 { |
332 { |
333 if ( iSeekingTimer->IsActive() ) |
333 iSeekingTimer->Cancel(); |
334 { |
334 } |
335 iSeekingTimer->Cancel(); |
335 |
336 } |
336 if ( iMiddleButtonRect.Contains( aPointerEvent.iPosition ) ) |
337 |
337 { |
338 if ( iMiddleButtonRect.Contains( aPointerEvent.iPosition ) ) |
338 iButtonPressed = EMPXMiddleButtonPressed; |
339 { |
339 } |
340 iButtonPressed = EMPXMiddleButtonPressed; |
340 else if ( iTopButtonRect.Contains( aPointerEvent.iPosition ) && |
341 } |
341 iButtons[EMPXButtonFastForward]->IsVisible() && |
342 else if ( iTopButtonRect.Contains( aPointerEvent.iPosition ) && |
342 ! iButtons[EMPXButtonFastForward]->IsDimmed() ) |
343 iButtons[EMPXButtonFastForward]->IsVisible() && |
343 { |
344 ! iButtons[EMPXButtonFastForward]->IsDimmed() ) |
344 iButtons[EMPXButtonFastForward]->SetPressed( ETrue ); |
345 { |
345 |
346 iButtons[EMPXButtonFastForward]->SetPressed( ETrue ); |
346 iSeekingTimer->Start( |
347 |
347 KMPXLongPressInterval, |
348 iSeekingTimer->Start( |
348 KMPXTactileInterval, |
349 KMPXLongPressInterval, |
349 TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) ); |
350 KMPXTactileInterval, |
350 |
351 TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) ); |
351 iButtonPressed = EMPXTopButtonPressed; |
352 |
352 } |
353 iButtonPressed = EMPXTopButtonPressed; |
353 else if( iBottomButtonRect.Contains( aPointerEvent.iPosition ) && |
354 } |
354 iButtons[EMPXButtonRewind]->IsVisible() && |
355 else if( iBottomButtonRect.Contains( aPointerEvent.iPosition ) && |
355 ! iButtons[EMPXButtonRewind]->IsDimmed() ) |
356 iButtons[EMPXButtonRewind]->IsVisible() && |
356 { |
357 ! iButtons[EMPXButtonRewind]->IsDimmed() ) |
357 iButtons[EMPXButtonRewind]->SetPressed( ETrue ); |
358 { |
358 |
359 iButtons[EMPXButtonRewind]->SetPressed( ETrue ); |
359 iSeekingTimer->Start( |
360 |
360 KMPXLongPressInterval, |
361 iSeekingTimer->Start( |
361 KMPXTactileInterval, |
362 KMPXLongPressInterval, |
362 TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) ); |
363 KMPXTactileInterval, |
363 |
364 TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) ); |
364 iButtonPressed = EMPXBottomButtonPressed; |
365 |
|
366 iButtonPressed = EMPXBottomButtonPressed; |
|
367 } |
|
368 } |
365 } |
369 } |
366 } |
370 |
367 |
371 // ------------------------------------------------------------------------------------------------- |
368 // ------------------------------------------------------------------------------------------------- |
372 // CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL() |
369 // CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL() |