From abd81817db1a999bb899177be3aa5652954868ff Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 25 Aug 2020 18:29:31 +0900 Subject: [PATCH] DSRenderViewDaliImpl: register positionChanged callback of window Change-Id: I7d816751ae28b999f68bb0edb6da1907a8d38049 Signed-off-by: Joonbum Ko --- src/DSRender/DSRenderViewDaliImpl.cpp | 13 +++++++++++++ src/DSRender/DSRenderViewDaliImpl.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/DSRender/DSRenderViewDaliImpl.cpp b/src/DSRender/DSRenderViewDaliImpl.cpp index a004670..7cc724d 100644 --- a/src/DSRender/DSRenderViewDaliImpl.cpp +++ b/src/DSRender/DSRenderViewDaliImpl.cpp @@ -107,6 +107,7 @@ DSRenderViewDaliImpl::DSRenderViewDaliImpl(std::shared_ptr 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 diff --git a/src/DSRender/DSRenderViewDaliImpl.h b/src/DSRender/DSRenderViewDaliImpl.h index 5048555..8ffd858 100644 --- a/src/DSRender/DSRenderViewDaliImpl.h +++ b/src/DSRender/DSRenderViewDaliImpl.h @@ -51,6 +51,7 @@ private: void __onWindowBufferChanged(std::shared_ptr buffer); void __onWindowRaiseToTopChanged(void *data); void __onWindowLowerToBottomChanged(void *data); + void __onWindowPositionChanged(void *data); std::shared_ptr __window; Dali::OffscreenWindow __offscreenWindow; -- 2.7.4