+++ /dev/null
-/*
- * Copyright (c) 2016 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/devel-api/adaptor-framework/application-extensions.h>
-
-// EXTERNAL INCLUDES
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/adaptor/common/application-impl.h>
-#include <dali/public-api/adaptor-framework/application.h>
-
-namespace Dali
-{
-
-ApplicationExtensions::ApplicationExtensions()
-: mApplication( NULL )
-{
-}
-
-ApplicationExtensions::ApplicationExtensions(Dali::Application* application)
-: mApplication( application )
-{
-}
-
-ApplicationExtensions::~ApplicationExtensions()
-{
-}
-
-void ApplicationExtensions::Init()
-{
- Internal::Adaptor::GetImplementation(*mApplication).DoInit();
-}
-
-void ApplicationExtensions::Start()
-{
- Internal::Adaptor::GetImplementation(*mApplication).DoStart();
-}
-
-void ApplicationExtensions::Terminate()
-{
- Internal::Adaptor::GetImplementation(*mApplication).DoTerminate();
-}
-
-void ApplicationExtensions::Pause()
-{
- Internal::Adaptor::GetImplementation(*mApplication).DoPause();
-}
-
-void ApplicationExtensions::Resume()
-{
- Internal::Adaptor::GetImplementation(*mApplication).DoResume();
-}
-
-void ApplicationExtensions::LanguageChange()
-{
- Internal::Adaptor::GetImplementation(*mApplication).DoLanguageChange();
-}
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_APPLICATION_EXTENSIONS_H__
-#define __DALI_APPLICATION_EXTENSIONS_H__
-
-/*
- * Copyright (c) 2018 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/dali-adaptor-common.h>
-
-namespace Dali
-{
-class Application;
-
-/**
- * @brief An Application extension class object should be created by DaliApplication.
- *
- * It provides some extension methods to DaliApplication.
- *
- */
-class DALI_ADAPTOR_API ApplicationExtensions
-{
-public:
-
- /**
- * @brief The default constructor.
- *
- */
- ApplicationExtensions();
-
- /**
- * @brief The constructor accept an instance of Dali::Application.
- *
- * This can be initialized by new keyword.
- */
- ApplicationExtensions(Dali::Application* application);
-
- /**
- * @brief Destructor
- *
- */
- ~ApplicationExtensions();
-
-
- /**
- * @brief Called when the framework is initialised.
- * @SINCE_1_2.7
- */
- void Init();
-
- /**
- * @brief Called when the framework is started.
- */
- void Start();
-
- /**
- * @brief Called when the framework is terminated.
- * @SINCE_1_2.7
- */
- void Terminate();
-
- /**
- * @brief Called when the framework is paused.
- * @SINCE_1_2.7
- */
- void Pause();
-
- /**
- * @brief Called when the framework resumes from a paused state.
- * @SINCE_1_2.7
- */
- void Resume();
-
- /**
- * @brief Called when the framework informs the application that the language of the device has changed.
- * @SINCE_1_2.7
- */
- void LanguageChange();
-
-private:
- Dali::Application* mApplication;
-};
-
-} // namespace Dali
-
-#endif // ___DALI_APPLICATION_EXTENSIONS_H__
devel_api_src_files = \
$(adaptor_devel_api_dir)/adaptor-framework/accessibility-adaptor.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/application-devel.cpp \
- $(adaptor_devel_api_dir)/adaptor-framework/application-extensions.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/bitmap-saver.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/clipboard.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/clipboard-event-notifier.cpp \
$(adaptor_devel_api_dir)/adaptor-framework/accessibility-action-handler.h \
$(adaptor_devel_api_dir)/adaptor-framework/accessibility-gesture-handler.h \
$(adaptor_devel_api_dir)/adaptor-framework/application-devel.h \
- $(adaptor_devel_api_dir)/adaptor-framework/application-extensions.h \
$(adaptor_devel_api_dir)/adaptor-framework/bitmap-saver.h \
$(adaptor_devel_api_dir)/adaptor-framework/clipboard-event-notifier.h \
$(adaptor_devel_api_dir)/adaptor-framework/clipboard.h \
// 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 );
}
*/
float GetStereoBase() const;
-public: // Lifecycle functionality
-
- /**
- * Called when OnInit is called or the framework is initialised.
- */
- void DoInit();
-
- /**
- * Called after OnInit is called or the framework is started.
- */
- void DoStart();
-
- /**
- * Called when OnTerminate is called or the framework is terminated.
- */
- void DoTerminate();
-
- /**
- * Called when OnPause is called or the framework is paused.
- */
- void DoPause();
-
- /**
- * Called when OnResume is called or the framework resumes from a paused state.
- */
- void DoResume();
-
- /**
- * Called when OnLanguageChanged is called or the framework informs the application that the language of the device has changed.
- */
- void DoLanguageChange();
-
public: // From Framework::Observer
/**