add flowlayout functions for getting prev/next items

SVN revision: 72928
devs/princeamd/enlightenment-0.17-elive
Mike Blumenkrantz 11 years ago
parent 23c3f87508
commit 66ed2b4f53
  1. 30
      src/bin/e_flowlayout.c
  2. 2
      src/bin/e_flowlayout.h

@ -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)
{

@ -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);

Loading…
Cancel
Save