elm_gengrid: mark cursor_engine_only in data and update state when realized

@fix
This commit is contained in:
Jaeun Choi 2015-04-14 19:20:16 +09:00
parent a3f95d2632
commit e517f5e660
2 changed files with 14 additions and 4 deletions

View File

@ -66,6 +66,7 @@ struct Elm_Gen_Item
Eina_Bool decorate_it_set : 1; /**< item uses style mode for highlight/select */
Eina_Bool flipped : 1; /**< a flag that shows the flip status of the item. */
Eina_Bool has_contents : 1; /**< content objs have or previously did exist (size calcs) */
Eina_Bool cursor_engine_only : 1;
};
#endif

View File

@ -1014,6 +1014,9 @@ _item_realize(Elm_Gen_Item *it)
if (it->mouse_cursor)
eo_do(eo_it, elm_wdg_item_cursor_set(it->mouse_cursor));
if (it->cursor_engine_only)
eo_do(eo_it, elm_wdg_item_cursor_engine_only_set(it->cursor_engine_only));
if (eo_it == sd->focused_item)
{
const char *focus_raise;
@ -4430,17 +4433,23 @@ elm_gengrid_item_cursor_style_get(const Elm_Object_Item *it)
}
EAPI void
elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *it,
elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *eo_it,
Eina_Bool engine_only)
{
eo_do(it, elm_wdg_item_cursor_engine_only_set(engine_only));
ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
it->cursor_engine_only = engine_only;
if (it->realized)
eo_do(eo_it, elm_wdg_item_cursor_engine_only_set(engine_only));
}
EAPI Eina_Bool
elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *it)
elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *eo_it)
{
ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
Eina_Bool ret;
return eo_do_ret(it, ret, elm_wdg_item_cursor_engine_only_get());
if (it->realized)
return eo_do_ret(eo_it, ret, elm_wdg_item_cursor_engine_only_get());
else return it->cursor_engine_only;
}
EAPI void