X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor.cpp;h=bde2864547e2d1c2bbb6cd627e47f723b9aa46b4;hb=3259f7e05d09669ec473725ac360652beb6ed0b3;hp=82382d802e6062dadc2d78a7aabf6d0294a94c63;hpb=92b2ba1433ebcade9079ab40c83716f55625d5cc;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor.cpp b/dali/internal/adaptor/common/adaptor.cpp index 82382d8..bde2864 100755 --- a/dali/internal/adaptor/common/adaptor.cpp +++ b/dali/internal/adaptor/common/adaptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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,10 +22,16 @@ #include // INTERNAL INCLUDES -#include #include #include #include +#include + +#ifdef DALI_ADAPTOR_COMPILATION +#include +#else +#include +#endif namespace Dali { @@ -37,7 +43,8 @@ Adaptor& Adaptor::New( Window window ) Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration ) { - Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL ); + Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window ); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), configuration, NULL ); return *adaptor; } @@ -48,6 +55,30 @@ Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surfac Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration ) { + Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window ); + Dali::RenderSurfaceInterface* pSurface = const_cast(&surface); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), pSurface, configuration, NULL ); + return *adaptor; +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window ) +{ + return New( window, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ); +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, Configuration::ContextLoss configuration ) +{ + Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, configuration, NULL ); + return *adaptor; +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface ) +{ + return New( window, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ); +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration ) +{ Dali::RenderSurfaceInterface* pSurface = const_cast(&surface); Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, pSurface, configuration, NULL ); return *adaptor; @@ -83,6 +114,11 @@ bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue ) return mImpl->AddIdle( callback, hasReturnValue, false ); } +bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode ) +{ + return mImpl->AddWindow( childWindow, childWindowName, childWindowClassName, childWindowMode ); +} + void Adaptor::RemoveIdle( CallbackBase* callback ) { mImpl->RemoveIdle( callback ); @@ -90,6 +126,12 @@ void Adaptor::RemoveIdle( CallbackBase* callback ) void Adaptor::ReplaceSurface( Window window, Dali::RenderSurfaceInterface& surface ) { + Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window ); + mImpl->ReplaceSurface( Dali::Integration::SceneHolder( sceneHolder ), surface ); +} + +void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& surface ) +{ mImpl->ReplaceSurface( window, surface ); } @@ -103,6 +145,11 @@ Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal() return mImpl->LanguageChangedSignal(); } +Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal() +{ + return mImpl->WindowCreatedSignal(); +} + Dali::RenderSurfaceInterface& Adaptor::GetSurface() { return mImpl->GetSurface(); @@ -113,6 +160,11 @@ Any Adaptor::GetNativeWindowHandle() return mImpl->GetNativeWindowHandle(); } +Any Adaptor::GetNativeWindowHandle( Actor actor ) +{ + return mImpl->GetNativeWindowHandle( actor ); +} + Any Adaptor::GetGraphicsDisplay() { return mImpl->GetGraphicsDisplay(); @@ -133,11 +185,6 @@ void Adaptor::SetPreRenderCallback( CallbackBase* callback ) mImpl->SetPreRenderCallback( callback ); } -void Adaptor::SetUseHardwareVSync(bool useHardware) -{ - mImpl->SetUseHardwareVSync( useHardware ); -} - Adaptor& Adaptor::Get() { return Internal::Adaptor::Adaptor::Get(); @@ -158,11 +205,6 @@ void Adaptor::NotifyLanguageChanged() mImpl->NotifyLanguageChanged(); } -void Adaptor::SetMinimumPinchDistance(float distance) -{ - mImpl->SetMinimumPinchDistance(distance); -} - void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp ) { mImpl->FeedTouchPoint(point, timeStamp); @@ -183,6 +225,16 @@ void Adaptor::SceneCreated() mImpl->SceneCreated(); } +void Adaptor::SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ) +{ + mImpl->SurfaceResizePrepare( surface, surfaceSize ); +} + +void Adaptor::SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ) +{ + mImpl->SurfaceResizeComplete( surface, surfaceSize ); +} + void Adaptor::RenderOnce() { mImpl->RenderOnce(); @@ -203,6 +255,21 @@ void Adaptor::UnregisterProcessor( Integration::Processor& processor ) mImpl->UnregisterProcessor( processor ); } +Dali::WindowContainer Adaptor::GetWindows() const +{ + return mImpl->GetWindows(); +} + +void Adaptor::OnWindowShown() +{ + mImpl->OnWindowShown(); +} + +void Adaptor::OnWindowHidden() +{ + mImpl->OnWindowHidden(); +} + Adaptor::Adaptor() : mImpl( NULL ) {