} accessibility_highlight;
//
-
+ //TIZEN_ONLY(20170919): Handle default label object
+ Eina_List *default_label_objs;
+ //
Evas_Object *icon;
const char *title;
const char *icon_name;
}
//
+//TIZEN_ONLY(20170919): Handle default label object
+static void
+_default_label_obj_del_cb (void *data,
+ Evas *e EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ ELM_WIN_DATA_GET(data, sd);
+ if (!sd) return;
+
+ sd->default_label_objs = eina_list_remove(sd->default_label_objs, obj);
+}
+
+static int _sort_parent_child_order(const void *data1, const void *data2)
+{
+ if (data1)
+ {
+ Eo *parent;
+ parent = efl_access_parent_get(data1);
+ while (parent)
+ {
+ if (parent == data2) return 1;
+ parent = efl_access_parent_get(parent);
+ }
+ }
+ return -1;
+}
+
+void
+_elm_win_default_label_obj_append(Evas_Object *default_label_obj)
+{
+ if (!default_label_obj) return;
+
+ Evas_Object *win = elm_widget_top_get(default_label_obj);
+ if (!win || !efl_isa(win, EFL_UI_WIN_CLASS))
+ {
+ WRN("The top object of %s is not a window.",
+ efl_class_name_get(efl_class_get(default_label_obj)));
+ return;
+ }
+
+ ELM_WIN_DATA_GET(win, sd);
+ if (!sd) return;
+
+ if (eina_list_data_find(sd->default_label_objs, default_label_obj))
+ {
+ sd->default_label_objs =
+ eina_list_remove(sd->default_label_objs, default_label_obj);
+ evas_object_event_callback_del_full(default_label_obj, EVAS_CALLBACK_DEL,
+ _default_label_obj_del_cb, win);
+ }
+
+ evas_object_event_callback_add(default_label_obj, EVAS_CALLBACK_DEL,
+ _default_label_obj_del_cb, win);
+ sd->default_label_objs =
+ eina_list_append(sd->default_label_objs, default_label_obj);
+
+ sd->default_label_objs =
+ eina_list_sort(sd->default_label_objs, -1, _sort_parent_child_order);
+}
+
+void
+_elm_win_default_label_obj_remove(Evas_Object *default_label_obj)
+{
+ if (!default_label_obj) return;
+
+ Evas_Object *win = elm_widget_top_get(default_label_obj);
+ if (!win || !efl_isa(win, EFL_UI_WIN_CLASS))
+ {
+ WRN("The top object of %s is not a window.",
+ efl_class_name_get(efl_class_get(default_label_obj)));
+ return;
+ }
+
+ ELM_WIN_DATA_GET(win, sd);
+ if (!sd) return;
+
+ if (eina_list_data_find(sd->default_label_objs, default_label_obj))
+ {
+ sd->default_label_objs =
+ eina_list_remove(sd->default_label_objs, default_label_obj);
+ evas_object_event_callback_del_full(default_label_obj, EVAS_CALLBACK_DEL,
+ _default_label_obj_del_cb, win);
+ }
+}
+
+Evas_Object *
+_elm_win_default_label_obj_get(Evas_Object *obj)
+{
+ if (!obj) return NULL;
+ ELM_WIN_DATA_GET(obj, sd);
+ if (!sd) return NULL;
+
+ return eina_list_last_data_get(sd->default_label_objs);
+}
+//
+
static Ecore_Window
_elm_win_window_id_get(Efl_Ui_Win_Data *sd)
{
void *event_info EINA_UNUSED)
{
ELM_CTXPOPUP_DATA_GET(obj, sd);
+ //TIZEN_ONLY(20170919): Handle default label object
+ _elm_win_default_label_obj_append(obj);
+ //
if (sd->list)
{
sd->visible = EINA_FALSE;
sd->list_visible = EINA_FALSE;
+ //TIZEN_ONLY(20170919): Handle default label object
+ _elm_win_default_label_obj_remove(obj);
+ //
}
static void
elm_wdg_item_del(EO_OBJ(it));
//TIZEN_ONLY(20161122): add state_notify api
- if (_elm_atspi_enabled())
+ Eo *eo_top = elm_naviframe_top_item_get(widget);
+ if (eo_top)
{
- Eo *eo_top = elm_naviframe_top_item_get(widget);
- if (eo_top)
+ ELM_NAVIFRAME_ITEM_DATA_GET(eo_top, top);
+ _elm_win_default_label_obj_append(VIEW(top));
+
+ if (_elm_atspi_enabled())
{
- ELM_NAVIFRAME_ITEM_DATA_GET(eo_top, top);
efl_access_state_notify(VIEW(top), ACCESS_STATE(EFL_ACCESS_STATE_SHOWING) | ACCESS_STATE(EFL_ACCESS_STATE_VISIBLE), EINA_TRUE);
}
}
efl_event_callback_legacy_call(WIDGET(it), ELM_NAVIFRAME_EVENT_TRANSITION_FINISHED, EO_OBJ(it));
if (EO_OBJ(it) == elm_naviframe_top_item_get(WIDGET(it)))
- efl_event_callback_legacy_call(WIDGET(it), ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(it));
+ {
+ efl_event_callback_legacy_call(WIDGET(it), ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(it));
+ //TIZEN_ONLY(20170919): Handle default label object
+ _elm_win_default_label_obj_append(VIEW(it));
+ //
+ }
}
static void
elm_layout_sizing_eval(obj);
if (!top_item)
- efl_event_callback_legacy_call(obj, ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(item));
+ {
+ efl_event_callback_legacy_call(obj, ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(item));
+ //TIZEN_ONLY(20170919): Handle default label object
+ _elm_win_default_label_obj_append(VIEW(item));
+ //
+ }
}
EAPI Evas_Object *
static void
_show_finished_cb(void *data, const Efl_Event *event EINA_UNUSED)
{
+ //TIZEN_ONLY(20170919): Handle default label object
+ _elm_win_default_label_obj_append(data);
+ //
efl_event_callback_legacy_call(data, ELM_POPUP_EVENT_SHOW_FINISHED, NULL);
}
/* END */
}
EOLIAN static void
-_elm_popup_dismiss(Eo *obj EINA_UNUSED, Elm_Popup_Data *pd)
+_elm_popup_dismiss(Eo *obj, Elm_Popup_Data *pd)
{
+ //TIZEN_ONLY(20170919): Handle default label object
+ _elm_win_default_label_obj_remove(obj);
+ //
elm_layout_signal_emit(pd->main_layout, "elm,state,hide", "elm");
elm_notify_dismiss(pd->notify);
}
}
//
+//TIZEN_ONLY(20170919): Handle default label object
+static Eldbus_Message *
+_accessible_default_label_info_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
+{
+ Eldbus_Message *ret;
+ Eldbus_Message_Iter *iter;
+ const char *obj_path = eldbus_message_path_get(msg);
+ Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
+ Eo *obj = _bridge_object_from_path(bridge, obj_path);
+ Eo *default_label_obj;
+ Efl_Access_Role role;
+ AtspiRole atspi_role = ATSPI_ROLE_INVALID;
+
+ ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_MIXIN, msg);
+
+ ret = eldbus_message_method_return_new(msg);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
+
+ iter = eldbus_message_iter_get(ret);
+
+ default_label_obj = _elm_win_default_label_obj_get(obj);
+ if (!default_label_obj) default_label_obj = obj;
+ _bridge_iter_object_reference_append(bridge, iter, default_label_obj);
+ _bridge_object_register(bridge, default_label_obj);
+
+ role = efl_access_role_get(default_label_obj);
+ atspi_role = role > EFL_ACCESS_ROLE_LAST_DEFINED ? ATSPI_ROLE_LAST_DEFINED : elm_roles_to_atspi_roles[role][1];
+ eldbus_message_iter_basic_append(iter, 'u', atspi_role);
+
+ return ret;
+}
+//
+
static const Eldbus_Method accessible_methods[] = {
// TIZEN_ONLY(20170310) - implementation of get object under coordinates for accessibility
{ "GetNavigableAtPoint", ELDBUS_ARGS({"i", "x"}, {"i", "y"}, {"u", "coord_type"}), ELDBUS_ARGS({"(so)", "accessible"}), _accessible_get_navigable_at_point, 0 },
{"(so)", "describecByObject"}),
_accessible_reading_material_get, 0},
//
+ //TIZEN_ONLY(20170919): Handle default label object
+ { "GetDefaultLabelInfo",
+ NULL, ELDBUS_ARGS({"(so)", "defaultLabelObject"}, {"u", "defaultLabelRole"}),
+ _accessible_default_label_info_get, 0},
+ //
{ NULL, NULL, NULL, NULL, 0 }
};
is_hidden = !!is_hidden;
efl_access_can_highlight_set(obj, !is_hidden);
efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_SHOWING, !is_hidden);
+ if (is_hidden)
+ _elm_win_default_label_obj_remove(obj);
+ else
+ _elm_win_default_label_obj_append(obj);
}
//
// Evas_Object *_elm_win_accessibility_highlight_get(Evas_Object *win);
// //
void _elm_win_object_set_accessibility_highlight(Evas_Object *win, Evas_Object *obj, Eina_Bool visible);
+//TIZEN_ONLY(20170919): Handle default label object
+void _elm_win_default_label_obj_append(Evas_Object *default_label_obj);
+void _elm_win_default_label_obj_remove(Evas_Object *default_label_obj);
+Evas_Object *_elm_win_default_label_obj_get(Evas_Object *obj);
+//
// TIZEN_ONLY(20171114): atspi: expose highlight information on atspi
void *_elm_object_accessibility_currently_highlighted_get();
//