#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
{
namespace Adaptor
{
+namespace
+{
+
+const float DEFAULT_STEREO_BASE( 65.0f );
+
+} // unnamed namespace
+
ApplicationPtr Application::gPreInitializedApplication( NULL );
ApplicationPtr Application::New(
mEnvironmentOptions(),
mWindowPositionSize( positionSize ),
mLaunchpadState( Launchpad::NONE ),
- mSlotDelegate( this )
+ mSlotDelegate( this ),
+ mViewMode( MONO ),
+ mStereoBase( DEFAULT_STEREO_BASE )
{
// Get mName from environment options
mMainWindowName = mEnvironmentOptions.GetWindowName();
mAdaptor->SetUseHardwareVSync(false);
}
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetStereoBase( mCommandLineOptions->stereoBase );
- if( mCommandLineOptions->viewMode != 0 )
- {
- ViewMode viewMode = MONO;
- if( mCommandLineOptions->viewMode <= STEREO_INTERLACED )
- {
- viewMode = static_cast<ViewMode>( mCommandLineOptions->viewMode );
- }
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetViewMode( viewMode );
- }
-
if( ! mStylesheet.empty() )
{
Dali::StyleMonitor::Get().SetTheme( mStylesheet );
void Application::SetViewMode( ViewMode viewMode )
{
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetViewMode( viewMode );
+ mViewMode = viewMode;
}
ViewMode Application::GetViewMode() const
{
- return Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).GetViewMode();
+ return mViewMode;
}
void Application::SetStereoBase( float stereoBase )
{
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetStereoBase( stereoBase );
+ mStereoBase = stereoBase;
}
float Application::GetStereoBase() const
{
- return Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).GetStereoBase();
+ return mStereoBase;
}
void Application::ReplaceWindow( const PositionSize& positionSize, const std::string& name )
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;