From 3be8f9c4ecf53b680e158acdcb4a95af1a9c0878 Mon Sep 17 00:00:00 2001 From: Sunghyun kim Date: Tue, 4 Jun 2019 18:09:12 +0900 Subject: [PATCH] Revert "[Tizen] Temporarily revert new APIs for Multi-window" This reverts commit 007c55dce4aef2975b037c985563a63e94374b71. Change-Id: I36aced5e72c0f954df25e1c89262db4182ea771a --- dali/devel-api/adaptor-framework/window-devel.cpp | 35 ----------- dali/devel-api/adaptor-framework/window-devel.h | 64 ------------------- dali/integration-api/scene-holder-impl.cpp | 2 +- dali/integration-api/scene-holder-impl.h | 2 +- dali/internal/window-system/common/window-impl.cpp | 2 +- dali/internal/window-system/common/window-impl.h | 4 +- dali/public-api/adaptor-framework/window.cpp | 37 ++++++++++- dali/public-api/adaptor-framework/window.h | 72 +++++++++++++++++++++- 8 files changed, 111 insertions(+), 107 deletions(-) diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 0857885..2496c21 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -40,41 +40,6 @@ Window Get( Actor actor ) return Internal::Adaptor::Window::Get( actor ); } -void Add( Window window, Dali::Actor actor ) -{ - GetImplementation( window ).Add( actor ); -} - -void Remove( Window window, Dali::Actor actor ) -{ - GetImplementation( window ).Remove( actor ); -} - -void SetBackgroundColor( Window window, Vector4 color ) -{ - GetImplementation( window ).SetBackgroundColor( color ); -} - -Vector4 GetBackgroundColor( Window window ) -{ - return GetImplementation( window ).GetBackgroundColor(); -} - -Dali::Layer GetRootLayer( Window window ) -{ - return GetImplementation( window ).GetRootLayer(); -} - -uint32_t GetLayerCount( Window window ) -{ - return GetImplementation( window ).GetLayerCount(); -} - -Dali::Layer GetLayer( Window window, uint32_t depth ) -{ - return GetImplementation( window ).GetLayer( depth ); -} - EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ) { return GetImplementation( window ).EventProcessingFinishedSignal(); diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index 8655506..e80e55a 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -55,70 +55,6 @@ DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize DALI_ADAPTOR_API Window Get( Actor actor ); /** - * @brief Adds a child Actor to the Window. - * - * The child will be referenced. - * @param[in] window The window instance - * @param[in] actor The child - * @pre The actor has been initialized. - * @pre The actor does not have a parent. - */ -DALI_ADAPTOR_API void Add( Window window, Dali::Actor actor ); - -/** - * @brief Removes a child Actor from the Window. - * - * The child will be unreferenced. - * @param[in] window The window instance - * @param[in] actor The child - * @pre The actor has been added to the stage. - */ -DALI_ADAPTOR_API void Remove( Window window, Dali::Actor actor ); - -/** - * @brief Sets the background color of the window. - * - * @param[in] window The window instance - * @param[in] color The new background color - */ -DALI_ADAPTOR_API void SetBackgroundColor( Window window, Vector4 color ); - -/** - * @brief Gets the background color of the surface. - * - * @param[in] window The window instance - * @return The background color - */ -DALI_ADAPTOR_API Vector4 GetBackgroundColor( Window window ); - -/** - * @brief Returns the Scene's Root Layer. - * - * @param[in] window The window instance - * @return The root layer - */ -DALI_ADAPTOR_API Dali::Layer GetRootLayer( Window window ); - -/** - * @brief Queries the number of on-stage layers. - * - * Note that a default layer is always provided (count >= 1). - * @param[in] window The window instance - * @return The number of layers - */ -DALI_ADAPTOR_API uint32_t GetLayerCount( Window window ); - -/** - * @brief Retrieves the layer at a specified depth. - * - * @param[in] window The window instance - * @param[in] depth The depth - * @return The layer found at the given depth - * @pre Depth is less than layer count; see GetLayerCount(). - */ -DALI_ADAPTOR_API Dali::Layer GetLayer( Window window, uint32_t depth ); - -/** * @brief This signal is emitted just after the event processing is finished. * * @param[in] window The window instance diff --git a/dali/integration-api/scene-holder-impl.cpp b/dali/integration-api/scene-holder-impl.cpp index e085ed3..efa8291 100644 --- a/dali/integration-api/scene-holder-impl.cpp +++ b/dali/integration-api/scene-holder-impl.cpp @@ -144,7 +144,7 @@ Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const return mSurface.get(); } -void SceneHolder::SetBackgroundColor( Vector4 color ) +void SceneHolder::SetBackgroundColor( const Vector4& color ) { if ( mSurface ) { diff --git a/dali/integration-api/scene-holder-impl.h b/dali/integration-api/scene-holder-impl.h index d720f7f..6b283ad 100644 --- a/dali/integration-api/scene-holder-impl.h +++ b/dali/integration-api/scene-holder-impl.h @@ -124,7 +124,7 @@ public: /** * @copydoc Dali::Integration::SceneHolder::SetBackgroundColor */ - void SetBackgroundColor( Dali::Vector4 color ); + void SetBackgroundColor( const Dali::Vector4& color ); /** * @copydoc Dali::Integration::SceneHolder::GetBackgroundColor diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 0a58f84..443f86a 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -507,7 +507,7 @@ void Window::SetPositionSize( PositionSize positionSize ) } } -Dali::Layer Window::GetRootLayer() +Dali::Layer Window::GetRootLayer() const { return mScene.GetRootLayer(); } diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index 8abcd13..1249b3e 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -294,9 +294,9 @@ public: void SetPositionSize( PositionSize positionSize ); /** - * @copydoc Dali::DevelWindow::GetRootLayer() + * @copydoc Dali::Window::GetRootLayer() */ - Dali::Layer GetRootLayer(); + Dali::Layer GetRootLayer() const; /** * @copydoc Dali::Window::SetTransparency() diff --git a/dali/public-api/adaptor-framework/window.cpp b/dali/public-api/adaptor-framework/window.cpp index 34a8fa9..2e6a28c 100644 --- a/dali/public-api/adaptor-framework/window.cpp +++ b/dali/public-api/adaptor-framework/window.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 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. @@ -72,6 +72,41 @@ Window& Window::operator=(const Window& rhs) return *this; } +void Window::Add( Dali::Actor actor ) +{ + GetImplementation( *this ).Add( actor ); +} + +void Window::Remove( Dali::Actor actor ) +{ + GetImplementation( *this ).Remove( actor ); +} + +void Window::SetBackgroundColor( const Vector4& color ) +{ + GetImplementation( *this ).SetBackgroundColor( color ); +} + +Vector4 Window::GetBackgroundColor() const +{ + return GetImplementation( *this ).GetBackgroundColor(); +} + +Layer Window::GetRootLayer() const +{ + return GetImplementation( *this ).GetRootLayer(); +} + +uint32_t Window::GetLayerCount() const +{ + return GetImplementation( *this ).GetLayerCount(); +} + +Layer Window::GetLayer( uint32_t depth ) const +{ + return GetImplementation( *this ).GetLayer( depth ); +} + void Window::ShowIndicator( IndicatorVisibleMode visibleMode ) { DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ShowIndicator is deprecated and will be removed from next release.\n" ); diff --git a/dali/public-api/adaptor-framework/window.h b/dali/public-api/adaptor-framework/window.h index 0591d25..0d559c1 100755 --- a/dali/public-api/adaptor-framework/window.h +++ b/dali/public-api/adaptor-framework/window.h @@ -2,7 +2,7 @@ #define DALI_WINDOW_H /* - * Copyright (c) 2018 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. @@ -222,6 +222,73 @@ public: Window& operator=(const Window& rhs); /** + * @brief Adds a child Actor to the Window. + * + * The child will be referenced. + * + * @SINCE_1_4.19 + * @param[in] actor The child + * @pre The actor has been initialized. + * @pre The actor does not have a parent. + */ + void Add( Actor actor ); + + /** + * @brief Removes a child Actor from the Window. + * + * The child will be unreferenced. + * + * @SINCE_1_4.19 + * @param[in] actor The child + * @pre The actor has been added to the stage. + */ + void Remove( Actor actor ); + + /** + * @brief Sets the background color of the Window. + * + * @SINCE_1_4.19 + * @param[in] color The new background color + */ + void SetBackgroundColor( const Vector4& color ); + + /** + * @brief Gets the background color of the Window. + * + * @SINCE_1_4.19 + * @return The background color + */ + Vector4 GetBackgroundColor() const; + + /** + * @brief Returns the root Layer of the Window. + * + * @SINCE_1_4.19 + * @return The root layer + */ + Layer GetRootLayer() const; + + /** + * @brief Queries the number of on-scene layers in the Window. + * + * Note that a default layer is always provided (count >= 1). + * + * @SINCE_1_4.19 + * @return The number of layers + */ + uint32_t GetLayerCount() const; + + /** + * @brief Retrieves the layer at a specified depth in the Window. + * + * @SINCE_1_4.19 + * @param[in] depth The depth + * @return The layer found at the given depth + * @pre Depth is less than layer count; see GetLayerCount(). + */ + Layer GetLayer( uint32_t depth ) const; + + /** * @DEPRECATED_1_4.9 * @brief This sets whether the indicator bar should be shown or not. * @SINCE_1_0.0 @@ -303,12 +370,13 @@ public: WindowOrientation GetPreferredOrientation(); /** + * @DEPRECATED_1_4.19 Was not intended for Application developers * @brief Returns an empty handle. * @note Not intended for application developers. * @SINCE_1_0.0 * @return An empty handle */ - DragAndDropDetector GetDragAndDropDetector() const; + DragAndDropDetector GetDragAndDropDetector() const DALI_DEPRECATED_API; /** * @brief Gets the native handle of the window. -- 2.7.4