Use util_clip_triangle() in pan_item_tri_new()
[geeqie.git] / src / exif-int.h
index fc45e42..441de2d 100644 (file)
@@ -1,31 +1,29 @@
 /*
- *  GQView
- *  (C) 2006 John Ellis
+ * Copyright (C) 2006 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
- *  Authors:
- *    Support for Exif file format, originally written by Eric Swalens.    
- *    Modified by Quy Tonthat
- *    Reimplemented with generic data storage by John Ellis
+ * Authors: Eric Swalens, Quy Tonthat, John Ellis
  *
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 #ifndef __EXIF_INT_H
 #define __EXIF_INT_H
 
+#include <cstdio>
+
 #include "exif.h"
 
 /*
  *-----------------------------------------------------------------------------
  */
 
-typedef enum {
+enum ExifByteOrder {
        EXIF_BYTE_ORDER_INTEL,
        EXIF_BYTE_ORDER_MOTOROLA
-} ExifByteOrder;
+};
 
-typedef struct _ExifFormatAttrib ExifFormatAttrib;
-struct _ExifFormatAttrib
+struct ExifFormatAttrib
 {
        ExifFormatType type;
        guint size;
@@ -48,8 +45,7 @@ struct _ExifFormatAttrib
        const gchar *description;
 };
 
-/* the list of known tag data formats */
-extern ExifFormatAttrib ExifFormatList[];
+extern ExifFormatAttrib ExifFormatList[]; /**< the list of known tag data formats */
 
 
 /*
@@ -58,53 +54,44 @@ extern ExifFormatAttrib ExifFormatList[];
  *-----------------------------------------------------------------------------
  */
 
-typedef struct _ExifMarker ExifMarker;
-typedef struct _ExifTextList ExifTextList;
-
-struct _ExifData
+struct ExifData
 {
-       GList *items;   /* list of (ExifItem *) */
-       GList *current; /* for exif_get_next_item */
+       gchar *path;
+       GList *items;   /**< list of (ExifItem *) */
+       GList *current; /**< for exif_get_next_item */
 };
 
-
-struct _ExifItem
+struct ExifTextList
 {
-       ExifFormatType format;
-       guint tag;
-       const ExifMarker *marker;
-       guint elements;
-       gpointer data;
-       guint data_len;
+       gint value;
+       const gchar *description;
 };
 
-struct _ExifMarker
+struct ExifMarker
 {
        guint           tag;
        ExifFormatType  format;
        gint            components;
-       gchar           *key;
-       gchar           *description;
+       const gchar             *key;
+       const gchar             *description;
        ExifTextList    *list;
 };
 
-#define EXIF_MARKER_LIST_END { 0x0000, EXIF_FORMAT_UNKNOWN, 0, NULL, NULL, NULL }
-
-struct _ExifTextList
+struct ExifItem
 {
-       gint value;
-       const gchar* description;
+       ExifFormatType format;
+       guint tag;
+       const ExifMarker *marker;
+       guint elements;
+       gpointer data;
+       guint data_len;
 };
 
+#define EXIF_MARKER_LIST_END { 0x0000, EXIF_FORMAT_UNKNOWN, 0, NULL, NULL, NULL }
+
 #define EXIF_TEXT_LIST_END { -1, NULL }
 
 
-typedef struct _ExifFormattedText ExifFormattedText;
-struct _ExifFormattedText
-{
-       const gchar *key;
-       const gchar *description;
-};
 
 
 /*
@@ -115,14 +102,11 @@ struct _ExifFormattedText
 
 
 
-/* the known exif tags list */
-extern ExifMarker ExifKnownMarkersList[];
+extern ExifMarker ExifKnownMarkersList[]; /**< the known exif tags list */
 
-/* the unknown tags utilize this generic list */
-extern ExifMarker ExifUnknownMarkersList[];
+extern ExifMarker ExifUnknownMarkersList[]; /**< the unknown tags utilize this generic list */
 
-/* the list of specially formatted keys, for human readable output */
-extern ExifFormattedText ExifFormattedList[];
+extern ExifFormattedText ExifFormattedList[]; /**< the list of specially formatted keys, for human readable output */
 
 
 /*
@@ -131,8 +115,10 @@ extern ExifFormattedText ExifFormattedList[];
  *-----------------------------------------------------------------------------
  */
 
-
-/* usually for debugging to stdout */
+/**
+ * @headerfile exif_write_data_list
+ * usually for debugging to stdout
+ */
 void exif_write_data_list(ExifData *exif, FILE *f, gint human_readable_list);
 
 
@@ -148,28 +134,27 @@ void exif_write_data_list(ExifData *exif, FILE *f, gint human_readable_list);
 #define EXIF_TIFD_SIZE 12
 
 
-guint16 exif_byte_get_int16(unsigned char *f, ExifByteOrder bo);
-guint32 exif_byte_get_int32(unsigned char *f, ExifByteOrder bo);
-void exif_byte_put_int16(unsigned char *f, guint16 n, ExifByteOrder bo);
-void exif_byte_put_int32(unsigned char *f, guint32 n, ExifByteOrder bo);
+guint16 exif_byte_get_int16(guchar *f, ExifByteOrder bo);
+guint32 exif_byte_get_int32(guchar *f, ExifByteOrder bo);
+void exif_byte_put_int16(guchar *f, guint16 n, ExifByteOrder bo);
+void exif_byte_put_int32(guchar *f, guint32 n, ExifByteOrder bo);
 
 ExifItem *exif_item_new(ExifFormatType format, guint tag,
                        guint elements, const ExifMarker *marker);
-void exif_item_copy_data(ExifItem *item, void *src, guint len,
+void exif_item_copy_data(ExifItem *item, gpointer src, guint len,
                         ExifFormatType src_format, ExifByteOrder bo);
 
 gint exif_parse_IFD_table(ExifData *exif,
-                         unsigned char *tiff, guint offset,
+                         guchar *tiff, guint offset,
                          guint size, ExifByteOrder bo,
                          gint level,
                          const ExifMarker *list);
 
-gint exif_tiff_directory_offset(unsigned char *data, const guint len,
+gint exif_tiff_directory_offset(guchar *data, guint len,
                                guint *offset, ExifByteOrder *bo);
-gint exif_tiff_parse(ExifData *exif, unsigned char *tiff, guint size, ExifMarker *list);
+gint exif_tiff_parse(ExifData *exif, guchar *tiff, guint size, ExifMarker *list);
 
 gchar *exif_text_list_find_value(ExifTextList *list, guint value);
 
-
 #endif
-
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */