#define DALI_INTERNAL_ADAPTOR_IMPL_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
// EXTERNAL INCLUDES
#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/common/view-mode.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/signals/callback.h>
#include <dali/public-api/math/uint-16-pair.h>
class Core;
class GlAbstraction;
class Processor;
+class AddOnManager;
}
namespace Internal
class LifeCycleObserver;
class ObjectProfiler;
class SceneHolder;
+class ConfigurationManager;
+enum class ThreadMode;
/**
* Implementation of the Adaptor class.
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
Dali::RenderSurfaceInterface* surface,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* Creates a New Adaptor
* @param[in] window The window handle
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
Dali::Integration::SceneHolder window,
Dali::RenderSurfaceInterface* surface,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* Creates a New Adaptor
* @param[in] graphicsFactory A factory that creates the graphics interface
* @param[in] window The window handle
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
Dali::Integration::SceneHolder window,
- Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* 2-step initialisation, this should be called after creating an adaptor instance.
* @param[in] graphicsFactory A factory that creates the graphics interface
- * @param[in] configuration The context loss configuration ( to choose resource discard policy )
*/
- void Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration::ContextLoss configuration );
+ void Initialize( GraphicsFactory& graphicsFactory );
/**
* Virtual destructor.
/**
* @copydoc Dali::EventFeeder::FeedWheelEvent()
*/
- virtual void FeedWheelEvent( WheelEvent& wheelEvent );
+ virtual void FeedWheelEvent( Dali::WheelEvent& wheelEvent );
/**
* @copydoc Dali::EventFeeder::FeedKeyEvent()
*/
- virtual void FeedKeyEvent( KeyEvent& keyEvent );
+ virtual void FeedKeyEvent( Dali::KeyEvent& keyEvent );
/**
* @copydoc Dali::Adaptor::ReplaceSurface()
/**
* Adds a new Window instance to the Adaptor
* @param[in] childWindow The child window instance
- * @param[in] childWindowName The child window title/name
- * @param[in] childWindowClassName The class name that the child window belongs to
- * @param[in] childWindowMode The mode of the child window
*/
- virtual bool AddWindow( Dali::Integration::SceneHolder childWindow,
- const std::string& childWindowName,
- const std::string& childWindowClassName,
- bool childWindowMode );
+ virtual bool AddWindow( Dali::Integration::SceneHolder childWindow );
/**
* Removes an existing Window instance from the Adaptor
virtual void RemoveIdle( CallbackBase* callback );
/**
+ * @copydoc Dali::Adaptor::ProcessIdle()
+ */
+ virtual void ProcessIdle();
+
+ /**
* Sets a pre-render callback.
*/
void SetPreRenderCallback( CallbackBase* callback );
*/
Dali::SceneHolderList GetSceneHolders() const;
+ /**
+ * @copydoc Dali::Adaptor::GetObjectRegistry()
+ */
+ Dali::ObjectRegistry GetObjectRegistry() const;
+
public:
/**
virtual TriggerEventInterface& GetProcessCoreEventsTrigger();
/**
- * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetTriggerEventFactoryInterface()
- */
- virtual TriggerEventFactoryInterface& GetTriggerEventFactoryInterface();
-
- /**
* @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSocketFactoryInterface()
*/
virtual SocketFactoryInterface& GetSocketFactoryInterface();
*/
virtual TraceInterface& GetSystemTraceInterface();
+ /**
+ * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface()
+ */
+ virtual void GetWindowContainerInterface( WindowContainer& windows );
+
public: // Signals
/**
Dali::Integration::Core* mCore; ///< Dali Core
ThreadController* mThreadController; ///< Controls the threads
- GraphicsInterface* mGraphics; ///< Graphics interface
+ std::unique_ptr< GraphicsInterface > mGraphics; ///< Graphics interface
Dali::DisplayConnection* mDisplayConnection; ///< Display connection
WindowContainer mWindows; ///< A container of all the Windows that are currently created
+ std::unique_ptr<ConfigurationManager> mConfigurationManager; ///< Configuration manager
+
TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction
CallbackManager* mCallbackManager; ///< Used to install callbacks
PerformanceInterface* mPerformanceInterface; ///< Performance interface
KernelTrace mKernelTracer; ///< Kernel tracer
SystemTrace mSystemTracer; ///< System tracer
- TriggerEventFactory mTriggerEventFactory; ///< Trigger event factory
ObjectProfiler* mObjectProfiler; ///< Tracks object lifetime for profiling
SocketFactory mSocketFactory; ///< Socket factory
+ ThreadMode mThreadMode; ///< The thread mode
const bool mEnvironmentOptionsOwned:1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it)
- bool mUseRemoteSurface; ///< whether the remoteSurface is used or not
+ bool mUseRemoteSurface:1; ///< whether the remoteSurface is used or not
+ Dali::LayoutDirection::Type mRootLayoutDirection; ///< LayoutDirection of window
+
+ std::unique_ptr<Integration::AddOnManager> mAddOnManager; ///< Pointer to the addon manager
public:
inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) { return *adaptor.mImpl; }