const std::string& windowClassName = mEnvironmentOptions.GetWindowClassName();
mWindow = Dali::Window::New( mWindowPositionSize, mName, windowClassName, mWindowMode == Dali::Application::TRANSPARENT );
+ int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
+ if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
+ {
+ GetImplementation( mWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
+ }
+
// Quit the application when the window is closed
GetImplementation( mWindow ).DeleteRequestSignal().Connect( mSlotDelegate, &Application::Quit );
}
void Application::Quit()
{
// Actually quit the application.
- AddIdle( MakeCallback( this, &Application::QuitFromMainLoop ) );
+ // Force a call to Quit even if adaptor is not running.
+ Internal::Adaptor::Adaptor::GetImplementation(*mAdaptor).AddIdle( MakeCallback( this, &Application::QuitFromMainLoop ), true );
}
void Application::QuitFromMainLoop()
void Application::OnInit()
{
+ DALI_LOG_RELEASE_INFO( "Application::OnInit has started.\n" );
+
mFramework->AddAbortCallback( MakeCallback( this, &Application::QuitFromMainLoop ) );
DoInit();
mInitSignal.Emit( application );
DoStart();
+
+ DALI_LOG_RELEASE_INFO( "Application::OnInit has finished.\n" );
}
void Application::OnTerminate()
{
+ DALI_LOG_RELEASE_INFO( "Application::OnTerminate\n" );
+
// we've been told to quit by AppCore, ecore_x_destroy has been called, need to quit synchronously
// delete the window as ecore_x has been destroyed by AppCore
void Application::OnPause()
{
+ DALI_LOG_RELEASE_INFO( "Application::OnPause has started.\n" );
+
// A DALi app should handle Pause/Resume events.
// DALi just delivers the framework Pause event to the application, but not actually pause DALi core.
// Pausing DALi core only occurs on the Window Hidden framework event
Dali::Application application(this);
mPauseSignal.Emit( application );
+
+ DALI_LOG_RELEASE_INFO( "Application::OnPause has finished.\n" );
}
void Application::OnResume()
{
+ DALI_LOG_RELEASE_INFO( "Application::OnResume has started.\n" );
+
// Emit the signal first so the application can queue any messages before we do an update/render
// This ensures we do not just redraw the last frame before pausing if that's not required
Dali::Application application(this);
// DALi just delivers the framework Resume event to the application.
// Resuming DALi core only occurs on the Window Show framework event
+
+ // Trigger processing of events queued up while paused
+ CoreEventInterface& coreEventInterface = Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() );
+ coreEventInterface.ProcessCoreEvents();
+
+ DALI_LOG_RELEASE_INFO( "Application::OnResume has finished.\n" );
}
void Application::OnReset()
void Application::OnAppControl(void *data)
{
+ DALI_LOG_RELEASE_INFO( "Application::OnAppControl has started.\n" );
+
Dali::Application application(this);
mAppControlSignal.Emit( application , data );
+
+ DALI_LOG_RELEASE_INFO( "Application::OnAppControl has finished.\n" );
}
void Application::OnLanguageChanged()
mRegionChangedSignal.Emit( application );
}
-void Application::OnBatteryLow()
+void Application::OnBatteryLow( Dali::DeviceStatus::Battery::Status status )
{
Dali::Application application(this);
mBatteryLowSignal.Emit( application );
+
+ mLowBatterySignal.Emit( status );
}
-void Application::OnMemoryLow()
+void Application::OnMemoryLow( Dali::DeviceStatus::Memory::Status status )
{
Dali::Application application(this);
mMemoryLowSignal.Emit( application );
-}
+ mLowMemorySignal.Emit( status );
+}
void Application::OnResize(Dali::Adaptor& adaptor)
{
Dali::Application application(this);
return mAdaptor->AddIdle( callback );
}
+std::string Application::GetRegion() const
+{
+ return mFramework->GetRegion();
+}
+
+std::string Application::GetLanguage() const
+{
+ return mFramework->GetLanguage();
+}
+
Dali::Adaptor& Application::GetAdaptor()
{
return *mAdaptor;
Dali::Window newWindow = Dali::Window::New( positionSize, name, mWindowMode == Dali::Application::TRANSPARENT );
Window& windowImpl = GetImplementation(newWindow);
windowImpl.SetAdaptor(*mAdaptor);
- newWindow.ShowIndicator(Dali::Window::INVISIBLE);
+
+ int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
+ if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
+ {
+ GetImplementation( newWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
+ }
+
Dali::RenderSurface* renderSurface = windowImpl.GetSurface();
Any nativeWindow = newWindow.GetNativeHandle();