aboutsummaryrefslogtreecommitdiffstats
path: root/src/colorramp.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-12-19 08:14:23 +0100
committerMattias Andrée <maandree@kth.se>2016-12-19 08:14:23 +0100
commit0d24c34d7fea73a0002a79e995f7c7f30b03a054 (patch)
tree01b6394e5f8b39047ed731ce82ffb193edef5b57 /src/colorramp.h
parentMerge pull request #295 from arnej/windowsfix (diff)
downloadredshift-ng-0d24c34d7fea73a0002a79e995f7c7f30b03a054.tar.gz
redshift-ng-0d24c34d7fea73a0002a79e995f7c7f30b03a054.tar.bz2
redshift-ng-0d24c34d7fea73a0002a79e995f7c7f30b03a054.tar.xz
Add coopgamma backend
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/colorramp.h')
-rw-r--r--src/colorramp.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/colorramp.h b/src/colorramp.h
index 438c563..8802844 100644
--- a/src/colorramp.h
+++ b/src/colorramp.h
@@ -24,9 +24,19 @@
#include "redshift.h"
-void colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
- int size, const color_setting_t *setting);
-void colorramp_fill_float(float *gamma_r, float *gamma_g, float *gamma_b,
- int size, const color_setting_t *setting);
+#define LIST_RAMPS_STOP_VALUE_TYPES\
+ X(u8, uint8_t, UINT8_MAX + 1ULL, UINT8_MAX, 8)\
+ X(u16, uint16_t, UINT16_MAX + 1ULL, UINT16_MAX, 16)\
+ X(u32, uint32_t, UINT32_MAX + 1ULL, UINT32_MAX, 32)\
+ X(u64, uint64_t, UINT64_MAX, UINT64_MAX, 64)\
+ X(float, float, 1, 1, -1)\
+ X(double, double, 1, 1, -2)
+
+#define X(SUFFIX, TYPE, MAX, TRUE_MAX, DEPTH)\
+ void colorramp_fill_##SUFFIX(TYPE *gamma_r, TYPE *gamma_g, TYPE *gamma_b,\
+ size_t size_r, size_t size_g, size_t size_b,\
+ const color_setting_t *setting);
+LIST_RAMPS_STOP_VALUE_TYPES
+#undef X
#endif /* ! REDSHIFT_COLORRAMP_H */