aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2010-05-24 20:06:14 +0200
committerJon Lund Steffensen <jonlst@gmail.com>2010-05-24 20:06:14 +0200
commitb1ab322cb5d40aac8d7b10bcb1fdf9994103a3ee (patch)
tree56be734d985da7dc241733615edcb328d1e56972 /src
parentDon't include gettext headers when NLS is disabled. (diff)
downloadredshift-ng-b1ab322cb5d40aac8d7b10bcb1fdf9994103a3ee.tar.gz
redshift-ng-b1ab322cb5d40aac8d7b10bcb1fdf9994103a3ee.tar.bz2
redshift-ng-b1ab322cb5d40aac8d7b10bcb1fdf9994103a3ee.tar.xz
Move gamma method spec structs to redshift.h
Diffstat (limited to 'src')
-rw-r--r--src/randr.h4
-rw-r--r--src/redshift.c15
-rw-r--r--src/redshift.h39
-rw-r--r--src/vidmode.h1
-rw-r--r--src/w32gdi.h1
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 */