(Touch) Add Pressure, radius & angle information
[platform/core/uifw/dali-adaptor.git] / adaptors / common / adaptor.cpp
index 5269195..9c6701c 100644 (file)
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <accessibility-manager.h>
+#include <accessibility-adaptor.h>
 #include <imf-manager.h>
 #include <style-monitor.h>
-#include <window.h>
 #include <render-surface.h>
 #include <adaptor-impl.h>
-#include <window-impl.h>
 
 namespace Dali
 {
 
 Adaptor& Adaptor::New( Window window )
 {
-  return New( window, DeviceLayout::DEFAULT_BASE_LAYOUT, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
+  return New( window, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
 }
 
-Adaptor& Adaptor::New( Window window, const DeviceLayout& baseLayout, Configuration::ContextLoss configuration )
+Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
 {
-  Any winId = window.GetNativeHandle();
-
-  Internal::Adaptor::Window& windowImpl = GetImplementation(window);
-  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( winId, windowImpl.GetSurface(), baseLayout, configuration );
-  windowImpl.SetAdaptor(*adaptor);
+  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL );
   return *adaptor;
 }
 
 Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface )
 {
-  return New( nativeWindow, surface, DeviceLayout::DEFAULT_BASE_LAYOUT, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
+  return New( nativeWindow, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, const DeviceLayout& baseLayout, Configuration::ContextLoss configuration )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration )
 {
   Dali::RenderSurface* pSurface = const_cast<Dali::RenderSurface *>(&surface);
-  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, baseLayout, configuration );
+  Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration, NULL );
   return *adaptor;
 }
 
@@ -110,6 +104,11 @@ RenderSurface& Adaptor::GetSurface()
   return mImpl->GetSurface();
 }
 
+Any Adaptor::GetNativeWindowHandle()
+{
+  return mImpl->GetNativeWindowHandle();
+}
+
 void Adaptor::ReleaseSurfaceLock()
 {
   mImpl->ReleaseSurfaceLock();
@@ -135,6 +134,11 @@ bool Adaptor::IsAvailable()
   return Internal::Adaptor::Adaptor::IsAvailable();
 }
 
+void Adaptor::NotifySceneCreated()
+{
+  mImpl->NotifySceneCreated();
+}
+
 void Adaptor::NotifyLanguageChanged()
 {
   mImpl->NotifyLanguageChanged();
@@ -150,7 +154,7 @@ void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
   mImpl->FeedTouchPoint(point, timeStamp);
 }
 
-void Adaptor::FeedWheelEvent( MouseWheelEvent& wheelEvent )
+void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent )
 {
   mImpl->FeedWheelEvent(wheelEvent);
 }
@@ -160,6 +164,22 @@ void Adaptor::FeedKeyEvent( KeyEvent& keyEvent )
   mImpl->FeedKeyEvent(keyEvent);
 }
 
+void Adaptor::SceneCreated()
+{
+  mImpl->SceneCreated();
+}
+
+void Adaptor::SetViewMode( ViewMode mode )
+{
+  mImpl->SetViewMode( mode );
+}
+
+void Adaptor::SetStereoBase(  float stereoBase )
+{
+  mImpl->SetStereoBase( stereoBase );
+}
+
+
 Adaptor::Adaptor()
 : mImpl( NULL )
 {