DSInput: add winX, winY and get/set APIs for DSInputTouchEvent/DSInputMouseEvent 56/242756/1
authorSung-Jin Park <sj76.park@samsung.com>
Fri, 28 Aug 2020 01:44:18 +0000 (10:44 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 1 Sep 2020 01:29:18 +0000 (10:29 +0900)
Change-Id: I9a937576f75580a1f13ab7308203bba51df5c5ca
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/DSInput/DSInput.cpp
src/DSInput/DSInputEvent.h

index 7a34779..f86c9cf 100644 (file)
@@ -505,13 +505,13 @@ void DSInputKeyboardEvent::setKeyname(std::string name)
 
 DSInputMouseEvent::DSInputMouseEvent()
        : DSInputEvent(nullptr, NoneEvent, 0),
-         __button(0), __x(0), __y(0), __z(0)
+         __button(0), __x(0), __y(0), __z(0), __winX(0), __winY(0), __winZ(0)
 {
 }
 
 DSInputMouseEvent::DSInputMouseEvent(std::shared_ptr<DSInputDevice> device, Type type, uint32_t timestamp, int button, int x, int y, int z)
        : DSInputEvent(device, type, timestamp),
-         __button(button), __x(x), __y(y), __z(z)
+         __button(button), __x(x), __y(y), __z(z), __winX(0), __winY(0), __winZ(0)
 {
 }
 
@@ -540,16 +540,45 @@ const int DSInputMouseEvent::getZ()
        return __z;
 }
 
+const int DSInputMouseEvent::getWinX()
+{
+       return __winX;
+}
+
+const int DSInputMouseEvent::getWinY()
+{
+       return __winY;
+}
+
+const int DSInputMouseEvent::getWinZ()
+{
+       return __winZ;
+}
+
+void DSInputMouseEvent::setWinX(int winX)
+{
+       __winX = winX;
+}
+
+void DSInputMouseEvent::setWinY(int winY)
+{
+       __winY = winY;
+}
+
+void DSInputMouseEvent::setWinZ(int winZ)
+{
+       __winZ = winZ;
+}
 
 DSInputTouchEvent::DSInputTouchEvent()
        : DSInputEvent(nullptr, NoneEvent, 0),
-         __index(0), __x(0), __y(0)
+         __index(0), __x(0), __y(0), __winX(0), __winY(0)
 {
 }
 
 DSInputTouchEvent::DSInputTouchEvent(std::shared_ptr<DSInputDevice> device, Type type, uint32_t timestamp, int index, int x, int y)
        : DSInputEvent(device, type, timestamp),
-         __index(index), __x(x), __y(y)
+         __index(index), __x(x), __y(y), __winX(0), __winY(0)
 {
 }
 
@@ -572,5 +601,24 @@ const int DSInputTouchEvent::getY()
        return __y;
 }
 
+const int DSInputTouchEvent::getWinX()
+{
+       return __winX;
+}
+
+const int DSInputTouchEvent::getWinY()
+{
+       return __winY;
+}
+
+void DSInputTouchEvent::setWinX(int winX)
+{
+       __winX = winX;
+}
+
+void DSInputTouchEvent::setWinY(int winY)
+{
+       __winY = winY;
+}
 
 } // namespace display_server
index aa12dc2..1df1f03 100644 (file)
@@ -96,12 +96,21 @@ public:
        const int getX();
        const int getY();
        const int getZ();
+       const int getWinX();
+       const int getWinY();
+       const int getWinZ();
+       void setWinX(int winX);
+       void setWinY(int winY);
+       void setWinZ(int winZ);
 
 protected:
        int __button;
        int __x;
        int __y;
        int __z;
+       int __winX;
+       int __winY;
+       int __winZ;
 };
 
 class DSInputTouchEvent : public DSInputEvent
@@ -114,11 +123,17 @@ public:
        const int getIndex();
        const int getX();
        const int getY();
+       const int getWinX();
+       const int getWinY();
+       void setWinX(int winX);
+       void setWinY(int winY);
 
 protected:
        int __index;
        int __x;
        int __y;
+       int __winX;
+       int __winY;
 };
 
 }