aboutsummaryrefslogtreecommitdiff
path: root/fiv-io.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-06-06 15:22:23 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-06-08 02:51:54 +0200
commit930744e1652c9ec5ad6447c0a2a1e486cae9a2a9 (patch)
tree4353caf33e417faf30ab7d6eb2ee5330d6a4f835 /fiv-io.h
parent4ca8825e02ff8959e3790df2d7818ecfb4134963 (diff)
downloadfiv-930744e1652c9ec5ad6447c0a2a1e486cae9a2a9.tar.gz
fiv-930744e1652c9ec5ad6447c0a2a1e486cae9a2a9.tar.xz
fiv-930744e1652c9ec5ad6447c0a2a1e486cae9a2a9.zip
Add flags to the serialization protocol
It still needs no versioning, as it's not really used by anyone. An alternative method of passing a "low-quality" flag would be perusing fiv_thumbnail_key_lq from fiv-thumbnail.c, which would create a circular dependency, unless fiv_io_{de,}serialize*() were moved to fiv-thumbnail.c.
Diffstat (limited to 'fiv-io.h')
-rw-r--r--fiv-io.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fiv-io.h b/fiv-io.h
index 0c23799..dccdd31 100644
--- a/fiv-io.h
+++ b/fiv-io.h
@@ -102,8 +102,10 @@ cairo_surface_t *fiv_io_open_png_thumbnail(const char *path, GError **error);
// --- Thumbnail passing utilities ---------------------------------------------
-void fiv_io_serialize_to_stdout(cairo_surface_t *surface);
-cairo_surface_t *fiv_io_deserialize(GBytes *bytes);
+enum { FIV_IO_SERIALIZE_LOW_QUALITY = 1 << 0 };
+
+void fiv_io_serialize_to_stdout(cairo_surface_t *surface, guint64 user_data);
+cairo_surface_t *fiv_io_deserialize(GBytes *bytes, guint64 *user_data);
// --- Filesystem --------------------------------------------------------------