[dali_1.9.1] Merge branch 'devel/master' 61/226261/1
authorGyörgy Straub <g.straub@partner.samsung.com>
Fri, 28 Feb 2020 09:10:07 +0000 (09:10 +0000)
committerGyörgy Straub <g.straub@partner.samsung.com>
Fri, 28 Feb 2020 09:10:07 +0000 (09:10 +0000)
Change-Id: I4a5e77157fdc4692d43b1057a2cf1c39304c4c0d

49 files changed:
automated-tests/src/dali-adaptor-internal/utc-Dali-Lifecycle-Controller.cpp
automated-tests/src/dali-adaptor/CMakeLists.txt
automated-tests/src/dali-adaptor/utc-Dali-SingletonService.cpp [deleted file]
dali/devel-api/adaptor-framework/input-method-context.cpp
dali/devel-api/adaptor-framework/input-method-context.h
dali/devel-api/adaptor-framework/singleton-service.cpp [deleted file]
dali/devel-api/adaptor-framework/singleton-service.h [deleted file]
dali/devel-api/file.list
dali/internal/accessibility/generic/accessibility-adaptor-impl-generic.cpp
dali/internal/accessibility/tizen-wayland/tizen-common/accessibility-adaptor-impl-tizen.cpp
dali/internal/accessibility/tizen-wayland/tizen-ivi/accessibility-adaptor-impl-ivi.cpp
dali/internal/accessibility/tizen-wayland/tizen-mobile/accessibility-adaptor-impl-mobile.cpp
dali/internal/accessibility/tizen-wayland/tizen-tv/accessibility-adaptor-impl-tv.cpp
dali/internal/accessibility/tizen-wayland/tizen-wearable/accessibility-adaptor-impl-wearable.cpp
dali/internal/adaptor/common/application-impl.cpp
dali/internal/adaptor/common/application-impl.h
dali/internal/adaptor/common/lifecycle-controller-impl.cpp
dali/internal/clipboard/common/clipboard-event-notifier-impl.cpp
dali/internal/clipboard/generic/clipboard-impl-generic.cpp
dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp [changed mode: 0644->0755]
dali/internal/clipboard/ubuntu-x11/clipboard-impl-x.cpp
dali/internal/haptics/common/feedback-player-impl.cpp
dali/internal/input/common/input-method-context-impl.cpp
dali/internal/input/common/input-method-context-impl.h
dali/internal/input/common/physical-keyboard-impl.cpp
dali/internal/input/generic/input-method-context-impl-generic.cpp
dali/internal/input/generic/input-method-context-impl-generic.h
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.h
dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp
dali/internal/input/ubuntu-x11/input-method-context-impl-x.h
dali/internal/input/windows/input-method-context-impl-win.cpp
dali/internal/input/windows/input-method-context-impl-win.h
dali/internal/sensor/common/tilt-sensor-factory.cpp
dali/internal/sensor/tizen/tilt-sensor-impl-tizen.cpp
dali/internal/sensor/ubuntu/tilt-sensor-impl-ubuntu.cpp
dali/internal/styling/common/style-monitor-impl.cpp
dali/internal/system/common/color-controller-impl.cpp
dali/internal/system/common/singleton-service-impl.cpp [deleted file]
dali/internal/system/common/singleton-service-impl.h [deleted file]
dali/internal/system/common/sound-player-impl.cpp
dali/internal/system/file.list
dali/internal/text/text-abstraction/bidirectional-support-impl.cpp
dali/internal/text/text-abstraction/font-client-impl.cpp
dali/internal/text/text-abstraction/segmentation-impl.cpp
dali/internal/text/text-abstraction/shaping-impl.cpp
dali/internal/text/text-abstraction/text-renderer-impl.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 3a2c8d2..6511f3b 100644 (file)
@@ -91,6 +91,7 @@ int UtcDaliLifecycleControllerGet(void)
   lifecycleController = LifecycleController::Get();
   DALI_TEST_CHECK( !lifecycleController );
 
+  TestApplication app;
   Application application = Application::New();
 
   lifecycleController = LifecycleController::Get();
@@ -101,6 +102,7 @@ int UtcDaliLifecycleControllerGet(void)
 
 int UtcDaliLifecycleControllerSignalInit(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnInitCalled );
@@ -118,6 +120,7 @@ int UtcDaliLifecycleControllerSignalInit(void)
 
 int UtcDaliLifecycleControllerSignalTerminate(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnTerminateCalled );
@@ -135,6 +138,7 @@ int UtcDaliLifecycleControllerSignalTerminate(void)
 
 int UtcDaliLifecycleControllerSignalPause(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnPauseCalled );
@@ -152,6 +156,7 @@ int UtcDaliLifecycleControllerSignalPause(void)
 
 int UtcDaliLifecycleControllerSignalResume(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnResumeCalled );
@@ -169,6 +174,7 @@ int UtcDaliLifecycleControllerSignalResume(void)
 
 int UtcDaliLifecycleControllerSignalReset(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnResetCalled );
