From e049192b600ef84a417fe26cf6bdc644bd658c1c Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Fri, 16 Jun 2017 15:54:05 +0900 Subject: [PATCH 01/16] Remove evas callback from destroyed surface tbm Destroyed surface's tbm buffer can be remained in viewer application so we need to remove every callback from destroyed surface's tbm buffer. Change-Id: I0487f697ae506079790c333875cc8f7885452087 Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 7a6182f..2fb66c2 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -68,6 +68,15 @@ static GHashTable *__type_table = NULL; static Ecore_Event_Handler *__visibility_listener; static int __delayed_resuming_time; +static void __rs_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_show(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_hide(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __obj_update_visibility(void *data, Evas *e, Evas_Object *obj, void *event_info); + static void __destroy_type_h(gpointer data) { screen_connector_type_evas_h type_h = (screen_connector_type_evas_h)data; @@ -145,6 +154,41 @@ static void __destroy_toolkit_evas_h(gpointer data) return; if (toolkit_evas_h->img_tbm != NULL) { + + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MOUSE_DOWN, + __rs_cb_mouse_down); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MOUSE_UP, + __rs_cb_mouse_up); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MOUSE_MOVE, + __rs_cb_mouse_move); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MOUSE_WHEEL, + __rs_cb_mouse_wheel); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_SHOW, + __rs_cb_show); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_HIDE, + __rs_cb_hide); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_RESIZE, + __rs_cb_resize); + + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MOVE, + __obj_update_visibility); + plug_id = evas_object_data_del(toolkit_evas_h->img_tbm, "___PLUGID"); if (plug_id) free(plug_id); -- 2.7.4 From a877b798d4dc88046dd2f4a4abe40dbbc27a2e94 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 21 Jun 2017 16:13:25 +0900 Subject: [PATCH 02/16] Clear tbm when surface destroyed Change-Id: I272f64c095b201b217bf6920d654c538917d0fa9 Signed-off-by: Hyunho Kang --- screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 2fb66c2..ce6a499 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -192,6 +192,8 @@ static void __destroy_toolkit_evas_h(gpointer data) plug_id = evas_object_data_del(toolkit_evas_h->img_tbm, "___PLUGID"); if (plug_id) free(plug_id); + + __clear_img_tbm(toolkit_evas_h); } if (toolkit_evas_h->toolkit_h) -- 2.7.4 From 6e1c4b55b142ea22e730bab785b5512e5dbd0b8a Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Fri, 14 Jul 2017 11:20:02 +0900 Subject: [PATCH 03/16] Do not destroy buffer when receive same buffer Change-Id: Ie5a3560a1a745534e950359e4949007d64c7fca4 Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index ce6a499..41a7926 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -95,7 +95,7 @@ static void __cur_buffer_info_ref(cur_buffer_info_h info) info->ref_count++; } -static void __cur_buffer_info_unref(struct tizen_remote_surface *trs, cur_buffer_info_h info) +static bool __cur_buffer_info_unref(struct tizen_remote_surface *trs, cur_buffer_info_h info) { tbm_surface_h cur_tbm_surface; @@ -105,7 +105,10 @@ static void __cur_buffer_info_unref(struct tizen_remote_surface *trs, cur_buffer cur_tbm_surface = (tbm_surface_h)wl_buffer_get_user_data(info->cur_buffer); tbm_surface_internal_unref(cur_tbm_surface); g_hash_table_remove(__cur_buffer_table, info->cur_buffer); + return true; } + + return false; } static void __destroy_cur_buffer(gpointer data) @@ -115,9 +118,6 @@ static void __destroy_cur_buffer(gpointer data) if (!info) return; - if (info->cur_buffer) - wl_buffer_destroy(info->cur_buffer); - free(info); } @@ -667,8 +667,18 @@ static void __toolkit_update_cb(struct tizen_remote_surface *trs, uint32_t type, if (toolkit_evas_h->cur_buffer) { if (tizen_remote_surface_get_version(trs) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION) { c_buf_info = g_hash_table_lookup(__cur_buffer_table, toolkit_evas_h->cur_buffer); - if (c_buf_info != NULL) - __cur_buffer_info_unref(trs, c_buf_info); + if (c_buf_info != NULL) { + struct wl_buffer *tmp_buffer = c_buf_info->cur_buffer; + if (__cur_buffer_info_unref(trs, c_buf_info)) { + if(tmp_buffer != NULL) { + if (tmp_buffer != tbm) { + wl_buffer_destroy(tmp_buffer); + } else { + LOGE("Same buffer %p", tmp_buffer); + } + } + } + } } } -- 2.7.4 From 658251488f63bc4059045ee34e366d781ee8a398 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Tue, 18 Jul 2017 19:30:21 +0900 Subject: [PATCH 04/16] Check multi viewer window visibility Viewer's visibility has to be decided based on every viewer window include bind target window. Change-Id: I1ec9299ab2ff23429cb6b214b39ecc422c747fc1 Signed-off-by: Hyunho Kang --- .../include/screen_connector_toolkit_evas.h | 1 + .../src/screen_connector_toolkit_evas.c | 80 ++++++++++++++++++++-- 2 files changed, 77 insertions(+), 4 deletions(-) diff --git a/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h b/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h index 65c7724..6b16d7d 100644 --- a/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h +++ b/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h @@ -43,6 +43,7 @@ typedef enum { VISIBILITY_TYPE_UNOBSCURED, VISIBILITY_TYPE_PARTIALLY_OBSCURED, VISIBILITY_TYPE_FULLY_OBSCURED, + VISIBILITY_TYPE_UNKNOWN, } visibility_type; typedef void (*screen_connector_toolkit_evas_added_cb)(const char *appid, const char *instance_id, const int pid, diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 41a7926..d0b12dd 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -48,6 +48,12 @@ struct _cur_buffer_info_h { }; typedef struct _cur_buffer_info_h *cur_buffer_info_h; +struct _viewer_visibility_h { + visibility_type visibility; + int win_id; +}; +typedef struct _viewer_visibility_h *viewer_visibility_h; + struct _screen_connector_toolkit_evas_h { screen_connector_toolkit_evas_ops *ops; screen_connector_toolkit_h toolkit_h; @@ -60,6 +66,7 @@ struct _screen_connector_toolkit_evas_h { struct wl_buffer *cur_buffer; struct _screen_connector_type_evas_h *type_h; guint resuming_timer; + GList *viewer_visibility_list; void *data; }; @@ -77,6 +84,13 @@ static void __rs_cb_hide(void *data, Evas *e, Evas_Object *obj, void *event_info static void __rs_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info); static void __obj_update_visibility(void *data, Evas *e, Evas_Object *obj, void *event_info); +static gint __comp_win_id(gconstpointer a, gconstpointer b) +{ + viewer_visibility_h win = (viewer_visibility_h)a; + + return !(win->win_id == GPOINTER_TO_INT(b)); +} + static void __destroy_type_h(gpointer data) { screen_connector_type_evas_h type_h = (screen_connector_type_evas_h)data; @@ -205,6 +219,9 @@ static void __destroy_toolkit_evas_h(gpointer data) if (toolkit_evas_h->resuming_timer > 0) g_source_remove(toolkit_evas_h->resuming_timer); + if (toolkit_evas_h->viewer_visibility_list) + g_list_free_full(toolkit_evas_h->viewer_visibility_list, free); + free(toolkit_evas_h); } @@ -883,9 +900,12 @@ EXPORT_API int screen_connector_toolkit_evas_update(const char *appid, const cha static void __send_visibility(gpointer key, gpointer value, gpointer user_data) { screen_connector_toolkit_evas_h toolkit_evas_h = (screen_connector_toolkit_evas_h)value; - unsigned int event = GPOINTER_TO_INT(user_data); + Ecore_Wl_Event_Window_Visibility_Change *ev = user_data; int ret; visibility_type type; + GList *tmp_list = NULL; + GList *iter; + viewer_visibility_h visibility_h; if (toolkit_evas_h->freeze) return; @@ -893,11 +913,50 @@ static void __send_visibility(gpointer key, gpointer value, gpointer user_data) if (!__obj_is_visible(toolkit_evas_h)) return; - if (event) + if (ev->fully_obscured) type = VISIBILITY_TYPE_FULLY_OBSCURED; else type = VISIBILITY_TYPE_UNOBSCURED; + if (toolkit_evas_h->viewer_visibility_list) { + tmp_list = g_list_find_custom( + toolkit_evas_h->viewer_visibility_list, + GINT_TO_POINTER(ev->win), __comp_win_id); + } + + if (tmp_list == NULL) { + visibility_h = (viewer_visibility_h)calloc(1, + sizeof(struct _viewer_visibility_h)); + if (visibility_h == NULL) { + LOGE("Out of memory fail to alloc"); + return; + } + visibility_h->win_id = ev->win; + visibility_h->visibility = type; + toolkit_evas_h->viewer_visibility_list = + g_list_append(toolkit_evas_h->viewer_visibility_list, + visibility_h); + } else { + visibility_h = (viewer_visibility_h)tmp_list->data; + visibility_h->visibility = type; + } + + type = VISIBILITY_TYPE_FULLY_OBSCURED; + iter = toolkit_evas_h->viewer_visibility_list; + while (iter != NULL) { + visibility_h = (viewer_visibility_h)iter->data; + if (visibility_h->visibility == VISIBILITY_TYPE_UNKNOWN) { + LOGE("viewer not ready"); + return; + } else if (visibility_h->visibility == + VISIBILITY_TYPE_UNOBSCURED) { + type = VISIBILITY_TYPE_UNOBSCURED; + break; + } + iter = g_list_next(iter); + } + + LOGW("set visibility to %d", type); ret = __set_visibility(toolkit_evas_h, type); if (ret == -1) LOGE("failed to set object visibility set %p to %d", toolkit_evas_h->img_tbm, type); @@ -920,8 +979,8 @@ static Eina_Bool __visibility_cb(void *data, int type, void *event) while (g_hash_table_iter_next(&iter, &key, &value)) { cur_type = (screen_connector_type_evas_h)value; if (cur_type->toolkit_table) - g_hash_table_foreach(cur_type->toolkit_table, __send_visibility, - GINT_TO_POINTER(ev->fully_obscured)); + g_hash_table_foreach(cur_type->toolkit_table, + __send_visibility, ev); } return ECORE_CALLBACK_RENEW; @@ -1180,6 +1239,7 @@ EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_ { struct wl_surface *surface; Ecore_Wl_Window *wl_win; + viewer_visibility_h visibility_h; if (!h) return -1; @@ -1196,6 +1256,18 @@ EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_ return -1; } + visibility_h = (viewer_visibility_h)calloc(1, + sizeof(struct _viewer_visibility_h)); + if (visibility_h == NULL) { + LOGE("Out of memory fail to alloc"); + return -1; + } + visibility_h->win_id = ecore_wl_window_id_get(wl_win); + visibility_h->visibility = VISIBILITY_TYPE_UNKNOWN; + + h->viewer_visibility_list = + g_list_append(h->viewer_visibility_list, visibility_h); + return screen_connector_toolkit_bind(h->toolkit_h, surface); } -- 2.7.4 From 90a9e4ea771cd67486855820a196dd0580f6d90b Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 19 Jul 2017 09:41:19 +0900 Subject: [PATCH 05/16] Do not unref tbm_surface when receive same buffer Change-Id: I09f3e6f72bd1944a19866977a6f9586a7b236b09 Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index d0b12dd..8c2342b 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -132,6 +132,9 @@ static void __destroy_cur_buffer(gpointer data) if (!info) return; + if (info->cur_buffer) + wl_buffer_destroy(info->cur_buffer); + free(info); } @@ -603,6 +606,7 @@ static void __toolkit_update_cb(struct tizen_remote_surface *trs, uint32_t type, char plug_id[256]; screen_connector_toolkit_evas_h toolkit_evas_h; cur_buffer_info_h c_buf_info; + bool duplicate_buffer = false; toolkit_evas_h = (screen_connector_toolkit_evas_h)data; if (toolkit_evas_h->img_tbm == NULL) { @@ -685,15 +689,11 @@ static void __toolkit_update_cb(struct tizen_remote_surface *trs, uint32_t type, if (tizen_remote_surface_get_version(trs) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION) { c_buf_info = g_hash_table_lookup(__cur_buffer_table, toolkit_evas_h->cur_buffer); if (c_buf_info != NULL) { - struct wl_buffer *tmp_buffer = c_buf_info->cur_buffer; - if (__cur_buffer_info_unref(trs, c_buf_info)) { - if(tmp_buffer != NULL) { - if (tmp_buffer != tbm) { - wl_buffer_destroy(tmp_buffer); - } else { - LOGE("Same buffer %p", tmp_buffer); - } - } + if (c_buf_info->cur_buffer != tbm) { + __cur_buffer_info_unref(trs, c_buf_info); + } else { + duplicate_buffer = true; + LOGW("Same buffer %p", tbm); } } } @@ -707,7 +707,8 @@ static void __toolkit_update_cb(struct tizen_remote_surface *trs, uint32_t type, __cur_buffer_info_ref(c_buf_info); g_hash_table_insert(__cur_buffer_table, toolkit_evas_h->cur_buffer, c_buf_info); } else { - __cur_buffer_info_ref(c_buf_info); + if (!duplicate_buffer) + __cur_buffer_info_ref(c_buf_info); } if (is_added) { -- 2.7.4 From 388a5131b7a6b3b9aa418d2039c2ba036a0faa30 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Mon, 24 Jul 2017 20:08:40 +0900 Subject: [PATCH 06/16] Add id exist check logic for toolkit add api ID should be unique. Change-Id: I3d4a5e58cce59d03a32a0cf78c0f006783aafe67 Signed-off-by: Hyunho Kang --- .../include/screen_connector_toolkit.h | 2 ++ .../src/screen_connector_toolkit.c | 27 +++++++++++++++++++--- .../src/screen_connector_toolkit_evas.c | 5 ++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/screen_connector_watcher/include/screen_connector_toolkit.h b/screen_connector_watcher/include/screen_connector_toolkit.h index 7fe718c..a614720 100644 --- a/screen_connector_watcher/include/screen_connector_toolkit.h +++ b/screen_connector_watcher/include/screen_connector_toolkit.h @@ -83,6 +83,8 @@ screen_connector_toolkit_h screen_connector_toolkit_add_with_surface(screen_conn int screen_connector_toolkit_bind(screen_connector_toolkit_h h, struct wl_surface *surface); int screen_connector_toolkit_unbind(screen_connector_toolkit_h h); +bool screen_connector_toolkit_is_exist(char *id, + screen_connector_screen_type_e type); #ifdef __cplusplus } diff --git a/screen_connector_watcher/src/screen_connector_toolkit.c b/screen_connector_watcher/src/screen_connector_toolkit.c index c79e6b5..4e5b043 100644 --- a/screen_connector_watcher/src/screen_connector_toolkit.c +++ b/screen_connector_watcher/src/screen_connector_toolkit.c @@ -351,6 +351,28 @@ EXPORT_API screen_connector_toolkit_h screen_connector_toolkit_add_with_surface( return toolkit_h; } +EXPORT_API bool screen_connector_toolkit_is_exist(char *id, + screen_connector_screen_type_e type) +{ + screen_connector_type_h type_h = NULL; + + if (id == NULL) { + LOGE("Invalid param"); + return false; + } + + type_h = g_hash_table_lookup(__type_table, GINT_TO_POINTER(type)); + if (type_h == NULL) { + LOGE("type %d is not initialized !!", type); + return false; + } + + if (type_h->toolkit_table == NULL) + return false; + + return (g_hash_table_lookup(type_h->toolkit_table, id) != NULL); +} + EXPORT_API screen_connector_toolkit_h screen_connector_toolkit_add(screen_connector_toolkit_ops *ops, char *id, screen_connector_screen_type_e type, void *data) { @@ -363,9 +385,8 @@ EXPORT_API screen_connector_toolkit_h screen_connector_toolkit_add(screen_connec return NULL; } - type_h = g_hash_table_lookup(__type_table, GINT_TO_POINTER(type)); - if (type_h == NULL) { - LOGE("type %d is not initialized !!", type); + if (screen_connector_toolkit_is_exist(id, type)) { + LOGE("Already exist ID : %s", id); return NULL; } diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 8c2342b..b32c04f 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -844,6 +844,11 @@ EXPORT_API screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add(scr screen_connector_type_evas_h type_h; int int_type = type; + if (screen_connector_toolkit_is_exist(id, type)) { + LOGE("Already exist ID : %s", id); + return NULL; + } + type_h = g_hash_table_lookup(__type_table, GINT_TO_POINTER(int_type)); if (type_h == NULL) { LOGE("type %d is not initialized !!", type); -- 2.7.4 From ad23f7e5787e269085d40721d9819d3e2b7725d0 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 26 Jul 2017 12:03:23 +0900 Subject: [PATCH 07/16] Add missing code to find type handle The screen_connector_toolkit_init() MUST be called before calling screen_connector_toolkit_add(). Change-Id: I1e6692dab3293b0947889d6a7156effa5b59edd8 Signed-off-by: Hwankyu Jhun --- screen_connector_watcher/src/screen_connector_toolkit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/screen_connector_watcher/src/screen_connector_toolkit.c b/screen_connector_watcher/src/screen_connector_toolkit.c index 4e5b043..90c07e4 100644 --- a/screen_connector_watcher/src/screen_connector_toolkit.c +++ b/screen_connector_watcher/src/screen_connector_toolkit.c @@ -390,6 +390,12 @@ EXPORT_API screen_connector_toolkit_h screen_connector_toolkit_add(screen_connec return NULL; } + type_h = g_hash_table_lookup(__type_table, GINT_TO_POINTER(type)); + if (type_h == NULL) { + LOGE("Type(%s) is not initializaed", type); + return NULL; + } + ops_copy = (screen_connector_toolkit_ops *)calloc(1, sizeof(screen_connector_toolkit_ops)); if (ops_copy == NULL) { LOGE("ops_copy calloc fail"); -- 2.7.4 From afdcf0b2ce3ae2593bc1a447b6e598879387c431 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Thu, 20 Jul 2017 15:53:27 +0900 Subject: [PATCH 08/16] Send move event before mouse up event For consistency with old version of widget framework Change-Id: Ib4d3dd9282f69f580a371dc79d901a9100ffd326 Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index b32c04f..5349bf0 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -70,6 +70,21 @@ struct _screen_connector_toolkit_evas_h { void *data; }; +struct _move_event_info { + double x; + double y; + double rx; + double ry; + double pressure; + double angle; + double class; + double sub_class; + const char *desc; + unsigned int timestamp; +}; + +static struct _move_event_info __last_move; + static GHashTable *__cur_buffer_table = NULL; static GHashTable *__type_table = NULL; static Ecore_Event_Handler *__visibility_listener; @@ -481,6 +496,25 @@ static void __rs_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_ return; } + /* + * We need to send last move event for + * consistency with old widget framework + */ + tizen_remote_surface_transfer_mouse_event(surface, + TIZEN_REMOTE_SURFACE_EVENT_TYPE_MOUSE_MOVE, + 0, + 0, + __last_move.x, + __last_move.y, + __last_move.rx, + __last_move.ry, + __last_move.pressure, + __last_move.angle, + __last_move.class, + __last_move.sub_class, + __last_move.desc, + __last_move.timestamp); + tizen_remote_surface_transfer_mouse_event(surface, TIZEN_REMOTE_SURFACE_EVENT_TYPE_MOUSE_UP, 0, @@ -510,6 +544,17 @@ static void __rs_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *even evas_object_geometry_get(obj, &x, &y, &w, &h); + __last_move.x = ev->cur.canvas.x - x; + __last_move.y = ev->cur.canvas.y - y; + __last_move.rx = wl_fixed_from_double(ev->radius_x); + __last_move.ry = wl_fixed_from_double(ev->radius_y); + __last_move.pressure = wl_fixed_from_double(ev->pressure); + __last_move.angle = wl_fixed_from_double(ev->angle); + __last_move.class = evas_device_class_get(ev->dev); + __last_move.sub_class = evas_device_subclass_get(ev->dev); + __last_move.desc = desc; + __last_move.timestamp = ev->timestamp; + LOGD("mouse move: %d %d", ev->cur.canvas.x - x, ev->cur.canvas.y - y); if (desc == NULL) -- 2.7.4 From 525e6626c07915a606816650f3fb5522b52a5c55 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Tue, 1 Aug 2017 17:44:29 +0900 Subject: [PATCH 09/16] Modify log level Change-Id: Idb42508475d29b5afadf2dcc7ddb16886f447cf3 Signed-off-by: Hyunho Kang --- screen_connector_watcher/src/screen_connector_toolkit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screen_connector_watcher/src/screen_connector_toolkit.c b/screen_connector_watcher/src/screen_connector_toolkit.c index 90c07e4..c463e2d 100644 --- a/screen_connector_watcher/src/screen_connector_toolkit.c +++ b/screen_connector_watcher/src/screen_connector_toolkit.c @@ -182,7 +182,7 @@ static void __aul_screen_viewer_cb(const char *appid, const char *instance_id, toolkit_h = (screen_connector_toolkit_h)g_hash_table_lookup(type_h->toolkit_table, instance_id); if (toolkit_h == NULL) { - LOGD("It's not my instance_id, maybe alread removed %s ", instance_id); + LOGW("It's not my instance_id, maybe alread removed %s ", instance_id); return; } -- 2.7.4 From a952e6651bd2d9948e2d158342aa25d3034a9861 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Thu, 3 Aug 2017 17:19:09 +0900 Subject: [PATCH 10/16] Cancel mouse event when the widget is invisible - After wdiget is paused, the event for mouse events may be ignored - If mouse-up event is missed, a button will not be enabled again - To cover this issue, mouse-cancel event should be sent when the widget is paused Change-Id: Ife9eec5971dab78a949ab0826f91a902740365bc Signed-off-by: Junghoon Park --- screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 5349bf0..453b3da 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -59,7 +59,6 @@ struct _screen_connector_toolkit_evas_h { screen_connector_toolkit_h toolkit_h; int freeze; bool is_init; - bool cancel_touch; Evas_Object *img_tbm; Evas_Object *img_file; uint32_t img_type; @@ -384,6 +383,9 @@ static int __set_visibility(screen_connector_toolkit_evas_h toolkit_evas_h, visi return -1; if (__delayed_resuming_time == 0) { + if (obscured == TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_INVISIBLE) + tizen_remote_surface_transfer_touch_cancel(surface); + tizen_remote_surface_transfer_visibility(surface, obscured); return 0; @@ -394,6 +396,8 @@ static int __set_visibility(screen_connector_toolkit_evas_h toolkit_evas_h, visi g_source_remove(toolkit_evas_h->resuming_timer); toolkit_evas_h->resuming_timer = 0; } + + tizen_remote_surface_transfer_touch_cancel(surface); tizen_remote_surface_transfer_visibility(surface, obscured); } else { if (toolkit_evas_h->resuming_timer == 0) { @@ -1174,7 +1178,6 @@ EXPORT_API int screen_connector_toolkit_evas_send_touch_cancel(Evas_Object *obj) } tizen_remote_surface_transfer_touch_cancel(surface); - toolkit_evas_h->cancel_touch = true; } else { LOGE("surface not yet initialized."); return -1; -- 2.7.4 From a5c94cea9e785704ed46941d148b42aba095dcdd Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Thu, 3 Aug 2017 20:51:03 +0900 Subject: [PATCH 11/16] Fix mouse up crash If DESC value do not copied, tizen_remote_surface_transfer_mouse_event will send trash value. Change-Id: I4690a1d76671f7ce4394c7c9b36e2a78795b23b3 Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 48 +++++----------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 453b3da..bb9e8b4 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -69,21 +69,6 @@ struct _screen_connector_toolkit_evas_h { void *data; }; -struct _move_event_info { - double x; - double y; - double rx; - double ry; - double pressure; - double angle; - double class; - double sub_class; - const char *desc; - unsigned int timestamp; -}; - -static struct _move_event_info __last_move; - static GHashTable *__cur_buffer_table = NULL; static GHashTable *__type_table = NULL; static Ecore_Event_Handler *__visibility_listener; @@ -501,23 +486,23 @@ static void __rs_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_ } /* - * We need to send last move event for + * We need to send move event for * consistency with old widget framework */ tizen_remote_surface_transfer_mouse_event(surface, TIZEN_REMOTE_SURFACE_EVENT_TYPE_MOUSE_MOVE, 0, 0, - __last_move.x, - __last_move.y, - __last_move.rx, - __last_move.ry, - __last_move.pressure, - __last_move.angle, - __last_move.class, - __last_move.sub_class, - __last_move.desc, - __last_move.timestamp); + ev->canvas.x - x, + ev->canvas.y - y, + wl_fixed_from_double(ev->radius_x), + wl_fixed_from_double(ev->radius_y), + wl_fixed_from_double(ev->pressure), + wl_fixed_from_double(ev->angle), + evas_device_class_get(ev->dev), + evas_device_subclass_get(ev->dev), + desc, + ev->timestamp); tizen_remote_surface_transfer_mouse_event(surface, TIZEN_REMOTE_SURFACE_EVENT_TYPE_MOUSE_UP, @@ -548,17 +533,6 @@ static void __rs_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *even evas_object_geometry_get(obj, &x, &y, &w, &h); - __last_move.x = ev->cur.canvas.x - x; - __last_move.y = ev->cur.canvas.y - y; - __last_move.rx = wl_fixed_from_double(ev->radius_x); - __last_move.ry = wl_fixed_from_double(ev->radius_y); - __last_move.pressure = wl_fixed_from_double(ev->pressure); - __last_move.angle = wl_fixed_from_double(ev->angle); - __last_move.class = evas_device_class_get(ev->dev); - __last_move.sub_class = evas_device_subclass_get(ev->dev); - __last_move.desc = desc; - __last_move.timestamp = ev->timestamp; - LOGD("mouse move: %d %d", ev->cur.canvas.x - x, ev->cur.canvas.y - y); if (desc == NULL) -- 2.7.4 From 8e24c3cae7bfec9d9a2b0758010a7dcc6579752c Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Tue, 8 Aug 2017 11:12:14 +0900 Subject: [PATCH 12/16] Add api to get auto visibility - screen_connector_toolkit_evas_auto_visibility Change-Id: I7896c097d45573f06cea2a2d8e81e53831027389 Signed-off-by: Hyunho Kang --- .../include/screen_connector_toolkit_evas.h | 3 ++- .../src/screen_connector_toolkit_evas.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h b/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h index 6b16d7d..31164d6 100644 --- a/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h +++ b/screen_connector_watcher_evas/include/screen_connector_toolkit_evas.h @@ -114,7 +114,8 @@ int screen_connector_toolkit_evas_get_rid(Evas_Object *obj, int *resource_id); screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add_with_win(screen_connector_toolkit_evas_ops *ops, char *id, screen_connector_screen_type_e type, Evas_Object *win, void *data); int screen_connector_toolkit_evas_is_visible(Evas_Object *obj, bool *is_visible); - +visibility_type screen_connector_toolkit_evas_auto_visibility( + screen_connector_toolkit_evas_h h); /** * @} diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index bb9e8b4..ed3e337 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -66,6 +66,7 @@ struct _screen_connector_toolkit_evas_h { struct _screen_connector_type_evas_h *type_h; guint resuming_timer; GList *viewer_visibility_list; + visibility_type auto_visibility; void *data; }; @@ -404,9 +405,11 @@ static void __obj_update_visibility(void *data, Evas *e, Evas_Object *obj, void } if (__obj_is_visible(toolkit_evas_h)) - __set_visibility(toolkit_evas_h, VISIBILITY_TYPE_UNOBSCURED); + toolkit_evas_h->auto_visibility = VISIBILITY_TYPE_UNOBSCURED; else - __set_visibility(toolkit_evas_h, VISIBILITY_TYPE_FULLY_OBSCURED); + toolkit_evas_h->auto_visibility = VISIBILITY_TYPE_FULLY_OBSCURED; + + __set_visibility(toolkit_evas_h, toolkit_evas_h->auto_visibility); } static void __rs_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info) @@ -987,6 +990,7 @@ static void __send_visibility(gpointer key, gpointer value, gpointer user_data) LOGW("set visibility to %d", type); ret = __set_visibility(toolkit_evas_h, type); + toolkit_evas_h->auto_visibility = type; if (ret == -1) LOGE("failed to set object visibility set %p to %d", toolkit_evas_h->img_tbm, type); } @@ -1308,3 +1312,14 @@ EXPORT_API int screen_connector_toolkit_evas_unbind(screen_connector_toolkit_eva return screen_connector_toolkit_unbind(h->toolkit_h); } + +EXPORT_API visibility_type screen_connector_toolkit_evas_auto_visibility( + screen_connector_toolkit_evas_h h) +{ + if (!h) { + LOGE("invalid argument %p", h); + return -1; + } + + return h->auto_visibility; +} -- 2.7.4 From 21ff0080dd0b0d146da9370e4f2c9da08a09c6d5 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 9 Aug 2017 22:21:58 +0900 Subject: [PATCH 13/16] Clear buffer reference when toolkit removed When provider died referenced remote surface buffer should be released Change-Id: I8f7dd1542b2596b9f4afc11b99d5f5c327476ebe Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index ed3e337..164b4f5 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -165,7 +165,9 @@ static void __clear_img_file(screen_connector_toolkit_evas_h toolkit_evas_h) static void __destroy_toolkit_evas_h(gpointer data) { char *plug_id; + cur_buffer_info_h c_buf_info; screen_connector_toolkit_evas_h toolkit_evas_h = data; + struct tizen_remote_surface *surface; if (!toolkit_evas_h) return; @@ -206,6 +208,14 @@ static void __destroy_toolkit_evas_h(gpointer data) EVAS_CALLBACK_MOVE, __obj_update_visibility); + c_buf_info = g_hash_table_lookup(__cur_buffer_table, + toolkit_evas_h->cur_buffer); + if (c_buf_info != NULL) { + surface = screen_connector_toolkit_get_trs( + toolkit_evas_h->toolkit_h); + __cur_buffer_info_unref(surface, c_buf_info); + } + plug_id = evas_object_data_del(toolkit_evas_h->img_tbm, "___PLUGID"); if (plug_id) free(plug_id); -- 2.7.4 From 93fc7aec67a91c27d450c4d0afcf4bc7a8f3ea85 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Thu, 10 Aug 2017 18:17:17 +0900 Subject: [PATCH 14/16] Cancel touch event when the screen is binding Change-Id: Iafdc141469730d9963ee0625a0d115716329899d Signed-off-by: Junghoon Park --- screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 164b4f5..9ce2c63 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -1282,6 +1282,7 @@ EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_ struct wl_surface *surface; Ecore_Wl_Window *wl_win; viewer_visibility_h visibility_h; + struct tizen_remote_surface *trs; if (!h) return -1; @@ -1309,7 +1310,9 @@ EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_ h->viewer_visibility_list = g_list_append(h->viewer_visibility_list, visibility_h); - + trs = screen_connector_toolkit_get_trs(h->toolkit_h); + if (trs) + tizen_remote_surface_transfer_touch_cancel(trs); return screen_connector_toolkit_bind(h->toolkit_h, surface); } -- 2.7.4 From 2008679a88c2593b8928b33243f72aae707e41b3 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 16 Aug 2017 12:04:34 +0900 Subject: [PATCH 15/16] Unref buffer before bind surface Buffer should be released before bind, if not watch window can not use one buffer which referenced by watch application Change-Id: I780e709776366e8a40a083c3c7fd08451cb4983e Signed-off-by: Hyunho Kang --- .../src/screen_connector_toolkit_evas.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 9ce2c63..fdf095b 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -1283,6 +1283,7 @@ EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_ Ecore_Wl_Window *wl_win; viewer_visibility_h visibility_h; struct tizen_remote_surface *trs; + cur_buffer_info_h c_buf_info; if (!h) return -1; @@ -1313,6 +1314,17 @@ EXPORT_API int screen_connector_toolkit_evas_bind(screen_connector_toolkit_evas_ trs = screen_connector_toolkit_get_trs(h->toolkit_h); if (trs) tizen_remote_surface_transfer_touch_cancel(trs); + + if (h->cur_buffer) { + if (tizen_remote_surface_get_version(trs) + >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION) { + c_buf_info = g_hash_table_lookup( + __cur_buffer_table, h->cur_buffer); + if (c_buf_info != NULL) + __cur_buffer_info_unref(trs, c_buf_info); + } + } + return screen_connector_toolkit_bind(h->toolkit_h, surface); } -- 2.7.4 From af1aca75409c637badc25f50ca6069c65f762dcb Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Wed, 16 Aug 2017 17:06:46 +0900 Subject: [PATCH 16/16] Send multi-down/up events to Display Server - The events for multi-touch were not considered Change-Id: Iabe2d27f719fb8e2064caf7cfb4473309c07e7f4 Signed-off-by: Junghoon Park --- .../src/screen_connector_toolkit_evas.c | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index fdf095b..a8eceae 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -77,6 +77,8 @@ static int __delayed_resuming_time; static void __rs_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); static void __rs_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_touch_multi_down(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void __rs_cb_touch_multi_up(void *data, Evas *e, Evas_Object *obj, void *event_info); static void __rs_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info); static void __rs_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info); static void __rs_cb_show(void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -184,6 +186,14 @@ static void __destroy_toolkit_evas_h(gpointer data) __rs_cb_mouse_up); evas_object_event_callback_del( toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MULTI_DOWN, + __rs_cb_touch_multi_down); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MULTI_UP, + __rs_cb_touch_multi_up); + evas_object_event_callback_del( + toolkit_evas_h->img_tbm, EVAS_CALLBACK_MOUSE_MOVE, __rs_cb_mouse_move); evas_object_event_callback_del( @@ -533,6 +543,98 @@ static void __rs_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_ ev->timestamp); } +static void __rs_cb_touch_multi_down(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + screen_connector_toolkit_evas_h toolkit_evas_h = (screen_connector_toolkit_evas_h)data; + Evas_Event_Multi_Down *ev = event_info; + const char *desc = evas_device_description_get(ev->dev); + int x; + int y; + int w; + int h; + struct tizen_remote_surface *surface; + + evas_object_geometry_get(obj, &x, &y, &w, &h); + + LOGD("multi down: %d %d", ev->canvas.x - x, ev->canvas.y - y); + + if (desc == NULL) + desc = ""; + + if (screen_connector_toolkit_check_input_disabled(toolkit_evas_h->toolkit_h, + SCREEN_CONNECTOR_INPUT_TYPE_MOUSE_UP_DOWN)) { + LOGD("multi down disabled"); + return; + } + + surface = screen_connector_toolkit_get_trs(toolkit_evas_h->toolkit_h); + if (surface == NULL) { + LOGE("surface is NULL"); + return; + } + + tizen_remote_surface_transfer_touch_event(surface, + TIZEN_REMOTE_SURFACE_EVENT_TYPE_TOUCH_DOWN, + ev->device, + 1, + ev->canvas.x - x, + ev->canvas.y - y, + wl_fixed_from_double(ev->radius_x), + wl_fixed_from_double(ev->radius_y), + wl_fixed_from_double(ev->pressure), + wl_fixed_from_double(ev->angle), + evas_device_class_get(ev->dev), + evas_device_subclass_get(ev->dev), + desc, + ev->timestamp); +} + +static void __rs_cb_touch_multi_up(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + screen_connector_toolkit_evas_h toolkit_evas_h = (screen_connector_toolkit_evas_h)data; + Evas_Event_Multi_Up *ev = event_info; + const char *desc = evas_device_description_get(ev->dev); + int x; + int y; + int w; + int h; + struct tizen_remote_surface *surface; + + evas_object_geometry_get(obj, &x, &y, &w, &h); + + LOGD("multi up: %d %d", ev->canvas.x - x, ev->canvas.y - y); + + if (desc == NULL) + desc = ""; + + if (screen_connector_toolkit_check_input_disabled(toolkit_evas_h->toolkit_h, + SCREEN_CONNECTOR_INPUT_TYPE_MOUSE_UP_DOWN)) { + LOGD("multi up disabled"); + return; + } + + surface = screen_connector_toolkit_get_trs(toolkit_evas_h->toolkit_h); + if (surface == NULL) { + LOGE("surface is NULL"); + return; + } + + tizen_remote_surface_transfer_touch_event(surface, + TIZEN_REMOTE_SURFACE_EVENT_TYPE_TOUCH_UP, + ev->device, + 1, + ev->canvas.x - x, + ev->canvas.y - y, + wl_fixed_from_double(ev->radius_x), + wl_fixed_from_double(ev->radius_y), + wl_fixed_from_double(ev->pressure), + wl_fixed_from_double(ev->angle), + evas_device_class_get(ev->dev), + evas_device_subclass_get(ev->dev), + desc, + ev->timestamp); +} + static void __rs_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info) { screen_connector_toolkit_evas_h toolkit_evas_h = (screen_connector_toolkit_evas_h)data; @@ -660,6 +762,12 @@ static void __toolkit_update_cb(struct tizen_remote_surface *trs, uint32_t type, EVAS_CALLBACK_MOUSE_UP, __rs_cb_mouse_up, toolkit_evas_h); evas_object_event_callback_add(toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MULTI_DOWN, + __rs_cb_touch_multi_down, toolkit_evas_h); + evas_object_event_callback_add(toolkit_evas_h->img_tbm, + EVAS_CALLBACK_MULTI_UP, + __rs_cb_touch_multi_up, toolkit_evas_h); + evas_object_event_callback_add(toolkit_evas_h->img_tbm, EVAS_CALLBACK_MOUSE_MOVE, __rs_cb_mouse_move, toolkit_evas_h); evas_object_event_callback_add(toolkit_evas_h->img_tbm, -- 2.7.4