From 8092a834783676569c48c827b8beee67cd5052c6 Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 18 Jan 2022 11:29:28 +0900 Subject: [PATCH 1/1] [Tizen] Add to get the status whether window is rotating or not Add to getter api of winow rotation stauts. When window is rotating, the getter api will return true. Otherwise false. Change-Id: Icb2331f75ef88051510008ceb2a1bb3b6cc40529 --- dali/devel-api/adaptor-framework/window-devel.cpp | 5 +++++ dali/devel-api/adaptor-framework/window-devel.h | 8 ++++++++ dali/internal/window-system/common/window-impl.cpp | 5 +++++ dali/internal/window-system/common/window-impl.h | 5 +++++ dali/internal/window-system/common/window-render-surface.cpp | 7 ++++++- dali/internal/window-system/common/window-render-surface.h | 7 +++++++ 6 files changed, 36 insertions(+), 1 deletion(-) diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 34b609a..0713159 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -244,6 +244,11 @@ bool IsMinimized(Window window) return GetImplementation(window).IsMinimized(); } +bool IsWindowRotating(Window window) +{ + return GetImplementation(window).IsWindowRotating(); +} + } // namespace DevelWindow } // namespace Dali diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index 8f51d27..459c289 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -480,6 +480,14 @@ DALI_ADAPTOR_API void Minimize(Window window, bool minimize); */ DALI_ADAPTOR_API bool IsMinimized(Window window); +/** + * @brief Query whether window is rotating or not. + * + * @param[in] window The window instance. + * @return true if window is rotating, false otherwise. + */ +DALI_ADAPTOR_API bool IsWindowRotating(Window window); + } // namespace DevelWindow } // namespace Dali diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index fc5a81d..545b382 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1195,6 +1195,11 @@ void Window::SendRotationCompletedAcknowledgement() } } +bool Window::IsWindowRotating() const +{ + return mWindowSurface->IsWindowRotating(); +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index ce91a7f..12d1c7f 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -454,6 +454,11 @@ public: // Dali::Internal::Adaptor::SceneHolder */ void SendRotationCompletedAcknowledgement(); + /** + * @copydoc Dali::DevelWindow::IsWindowRotating() + */ + bool IsWindowRotating() const; + private: /** * @brief Enumeration for orietation mode. diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index a0523d3..c6cee4a 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -747,13 +747,18 @@ void WindowRenderSurface::OutputTransformed() } } +bool WindowRenderSurface::IsWindowRotating() const +{ + return !(mWindowRotationFinished); +} + void WindowRenderSurface::ProcessPostRender() { if(!mWindowRotationFinished) { mWindowBase->WindowRotationCompleted(mWindowRotationAngle, mPositionSize.width, mPositionSize.height); - DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done\n"); mWindowRotationFinished = true; + DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done, flag = %d\n", mWindowRotationFinished); } if(mIsImeWindowSurface) diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index 5d248c0..5e58893 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -138,6 +138,13 @@ public: // API void UpdatePositionSize(Dali::PositionSize positionSize); /** + * @brief Query whether window is rotating or not. + * + * @return true if window is rotating, false otherwise. + */ + bool IsWindowRotating() const; + + /** * @brief This signal is emitted when the output is transformed. */ OutputSignalType& OutputTransformedSignal(); -- 2.7.4