return h->surface;
}
+
+EXPORT_API int screen_connector_toolkit_bind(screen_connector_toolkit_h h,
+ struct wl_surface *surface)
+{
+ struct tizen_remote_surface_manager *rsm = screen_connector_get_rsm();
+
+ if (!h || !rsm || !(h->surface)) {
+ LOGE("invalid argument %p %p", h, rsm);
+
+ return -1;
+ }
+
+ tizen_remote_surface_manager_bind_surface(rsm, surface, h->surface);
+
+ return 0;
+}
+
+EXPORT_API int screen_connector_toolkit_unbind(screen_connector_toolkit_h h)
+{
+ struct tizen_remote_surface_manager *rsm = screen_connector_get_rsm();
+
+ if (!h || !rsm || !(h->surface)) {
+ LOGE("invalid argument %p %p", h, rsm);
+
+ return -1;
+ }
+
+ tizen_remote_surface_manager_bind_surface(rsm, NULL, h->surface);
+ tizen_remote_surface_redirect(h->surface);
+
+ return 0;
+}
+
+
int screen_connector_toolkit_evas_send_visibility(Evas_Object *obj, visibility_type type);
int screen_connector_toolkit_evas_send_mouse_up(Evas_Object *obj);
int screen_connector_toolkit_evas_send_touch_cancel(Evas_Object *obj);
+int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_h h, Evas_Object *win);
+int screen_connector_toolkit_evas_unbind(screen_connector_toolkit_evas_h h);
+
/**
* @brief Add screen connector toolkit by rid.
return 0;
}
+
+EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_h h,
+ Evas_Object *win)
+{
+ struct wl_surface *surface;
+ Ecore_Wl_Window *wl_win;
+
+ if (!h)
+ return -1;
+
+ wl_win = elm_win_wl_window_get(win);
+ if (!wl_win) {
+ LOGE("failed to get wl_win");
+ return -1;
+ }
+
+ surface = ecore_wl_window_surface_get(wl_win);
+ if (!surface) {
+ LOGE("failed to get surface");
+ return -1;
+ }
+
+ return screen_connector_toolkit_bind(h->toolkit_h, surface);
+}
+
+EXPORT_API int screen_connector_toolkit_evas_unbind(screen_connector_toolkit_evas_h h)
+{
+ if (!h || !(h->toolkit_h)) {
+ LOGE("invalid argument %p", h);
+ return -1;
+ }
+
+ return screen_connector_toolkit_unbind(h->toolkit_h);
+}