forked from enlightenment/efl
elc_multibuttonentry: role of MBE item, MBE updated, and state_set_get API added.
Summary: Reason for role change: MBE items do not act like push buttons, they need to maintain their status and at a time only one item can be selected, they act like radio buttons. Role change of MBE from entry to panel, because MBE is just a container and entry is one of the children, when entry gets access frame, it will work as how entry works, but making MBE role as entry does not work as expected and also MBE should not receive highlight as a whole but only its children should receive highlight one more reason why MBE role cannot be entry. state_set_get API added to get items state. Test Plan: When atspi mode is enabled the access frame has to navigate directly on item and not on MBE as a whole and state has to be read out Reviewers: kimcinoo, cedric Reviewed By: cedric Subscribers: cedric, govi, rajeshps, jpeg Differential Revision: https://phab.enlightenment.org/D4925 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
a784e4ac42
commit
da5ba14664
|
@ -772,7 +772,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
|
|||
return NULL;
|
||||
WIDGET_ITEM_DATA_SET(eo_item, data);
|
||||
|
||||
elm_interface_atspi_accessible_role_set(eo_item, ELM_ATSPI_ROLE_PUSH_BUTTON);
|
||||
elm_interface_atspi_accessible_role_set(eo_item, ELM_ATSPI_ROLE_RADIO_BUTTON);
|
||||
|
||||
ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
|
||||
VIEW(item) = elm_layout_add(obj);
|
||||
|
@ -1758,7 +1758,7 @@ _elm_multibuttonentry_efl_object_constructor(Eo *obj, Elm_Multibuttonentry_Data
|
|||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||
elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_ENTRY);
|
||||
elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_PANEL);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
@ -2067,6 +2067,24 @@ _elm_multibuttonentry_item_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_
|
|||
return txt;
|
||||
}
|
||||
|
||||
EOLIAN static Elm_Atspi_State_Set
|
||||
_elm_multibuttonentry_item_elm_interface_atspi_accessible_state_set_get(Eo *eo_it, Elm_Multibuttonentry_Item_Data *sd EINA_UNUSED)
|
||||
{
|
||||
Elm_Atspi_State_Set ret;
|
||||
Eina_Bool sel;
|
||||
|
||||
ret = elm_interface_atspi_accessible_state_set_get(efl_super(eo_it, ELM_MULTIBUTTONENTRY_ITEM_CLASS));
|
||||
|
||||
sel = elm_obj_multibuttonentry_item_selected_get(eo_it);
|
||||
|
||||
STATE_TYPE_SET(ret, ELM_ATSPI_STATE_EDITABLE);
|
||||
|
||||
if (sel)
|
||||
STATE_TYPE_SET(ret, ELM_ATSPI_STATE_CHECKED);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_activate(Eo *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
|
|
|
@ -31,6 +31,7 @@ class Elm.Multibuttonentry.Item(Elm.Widget.Item,
|
|||
Elm.Widget.Item.part_text { get; set; }
|
||||
Elm.Widget.Item.disable;
|
||||
Elm.Interface.Atspi_Accessible.name { get; }
|
||||
Elm.Interface.Atspi_Accessible.state_set { get; }
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue