/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/adaptor-framework/application.h>
// EXTERNAL INCLUDES
+#include <dali/public-api/object/object-registry.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
if( internal )
{
+ // pre-initialized application
+ internal->SetCommandLineOptions( argc, argv );
if( argc && ( *argc > 0 ) )
{
internal->GetWindow().SetClass( (*argv)[0], "" );
Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
if( internal )
{
+ // pre-initialized application
+ internal->SetCommandLineOptions( argc, argv );
if( argc && ( *argc > 0 ) )
{
internal->GetWindow().SetClass( (*argv)[0], "" );
Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
if( internal )
{
+ // pre-initialized application
+ internal->SetCommandLineOptions( argc, argv );
if( argc && ( *argc > 0 ) )
{
internal->GetWindow().SetClass( (*argv)[0], "" );
Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::GetPreInitializedApplication();
if( internal )
{
+ // pre-initialized application
+ internal->SetCommandLineOptions( argc, argv );
if( argc && ( *argc > 0 ) )
{
internal->GetWindow().SetClass( (*argv)[0], "" );
{
}
-Application::Application(const Application& application)
-: BaseHandle(application)
-{
-}
+Application::Application( const Application& copy ) = default;
-Application& Application::operator=(const Application& application)
-{
- if( *this != application )
- {
- BaseHandle::operator=( application );
- }
- return *this;
-}
+Application& Application::operator=( const Application& rhs ) = default;
-void Application::MainLoop()
-{
- Internal::Adaptor::GetImplementation(*this).MainLoop(Configuration::APPLICATION_HANDLES_CONTEXT_LOSS);
-}
+Application::Application( Application&& rhs ) = default;
+
+Application& Application::operator=( Application&& rhs ) = default;
-void Application::MainLoop(Configuration::ContextLoss configuration)
+void Application::MainLoop()
{
- Internal::Adaptor::GetImplementation(*this).MainLoop(configuration);
+ Internal::Adaptor::GetImplementation(*this).MainLoop();
}
void Application::Lower()
return Internal::Adaptor::GetImplementation(*this).GetWindow();
}
-void Application::ReplaceWindow(PositionSize windowPosition, const std::string& name)
-{
- Internal::Adaptor::GetImplementation(*this).ReplaceWindow(windowPosition, name);
-}
-
std::string Application::GetResourcePath()
{
return Internal::Adaptor::Application::GetResourcePath();
return Internal::Adaptor::GetImplementation(*this).GetLanguage();
}
-void Application::SetViewMode( ViewMode /*viewMode*/ )
-{
-}
-
-ViewMode Application::GetViewMode() const
+ObjectRegistry Application::GetObjectRegistry() const
{
- return ViewMode::MONO;
-}
-
-void Application::SetStereoBase( float /*stereoBase*/ )
-{
-}
-
-float Application::GetStereoBase() const
-{
- return 0.f;
+ return Internal::Adaptor::GetImplementation(*this).GetObjectRegistry();
}
Application::AppSignalType& Application::InitSignal()
return Internal::Adaptor::GetImplementation(*this).ResetSignal();
}
-Application::AppSignalType& Application::ResizeSignal()
-{
- DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: ResizeSignal() is deprecated and will be removed from next release. Use Window::ResizedSignal() instead.\n" );
-
- return Internal::Adaptor::GetImplementation(*this).ResizeSignal();
-}
-
Application::AppControlSignalType & Application::AppControlSignal()
{
return Internal::Adaptor::GetImplementation(*this).AppControlSignal();
return Internal::Adaptor::GetImplementation(*this).RegionChangedSignal();
}
-Application::AppSignalType& Application::BatteryLowSignal()
-{
- DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: BatteryLowSignal() is deprecated and will be removed from next release. Use Application::LowBatterySignal() instead.\n" );
- return Internal::Adaptor::GetImplementation(*this).BatteryLowSignal();
-}
-
-Application::AppSignalType& Application::MemoryLowSignal()
-{
- DALI_LOG_WARNING_NOFN( "DEPRECATION WARNING: MemoryLowSignal() is deprecated and will be removed from next release. Use Application::LowMemorySignal() instead.\n" );
- return Internal::Adaptor::GetImplementation(*this).MemoryLowSignal();
-}
-
Application::LowBatterySignalType& Application::LowBatterySignal()
{
return Internal::Adaptor::GetImplementation(*this).LowBatterySignal();