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.
This commit is contained in:
2022-06-06 15:22:23 +02:00
parent 4ca8825e02
commit 930744e165
3 changed files with 11 additions and 6 deletions

View File

@@ -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 --------------------------------------------------------------