#include <dali/internal/adaptor/common/framework.h>
#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/adaptor/common/lifecycle-controller-impl.h>
+#include <dali/internal/window-system/common/window-impl.h>
#include <dali/internal/window-system/common/window-render-surface.h>
+#undef Status
+
namespace Dali
{
const std::string& windowClassName = mEnvironmentOptions.GetWindowClassName();
mMainWindow = Dali::Window::New( mWindowPositionSize, mMainWindowName, windowClassName, mMainWindowMode == Dali::Application::TRANSPARENT );
- int indicatorVisibleMode = mEnvironmentOptions.GetIndicatorVisibleMode();
- if( indicatorVisibleMode >= Dali::Window::INVISIBLE && indicatorVisibleMode <= Dali::Window::AUTO )
- {
- GetImplementation( mMainWindow ).SetIndicatorVisibleMode( static_cast< Dali::Window::IndicatorVisibleMode >( indicatorVisibleMode ) );
- }
-
// Quit the application when the window is closed
GetImplementation( mMainWindow ).DeleteRequestSignal().Connect( mSlotDelegate, &Application::Quit );
}
// This will trigger OnTerminate(), below, after the main loop has completed.
}
-void Application::DoInit()
+void Application::OnInit()
{
+ mFramework->AddAbortCallback( MakeCallback( this, &Application::QuitFromMainLoop ) );
+
CreateAdaptorBuilder();
// If an application was pre-initialized, a window was made in advance
{
Dali::StyleMonitor::Get().SetTheme( mStylesheet );
}
-}
-
-void Application::DoStart()
-{
- mAdaptor->NotifySceneCreated();
-}
-
-void Application::DoTerminate()
-{
- if( mAdaptor )
- {
- // Ensure that the render-thread is not using the surface(window) after we delete it
- mAdaptor->Stop();
- }
-
- mMainWindow.Reset(); // This only resets (clears) the default Window
-}
-
-void Application::DoPause()
-{
- mAdaptor->Pause();
-}
-
-void Application::DoResume()
-{
- mAdaptor->Resume();
-}
-
-void Application::DoLanguageChange()
-{
- mAdaptor->NotifyLanguageChanged();
-}
-
-void Application::OnInit()
-{
- mFramework->AddAbortCallback( MakeCallback( this, &Application::QuitFromMainLoop ) );
-
- DoInit();
// Wire up the LifecycleController
Dali::LifecycleController lifecycleController = Dali::LifecycleController::Get();
Dali::Application application(this);
mInitSignal.Emit( application );
- DoStart();
+ mAdaptor->NotifySceneCreated();
}
void Application::OnTerminate()
Dali::Application application(this);
mTerminateSignal.Emit( application );
- DoTerminate();
+ if( mAdaptor )
+ {
+ // Ensure that the render-thread is not using the surface(window) after we delete it
+ mAdaptor->Stop();
+ }
+
+ mMainWindow.Reset(); // This only resets (clears) the default Window
}
void Application::OnPause()
void Application::OnLanguageChanged()
{
- DoLanguageChange();
+ mAdaptor->NotifyLanguageChanged();
Dali::Application application(this);
mLanguageChangedSignal.Emit( application );
}
Window& windowImpl = GetImplementation(newWindow);
windowImpl.SetAdaptor(*mAdaptor);
- 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();
+ Internal::Adaptor::WindowRenderSurface* renderSurface = windowImpl.GetSurface();
Any nativeWindow = newWindow.GetNativeHandle();
Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).ReplaceSurface(nativeWindow, *renderSurface);
return Internal::Adaptor::Framework::GetResourcePath();
}
+std::string Application::GetDataPath()
+{
+ return Internal::Adaptor::Framework::GetDataPath();
+}
+
void Application::SetStyleSheet( const std::string& stylesheet )
{
mStylesheet = stylesheet;