From: Wonsik Jung Date: Tue, 4 Oct 2022 02:30:58 +0000 (+0900) Subject: [Tizen] Modify window position data type X-Git-Tag: accepted/tizen/7.0/unified/hotfix/20221116.105956~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=392f27f24eaf73c6c415ecee3c3116cd41ae99da;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Modify window position data type Current WindowPosition has the unsigned int data type. It means that current data type can not support the negative coordinate. This patch is to support it. Change-Id: I31d7f1b11c83e1c94b141ac3fd376d17fabd40ac --- diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window-impl.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window-impl.h index 9044964..58d344e 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window-impl.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window-impl.h @@ -30,7 +30,6 @@ namespace Dali { using PositionSize = Dali::Rect; -using WindowPosition = Uint16Pair; namespace Internal { @@ -45,9 +44,9 @@ public: virtual ~Window() = default; static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent); - WindowPosition GetPosition() const; - PositionSize GetPositionSize() const; - Dali::Window::WindowSize GetSize() const; + Dali::Window::WindowPosition GetPosition() const; + PositionSize GetPositionSize() const; + Dali::Window::WindowSize GetSize() const; void SetPositionSize(PositionSize positionSize); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp index 9fc2763..2746ad9 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp @@ -58,11 +58,11 @@ Window* Window::New(const PositionSize& positionSize, const std::string& name, c return new Window( positionSize ); } -WindowPosition Window::GetPosition() const +Dali::Window::WindowPosition Window::GetPosition() const { PositionSize positionSize = mRenderSurface.GetPositionSize(); - return WindowPosition(positionSize.x, positionSize.y); + return Dali::Window::WindowPosition(positionSize.x, positionSize.y); } PositionSize Window::GetPositionSize() const diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h index 0d4e219..5cc10d7 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h @@ -52,7 +52,37 @@ typedef Signal< void (Window,Uint16Pair) > ResizeSignalType; class Window : public BaseHandle { public: + class IntPair + { + public: + IntPair() + : mX(0), + mY(0) + { + }; + + IntPair(int x, int y) + { + mX = x; + 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: + int mX; + int mY; + }; + +public: using WindowSize = Uint16Pair; + using WindowPosition = Dali::Window::IntPair; using KeyEventSignalType = Signal< void (const KeyEvent&) >; using TouchEventSignalType = Signal< void (const TouchEvent&) >;