aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcoopgamma.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-08-04 01:15:35 +0200
committerMattias Andrée <maandree@kth.se>2016-08-04 01:15:35 +0200
commita2728d045a5a9ca442851639ad85d186451a0802 (patch)
tree8c0bd454570e5190b2f6ebb1b5247ac061f2a10d /src/libcoopgamma.h
parentFix bugs (diff)
downloadlibcoopgamma-a2728d045a5a9ca442851639ad85d186451a0802.tar.gz
libcoopgamma-a2728d045a5a9ca442851639ad85d186451a0802.tar.bz2
libcoopgamma-a2728d045a5a9ca442851639ad85d186451a0802.tar.xz
Prepare for supporting the update to get-gamma-info: colourspace information
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/libcoopgamma.h')
-rw-r--r--src/libcoopgamma.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/src/libcoopgamma.h b/src/libcoopgamma.h
index 657592b..a4a21e5 100644
--- a/src/libcoopgamma.h
+++ b/src/libcoopgamma.h
@@ -97,6 +97,13 @@
/**
* Number used to identify implementation
+ * version of `libcoopgamma_colourspace_t`, if it
+ * is ever modified, this number is increased
+ */
+#define LIBCOOPGAMMA_COLOURSPACE_VERSION 0
+
+/**
+ * Number used to identify implementation
* version of `libcoopgamma_ramps*_t`, if they
* are ever modified, this number is increased
*/
@@ -263,6 +270,42 @@ typedef enum libcoopgamma_lifespan
/**
+ * Colourspaces
+ */
+typedef enum libcoopgamma_colourspace
+{
+ /**
+ * The colourspace is unknown
+ *
+ * This value will always be 0
+ */
+ LIBCOOPGAMMA_UNKNOWN = 0,
+
+ /**
+ * sRGB (Standard RGB)
+ */
+ LIBCOOPGAMMA_SRGB = 1,
+
+ /**
+ * RGB other than sRGB
+ */
+ LIBCOOPGAMMA_RGB = 2,
+
+ /**
+ * Non-RGB multicolour
+ */
+ LIBCOOPGAMMA_NON_RGB = 3,
+
+ /**
+ * Monochrome, greyscale, or some
+ * other singlecolour scale
+ */
+ LIBCOOPGAMMA_GREY = 4
+
+} libcoopgamma_colourspace_t;
+
+
+/**
* Define a gamma ramp structure
*
* @param suffix:identifier The end of the name of the `struct`
@@ -471,6 +514,70 @@ typedef struct libcoopgamma_crtc_info
*/
size_t blue_size;
+ /**
+ * The monitor's colurspace
+ */
+ libcoopgamma_colourspace_t colourspace;
+
+ /**
+ * Whether `.red_x`, `.red_y`, `.green_x`,
+ * `.green_y`, `.blue_x`, `.blue_y`,
+ * `.white_x`, and `.white_y` are set.
+ *
+ * If this is true, but the colourspace
+ * is not RGB (or sRGB), there is something
+ * wrong. Please also check the colourspace.
+ */
+ int have_gamut;
+
+ /**
+ * The x-value (CIE xyY) of the monitor's
+ * red colour, multiplied by 1024
+ */
+ unsigned red_x;
+
+ /**
+ * The y-value (CIE xyY) of the monitor's
+ * red colour, multiplied by 1024
+ */
+ unsigned red_y;
+
+ /**
+ * The x-value (CIE xyY) of the monitor's
+ * green colour, multiplied by 1024
+ */
+ unsigned green_x;
+
+ /**
+ * The y-value (CIE xyY) of the monitor's
+ * green colour, multiplied by 1024
+ */
+ unsigned green_y;
+
+ /**
+ * The x-value (CIE xyY) of the monitor's
+ * blue colour, multiplied by 1024
+ */
+ unsigned blue_x;
+
+ /**
+ * The y-value (CIE xyY) of the monitor's
+ * blue colour, multiplied by 1024
+ */
+ unsigned blue_y;
+
+ /**
+ * The x-value (CIE xyY) of the monitor's
+ * default white point, multiplied by 1024
+ */
+ unsigned white_x;
+
+ /**
+ * The y-value (CIE xyY) of the monitor's
+ * default white point, multiplied by 1024
+ */
+ unsigned white_y;
+
} libcoopgamma_crtc_info_t;