From 0d24c34d7fea73a0002a79e995f7c7f30b03a054 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 19 Dec 2016 08:14:23 +0100 Subject: Add coopgamma backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/gamma-coopgamma.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/gamma-coopgamma.h (limited to 'src/gamma-coopgamma.h') diff --git a/src/gamma-coopgamma.h b/src/gamma-coopgamma.h new file mode 100644 index 0000000..2fd65d3 --- /dev/null +++ b/src/gamma-coopgamma.h @@ -0,0 +1,66 @@ +/* gamma-coopgamma.h -- coopgamma gamma adjustment header + This file is part of Redshift. + + Redshift is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Redshift is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Redshift. If not, see . + + Copyright (c) 2016 Mattias Andrée +*/ + +#ifndef REDSHIFT_GAMMA_COOPGAMMA_H +#define REDSHIFT_GAMMA_COOPGAMMA_H + +#include + +#include "redshift.h" + + +typedef struct { + char *edid; + size_t index; +} coopgamma_output_id_t; + +typedef struct { + libcoopgamma_filter_t filter; + libcoopgamma_ramps_t plain_ramps; + size_t rampsize; +} coopgamma_crtc_state_t; + +typedef struct { + libcoopgamma_context_t ctx; + coopgamma_crtc_state_t *crtcs; + size_t n_crtcs; + char **methods; + char *method; + char *site; + int64_t priority; + int list_outputs; + coopgamma_output_id_t *outputs; + size_t n_outputs; + size_t a_outputs; +} coopgamma_state_t; + + +int coopgamma_init(coopgamma_state_t *state); +int coopgamma_start(coopgamma_state_t *state, program_mode_t mode); +void coopgamma_free(coopgamma_state_t *state); + +void coopgamma_print_help(FILE *f); +int coopgamma_set_option(coopgamma_state_t *state, const char *key, const char *value); + +void coopgamma_restore(coopgamma_state_t *state); +int coopgamma_set_temperature(coopgamma_state_t *state, + const color_setting_t *setting); + + +#endif /* ! REDSHIFT_GAMMA_COOPGAMMA_H */ -- cgit v1.2.3-70-g09d2