(*iter)->OnStart();
}
- mAddOnManager->Start();
+ if (mAddOnManager)
+ {
+ mAddOnManager->Start();
+ }
}
// Dali::Internal::Adaptor::Adaptor::Pause
}
// Extensions
- mAddOnManager->Pause();
+ if (mAddOnManager)
+ {
+ mAddOnManager->Pause();
+ }
// Pause all windows event handlers when adaptor paused
for( auto window : mWindows )
}
// Resume AddOnManager
- mAddOnManager->Resume();
+ if (mAddOnManager)
+ {
+ mAddOnManager->Resume();
+ }
// Inform observers that we have resumed.
for( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter )
(*iter)->OnStop();
}
- mAddOnManager->Stop();
+ if (mAddOnManager)
+ {
+ mAddOnManager->Stop();
+ }
mThreadController->Stop();
mThreadController->SetPreRenderCallback( callback );
}
-bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
+bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow )
{
Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( childWindow );
windowImpl.SetAdaptor( Get() );
+ // ChildWindow is set to the layout direction of the default window.
+ windowImpl.GetRootLayer().SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, mRootLayoutDirection );
+
// Add the new Window to the container - the order is not important
mWindows.push_back( &windowImpl );
DALI_LOG_RELEASE_INFO( "Adaptor::OnWindowShown: Update requested.\n" );
}
+ else if( PAUSED_WHILE_INITIALIZING == mState )
+ {
+ // Change the state to READY again. It will be changed to RUNNING after the adaptor is started.
+ mState = READY;
+ }
else
{
DALI_LOG_RELEASE_INFO( "Adaptor::OnWindowShown: Adaptor is not paused state.[%d]\n", mState );
mSocketFactory(),
mThreadMode( ThreadMode::NORMAL ),
mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),
- mUseRemoteSurface( false )
+ mUseRemoteSurface( false ),
+ mRootLayoutDirection( Dali::LayoutDirection::LEFT_TO_RIGHT )
{
DALI_ASSERT_ALWAYS( !IsAvailable() && "Cannot create more than one Adaptor per thread" );
mWindows.insert( mWindows.begin(), &Dali::GetImplementation( window ) );
void Adaptor::SetRootLayoutDirection( std::string locale )
{
+ mRootLayoutDirection = static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) );
for ( auto& window : mWindows )
{
Dali::Actor root = window->GetRootLayer();
- root.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION,
- static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
+ root.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, mRootLayoutDirection );
}
}