From 959517d938fad4b6af7b32af9a1a0345f040737d Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 4 Oct 2022 18:18:37 +0900 Subject: [PATCH] Revert "[Tizen] Modify window position data type" This reverts commit 5f4496ead063fcb1bdcd7e218e777407bc018fa3. --- .../src/dali-adaptor/utc-Dali-Window.cpp | 2 +- dali/devel-api/adaptor-framework/window-devel.h | 4 +- dali/internal/window-system/common/window-impl.cpp | 13 +--- dali/public-api/adaptor-framework/window.cpp | 4 +- dali/public-api/adaptor-framework/window.h | 87 +--------------------- 5 files changed, 7 insertions(+), 103 deletions(-) diff --git a/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp b/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp index 1873913..db45460 100644 --- a/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp +++ b/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp @@ -445,7 +445,7 @@ int UtcDaliWindowSetPositionNegative(void) Dali::Window instance; try { - Dali::Window::WindowPosition arg1; + Dali::Uint16Pair arg1; instance.SetPosition(arg1); DALI_TEST_CHECK(false); // Should not get here } diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index 9b5647a..6a64084 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -46,7 +46,7 @@ typedef Signal typedef Signal AuxiliaryMessageSignalType; ///< Auxiliary message signal type typedef Signal AccessibilityHighlightSignalType; ///< Accessibility Highlight signal type typedef Signal InterceptKeyEventSignalType; ///< Intercept Key event signal type -typedef Signal MovedSignalType; ///< Window Moved signal type +typedef Signal MovedSignalType; ///< Window Moved signal type /** * @brief Creates an initialized handle to a new Window. @@ -538,7 +538,7 @@ DALI_ADAPTOR_API InterceptKeyEventSignalType& InterceptKeyEventSignal(Window win * * A callback of the following type may be connected: * @code - * void YourCallbackName( Window window, Dali::Window::WindowPosition position ); + * void YourCallbackName( Window window, Uint16Pair position ); * @endcode * The parameters are the moved x and y coordinates. * and window means this signal was called from what window diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 5d4cb1c..67bf27c 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -699,19 +699,8 @@ Dali::Window::WindowSize Window::GetSize() const void Window::SetPosition(Dali::Window::WindowPosition position) { PositionSize oldRect = mSurface->GetPositionSize(); - int32_t newX = position.GetX(); - int32_t newY = position.GetY(); - mWindowSurface->MoveResize(PositionSize(newX, newY, oldRect.width, oldRect.height)); - - if((oldRect.x != newX) || (oldRect.y != newY)) - { - Dali::Window handle(this); - Dali::Window::WindowPosition newPosition(newX, newY); - - DALI_LOG_RELEASE_INFO("send moved signal with new position: %d, %d\n", newPosition.GetX(), newPosition.GetY()); - mMovedSignal.Emit(handle, newPosition); - } + mWindowSurface->MoveResize(PositionSize(position.GetX(), position.GetY(), oldRect.width, oldRect.height)); mSurface->SetFullSwapNextFrame(); diff --git a/dali/public-api/adaptor-framework/window.cpp b/dali/public-api/adaptor-framework/window.cpp index e1f2642..edb98e0 100644 --- a/dali/public-api/adaptor-framework/window.cpp +++ b/dali/public-api/adaptor-framework/window.cpp @@ -303,12 +303,12 @@ Window::WindowSize Window::GetSize() const return GetImplementation(*this).GetSize(); } -void Window::SetPosition(Dali::Window::WindowPosition position) +void Window::SetPosition(Window::WindowPosition position) { GetImplementation(*this).SetPosition(position); } -Dali::Window::WindowPosition Window::GetPosition() const +Window::WindowPosition Window::GetPosition() const { return GetImplementation(*this).GetPosition(); } diff --git a/dali/public-api/adaptor-framework/window.h b/dali/public-api/adaptor-framework/window.h index 36488f0..e0c8d34 100644 --- a/dali/public-api/adaptor-framework/window.h +++ b/dali/public-api/adaptor-framework/window.h @@ -70,93 +70,8 @@ class KeyEvent; class DALI_ADAPTOR_API Window : public BaseHandle { public: - /** - * @brief Simple class for window position pairs of integers. - * - * Use this for integer position with window coordinates. - * @SINCE_2_1.43 - */ - class IntPair - { - public: - /** - * @brief Default constructor, initialises to 0. - * @SINCE_2_1.43 - */ - IntPair() - : mX(0), - mY(0) - { - }; - - /** - * @brief Constructor taking separate x and y parameters. - * @SINCE_2_1.43 - * @param[in] x The X coordinate of the window. - * @param[in] y The Y coordinate of the window. - */ - IntPair(int32_t x, int32_t y) - { - mX = x; - mY = y; - } - - /** - * @brief Returns the x coordinate. - * @SINCE_2_1.43 - * @return Y - */ - int32_t GetX() const - { - return mX; - } - - /** - * @brief Returns the y coordinate. - * @SINCE_2_1.43 - * @return Y - */ - int32_t GetY() const - { - return mY; - } - - /** - * @brief Sets the x coordinate - * @SINCE_2_1.43 - * @param[in] x the x coordinate value - */ - void SetX(int32_t x) - { - mX = x; - } - - /** - * @brief Sets the y coordinate - * @SINCE_2_1.43 - * @param[in] y the y coordinate value - */ - void SetY(int32_t y) - { - mY = y; - } - - // Default operation - public: - IntPair(const IntPair&) = default; ///< Default copy constructor - IntPair(IntPair&&) = default; ///< Default move constructor - IntPair& operator=(const IntPair&) = default; ///< Default copy assignment operator - IntPair& operator=(IntPair&&) = default; ///< Default move assignment operator - - // member data - private: - int32_t mX; - int32_t mY; - }; - -public: using WindowSize = Uint16Pair; ///< Window size type @SINCE_1_2.60 - using WindowPosition = IntPair; ///< Window position type @SINCE_2_1.43 + using WindowPosition = Uint16Pair; ///< Window position type @SINCE_1_2.60 using FocusChangeSignalType = Signal; ///< Window focus signal type @SINCE_1_4.35 using ResizeSignalType = Signal; ///< Window resized signal type @SINCE_1_4.35 -- 2.7.4