Remove deprecated SetRemoveTime API
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / focus-manager / focus-manager.cpp
index 873ec65..a4cddb1 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
+/*
+ * 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.
+ *
+ */
 
 // CLASS HEADER
 
@@ -47,19 +48,22 @@ FocusManager FocusManager::Get()
   FocusManager manager;
 
   // Check whether the focus manager is already created
-  Dali::Adaptor& adaptor = Dali::Adaptor::Get();
-  Dali::BaseHandle handle = adaptor.GetSingleton(typeid(FocusManager));
-  if(handle)
+  SingletonService singletonService( SingletonService::Get() );
+  if ( singletonService )
   {
-    // If so, downcast the handle of singleton to focus manager
-    manager = FocusManager(dynamic_cast<Internal::FocusManager*>(handle.GetObjectPtr()));
-  }
-
-  if(!manager)
-  {
-    // If not, create the focus manager and register it as a singleton
-    manager = FocusManager(new Internal::FocusManager());
-    adaptor.RegisterSingleton(typeid(manager), manager);
+    Dali::BaseHandle handle = singletonService.GetSingleton(typeid(FocusManager));
+    if(handle)
+    {
+      // If so, downcast the handle of singleton to focus manager
+      manager = FocusManager(dynamic_cast<Internal::FocusManager*>(handle.GetObjectPtr()));
+    }
+
+    if(!manager)
+    {
+      // If not, create the focus manager and register it as a singleton
+      manager = FocusManager(new Internal::FocusManager());
+      singletonService.Register(typeid(manager), manager);
+    }
   }
 
   return manager;
@@ -170,16 +174,6 @@ bool FocusManager::GetWrapMode() const
   return GetImpl(*this).GetWrapMode();
 }
 
-void FocusManager::SetEndCapFeedbackEnabled(bool enabled)
-{
-  GetImpl(*this).SetEndCapFeedbackEnabled(enabled);
-}
-
-bool FocusManager::GetEndCapFeedbackEnabled() const
-{
-  return GetImpl(*this).GetEndCapFeedbackEnabled();
-}
-
 void FocusManager::SetFocusIndicatorActor(Actor indicator)
 {
   GetImpl(*this).SetFocusIndicatorActor(indicator);