forked from enlightenment/efl
[access] convey(relay) focus(highlight) to the object which is swallowed by Elm_Object_Item.
SVN revision: 83742
This commit is contained in:
parent
70a58db659
commit
166f5ae570
|
@ -265,30 +265,87 @@ _access_highlight_object_get(Evas_Object *obj)
|
|||
return ho;
|
||||
}
|
||||
|
||||
void _elm_access_mouse_event_enabled_set(Eina_Bool enabled)
|
||||
void
|
||||
_elm_access_mouse_event_enabled_set(Eina_Bool enabled)
|
||||
{
|
||||
enabled = !!enabled;
|
||||
if (mouse_event_enable == enabled) return;
|
||||
mouse_event_enable = enabled;
|
||||
}
|
||||
|
||||
void _elm_access_read_mode_set(Eina_Bool enabled)
|
||||
void
|
||||
_elm_access_read_mode_set(Eina_Bool enabled)
|
||||
{
|
||||
enabled = !!enabled;
|
||||
if (read_mode == enabled) return;
|
||||
read_mode = enabled;
|
||||
}
|
||||
|
||||
Eina_Bool _elm_access_read_mode_get()
|
||||
Eina_Bool
|
||||
_elm_access_read_mode_get()
|
||||
{
|
||||
return read_mode;
|
||||
}
|
||||
|
||||
void _elm_access_shutdown()
|
||||
void
|
||||
_elm_access_shutdown()
|
||||
{
|
||||
_access_shutdown();
|
||||
}
|
||||
|
||||
static void
|
||||
_access_order_del_cb(void *data,
|
||||
Evas *e __UNUSED__,
|
||||
Evas_Object *obj,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Elm_Widget_Item *item = data;
|
||||
|
||||
item->access_order = eina_list_remove(item->access_order, obj);
|
||||
}
|
||||
|
||||
void
|
||||
_elm_access_widget_item_access_order_set(Elm_Widget_Item *item,
|
||||
Eina_List *objs)
|
||||
{
|
||||
Eina_List *l;
|
||||
Evas_Object *o;
|
||||
|
||||
if (!item) return;
|
||||
|
||||
_elm_access_widget_item_access_order_unset(item);
|
||||
|
||||
EINA_LIST_FOREACH(objs, l, o)
|
||||
{
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_DEL,
|
||||
_access_order_del_cb, item);
|
||||
}
|
||||
|
||||
item->access_order = objs;
|
||||
}
|
||||
|
||||
const Eina_List *
|
||||
_elm_access_widget_item_access_order_get(const Elm_Widget_Item *item)
|
||||
{
|
||||
if (!item) return NULL;
|
||||
return item->access_order;
|
||||
}
|
||||
|
||||
void
|
||||
_elm_access_widget_item_access_order_unset(Elm_Widget_Item *item)
|
||||
{
|
||||
Eina_List *l, *l_next;
|
||||
Evas_Object *o;
|
||||
|
||||
if (!item) return;
|
||||
|
||||
EINA_LIST_FOREACH_SAFE(item->access_order, l, l_next, o)
|
||||
{
|
||||
evas_object_event_callback_del_full
|
||||
(o, EVAS_CALLBACK_DEL, _access_order_del_cb, item);
|
||||
item->access_order = eina_list_remove_list(item->access_order, l);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------//
|
||||
EAPI void
|
||||
_elm_access_highlight_set(Evas_Object* obj)
|
||||
|
|
|
@ -2572,6 +2572,13 @@ _elm_genlist_smart_focus_next(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
if (ELM_RECTS_INTERSECT
|
||||
(x + (w / 2), y + (h / 2), 0, 0, sx, sy, sw, sh))
|
||||
items = eina_list_append(items, it->base.access_obj);
|
||||
|
||||
if (!it->base.access_order) continue;
|
||||
|
||||
Eina_List *subl;
|
||||
Evas_Object *subo;
|
||||
EINA_LIST_FOREACH(it->base.access_order, subl, subo)
|
||||
items = eina_list_append(items, subo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1561,6 +1561,24 @@ elm_object_item_access_object_get(const Elm_Object_Item *item)
|
|||
return ((Elm_Widget_Item *)item)->access_obj;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs)
|
||||
{
|
||||
_elm_access_widget_item_access_order_set((Elm_Widget_Item *)item, objs);
|
||||
}
|
||||
|
||||
EAPI Eina_List *
|
||||
elm_object_item_access_order_get(const Elm_Object_Item *item)
|
||||
{
|
||||
_elm_access_widget_item_access_order_get((Elm_Widget_Item *)item);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_object_item_access_order_unset(Elm_Object_Item *item)
|
||||
{
|
||||
_elm_access_widget_item_access_order_unset((Elm_Widget_Item *)item);
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
elm_object_item_data_get(const Elm_Object_Item *it)
|
||||
{
|
||||
|
|
|
@ -140,6 +140,38 @@ EAPI void elm_object_item_access_unregister(Elm_Object_I
|
|||
*/
|
||||
EAPI Evas_Object *elm_object_item_access_object_get(const Elm_Object_Item *item);
|
||||
|
||||
/**
|
||||
* @brief Set highlight order
|
||||
* @since 1.8
|
||||
*
|
||||
* @param item The container object item
|
||||
* @param objs Order of objects to pass highlight
|
||||
*
|
||||
* @ingroup General
|
||||
*/
|
||||
EAPI void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs);
|
||||
|
||||
/**
|
||||
* @brief Get highlight order
|
||||
* @since 1.8
|
||||
*
|
||||
* @param item The container object item
|
||||
* @return Order of objects to pass highlight
|
||||
*
|
||||
* @ingroup General
|
||||
*/
|
||||
EAPI Eina_List *elm_object_item_access_order_getconst (const Elm_Object_Item *item);
|
||||
|
||||
/**
|
||||
* @brief Unset highlight order
|
||||
* @since 1.8
|
||||
*
|
||||
* @param item The container object item
|
||||
*
|
||||
* @ingroup General
|
||||
*/
|
||||
EAPI void elm_object_item_access_order_unset(Elm_Object_Item *item);
|
||||
|
||||
/**
|
||||
* Get the data associated with an object item
|
||||
* @param it The Elementary object item
|
||||
|
|
|
@ -494,6 +494,10 @@ void _elm_access_mouse_event_enabled_set(Eina_Bool enabled);
|
|||
focus chain */
|
||||
void _elm_access_read_mode_set(Eina_Bool enabled);
|
||||
Eina_Bool _elm_access_read_mode_get();
|
||||
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);
|
||||
|
||||
EAPI void _elm_access_clear(Elm_Access_Info *ac);
|
||||
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
|
||||
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);
|
||||
|
@ -550,6 +554,7 @@ struct _Elm_Widget_Item
|
|||
Elm_Widget_Disable_Cb disable_func;
|
||||
Evas_Object *access_obj;
|
||||
const char *access_info;
|
||||
Eina_List *access_order;
|
||||
|
||||
Eina_Bool disabled : 1;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue