-#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.
*
*/
-#include <dali/integration-api/adaptors/render-surface-interface.h>
+#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
namespace Dali
{
class EglInterface;
class DisplayConnection;
class ThreadSynchronizationInterface;
+class Window;
+class TestApplication;
+
+namespace Integration
+{
+class Scene;
+}
+
+using WindowContainer = std::vector<Window>;
namespace Internal
{
{
class GraphicsInterface;
+class SceneHolder;
} // namespace Adaptor
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::Adaptor::AdaptorSignalType& AdaptorSignal();
- static bool mAvailable;
- static Vector<CallbackBase*> 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<CallbackBase*> mCallbacks;
+ std::vector<Internal::Adaptor::SceneHolder*> 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