X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-adaptor-impl.h;h=c3616b2484f2460bede5252cb2c720001e9afbd6;hp=06350f5035a5b4f814d6d655b9088f8088d69798;hb=8a647e87a01c5c78451653c1264a9eea81ac9b20;hpb=aff52b6dbc13a5be62bbd5db2e4c76d3746d9e40 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h index 06350f5..c3616b2 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_ADAPTOR_IMPL_H__ -#define __DALI_TOOLKIT_ADAPTOR_IMPL_H__ +#ifndef DALI_TOOLKIT_ADAPTOR_IMPL_H +#define DALI_TOOLKIT_ADAPTOR_IMPL_H /* - * Copyright (c) 2016 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. @@ -18,74 +18,96 @@ * */ -#include +#include namespace Dali { class EglInterface; class DisplayConnection; class ThreadSynchronizationInterface; +class Window; +class TestApplication; namespace Integration { +class Scene; +} -class GlAbstraction; - -} // namespace Integration +using WindowContainer = std::vector; -class TestRenderSurface : public RenderSurface +namespace Internal { -public: - virtual PositionSize GetPositionSize() const { PositionSize size; return size; } - - virtual void InitializeEgl( EglInterface& egl ) {} - - virtual void CreateEglSurface( EglInterface& egl ) {} - - virtual void DestroyEglSurface( EglInterface& egl ) {} - virtual bool ReplaceEGLSurface( EglInterface& egl ) { return false; } - - virtual void MoveResize( Dali::PositionSize positionSize ) {} - - virtual void SetViewMode( ViewMode viewMode ) {} - - virtual void StartRender() {} +namespace Adaptor +{ - virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, bool resizingSurface ) { return false; } +class GraphicsInterface; +class SceneHolder; - virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface ) {} +} // namespace Adaptor - virtual void StopRender() {} +} // namespace Internal - virtual void ReleaseLock() {} +namespace Integration +{ - virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) {} +class GlAbstraction; - virtual RenderSurface::Type GetSurfaceType() { return RenderSurface::WINDOW_RENDER_SURFACE; } -}; +} // namespace Integration namespace Internal { namespace Adaptor { -class Adaptor: public BaseObject +class Adaptor { public: + static Dali::Adaptor& New(); static Dali::Adaptor& Get(); Adaptor(); ~Adaptor(); -public: - static Dali::RenderSurface& GetSurface(); - static Dali::Adaptor::AdaptorSignalType& AdaptorSignal(); - static bool mAvailable; - static Vector mCallbacks; + void Start( Dali::Window window ); + + bool AddIdle( CallbackBase* callback, bool hasReturnValue ); + void RemoveIdle( CallbackBase* callback ); + void RunIdles(); + + static Integration::Scene GetScene( Dali::Window window ); + + Dali::RenderSurfaceInterface& GetSurface(); + Dali::WindowContainer GetWindows(); + Dali::SceneHolderList GetSceneHolders(); + + Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor ); + void AddWindow( Internal::Adaptor::SceneHolder* window ); + void RemoveWindow( Internal::Adaptor::SceneHolder* window ); + + void RegisterProcessor( Integration::Processor& processor ); + void UnregisterProcessor( Integration::Processor& processor ); + + void SetApplication( Dali::TestApplication& testApplication ); + + Dali::Adaptor::AdaptorSignalType& ResizedSignal(); + Dali::Adaptor::AdaptorSignalType& LanguageChangedSignal(); + Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal(); + + static Adaptor& GetImpl( Dali::Adaptor& adaptor ) { return *adaptor.mImpl; } + static const Adaptor& GetImpl( const Dali::Adaptor& adaptor ) { return *adaptor.mImpl; } + +private: + + Vector mCallbacks; + std::vector mWindows; + Dali::Adaptor::AdaptorSignalType mResizedSignal; + Dali::Adaptor::AdaptorSignalType mLanguageChangedSignal; + Dali::Adaptor::WindowCreatedSignalType mWindowCreatedSignal; + TestApplication* mTestApplication; }; } // namespace Adaptor } // namespace Internal } // namespace Dali -#endif // __DALI_TOOLKIT_ADAPTOR_IMPL_H__ +#endif // DALI_TOOLKIT_ADAPTOR_IMPL_H