From d939dd05e1fad24820bcee4142a5fca482dbbfb7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 May 2015 16:29:18 +0200 Subject: add auto_restore to method caps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/lib/libgamma-method.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib/libgamma-method.h') diff --git a/src/lib/libgamma-method.h b/src/lib/libgamma-method.h index 90fd25c..fc402ec 100644 --- a/src/lib/libgamma-method.h +++ b/src/lib/libgamma-method.h @@ -156,7 +156,7 @@ typedef struct libgamma_method_capabilities * Whether the adjustment method supports `libgamma_crtc_restore`. */ unsigned crtc_restore : 1; - + /** * Whether the `red_gamma_size`, `green_gamma_size` and `blue_gamma_size` * fields in `libgamma_crtc_information_t` will always have the same @@ -187,6 +187,12 @@ typedef struct libgamma_method_capabilities */ unsigned fake : 1; + /** + * Whether adjustments are undone when the process disconnects from + * the display server. + */ + unsigned auto_restore : 1; + } libgamma_method_capabilities_t; -- cgit v1.2.3-70-g09d2 From 60450891857950ba543ceedd6b87a938d3032cd3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 May 2015 17:05:44 +0200 Subject: Gamma ramp support test return yes, no or maybe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- TODO | 2 -- src/lib/libgamma-method.h | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) (limited to 'src/lib/libgamma-method.h') diff --git a/TODO b/TODO index 68a42b6..fbee3cf 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,5 @@ Unsupported display servers: Mir I do not think Mir have gamma ramp support -Gamma ramp support test should return yes, no or maybe. - Add hotplug support. diff --git a/src/lib/libgamma-method.h b/src/lib/libgamma-method.h index fc402ec..6e0cff1 100644 --- a/src/lib/libgamma-method.h +++ b/src/lib/libgamma-method.h @@ -472,6 +472,29 @@ typedef enum libgamma_subpixel_order #define LIBGAMMA_SUBPIXEL_ORDER_COUNT 6 +/** + * Answer enum to a decision problem. + */ +typedef enum libgamma_decision + { + /** + * The answer is negative. + */ + LIBGAMMA_NO = 0, + + /** + * The answer is unknown. + */ + LIBGAMMA_MAYBE = 1, + + /** + * The answer is positive. + */ + LIBGAMMA_YES = 2 + + } libgamma_decision_t; + + /** * For a `libgamma_crtc_information_t` fill in the * values for `edid` and `edid_length` and report errors to `edid_error`. @@ -755,9 +778,14 @@ typedef struct libgamma_crtc_information /** - * Non-zero gamma ramp adjustments are supported. + * `LIBGAMMA_NO` indicates that the CRTC does not support + * gamma ramp adjustments. `LIBGAMMA_MAYBE` indicates that + * the CRTC may or may not support gamma ramp adjustments, + * meaning that the display server really does not know, but + * the protocol is available. `LIBGAMMA_NO` indicates that + * the CRTC does support gamma ramp adjustments. */ - int gamma_support; + libgamma_decision_t gamma_support; /** * Zero on success, positive it holds the value `errno` had -- cgit v1.2.3-70-g09d2