diff --git a/src/bin/e_flowlayout.c b/src/bin/e_flowlayout.c index ffbb78288..cfe218e42 100644 --- a/src/bin/e_flowlayout.c +++ b/src/bin/e_flowlayout.c @@ -326,6 +326,36 @@ e_flowlayout_pack_object_last(Evas_Object *obj) return eina_list_data_get(eina_list_last(sd->items)); } +EAPI Evas_Object * +e_flowlayout_pack_object_prev(Evas_Object *obj, Evas_Object *child) +{ + E_Smart_Data *sd; + Evas_Object *o; + Eina_List *l; + + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); + sd = evas_object_smart_data_get(obj); + if (!sd) return NULL; + EINA_LIST_FOREACH(sd->items, l, o) + if (o == child) return eina_list_data_get(l->prev); + return NULL; +} + +EAPI Evas_Object * +e_flowlayout_pack_object_next(Evas_Object *obj, Evas_Object *child) +{ + E_Smart_Data *sd; + Evas_Object *o; + Eina_List *l; + + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL); + sd = evas_object_smart_data_get(obj); + if (!sd) return NULL; + EINA_LIST_FOREACH(sd->items, l, o) + if (o == child) return eina_list_data_get(l->next); + return NULL; +} + EAPI void e_flowlayout_pack_options_set(Evas_Object *obj, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h) { diff --git a/src/bin/e_flowlayout.h b/src/bin/e_flowlayout.h index a36cdcf02..a49e35b87 100644 --- a/src/bin/e_flowlayout.h +++ b/src/bin/e_flowlayout.h @@ -21,6 +21,8 @@ EAPI int e_flowlayout_pack_count_get (Evas_Object *obj); EAPI Evas_Object *e_flowlayout_pack_object_nth (Evas_Object *obj, int n); EAPI Evas_Object *e_flowlayout_pack_object_first (Evas_Object *obj); EAPI Evas_Object *e_flowlayout_pack_object_last (Evas_Object *obj); +EAPI Evas_Object *e_flowlayout_pack_object_prev(Evas_Object *obj, Evas_Object *child); +EAPI Evas_Object *e_flowlayout_pack_object_next(Evas_Object *obj, Evas_Object *child); EAPI void e_flowlayout_pack_options_set (Evas_Object *obj, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h); EAPI void e_flowlayout_unpack (Evas_Object *obj); EAPI void e_flowlayout_size_min_get (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);