Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : proto
Dir : e17/proto/esmart/src/thumb
Modified Files:
E_Thumb.c
Log Message:
added e_thumb_freshen which will check to see if your e_thumb object is
still valid(i.e. hasn't been saved over or modified sicne it was created)
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/esmart/src/thumb/E_Thumb.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- E_Thumb.c 3 Feb 2004 19:15:56 -0000 1.13
+++ E_Thumb.c 29 Feb 2004 22:22:13 -0000 1.14
@@ -176,6 +176,47 @@
return (result);
}
+int
+e_thumb_freshen (Evas_Object * o)
+{
+ int result = EPSILON_FAIL;
+ if (o)
+ {
+ E_Thumb *e = NULL;
+ if ((e = (E_Thumb *) evas_object_smart_data_get (o)))
+ {
+ if (epsilon_exists (e->e) == EPSILON_FAIL)
+ {
+ if (e->image)
+ evas_object_del (e->image);
+ if (epsilon_exists (e->e) == EPSILON_FAIL)
+ {
+ if (epsilon_generate (e->e) == EPSILON_OK)
+ {
+ result = EPSILON_OK;
+ evas_image_cache_flush (evas_object_evas_get (o));
+ e->image =
+ evas_object_image_add (evas_object_evas_get (o));
+ evas_object_image_file_set (e->image,
+ epsilon_thumb_file_get (e->
+ e),
+ NULL);
+ if (!evas_object_image_load_error_get (e->image))
+ {
+ evas_object_image_size_get (e->image, &e->tw,
+ &e->th);
+ evas_object_repeat_events_set (e->image, 1);
+ evas_object_show (e->image);
+ evas_object_resize (o, e->w, e->h);
+ }
+ }
+ }
+ }
+ }
+ }
+ return (result);
+}
+
/*==========================================================================
* Smart Object Functions
*========================================================================*/
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs