idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp
branchRCL_3
changeset 28 d721605b30d0
parent 25 137ebc85284b
child 31 89165693e770
equal deleted inserted replaced
26:1b758917cafc 28:d721605b30d0
   350     // Load root configuration and initial view.
   350     // Load root configuration and initial view.
   351     iRootData->Load();
   351     iRootData->Load();
   352            
   352            
   353     CleanupStack::PopAndDestroy(); // DisableRenderUiLC();
   353     CleanupStack::PopAndDestroy(); // DisableRenderUiLC();
   354     
   354     
   355     // Load initial view publishers         
   355     // Load initial view publishers    
   356     ActiveViewData().LoadPublishers( EAiFwSystemStartup );    
   356     ActiveViewData().SetActive( ETrue );    
   357     }
   357     }
   358 
   358 
   359 // -----------------------------------------------------------------------------
   359 // -----------------------------------------------------------------------------
   360 // CXnViewManager::ReloadUiL()
   360 // CXnViewManager::ReloadUiL()
   361 // Reloads the application UI and initial ivew
   361 // Reloads the application UI and initial ivew
   376         }
   376         }
   377     
   377     
   378     delete iWidgetAmountTrigger;
   378     delete iWidgetAmountTrigger;
   379     iWidgetAmountTrigger = NULL;
   379     iWidgetAmountTrigger = NULL;
   380           
   380           
       
   381     // Destroy all publishers
       
   382     RPointerArray< CXnPluginData >& views( iRootData->PluginData() );
       
   383     
       
   384     for ( TInt i = 0; i < views.Count(); i++ )
       
   385         {
       
   386         CXnViewData* view = static_cast< CXnViewData* >( views[i] );
       
   387                 
       
   388         view->DestroyPublishers( EAiFwSystemShutdown );        
       
   389         }
       
   390     
   381     // Destroy active view data
   391     // Destroy active view data
   382     ActiveViewData().Destroy();
   392     ActiveViewData().Destroy();
   383          
   393          
   384     // Schedule application configuration destroyal
   394     // Schedule application configuration destroyal
   385     iRootData->Destroy();
   395     iRootData->Destroy();
   386     iRootData = NULL;
   396     iRootData = NULL;
   387        
   397        
   388     User::Heap().Compress();
   398     User::Heap().Compress();
       
   399     
       
   400     iUiReady = EFalse;
   389     
   401     
   390     LoadUiL();
   402     LoadUiL();
   391     
   403     
   392     // Activate first view from the new configuration
   404     // Activate first view from the new configuration
   393     iAppUiAdapter.ViewAdapter().ActivateContainerL( ActiveViewData() );    
   405     iAppUiAdapter.ViewAdapter().ActivateContainerL( ActiveViewData() );    
  1403                
  1415                
  1404     NotifyViewActivatedL( aViewToActivate );           
  1416     NotifyViewActivatedL( aViewToActivate );           
  1405     }
  1417     }
  1406 
  1418 
  1407 // -----------------------------------------------------------------------------
  1419 // -----------------------------------------------------------------------------
       
  1420 // CXnViewManager::NotifyAllViewsLoadedL()
       
  1421 // Notifies that all views included in root configuration are loaded
       
  1422 // -----------------------------------------------------------------------------
       
  1423 //
       
  1424 void CXnViewManager::NotifyAllViewsLoadedL()
       
  1425     {
       
  1426     for ( TInt i = 0; i < iObservers.Count(); i++ )
       
  1427         {
       
  1428         iObservers[i]->NotifyAllViewsLoadedL();
       
  1429         }
       
  1430     }
       
  1431 
       
  1432 // -----------------------------------------------------------------------------
  1408 // CXnViewManager::PublishersReadyL()
  1433 // CXnViewManager::PublishersReadyL()
  1409 // Notifies that aViewData activation is complete
  1434 // Notifies that aViewData activation is complete
  1410 // -----------------------------------------------------------------------------
  1435 // -----------------------------------------------------------------------------
  1411 //
  1436 //
  1412 void CXnViewManager::PublishersReadyL( CXnViewData& aViewData, TInt aResult )
  1437 void CXnViewManager::PublishersReadyL( CXnViewData& aViewData, TInt aResult )
  1454     TRAP_IGNORE( self->iHspsWrapper->SetActivePluginL( active.PluginId() ) );
  1479     TRAP_IGNORE( self->iHspsWrapper->SetActivePluginL( active.PluginId() ) );
  1455 
  1480 
  1456     CXnBackgroundManager& bg( self->iAppUiAdapter.ViewAdapter().BgManager() ); 
  1481     CXnBackgroundManager& bg( self->iAppUiAdapter.ViewAdapter().BgManager() ); 
  1457         
  1482         
  1458     TRAP_IGNORE( bg.StoreWallpaperL() );
  1483     TRAP_IGNORE( bg.StoreWallpaperL() );
       
  1484 
       
  1485     self->NotifyContainerActivatedL( active );
  1459     
  1486     
  1460     return KErrNone;
  1487     return KErrNone;
  1461     }
  1488     }
  1462 
  1489 
  1463 // -----------------------------------------------------------------------------
  1490 // -----------------------------------------------------------------------------
  1558     // This loop is intend to go from "count - 1 to 0", because CXnEditor is
  1585     // This loop is intend to go from "count - 1 to 0", because CXnEditor is
  1559     // the first registered observer and it must be notified as the last one
  1586     // the first registered observer and it must be notified as the last one
  1560     for ( TInt i = iObservers.Count() - 1; i >= 0 ; i-- )
  1587     for ( TInt i = iObservers.Count() - 1; i >= 0 ; i-- )
  1561         {
  1588         {
  1562         iObservers[i]->NotifyWidgetRemovalL( aPluginData ); 
  1589         iObservers[i]->NotifyWidgetRemovalL( aPluginData ); 
       
  1590         }
       
  1591     }
       
  1592 
       
  1593 // -----------------------------------------------------------------------------
       
  1594 // CXnViewManager::NotifyContainerActivatedL()
       
  1595 // Notifies view container is activated
       
  1596 // -----------------------------------------------------------------------------
       
  1597 //
       
  1598 void CXnViewManager::NotifyContainerActivatedL( const CXnViewData& aViewData )
       
  1599     {
       
  1600     for ( TInt i = 0; i < iObservers.Count(); i++ )
       
  1601         {
       
  1602         iObservers[i]->NotifyContainerActivatedL( aViewData );
  1563         }
  1603         }
  1564     }
  1604     }
  1565 
  1605 
  1566 // -----------------------------------------------------------------------------
  1606 // -----------------------------------------------------------------------------
  1567 // CXnViewManager::UpdateCachesL()
  1607 // CXnViewManager::UpdateCachesL()