277 // CMPXVideoPlaybackButtonBar::HandlePointerEventL() |
277 // CMPXVideoPlaybackButtonBar::HandlePointerEventL() |
278 // ------------------------------------------------------------------------------------------------- |
278 // ------------------------------------------------------------------------------------------------- |
279 // |
279 // |
280 void CMPXVideoPlaybackButtonBar::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
280 void CMPXVideoPlaybackButtonBar::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
281 { |
281 { |
282 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandlePointerEventL()")); |
282 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandlePointerEventL()")); |
283 |
283 |
284 switch ( aPointerEvent.iType ) |
284 switch ( aPointerEvent.iType ) |
285 { |
285 { |
286 case TPointerEvent::EButton1Down: |
286 case TPointerEvent::EButton1Down: |
287 { |
287 { |
288 HandleButtonDownEventL( aPointerEvent ); |
288 HandleButtonDownEventL( aPointerEvent ); |
289 |
|
290 break; |
289 break; |
291 } |
290 } |
292 case TPointerEvent::EButton1Up: |
291 case TPointerEvent::EButton1Up: |
293 { |
292 { |
294 if ( iButtonPressed == EMPXTopButtonPressed || |
293 if ( iButtonPressed == EMPXTopButtonPressed || |
324 // CMPXVideoPlaybackButtonBar::HandleButtonDownEventL() |
319 // CMPXVideoPlaybackButtonBar::HandleButtonDownEventL() |
325 // ------------------------------------------------------------------------------------------------- |
320 // ------------------------------------------------------------------------------------------------- |
326 // |
321 // |
327 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent ) |
322 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent ) |
328 { |
323 { |
329 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()")); |
324 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()")); |
330 |
325 |
331 if ( iSeekingTimer->IsActive() ) |
326 if ( iSeekingTimer->IsActive() ) |
332 { |
327 { |
333 iSeekingTimer->Cancel(); |
328 iSeekingTimer->Cancel(); |
334 } |
329 } |
369 // CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL() |
364 // CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL() |
370 // ------------------------------------------------------------------------------------------------- |
365 // ------------------------------------------------------------------------------------------------- |
371 // |
366 // |
372 void CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL( const TPointerEvent& aPointerEvent ) |
367 void CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL( const TPointerEvent& aPointerEvent ) |
373 { |
368 { |
374 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL()")); |
369 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL()")); |
375 |
370 |
376 if ( iSeekingTimer->IsActive() ) |
371 if ( iSeekingTimer->IsActive() ) |
377 { |
372 { |
378 iSeekingTimer->Cancel(); |
373 iSeekingTimer->Cancel(); |
379 } |
374 } |
414 // CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL() |
409 // CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL() |
415 // ------------------------------------------------------------------------------------------------- |
410 // ------------------------------------------------------------------------------------------------- |
416 // |
411 // |
417 void CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL() |
412 void CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL() |
418 { |
413 { |
419 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL()")); |
414 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleMiddleButtonUpEventL()")); |
420 |
415 |
421 switch ( iController->State() ) |
416 switch ( iController->State() ) |
422 { |
417 { |
423 case EPbStatePlaying: |
418 case EPbStatePlaying: |
424 { |
419 { |
464 // CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL() |
459 // CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL() |
465 // ------------------------------------------------------------------------------------------------- |
460 // ------------------------------------------------------------------------------------------------- |
466 // |
461 // |
467 void CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL( const TPointerEvent& aPointerEvent ) |
462 void CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL( const TPointerEvent& aPointerEvent ) |
468 { |
463 { |
469 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL()")); |
464 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::HandleBottomButtonUpEventL()")); |
470 |
465 |
471 if ( iSeekingTimer->IsActive() ) |
466 if ( iSeekingTimer->IsActive() ) |
472 { |
467 { |
473 iSeekingTimer->Cancel(); |
468 iSeekingTimer->Cancel(); |
474 } |
469 } |
520 // CMPXVideoPlaybackButtonBar::DoStartSeekingL() |
515 // CMPXVideoPlaybackButtonBar::DoStartSeekingL() |
521 // ------------------------------------------------------------------------------------------------- |
516 // ------------------------------------------------------------------------------------------------- |
522 // |
517 // |
523 void CMPXVideoPlaybackButtonBar::DoStartSeekingL() |
518 void CMPXVideoPlaybackButtonBar::DoStartSeekingL() |
524 { |
519 { |
525 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::DoStartSeekingL()")); |
520 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::DoStartSeekingL()")); |
526 |
521 |
527 #ifdef RD_TACTILE_FEEDBACK |
522 #ifdef RD_TACTILE_FEEDBACK |
528 if (iFeedback) |
523 if (iFeedback) |
529 { |
524 { |
530 #ifdef SYMBIAN_BUILD_GCE |
525 #ifdef SYMBIAN_BUILD_GCE |
558 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::Draw()")); |
553 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::Draw()")); |
559 |
554 |
560 CWindowGc& gc = SystemGc(); |
555 CWindowGc& gc = SystemGc(); |
561 gc.SetClippingRect( aRect ); |
556 gc.SetClippingRect( aRect ); |
562 |
557 |
563 if ( iController->SetBackgroundBlack() ) |
558 if ( Window().DisplayMode() == EColor16MAP ) |
564 { |
559 { |
565 if ( Window().DisplayMode() == EColor16MAP ) |
560 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
566 { |
561 gc.SetBrushColor( TRgb::Color16MAP( 255 ) ); |
567 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
562 gc.Clear( aRect ); |
568 gc.SetBrushColor( TRgb::Color16MAP( 255 ) ); |
563 } |
569 gc.Clear( aRect ); |
564 else if ( Window().DisplayMode() == EColor16MA ) |
570 } |
565 { |
571 else if ( Window().DisplayMode() == EColor16MA ) |
566 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
572 { |
567 gc.SetBrushColor( TRgb::Color16MA( 0 ) ); |
573 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
568 gc.Clear( aRect ); |
574 gc.SetBrushColor( TRgb::Color16MA( 0 ) ); |
|
575 gc.Clear( aRect ); |
|
576 } |
|
577 } |
|
578 else |
|
579 { |
|
580 // draw a solid background so that the entire progress |
|
581 // bar is shown not just the area representing the |
|
582 // portion that has been played. |
|
583 gc.SetBrushColor( KRgbBlack ); |
|
584 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
585 gc.DrawRect( aRect ); |
|
586 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
587 } |
569 } |
588 } |
570 } |
589 |
571 |
590 // ------------------------------------------------------------------------------------------------- |
572 // ------------------------------------------------------------------------------------------------- |
591 // CMPXVideoPlaybackButtonBar::CountComponentControls() |
573 // CMPXVideoPlaybackButtonBar::CountComponentControls() |
608 |
590 |
609 return control; |
591 return control; |
610 } |
592 } |
611 |
593 |
612 // ------------------------------------------------------------------------------------------------- |
594 // ------------------------------------------------------------------------------------------------- |
613 // CMPXVideoPlaybackButtonBar::StateChanged() |
595 // CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar() |
614 // ------------------------------------------------------------------------------------------------- |
596 // ------------------------------------------------------------------------------------------------- |
615 // |
597 // |
616 void CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar( TMPXPlaybackState aState ) |
598 void CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar( TMPXPlaybackState aState ) |
617 { |
599 { |
618 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::StateChanged(%d)"), aState); |
600 MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::UpdateStateOnButtonBar(%d)"), aState); |
619 |
601 |
620 switch ( aState ) |
602 switch ( aState ) |
621 { |
603 { |
622 case EPbStatePlaying: |
604 case EPbStatePlaying: |
623 { |
605 { |
654 break; |
636 break; |
655 } |
637 } |
656 } |
638 } |
657 } |
639 } |
658 |
640 |
659 |
|
660 // ------------------------------------------------------------------------------------------------- |
641 // ------------------------------------------------------------------------------------------------- |
661 // CMPXVideoPlaybackButtonBar::UpdateButtonBarState |
642 // CMPXVideoPlaybackButtonBar::UpdateButtonBarState |
662 // ------------------------------------------------------------------------------------------------- |
643 // ------------------------------------------------------------------------------------------------- |
663 // |
644 // |
664 void CMPXVideoPlaybackButtonBar::UpdateButtonBarState( CMPXVideoPlaybackViewFileDetails* aDetails ) |
645 void CMPXVideoPlaybackButtonBar::UpdateButtonBarState( CMPXVideoPlaybackViewFileDetails* aDetails ) |