aboutsummaryrefslogtreecommitdiff
path: root/fastiv-io.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-25 02:46:36 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-25 16:56:42 +0100
commitf151fcb72ba587840595bb755d24b89f8bfb937b (patch)
tree55b3ca17a9b4341c6d7ef4c453e14ca8a2e0ea35 /fastiv-io.h
parent1d2f6243e03694096d279a01000b119ca8fcc7f5 (diff)
downloadfiv-f151fcb72ba587840595bb755d24b89f8bfb937b.tar.gz
fiv-f151fcb72ba587840595bb755d24b89f8bfb937b.tar.xz
fiv-f151fcb72ba587840595bb755d24b89f8bfb937b.zip
Extract all frames from GIF/APNG animations
So far none of the surface userdata is used.
Diffstat (limited to 'fastiv-io.h')
-rw-r--r--fastiv-io.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/fastiv-io.h b/fastiv-io.h
index aa21a33..aed235b 100644
--- a/fastiv-io.h
+++ b/fastiv-io.h
@@ -25,6 +25,29 @@ extern const char *fastiv_io_supported_media_types[];
char **fastiv_io_all_supported_media_types(void);
+// Userdata are typically attached to all Cairo surfaces in an animation.
+
+/// GBytes with plain Exif data.
+extern cairo_user_data_key_t fastiv_io_key_exif;
+/// GBytes with plain ICC profile data.
+extern cairo_user_data_key_t fastiv_io_key_icc;
+
+/// The next frame in a sequence, as a surface, in a chain, pre-composited.
+/// There is no wrap-around.
+extern cairo_user_data_key_t fastiv_io_key_frame_next;
+/// Frame duration in milliseconds as an intptr_t.
+extern cairo_user_data_key_t fastiv_io_key_frame_duration;
+/// How many times to repeat the animation, or zero for +inf, as an uintptr_t.
+extern cairo_user_data_key_t fastiv_io_key_loops;
+
+cairo_surface_t *fastiv_io_open(const gchar *path, GError **error);
+cairo_surface_t *fastiv_io_open_from_data(
+ const char *data, size_t len, const gchar *path, GError **error);
+
+int fastiv_io_filecmp(GFile *f1, GFile *f2);
+
+// --- Thumbnails --------------------------------------------------------------
+
// And this is how you avoid glib-mkenums.
typedef enum _FastivIoThumbnailSize {
#define FASTIV_IO_THUMBNAIL_SIZES(XX) \
@@ -52,13 +75,5 @@ typedef struct _FastivIoThumbnailSizeInfo {
extern FastivIoThumbnailSizeInfo
fastiv_io_thumbnail_sizes[FASTIV_IO_THUMBNAIL_SIZE_COUNT];
-extern cairo_user_data_key_t fastiv_io_key_exif;
-extern cairo_user_data_key_t fastiv_io_key_icc;
-
-cairo_surface_t *fastiv_io_open(const gchar *path, GError **error);
-cairo_surface_t *fastiv_io_open_from_data(
- const char *data, size_t len, const gchar *path, GError **error);
cairo_surface_t *fastiv_io_lookup_thumbnail(
const gchar *target, FastivIoThumbnailSize size);
-
-int fastiv_io_filecmp(GFile *f1, GFile *f2);