Eina_List *elist;
Elm_Ctxpopup_Item *item;
int idx = 0;
+ Evas_Object *ao;
ELM_CTXPOPUP_DATA_GET(obj, sd);
ELM_WIDGET_DATA_GET(obj, wsd);
elm_layout_sizing_eval(obj);
elm_object_focus_set(obj, EINA_TRUE);
+
+ if (_elm_config->access_mode)
+ {
+ ao = _access_object_get(obj, ACCESS_OUTLINE_PART);
+ _elm_access_highlight_set(ao);
+ }
}
static void
_prev_page_focus_recover(Elm_Naviframe_Item *it)
{
Evas_Object *newest;
- unsigned int order;
+ unsigned int order = 0;
+
+ ELM_WIDGET_DATA_GET(VIEW(it), sd);
+ order = sd->focus_order;
newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
if (newest)
+ {
elm_object_focus_set(newest, EINA_TRUE);
+ _elm_access_highlight_set(newest);
+ }
else
{
if (_elm_config->access_mode)
l = eina_list_append(l, VIEW(top_it));
/* access */
- if (_elm_config->access_mode && _elm_access_auto_highlight_get())
+ if (top_it->title_visible &&
+ _elm_config->access_mode &&
+ _elm_access_auto_highlight_get())
{
+ if (elm_widget_tree_unfocusable_get(VIEW(top_it))) return EINA_FALSE;
+
ao = ((Elm_Widget_Item *)top_it)->access_obj;
if (ao &&
!elm_widget_highlight_get(ao) &&
ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next);
eina_list_free(l);
- if (!ret && _elm_config->access_mode && _elm_access_auto_highlight_get())
+ if (!ret &&
+ top_it->title_visible &&
+ _elm_config->access_mode &&
+ _elm_access_auto_highlight_get())
{
+ if (elm_widget_tree_unfocusable_get(VIEW(top_it))) return EINA_FALSE;
+
ao = ((Elm_Widget_Item *)top_it)->access_obj;
if (ao && !elm_widget_highlight_get(ao))
{
return ao;
}
+static void
+_access_highlight_set(const Evas_Object *obj)
+{
+ Evas_Object *ao;
+
+ ao = _access_object_get(obj, ACCESS_BASE_PART);
+ if (!ao) ao = _access_object_get(obj, ACCESS_TITLE_PART);
+ if (!ao) ao = _access_object_get(obj, ACCESS_BODY_PART);
+ if (!ao) ao = elm_widget_focused_object_get(obj);
+ if (ao) _elm_access_highlight_set(ao);
+}
static void
_on_show(void *data __UNUSED__,
elm_object_content_set(sd->notify, obj);
elm_object_focus_set(obj, EINA_TRUE);
+ if (_elm_config->access_mode) _access_highlight_set(obj);
}
static void
ao = _access_object_get(obj, ACCESS_BASE_PART);
if (ao && sd->button_count)
- _elm_access_edje_object_part_object_unregister
+ {
+ _elm_access_edje_object_part_object_unregister
(obj, ELM_WIDGET_DATA(sd)->resize_obj, ACCESS_BASE_PART);
+
+ /* there is a case to set button, after evas_object_show(popup); */
+ if (evas_object_visible_get(obj)) _access_highlight_set(obj);
+ }
}
snprintf(buf, sizeof(buf), "buttons%u", sd->button_count);
}
}
+EAPI void
+_elm_access_highlight_object_read(const Evas_Object *obj)
+{
+ Elm_Access_Info *ac;
+ Evas_Object *ho;
+
+ if (!obj) return;
+
+ ho = _access_highlight_object_get(obj);
+ if (!ho) return;
+
+ ac = evas_object_data_get(ho, "_elm_access");
+ if (!ac) return;
+
+ if (ac->highlight_read_job)
+ {
+ ecore_job_del(ac->highlight_read_job);
+ ac->highlight_read_job = NULL;
+ }
+
+ /* use ecore_job_add(); here, an object could have a highlight even though
+ its text is not yet translated in case of the naviframe title */
+ ac->highlight_read_job = ecore_job_add(_access_highlight_read_job, ho);
+}
+
EAPI Elm_Access_Info *
_elm_access_object_get(const Evas_Object *obj)
{
{
elm_object_focus_set(newest, EINA_FALSE);
elm_object_focus_set(newest, EINA_TRUE);
+ _elm_access_highlight_set(newest);
}
}
}
target will steal focus, or focus its own job. */
if (!_elm_access_auto_highlight_get())
elm_widget_focus_steal(target);
-
- _elm_access_highlight_set(target);
- _elm_widget_focus_region_show(target);
+ else
+ {
+ _elm_access_highlight_set(target);
+ _elm_widget_focus_region_show(target);
+ }
}
else elm_widget_focus_steal(target);
}
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);
EAPI char *_elm_access_text_get(const Elm_Access_Info *ac, int type, const Evas_Object *obj); /* this is ok it actually returns a strduped string - it's meant to! */
EAPI void _elm_access_read(Elm_Access_Info *ac, int type, const Evas_Object *obj);
+EAPI void _elm_access_highlight_object_read(const Evas_Object *obj);
EAPI void _elm_access_say(const char *txt);
EAPI Elm_Access_Info *_elm_access_object_get(const Evas_Object *obj);
EAPI void _elm_access_object_hilight(Evas_Object *obj);
Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
unsigned int order = 0;
+ Evas_Object *access_highlight, *highlight_target;
EINA_SAFETY_ON_NULL_RETURN(sd);
edje_object_signal_emit(sd->frame_obj, "elm,action,focus", "elm");
}
+ /* access */
+ if (_elm_config->access_mode)
+ {
+ access_highlight = evas_object_name_find(evas_object_evas_get(obj),
+ "_elm_access_disp");
+ if (!access_highlight) return;
+
+ evas_object_show(access_highlight);
+ _elm_access_highlight_object_read(obj);
+ }
/* do nothing */
/* else if (sd->img_obj) */
/* { */
{
Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee);
Evas_Object *obj;
+ Evas_Object *access_highlight;
EINA_SAFETY_ON_NULL_RETURN(sd);
}
/* access */
- _elm_access_object_hilight_disable(evas_object_evas_get(obj));
+ if (_elm_config->access_mode)
+ {
+ access_highlight = evas_object_name_find(evas_object_evas_get(obj),
+ "_elm_access_disp");
+ if (access_highlight) evas_object_hide(access_highlight);
+ }
/* do nothing */
/* if (sd->img_obj) */