Remove unuseful application-extensions 97/200497/1
authorxb.teng <xb.teng@samsung.com>
Tue, 26 Feb 2019 04:05:30 +0000 (12:05 +0800)
committerxb.teng <xb.teng@samsung.com>
Tue, 26 Feb 2019 04:05:30 +0000 (12:05 +0800)
Change-Id: I39edcb788ddaa706d8d7cd3a717c7b4c861d39ac

dali/devel-api/adaptor-framework/application-extensions.cpp [deleted file]
dali/devel-api/adaptor-framework/application-extensions.h [deleted file]
dali/devel-api/file.list
dali/internal/adaptor/common/application-impl.cpp [changed mode: 0644->0755]
dali/internal/adaptor/common/application-impl.h [changed mode: 0644->0755]

diff --git a/dali/devel-api/adaptor-framework/application-extensions.cpp b/dali/devel-api/adaptor-framework/application-extensions.cpp
deleted file mode 100644 (file)
index 7557cf0..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
diff --git a/dali/devel-api/adaptor-framework/application-extensions.h b/dali/devel-api/adaptor-framework/application-extensions.h
deleted file mode 100755 (executable)
index 31056b0..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#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__
index f787144..2448ba9 100755 (executable)
@@ -1,7 +1,6 @@
 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 \
@@ -40,7 +39,6 @@ devel_api_adaptor_framework_header_files = \
   $(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 \
old mode 100644 (file)
new mode 100755 (executable)
index 8e90b04..c44be42
@@ -217,8 +217,10 @@ void Application::QuitFromMainLoop()
   // 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
@@ -242,44 +244,6 @@ void Application::DoInit()
   {
     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();
@@ -295,7 +259,7 @@ void Application::OnInit()
   Dali::Application application(this);
   mInitSignal.Emit( application );
 
-  DoStart();
+  mAdaptor->NotifySceneCreated();
 }
 
 void Application::OnTerminate()
@@ -306,7 +270,13 @@ 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()
@@ -351,7 +321,7 @@ void Application::OnAppControl(void *data)
 
 void Application::OnLanguageChanged()
 {
-  DoLanguageChange();
+  mAdaptor->NotifyLanguageChanged();
   Dali::Application application(this);
   mLanguageChangedSignal.Emit( application );
 }
old mode 100644 (file)
new mode 100755 (executable)
index 8d56f23..f7097ae
@@ -181,38 +181,6 @@ public: // Stereoscopy
    */
   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
 
   /**