add promote/demote functions for genlist

SVN revision: 65599
This commit is contained in:
Mike Blumenkrantz 2011-11-25 20:27:27 +00:00
parent 92349c7b82
commit d37f2891dd
2 changed files with 32 additions and 0 deletions

View File

@ -19589,6 +19589,22 @@ extern "C" {
* @ingroup Genlist
*/
EAPI void elm_genlist_item_update(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1);
/**
* Promote an item to the top of the list
*
* @param it The item
*
* @ingroup Genlist
*/
EAPI void elm_genlist_item_promote(Elm_Gen_Item *it) EINA_ARG_NONNULL(1);
/**
* Demote an item to the end of the list
*
* @param it The item
*
* @ingroup Genlist
*/
EAPI void elm_genlist_item_demote(Elm_Gen_Item *it) EINA_ARG_NONNULL(1);
/**
* Update the item class of an item
*

View File

@ -3962,6 +3962,22 @@ elm_genlist_item_show(Elm_Gen_Item *it)
it->item->block->w, it->item->h);
}
EAPI void
elm_genlist_item_promote(Elm_Gen_Item *it)
{
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
if (it->delete_me) return;
_item_move_before(it, elm_gen_first_item_get(WIDGET(it)));
}
EAPI void
elm_genlist_item_demote(Elm_Gen_Item *it)
{
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
if (it->delete_me) return;
_item_move_after(it, elm_gen_last_item_get(WIDGET(it)));
}
EAPI void
elm_genlist_item_bring_in(Elm_Gen_Item *it)
{