aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2010-05-24 23:37:36 +0200
committerJon Lund Steffensen <jonlst@gmail.com>2010-05-24 23:37:36 +0200
commit65dd76a221e23a7200b33645326e90c0c02be7ed (patch)
treefd3ea9ba55dcc874b49f8fb845035a78aa44d2a7 /src
parentPass arguments as string to adjustment methods. (diff)
downloadredshift-ng-65dd76a221e23a7200b33645326e90c0c02be7ed.tar.gz
redshift-ng-65dd76a221e23a7200b33645326e90c0c02be7ed.tar.bz2
redshift-ng-65dd76a221e23a7200b33645326e90c0c02be7ed.tar.xz
Use the prefix 'gamma' for gamma adjustment source files.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am12
-rw-r--r--src/gamma-randr.c (renamed from src/randr.c)4
-rw-r--r--src/gamma-randr.h (renamed from src/randr.h)8
-rw-r--r--src/gamma-vidmode.c (renamed from src/vidmode.c)4
-rw-r--r--src/gamma-vidmode.h (renamed from src/vidmode.h)8
-rw-r--r--src/gamma-w32gdi.c (renamed from src/w32gdi.c)2
-rw-r--r--src/gamma-w32gdi.h (renamed from src/w32gdi.h)8
-rw-r--r--src/redshift.c14
-rw-r--r--src/redshift.h2
9 files changed, 31 insertions, 31 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c46c9ba..75a5261 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,16 +15,16 @@ redshift_SOURCES = \
systemtime.c systemtime.h
EXTRA_redshift_SOURCES = \
- randr.c randr.h \
- vidmode.c vidmode.h \
- w32gdi.c w32gdi.h
+ gamma-randr.c gamma-randr.h \
+ gamma-vidmode.c gamma-vidmode.h \
+ gamma-w32gdi.c gamma-w32gdi.h
AM_CFLAGS =
redshift_LDADD = @LIBINTL@
EXTRA_DIST =
if ENABLE_RANDR
-redshift_SOURCES += randr.c randr.h
+redshift_SOURCES += gamma-randr.c gamma-randr.h
AM_CFLAGS += $(XCB_CFLAGS) $(XCB_RANDR_CFLAGS)
redshift_LDADD += \
$(XCB_LIBS) $(XCB_CFLAGS) \
@@ -32,7 +32,7 @@ redshift_LDADD += \
endif
if ENABLE_VIDMODE
-redshift_SOURCES += vidmode.c vidmode.h
+redshift_SOURCES += gamma-vidmode.c gamma-vidmode.h
AM_CFLAGS += $(X11_CFLAGS) $(XF86VM_CFLAGS)
redshift_LDADD += \
$(X11_LIBS) $(X11_CFLAGS) \
@@ -40,6 +40,6 @@ redshift_LDADD += \
endif
if ENABLE_WINGDI
-redshift_SOURCES += w32gdi.c w32gdi.h
+redshift_SOURCES += gamma-w32gdi.c gamma-w32gdi.h
redshift_LDADD += -lgdi32
endif
diff --git a/src/randr.c b/src/gamma-randr.c
index 4ee1756..ec70746 100644
--- a/src/randr.c
+++ b/src/gamma-randr.c
@@ -1,4 +1,4 @@
-/* randr.c -- X RandR gamma adjustment source
+/* gamma-randr.c -- X RANDR gamma adjustment source
This file is part of Redshift.
Redshift is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@
#include <xcb/xcb.h>
#include <xcb/randr.h>
-#include "randr.h"
+#include "gamma-randr.h"
#include "colorramp.h"
diff --git a/src/randr.h b/src/gamma-randr.h
index 3ad83bf..307bdd2 100644
--- a/src/randr.h
+++ b/src/gamma-randr.h
@@ -1,4 +1,4 @@
-/* randr.h -- X RandR gamma adjustment header
+/* gamma-randr.h -- X RANDR gamma adjustment header
This file is part of Redshift.
Redshift is free software: you can redistribute it and/or modify
@@ -17,8 +17,8 @@
Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
*/
-#ifndef _REDSHIFT_RANDR_H
-#define _REDSHIFT_RANDR_H
+#ifndef _REDSHIFT_GAMMA_RANDR_H
+#define _REDSHIFT_GAMMA_RANDR_H
#include <stdint.h>
@@ -49,4 +49,4 @@ void randr_restore(randr_state_t *state);
int randr_set_temperature(randr_state_t *state, int temp, float gamma[3]);
-#endif /* ! _REDSHIFT_RANDR_H */
+#endif /* ! _REDSHIFT_GAMMA_RANDR_H */
diff --git a/src/vidmode.c b/src/gamma-vidmode.c
index df66f8c..f9be408 100644
--- a/src/vidmode.c
+++ b/src/gamma-vidmode.c
@@ -1,4 +1,4 @@
-/* vidmode.c -- X VidMode gamma adjustment source
+/* gamma-vidmode.c -- X VidMode gamma adjustment source
This file is part of Redshift.
Redshift is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
-#include "vidmode.h"
+#include "gamma-vidmode.h"
#include "colorramp.h"
diff --git a/src/vidmode.h b/src/gamma-vidmode.h
index 2b6796d..7c351c9 100644
--- a/src/vidmode.h
+++ b/src/gamma-vidmode.h
@@ -1,4 +1,4 @@
-/* vidmode.h -- X VidMode gamma adjustment header
+/* gamma-vidmode.h -- X VidMode gamma adjustment header
This file is part of Redshift.
Redshift is free software: you can redistribute it and/or modify
@@ -17,8 +17,8 @@
Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
*/
-#ifndef _REDSHIFT_VIDMODE_H
-#define _REDSHIFT_VIDMODE_H
+#ifndef _REDSHIFT_GAMMA_VIDMODE_H
+#define _REDSHIFT_GAMMA_VIDMODE_H
#include <stdint.h>
@@ -37,4 +37,4 @@ void vidmode_restore(vidmode_state_t *state);
int vidmode_set_temperature(vidmode_state_t *state, int temp, float gamma[3]);
-#endif /* ! _REDSHIFT_VIDMODE_H */
+#endif /* ! _REDSHIFT_GAMMA_VIDMODE_H */
diff --git a/src/w32gdi.c b/src/gamma-w32gdi.c
index f15746e..d1b6533 100644
--- a/src/w32gdi.c
+++ b/src/gamma-w32gdi.c
@@ -1,4 +1,4 @@
-/* w32gdi.c -- Windows GDI gamma adjustment source
+/* gamma-w32gdi.c -- Windows GDI gamma adjustment source
This file is part of Redshift.
Redshift is free software: you can redistribute it and/or modify
diff --git a/src/w32gdi.h b/src/gamma-w32gdi.h
index 99ba3ee..48787da 100644
--- a/src/w32gdi.h
+++ b/src/gamma-w32gdi.h
@@ -1,4 +1,4 @@
-/* w32gdi.h -- Windows GDI gamma adjustment header
+/* gamma-w32gdi.h -- Windows GDI gamma adjustment header
This file is part of Redshift.
Redshift is free software: you can redistribute it and/or modify
@@ -17,8 +17,8 @@
Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
*/
-#ifndef _REDSHIFT_W32GDI_H
-#define _REDSHIFT_W32GDI_H
+#ifndef _REDSHIFT_GAMMA_W32GDI_H
+#define _REDSHIFT_GAMMA_W32GDI_H
#include <windows.h>
#include <wingdi.h>
@@ -35,4 +35,4 @@ void w32gdi_restore(w32gdi_state_t *state);
int w32gdi_set_temperature(w32gdi_state_t *state, int temp, float gamma[3]);
-#endif /* ! _REDSHIFT_W32GDI_H */
+#endif /* ! _REDSHIFT_GAMMA_W32GDI_H */
diff --git a/src/redshift.c b/src/redshift.c
index 869714f..1364527 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -55,15 +55,15 @@
#endif
#ifdef ENABLE_RANDR
-# include "randr.h"
+# include "gamma-randr.h"
#endif
#ifdef ENABLE_VIDMODE
-# include "vidmode.h"
+# include "gamma-vidmode.h"
#endif
#ifdef ENABLE_WINGDI
-# include "w32gdi.h"
+# include "gamma-w32gdi.h"
#endif
@@ -82,7 +82,7 @@ typedef union {
/* Gamma adjustment method structs */
-static const gamma_method_spec_t gamma_methods[] = {
+static const gamma_method_t gamma_methods[] = {
#ifdef ENABLE_RANDR
{
"RANDR",
@@ -273,7 +273,7 @@ main(int argc, char *argv[])
int temp_night = DEFAULT_NIGHT_TEMP;
float gamma[3] = { DEFAULT_GAMMA, DEFAULT_GAMMA, DEFAULT_GAMMA };
- const gamma_method_spec_t *method = NULL;
+ const gamma_method_t *method = NULL;
char *method_args = NULL;
int transition = 1;
@@ -343,7 +343,7 @@ main(int argc, char *argv[])
/* Lookup argument in gamma methods table */
for (int i = 0; gamma_methods[i].name != NULL; i++) {
- const gamma_method_spec_t *m =
+ const gamma_method_t *m =
&gamma_methods[i];
if (strcasecmp(optarg, m->name) == 0) {
method = m;
@@ -463,7 +463,7 @@ main(int argc, char *argv[])
} else {
/* Try all methods, use the first that works. */
for (int i = 0; gamma_methods[i].name != NULL; i++) {
- const gamma_method_spec_t *m = &gamma_methods[i];
+ const gamma_method_t *m = &gamma_methods[i];
r = m->init(&state, method_args);
if (r < 0) {
fprintf(stderr, _("Initialization of %s"
diff --git a/src/redshift.h b/src/redshift.h
index 3cfe738..38e7f6b 100644
--- a/src/redshift.h
+++ b/src/redshift.h
@@ -33,7 +33,7 @@ typedef struct {
gamma_method_free_func *free;
gamma_method_restore_func *restore;
gamma_method_set_temperature_func *set_temperature;
-} gamma_method_spec_t;
+} gamma_method_t;
#endif /* ! _REDSHIFT_REDSHIFT_H */