Make radio buttons work with size negotiation, bug fixes.
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-adaptor.cpp
index c27157d..17bd210 100644 (file)
@@ -1,24 +1,25 @@
-//
-// 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.
+ *
+ */
 
 #define __DALI_ADAPTOR_H__
 #define __DALI_ACCESSIBILITY_MANAGER_H__
 #define __DALI_TIMER_H__
 #define __DALI_CLIPBOARD_H__
-#define IMFMANAGER_H
+#define __DALI_IMF_MANAGER_H__
 
 #include "toolkit-adaptor.h"
 #include <map>
@@ -39,8 +40,6 @@ public:
   virtual Dali::Any GetSurface() { return Dali::Any(); }
   virtual Dali::Any GetDisplay() { return Dali::Any(); }
   virtual PositionSize GetPositionSize() const { return PositionSize(0, 0, 640, 480);}
-  virtual void SetRenderMode(RenderMode mode){}
-  virtual RenderMode GetRenderMode() const { return RenderSurface::RENDER_60FPS; }
 };
 
 typedef Dali::Rect<int> PositionSize;
@@ -54,10 +53,6 @@ public:
 
   typedef SignalV2< void ( Adaptor& ) > AdaptorSignalV2;
 
-  typedef std::pair<std::string, Dali::BaseHandle> SingletonPair;
-  typedef std::map<std::string, Dali::BaseHandle>  SingletonContainer;
-  typedef SingletonContainer::const_iterator       SingletonConstIter;
-
 public:
 
   Adaptor(ToolkitAdaptor& toolkitAdaptor);
@@ -77,9 +72,6 @@ public:
   void RenderSync();
   RenderSurface& GetSurface();
 
-  void RegisterSingleton(const std::type_info& info, Dali::BaseHandle singleton);
-  Dali::BaseHandle GetSingleton(const std::type_info& info) const;
-
 public: // static methods
   static Adaptor& Get();
   static bool IsAvailable();
@@ -102,8 +94,6 @@ private:
   AdaptorSignalV2 mResizeSignal;
   TestRenderSurface mRenderSurface;
   ToolkitAdaptor& mToolkitAdaptor;
-
-  SingletonContainer mSingletonContainer;
 };
 
 namespace
@@ -205,31 +195,6 @@ bool Adaptor::IsAvailable()
   return available;
 }
 
-void Adaptor::RegisterSingleton(const std::type_info& info, Dali::BaseHandle singleton)
-{
-  mToolkitAdaptor.mFunctionsCalled.RegisterSingleton = true;
-
-  if(singleton)
-  {
-    mSingletonContainer.insert(SingletonPair(info.name(), singleton));
-  }
-}
-
-Dali::BaseHandle Adaptor::GetSingleton(const std::type_info& info) const
-{
-  mToolkitAdaptor.mFunctionsCalled.GetSingleton = true;
-
-  Dali::BaseHandle object = Dali::BaseHandle();
-
-  SingletonConstIter iter = mSingletonContainer.find(info.name());
-  if(iter != mSingletonContainer.end())
-  {
-    object = (*iter).second;
-  }
-
-  return object;
-}
-
 Adaptor::AdaptorSignalV2& Adaptor::SignalResize()
 {
   mToolkitAdaptor.mFunctionsCalled.SignalResize = true;