aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-08-05 10:17:36 +0200
committerBert <ber.t@gmx.com>2011-08-05 10:17:36 +0200
commit2b7192b1ac0a72e80cf5a06f406953a600ad54eb (patch)
treecf290b75ab80909764a0af0ecbb31b32ff02244a
parent6b2a0982890f6d2b9f8de873f4d2589d65f90d72 (diff)
Renamed scroll() to pan_screen()
-rw-r--r--config.h8
-rw-r--r--events.c2
-rw-r--r--events.h2
-rw-r--r--image.c10
4 files changed, 11 insertions, 11 deletions
diff --git a/config.h b/config.h
index 8b10a8f..a39cd24 100644
--- a/config.h
+++ b/config.h
@@ -70,10 +70,10 @@ static const keymap_t keys[] = {
{ XK_l, move, DIR_RIGHT },
{ XK_Right, move, DIR_RIGHT },
- { XK_braceleft, scroll, DIR_LEFT },
- { XK_Next, scroll, DIR_DOWN },
- { XK_Prior, scroll, DIR_UP },
- { XK_braceright, scroll, DIR_RIGHT },
+ { XK_braceleft, pan_screen, DIR_LEFT },
+ { XK_Next, pan_screen, DIR_DOWN },
+ { XK_Prior, pan_screen, DIR_UP },
+ { XK_braceright, pan_screen, DIR_RIGHT },
{ XK_H, pan_edge, DIR_LEFT },
{ XK_J, pan_edge, DIR_DOWN },
diff --git a/events.c b/events.c
index daa88ef..6c77271 100644
--- a/events.c
+++ b/events.c
@@ -483,7 +483,7 @@ int move(XEvent *e, arg_t dir) {
return tns_move_selection(&tns, &win, dir);
}
-int scroll(XEvent *e, arg_t dir) {
+int pan_screen(XEvent *e, arg_t dir) {
if (mode == MODE_NORMAL)
return img_pan(&img, &win, dir, 1);
else
diff --git a/events.h b/events.h
index d5ddca7..129a74f 100644
--- a/events.h
+++ b/events.h
@@ -56,7 +56,7 @@ int first(XEvent*, arg_t);
int last(XEvent*, arg_t);
int remove_image(XEvent*, arg_t);
int move(XEvent*, arg_t);
-int scroll(XEvent*, arg_t);
+int pan_screen(XEvent*, arg_t);
int pan_edge(XEvent*, arg_t);
int drag(XEvent*, arg_t);
int rotate(XEvent*, arg_t);
diff --git a/image.c b/image.c
index d03e3c7..c9e53de 100644
--- a/image.c
+++ b/image.c
@@ -277,19 +277,19 @@ int img_move(img_t *img, win_t *win, int dx, int dy) {
return ox != img->x || oy != img->y;
}
-int img_pan(img_t *img, win_t *win, direction_t dir, int page) {
+int img_pan(img_t *img, win_t *win, direction_t dir, int screen) {
if (!img || !img->im || !win)
return 0;
switch (dir) {
case DIR_LEFT:
- return img_move(img, win, win->w / (page ? 1 : 5), 0);
+ return img_move(img, win, win->w / (screen ? 1 : 5), 0);
case DIR_RIGHT:
- return img_move(img, win, win->w / (page ? 1 : 5) * -1, 0);
+ return img_move(img, win, win->w / (screen ? 1 : 5) * -1, 0);
case DIR_UP:
- return img_move(img, win, 0, win->h / (page ? 1 : 5));
+ return img_move(img, win, 0, win->h / (screen ? 1 : 5));
case DIR_DOWN:
- return img_move(img, win, 0, win->h / (page ? 1 : 5) * -1);
+ return img_move(img, win, 0, win->h / (screen ? 1 : 5) * -1);
}
return 0;