elm_interface_atspi_accessible_removed(eo_item);
+ if (item->atspi_custom_relations)
+ elm_atspi_relation_set_free(&item->atspi_custom_relations);
+
EINA_MAGIC_SET(item, EINA_MAGIC_NONE);
eo_do_super(eo_item, ELM_WIDGET_ITEM_CLASS, eo_destructor());
elm_interface_atspi_accessible_translation_domain_set(NULL),
elm_interface_atspi_accessible_relationships_clear()
);
+ // TIZEN_ONLY(20150709) : atspi relations api
+ if (sd->atspi_custom_relations)
+ elm_atspi_relation_set_free(&sd->atspi_custom_relations);
+ //
eo_do_super(obj, ELM_WIDGET_CLASS, eo_destructor());
sd->on_destroy = EINA_FALSE;
return ret;
}
+// TIZEN_ONLY(20150709) : atspi relations api
+EOLIAN static Elm_Atspi_Relation_Set
+_elm_widget_elm_interface_atspi_accessible_relation_set_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
+{
+ return elm_atspi_relation_set_clone(&sd->atspi_custom_relations);
+}
+//////////////////////////////
+
EOLIAN static void
_elm_widget_item_elm_interface_atspi_component_extents_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd EINA_UNUSED, Eina_Bool screen_coords, int *x, int *y, int *w, int *h)
{
}
//
+//TIZEN_ONLY(20150709) add relations atpi
+EOLIAN static Eina_Bool
+_elm_widget_elm_interface_atspi_accessible_relationship_append(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Atspi_Relation_Type type, const Eo *relation_obj)
+{
+ return elm_atspi_relation_set_relation_append(&sd->atspi_custom_relations, type, relation_obj);
+}
+
+EOLIAN static void
+_elm_widget_elm_interface_atspi_accessible_relationship_remove(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Atspi_Relation_Type type, const Eo *relation_obj)
+{
+ elm_atspi_relation_set_relation_remove(&sd->atspi_custom_relations, type, relation_obj);
+}
+
+EOLIAN static Eina_Bool
+_elm_widget_item_elm_interface_atspi_accessible_relationship_append(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd, Elm_Atspi_Relation_Type type, const Eo *relation_obj)
+{
+ return elm_atspi_relation_set_relation_append(&sd->atspi_custom_relations, type, relation_obj);
+}
+
+EOLIAN static void
+_elm_widget_item_elm_interface_atspi_accessible_relationship_remove(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd, Elm_Atspi_Relation_Type type, const Eo *relation_obj)
+{
+ elm_atspi_relation_set_relation_remove(&sd->atspi_custom_relations, type, relation_obj);
+}
+///////////////////////////////////
+
#include "elm_widget_item.eo.c"
#include "elm_widget.eo.c"
#include "elm_priv.h"
#include "elm_suite.h"
-static Evas_Object *g_win, *g_btn, *g_bg;
+static Evas_Object *g_win, *g_btn, *g_bg, *g_btn2, *g_btn3, *g_box, *g_lbl;
void generate_app(void)
{
evas_object_show(g_win);
}
+void generate_app2(void)
+{
+ g_win = elm_win_add(NULL, "Title", ELM_WIN_BASIC);
+ evas_object_geometry_set(g_win, 100, 100, 100, 100);
+
+ g_bg = elm_bg_add(g_win);
+
+ g_box = elm_box_add(g_win);
+
+ g_btn = elm_button_add(g_win);
+ g_btn2 = elm_button_add(g_win);
+ g_btn3 = elm_button_add(g_win);
+ g_lbl = elm_label_add(g_win);
+
+ elm_box_pack_end(g_box, g_btn);
+ elm_box_pack_end(g_box, g_btn2);
+ elm_box_pack_end(g_box, g_btn3);
+ elm_box_pack_end(g_box, g_lbl);
+
+ evas_object_show(g_btn);
+ evas_object_show(g_bg);
+ evas_object_show(g_win);
+ evas_object_show(g_box);
+ evas_object_show(g_btn2);
+ evas_object_show(g_btn3);
+ evas_object_show(g_lbl);
+}
+
START_TEST (elm_atspi_app_obj_name_get)
{
elm_init(0, NULL);
}
END_TEST
+<<<<<<< HEAD
/* Initial value of translation domain should be NULL */
START_TEST (elm_atspi_translation_domain_get)
{
elm_init(0, NULL);
generate_app();
+=======
+START_TEST (elm_atspi_elm_widget_custom_relations)
+{
+>>>>>>> 876f95b... atspi: add new APIs for setting atspi relationship.
Elm_Atspi_Relation_Set set;
Elm_Atspi_Relation *rel, *rel_to, *rel_from;
Eina_List *l;
+<<<<<<< HEAD
eo_do(g_btn, elm_interface_atspi_accessible_relationship_append(ELM_ATSPI_RELATION_FLOWS_TO, g_bg));
eo_do(g_btn, elm_interface_atspi_accessible_relationship_append(ELM_ATSPI_RELATION_FLOWS_FROM, g_win));
eo_do(g_btn, set = elm_interface_atspi_accessible_relation_set_get());
+=======
+ elm_init(0, NULL);
+ generate_app2();
+
+ eo_do(g_btn, set = elm_interface_atspi_accessible_relation_set_get());
+ ck_assert(set == NULL);
+
+ eo_do(g_btn, elm_interface_atspi_accessible_relationship_append(ELM_ATSPI_RELATION_FLOWS_TO, g_lbl));
+ eo_do(g_btn, elm_interface_atspi_accessible_relationship_append(ELM_ATSPI_RELATION_FLOWS_FROM, g_win));
+
+ eo_do(g_btn, set = elm_interface_atspi_accessible_relation_set_get());
+>>>>>>> 876f95b... atspi: add new APIs for setting atspi relationship.
ck_assert(set != NULL);
ck_assert(eina_list_count(set) >= 2);
rel_to = rel_from = NULL;
EINA_LIST_FOREACH(set, l, rel)
+<<<<<<< HEAD
{
if (rel->type == ELM_ATSPI_RELATION_FLOWS_TO)
rel_to = rel;
eo_do(g_btn, elm_interface_atspi_accessible_relationship_remove(ELM_ATSPI_RELATION_FLOWS_TO, g_bg));
eo_do(g_btn, set = elm_interface_atspi_accessible_relation_set_get());
+=======
+ {
+ if (rel->type == ELM_ATSPI_RELATION_FLOWS_TO)
+ rel_to = rel;
+ if (rel->type == ELM_ATSPI_RELATION_FLOWS_FROM)
+ rel_from = rel;
+ }
+
+ ck_assert(rel_to != NULL);
+ ck_assert(rel_from != NULL);
+ ck_assert(eina_list_data_find(rel_to->objects, g_lbl) != NULL);
+ ck_assert(eina_list_data_find(rel_from->objects, g_win) != NULL);
+
+ elm_atspi_relation_set_free(&set);
+
+ eo_do(g_btn, elm_interface_atspi_accessible_relationship_remove(ELM_ATSPI_RELATION_FLOWS_TO, g_lbl));
+ eo_do(g_btn, set = elm_interface_atspi_accessible_relation_set_get());
+>>>>>>> 876f95b... atspi: add new APIs for setting atspi relationship.
ck_assert(set != NULL);
ck_assert(eina_list_count(set) >= 1);
rel_to = rel_from = NULL;
EINA_LIST_FOREACH(set, l, rel)
+<<<<<<< HEAD
{
if (rel->type == ELM_ATSPI_RELATION_FLOWS_TO)
rel_to = rel;
}
elm_atspi_relation_set_free(set);
+=======
+ {
+ if (rel->type == ELM_ATSPI_RELATION_FLOWS_TO)
+ ck_assert(EINA_FALSE);
+ }
+
+ elm_atspi_relation_set_free(&set);
+
+>>>>>>> 876f95b... atspi: add new APIs for setting atspi relationship.
elm_shutdown();
}
END_TEST
tcase_add_test(tc, elm_atspi_description_get);
tcase_add_test(tc, elm_atspi_children_and_parent);
tcase_add_test(tc, elm_atspi_children_and_parent2);
+<<<<<<< HEAD
tcase_add_test(tc, elm_atspi_translation_domain_get);
tcase_add_test(tc, elm_atspi_translation_domain_set);
tcase_add_test(tc, elm_atspi_relationship_append);
tcase_add_test(tc, elm_atspi_relationship_remove);
tcase_add_test(tc, elm_atspi_relationships_clear);
+=======
+ tcase_add_test(tc, elm_atspi_elm_widget_custom_relations);
+>>>>>>> 876f95b... atspi: add new APIs for setting atspi relationship.
}