Refactor screen-connector 32/115932/4
authorHyunho Kang <hhstark.kang@samsung.com>
Wed, 22 Feb 2017 05:55:45 +0000 (14:55 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 9 Mar 2017 01:49:19 +0000 (10:49 +0900)
https://review.tizen.org/gerrit/#/c/115600/

Change-Id: I73295dae794ac0289eed9423de54830ed2c1e3b6
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
watch-control/src/control.c
widget_viewer_dali/internal/widget_view/widget_view_impl.cpp
widget_viewer_dali/internal/widget_view/widget_view_impl.h
widget_viewer_dali/internal/widget_view_manager/widget_view_manager_impl.cpp
widget_viewer_evas/src/widget_viewer_evas.c

index ad1f064..9c716b6 100644 (file)
@@ -17,7 +17,9 @@
 #include <aul_svc.h>
 #include <bundle_internal.h>
 #include <app_control_internal.h>
-#include <screen_connector_watcher_evas.h>
+#include <wayland-extension/tizen-remote-surface-client-protocol.h>
+#include <tbm_surface.h>
+#include <screen_connector_toolkit_evas.h>
 #include <dlog.h>
 #include <unistd.h>
 #include "watch_control.h"
@@ -69,8 +71,8 @@ static int __watch_viewer_init(Evas_Object *win)
        }
 
        __win = win;
-       screen_connector_watcher_evas_init(__win);
-       screen_connector_watcher_evas_start_visibility_notify();
+       screen_connector_toolkit_evas_init(__win, SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH);
+       screen_connector_toolkit_evas_start_visibility_notify();
 
        __win_resized(NULL, NULL, win, NULL); /* init */
        evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, __win_resized, NULL);
@@ -85,8 +87,8 @@ static void __watch_viewer_fini()
        if (__win)
                evas_object_event_callback_del(__win, EVAS_CALLBACK_RESIZE, __win_resized);
 
-       screen_connector_watcher_evas_stop_visibility_notify();
-       screen_connector_watcher_evas_fini();
+       screen_connector_toolkit_evas_stop_visibility_notify();
+       screen_connector_toolkit_evas_fini(SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH);
 }
 
 API int watch_manager_init(Evas_Object *win)
@@ -111,7 +113,8 @@ static int __watch_screen_get_height()
        return 0;
 }
 
-static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Object *image, void *data)
+static void __screen_connector_toolkit_evas_added_cb(const char *appid, const char *instance_id, int pid,
+       Evas_Object *image, void *data)
 {
        int w, h, x, y;
        evas_object_geometry_get(image, &x, &y, &w, &h);
@@ -121,28 +124,30 @@ static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Obj
        evas_object_smart_callback_call(__win, WATCH_SMART_SIGNAL_ADDED, image);
 }
 
-static void __screen_connector_watcher_evas_removed_cb(const char *appid, Evas_Object *image, void *data)
+static void __screen_connector_toolkit_evas_removed_cb(const char *appid, const char *instance_id, int pid,
+       Evas_Object *image, void *data)
 {
        _D("obj removed");
        evas_object_smart_callback_call(__win, WATCH_SMART_SIGNAL_REMOVED, image);
 }
 
