Changes all set_temperature function in gamma adjustment methods to take a color_setting_t pointer with the color settings. Colorramp functions are similarly changed to take a color settings struct.
76 lines
1.7 KiB
C
76 lines
1.7 KiB
C
/* gamma-dummy.c -- No-op gamma adjustment
|
|
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) 2013-2014 Jon Lund Steffensen <jonlst@gmail.com>
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifdef ENABLE_NLS
|
|
# include <libintl.h>
|
|
# define _(s) gettext(s)
|
|
#else
|
|
# define _(s) s
|
|
#endif
|
|
|
|
#include "redshift.h"
|
|
|
|
|
|
int
|
|
gamma_dummy_init(void *state)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
gamma_dummy_start(void *state)
|
|
{
|
|
fputs(_("WARNING: Using dummy gamma method! Display will not be affected by this gamma method.\n"), stderr);
|
|
return 0;
|
|
}
|
|
|
|
void
|
|
gamma_dummy_restore(void *state)
|
|
{
|
|
}
|
|
|
|
void
|
|
gamma_dummy_free(void *state)
|
|
{
|
|
}
|
|
|
|
void
|
|
gamma_dummy_print_help(FILE *f)
|
|
{
|
|
fputs(_("Does not affect the display but prints the color temperature to the terminal.\n"), f);
|
|
fputs("\n", f);
|
|
}
|
|
|
|
int
|
|
gamma_dummy_set_option(void *state, const char *key, const char *value)
|
|
{
|
|
fprintf(stderr, _("Unknown method parameter: `%s'.\n"), key);
|
|
return -1;
|
|
}
|
|
|
|
int
|
|
gamma_dummy_set_temperature(void *state, const color_setting_t *setting)
|
|
{
|
|
printf(_("Temperature: %i\n"), setting->temperature);
|
|
return 0;
|
|
}
|