mCallbackManager = CallbackManager::New();
- Dali::Internal::Adaptor::SceneHolder* defaultWindow = mWindows.front();
+ SceneHolderPtr defaultWindow = mWindows.front();
DALI_ASSERT_DEBUG( defaultWindow->GetSurface() && "Surface not initialized" );
defaultWindow->SetAdaptor( Get() );
- Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( defaultWindow ) );
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( ( &defaultWindow )->Get() ) );
if ( window )
{
mWindowCreatedSignal.Emit( window );
// Start the callback manager
mCallbackManager->Start();
- Dali::Internal::Adaptor::SceneHolder* defaultWindow = mWindows.front();
+ SceneHolderPtr defaultWindow = mWindows.front();
unsigned int dpiHor, dpiVer;
dpiHor = dpiVer = 0;
}
// Pause all windows event handlers when adaptor paused
- for( auto window : mWindows )
+ for( SceneHolderPtr window : mWindows )
{
window->Pause();
}
mState = RUNNING;
// Reset the event handlers when adaptor resumed
- for( auto window : mWindows )
+ for( SceneHolderPtr window : mWindows )
{
window->Resume();
}
void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& newSurface )
{
Internal::Adaptor::SceneHolder* windowImpl = &Dali::GetImplementation( window );
- for( auto windowPtr : mWindows )
+ for( SceneHolderPtr windowPtr : mWindows )
{
- if( windowPtr == windowImpl ) // the window is not deleted
+ if( windowPtr.Get() == windowImpl ) // the window is not deleted
{
// Let the core know the surface size has changed
mCore->SurfaceResized( &newSurface );
windowImpl.SetAdaptor( Get() );
// Add the new Window to the container - the order is not important
- mWindows.push_back( &windowImpl );
+ mWindows.push_back( SceneHolderPtr( &windowImpl ) );
Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( &windowImpl ) );
if ( window )
{
bool allWindowsHidden = true;
- for( auto window : mWindows )
+ for( SceneHolderPtr window : mWindows )
{
if ( window->IsVisible() )
{
{
if ( scene == window->GetScene() )
{
- return window;
+ return window.Get();
}
}
for ( auto iter = mWindows.begin(); iter != mWindows.end(); ++iter )
{
// Downcast to Dali::Window
- Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( *iter ) );
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( iter->Get() ) );
if ( window )
{
windows.push_back( window );
mUseRemoteSurface( false )
{
DALI_ASSERT_ALWAYS( !IsAvailable() && "Cannot create more than one Adaptor per thread" );
- mWindows.insert( mWindows.begin(), &Dali::GetImplementation( window ) );
+ mWindows.insert( mWindows.begin(), SceneHolderPtr( &Dali::GetImplementation( window ) ) );
gThreadLocalAdaptor = this;
}