diff options
-rw-r--r-- | src/randr.h | 4 | ||||
-rw-r--r-- | src/redshift.c | 15 | ||||
-rw-r--r-- | src/redshift.h | 39 | ||||
-rw-r--r-- | src/vidmode.h | 1 | ||||
-rw-r--r-- | src/w32gdi.h | 1 |
5 files changed, 46 insertions, 14 deletions
diff --git a/src/randr.h b/src/randr.h index 6e11274..8e8e56e 100644 --- a/src/randr.h +++ b/src/randr.h @@ -25,6 +25,9 @@ #include <xcb/xcb.h> #include <xcb/randr.h> +#include "redshift.h" + + typedef struct { xcb_randr_crtc_t crtc; unsigned int ramp_size; @@ -45,4 +48,5 @@ void randr_free(randr_state_t *state); void randr_restore(randr_state_t *state); int randr_set_temperature(randr_state_t *state, int temp, float gamma[3]); + #endif /* ! _REDSHIFT_RANDR_H */ diff --git a/src/redshift.c b/src/redshift.c index 430c732..c39c033 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -80,6 +80,7 @@ typedef union { #endif } gamma_state_t; + /* Enum of gamma adjustment methods */ typedef enum { GAMMA_METHOD_RANDR, @@ -88,20 +89,6 @@ typedef enum { GAMMA_METHOD_MAX } gamma_method_t; -typedef int gamma_method_init_func(void *state, int screen_num, int crtc_num); -typedef void gamma_method_free_func(void *state); -typedef void gamma_method_restore_func(void *state); -typedef int gamma_method_set_temperature_func(void *state, int temp, - float gamma[3]); - -typedef struct { - char *name; - gamma_method_init_func *init; - gamma_method_free_func *free; - gamma_method_restore_func *restore; - gamma_method_set_temperature_func *set_temperature; -} gamma_method_spec_t; - /* Gamma adjustment method structs */ static const gamma_method_spec_t gamma_methods[] = { diff --git a/src/redshift.h b/src/redshift.h new file mode 100644 index 0000000..84e7818 --- /dev/null +++ b/src/redshift.h @@ -0,0 +1,39 @@ +/* redshift.h -- Main program 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 <http://www.gnu.org/licenses/>. + + Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com> +*/ + +#ifndef _REDSHIFT_REDSHIFT_H +#define _REDSHIFT_REDSHIFT_H + + +typedef int gamma_method_init_func(void *state, int screen_num, int crtc_num); +typedef void gamma_method_free_func(void *state); +typedef void gamma_method_restore_func(void *state); +typedef int gamma_method_set_temperature_func(void *state, int temp, + float gamma[3]); + +typedef struct { + char *name; + gamma_method_init_func *init; + gamma_method_free_func *free; + gamma_method_restore_func *restore; + gamma_method_set_temperature_func *set_temperature; +} gamma_method_spec_t; + + +#endif /* ! _REDSHIFT_REDSHIFT_H */ diff --git a/src/vidmode.h b/src/vidmode.h index 7a11099..0386adc 100644 --- a/src/vidmode.h +++ b/src/vidmode.h @@ -36,4 +36,5 @@ void vidmode_free(vidmode_state_t *state); void vidmode_restore(vidmode_state_t *state); int vidmode_set_temperature(vidmode_state_t *state, int temp, float gamma[3]); + #endif /* ! _REDSHIFT_VIDMODE_H */ diff --git a/src/w32gdi.h b/src/w32gdi.h index 785807b..6a7c1c2 100644 --- a/src/w32gdi.h +++ b/src/w32gdi.h @@ -34,4 +34,5 @@ void w32gdi_free(w32gdi_state_t *state); void w32gdi_restore(w32gdi_state_t *state); int w32gdi_set_temperature(w32gdi_state_t *state, int temp, float gamma[3]); + #endif /* ! _REDSHIFT_W32GDI_H */ |