summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2017-06-13 10:55:37 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2017-06-13 11:33:42 +0900
commit4a188e4d6a23de04bc4ecc492d6fc3787ccf970a (patch)
tree0de6adef148fed8d5a2763f05cde2453af2c0d06
parentaed44d3ccfaa91bf6365820a34cd0624360e6111 (diff)
downloadappcore-watch-4a188e4d6a23de04bc4ecc492d6fc3787ccf970a.tar.gz
appcore-watch-4a188e4d6a23de04bc4ecc492d6fc3787ccf970a.tar.bz2
appcore-watch-4a188e4d6a23de04bc4ecc492d6fc3787ccf970a.zip
Set data to use in accessibility
Change-Id: I9cae75484885b71dfe589ec4a8ef14c29658ae84 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rwxr-xr-xsrc/watch_app_main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/watch_app_main.c b/src/watch_app_main.c
index e334143..b7423c3 100755
--- a/src/watch_app_main.c
+++ b/src/watch_app_main.c
@@ -695,12 +695,20 @@ EXPORT_API int watch_time_get_daylight_time_status(watch_time_h watch_time, bool
return APP_ERROR_NONE;
}
+static void __win_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ char *plug_id;
+ plug_id = evas_object_data_del(obj, "___PLUGID");
+ free(plug_id);
+}
+
EXPORT_API int watch_app_get_elm_win(Evas_Object **win)
{
Evas_Object *ret_win;
struct wl_surface *surface;
Ecore_Wl_Window *wl_win;
screen_connector_provider_h remote;
+ char buffer[256];
if (win == NULL)
return watch_app_error(APP_ERROR_INVALID_PARAMETER,
@@ -722,6 +730,11 @@ EXPORT_API int watch_app_get_elm_win(Evas_Object **win)
SCREEN_CONNECTOR_INPUT_TYPE_MOUSE_MOVE_X_Y |
SCREEN_CONNECTOR_INPUT_TYPE_TOUCH_MOVE_X_Y);
+ /* Set data to use in accessibility */
+ snprintf(buffer, sizeof(buffer), "%s:%d", watch_core_get_appid(), getpid());
+ evas_object_data_set(ret_win, "___PLUGID", strdup(buffer));
+ evas_object_event_callback_add(ret_win, EVAS_CALLBACK_DEL, __win_del_cb, NULL);
+
*win = ret_win;
return APP_ERROR_NONE;
}