aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcolour.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-12-11 00:45:07 +0100
committerMattias Andrée <maandree@kth.se>2016-12-11 01:26:12 +0100
commit4d029d3ee5f18e41610224f11436534364f81546 (patch)
tree0fe038bf37b49b5abb01df86e296321af9e0f01f /src/libcolour.h
parentmisc (diff)
downloadlibcolour-4d029d3ee5f18e41610224f11436534364f81546.tar.gz
libcolour-4d029d3ee5f18e41610224f11436534364f81546.tar.bz2
libcolour-4d029d3ee5f18e41610224f11436534364f81546.tar.xz
Add libcolour_marshal and libcolour_unmarshal
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/libcolour.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/libcolour.h b/src/libcolour.h
index b780c71..2bc2f0e 100644
--- a/src/libcolour.h
+++ b/src/libcolour.h
@@ -18,6 +18,9 @@
#define LIBCOLOUR_H
+#include <stddef.h>
+
+
union libcolour_colour;
@@ -44,6 +47,23 @@ union libcolour_colour;
#define LIBCOLOUR_ILLUMINANT_F12 (libcolour_ciexyy_t){.model = LIBCOLOUR_CIEXYY, .x = 0.43695, .y = 0.40441, .Y = 1}
+#define LIBCOLOUR_LIST_MODELS\
+ X(LIBCOLOUR_RGB, libcolour_rgb_t)\
+ X(LIBCOLOUR_SRGB, libcolour_srgb_t)\
+ X(LIBCOLOUR_CIEXYY, libcolour_ciexyy_t)\
+ X(LIBCOLOUR_CIEXYZ, libcolour_ciexyz_t)\
+ X(LIBCOLOUR_CIELAB, libcolour_cielab_t)\
+ X(LIBCOLOUR_CIELUV, libcolour_cieluv_t)\
+ X(LIBCOLOUR_CIELCH, libcolour_cielch_t)\
+ X(LIBCOLOUR_YIQ, libcolour_yiq_t)\
+ X(LIBCOLOUR_YDBDR, libcolour_ydbdr_t)\
+ X(LIBCOLOUR_YUV, libcolour_yuv_t)\
+ X(LIBCOLOUR_YPBPR, libcolour_ypbpr_t)\
+ X(LIBCOLOUR_YCGCO, libcolour_ycgco_t)\
+ X(LIBCOLOUR_CIE1960UCS, libcolour_cie1960ucs_t)\
+ X(LIBCOLOUR_CIEUVW, libcolour_cieuvw_t)
+
+
typedef enum libcolour_model {
LIBCOLOUR_RGB,
LIBCOLOUR_SRGB,
@@ -264,7 +284,8 @@ double libcolour_srgb_decode(double);
int libcolour_delta_e(const libcolour_colour_t*, const libcolour_colour_t*, double*);
int libcolour_proper(libcolour_colour_t*);
int libcolour_get_rgb_colour_space(libcolour_colour_t*, libcolour_rgb_colour_space_t);
-/* TODO (un)marshal */
+size_t libcolour_marshal(const libcolour_colour_t*, void*);
+size_t libcolour_unmarshal(libcolour_colour_t*, const void*);