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)
{
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 */
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;