-static void __screen_connector_watcher_evas_updated_cb(const char *appid, Evas_Object *image, void *data)
+static void __screen_connector_toolkit_evas_updated_cb(const char *appid, const char *instance_id, int pid,
+       Evas_Object *image, void *data)
 {
        evas_object_smart_callback_call(__win, WATCH_SMART_SIGNAL_UPDATED, image);
 }
 
 API int watch_manager_set_resource_id(int resource_id)
 {
-       screen_connector_watcher_evas_ops ops;
-       screen_connector_watcher_evas_h handle;
+       screen_connector_toolkit_evas_ops ops;
+       screen_connector_toolkit_evas_h handle;
 
-       ops.added = __screen_connector_watcher_evas_added_cb;
-       ops.removed = __screen_connector_watcher_evas_removed_cb;
-       ops.updated = __screen_connector_watcher_evas_updated_cb;
-       handle = screen_connector_watcher_evas_add_by_rid(&ops, resource_id, NULL);
+       ops.added_cb = __screen_connector_toolkit_evas_added_cb;
+       ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
+       ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
+       handle = screen_connector_toolkit_evas_add_by_rid(&ops, resource_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH, NULL);
        if (handle == NULL) {
-               _E("Fail screen_connector_watcher_evas_add_by_rid");
+               _E("Fail screen_connector_toolkit_evas_add_by_rid");
                return -1;
        }
 
@@ -151,7 +156,7 @@ API int watch_manager_set_resource_id(int resource_id)
 
 API int watch_manager_get_resource_id(Evas_Object *watch, int *resource_id)
 {
-       return screen_connector_watcher_evas_get_rid(watch, resource_id);
+       return screen_connector_toolkit_evas_get_rid(watch, resource_id);
 }
 
 API int watch_manager_send_terminate(Evas_Object *watch)
@@ -159,7 +164,7 @@ API int watch_manager_send_terminate(Evas_Object *watch)
        int pid;
        int r;
 
-       screen_connector_watcher_evas_get_pid(watch, &pid);
+       screen_connector_toolkit_evas_get_pid(watch, &pid);
        _D("watch_manager_send_terminate %d", pid);
        if (pid < 1) {
                _E("failed to get pid from %p", watch);
@@ -192,7 +197,7 @@ API int watch_manager_get_app_control(const char *app_id, app_control_h *app_con
 {
        char buf[10];
        bundle *b = NULL;
-       screen_connector_watcher_evas_ops ops;
+       screen_connector_toolkit_evas_ops ops;
 
        app_control_create(app_control);
        app_control_set_app_id(*app_control, app_id);
@@ -204,10 +209,10 @@ API int watch_manager_get_app_control(const char *app_id, app_control_h *app_con
 
        app_control_set_operation(*app_control, APP_CONTROL_OPERATION_MAIN);
 
-       ops.added = __screen_connector_watcher_evas_added_cb;
-       ops.removed = __screen_connector_watcher_evas_removed_cb;
-       ops.updated = __screen_connector_watcher_evas_updated_cb;
-       screen_connector_watcher_evas_add(&ops, (char *)app_id, NULL);
+       ops.added_cb = __screen_connector_toolkit_evas_added_cb;
+       ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
+       ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
+       screen_connector_toolkit_evas_add(&ops, (char *)app_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH, NULL);
 
        app_control_to_bundle(*app_control, &b);
        if (b) {
index 6013c30..b14fb19 100644 (file)
@@ -91,8 +91,9 @@ DALI_TYPE_REGISTRATION_END()
 
 struct wl_buffer* preBuffer;
 
-static void OnBufferChanged( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer,
-                              int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys, void *data)
+static void OnBufferUpdated( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer,
+                              int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys,
+                              const char *appid, const char *instance_id, const int pid, void *data)
 {
   Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
 
@@ -121,34 +122,11 @@ static void OnBufferChanged( struct tizen_remote_surface *surface, uint32_t type
   close( img_file_fd );
 }
 
-static void OnBufferUpdated( struct tizen_remote_surface* surface, wl_buffer* buffer, uint32_t time, void* data )
+static void OnBufferAdded( const char *appid, const char *instance_id, const int pid, void *data )
 {
-  Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
-
-  if( widgetView )
-  {
-    if( !widgetView->IsWidgetImageView() )
-    {
-      tizen_remote_surface_transfer_visibility( surface, TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_VISIBLE);
-
-      widgetView->CreateWidgetImageView();
-      widgetView->ConnectSignal( surface );
-    }
-
-    //get tbm surface from buffer
-    tbm_surface_h tbmSurface = static_cast< tbm_surface_h >( wl_buffer_get_user_data( buffer ) );
-    widgetView->UpdateImageSource( tbmSurface );
-  }
-
-  if( preBuffer != NULL && tizen_remote_surface_get_version( surface ) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION )
-  {
-    tizen_remote_surface_release( surface, preBuffer );
-  }
-
-  preBuffer = buffer;
 }
 
-static void OnSurfaceMissing( struct tizen_remote_surface* surface, void* data )
+static void OnSurfaceRemoved( const char *appid, const char *instance_id, const int pid, void *data )
 {
   Dali::WidgetView::Internal::WidgetView* widgetView = static_cast< Dali::WidgetView::Internal::WidgetView* >( data );
 
@@ -703,7 +681,7 @@ void WidgetView::OnInitialize()
   char* previewPath = NULL;
   std::string previewImage;
   widget_size_type_e sizeType;
-  screen_connector_watcher_ops ops;
+  screen_connector_toolkit_ops ops;
 
   int ret = widget_instance_create( mWidgetId.c_str(), &instanceId );
   if( ret < 0 || !instanceId )
@@ -773,10 +751,10 @@ void WidgetView::OnInitialize()
     return;
   }
 
-  ops.change_cb = OnBufferChanged;
-  ops.missing_cb = OnSurfaceMissing;
-  ops.update_cb = OnBufferUpdated;
-  mWatcherHandle = screen_connector_watcher_add(&ops, (char *)mWidgetId.c_str(), this);
+  ops.updated_cb = OnBufferUpdated;
+  ops.removed_cb = OnSurfaceRemoved;
+  ops.added_cb = OnBufferAdded;
+  mWatcherHandle = screen_connector_toolkit_add(&ops, (char *)instanceId, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, this);
   DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: widget_instance_launch is called. [%s, mPid = %d]\n", mWidgetId.c_str(), mPid );
 
 }
@@ -942,7 +920,7 @@ float WidgetView::GetWidthForHeight( float height )
 
 void WidgetView::CloseRemoteSurface()
 {
-  screen_connector_watcher_remove( mWatcherHandle );
+  screen_connector_toolkit_remove( mWatcherHandle );
   mRemoteSurface = NULL;
 }
 
index a9eaf7c..006bdee 100644 (file)
@@ -28,7 +28,7 @@
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <wayland-extension/tizen-remote-surface-client-protocol.h>
 #include <tbm_surface.h>
-#include <screen_connector_watcher.h>
+#include <screen_connector_toolkit.h>
 
 namespace Dali
 {
@@ -257,7 +257,7 @@ private:
   bool mPreviewVisible;
   bool mStateTextVisible;
   bool mPermanentDelete;
-  screen_connector_watcher_h mWatcherHandle;
+  screen_connector_toolkit_h mWatcherHandle;
   tizen_remote_surface* mRemoteSurface;
 
   // Signals
index 714bdb6..0d12e7e 100644 (file)
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include <widget_errno.h>
 #include <widget_instance.h>
-#include <screen_connector_watcher.h>
+#include <screen_connector_toolkit.h>
 
 namespace Dali
 {
@@ -147,7 +147,7 @@ WidgetViewManager::WidgetViewManager()
 
 WidgetViewManager::~WidgetViewManager()
 {
-  screen_connector_watcher_fini();
+  screen_connector_toolkit_fini(SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET);
   widget_instance_unlisten_event( WidgetViewManager::WidgetEventCallback );
   widget_instance_fini();
 }
@@ -167,7 +167,7 @@ int WidgetViewManager::Initialize( Application application, const std::string& n
   }
 
   // Binds tizen remote surface manager & connects callback
-  if( screen_connector_watcher_init() < 0 )
+  if( screen_connector_toolkit_init(SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET) < 0 )
   {
     return WIDGET_ERROR_FAULT;
   }
index 772c9a9..0362fe5 100644 (file)
@@ -38,7 +38,9 @@
 #include <widget_instance.h>
 #include <widget_viewer.h>
 #include <aul_app_com.h>
-#include <screen_connector_watcher_evas.h>
+#include <wayland-extension/tizen-remote-surface-client-protocol.h>
+#include <tbm_surface.h>
+#include <screen_connector_toolkit_evas.h>
 
 
 #if defined(LOG_TAG)
@@ -169,7 +171,6 @@ struct widget_info {
        GQueue *event_queue;
 
        Evas_Object *layout;
-       screen_connector_watcher_evas_h watcher_h;
 };
 
 static void __flush_event_queue(struct widget_info *info);
@@ -250,23 +251,6 @@ static void smart_callback_call(Evas_Object *obj, const char *signal, void *cbda
        evas_object_smart_callback_call(obj, signal, cbdata);
 }
 
-static const char *__to_appid(const char *widget_id)
-{
-       const char *appid;
-
-       appid = g_strstr_len(widget_id, strlen(widget_id), "@");
-       if (appid != NULL) {
-               if (strlen(appid) == 1)
-                       return widget_id;
-
-               /* skip @ */
-               appid++;
-       } else {
-               appid = (char *)widget_id;
-       }
-       return appid;
-}
-
 static void __destroy_widget_info(gpointer data)
 {
        struct widget_info *info = (struct widget_info *)data;
@@ -275,11 +259,6 @@ static void __destroy_widget_info(gpointer data)
 
        LOGD("__destroy_widget_info widget_id: %s instance_id %s", info->widget_id, info->instance_id);
 
-       if (info->watcher_h) {
-               screen_connector_watcher_evas_remove(info->watcher_h);
-               info->watcher_h = NULL;
-       }
-
        if (info->widget_id)
                free(info->widget_id);
        if (info->instance_id)
@@ -289,7 +268,8 @@ static void __destroy_widget_info(gpointer data)
        free(info);
 }
 
-static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Object *image, void *data)
+static void __screen_connector_toolkit_evas_added_cb(const char *appid, const char *instance_id, int pid,
+       Evas_Object *image, void *data)
 {
        struct widget_info *info;
        int x, y, w, h;
@@ -306,7 +286,7 @@ static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Obj
                return;
        }
 
-       if (info->restart || (info->widget_id == NULL) || (strcmp(appid, __to_appid(info->widget_id)) != 0)) {
+       if (info->restart || (info->instance_id == NULL) || (strcmp(info->instance_id, instance_id) != 0)) {
                ErrPrint("Wrong added info, %s %s", appid, info->widget_id);
                return;
        }
@@ -333,7 +313,8 @@ static void __screen_connector_watcher_evas_added_cb(const char *appid, Evas_Obj
         */
 }
 
-static void __screen_connector_watcher_evas_removed_cb(const char *appid, Evas_Object *image, void *data)
+static void __screen_connector_toolkit_evas_removed_cb(const char *appid, const char *instance_id, int pid,
+       Evas_Object *image, void *data)
 {
        struct widget_evas_event_info event_info;
        struct widget_info *info;
@@ -363,7 +344,8 @@ static void __screen_connector_watcher_evas_removed_cb(const char *appid, Evas_O
        smart_callback_call(info->layout, WIDGET_SMART_SIGNAL_WIDGET_DELETED, &event_info);
 }
 
-static void __screen_connector_watcher_evas_updated_cb(const char *appid, Evas_Object *image, void *data)
+static void __screen_connector_toolkit_evas_updated_cb(const char *appid, const char *instance_id, int pid,
+       Evas_Object *image, void *data)
 {
 }
 
@@ -400,7 +382,7 @@ static int __restart_terminated_widget(const char *widget_id)
 
        GHashTableIter iter;
        gpointer key, value;
-       screen_connector_watcher_evas_ops ops;
+       screen_connector_toolkit_evas_ops ops;
        struct widget_info *widget_instance_info;
        int w, h;
        int target_pid = 0;
@@ -428,12 +410,12 @@ static int __restart_terminated_widget(const char *widget_id)
                        evas_object_geometry_get(widget_instance_info->layout, NULL, NULL, &w, &h);
                        DbgPrint("Widget launch  %s, %d, %d", widget_instance_info->instance_id, w, h);
 
-                       ops.added = __screen_connector_watcher_evas_added_cb;
-                       ops.removed = __screen_connector_watcher_evas_removed_cb;
-                       ops.updated = __screen_connector_watcher_evas_updated_cb;
+                       ops.added_cb = __screen_connector_toolkit_evas_added_cb;
+                       ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
+                       ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
 
-                       widget_instance_info->watcher_h =
-                               screen_connector_watcher_evas_add(&ops, (char *)__to_appid(widget_instance_info->widget_id), widget_instance_info);
+                       screen_connector_toolkit_evas_add(&ops, widget_instance_info->instance_id,
+                               SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, widget_instance_info);
                        widget_instance_info->pid = widget_instance_launch(widget_instance_info->instance_id, widget_instance_info->content_info, w, h);
                        widget_instance_info->restart = false;
                }
@@ -615,8 +597,8 @@ EAPI int widget_viewer_evas_init(Evas_Object *win)
        }
 
        s_info.win = win;
-       screen_connector_watcher_evas_init(win);
-       screen_connector_watcher_evas_start_visibility_notify();
+       screen_connector_toolkit_evas_init(win, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET);
+       screen_connector_toolkit_evas_start_visibility_notify();
 
        if (aul_app_get_appid_bypid(getpid(), app_id, sizeof(app_id)) != AUL_R_OK) {
                ErrPrint("failed to get appid of pid:%d", getpid());
@@ -647,7 +629,7 @@ EAPI int widget_viewer_evas_fini(void)
        if (s_info.widget_table)
                g_hash_table_destroy(s_info.widget_table);
 
-       screen_connector_watcher_evas_fini();
+       screen_connector_toolkit_evas_fini(SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET);
        widget_instance_unlisten_event(__instance_event_cb);
        widget_instance_fini();
 
@@ -778,7 +760,7 @@ static void resize_cb(void *data, Evas *e, Evas_Object *layout, void *event_info
        char *preview_path = NULL;
        int x, y, w, h;
        widget_size_type_e size_type;
-       screen_connector_watcher_evas_ops ops;
+       screen_connector_toolkit_evas_ops ops;
 
        if (!info || !layout) {
                ErrPrint("Failed to load the info(%p) or layout(%p)", info, layout);
@@ -811,10 +793,10 @@ static void resize_cb(void *data, Evas *e, Evas_Object *layout, void *event_info
                        elm_object_part_text_set(layout, "text", T_("IDS_ST_POP_LOADING_ING"));
                }
 
-               ops.added = __screen_connector_watcher_evas_added_cb;
-               ops.removed = __screen_connector_watcher_evas_removed_cb;
-               ops.updated = __screen_connector_watcher_evas_updated_cb;
-               info->watcher_h = screen_connector_watcher_evas_add(&ops, (char *)__to_appid(info->widget_id), info);
+               ops.added_cb = __screen_connector_toolkit_evas_added_cb;
+               ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
+               ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
+               screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
 
                info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
                if (info->pid < 0) {
@@ -1013,9 +995,9 @@ EAPI int widget_viewer_evas_set_option(widget_evas_conf_e type, int value)
 
        if (type == WIDGET_VIEWER_EVAS_MANUAL_PAUSE_RESUME) {
                if (value)
-                       screen_connector_watcher_evas_stop_visibility_notify();
+                       screen_connector_toolkit_evas_stop_visibility_notify();
                else
-                       screen_connector_watcher_evas_start_visibility_notify();
+                       screen_connector_toolkit_evas_start_visibility_notify();
        }
 
        return WIDGET_ERROR_NONE;
@@ -1257,7 +1239,7 @@ EAPI void widget_viewer_evas_cancel_click_event(Evas_Object *widget)
                return;
        }
 
-       screen_connector_watcher_evas_send_touch_cancel(remote_obj);
+       screen_connector_toolkit_evas_send_touch_cancel(remote_obj);
 
        return;
 }
@@ -1292,7 +1274,7 @@ EAPI int widget_viewer_evas_feed_mouse_up_event(Evas_Object *widget)
                return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
-       screen_connector_watcher_evas_send_mouse_up(remote_obj);
+       screen_connector_toolkit_evas_send_mouse_up(remote_obj);
 
        return WIDGET_ERROR_NONE;
 }
@@ -1418,7 +1400,7 @@ EAPI void widget_viewer_evas_disable_loading(Evas_Object *widget)
 EAPI void widget_viewer_evas_activate_faulted_widget(Evas_Object *widget)
 {
        struct widget_info *info;
-       screen_connector_watcher_evas_ops ops;
+       screen_connector_toolkit_evas_ops ops;
 
        if (!is_widget_feature_enabled()) {
                set_last_result(WIDGET_ERROR_NOT_SUPPORTED);
@@ -1460,10 +1442,10 @@ EAPI void widget_viewer_evas_activate_faulted_widget(Evas_Object *widget)
                        elm_object_signal_emit(info->layout, "enable", "text");
                }
 
-               ops.added = __screen_connector_watcher_evas_added_cb;
-               ops.removed = __screen_connector_watcher_evas_removed_cb;
-               ops.updated = __screen_connector_watcher_evas_updated_cb;
-               info->watcher_h = screen_connector_watcher_evas_add(&ops, (char *)__to_appid(info->widget_id), info);
+               ops.added_cb = __screen_connector_toolkit_evas_added_cb;
+               ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
+               ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
+               screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
                info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
                if (info->pid < 0) {
                        ErrPrint("Failed to launch an widget");
@@ -1548,14 +1530,14 @@ EAPI int widget_viewer_evas_freeze_visibility(Evas_Object *widget, widget_visibi
        }
 
        if (status == WIDGET_VISIBILITY_STATUS_SHOW_FIXED) {
-               ret = screen_connector_watcher_evas_freeze_visibility(tbm_obj, VISIBILITY_TYPE_UNOBSCURED);
+               ret = screen_connector_toolkit_evas_freeze_visibility(tbm_obj, VISIBILITY_TYPE_UNOBSCURED);
                if (ret < 0) {
                        ErrPrint("Fail to resume the widget(%p):(%d)", widget, ret);
                        return ret;
                }
                info->visibility_freeze = status;
        } else if (status == WIDGET_VISIBILITY_STATUS_HIDE_FIXED) {
-               ret = screen_connector_watcher_evas_freeze_visibility(tbm_obj, VISIBILITY_TYPE_FULLY_OBSCURED);
+               ret = screen_connector_toolkit_evas_freeze_visibility(tbm_obj, VISIBILITY_TYPE_FULLY_OBSCURED);
                if (ret < 0) {
                        ErrPrint("Fail to pause the widget(%p):(%d)", widget, ret);
                        return ret;
@@ -1600,7 +1582,7 @@ EAPI int widget_viewer_evas_thaw_visibility(Evas_Object *widget)
                return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
-       screen_connector_watcher_evas_thaw_visibility(tbm_obj);
+       screen_connector_toolkit_evas_thaw_visibility(tbm_obj);
        info->visibility_freeze = 0;
 
        return WIDGET_ERROR_NONE;