Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : apps/entice
Dir : e17/apps/entice/src/bin
Modified Files:
Makefile.am entice.c entice.h
Added Files:
exif.c exif.h
Log Message:
exif tag support for entice, only supporting a few "basics" right now
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- Makefile.am 5 May 2004 06:55:28 -0000 1.6
+++ Makefile.am 18 Oct 2004 01:38:44 -0000 1.7
@@ -18,6 +18,7 @@
prefs.c prefs.h \
signals_image.c signals_image.h \
signals_thumb.c signals_thumb.h \
+exif.c exif.h \
main.c
entice_LDADD = \
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- entice.c 10 Oct 2004 00:58:24 -0000 1.62
+++ entice.c 18 Oct 2004 01:38:44 -0000 1.63
@@ -24,6 +24,7 @@
#include "prefs.h"
#include "signals_image.h"
#include "signals_thumb.h"
+#include "exif.h"
static Entice *entice = NULL;
@@ -127,6 +128,9 @@
evas_object_del(o);
return;
}
+
+ e->exiftags = entice_exif_edje_init(o);
+
evas_object_name_set(o, "EnticeEdje");
evas_object_move(o, 0, 0);
evas_object_resize(o, (Evas_Coord) w, (Evas_Coord) h);
@@ -292,6 +296,49 @@
return (0);
}
+Evas_Bool
+entice_exiftags_foreach(Evas_Hash * hash, const char *key, void *data,
+ void *fdata)
+{
+ int exifintval = 0;
+ char buf[PATH_MAX];
+ const char *exifval = NULL;
+ Entice_Exif *eexif = NULL;
+
+#if 0
+ fprintf(stderr, "%s\n", key);
+#endif
+ if ((eexif = (Entice_Exif *) evas_hash_find(hash, key)))
+ {
+ if ((exifval =
+ esmart_thumb_exif_data_as_string_get((Evas_Object *) fdata,
+ eexif->lvl, eexif->tag)))
+ {
+ edje_object_part_text_set(entice->edje, eexif->part, exifval);
+ }
+ else
+ if ((exifintval =
+ esmart_thumb_exif_data_as_int_get((Evas_Object *) fdata,
+ eexif->lvl, eexif->tag)) >= 0)
+ {
+ snprintf(buf, PATH_MAX, "%i", exifintval);
+ edje_object_part_text_set(entice->edje, eexif->part, buf);
+
+ }
+ else
+ {
+ edje_object_signal_emit(entice->edje, "entice,exif,data,notfound",
+ eexif->part);
+#if 0
+ fprintf(stderr, "ERROR: %s : 0x%04x : 0x%04x\n", eexif->part,
+ eexif->lvl, eexif->tag);
+#endif
+ }
+
+ }
+ return (TRUE);
+}
+
/**
* _entice_thumb_load - callback for loading an entice thumb
* @_data - The E_Thumb object we're loading from, a param to the cb
@@ -401,7 +448,17 @@
"entice.image.current.filesize", str);
free(str);
}
-
+ if (esmart_thumb_exif_get(o))
+ {
+ evas_hash_foreach(entice->exiftags, entice_exiftags_foreach, o);
+ edje_object_signal_emit(entice->edje, "entice,image,exif,present",
+ "");
+ }
+ else
+ {
+ edje_object_signal_emit(entice->edje, "entice,image,exif,absent",
+ "");
+ }
snprintf(buf, PATH_MAX, "Entice: %s", esmart_thumb_file_get(o));
ecore_evas_title_set(entice->ee, buf);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/entice.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- entice.h 7 Sep 2004 03:49:35 -0000 1.17
+++ entice.h 18 Oct 2004 01:38:44 -0000 1.18
@@ -23,6 +23,7 @@
Evas_List *current; /* Current Image's list item */
}
thumb;
+ Evas_Hash *exiftags; /* entice exif tag -> EnticeExif */
Ecore_Evas *ee; /* the evas window */
Evas_Object *edje; /* Main Edje_Object(theme) */
@@ -33,6 +34,7 @@
};
typedef struct _Entice Entice;
+
void entice_init(Ecore_Evas * ee);
void entice_free(void);
void entice_resize(int w, int h);
-------------------------------------------------------
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