Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : proto

Dir     : e17/proto/esmart/src/thumb


Modified Files:
        E_Thumb.c E_Thumb.h 


Log Message:
e_thumb_format_get - returns the image type of image we're thumbing

I needed this info in entice

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/esmart/src/thumb/E_Thumb.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- E_Thumb.c   27 Sep 2003 04:58:25 -0000      1.5
+++ E_Thumb.c   14 Oct 2003 18:12:57 -0000      1.6
@@ -143,6 +143,7 @@
              evas_object_image_alpha_set (result, 1);
              e->file.w = imlib_image_get_width ();
              e->file.h = imlib_image_get_height ();
+             e->format = strdup(imlib_image_format());
              evas_object_image_size_set (result, e->file.w, e->file.h);
 
              evas_object_image_data_copy_set (result,
@@ -155,6 +156,18 @@
   return (result);
 }
 
+const char *
+e_thumb_format_get(Evas_Object *o)
+{
+  char *result = NULL;
+  if (o)
+    {
+      E_Thumb *e = NULL;
+      if ((e = (E_Thumb *) evas_object_smart_data_get (o)))
+           result = e->format;
+    }
+    return(result);
+}
 /*==========================================================================
  * Smart Object Functions
  *========================================================================*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/esmart/src/thumb/E_Thumb.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- E_Thumb.h   22 Sep 2003 03:14:29 -0000      1.2
+++ E_Thumb.h   14 Oct 2003 18:12:57 -0000      1.3
@@ -64,4 +64,12 @@
  * Returns a valid Evas_Object if imlib2 or evas can load the file
  */
 Evas_Object *e_thumb_evas_object_get(Evas_Object *o);
+
+/**
+ * e_thumb_format_get - get the format of the image this thumb is for
+ * @o - The smart object we want the format for
+ * NOTE: Don't free this string, dupe it if you wanna keep it around
+ */
+const char * e_thumb_format_get(Evas_Object *o);
+
 #endif




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to