From 5c451d8579320fb642cb58834a52e40ea557f57e Mon Sep 17 00:00:00 2001 From: hyunho Date: Wed, 4 Mar 2020 15:34:20 +0900 Subject: [PATCH] Add block update feature Change-Id: If33ac471caa3dac9a7c4db8b869e600f4a0af186 Signed-off-by: hyunho --- watch-holder/api/watch.cc | 10 ++++++++++ watch-holder/api/watch.h | 2 ++ watch-holder/src/watch.cc | 4 ++++ watch-holder/src/watch.hh | 1 + 4 files changed, 17 insertions(+) diff --git a/watch-holder/api/watch.cc b/watch-holder/api/watch.cc index 06d8fea..945a478 100644 --- a/watch-holder/api/watch.cc +++ b/watch-holder/api/watch.cc @@ -168,3 +168,13 @@ C_EXPORT int watch_get_extra(watch_h watch, bundle **extra) { return WATCH_HOLDER_ERROR_NONE; } + +C_EXPORT int watch_set_block_update(watch_h watch, bool enable) { + Watch* w = reinterpret_cast(watch); + if (w == nullptr) + return WATCH_HOLDER_ERROR_INVALID_PARAMETER; + + w->BlockUpdate(enable); + + return WATCH_HOLDER_ERROR_NONE; +} \ No newline at end of file diff --git a/watch-holder/api/watch.h b/watch-holder/api/watch.h index 505035e..d840a11 100644 --- a/watch-holder/api/watch.h +++ b/watch-holder/api/watch.h @@ -58,6 +58,8 @@ int watch_is_bound(watch_h watch, bool *bound); int watch_cancel_touch(watch_h watch); +int watch_block_update(watch_h watch, bool enable); + #ifdef __cplusplus } diff --git a/watch-holder/src/watch.cc b/watch-holder/src/watch.cc index 0ed3f94..8d450eb 100644 --- a/watch-holder/src/watch.cc +++ b/watch-holder/src/watch.cc @@ -73,6 +73,10 @@ int Watch::Terminate() { return aul_terminate_pid(pid_); } +void Watch::BlockUpdate(bool enable) { + RemoteSurface::SetBlock(enable); +} + void Watch::OnAuxMsg(void *data, Evas_Object *o, void *ev_info) { Watch* wa = (Watch*)data; Elm_Win_Aux_Message *msg = (Elm_Win_Aux_Message *)ev_info; diff --git a/watch-holder/src/watch.hh b/watch-holder/src/watch.hh index 6173e8d..9dd9b9f 100644 --- a/watch-holder/src/watch.hh +++ b/watch-holder/src/watch.hh @@ -61,6 +61,7 @@ class EXPORT_API Watch : private screen_connector::RemoteSurfaceEvas, int GetRid() const ; tizen_base::Bundle GetExtra() override; bool IsFaulted() override; + void BlockUpdate(bool enable); private: void OnEvasAdded(const std::string& appId, const std::string& instId, -- 2.7.4