Use util_clip_triangle() in pan_item_tri_new()
[geeqie.git] / src / exif.h
index 37d675e..a10f801 100644 (file)
 #ifndef __EXIF_H
 #define __EXIF_H
 
+#include <glib.h>
+
+#include "typedefs.h"
+
+struct ExifData;
+struct ExifItem;
+struct FileData;
+
 #define EXIF_FORMATTED() "formatted."
 #define EXIF_FORMATTED_LEN (sizeof(EXIF_FORMATTED()) - 1)
 
@@ -33,7 +41,7 @@
 
 #define EXIF_FORMAT_COUNT 13
 
-typedef enum {
+enum ExifFormatType {
        EXIF_FORMAT_UNKNOWN             = 0,
        EXIF_FORMAT_BYTE_UNSIGNED       = 1,
        EXIF_FORMAT_STRING              = 2,
@@ -47,7 +55,7 @@ typedef enum {
        EXIF_FORMAT_RATIONAL            = 10,
        EXIF_FORMAT_FLOAT               = 11,
        EXIF_FORMAT_DOUBLE              = 12
-} ExifFormatType;
+};
 
 
 /*
@@ -56,10 +64,7 @@ typedef enum {
  *-----------------------------------------------------------------------------
  */
 
-typedef struct _ExifItem ExifItem;
-
-typedef struct _ExifRational ExifRational;
-struct _ExifRational
+struct ExifRational
 {
        guint32 num;
        guint32 den;
@@ -68,7 +73,7 @@ struct _ExifRational
 
 /* enums useful for image manipulation */
 
-typedef enum {
+enum ExifOrientationType {
        EXIF_ORIENTATION_UNKNOWN        = 0,
        EXIF_ORIENTATION_TOP_LEFT       = 1,
        EXIF_ORIENTATION_TOP_RIGHT      = 2,
@@ -78,17 +83,16 @@ typedef enum {
        EXIF_ORIENTATION_RIGHT_TOP      = 6,
        EXIF_ORIENTATION_RIGHT_BOTTOM   = 7,
        EXIF_ORIENTATION_LEFT_BOTTOM    = 8
-} ExifOrientationType;
+};
 
-typedef enum {
+enum ExifUnitType {
        EXIF_UNIT_UNKNOWN       = 0,
        EXIF_UNIT_NOUNIT        = 1,
        EXIF_UNIT_INCH          = 2,
        EXIF_UNIT_CENTIMETER    = 3
-} ExifUnitType;
+};
 
-typedef struct _ExifFormattedText ExifFormattedText;
-struct _ExifFormattedText
+struct ExifFormattedText
 {
        const gchar *key;
        const gchar *description;
@@ -101,7 +105,7 @@ struct _ExifFormattedText
  *-----------------------------------------------------------------------------
  */
 
-void exif_init(void);
+void exif_init();
 
 ExifData *exif_read(gchar *path, gchar *sidecar_path, GHashTable *modified_xmp);
 
@@ -109,12 +113,12 @@ ExifData *exif_read_fd(FileData *fd);
 void exif_free_fd(FileData *fd, ExifData *exif);
 
 /**
- * \headerfile exif_get_original
+ * @headerfile exif_get_original
  * exif_read returns processed data (merged from image and sidecar, etc.)
  * this function gives access to the original data from the image.
  * original data are part of the processed data and should not be freed separately
  */
-ExifData *exif_get_original(ExifData *processed);
+ExifData *exif_get_original(ExifData *exif);
 
 
 gboolean exif_write(ExifData *exif);
@@ -138,7 +142,7 @@ gchar *exif_item_get_data(ExifItem *item, guint *data_len);
 gchar *exif_item_get_description(ExifItem *item);
 guint exif_item_get_format_id(ExifItem *item);
 const gchar *exif_item_get_format_name(ExifItem *item, gboolean brief);
-gchar *exif_item_get_data_as_text(ExifItem *item);
+gchar *exif_item_get_data_as_text(ExifItem *item, ExifData *exif);
 gint exif_item_get_integer(ExifItem *item, gint *value);
 ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, guint n);
 
@@ -167,7 +171,7 @@ void exif_set_image_comment(FileData* fd, const gchar* comment);
 
 /*raw support */
 guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width, gint requested_height);
-void exif_free_preview(guchar *buf);
+void exif_free_preview(const guchar *buf);
 
 gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat format);
 gchar *metadata_lua_info(FileData *fd, const gchar *key, MetadataFormat format);