forked from enlightenment/efl
edje: Edje_Edit - add edje_edit_part_items_list_get.
Summary: Get the list of names of all part items in the given edje. @feature Reviewers: cedric, raster, seoz, Hermet Reviewed By: cedric CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D1018 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
e8cebd6ce7
commit
fe734165cb
|
@ -1563,6 +1563,14 @@ EAPI Eina_Bool edje_edit_part_drag_threshold_set(Evas_Object *obj, const char *p
|
|||
*/
|
||||
EAPI Eina_Bool edje_edit_part_item_append(Evas_Object *obj, const char *part, const char *item_name, const char *source_group);
|
||||
|
||||
/** Get the list of all part items in the given edje.
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
*
|
||||
* @return A List containing all part items names found in the edje file.
|
||||
*/
|
||||
EAPI Eina_List * edje_edit_part_items_list_get(Evas_Object *obj, const char *part);
|
||||
|
||||
//@}
|
||||
/******************************************************************************/
|
||||
/************************** STATES API ************************************/
|
||||
|
|
|
@ -3703,6 +3703,27 @@ edje_edit_part_item_append(Evas_Object *obj, const char *part, const char *item_
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_List *
|
||||
edje_edit_part_items_list_get(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Edje_Part *ep;
|
||||
unsigned int i;
|
||||
Eina_List *items_list = NULL;
|
||||
GET_RP_OR_RETURN(NULL);
|
||||
/* There is only Box and Table is allowed. */
|
||||
if ((rp->part->type != EDJE_PART_TYPE_BOX) &&
|
||||
(rp->part->type != EDJE_PART_TYPE_TABLE))
|
||||
return NULL;
|
||||
ep = rp->part;
|
||||
if (!ed->file) return NULL;
|
||||
|
||||
for (i = 0; i < ep->items_count; ++i)
|
||||
items_list = eina_list_append(items_list,
|
||||
eina_stringshare_add(ep->items[i]->name));
|
||||
|
||||
return items_list;
|
||||
}
|
||||
|
||||
/*********************/
|
||||
/* PART STATES API */
|
||||
/*********************/
|
||||
|
|
Loading…
Reference in New Issue