Adds to get window rotation's angle and screen rotation. 03/323303/1
authorWonsik Jung <sidein@samsung.com>
Fri, 25 Apr 2025 08:22:14 +0000 (17:22 +0900)
committerWonsik Jung <sidein@samsung.com>
Fri, 25 Apr 2025 08:22:14 +0000 (17:22 +0900)
Adds to get window rotation's angle and screen rotation for Dnd.

Change-Id: I8d95c4ab6e981875ebbf93ac9cd7ff2d134397e6

dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h

index d033e1c40756780805afe58c35aa33f48d2eb2b6..e30131622dd46f1e75e623a66656c2860de75515 100644 (file)
@@ -492,7 +492,8 @@ Vector2 DragAndDropEcoreWl::RecalculatePositionByOrientation(int x, int y, Dali:
 {
   int screenWidth, screenHeight;
   Internal::Adaptor::WindowSystem::GetScreenSize(screenWidth, screenHeight);
-  int angle = static_cast<int>(DevelWindow::GetCurrentOrientation(window));
+  Internal::Adaptor::Window& windowImpl = Dali::GetImplementation(window);
+  int angle = windowImpl.GetCurrentWindowRotationAngle();
   Dali::Window::WindowSize size = window.GetSize();
 
   int           newX, newY;
index 302125a5e6a9e1499562cd570e39c6c16a8c1bae..0a81983ebd095b4739efb78573907d1ddd6bb9fb 100644 (file)
@@ -1673,6 +1673,16 @@ WindowBlurInfo Window::GetBlur() const
   return mBlurInfo;
 }
 
+int Window::GetCurrentWindowRotationAngle() const
+{
+  return mRotationAngle;
+}
+
+int Window::GetCurrentScreenRotationAngle() const
+{
+  return mWindowBase->GetScreenRotationAngle();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 3c31b00ab00f07a9472db3adb6a352c15c4ff185..944fbbbdadb391f8608dfbc0721044bc6f770e80 100644 (file)
@@ -637,6 +637,27 @@ public: // Dali::Internal::Adaptor::SceneHolder
    */
   WindowBlurInfo GetBlur() const;
 
+public: // It is only for window-impl. Need not public for the others.
+  /**
+   * @brief Gets current window rotation angle.
+   *
+   * Gets current window rotation's angle is related to window rotation
+   * It is just supported in window-impl
+   *
+   * @return A current window rotation's angle.
+   */
+  int GetCurrentWindowRotationAngle() const;
+
+  /**
+   * @brief Gets current screen rotation's angle.
+   *
+   * Gets current screen rotation's angle is related to screen rotation
+   * It is just supported in window-impl
+   *
+   * @return A current screen rotation's angle.
+   */
+  int GetCurrentScreenRotationAngle() const;
+
 private:
   /**
    * @brief Enumeration for orietation mode.