@@ -186,6 +192,7 @@ int UtcDaliLifecycleControllerSignalReset(void)
 
 int UtcDaliLifecycleControllerSignalResize(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnResizeCalled );
@@ -203,6 +210,7 @@ int UtcDaliLifecycleControllerSignalResize(void)
 
 int UtcDaliLifecycleControllerSignalLanguageChanged(void)
 {
+  TestApplication app;
   Application application = Application::New();
 
   DALI_TEST_CHECK( !g_OnLanguageChangedCalled );
index d7414fb..6545723 100644 (file)
@@ -12,7 +12,6 @@ SET(TC_SOURCES
     utc-Dali-Key.cpp
     utc-Dali-NativeImageSource.cpp
     utc-Dali-PixelBuffer.cpp
-    utc-Dali-SingletonService.cpp
     utc-Dali-Timer.cpp
     utc-Dali-TtsPlayer.cpp
     utc-Dali-Window.cpp
diff --git a/automated-tests/src/dali-adaptor/utc-Dali-SingletonService.cpp b/automated-tests/src/dali-adaptor/utc-Dali-SingletonService.cpp
deleted file mode 100644 (file)
index 2ceb1f0..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2014 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <stdlib.h>
-#include <iostream>
-#include <dali.h>
-#include <dali-test-suite-utils.h>
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
-
-using namespace Dali;
-
-namespace
-{
-
-class TestHandle : public BaseHandle
-{
-public:
-  TestHandle() {}
-  TestHandle( BaseObject* object ) : BaseHandle( object ) {}
-};
-
-class TestObject : public BaseObject
-{
-};
-
-} // unnamed namespace
-
-void utc_dali_singleton_service_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void utc_dali_singleton_service_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-int UtcDaliSingletonServiceGet(void)
-{
-  // Attempt to retrieve SingletonService before creating application
-  SingletonService singletonService;
-  singletonService = SingletonService::Get();
-  DALI_TEST_CHECK( !singletonService );
-
-  // Create Application class, should be able to retrieve SingletonService now
-  Application application = Application::New();
-  singletonService = SingletonService::Get();
-  DALI_TEST_CHECK( singletonService );
-
-  END_TEST;
-}
-
-int UtcDaliSingletonServiceRegisterAndGetSingleton(void)
-{
-  Application application = Application::New();
-  SingletonService singletonService( SingletonService::Get() );
-
-  // Attempt to register an empty handle
-  TestHandle handle;
-  singletonService.Register( typeid( handle ), handle );
-  DALI_TEST_CHECK( !singletonService.GetSingleton( typeid( handle ) ) );
-
-  // Create an actor instance and retrieve, should be valid this time
-  handle = TestHandle( new TestObject );
-  singletonService.Register( typeid( handle ), handle );
-  DALI_TEST_CHECK( singletonService.GetSingleton( typeid( handle ) ) );
-
-  END_TEST;
-}
index 4dbbcd3..ae4d1c6 100755 (executable)
@@ -221,7 +221,7 @@ void InputMethodContext::SetInputPanelPosition( unsigned int x, unsigned int y )
   Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetInputPanelPosition( x, y );
 }
 
-void InputMethodContext::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const
+void InputMethodContext::GetPreeditStyle( PreEditAttributeDataContainer& attrs ) const
 {
   Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetPreeditStyle( attrs );
 }
index 1209d61..04a8e72 100755 (executable)
@@ -50,8 +50,8 @@ class DALI_ADAPTOR_API InputMethodContext : public BaseHandle
 public:
 
   /**
-  * @brief The direction of text.
-  */
+   * @brief The direction of text.
+   */
   enum TextDirection
   {
     LeftToRight,
@@ -120,9 +120,16 @@ public:
    */
   struct PreeditAttributeData
   {
-    PreeditStyle preeditType; /// The preedit style type
-    unsigned int startIndex;  /// The start index of preedit
-    unsigned int endIndex;    /// The end index of preedit
+    PreeditAttributeData()
+    : preeditType( PreeditStyle::NONE ),
+      startIndex( 0 ),
+      endIndex( 0 )
+    {
+    }
+
+    PreeditStyle preeditType;  /// The preedit style type
+    unsigned int startIndex;   /// The start index of preedit
+    unsigned int endIndex;     /// The end index of preedit
   };
 
   /**
@@ -210,6 +217,8 @@ public:
   typedef Signal< void ( int ) > LanguageChangedSignalType;  ///< Language changed signal
   typedef Signal< void ( const std::string&, const std::string&, const std::string& ) > ContentReceivedSignalType; ///< Content received signal
 
+  using PreEditAttributeDataContainer = Vector< Dali::InputMethodContext::PreeditAttributeData >;
+
 public:
 
   /**
@@ -491,11 +500,11 @@ public:
   void SetInputPanelPosition( unsigned int x, unsigned int y );
 
   /**
-   * @brief Gets the preedit attrs data.
+   * @brief Gets the preedit attributes data.
    *
-   * @param[out] attrs The preedit attrs data.
+   * @param[out] attrs The preedit attributes data.
    */
-  void GetPreeditStyle( Vector<PreeditAttributeData>& attrs ) const;
+  void GetPreeditStyle( PreEditAttributeDataContainer& attrs ) const;
 
 public:
 
diff --git a/dali/devel-api/adaptor-framework/singleton-service.cpp b/dali/devel-api/adaptor-framework/singleton-service.cpp
deleted file mode 100644 (file)
index ca1b3a9..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2015 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/singleton-service.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
-namespace Dali
-{
-
-SingletonService::SingletonService()
-{
-}
-
-SingletonService SingletonService::New()
-{
-  return Internal::Adaptor::SingletonService::New();
-}
-
-SingletonService SingletonService::Get()
-{
-  return Internal::Adaptor::SingletonService::Get();
-}
-
-SingletonService::~SingletonService()
-{
-}
-
-void SingletonService::Register( const std::type_info& info, BaseHandle singleton )
-{
-  GetImplementation( *this ).Register( info, singleton );
-}
-
-void SingletonService::UnregisterAll()
-{
-  GetImplementation( *this ).UnregisterAll();
-}
-
-BaseHandle SingletonService::GetSingleton( const std::type_info& info ) const
-{
-  return GetImplementation( *this ).GetSingleton( info );
-}
-
-SingletonService::SingletonService( Internal::Adaptor::SingletonService* singletonService )
-: BaseHandle( singletonService )
-{
-}
-
-} // namespace Dali
diff --git a/dali/devel-api/adaptor-framework/singleton-service.h b/dali/devel-api/adaptor-framework/singleton-service.h
deleted file mode 100755 (executable)
index 7df5fc7..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef DALI_SINGELTON_SERVICE_H
-#define DALI_SINGELTON_SERVICE_H
-
-/*
- * Copyright (c) 2019 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <typeinfo>
-#include <dali/public-api/object/base-handle.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/dali-adaptor-common.h>
-
-namespace Dali
-{
-
-namespace Internal DALI_INTERNAL
-{
-namespace Adaptor
-{
-class SingletonService;
-}
-}
-
-/**
- * @brief Allows the registration of a class as a singleton
- *
- * @note This class is created by the Application class and is destroyed when the Application class is destroyed.
- *
- * @see Application
- */
-class DALI_ADAPTOR_API SingletonService : public BaseHandle
-{
-public:
-
-  /**
-   * @brief Create an uninitialized handle.
-   *
-   * This can be initialized by calling SingletonService::Get().
-   */
-  SingletonService();
-
-  /**
-   * Create a SingletonService.
-   * This should only be called once by the Application class.
-   * @return A newly created SingletonService.
-   */
-  static Dali::SingletonService New();
-
-  /**
-   * @brief Retrieves a handle to the SingletonService.
-   *
-   * @return A handle to the SingletonService if it is available. This will be an empty handle if
-   *         the service is not available.
-   */
-  static SingletonService Get();
-
-  /**
-   * @brief Destructor
-   *
-   * This is non-virtual since derived Handle types must not contain data or virtual methods.
-   */
-  ~SingletonService();
-
-  /**
-   * @brief Registers the singleton of Dali handle with its type info.
-   *
-   * The singleton will be kept alive for the lifetime of the service.
-   *
-   * @note This is not intended for application developers.
-   * @param[in] info The type info of the Dali handle generated by the compiler.
-   * @param[in] singleton The Dali handle to be registered
-   */
-  void Register( const std::type_info& info, BaseHandle singleton );
-
-  /**
-   * @brief Unregisters all singletons.
-   *
-   * @note This is not intended for application developers.
-   */
-  void UnregisterAll();
-
-  /**
-   * @brief Gets the singleton for the given type.
-   *
-   * @note This is not intended for application developers.
-   * @param[in] info The type info of the given type.
-   * @return the Dali handle if it is registered as a singleton or an uninitialized handle.
-   */
-  BaseHandle GetSingleton( const std::type_info& info ) const;
-
-public: // Not intended for application developers
-
-  /**
-   * @brief This constructor is used by SingletonService::Get().
-   * @param[in] singletonService A pointer to the internal singleton-service object.
-   */
-  explicit DALI_INTERNAL SingletonService( Internal::Adaptor::SingletonService* singletonService );
-};
-
-} // namespace Dali
-
-#endif // DALI_SINGELTON_SERVICE_H
index e39b2e2..e85cb13 100755 (executable)
@@ -23,7 +23,6 @@ SET( devel_api_src_files
   ${adaptor_devel_api_dir}/adaptor-framework/physical-keyboard.cpp 
   ${adaptor_devel_api_dir}/adaptor-framework/key-devel.cpp 
   ${adaptor_devel_api_dir}/adaptor-framework/pixel-buffer.cpp 
-  ${adaptor_devel_api_dir}/adaptor-framework/singleton-service.cpp 
   ${adaptor_devel_api_dir}/adaptor-framework/sound-player.cpp 
   ${adaptor_devel_api_dir}/adaptor-framework/style-monitor.cpp 
   ${adaptor_devel_api_dir}/adaptor-framework/tilt-sensor.cpp 
@@ -68,7 +67,6 @@ SET( devel_api_adaptor_framework_header_files
   ${adaptor_devel_api_dir}/adaptor-framework/orientation.h 
   ${adaptor_devel_api_dir}/adaptor-framework/performance-logger.h 
   ${adaptor_devel_api_dir}/adaptor-framework/pixel-buffer.h 
-  ${adaptor_devel_api_dir}/adaptor-framework/singleton-service.h 
   ${adaptor_devel_api_dir}/adaptor-framework/sound-player.h 
   ${adaptor_devel_api_dir}/adaptor-framework/style-monitor.h 
   ${adaptor_devel_api_dir}/adaptor-framework/tilt-sensor.h 
index 05dda37..62cfcbf 100644 (file)
@@ -20,9 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index 18d57df..b2418f8 100644 (file)
 #include <vconf.h>
 
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/system/common/system-settings.h>
 
 namespace Dali
index f75eff9..95f8809 100644 (file)
 #include <vconf.h>
 
 #include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/system/common/system-settings.h>
 
 #ifndef WAYLAND
index f75eff9..95f8809 100644 (file)
 #include <vconf.h>
 
 #include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/system/common/system-settings.h>
 
 #ifndef WAYLAND
index 18d57df..b2418f8 100644 (file)
 #include <vconf.h>
 
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/system/common/system-settings.h>
 
 namespace Dali
index d382759..525faaf 100644 (file)
 #include <vconf.h>
 
 #include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/system/common/system-settings.h>
 
 #ifndef WAYLAND
index 29e1b84..98ef0db 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/style-monitor.h>
@@ -27,7 +28,6 @@
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/system/common/command-line-options.h>
 #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>
@@ -108,7 +108,6 @@ Application::Application( int* argc, char** argv[], const std::string& styleshee
   mFramework( nullptr ),
   mContextLossConfiguration( Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ),
   mCommandLineOptions( nullptr ),
-  mSingletonService( SingletonService::New() ),
   mAdaptorBuilder( nullptr ),
   mAdaptor( nullptr ),
   mMainWindow(),
@@ -138,7 +137,12 @@ Application::Application( int* argc, char** argv[], const std::string& styleshee
 
 Application::~Application()
 {
-  mSingletonService.UnregisterAll();
+  SingletonService service = SingletonService::Get();
+  // Note this can be false i.e. if Application has never created a Core instance
+  if( service )
+  {
+    service.UnregisterAll();
+  }
 
   mMainWindow.Reset();
   delete mAdaptor;
index 1337f7b..82826cd 100755 (executable)
@@ -24,7 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/application.h>
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 #include <dali/internal/adaptor/common/framework.h>
 #include <dali/internal/system/common/environment-options.h>
@@ -398,7 +398,6 @@ private:
   Dali::Configuration::ContextLoss      mContextLossConfiguration;
   CommandLineOptions*                   mCommandLineOptions;
 
-  Dali::SingletonService                   mSingletonService;
   Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder;   ///< The adaptor builder
   Dali::Adaptor*                           mAdaptor;
 
index 5358f4f..e4cd45e 100644 (file)
@@ -23,7 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index e027472..ff5acd6 100644 (file)
@@ -20,9 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index fe5ab5e..8e08371 100755 (executable)
@@ -19,7 +19,7 @@
 #include <dali/internal/clipboard/common/clipboard-impl.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
old mode 100644 (file)
new mode 100755 (executable)
index 8721844..e411b45
@@ -17,6 +17,7 @@
 
 // CLASS HEADER
 #include <dali/internal/clipboard/common/clipboard-impl.h>
+#include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
 
 // EXTERNAL INCLUDES
 #include <dali/internal/system/linux/dali-ecore.h>
@@ -29,6 +30,7 @@
 
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 #include <unistd.h>
 
@@ -36,9 +38,6 @@
 #include <Eldbus.h>
 #endif // DALI_ELDBUS_AVAILABLE
 
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
 #define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus"
 #ifndef CBHM_DBUS_INTERFACE
 #define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus"
@@ -127,6 +126,13 @@ struct Clipboard::Impl
     types[++i] = "text/plain;charset=utf-8";
     ecore_wl_dnd_selection_get(ecore_wl_input_get(), *types);
 #endif
+
+    Dali::ClipboardEventNotifier clipboardEventNotifier(Dali::ClipboardEventNotifier::Get());
+    if ( clipboardEventNotifier )
+    {
+      clipboardEventNotifier.SetContent( mSendBuffer );
+      clipboardEventNotifier.EmitContentSelectedSignal();
+    }
   }
 
   char *ExcuteSend( void *event )
index 38a488e..1cb8704 100644 (file)
@@ -27,7 +27,7 @@
 // INTERNAL INCLUDES
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/window-system/ubuntu-x11/window-interface-ecore-x.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/internal/clipboard/common/clipboard-event-notifier-impl.h>
 
 namespace //unnamed namespace
index ea4a5f0..7468372 100644 (file)
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
 namespace Dali
 {
 
index 566027e..3598bd0 100755 (executable)
@@ -18,7 +18,7 @@
 #include <dali/internal/input/common/input-method-context-impl.h>
 #include <dali/internal/input/common/input-method-context-factory.h>
 #include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index a923588..4125be2 100755 (executable)
@@ -276,7 +276,7 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::GetPreeditStyle()
    */
-  virtual void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const {}
+  virtual void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const {}
 
 public:  // Signals
 
index cfd7320..ec7523a 100644 (file)
@@ -20,8 +20,8 @@
 // CLASS HEADER
 #include <dali/internal/input/common/physical-keyboard-impl.h>
 
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index b84f58e..1da21dc 100644 (file)
@@ -298,7 +298,7 @@ void InputMethodContextGeneric::SetInputPanelPosition( unsigned int x, unsigned
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::SetInputPanelPosition\n" );
 }
 
-void InputMethodContextGeneric::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs) const
+void InputMethodContextGeneric::GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::GetPreeditStyle\n" );
   // Do Nothing
index 2aa4b67..693d8de 100644 (file)
@@ -267,7 +267,7 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::GetPreeditStyle()
    */
-  void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const override;
+  void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const override;
 
 public:
 
index ab7c78b..bdbd873 100755 (executable)
@@ -31,6 +31,7 @@
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/adaptor-framework/scene-holder.h>
 #include <dali/internal/input/common/key-impl.h>
 #include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/window-system/common/window-render-surface.h>
 
-#define TOKEN_STRING(x) #x
-
 Ecore_IMF_Input_Panel_Layout panelLayoutMap[] =
 {
    ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL,
@@ -105,22 +103,30 @@ size_t Utf8SequenceLength(const unsigned char leadByte)
 {
   size_t length = 0;
 
-  if ((leadByte & 0x80) == 0 )          //ASCII character (lead bit zero)
+  if( ( leadByte & 0x80 ) == 0 )         //ASCII character (lead bit zero)
   {
     length = 1;
   }
-  else if (( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
+  else if( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
   {
     length = 2;
   }
-  else if (( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
+  else if( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
   {
     length = 3;
   }
-  else if (( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
+  else if( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
   {
     length = 4;
   }
+  else if( ( leadByte & 0xfc ) == 0xf8 ) //1111 10xx
+  {
+    length = 5;
+  }
+  else if( ( leadByte & 0xfe ) == 0xfc ) //1111 110x
+  {
+    length = 6;
+  }
 
   return length;
 }
@@ -521,16 +527,19 @@ void InputMethodContextEcoreWl::PreEditChanged( void*, ImfContext* imfContext, v
       size_t byteIndex = 0;
 
       // iterate through null terminated string checking each character's position against the given byte position ( attr->end_index ).
-      const char leadByte = preEditString[byteIndex];
+      char leadByte = preEditString[byteIndex];
+
       while( leadByte != '\0' )
       {
+        leadByte = preEditString[byteIndex]; // Update the character to get the number of its byte
+
         // attr->end_index is provided as a byte position not character and we need to know the character position.
         const size_t currentSequenceLength = Utf8SequenceLength( leadByte ); // returns number of bytes used to represent character.
         if( byteIndex <= attr->start_index )
         {
            data.startIndex = visualCharacterIndex;
         }
-        if ( byteIndex >= attr->end_index )
+        if( byteIndex >= attr->end_index )
         {
           data.endIndex = visualCharacterIndex;
           break;
@@ -1145,7 +1154,7 @@ void InputMethodContextEcoreWl::SetInputPanelPosition( unsigned int x, unsigned
   mBackupOperations[Operation::SET_INPUT_PANEL_POSITION] = std::bind( &InputMethodContextEcoreWl::SetInputPanelPosition, this, x, y );
 }
 
-void InputMethodContextEcoreWl::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const
+void InputMethodContextEcoreWl::GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::GetPreeditStyle\n" );
   attrs = mPreeditAttrs;
index 4ffac3a..8a37100 100755 (executable)
@@ -265,7 +265,7 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::GetPreeditStyle()
    */
-  void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const override;
+  void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const override;
 
 private:
   /**
@@ -345,7 +345,7 @@ private:
 
   std::vector<Dali::Integration::KeyEvent> mKeyEvents; ///< Stores key events to be sent from idle call-back.
   InputMethodOptions mOptions;
-  Vector< Dali::InputMethodContext::PreeditAttributeData > mPreeditAttrs; ///< Stores preedit attr data
+  Dali::InputMethodContext::PreEditAttributeDataContainer mPreeditAttrs; ///< Stores preedit attribute data
 
   int mWindowId;
 };
index ce6a57c..f9fe6ae 100755 (executable)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -33,7 +34,6 @@
 #include <dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h>
 #include <dali/internal/input/ubuntu-x11/dali-ecore-input.h>
 #include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/system/linux/dali-ecore.h>
 
 namespace Dali
@@ -56,22 +56,30 @@ size_t Utf8SequenceLength(const unsigned char leadByte)
 {
   size_t length = 0;
 
-  if ((leadByte & 0x80) == 0 )          //ASCII character (lead bit zero)
+  if( ( leadByte & 0x80 ) == 0 )         //ASCII character (lead bit zero)
   {
     length = 1;
   }
-  else if (( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
+  else if( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
   {
     length = 2;
   }
-  else if (( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
+  else if( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
   {
     length = 3;
   }
-  else if (( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
+  else if( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
   {
     length = 4;
   }
+  else if( ( leadByte & 0xfc ) == 0xf8 ) //1111 10xx
+  {
+    length = 5;
+  }
+  else if( ( leadByte & 0xfe ) == 0xfc ) //1111 110x
+  {
+    length = 6;
+  }
 
   return length;
 }
@@ -332,16 +340,19 @@ void InputMethodContextX::PreEditChanged( void*, ImfContext* imfContext, void* e
       size_t byteIndex = 0;
 
       // iterate through null terminated string checking each character's position against the given byte position ( attr->end_index ).
-      const char leadByte = preEditString[byteIndex];
+      char leadByte = preEditString[byteIndex];
+
       while( leadByte != '\0' )
       {
+        leadByte = preEditString[byteIndex]; // Update the character to get the number of its byte
+
         // attr->end_index is provided as a byte position not character and we need to know the character position.
         const size_t currentSequenceLength = Utf8SequenceLength( leadByte ); // returns number of bytes used to represent character.
         if( byteIndex <= attr->start_index )
         {
            data.startIndex = visualCharacterIndex;
         }
-        if ( byteIndex >= attr->end_index )
+        if( byteIndex >= attr->end_index )
         {
           data.endIndex = visualCharacterIndex;
           break;
@@ -840,7 +851,7 @@ void InputMethodContextX::SetInputPanelPosition( unsigned int x, unsigned int y
   // ecore_imf_context_input_panel_position_set() is supported from ecore-imf 1.21.0 version.
 }
 
-void InputMethodContextX::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const
+void InputMethodContextX::GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::GetPreeditStyle\n" );
   attrs = mPreeditAttrs;
index f4de117..e707386 100755 (executable)
@@ -271,7 +271,7 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::GetPreeditStyle()
    */
-  void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const override;
+  void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const override;
 
 private:
   /**
@@ -346,7 +346,7 @@ private:
   bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.
   bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.
   InputMethodOptions        mOptions;
-  Vector< Dali::InputMethodContext::PreeditAttributeData > mPreeditAttrs; ///< Stores preedit attr data
+  Dali::InputMethodContext::PreEditAttributeDataContainer mPreeditAttrs; ///< Stores preedit attribute data
 };
 
 } // namespace Adaptor
index 1061aec..3437f02 100755 (executable)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES\r
 #include <dali/public-api/events/key-event.h>\r
 #include <dali/public-api/object/type-registry.h>\r
+#include <dali/devel-api/common/singleton-service.h>\r
 #include <dali/integration-api/debug.h>\r
 \r
 // INTERNAL INCLUDES\r
@@ -30,7 +31,6 @@
 #include <dali/internal/input/common/key-impl.h>\r
 #include <dali/internal/input/common/virtual-keyboard-impl.h>\r
 #include <dali/internal/system/common/locale-utils.h>\r
-#include <dali/internal/system/common/singleton-service-impl.h>\r
 \r
 namespace Dali\r
 {\r
@@ -371,7 +371,7 @@ void InputMethodContextWin::SetInputPanelPosition( unsigned int x, unsigned int
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetInputPanelPosition\n" );\r
 }\r
 \r
-void InputMethodContextWin::GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const\r
+void InputMethodContextWin::GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const\r
 {\r
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetPreeditStyle\n" );\r
   attrs = mPreeditAttrs;\r
index 1af29ef..253bc02 100755 (executable)
@@ -259,7 +259,7 @@ public:
   /**\r
    * @copydoc Dali::InputMethodContext::GetPreeditStyle()\r
    */\r
-  void GetPreeditStyle( Vector< Dali::InputMethodContext::PreeditAttributeData >& attrs ) const override;\r
+  void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const override;\r
 \r
 private:\r
   /**\r
@@ -319,7 +319,7 @@ private:
   bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.\r
   bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.\r
   InputMethodOptions        mOptions;\r
-  Vector< Dali::InputMethodContext::PreeditAttributeData > mPreeditAttrs;\r
+  Dali::InputMethodContext::PreEditAttributeDataContainer mPreeditAttrs; ///< Stores preedit attribute data\r
 };\r
 \r
 } // namespace Adaptor\r
index c31836a..f5245b3 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <dali/internal/sensor/common/tilt-sensor-factory.h>
 #include <dali/internal/sensor/common/tilt-sensor-impl.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
@@ -65,4 +65,4 @@ Dali::TiltSensor Get()
 
 } // Internal
 
-} // Dali
\ No newline at end of file
+} // Dali
index d3773cf..13d3336 100644 (file)
 // EXTERNAL INCLUDES
 #include <cmath>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/integration-api/debug.h>
 
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
 namespace // unnamed namespace
 {
 const char* const SIGNAL_TILTED = "tilted";
index efe12e7..9a2b5ea 100644 (file)
@@ -22,9 +22,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace // unnamed namespace
 {
index 9b23434..8e93285 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
 
 namespace Dali
 {
index b8cf94d..c7630b2 100644 (file)
@@ -22,9 +22,7 @@
 #include <dlfcn.h>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
diff --git a/dali/internal/system/common/singleton-service-impl.cpp b/dali/internal/system/common/singleton-service-impl.cpp
deleted file mode 100755 (executable)
index a1c3329..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2019 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/internal/system/common/singleton-service-impl.h>
-
-// EXTERNAL INCLUDES
-#include <dali/integration-api/core.h>
-#include <dali/integration-api/debug.h>
-#include <dali/integration-api/processor-interface.h>
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/adaptor-framework/adaptor.h>
-#include <dali/internal/adaptor/common/adaptor-impl.h>
-
-#if defined(DEBUG_ENABLED)
-#include <dali/internal/system/common/logging.h>
-Debug::Filter* gSingletonServiceLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_SINGLETON_SERVICE" );
-
-// Need to define own macro as the log function is not installed when this object is created so no logging is shown with DALI_LOG_INFO at construction and destruction
-#define DALI_LOG_SINGLETON_SERVICE_DIRECT(level, message)                        \
-    if(gSingletonServiceLogFilter && gSingletonServiceLogFilter->IsEnabledFor(level)) { std::string string(message); Dali::TizenPlatform::LogMessage( Debug::DebugInfo, string );  }
-
-#define DALI_LOG_SINGLETON_SERVICE(level, format, ...) DALI_LOG_INFO(gSingletonServiceLogFilter, level, format, ## __VA_ARGS__ )
-#else
-
-#define DALI_LOG_SINGLETON_SERVICE_DIRECT(level, message)
-#define DALI_LOG_SINGLETON_SERVICE(level, format, ...)
-
-#endif
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-thread_local SingletonService * gSingletonService = 0;
-} // unnamed namespace
-
-Dali::SingletonService SingletonService::New()
-{
-  Dali::SingletonService singletonService( new SingletonService );
-  return singletonService;
-}
-
-Dali::SingletonService SingletonService::Get()
-{
-  Dali::SingletonService singletonService;
-  if ( gSingletonService )
-  {
-    singletonService = Dali::SingletonService( gSingletonService );
-  }
-  return singletonService;
-}
-
-void SingletonService::Register( const std::type_info& info, BaseHandle singleton )
-{
-  if( singleton )
-  {
-    DALI_LOG_SINGLETON_SERVICE( Debug::General, "Singleton Added: %s\n", info.name() );
-    mSingletonContainer.push_back( SingletonPair( info.name(), singleton ) );
-
-    Integration::Processor* processor = dynamic_cast<Integration::Processor*>( &singleton.GetBaseObject() );
-    if( processor )
-    {
-      Dali::Adaptor& adaptor = Dali::Adaptor::Get();
-      Dali::Internal::Adaptor::Adaptor& adaptorImpl = Adaptor::GetImplementation( adaptor );
-      Integration::Core& core = adaptorImpl.GetCore();
-      core.RegisterProcessor( *processor );
-    }
-  }
-}
-
-void SingletonService::UnregisterAll( )
-{
-  mSingletonContainer.clear();
-}
-
-BaseHandle SingletonService::GetSingleton( const std::type_info& info ) const
-{
-  BaseHandle object;
-
-  const SingletonContainer::const_iterator end = mSingletonContainer.end();
-  for( SingletonContainer::const_iterator iter = mSingletonContainer.begin(); iter != end; ++iter )
-  {
-    // comparing the addresses as these are allocated statically per library
-    if( ( *iter ).first == info.name() )
-    {
-      object = ( *iter ).second;
-    }
-  }
-
-  return object;
-}
-
-SingletonService::SingletonService()
-: mSingletonContainer()
-{
-  // Can only have one instance of SingletonService
-  DALI_ASSERT_ALWAYS( !gSingletonService && "Only one instance of SingletonService is allowed");
-
-  gSingletonService = this;
-
-  DALI_LOG_SINGLETON_SERVICE_DIRECT( Debug::Concise, "SingletonService Created\n" );
-}
-
-SingletonService::~SingletonService()
-{
-  gSingletonService = 0;
-
-  DALI_LOG_SINGLETON_SERVICE_DIRECT( Debug::Concise, "SingletonService Destroyed\n" );
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
diff --git a/dali/internal/system/common/singleton-service-impl.h b/dali/internal/system/common/singleton-service-impl.h
deleted file mode 100644 (file)
index 986e72a..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-#ifndef DALI_INTERNAL_SINGLETON_SERVICE_H
-#define DALI_INTERNAL_SINGLETON_SERVICE_H
-
-/*
- * Copyright (c) 2019 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/common/vector-wrapper.h>
-
-// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-class SingletonService : public Dali::BaseObject
-{
-public:
-
-  /**
-   * Create a SingletonService.
-   * This should only be called once by the Application class.
-   * @return A newly created SingletonService.
-   */
-  static Dali::SingletonService New();
-
-  /**
-   * @copydoc Dali::SingletonService::Get()
-   */
-  static Dali::SingletonService Get();
-
-  /**
-   * @copydoc Dali::SingletonService::Register()
-   */
-  void Register( const std::type_info& info, BaseHandle singleton );
-
-  /**
-   * @copydoc Dali::SingletonService::UnregisterAll()
-   */
-  void UnregisterAll();
-
-  /**
-   * @copydoc Dali::SingletonService::GetSingleton()
-   */
-  BaseHandle GetSingleton( const std::type_info& info ) const;
-
-private:
-
-  /**
-   * Private Constructor
-   * @see SingletonService::New()
-   */
-  SingletonService();
-
-  /**
-   * Virtual Destructor
-   */
-  virtual ~SingletonService();
-
-  // Undefined
-  SingletonService( const SingletonService& );
-  SingletonService& operator=( SingletonService& );
-
-private:
-
-  // using the address of the type name string as compiler will allocate these once per library
-  // and we don't support un/re-loading of dali libraries while singleton service is alive
-  typedef std::pair< const char*, BaseHandle> SingletonPair;
-  typedef std::vector< SingletonPair >  SingletonContainer;
-  typedef SingletonContainer::const_iterator SingletonConstIter;
-
-  SingletonContainer mSingletonContainer; ///< The container to look up singleton by its type name
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::Adaptor::SingletonService& GetImplementation(Dali::SingletonService& player)
-{
-  DALI_ASSERT_ALWAYS( player && "SingletonService handle is empty" );
-
-  BaseObject& handle = player.GetBaseObject();
-
-  return static_cast<Internal::Adaptor::SingletonService&>(handle);
-}
-
-inline const Internal::Adaptor::SingletonService& GetImplementation(const Dali::SingletonService& player)
-{
-  DALI_ASSERT_ALWAYS( player && "SingletonService handle is empty" );
-
-  const BaseObject& handle = player.GetBaseObject();
-
-  return static_cast<const Internal::Adaptor::SingletonService&>(handle);
-}
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SINGLETON_SERVICE_H
index 62084d5..572747d 100644 (file)
@@ -20,9 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index 0ac2ec5..3c5be55 100644 (file)
@@ -16,7 +16,6 @@ SET( adaptor_system_common_src_files
     ${adaptor_system_dir}/common/performance-logger-impl.cpp
     ${adaptor_system_dir}/common/performance-marker.cpp
     ${adaptor_system_dir}/common/performance-server.cpp
-    ${adaptor_system_dir}/common/singleton-service-impl.cpp
     ${adaptor_system_dir}/common/sound-player-impl.cpp
     ${adaptor_system_dir}/common/stat-context.cpp
     ${adaptor_system_dir}/common/stat-context-manager.cpp
index 2f5e7ab..7142ada 100755 (executable)
 // CLASS  HEADER
 #include <dali/internal/text/text-abstraction/bidirectional-support-impl.h>
 
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
 // EXTERNAL INCLUDES
 #include <memory.h>
 #include <fribidi/fribidi.h>
 #include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace Dali
 {
index 862ff7b..1a653d6 100755 (executable)
@@ -24,7 +24,7 @@
 #endif
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
+#include <dali/devel-api/common/singleton-service.h>
 #include <dali/internal/text/text-abstraction/font-client-plugin-impl.h>
 
 #include <dali/devel-api/text-abstraction/glyph-info.h>
index f585163..fd97c20 100644 (file)
 // CLASS  HEADER
 #include <dali/internal/text/text-abstraction/segmentation-impl.h>
 
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
 #include <third-party/libunibreak/linebreak.h>
 #include <third-party/libunibreak/wordbreak.h>
 
index 30dfbd0..b785c02 100755 (executable)
@@ -19,7 +19,6 @@
 #include <dali/internal/text/text-abstraction/shaping-impl.h>
 
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali/devel-api/text-abstraction/glyph-info.h>
 #include <dali/integration-api/debug.h>
@@ -28,6 +27,7 @@
 // EXTERNAL INCLUDES
 #include <harfbuzz/hb.h>
 #include <harfbuzz/hb-ft.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 namespace
 {
index 449eaa1..a360361 100755 (executable)
 // CLASS  HEADER
 #include <dali/internal/text/text-abstraction/text-renderer-impl.h>
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
+
 // INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/text/text-abstraction/cairo-renderer.h>
 
 namespace Dali
index 9679d79..9ca9c71 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 9;
-const unsigned int ADAPTOR_MICRO_VERSION = 0;
+const unsigned int ADAPTOR_MICRO_VERSION = 1;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index dcb3172..38106c8 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.9.0
+Version:    1.9.1
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT