value "action" string: "move";
value "params" string: "down";
}
+ group "Elm_Config_Binding_Key" struct {
+ value "context" int: 0;
+ value "key" string: "Escape";
+ value "action" string: "escape";
+ value "params" string: "";
+ }
}
}
group "Elm_Config_Bindings_Widget" struct {
value "action" string: "move";
value "params" string: "down";
}
+ group "Elm_Config_Binding_Key" struct {
+ value "context" int: 0;
+ value "key" string: "Escape";
+ value "action" string: "escape";
+ value "params" string: "";
+ }
}
}
group "Elm_Config_Bindings_Widget" struct {
value "action" string: "move";
value "params" string: "down";
}
+ group "Elm_Config_Binding_Key" struct {
+ value "context" int: 0;
+ value "key" string: "Escape";
+ value "action" string: "escape";
+ value "params" string: "";
+ }
}
}
group "Elm_Config_Bindings_Widget" struct {
}
static void
-_item_wrap_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_item_wrap_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
Elm_Ctxpopup_Item_Data *item = data;
if (!item->wcb.org_func_cb) return;
item->wcb.org_func_cb((void *)item->wcb.org_data, item->wcb.cobj, EO_OBJ(item));
+//TIZEN ONLY(20150710)ctxpopup: Accessible methods for children_get, extents_get and item name_get
+ eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_MENU_ITEM));
+//
}
EOLIAN static Eo *
return ret;
}
+static Eina_Bool
+_item_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
+{
+ ELM_CTXPOPUP_ITEM_DATA_GET(obj, item);
+
+ if (item->wcb.org_func_cb)
+ item->wcb.org_func_cb((void*)item->wcb.org_data, WIDGET(item), EO_OBJ(item));
+ return EINA_TRUE;
+}
+
+EOLIAN static const Elm_Atspi_Action*
+_elm_ctxpopup_item_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Item_Data *sd EINA_UNUSED)
+{
+ static Elm_Atspi_Action atspi_actions[] = {
+ { "activate", "activate", NULL, _item_action_activate},
+ { NULL, NULL, NULL, NULL }
+ };
+ return &atspi_actions[0];
+}
+
#include "elm_ctxpopup_item.eo.c"
#include "elm_ctxpopup.eo.c"
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_GLASS_PANE));
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_COMBO_BOX));
return obj;
}
static Eina_Bool _key_action_top_item_get(Evas_Object *obj, const char *params);
+static char *_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED);
+
static const Elm_Action key_actions[] = {
{"top_item_get", _key_action_top_item_get},
{NULL, NULL}
if (sd->freeze_events)
evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
+
+ //TIZEN ONLY(20150707): expose title as at-spi object
+ if (_elm_config->atspi_mode)
+ {
+ Evas_Object *part = (Evas_Object*)edje_object_part_object_get(elm_layout_edje_get(VIEW(it)), TITLE_ACCESS_PART);
+ if (part)
+ {
+ Evas_Object *access = elm_access_object_register(part, VIEW(it));
+ _elm_access_callback_set(_elm_access_info_get(access),
+ ELM_ACCESS_INFO, _access_info_cb, it);
+ elm_atspi_accessible_role_set(access, ELM_ATSPI_ROLE_HEADING);
+ }
+ }
+ //
}
static void
elm_layout_content_set(btn, CONTENT_PART, ico);
}
+ if(_elm_config->atspi_mode)
+ eo_do(btn, elm_interface_atspi_accessible_name_set(N_("Navigate back")));
+
return btn;
}
it->title_enabled = EINA_TRUE;
+ //TIZEN ONLY(20150707): expose title as at-spi object
+ if (_elm_config->atspi_mode)
+ {
+ Evas_Object *part = (Evas_Object*)edje_object_part_object_get(elm_layout_edje_get(VIEW(it)), TITLE_ACCESS_PART);
+ if (part)
+ {
+ Evas_Object *access = elm_access_object_register(part, VIEW(it));
+ _elm_access_callback_set(_elm_access_info_get(access),
+ ELM_ACCESS_INFO, _access_info_cb, it);
+ elm_atspi_accessible_role_set(access, ELM_ATSPI_ROLE_HEADING);
+ }
+ }
+ //
+
return EO_OBJ(it);
}
_hide_effect_finished_cb(void *data, Eo *obj EINA_UNUSED,
const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED);
+//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action
+static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
+///
+
static const Elm_Action key_actions[] = {
{"move", _key_action_move},
+//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action
+ {"escape", _key_action_escape},
+///
{NULL, NULL}
};
return EINA_TRUE;
}
+//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action
+static Eina_Bool
+_key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED)
+{
+ evas_object_smart_callback_call(obj, SIG_BLOCK_CLICKED, NULL);
+ return EINA_TRUE;
+}
+//
+
static Eina_Bool
_key_action_move(Evas_Object *obj, const char *params)
{
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_NOTIFICATION));
-
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_DIALOG));
return obj;
}
_elm_popup_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Popup_Data *pd EINA_UNUSED)
{
static Elm_Atspi_Action atspi_actions[] = {
- { "move,previous", "move", "previous", _key_action_move},
- { "move,next", "move", "next", _key_action_move},
- { "move,left", "move", "left", _key_action_move},
- { "move,right", "move", "right", _key_action_move},
- { "move,up", "move", "up", _key_action_move},
- { "move,down", "move", "down", _key_action_move},
+//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action
+ { "escape", "escape", NULL, _key_action_escape},
{ NULL, NULL, NULL, NULL }
};
+ if (pd->action_area)
+ return NULL;
+///
+
return &atspi_actions[0];
}
# include "elementary_config.h"
#endif
+#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
+#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
+#define ELM_INTERFACE_ATSPI_ACTION_PROTECTED
+
#include <Elementary.h>
#include "elm_priv.h"
return ret;
}
+static Eina_Bool
+_access_action_callback_have(Evas_Object *obj, Elm_Access_Action_Type type)
+{
+ Action_Info *a;
+ a = evas_object_data_get(obj, "_elm_access_action_info");
+
+ if (!a) return EINA_FALSE;
+
+ return a->fn[type].cb ? EINA_TRUE : EINA_FALSE;
+}
+
EOLIAN static Eina_Bool
_elm_access_elm_widget_activate(Eo *obj, void *_pd EINA_UNUSED, Elm_Activate act)
{
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
+EOLIAN static char*
+_elm_access_elm_interface_atspi_accessible_name_get(Eo *obj, void *pd EINA_UNUSED)
+{
+ return elm_access_info_get(obj, ELM_ACCESS_INFO);
+}
+
+EOLIAN static const char*
+_elm_access_elm_interface_atspi_accessible_description_get(Eo *obj, void *pd EINA_UNUSED)
+{
+ return elm_access_info_get(obj, ELM_ACCESS_CONTEXT_INFO);
+}
+
+EOLIAN static Eina_Bool
+_elm_access_elm_interface_atspi_component_highlight_grab(Eo *obj, void *pd EINA_UNUSED)
+{
+ if (!_access_action_callback_call(obj, ELM_ACCESS_ACTION_HIGHLIGHT, NULL))
+ eo_do_super(obj, ELM_ACCESS_CLASS, elm_interface_atspi_component_highlight_grab());
+
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_access_elm_interface_atspi_component_highlight_clear(Eo *obj, void *pd EINA_UNUSED)
+{
+ if (!_access_action_callback_call(obj, ELM_ACCESS_ACTION_UNHIGHLIGHT, NULL))
+ eo_do_super(obj, ELM_ACCESS_CLASS, elm_interface_atspi_component_highlight_clear());
+
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_access_elm_interface_atspi_action_action_do(Eo *obj, void *pd EINA_UNUSED, int id)
+{
+ if (id != 0)
+ return EINA_FALSE;
+
+ return _access_action_callback_call(obj, ELM_ACCESS_ACTION_ACTIVATE, NULL);
+}
+
+EOLIAN static const char *
+_elm_access_elm_interface_atspi_action_name_get(Eo *obj, void *pd EINA_UNUSED, int id)
+{
+ if ((id != 0) || !_access_action_callback_have(obj, ELM_ACCESS_ACTION_ACTIVATE))
+ return NULL;
+ return "activate";
+}
+
+EOLIAN static Eina_List*
+_elm_access_elm_interface_atspi_action_actions_get(Eo *obj, void *pd EINA_UNUSED)
+{
+ Eina_List *ret = NULL;
+
+ if (_access_action_callback_have(obj, ELM_ACCESS_ACTION_ACTIVATE))
+ ret = eina_list_append(ret, &("activate"));
+
+ return ret;
+}
+
#include "elm_access.eo.c"
-class Elm.Access (Elm.Widget)
+class Elm.Access (Elm.Widget, Elm_Interface_Atspi_Action)
{
eo_prefix: elm_obj_access;
data: null;
Evas.Object_Smart.add;
Elm.Widget.activate;
Elm.Widget.on_focus;
+ Elm_Interface_Atspi_Accessible.name.get;
+ Elm_Interface_Atspi_Accessible.description.get;
+ Elm_Interface_Atspi_Component.highlight_grab;
+ Elm_Interface_Atspi_Component.highlight_clear;
+ Elm_Interface_Atspi_Action.action_do;
+ Elm_Interface_Atspi_Action.name.get;
+ Elm_Interface_Atspi_Action.actions.get;
}
-
}
obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_IMAGE));
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_REDUNDANT_OBJECT));
return obj;
}
-class Elm.Color_Item(Elm.Widget_Item)
+class Elm.Color_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_color_item;
methods {
Eo.Base.destructor;
Elm.Widget_Item.access_register;
Elm.Widget_Item.signal_emit;
+ //TIZEN_ONLY(20150707) : improve colorselctor atspi support
+ Elm_Interface_Atspi_Accessible.state_set.get;
+ Elm_Interface_Atspi_Component.highlight_grab;
+ Elm_Interface_Atspi_Component.highlight_clear;
+ Elm_Interface_Atspi_Widget_Action.elm_actions.get;
+ //
}
}
#endif
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
+#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include <Elementary.h>
elm_object_signal_emit(VIEW(it), emission, source);
}
+// TIZEN ONLY : "elm,state,selected" signal is handled by _on_color_selected()
+static Eina_Bool
+_item_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
+{
+ Eina_List *l;
+ ELM_COLOR_ITEM_DATA_GET(obj, item);
+ ELM_COLORSELECTOR_DATA_GET(WIDGET(item), sd);
+
+ elm_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
+ elm_colorselector_color_set(WIDGET(item), item->color->r, item->color->g,
+ item->color->b, item->color->a);
+ evas_object_smart_callback_call(WIDGET(item), SIG_COLOR_ITEM_SELECTED,
+ EO_OBJ(item));
+
+ Eo *eo_temp_item = eina_list_data_get(sd->selected);
+ if (eo_temp_item && (eo_temp_item != EO_OBJ(item)))
+ {
+ ELM_COLOR_ITEM_DATA_GET(eo_temp_item, temp_item);
+ elm_object_signal_emit(VIEW(temp_item), "elm,state,unselected", "elm");
+ }
+
+ EINA_LIST_FOREACH(sd->items, l, eo_temp_item)
+ {
+ ELM_COLOR_ITEM_DATA_GET(eo_temp_item, temp_item);
+ if (item == temp_item) sd->selected = l;
+ }
+ sd->focused = ELM_COLORSELECTOR_PALETTE;
+
+ return EINA_TRUE;
+}
+//
+
EOLIAN static Eo *
_elm_color_item_eo_base_constructor(Eo *eo_item, Elm_Color_Item_Data *item)
{
// ACCESS
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
eo_do(eo_item, elm_wdg_item_access_register());
-
+ //TIZEN_ONLY(20150707) : improve colorselctor atspi support
+ eo_do(eo_item, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_RADIO_BUTTON));
+ ///
return eo_item;
}
return &atspi_actions[0];
}
+//TIZEN_ONLY(20150707) : improve colorselctor atspi support
+EOLIAN static Eina_List*
+_elm_colorselector_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Colorselector_Data *sd EINA_UNUSED)
+{
+ Eina_List *ret = NULL;
+
+ eo_do_super(obj, ELM_COLORSELECTOR_CLASS, ret = elm_interface_atspi_accessible_children_get());
+
+ // filter - out box contiainer
+ ret = eina_list_remove(ret, sd->palette_box);
+
+ // append items as colorselector children
+ ret = eina_list_merge(ret, eina_list_clone(sd->items));
+
+ return ret;
+}
+
+EOLIAN static Elm_Atspi_State_Set
+_elm_color_item_elm_interface_atspi_accessible_state_set_get(Eo *obj EINA_UNUSED, Elm_Color_Item_Data *sd EINA_UNUSED)
+{
+ Elm_Atspi_State_Set ret;
+
+ eo_do_super(obj, ELM_COLOR_ITEM_CLASS, ret = elm_interface_atspi_accessible_state_set_get());
+
+ Evas_Object *widget = WIDGET(sd);
+ if (!widget) return ret;
+
+ ELM_COLORSELECTOR_DATA_GET_OR_RETURN_VAL(widget, wd, ret);
+
+ if (eina_list_data_get(wd->selected) == obj)
+ STATE_TYPE_SET(ret, ELM_ATSPI_STATE_CHECKED);
+
+ return ret;
+}
+
+EOLIAN static Eina_Bool
+_elm_color_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Color_Item_Data *it)
+{
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
+
+ elm_object_accessibility_highlight_set(VIEW(it), EINA_TRUE);
+
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_color_item_elm_interface_atspi_component_highlight_clear(Eo *eo_it EINA_UNUSED, Elm_Color_Item_Data *it)
+{
+ elm_object_accessibility_highlight_set(VIEW(it), EINA_FALSE);
+
+ return EINA_TRUE;
+}
+
+EOLIAN static const Elm_Atspi_Action*
+_elm_color_item_elm_interface_atspi_widget_action_elm_actions_get(Eo *eo_it EINA_UNUSED, Elm_Color_Item_Data *it EINA_UNUSED)
+{
+ static Elm_Atspi_Action atspi_actions[] = {
+ { "activate", "activate", NULL, _item_action_activate},
+ { NULL, NULL, NULL, NULL }
+ };
+ return &atspi_actions[0];
+}
+/////
+
#include "elm_colorselector.eo.c"
#include "elm_color_item.eo.c"
Elm.Widget.event;
Elm.Layout.sizing_eval;
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
+ //TIZEN_ONLY(20150707) : improve colorselctor atspi support
+ Elm_Interface_Atspi_Accessible.children.get;
+ ///
}
events {
color,item,selected;
-class Elm.Ctxpopup_Item(Elm.Widget_Item)
+class Elm.Ctxpopup_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_ctxpopup_item;
methods {
Elm.Widget_Item.part_content.set;
Elm.Widget_Item.focus.set;
Elm.Widget_Item.focus.get;
+ Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
}
it_xpos = it_xpos - ((vw - sd->item_width) / 2);
it_ypos = it_ypos - ((vh - sd->item_height) / 2);
break;
+ // @tizen_feature
+ case ELM_GENGRID_ITEM_SCROLLTO_BOTTOM:
+ eo_do(WIDGET(it), elm_interface_scrollable_content_viewport_geometry_get
+ (NULL, NULL, &vw, &vh));
+ it_xpos = it_xpos - vw + sd->item_width;
+ it_ypos = it_ypos - vh + sd->item_height;
+ break;
+ ///
default:
vw = sd->item_width;
vh = sd->item_height;
}
EOLIAN char*
-_elm_gengrid_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
+_elm_gengrid_item_elm_interface_atspi_accessible_name_get(Eo *eo_it, Elm_Gen_Item *it)
{
char *ret;
Eina_Strbuf *buf;
+ eo_do_super(eo_it, ELM_GENGRID_ITEM_CLASS, ret = elm_interface_atspi_accessible_name_get());
+ if (ret) return ret;
+
buf = eina_strbuf_new();
if (it->itc->func.text_get)
Evas_Object *part;
part = edje_object_part_swallow_get(VIEW(it), key);
if (part && eo_isa(part, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
- ret = eina_list_append(ret, part);
+ {
+ ret = eina_list_append(ret, part);
+ eo_do(part, elm_interface_atspi_accessible_parent_set(eo_it));
+ }
}
}
return ret;
STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MANAGES_DESCENDANTS);
+ if (elm_gengrid_multi_select_get(obj))
+ STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MULTISELECTABLE);
+
return ret;
}
none = 0, [[No scrollto.]]
in = (1 << 0), [[To the nearest viewport.]]
top = (1 << 1), [[To the top of viewport.]]
- middle = (1 << 2) [[To the middle of viewport.]]
+ middle = (1 << 2), [[To the middle of viewport.]]
+ // @tizen_feature
+ bottom = (1 << 3) [[To the bottom of viewport.]]
+ //
}
enum Elm.Gengrid.Item.Field_Type
}
EOLIAN char*
-_elm_genlist_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED,
+_elm_genlist_item_elm_interface_atspi_accessible_name_get(Eo *eo_it,
Elm_Gen_Item *it)
{
char *ret;
Eina_Strbuf *buf;
+ eo_do_super(eo_it, ELM_GENLIST_ITEM_CLASS, ret = elm_interface_atspi_accessible_name_get());
+ if (ret) return ret;
+ Elm_Genlist_Item_Type genlist_item_type = elm_genlist_item_type_get(eo_it);
buf = eina_strbuf_new();
texts =
elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "texts"));
+ int texts_list_item_index = 0;
EINA_LIST_FREE(texts, key)
{
if (eina_strbuf_length_get(buf) > 0) eina_strbuf_append(buf, ", ");
eina_strbuf_append(buf, str_utf8);
free(str_utf8);
+
+ if((genlist_item_type & ELM_GENLIST_ITEM_TREE) && texts_list_item_index == 0)
+ {
+ eina_strbuf_append(buf, ", ");
+ eina_strbuf_append(buf, E_("group index"));
+ }
}
+
+ ++texts_list_item_index;
}
}
STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MANAGES_DESCENDANTS);
+ if (elm_genlist_multi_select_get(obj))
+ STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MULTISELECTABLE);
+
return ret;
}
#endif
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
+#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
+#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
#include <Elementary.h>
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_GLASS_PANE));
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_POPUP_MENU));
return obj;
}
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
+
+EOLIAN static Elm_Atspi_State_Set
+_elm_hover_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Hover_Data *pd EINA_UNUSED)
+{
+ Elm_Atspi_State_Set states;
+
+ eo_do_super(obj, MY_CLASS, states = elm_interface_atspi_accessible_state_set_get());
+
+ STATE_TYPE_SET(states, ELM_ATSPI_STATE_MODAL);
+
+ return states;
+}
+
+static Eina_Bool
+_action_dismiss(Evas_Object *obj, const char *params EINA_UNUSED)
+{
+ elm_hover_dismiss(obj);
+ return EINA_TRUE;
+}
+
+EOLIAN const Elm_Atspi_Action *
+_elm_hover_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Hover_Data *pd EINA_UNUSED)
+{
+ static Elm_Atspi_Action atspi_actions[] = {
+ { "dismiss", "dismiss", NULL, _action_dismiss },
+ { NULL, NULL, NULL, NULL}
+ };
+ return &atspi_actions[0];
+}
+
+EOLIAN static Eina_Bool
+_elm_hover_elm_interface_atspi_component_highlight_grab(Eo *obj, Elm_Hover_Data *sd)
+{
+ ELM_HOVER_PARTS_FOREACH
+ {
+ if (sd->subs[i].obj)
+ {
+ elm_object_accessibility_highlight_set(sd->subs[i].obj, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_HIGHLIGHTED, EINA_TRUE);
+ break;
+ }
+ }
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_hover_elm_interface_atspi_component_highlight_clear(Eo *obj, Elm_Hover_Data *sd)
+{
+ ELM_HOVER_PARTS_FOREACH
+ {
+ if (sd->subs[i].obj)
+ {
+ elm_object_accessibility_highlight_set(sd->subs[i].obj, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_HIGHLIGHTED, EINA_FALSE);
+ break;
+ }
+ }
+ return EINA_TRUE;
+}
+
#include "elm_hover.eo.c"
both [[ELM_HOVER_AXIS_BOTH -- both.]]
}
-class Elm.Hover (Elm.Layout, Evas.Clickable_Interface)
+class Elm.Hover (Elm.Layout, Evas.Clickable_Interface,
+ Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_hover;
methods {
Elm.Container.content_unset;
Elm.Layout.sizing_eval;
Elm.Layout.content_aliases.get;
+ Elm_Interface_Atspi_Accessible.state_set.get;
+ Elm_Interface_Atspi_Widget_Action.elm_actions.get;
+ Elm_Interface_Atspi_Component.highlight_grab;
+ Elm_Interface_Atspi_Component.highlight_clear;
}
events {
smart,changed;
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_IMAGE));
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_ICON));
return obj;
}
#endif
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
+#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#define ELM_WIDGET_ITEM_PROTECTED
#include <Elementary.h>
{
obj = eo_do_super_ret(obj, ELM_INDEX_ITEM_CLASS, obj, eo_constructor());
it->base = eo_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
-
+ //TIZEN_ONLY(20150716) : improve atspi support
+ eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_PUSH_BUTTON));
+ ///
return obj;
}
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_LIST));
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_SCROLL_BAR));
return obj;
}
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
+//TIZEN_ONLY(20150716) : improve atspi support
+static Eina_Bool
+_item_action_activate(Eo *obj, const char *params EINA_UNUSED EINA_UNUSED)
+{
+ elm_index_item_selected_set(obj, EINA_TRUE);
+ return EINA_FALSE;
+}
+
+EOLIAN static Eina_List*
+_elm_index_elm_interface_atspi_accessible_children_get(Eo *eo_it EINA_UNUSED, Elm_Index_Data *data)
+{
+ return eina_list_clone(data->items);
+}
+
+EOLIAN static char*
+_elm_index_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED, Elm_Index_Item_Data *data)
+{
+ return data->letter ? strdup(data->letter) : NULL;
+}
+
+EOLIAN static const Elm_Atspi_Action*
+_elm_index_item_elm_interface_atspi_widget_action_elm_actions_get(Eo *eo_it EINA_UNUSED, Elm_Index_Item_Data *data EINA_UNUSED)
+{
+ static Elm_Atspi_Action atspi_actions[] = {
+ { "activate", "activate", NULL, _item_action_activate},
+ { NULL, NULL, NULL, NULL }
+ };
+ return &atspi_actions[0];
+}
+///
+
#include "elm_index_item.eo.c"
#include "elm_index.eo.c"
Elm.Widget.access;
Elm.Widget.focus_next;
Elm.Layout.sizing_eval;
+ //TIZEN_ONLY(20150716) : improve atspi support
+ Elm_Interface_Atspi_Accessible.children.get;
+ ///
}
events {
changed;
-class Elm.Index_Item(Elm.Widget_Item)
+class Elm.Index_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action)
{
eo_prefix: elm_obj_index_item;
methods {
Eo.Base.constructor;
Eo.Base.destructor;
Elm.Widget_Item.access_register;
+ //TIZEN_ONLY(20150716) : improve atspi support
+ Elm_Interface_Atspi_Accessible.name.get;
+ Elm_Interface_Atspi_Widget_Action.elm_actions.get;
+ ///
}
}
added;
removed;
}
+ //TIZEN_ONLY(20150709) : atspi relations api
+ implements {
+ @virtual .relationship_append;
+ @virtual .relationship_remove;
+ }
+ //////////
}
/*
* Sets a particilar state type for given state set.
*/
-#define STATE_TYPE_SET(state_set, type) (state_set|= (1L << type))
+#define STATE_TYPE_SET(state_set, type) (state_set|= (1ULL << type))
/**
* Unsets a particilar state type for given state set.
*/
-#define STATE_TYPE_UNSET(state_set, type) (state_set &= ~(1L << type))
+#define STATE_TYPE_UNSET(state_set, type) (state_set &= ~(1ULL << type))
/**
* Gets value of a particilar state type for given state set.
*/
-#define STATE_TYPE_GET(state_set, type) (state_set & (1L << type))
+#define STATE_TYPE_GET(state_set, type) (state_set & (1ULL << type))
/**
eo_do(obj, children = elm_interface_atspi_accessible_children_get());
- EINA_LIST_FOREACH(children, l, child)
+ EINA_LIST_REVERSE_FOREACH(children, l, child)
{
Eina_Bool contains;
if (eo_isa(child, ELM_INTERFACE_ATSPI_COMPONENT_MIXIN))
{
+ //TIZEN_ONLY (20150709) imporove object at xy get function
+ Elm_Atspi_Role role;
+ eo_do(child, role = elm_interface_atspi_accessible_role_get());
+ if (role == ELM_ATSPI_ROLE_REDUNDANT_OBJECT)
+ continue;
+ //
eo_do(child, contains = elm_interface_atspi_component_contains(screen_coords, x, y));
if (contains)
{
VIEW(it) = edje_object_add(evas_object_evas_get(obj));
+ if (_elm_config->atspi_mode)
+ {
+ if (it->icon) eo_do(it->icon, elm_interface_atspi_accessible_parent_set(eo_it));
+ if (it->end) eo_do(it->end, elm_interface_atspi_accessible_parent_set(eo_it));
+ }
+
/* access */
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
_access_widget_item_register(it, EINA_TRUE);
#endif
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
+#define ELM_INTERFACE_ATSPI_VALUE_PROTECTED
#include <Elementary.h>
return EINA_FALSE;
}
+/////////////////////////////////////////////////////////
+//TIZENONLY (20150825) Add atspi value interface to progressbar
+
+EOLIAN static void
+_elm_progressbar_elm_interface_atspi_value_value_and_text_get(Eo *obj, Elm_Progressbar_Data *_pd, double *value, const char **text)
+{
+ if (value) *value = _pd->val;
+}
+
+//
+
EOLIAN static void
_elm_progressbar_class_constructor(Eo_Class *klass)
{
-class Elm.Progressbar (Elm.Layout)
+class Elm.Progressbar (Elm.Layout, Elm_Interface_Atspi_Value)
{
eo_prefix: elm_obj_progressbar;
methods {
Elm.Layout.text_aliases.get;
Elm.Layout.content_aliases.get;
Elm.Layout.sizing_eval;
+ Elm_Interface_Atspi_Value.value_and_text.get;
}
events {
changed;
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks),
- elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_SPIN_BUTTON));
+ elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_FILLER));
return obj;
}
_elm_spinner_smart_focus_next_enable = EINA_TRUE;
}
-EOLIAN static const Elm_Atspi_Action *
-_elm_spinner_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd EINA_UNUSED)
-{
- static Elm_Atspi_Action atspi_actions[] = {
- { "spin,left", "spin", "left", _key_action_spin},
- { "spin,right", "spin", "right", _key_action_spin},
- { "spin,up", "spin", "up", _key_action_spin},
- { "spin,down", "spin", "down", _key_action_spin},
- { "toggle", "toggle", NULL, _key_action_toggle},
- { NULL, NULL, NULL, NULL }
- };
- return &atspi_actions[0];
-}
-
// A11Y Accessibility
EOLIAN static void
Elm_Interface_Atspi_Value.value_and_text.set;
Elm_Interface_Atspi_Value.range.get;
Elm_Interface_Atspi_Value.increment.get;
- Elm_Interface_Atspi_Widget_Action.elm_actions.get;
}
events {
changed;
#endif
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
+#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#define ELM_WIDGET_ITEM_PROTECTED
static void
_item_unselect(Elm_Toolbar_Item_Data *item)
{
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style.
if ((!item) || (!item->selected)) return;
+ */
+ Eina_Bool selected;
+
+ if (!item) return;
+
+ selected = item->selected;
+ /* END */
ELM_TOOLBAR_DATA_GET(WIDGET(item), sd);
item->selected = EINA_FALSE;
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style.
sd->selected_item = NULL;
+ */
+ if (sd->selected_item == EO_OBJ(item))
+ sd->selected_item = NULL;
+ if (sd->auto_selected_last_item == EO_OBJ(item))
+ sd->auto_selected_last_item = NULL;
+ /* END */
elm_layout_signal_emit(VIEW(item), "elm,state,unselected", "elm");
if (item->icon)
elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm");
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style.
eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
if (_elm_config->atspi_mode)
elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ */
+ if (selected)
+ {
+ eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
+ if (_elm_config->atspi_mode)
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ }
+ /* END */
}
static void
Elm_Object_Item *eo_it2 = elm_toolbar_selected_item_get(WIDGET(it));
ELM_TOOLBAR_ITEM_DATA_GET(eo_it2, it2);
_item_unselect(it2);
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style. */
+ if (sd->auto_selected_last_item)
+ {
+ ELM_TOOLBAR_ITEM_DATA_GET(sd->auto_selected_last_item, it3);
+ _item_unselect(it3);
+ }
+ /* END */
it->selected = EINA_TRUE;
sd->selected_item = EO_OBJ(it);
elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
}
+/* Send order signals when item is added/deleted.
+ * If the given item is on deletion, item_on_deletion should be EINA_TRUE. */
+static void
+_elm_toolbar_item_order_signal_emit(Elm_Toolbar_Data *sd,
+ Elm_Toolbar_Item_Data *it,
+ Eina_List *prev_list,
+ Eina_Bool item_on_deletion)
+{
+ Elm_Toolbar_Item_Data *first_it = NULL, *last_it = NULL;
+ Evas_Object *first_it_view = NULL, *last_it_view = NULL;
+ Elm_Toolbar_Item_Data *prev_first_it = NULL, *prev_last_it = NULL;
+ Evas_Object *prev_first_it_view = NULL, *prev_last_it_view = NULL;
+ Eina_List *list;
+
+ list = evas_object_box_children_get(sd->bx);
+
+ if (!list) return;
+
+ if (prev_list)
+ {
+ prev_first_it_view = eina_list_data_get(prev_list);
+ prev_last_it_view = eina_list_data_get(eina_list_last(prev_list));
+ prev_first_it = evas_object_data_get(prev_first_it_view, "item");
+ prev_last_it = evas_object_data_get(prev_last_it_view, "item");
+ }
+
+ first_it_view = eina_list_data_get(list);
+ last_it_view = eina_list_data_get(eina_list_last(list));
+ first_it = evas_object_data_get(first_it_view, "item");
+ last_it = evas_object_data_get(last_it_view, "item");
+
+ if (prev_first_it)
+ {
+ if ((prev_first_it != first_it) && (prev_first_it != last_it))
+ elm_layout_signal_emit(VIEW(prev_first_it), "elm,order,default,item", "elm");
+ else if (prev_first_it == last_it)
+ elm_layout_signal_emit(VIEW(prev_first_it), "elm,order,last,item", "elm");
+ }
+
+ if (prev_last_it)
+ {
+ if ((prev_last_it != last_it) && (prev_last_it != first_it))
+ elm_layout_signal_emit(VIEW(prev_last_it), "elm,order,default,item", "elm");
+ else if (prev_last_it == first_it)
+ elm_layout_signal_emit(VIEW(prev_last_it), "elm,order,first,item", "elm");
+ }
+
+ if (it)
+ {
+ if (!item_on_deletion)
+ {
+ if (first_it == last_it)
+ {
+ elm_layout_signal_emit(VIEW(it), "elm,order,first,item", "elm");
+ elm_layout_signal_emit(VIEW(it), "elm,order,last,item", "elm");
+ }
+ else if (it == first_it)
+ {
+ elm_layout_signal_emit(VIEW(it), "elm,order,first,item", "elm");
+ }
+ else if (it == last_it)
+ {
+ elm_layout_signal_emit(VIEW(it), "elm,order,last,item", "elm");
+ }
+ }
+ else if (first_it != last_it)
+ {
+ if (it == first_it)
+ {
+ Eina_List *next_l = eina_list_next(list);
+ first_it_view = eina_list_data_get(next_l);
+ first_it = evas_object_data_get(first_it_view, "item");
+
+ elm_layout_signal_emit(first_it_view, "elm,order,first,item", "elm");
+ }
+ else if (it == last_it)
+ {
+ Eina_List *prev_l = eina_list_prev(eina_list_last(list));
+ last_it_view = eina_list_data_get(prev_l);
+ last_it = evas_object_data_get(last_it_view, "item");
+
+ elm_layout_signal_emit(last_it_view, "elm,order,last,item", "elm");
+ }
+ }
+ }
+
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style. */
+ if ((sd->selected_item != EO_OBJ(last_it)) &&
+ (sd->auto_selected_last_item != EO_OBJ(last_it)))
+ {
+ if (sd->auto_selected_last_item &&
+ sd->auto_selected_last_item != sd->selected_item)
+ {
+ ELM_TOOLBAR_ITEM_DATA_GET(sd->auto_selected_last_item, it2);
+
+ _item_unselect(it2);
+ }
+
+ sd->auto_selected_last_item = EO_OBJ(last_it);
+ }
+ /* END */
+
+ eina_list_free(list);
+}
+
static void
_item_del(Elm_Toolbar_Item_Data *it)
{
_item_unselect(it);
+ _elm_toolbar_item_order_signal_emit(sd, it, NULL, EINA_TRUE);
+
EINA_LIST_FREE(it->states, it_state)
{
if (it->icon == it_state->icon)
VIEW(it) = elm_layout_add(obj);
evas_object_data_set(VIEW(it), "item", it);
+ if (_elm_config->atspi_mode)
+ if (icon_obj) eo_do(icon_obj, elm_interface_atspi_accessible_parent_set(eo_it));
+
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
_access_widget_item_register(it);
{
Elm_Toolbar_Item_Data *it;
double scale;
+ Eina_List *prev_list;
it = _item_new(obj, icon, label, func, data);
if (!it) return NULL;
scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ prev_list = evas_object_box_children_get(sd->bx);
+
sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it));
evas_object_box_append(sd->bx, VIEW(it));
evas_object_show(VIEW(it));
_item_theme_hook(obj, it, scale, sd->icon_size);
sd->item_count++;
+ _elm_toolbar_item_order_signal_emit(sd, it, prev_list, EINA_FALSE);
+ eina_list_free(prev_list);
+
return EO_OBJ(it);
}
{
Elm_Toolbar_Item_Data *it;
double scale;
+ Eina_List *prev_list;
it = _item_new(obj, icon, label, func, data);
if (!it) return NULL;
scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ prev_list = evas_object_box_children_get(sd->bx);
+
sd->items = eina_inlist_prepend(sd->items, EINA_INLIST_GET(it));
evas_object_box_prepend(sd->bx, VIEW(it));
evas_object_show(VIEW(it));
_item_theme_hook(obj, it, scale, sd->icon_size);
sd->item_count++;
+ _elm_toolbar_item_order_signal_emit(sd, it, prev_list, EINA_FALSE);
+ eina_list_free(prev_list);
+
return EO_OBJ(it);
}
{
Elm_Toolbar_Item_Data *it;
double scale;
+ Eina_List *prev_list;
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_before, NULL);
ELM_TOOLBAR_ITEM_DATA_GET(eo_before, _before);
if (!it) return NULL;
scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ prev_list = evas_object_box_children_get(sd->bx);
+
sd->items = eina_inlist_prepend_relative
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(_before));
evas_object_box_insert_before(sd->bx, VIEW(it), VIEW(_before));
_item_theme_hook(obj, it, scale, sd->icon_size);
sd->item_count++;
+ _elm_toolbar_item_order_signal_emit(sd, it, prev_list, EINA_FALSE);
+ eina_list_free(prev_list);
+
return EO_OBJ(it);
}
{
Elm_Toolbar_Item_Data *it;
double scale;
+ Eina_List *prev_list;
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_after, NULL);
ELM_TOOLBAR_ITEM_DATA_GET(eo_after, _after);
if (!it) return NULL;
scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ prev_list = evas_object_box_children_get(sd->bx);
+
sd->items = eina_inlist_append_relative
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(_after));
evas_object_box_insert_after(sd->bx, VIEW(it), VIEW(_after));
_item_theme_hook(obj, it, scale, sd->icon_size);
sd->item_count++;
+ _elm_toolbar_item_order_signal_emit(sd, it, prev_list, EINA_FALSE);
+ eina_list_free(prev_list);
+
return EO_OBJ(it);
}
}
EOLIAN static char*
-_elm_toolbar_item_elm_interface_atspi_accessible_name_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item)
+_elm_toolbar_item_elm_interface_atspi_accessible_name_get(Eo *eo_item, Elm_Toolbar_Item_Data *item)
{
+ char *ret;
+ eo_do_super(eo_item, ELM_TOOLBAR_ITEM_CLASS, ret = elm_interface_atspi_accessible_name_get());
+ if (ret) return ret;
return item->label ? strdup(item->label) : NULL;
}
return ret;
}
+// TIZEN_ONLY(20150701): Add accessibility highlight for toolbar items
+
+EOLIAN static Eina_Bool
+_elm_toolbar_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Toolbar_Item_Data *it)
+{
+ elm_toolbar_item_show(eo_it, ELM_TOOLBAR_ITEM_SCROLLTO_IN);
+ elm_object_accessibility_highlight_set(VIEW(it), EINA_TRUE);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_toolbar_item_elm_interface_atspi_component_highlight_clear(Eo *eo_it, Elm_Toolbar_Item_Data *it)
+{
+ elm_object_accessibility_highlight_set(VIEW(it), EINA_FALSE);
+ return EINA_TRUE;
+}
+//
+
EOLIAN int
_elm_toolbar_elm_interface_atspi_selection_selected_children_count_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *pd)
{
Elm.Widget_Item.part_content_unset;
Elm_Interface_Atspi_Accessible.name.get;
Elm_Interface_Atspi_Accessible.state_set.get;
+ Elm_Interface_Atspi_Component.highlight_grab;
+ Elm_Interface_Atspi_Component.highlight_clear;
}
}
elm_interface_atspi_accessible_relationships_clear()
);
+ if (item->name)
+ eina_stringshare_del(item->name);
+
if (_elm_config->atspi_mode && item->widget)
elm_interface_atspi_accessible_children_changed_del_signal_emit(item->widget, eo_item);
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 _elm_util_mkup_to_text(ret);
}
+//TIZEN_ONLY(20150713) : add atspi name setter to widget_item
+EOLIAN void
+_elm_widget_item_elm_interface_atspi_accessible_name_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data* _pd EINA_UNUSED, char *name)
+{
+ if (_pd->name)
+ eina_stringshare_del(_pd->name);
+
+ _pd->name = eina_stringshare_add(name);
+}
+
+EOLIAN char*
+_elm_widget_item_elm_interface_atspi_accessible_name_get(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *_pd EINA_UNUSED)
+{
+ if (_pd->name)
+ return strdup(_pd->name);
+
+ return NULL;
+}
+///
+
//TIZEN_ONLY(20160329): widget: sort accessible children spatially (d940068e1f7cc5cfc6208245a1fb0e92f1a813d4)
static int _sort_vertically(const void *data1, const void *data2)
{
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"
Elm_Interface_Atspi_Accessible.children.get;
Elm_Interface_Atspi_Accessible.parent.get;
Elm_Interface_Atspi_Accessible.attributes.get;
+ //TIZEN_ONLY(20150709) : atspi relations api
+ Elm_Interface_Atspi_Accessible.relationship_append;
+ Elm_Interface_Atspi_Accessible.relationship_remove;
+ //
Elm_Interface_Atspi_Component.focus_grab;
//TIZEN_ONLY(20160329): atspi: implement HighlightGrab and HighlightClear methods (29e253e2f7ef3c632ac3a64c489bf569df407f30)
Elm_Interface_Atspi_Component.highlight_grab;
int role; /**< Accessibility role */
const char *description; /**< Accessibility description */
Eo *atspi_custom_parent; /**< Accessibility parent if different then parent_obj */
+ //TIZEN_ONLY(20150709) add relations atpi
+ Elm_Atspi_Relation_Set atspi_custom_relations; /**< Developer-defined accessiblity relations */
+ ///////////////////////////////////
/* this is a hook to be set on-the-fly on widgets. this is code
* handling the request of showing a specific region from an inner
/**< A11Y info */
const char *description;
int role;
+ //TIZEN_ONLY(20150709) add relations atpi
+ Elm_Atspi_Relation_Set atspi_custom_relations; /**< Developer-defined accessiblity relations */
+ ///////////////////////////////////
+ const char *name;
Eina_Bool disabled : 1;
Eina_Bool on_deletion : 1;
implements {
Eo.Base.constructor;
Eo.Base.destructor;
+ //TIZEN_ONLY(20150713) : add widget_item name setter
+ Elm_Interface_Atspi_Accessible.name.get;
+ Elm_Interface_Atspi_Accessible.name.set;
+ ///
Elm_Interface_Atspi_Accessible.state_set.get;
Elm_Interface_Atspi_Accessible.parent.get;
+ //TIZEN_ONLY(20150709) : atspi relations api
+ Elm_Interface_Atspi_Accessible.relationship_append;
+ Elm_Interface_Atspi_Accessible.relationship_remove;
+ //
Elm_Interface_Atspi_Component.extents.get;
Elm_Interface_Atspi_Component.extents.set;
Elm_Interface_Atspi_Component.alpha.get;
Eina_Inlist *items;
Elm_Toolbar_Item_Data *more_item;
Elm_Object_Item *selected_item; /**< a selected item by mouse click, return key, api, and etc. */
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style. */
+ Elm_Object_Item *auto_selected_last_item; /**< a automatically selected item by its order. */
+ /* END */
Elm_Object_Item *focused_item; /**< a focused item by keypad arrow or mouse. This is set to NULL if widget looses focus. */
Elm_Object_Item *last_focused_item; /**< This records the last focused item when widget looses focus. This is required to set the focus on last focused item when widgets gets focus. */
Elm_Toolbar_Item_Data *reorder_empty, *reorder_item;
Eina_Bool ch_aux_hint = EINA_FALSE;
Eina_List *aux_hints = NULL;
const char *profile;
+#ifdef HAVE_ELEMENTARY_WAYLAND
Conformant_Property property = CONFORMANT_DEFAULT; //TIZEN_ONLY(20160330): add processing properties of window
+#endif
if (!sd) return;
#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.
}