Enlightenment CVS committal Author : rephorm Project : e17 Module : libs/esmart
Dir : e17/libs/esmart/src/lib/esmart_container Modified Files: Esmart_Container.h esmart_container.c Log Message: add esmart_container_scroll_percentage() this makes linking (e.g) edje draggies to container scroll much easier. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_container/Esmart_Container.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- Esmart_Container.h 10 Nov 2004 15:22:22 -0000 1.4 +++ Esmart_Container.h 8 Jan 2005 15:48:03 -0000 1.5 @@ -99,6 +99,8 @@ void esmart_container_scroll_offset_set(Evas_Object *container, int val); int esmart_container_scroll_offset_get(Evas_Object *container); +void esmart_container_scroll_percent(Evas_Object *container, double percent); +void esmart_container_scroll_to(Evas_Object *container, Evas_Object *element); /* callbacks */ void esmart_container_callback_order_change_set(Evas_Object *obj, @@ -110,7 +112,6 @@ int esmart_container_layout_plugin_set(Evas_Object *container, const char *name); -void esmart_container_scroll_to(Evas_Object *container, Evas_Object *element); #ifdef __cplusplus } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_container/esmart_container.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- esmart_container.c 8 Jan 2005 15:08:00 -0000 1.5 +++ esmart_container.c 8 Jan 2005 15:48:03 -0000 1.6 @@ -322,6 +322,22 @@ } void +esmart_container_scroll_percent(Evas_Object *container, double percent) +{ + Container *cont; + double length, size; + + cont = _container_fetch(container); + if (!cont) return; + + + length = esmart_container_elements_length_get(container); + size = cont->direction ? cont->h : cont->w; + if (length > size) + esmart_container_scroll_offset_set(container, -percent * (length - size)); +} + +void esmart_container_scroll_to(Evas_Object *container, Evas_Object *element) { Container *cont; ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs