DSRenderViewDaliImpl: register positionChanged callback of window 41/242341/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 25 Aug 2020 09:29:31 +0000 (18:29 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 25 Aug 2020 12:40:38 +0000 (21:40 +0900)
Change-Id: I7d816751ae28b999f68bb0edb6da1907a8d38049
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/DSRender/DSRenderViewDaliImpl.cpp
src/DSRender/DSRenderViewDaliImpl.h

index a004670..7cc724d 100644 (file)
@@ -107,6 +107,7 @@ DSRenderViewDaliImpl::DSRenderViewDaliImpl(std::shared_ptr<DSWindow> window, Dal
        window->registerCallbackBufferChanged(this, std::bind(&DSRenderViewDaliImpl::__onWindowBufferChanged, this, std::placeholders::_1));
        window->registerCallbackWindowRaiseToTop(this, std::bind(&DSRenderViewDaliImpl::__onWindowRaiseToTopChanged, this, std::placeholders::_1));
        window->registerCallbackWindowLowerToBottom(this, std::bind(&DSRenderViewDaliImpl::__onWindowLowerToBottomChanged, this, std::placeholders::_1));
+       window->registerCallbackWindowPositionChanged(this, std::bind(&DSRenderViewDaliImpl::__onWindowPositionChanged, this, std::placeholders::_1));
 }
 
 DSRenderViewDaliImpl::~DSRenderViewDaliImpl()
@@ -190,4 +191,16 @@ void DSRenderViewDaliImpl::__onWindowLowerToBottomChanged(void *data)
        __updatedSignal.emit(nullptr);
 }
 
+void DSRenderViewDaliImpl::__onWindowPositionChanged(void *data)
+{
+       DSLOG_INF("DSRenderViewDaliImpl", "__onWindowPositionChanged.");
+
+       stPosition pos = __window->getPosition();
+
+       __textureViewActor.SetProperty(Actor::Property::VISIBLE, true);
+       __textureViewActor.SetProperty(Actor::Property::POSITION, Vector3( pos.x, pos.y, 0.0f ));
+
+       __updatedSignal.emit(nullptr);
+}
+
 } // namespace display_server
index 5048555..8ffd858 100644 (file)
@@ -51,6 +51,7 @@ private:
        void __onWindowBufferChanged(std::shared_ptr<IDSBuffer> buffer);
        void __onWindowRaiseToTopChanged(void *data);
        void __onWindowLowerToBottomChanged(void *data);
+       void __onWindowPositionChanged(void *data);
 
        std::shared_ptr<DSWindow> __window;
        Dali::OffscreenWindow     __offscreenWindow;