above and below get

SVN revision: 47435
This commit is contained in:
Tiago Rezende Campos Falcao 2010-03-24 19:21:03 +00:00
parent 3d27a7b9e4
commit 6556fa5273
2 changed files with 44 additions and 0 deletions

View File

@ -596,6 +596,20 @@ edje_edit_part_exist(
const char *part ///< The name of the part
);
/** Get the name of part above this one.*/
EAPI const char*
edje_edit_part_above_get(
Evas_Object *obj, ///< The edje object
const char *part ///< The name of the part of reference
);
/** Get the name of part below this one.*/
EAPI const char*
edje_edit_part_below_get(
Evas_Object *obj, ///< The edje object
const char *part ///< The name of the part of reference
);
/**Move the given part below the previous one.*/
EAPI Eina_Bool ///@return 1 on success, 0 on failure
edje_edit_part_restack_below(

View File

@ -1956,6 +1956,36 @@ edje_edit_part_exist(Evas_Object *obj, const char *part)
return 1;
}
EAPI const char*
edje_edit_part_above_get(Evas_Object *obj, const char* part)
{
Edje_Part_Collection *group;
Edje_Real_Part *prev;
GET_RP_OR_RETURN(0);
if (rp->part->id < 1) return NULL;
prev = ed->table_parts[(rp->part->id - 1) % ed->table_parts_size];
return eina_stringshare_add(prev->part->name);
}
EAPI const char*
edje_edit_part_below_get(Evas_Object *obj, const char* part)
{
Edje_Part_Collection *group;
Edje_Real_Part *next;
GET_RP_OR_RETURN(0);
if (rp->part->id >= ed->table_parts_size - 1) return 0;
next = ed->table_parts[(rp->part->id + 1) % ed->table_parts_size];
return eina_stringshare_add(next->part->name);
}
EAPI Eina_Bool
edje_edit_part_restack_below(Evas_Object *obj, const char* part)
{