From: Doyoun Kang Date: Tue, 25 Aug 2020 06:35:41 +0000 (+0900) Subject: DSWindow: send positionChanged signal when window's position is changed X-Git-Tag: accepted/tizen/unified/20200827.105812~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F242334%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git DSWindow: send positionChanged signal when window's position is changed Change-Id: Iab9cca37ffcf22c48e9380078c38dca22c616c0d --- diff --git a/src/DSWindow/DSWindow.cpp b/src/DSWindow/DSWindow.cpp index 41e5288..5854b0d 100644 --- a/src/DSWindow/DSWindow.cpp +++ b/src/DSWindow/DSWindow.cpp @@ -391,6 +391,8 @@ void DSWindow::setPosition(int x, int y) priv->__y = y; priv->__changedGeometry = true; + + __windowPositionChangedSignal.emit(nullptr); } stPosition DSWindow::getPosition(void) @@ -503,4 +505,9 @@ void DSWindow::registerCallbackWindowRaiseToTop(DSObject *slot, std::function func) +{ + __windowPositionChangedSignal.connect(slot, func); +} + } // namespace display_server diff --git a/src/DSWindow/DSWindow.h b/src/DSWindow/DSWindow.h index 21ef2b0..627065e 100644 --- a/src/DSWindow/DSWindow.h +++ b/src/DSWindow/DSWindow.h @@ -96,6 +96,7 @@ public: void registerCallbackBufferChanged(DSObject *slot, std::function)> func); void registerCallbackWindowDestroyed(DSObject *slot, std::function func); void registerCallbackWindowRaiseToTop(DSObject *slot, std::function func); + void registerCallbackWindowPositionChanged(DSObject *slot, std::function func); protected: //virtual bool _onFocus(void); @@ -107,6 +108,7 @@ private: DSSignal> __bufferChangedSignal; DSSignal __windowDestroySignal; DSSignal __windowRaiseToTopSignal; + DSSignal __windowPositionChangedSignal; }; }