diff options
author | infirit <[email protected]> | 2014-07-25 17:26:26 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-07-25 22:45:27 +0200 |
commit | b8e7359d93f7f68f410391b39dde37eb1067a92a (patch) | |
tree | 54bed0f6139406c835974bf61b291004bd7ccefe /src/eom-exif-util.c | |
parent | 14a6c9ccd6088184e27a239e7b6a091b0c232e6e (diff) | |
download | eom-b8e7359d93f7f68f410391b39dde37eb1067a92a.tar.bz2 eom-b8e7359d93f7f68f410391b39dde37eb1067a92a.tar.xz |
Wrap ExifData in a EogExifData boxed type
This is for better interaction with bindings
Based on eog commit b88d3713fe45a4bab1bd24ac8ff60551c5c31d49
From Claudio Saavedra <[email protected]>
Diffstat (limited to 'src/eom-exif-util.c')
-rw-r--r-- | src/eom-exif-util.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/eom-exif-util.c b/src/eom-exif-util.c index fedefcd..7fa0e99 100644 --- a/src/eom-exif-util.c +++ b/src/eom-exif-util.c @@ -185,7 +185,7 @@ eom_exif_util_format_date (const gchar *date) } /** - * eom_exif_util_get_value: + * eom_exif_data_get_value: * @exif_data: pointer to an <structname>ExifData</structname> struct * @tag_id: the requested tag's id. See <filename>exif-tag.h</filename> * from the libexif package for possible values (e.g. %EXIF_TAG_EXPOSURE_MODE). @@ -199,7 +199,7 @@ eom_exif_util_format_date (const gchar *date) * Returns: a pointer to @buffer. */ const gchar * -eom_exif_util_get_value (ExifData *exif_data, gint tag_id, gchar *buffer, guint buf_size) +eom_exif_data_get_value (EomExifData *exif_data, gint tag_id, gchar *buffer, guint buf_size) { ExifEntry *exif_entry; const gchar *exif_value; @@ -212,3 +212,29 @@ eom_exif_util_get_value (ExifData *exif_data, gint tag_id, gchar *buffer, guint return exif_value; } + +EomExifData * +eom_exif_data_copy (EomExifData *data) +{ + exif_data_ref (data); + + return data; +} + +void +eom_exif_data_free (EomExifData *data) +{ + exif_data_unref (data); +} + +GType +eom_exif_data_get_type (void) +{ + static GType our_type = 0; + + if (our_type == 0) + our_type = g_boxed_type_register_static ("EomExifData", + (GBoxedCopyFunc) eom_exif_data_copy, + (GBoxedFreeFunc) eom_exif_data_free); + return our_type; +} |