X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fcommon%2Fadaptor.cpp;h=847f42e29760f9e35bb3859c8b8d496a1185f4a3;hb=88d565576965f2b4a0a5c1cb870606194cd7b241;hp=f041a68a2afc05be8a46325af39be36ba54a513c;hpb=e0a915e1088351d862ca0e61cb97f942511c4d61;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/common/adaptor.cpp b/adaptors/common/adaptor.cpp index f041a68..847f42e 100644 --- a/adaptors/common/adaptor.cpp +++ b/adaptors/common/adaptor.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -22,13 +22,11 @@ #include // INTERNAL INCLUDES -#include +#include #include #include -#include #include #include -#include namespace Dali { @@ -40,11 +38,7 @@ Adaptor& Adaptor::New( Window window ) 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(), configuration ); - windowImpl.SetAdaptor(*adaptor); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL ); return *adaptor; } @@ -56,7 +50,7 @@ Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface ) Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration ) { Dali::RenderSurface* pSurface = const_cast(&surface); - Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration ); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration, NULL ); return *adaptor; } @@ -90,6 +84,11 @@ bool Adaptor::AddIdle( CallbackBase* callback ) return mImpl->AddIdle( callback ); } +void Adaptor::RemoveIdle( CallbackBase* callback ) +{ + mImpl->RemoveIdle( callback ); +} + void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface ) { mImpl->ReplaceSurface(nativeWindow, surface); @@ -110,6 +109,11 @@ RenderSurface& Adaptor::GetSurface() return mImpl->GetSurface(); } +Any Adaptor::GetNativeWindowHandle() +{ + return mImpl->GetNativeWindowHandle(); +} + void Adaptor::ReleaseSurfaceLock() { mImpl->ReleaseSurfaceLock(); @@ -165,6 +169,21 @@ 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 ) {