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=4970dc457707f890f4d6f526949d1a7b2a80e86a;hp=e49b3587725bb8939e110673c0f404a9d4973cc5;hb=7018f61b640b6fcf9cb576b537bafcb6bb8240e8;hpb=68b0edb7de863b5198ec0afeac0a7e351dd6bd24 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 e49b358..4970dc4 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 @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_ADAPTOR_IMPL_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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,7 +18,7 @@ * */ -#include +#include namespace Dali { @@ -26,6 +26,12 @@ class EglInterface; class DisplayConnection; class ThreadSynchronizationInterface; class Window; +class TestApplication; + +namespace Integration +{ +class Scene; +} using WindowContainer = std::vector; @@ -36,6 +42,7 @@ namespace Adaptor { class GraphicsInterface; +class SceneHolder; } // namespace Adaptor @@ -53,22 +60,50 @@ namespace Internal namespace Adaptor { -class Adaptor: public BaseObject +class Adaptor { public: + static Dali::Adaptor& New(); static Dali::Adaptor& Get(); Adaptor(); ~Adaptor(); -public: - static Dali::RenderSurfaceInterface& GetSurface(); - static Dali::WindowContainer GetWindows(); - static Dali::Adaptor::AdaptorSignalType& AdaptorSignal(); - static Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal(); - static bool mAvailable; - static Vector mCallbacks; - static Dali::WindowContainer mWindows; - static Dali::Adaptor::WindowCreatedSignalType* mWindowCreatedSignal; + 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, bool postProcessor = false); + void UnregisterProcessor( Integration::Processor& processor, bool postProcessor = false); + + 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