forked from enlightenment/efl
[access] enhancement - refine function name to _elm_access_auto_highlight_set from _elm_access_read_mode_set
This commit is contained in:
parent
c301e67153
commit
34de4d619d
|
@ -26,7 +26,7 @@ struct _Action_Info
|
|||
typedef struct _Action_Info Action_Info;
|
||||
|
||||
static Eina_Bool mouse_event_enable = EINA_TRUE;
|
||||
static Eina_Bool read_mode = EINA_FALSE;
|
||||
static Eina_Bool auto_highlight = EINA_FALSE;
|
||||
static Elm_Access_Action_Type action_by = ELM_ACCESS_ACTION_FIRST;
|
||||
|
||||
static Evas_Object * _elm_access_add(Evas_Object *parent);
|
||||
|
@ -396,17 +396,17 @@ _elm_access_mouse_event_enabled_set(Eina_Bool enabled)
|
|||
}
|
||||
|
||||
void
|
||||
_elm_access_read_mode_set(Eina_Bool enabled)
|
||||
_elm_access_auto_highlight_set(Eina_Bool enabled)
|
||||
{
|
||||
enabled = !!enabled;
|
||||
if (read_mode == enabled) return;
|
||||
read_mode = enabled;
|
||||
if (auto_highlight == enabled) return;
|
||||
auto_highlight = enabled;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_elm_access_read_mode_get()
|
||||
_elm_access_auto_highlight_get(void)
|
||||
{
|
||||
return read_mode;
|
||||
return auto_highlight;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -501,7 +501,7 @@ _access_highlight_next_get(Evas_Object *obj, Elm_Focus_Direction dir)
|
|||
}
|
||||
while (parent);
|
||||
|
||||
_elm_access_read_mode_set(EINA_TRUE);
|
||||
_elm_access_auto_highlight_set(EINA_TRUE);
|
||||
|
||||
if (dir == ELM_FOCUS_NEXT)
|
||||
type = ELM_ACCESS_ACTION_HIGHLIGHT_NEXT;
|
||||
|
@ -539,7 +539,7 @@ _access_highlight_next_get(Evas_Object *obj, Elm_Focus_Direction dir)
|
|||
|
||||
action_by = ELM_ACCESS_ACTION_FIRST;
|
||||
|
||||
_elm_access_read_mode_set(EINA_FALSE);
|
||||
_elm_access_auto_highlight_set(EINA_FALSE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ _elm_access_highlight_object_activate(Evas_Object *obj, Elm_Activate act)
|
|||
highlight = _access_highlight_object_get(obj);
|
||||
if (!highlight) return;
|
||||
|
||||
_elm_access_read_mode_set(EINA_FALSE);
|
||||
_elm_access_auto_highlight_set(EINA_FALSE);
|
||||
|
||||
if (!elm_object_focus_get(highlight))
|
||||
elm_object_focus_set(highlight, EINA_TRUE);
|
||||
|
@ -660,7 +660,7 @@ _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir)
|
|||
}
|
||||
while (parent);
|
||||
|
||||
_elm_access_read_mode_set(EINA_TRUE);
|
||||
_elm_access_auto_highlight_set(EINA_TRUE);
|
||||
|
||||
if (dir == ELM_FOCUS_NEXT)
|
||||
type = ELM_ACCESS_ACTION_HIGHLIGHT_NEXT;
|
||||
|
@ -693,7 +693,7 @@ _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir)
|
|||
|
||||
action_by = ELM_ACCESS_ACTION_FIRST;
|
||||
|
||||
_elm_access_read_mode_set(EINA_FALSE);
|
||||
_elm_access_auto_highlight_set(EINA_FALSE);
|
||||
}
|
||||
|
||||
EAPI char *
|
||||
|
@ -1295,9 +1295,9 @@ elm_access_action(Evas_Object *obj, const Elm_Access_Action_Type type, Elm_Acces
|
|||
evas = evas_object_evas_get(obj);
|
||||
if (!evas) return EINA_FALSE;
|
||||
|
||||
_elm_access_mouse_event_enabled_set(EINA_TRUE);
|
||||
|
||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
||||
|
||||
_elm_access_mouse_event_enabled_set(EINA_TRUE);
|
||||
evas_event_feed_mouse_move(evas, a->x, a->y, 0, NULL);
|
||||
_elm_access_mouse_event_enabled_set(EINA_FALSE);
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ EAPI Eo_Op ELM_WIDGET_BASE_ID = EO_NOOP;
|
|||
if (!sd) return
|
||||
|
||||
#define ELM_WIDGET_FOCUS_GET(obj) \
|
||||
((_elm_access_read_mode_get()) ? (elm_widget_highlight_get(obj)) : \
|
||||
(elm_widget_focus_get(obj)))
|
||||
((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \
|
||||
(elm_widget_focus_get(obj)))
|
||||
|
||||
typedef struct _Elm_Event_Cb_Data Elm_Event_Cb_Data;
|
||||
typedef struct _Elm_Translate_String_Data Elm_Translate_String_Data;
|
||||
|
@ -2019,8 +2019,14 @@ _elm_widget_focus_cycle(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
if (target)
|
||||
{
|
||||
/* access */
|
||||
if (_elm_config->access_mode && _elm_access_read_mode_get())
|
||||
if (_elm_config->access_mode)
|
||||
{
|
||||
/* highlight cycle does not steal a focus, only after window gets
|
||||
the ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE message,
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -501,11 +501,10 @@ struct _Elm_Access_Info
|
|||
|
||||
void _elm_access_shutdown();
|
||||
void _elm_access_mouse_event_enabled_set(Eina_Bool enabled);
|
||||
/* elm_widget_focus_list_next_get();, elm_widget_focus_next_get();
|
||||
and elm_widget_focus_cycle(); use _elm_access_read_mode to use
|
||||
focus chain */
|
||||
void _elm_access_read_mode_set(Eina_Bool enabled);
|
||||
Eina_Bool _elm_access_read_mode_get();
|
||||
|
||||
/* if auto_higlight is EINA_TRUE, it does not steal a focus, it just moves a highlight */
|
||||
void _elm_access_auto_highlight_set(Eina_Bool enabled);
|
||||
Eina_Bool _elm_access_auto_highlight_get(void);
|
||||
void _elm_access_widget_item_access_order_set(Elm_Widget_Item *item, Eina_List *objs);
|
||||
const Eina_List *_elm_access_widget_item_access_order_get(const Elm_Widget_Item *item);
|
||||
void _elm_access_widget_item_access_order_unset(Elm_Widget_Item *item);
|
||||
|
|
Loading…
Reference in New Issue