X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.h;h=a62bede62aff82a201eb3bdda92297fc1ea8a1bc;hb=97568a209c309d5f99bf288afa951a77f7fdcddd;hp=c2a9ad4a0392416563598016f98ddb39b7a4bc46;hpb=aecc2d4c642e0cdf360e56accd3e5b96622a707f;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h old mode 100755 new mode 100644 index c2a9ad4..a62bede --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -20,7 +20,6 @@ // EXTERNAL INCLUDES #include -#include #include #include #include @@ -54,6 +53,7 @@ namespace Integration class Core; class GlAbstraction; class Processor; +class AddOnManager; } namespace Internal @@ -76,6 +76,7 @@ class LifeCycleObserver; class ObjectProfiler; class SceneHolder; class ConfigurationManager; +enum class ThreadMode; /** * Implementation of the Adaptor class. @@ -99,22 +100,18 @@ public: * @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 ); /** @@ -124,38 +121,33 @@ public: * @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. */ - virtual ~Adaptor(); + ~Adaptor() override; /** * @copydoc Dali::Adaptor::Get() @@ -211,12 +203,12 @@ public: // AdaptorInternalServices implementation /** * @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() @@ -248,14 +240,8 @@ public: // AdaptorInternalServices implementation /** * 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 @@ -292,6 +278,12 @@ public: // AdaptorInternalServices implementation bool RemoveWindow( Dali::Internal::Adaptor::SceneHolder* childWindow ); /** + * @brief Deletes the rendering surface + * @param[in] surface to delete + */ + void DeleteSurface( Dali::RenderSurfaceInterface& surface ); + + /** * @brief Retrieve the window that the given actor is added to. * * @param[in] actor The actor @@ -309,12 +301,17 @@ public: // AdaptorInternalServices implementation */ Dali::SceneHolderList GetSceneHolders() const; + /** + * @copydoc Dali::Adaptor::GetObjectRegistry() + */ + Dali::ObjectRegistry GetObjectRegistry() const; + public: /** * @return the Core instance */ - virtual Dali::Integration::Core& GetCore(); + Dali::Integration::Core& GetCore() override; /** * @copydoc Dali::Adaptor::SetRenderRefreshRate() @@ -443,64 +440,57 @@ public: */ bool IsMultipleWindowSupported() const; - /** - * @brief Checks whether the windows are being rendered in the render thread. - * - * @return true if the windows are being rendered in the render thread, or false if not. - */ - bool IsRenderingWindows() const; - public: //AdaptorInternalServices /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPlatformAbstractionInterface() */ - virtual Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface(); + Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface() override; /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetDisplayConnectionInterface() */ - virtual Dali::DisplayConnection& GetDisplayConnectionInterface(); + Dali::DisplayConnection& GetDisplayConnectionInterface() override; /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetGraphicsInterface() */ - virtual GraphicsInterface& GetGraphicsInterface(); + GraphicsInterface& GetGraphicsInterface() override; /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetTriggerEventInterface() */ - virtual TriggerEventInterface& GetProcessCoreEventsTrigger(); + TriggerEventInterface& GetProcessCoreEventsTrigger() override; /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSocketFactoryInterface() */ - virtual SocketFactoryInterface& GetSocketFactoryInterface(); + SocketFactoryInterface& GetSocketFactoryInterface() override; /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetRenderSurfaceInterface() */ - virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface(); + Dali::RenderSurfaceInterface* GetRenderSurfaceInterface() override; /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPerformanceInterface() */ - virtual PerformanceInterface* GetPerformanceInterface(); + PerformanceInterface* GetPerformanceInterface() override; /** * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetKernelTraceInterface() */ - virtual TraceInterface& GetKernelTraceInterface(); + TraceInterface& GetKernelTraceInterface() override; /** * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSystemTraceInterface() */ - virtual TraceInterface& GetSystemTraceInterface(); + TraceInterface& GetSystemTraceInterface() override; /** * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface() */ - virtual void GetWindowContainerInterface( WindowContainer& windows ); + void GetWindowContainerInterface( WindowContainer& windows ) override; public: // Signals @@ -533,45 +523,45 @@ public: // From Dali::Internal::Adaptor::CoreEventInterface /** * @copydoc Dali::Internal::Adaptor:CoreEventInterface:::ProcessCoreEvents() */ - virtual void ProcessCoreEvents(); + void ProcessCoreEvents() override; private: // From Dali::Internal::Adaptor::CoreEventInterface /** * @copydoc Dali::Internal::Adaptor::CoreEventInterface::QueueCoreEvent() */ - virtual void QueueCoreEvent(const Dali::Integration::Event& event); + void QueueCoreEvent(const Dali::Integration::Event& event) override; private: // From Dali::Integration::RenderController /** * @copydoc Dali::Integration::RenderController::RequestUpdate() */ - virtual void RequestUpdate( bool forceUpdate ); + void RequestUpdate( bool forceUpdate ) override; /** * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle() */ - virtual void RequestProcessEventsOnIdle( bool forceProcess ); + void RequestProcessEventsOnIdle( bool forceProcess ) override; public: // From Dali::Internal::Adaptor::WindowVisibilityObserver /** * Called when the window becomes fully or partially visible. */ - virtual void OnWindowShown(); + void OnWindowShown() override; /** * Called when the window is fully hidden. */ - virtual void OnWindowHidden(); + void OnWindowHidden() override; private: // From Dali::Internal::Adaptor::DamageObserver /** * @copydoc Dali::Internal::Adaptor::DamageObserver::OnDamaged() */ - void OnDamaged( const DamageArea& area ); + void OnDamaged( const DamageArea& area ) override; private: @@ -665,7 +655,7 @@ private: // Data 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 @@ -686,8 +676,12 @@ private: // Data SystemTrace mSystemTracer; ///< System tracer 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:1; ///< whether the remoteSurface is used or not + Dali::LayoutDirection::Type mRootLayoutDirection; ///< LayoutDirection of window + + std::unique_ptr mAddOnManager; ///< Pointer to the addon manager public: inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) { return *adaptor.mImpl; }