/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
-#include <accessibility-manager.h>
-#include <imf-manager.h>
-#include <style-monitor.h>
-#include <window.h>
// INTERNAL INCLUDES
+#include <accessibility-adaptor.h>
+#include <imf-manager.h>
+#include <style-monitor.h>
+#include <render-surface.h>
#include <adaptor-impl.h>
-#include <render-surface-impl.h>
-#include <window-impl.h>
namespace Dali
{
Adaptor& Adaptor::New( Window window )
{
- return New( window, DeviceLayout::DEFAULT_BASE_LAYOUT );
+ return New( window, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
+}
+
+Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
+{
+ Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL );
+ return *adaptor;
+}
+
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface )
+{
+ return New( nativeWindow, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
}
-Adaptor& Adaptor::New( Window window, const DeviceLayout& baseLayout )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration )
{
- Internal::Adaptor::Window& windowImpl = GetImplementation(window);
- Adaptor* adaptor = Internal::Adaptor::Adaptor::New( windowImpl.GetSurface(), baseLayout );
- windowImpl.SetAdaptor(*adaptor);
+ Dali::RenderSurface* pSurface = const_cast<Dali::RenderSurface *>(&surface);
+ Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration, NULL );
return *adaptor;
}
mImpl->Stop();
}
-bool Adaptor::AddIdle( boost::function<void(void)> callBack )
+bool Adaptor::AddIdle( CallbackBase* callback )
{
- return mImpl->AddIdle(callBack);
+ return mImpl->AddIdle( callback );
}
-Adaptor::AdaptorSignalV2& Adaptor::ResizedSignal()
+void Adaptor::RemoveIdle( CallbackBase* callback )
+{
+ mImpl->RemoveIdle( callback );
+}
+
+void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface )
+{
+ mImpl->ReplaceSurface(nativeWindow, surface);
+}
+
+Adaptor::AdaptorSignalType& Adaptor::ResizedSignal()
{
return mImpl->ResizedSignal();
}
-Adaptor::AdaptorSignalV2& Adaptor::LanguageChangedSignal()
+Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal()
{
return mImpl->LanguageChangedSignal();
}
return mImpl->GetSurface();
}
+Any Adaptor::GetNativeWindowHandle()
+{
+ return mImpl->GetNativeWindowHandle();
+}
+
void Adaptor::ReleaseSurfaceLock()
{
mImpl->ReleaseSurfaceLock();
return Internal::Adaptor::Adaptor::IsAvailable();
}
+void Adaptor::NotifySceneCreated()
+{
+ mImpl->NotifySceneCreated();
+}
+
void Adaptor::NotifyLanguageChanged()
{
mImpl->NotifyLanguageChanged();
mImpl->SetMinimumPinchDistance(distance);
}
+void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
+{
+ mImpl->FeedTouchPoint(point, timeStamp);
+}
+
+void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent )
+{
+ mImpl->FeedWheelEvent(wheelEvent);
+}
+
+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 )
{