aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.h
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2017-10-13 19:08:55 -0700
committerJon Lund Steffensen <jonlst@gmail.com>2017-10-13 19:08:57 -0700
commite075444663c854fde18f8d20c1bececc96a5c4ff (patch)
treed7c94df10b1d1680f2254f7cb47d9c70329578f2 /src/redshift.h
parentMerge pull request #535 from jonls/cleanup (diff)
downloadredshift-ng-e075444663c854fde18f8d20c1bececc96a5c4ff.tar.gz
redshift-ng-e075444663c854fde18f8d20c1bececc96a5c4ff.tar.bz2
redshift-ng-e075444663c854fde18f8d20c1bececc96a5c4ff.tar.xz
Change preserve option to command line switch
Changes each adjustment method to take a preserve parameter when setting the temperature instead of parsing the preserve option from the command line/configuration file. This helps resolve the issues around #513: - This allows the preserve option to be implemented as a command-line switch (-P). This switch _disables_ the preservation of existing gamma ramps. Having a command-line switch makes it easier to use directly with manual or one-shot mode. - The preserve options is on by default, so continual mode as well as other modes will default to applying the color adjustment on top of the current gamma ramps. - Preserve is always disabled in reset mode so resetting works as expected again.
Diffstat (limited to 'src/redshift.h')
-rw-r--r--src/redshift.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/redshift.h b/src/redshift.h
index f597c67..0282d83 100644
--- a/src/redshift.h
+++ b/src/redshift.h
@@ -88,8 +88,8 @@ typedef void gamma_method_print_help_func(FILE *f);
typedef int gamma_method_set_option_func(gamma_state_t *state, const char *key,
const char *value);
typedef void gamma_method_restore_func(gamma_state_t *state);
-typedef int gamma_method_set_temperature_func(gamma_state_t *state,
- const color_setting_t *setting);
+typedef int gamma_method_set_temperature_func(
+ gamma_state_t *state, const color_setting_t *setting, int preserve);
typedef struct {
char *name;