Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : libs/esmart
Dir : e17/libs/esmart/src/lib/esmart_thumb
Modified Files:
Esmart_Thumb.h esmart_thumb.c
Log Message:
let esmart thumb query whether or not exif data is present, indent the header
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_thumb/Esmart_Thumb.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- Esmart_Thumb.h 10 Oct 2004 01:00:14 -0000 1.2
+++ Esmart_Thumb.h 17 Oct 2004 11:58:12 -0000 1.3
@@ -5,7 +5,8 @@
#include<Epsilon.h>
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
/**
@@ -18,20 +19,20 @@
* Version 0.0.1 - August 23rd 2003 <[EMAIL PROTECTED]>
* - This was done hastily, there will be fixes
*/
-struct _Esmart_Thumb
-{
- Epsilon *e;
- Epsilon_Info *info;
- Evas_Object *image; /* thumb image that's displayed */
- Evas_Coord x, y, w, h; /* smart object location/geometry */
- int tw, th;
-};
-typedef struct _Esmart_Thumb Esmart_Thumb;
+ struct _Esmart_Thumb
+ {
+ Epsilon *e;
+ Epsilon_Info *info;
+ Evas_Object *image; /* thumb image that's displayed */
+ Evas_Coord x, y, w, h; /* smart object location/geometry */
+ int tw, th;
+ };
+ typedef struct _Esmart_Thumb Esmart_Thumb;
/**
* esmart_thumb_free - free an E_Thumb smart object
*/
-void esmart_thumb_free (Evas_Object * o);
+ void esmart_thumb_free (Evas_Object * o);
/**
* esmart_thumb_new - create a new E_Thumb object. If the freedesktop cached
* thumbnail exists it loads it, if not it creates it. There's some
@@ -39,20 +40,20 @@
* @evas - the evas we want to add the object to
* @file - the name of the file we want a thumb of
*/
-Evas_Object *esmart_thumb_new (Evas * evas, const char *file);
+ Evas_Object *esmart_thumb_new (Evas * evas, const char *file);
/**
* esmart_thumb_file_get - get the full path to the thumbnail's real image
* @o - The smart object we want the filename for
* Returns a pointer to the filename, you should NOT free this memory
*/
-const char *esmart_thumb_file_get (Evas_Object * o);
+ const char *esmart_thumb_file_get (Evas_Object * o);
/**
* esmart_thumb_geometry_get - Get the geometry of the source image
* @o - The smart object we want the geometry of
* @w - A pointer to somewhere we can store the width
* @h - A pointer to somewhere we can store the height
*/
-void esmart_thumb_geometry_get (Evas_Object * o, int *w, int *h);
+ void esmart_thumb_geometry_get (Evas_Object * o, int *w, int *h);
/**
* esmart_thumb_evas_object_get - Load the image file to an evas object
@@ -60,14 +61,14 @@
* @orient - 1 to auto orient, 0 to just load as is
* Returns a valid Evas_Object if imlib2 or evas can load the file
*/
-Evas_Object *esmart_thumb_evas_object_get (Evas_Object * o, int orient);
+ Evas_Object *esmart_thumb_evas_object_get (Evas_Object * o, int orient);
/**
* esmart_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 *esmart_thumb_format_get (Evas_Object * o);
+ const char *esmart_thumb_format_get (Evas_Object * o);
/**
* esmart_thumb_freshen - forced reloading of the thumbnail image from disk
@@ -75,7 +76,14 @@
* Returns EPSILON_OK if the cache was bad and we regenerated, EPSILON_FAIL
* if the cached image is still valid
*/
-int esmart_thumb_freshen (Evas_Object * o);
+ int esmart_thumb_freshen (Evas_Object * o);
+
+/**
+ * esmart_thumb_exif_get - Get whether or not the exif data is present
+ * @o - The smart object we're curious about
+ * Returns 1 if exif data is present in the esmart_thumb, 0 if not
+ */
+ int esmart_thumb_exif_get (Evas_Object * o);
#ifdef __cplusplus
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_thumb/esmart_thumb.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- esmart_thumb.c 14 Oct 2004 00:26:28 -0000 1.7
+++ esmart_thumb.c 17 Oct 2004 11:58:12 -0000 1.8
@@ -309,6 +309,25 @@
}
return (result);
}
+int
+esmart_thumb_exif_get(Evas_Object * o)
+{
+ int result = 0;
+ if (o)
+ {
+ Esmart_Thumb *e = NULL;
+ if ((e = (Esmart_Thumb *) evas_object_smart_data_get (o)))
+ {
+ Epsilon_Info *ei = NULL;
+ if(e->e) {
+ if((ei = epsilon_info_get(e->e))) {
+ result = epsilon_info_exif_get(ei);
+ }
+ }
+ }
+ }
+ return (result);
+}
/*==========================================================================
* Smart Object Functions
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs