summaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorAndrás Mohari <andras.mohari@gmail.com>2013-11-13 20:54:09 +0100
committerAndrás Mohari <andras.mohari@gmail.com>2013-11-13 20:54:09 +0100
commit0353e6eea265f5f6fa53eb75300529d9ffa6d4fa (patch)
tree8b1e30131ec3eb3edd4cd7df7d955db3270b0c17 /config.def.h
parent450c1ed9b54de4d374bff80735c874bb6f7a4a0f (diff)
downloadnsxiv-0353e6eea265f5f6fa53eb75300529d9ffa6d4fa.tar.zst
Add support for changing the gamma value
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index f5d048a..b877aa1 100644
--- a/config.def.h
+++ b/config.def.h
@@ -46,6 +46,12 @@ enum {
GIF_LOOP = 0 /* endless loop [0/1] */
};
+/* gamma correction: the user-visible ranges [-GAMMA_RANGE, 0] and
+ * (0, GAMMA_RANGE] are mapped to the ranges [0, 1], and (1, GAMMA_MAX].
+ * */
+static const double GAMMA_MAX = 10.0;
+static const int GAMMA_RANGE = 32;
+
#endif
#ifdef _THUMBS_CONFIG
@@ -141,6 +147,11 @@ static const keymap_t keys[] = {
{ false, XK_a, i_toggle_antialias, (arg_t) None },
{ false, XK_A, it_toggle_alpha, (arg_t) None },
+ /* decrease/increase/reset gamma */
+ { false, XK_braceleft, i_change_gamma, (arg_t) -1 },
+ { false, XK_braceright, i_change_gamma, (arg_t) +1 },
+ { true, XK_G, i_change_gamma, (arg_t) 0 },
+
/* open current image with given program: */
{ true, XK_g, it_open_with, (arg_t) "gimp" },