Use the prefix 'gamma' for gamma adjustment source files.

This commit is contained in:
Jon Lund Steffensen
2010-05-24 23:37:36 +02:00
parent 1d88c2b10c
commit 65dd76a221
9 changed files with 31 additions and 31 deletions
+6 -6
View File
@@ -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
+2 -2
View File
@@ -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"
+4 -4
View File
@@ -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 */
+2 -2
View File
@@ -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"
+4 -4
View File
@@ -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 */
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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 */
+7 -7
View File
@@ -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"
+1 -1
View File
@@ -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 */