diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2016-11-14 11:47:49 +0900 |
---|---|---|
committer | Shinwoo Kim <cinoo.kim@samsung.com> | 2016-11-15 10:38:24 +0900 |
commit | 6b384d023e533b8bd89ce81cd5844bf50d1a1cac (patch) | |
tree | 178cc73b25ad327719411a8bc1123d485d3f8a3f | |
parent | fa3ec686bf8cbb43cb8087442cae1449caa3694c (diff) | |
download | appcore-widget-6b384d023e533b8bd89ce81cd5844bf50d1a1cac.tar.gz appcore-widget-6b384d023e533b8bd89ce81cd5844bf50d1a1cac.tar.bz2 appcore-widget-6b384d023e533b8bd89ce81cd5844bf50d1a1cac.zip |
[accessibility][screen-reader] make widget accessiblesubmit/tizen_3.0/20161117.231834accepted/tizen/3.0/wearable/20161121.012120accepted/tizen/3.0/tv/20161121.012110accepted/tizen/3.0/mobile/20161121.012051accepted/tizen/3.0/ivi/20161121.012141accepted/tizen/3.0/common/20161121.073037
Change-Id: I2db8f30ae410aba654b3559e19f510f938ed023f
-rwxr-xr-x | src/widget_app.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/widget_app.c b/src/widget_app.c index 80d9cb8..374e437 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -1346,6 +1346,14 @@ EXPORT_API const char *widget_app_get_id(widget_context_h context) return context->id; } +static void _win_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + /* Remove data used in accessibility */ + char *plug_id; + plug_id = evas_object_data_del(obj, "___PLUGID"); + free(plug_id); +} + EXPORT_API int widget_app_get_elm_win(widget_context_h context, Evas_Object **win) { @@ -1353,6 +1361,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context, Evas_Object *ret_win; Ecore_Wl_Window *wl_win; struct wl_surface *surface; + char buffer[256]; if (!_is_widget_feature_enabled()) { _E("not supported"); /* LCOV_EXCL_LINE */ @@ -1390,6 +1399,11 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context, cxt->win = ret_win; cxt->win_id = ecore_wl_window_id_get(wl_win); + /* Set data to use in accessibility */ + snprintf(buffer, sizeof(buffer), "%s:%d", cxt->id, getpid()); + evas_object_data_set(ret_win, "___PLUGID", strdup(buffer)); + evas_object_event_callback_add(ret_win, EVAS_CALLBACK_DEL, _win_del_cb, NULL); + _D("window created: %d", cxt->win_id); return WIDGET_ERROR_NONE; |