aboutsummaryrefslogtreecommitdiff
path: root/fastiv-io.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-21 20:46:50 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-21 20:47:07 +0100
commit5fea2245f119029f6b2699dda11aaf8f5e461e4e (patch)
tree4c16a0f855dab1b4a7d818a3cdeb874a2ce28167 /fastiv-io.h
parent2b17ed838afb1ac1d63ca6e4d60945844263ca40 (diff)
downloadfiv-5fea2245f119029f6b2699dda11aaf8f5e461e4e.tar.gz
fiv-5fea2245f119029f6b2699dda11aaf8f5e461e4e.tar.xz
fiv-5fea2245f119029f6b2699dda11aaf8f5e461e4e.zip
Remove insanity
Diffstat (limited to 'fastiv-io.h')
-rw-r--r--fastiv-io.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/fastiv-io.h b/fastiv-io.h
index 101db6c..5ee0f5b 100644
--- a/fastiv-io.h
+++ b/fastiv-io.h
@@ -32,23 +32,25 @@ typedef enum _FastivIoThumbnailSize {
XX(NORMAL, 256, "large") \
XX(LARGE, 512, "x-large") \
XX(HUGE, 1024, "xx-large")
-#define XX(name, value, dir) FASTIV_IO_THUMBNAIL_SIZE_ ## name = value,
+#define XX(name, value, dir) FASTIV_IO_THUMBNAIL_SIZE_ ## name,
FASTIV_IO_THUMBNAIL_SIZES(XX)
#undef XX
- FASTIV_IO_THUMBNAIL_SIZE_MIN = FASTIV_IO_THUMBNAIL_SIZE_SMALL,
- FASTIV_IO_THUMBNAIL_SIZE_MAX = FASTIV_IO_THUMBNAIL_SIZE_HUGE
+ FASTIV_IO_THUMBNAIL_SIZE_COUNT,
+
+ FASTIV_IO_THUMBNAIL_SIZE_MIN = 0,
+ FASTIV_IO_THUMBNAIL_SIZE_MAX = FASTIV_IO_THUMBNAIL_SIZE_COUNT - 1
} FastivIoThumbnailSize;
GType fastiv_io_thumbnail_size_get_type(void) G_GNUC_CONST;
#define FASTIV_TYPE_IO_THUMBNAIL_SIZE (fastiv_io_thumbnail_size_get_type())
typedef struct _FastivIoThumbnailSizeInfo {
- FastivIoThumbnailSize size; ///< Nominal size in pixels
- const char *directory_name; ///< thumbnail-spec directory name
+ int size; ///< Nominal size in pixels
+ const char *thumbnail_spec_name; ///< thumbnail-spec directory name
} FastivIoThumbnailSizeInfo;
-// The array is null-terminated.
-extern FastivIoThumbnailSizeInfo fastiv_io_thumbnail_sizes[];
+extern FastivIoThumbnailSizeInfo
+ fastiv_io_thumbnail_sizes[FASTIV_IO_THUMBNAIL_SIZE_COUNT];
cairo_surface_t *fastiv_io_open(const gchar *path, GError **error);
cairo_surface_t *fastiv_io_open_from_data(