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:
fix
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_thumb/Esmart_Thumb.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- Esmart_Thumb.h      10 Nov 2004 15:22:39 -0000      1.5
+++ Esmart_Thumb.h      19 Nov 2004 03:18:38 -0000      1.6
@@ -55,6 +55,13 @@
   Evas_Object *esmart_thumb_evas_object_get (Evas_Object * o, int orient);
 
 /**
+ * esmart_thumb_evas_object_image_get - the actual image object in the thumb
+ * @o - the object returned from esmart_thumb_new
+ * Returns a valid Evas_Object* on success, NULL on no image
+ */
+  Evas_Object *esmart_thumb_evas_object_image_get (Evas_Object * o);
+
+/**
  * 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
@@ -81,14 +88,15 @@
  * @prop - The exif prop you want
  * Returns NULL if not found, string value for the tag if present
  */
-const char* esmart_thumb_exif_data_as_string_get(Evas_Object * o, int lvl, int 
prop);
+  const char *esmart_thumb_exif_data_as_string_get (Evas_Object * o, int lvl,
+                                                   int prop);
 /** 
  * esmart_thumb_exif_data_as_int_get - Get an exif tag as an int
  * @o - The smart object we're curious about
  * @prop - The exif prop you want
  * Returns -1 if not found, string value for the tag if present
  */
-int esmart_thumb_exif_data_as_int_get(Evas_Object * o, int lvl, int prop);
+  int esmart_thumb_exif_data_as_int_get (Evas_Object * o, int lvl, int prop);
 
 #ifdef __cplusplus
 }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/esmart/src/lib/esmart_thumb/esmart_thumb.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- esmart_thumb.c      10 Nov 2004 15:22:39 -0000      1.10
+++ esmart_thumb.c      19 Nov 2004 03:18:38 -0000      1.11
@@ -11,15 +11,15 @@
 #include "Esmart_Thumb.h"
 #include "../../config.h"
 
-  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;
 
 static void _e_thumb_add (Evas_Object * o);
 static void _e_thumb_del (Evas_Object * o);
@@ -137,7 +137,6 @@
                      result = NULL;
                    }
                }
-
            }
        }
     }
@@ -198,7 +197,8 @@
          if (orient && epsilon_info_exif_get (e->info))
            {
              switch (epsilon_info_exif_props_as_int_get (e->info,
-                 EPSILON_ED_IMG, 0x0112))
+                                                         EPSILON_ED_IMG,
+                                                         0x0112))
                {
                case 3:
                  if ((im = imlib_load_image (e->e->src)))
@@ -320,8 +320,25 @@
     }
   return (result);
 }
+
+Evas_Object *
+esmart_thumb_evas_object_image_get (Evas_Object * o)
+{
+  Evas_Object *result = NULL;
+  if (o)
+    {
+      Esmart_Thumb *e = NULL;
+      if ((e = (Esmart_Thumb *) evas_object_smart_data_get (o)))
+       {
+         result = e->image;
+       }
+    }
+  return (result);
+}
+
+/*========================================================================*/
 int
-esmart_thumb_exif_get(Evas_Object * o)
+esmart_thumb_exif_get (Evas_Object * o)
 {
   int result = 0;
   if (o)
@@ -329,18 +346,20 @@
       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);
+         if (e->e)
+           {
+             Epsilon_Info *ei = NULL;
+             if ((ei = epsilon_info_get (e->e)))
+               {
+                 result = epsilon_info_exif_get (ei);
                }
            }
        }
     }
   return (result);
 }
-const char*
-esmart_thumb_exif_data_as_string_get(Evas_Object * o, int lvl, int prop)
+const char *
+esmart_thumb_exif_data_as_string_get (Evas_Object * o, int lvl, int prop)
 {
   const char *result = NULL;
   if (o)
@@ -348,19 +367,24 @@
       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_props_as_string_get(ei,
-                                               (unsigned short)lvl, prop);
+         if (e->e)
+           {
+             Epsilon_Info *ei = NULL;
+             if ((ei = epsilon_info_get (e->e)))
+               {
+                 result = epsilon_info_exif_props_as_string_get (ei,
+                                                                 (unsigned
+                                                                  short) lvl,
+                                                                 prop);
                }
            }
        }
     }
   return (result);
 }
+
 int
-esmart_thumb_exif_data_as_int_get(Evas_Object * o, int lvl, int prop)
+esmart_thumb_exif_data_as_int_get (Evas_Object * o, int lvl, int prop)
 {
   int result = -1;
   if (o)
@@ -368,11 +392,15 @@
       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_props_as_int_get(ei,
-                                               (unsigned short)lvl, prop);
+         if (e->e)
+           {
+             Epsilon_Info *ei = NULL;
+             if ((ei = epsilon_info_get (e->e)))
+               {
+                 result = epsilon_info_exif_props_as_int_get (ei,
+                                                              (unsigned
+                                                               short) lvl,
+                                                              prop);
                }
            }
        }




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to