photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp
branchRCL_3
changeset 35 420f6808bf21
parent 25 191387a8b767
equal deleted inserted replaced
32:78ad99c24f08 35:420f6808bf21
    57         TSize aScreenSize )
    57         TSize aScreenSize )
    58     : iEffectManager( aEffectManager ),
    58     : iEffectManager( aEffectManager ),
    59     iVisualList( aVisualList ),
    59     iVisualList( aVisualList ),
    60     iMediaList( aMediaList ),
    60     iMediaList( aMediaList ),
    61 	iEffectLoopRestarted( EFalse ),
    61 	iEffectLoopRestarted( EFalse ),
    62 	iFailedThumbnailIndex( KErrNotFound )
    62 	iFailedThumbnailIndex( KErrNotFound ),
       
    63 	iHDMIFirstDecoded(EFalse),
       
    64 	iTNReadyReceived(EFalse)
    63     {
    65     {
    64     // initialize the default layout chain
    66     // initialize the default layout chain
    65     iDefaultIconLayout.SetOpacity( KMaxOpacity, 0 );
    67     iDefaultIconLayout.SetOpacity( KMaxOpacity, 0 );
    66     iDefaultIconLayout.SetSize( aScreenSize.iWidth, aScreenSize.iHeight, 0 );
    68     iDefaultIconLayout.SetSize( aScreenSize.iWidth, aScreenSize.iHeight, 0 );
    67     // initialise the not visible layout
    69     // initialise the not visible layout
   202         dynamic_cast< TShwEventNextImage* >( aEvent );
   204         dynamic_cast< TShwEventNextImage* >( aEvent );
   203     TShwEventPreviousImage* previousImageEvent =
   205     TShwEventPreviousImage* previousImageEvent =
   204         dynamic_cast< TShwEventPreviousImage* >( aEvent );
   206         dynamic_cast< TShwEventPreviousImage* >( aEvent );
   205     TShwEventToggleControlUi* toggleControlUiEvent = 
   207     TShwEventToggleControlUi* toggleControlUiEvent = 
   206         dynamic_cast< TShwEventToggleControlUi* >( aEvent );
   208         dynamic_cast< TShwEventToggleControlUi* >( aEvent );
       
   209     TShwEventHDMIDisConnected* hdmiDisConnectEvent = 
       
   210     dynamic_cast< TShwEventHDMIDisConnected* >( aEvent );
       
   211     TShwEventHDMIFirstImageDecodingCompleted* hdmiDecodeImageEvent = 
       
   212     dynamic_cast< TShwEventHDMIFirstImageDecodingCompleted* >( aEvent );        
   207 
   213 
   208     // process init event
   214     // process init event
   209     if( init )
   215     if( init )
   210         {
   216         {
   211         // prepare the first effect and load the correct size thumbnail
   217         // prepare the first effect and load the correct size thumbnail
   245     // process user navigate to previous
   251     // process user navigate to previous
   246     else if ( previousImageEvent )
   252     else if ( previousImageEvent )
   247         {
   253         {
   248         HandlePreviousImageEventL();
   254         HandlePreviousImageEventL();
   249         }
   255         }
       
   256     else if(hdmiDecodeImageEvent || hdmiDisConnectEvent)
       
   257     	{
       
   258     	iHDMIFirstDecoded = ETrue;
       
   259     	if(iTNReadyReceived)
       
   260     		{
       
   261             TShwEventReadyToView readyToView;
       
   262             SendEventL(&readyToView);    		
       
   263     		}
       
   264     	}    	
   250     // no other events are interesting for us
   265     // no other events are interesting for us
   251     }
   266     }
   252 
   267 
   253 // -----------------------------------------------------------------------------
   268 // -----------------------------------------------------------------------------
   254 // HandleFocusChangedL.
   269 // HandleFocusChangedL.
   340     // view or transition because of user navigation
   355     // view or transition because of user navigation
   341     if( aIndex == focus )
   356     if( aIndex == focus )
   342         {
   357         {
   343         GLX_LOG_INFO( 
   358         GLX_LOG_INFO( 
   344             "HandleThumbnailLoadedL - sending TShwEventReadyToView" );
   359             "HandleThumbnailLoadedL - sending TShwEventReadyToView" );
       
   360         iTNReadyReceived = ETrue;
   345         // its focus index so lets send ready to view
   361         // its focus index so lets send ready to view
   346         // send ready to view event
   362         // send ready to view event
   347         TShwEventReadyToView readyToView;
   363         if(iHDMIFirstDecoded)
   348         SendEventL( &readyToView );
   364         	{
       
   365             TShwEventReadyToView readyToView;
       
   366             SendEventL( &readyToView );              	
       
   367         	}
   349         }
   368         }
   350     // is it next from focus
   369     // is it next from focus
   351     else if( aIndex == NextListIndex( KNavigateForwards ) )
   370     else if( aIndex == NextListIndex( KNavigateForwards ) )
   352         {
   371         {
   353         GLX_LOG_INFO( 
   372         GLX_LOG_INFO( 
   370     // at the moment we just proceed as normal
   389     // at the moment we just proceed as normal
   371     // user will then see a broken icon for a while
   390     // user will then see a broken icon for a while
   372     // we need to remember this index however as we dont want to start the
   391     // we need to remember this index however as we dont want to start the
   373     // effect for it
   392     // effect for it
   374     iFailedThumbnailIndex = aIndex;
   393     iFailedThumbnailIndex = aIndex;
       
   394     TInt focus = iVisualList.FocusIndex();
       
   395     if (aIndex == focus)
       
   396     	{
       
   397         iHDMIFirstDecoded = ETrue;    	
       
   398     	}
   375     HandleThumbnailLoadedL( aIndex );
   399     HandleThumbnailLoadedL( aIndex );
   376     }
   400     }
   377 
   401 
   378 // -----------------------------------------------------------------------------
   402 // -----------------------------------------------------------------------------
   379 // HandleMediaListEmpty
   403 // HandleMediaListEmpty