summaryrefslogtreecommitdiff
path: root/apps/unix/x11pdf.c
diff options
context:
space:
mode:
authorGlenn Kennard <glenn.kennard@gmail.com>2005-05-08 19:02:08 +0200
committerGlenn Kennard <glenn.kennard@gmail.com>2005-05-08 19:02:08 +0200
commit5922fa3512d1604989933966fd7e63c1c808008f (patch)
treeb71a864cb3d62855424dbceb2cecfdaf0f9027f2 /apps/unix/x11pdf.c
parent7f200b7987e147eaf75dceb907b83358ac25aff7 (diff)
downloadmupdf-5922fa3512d1604989933966fd7e63c1c808008f.tar.xz
scroll wheel support
Scroll up/down -> pan up/down Shift + scroll -> pan left/right Control + scroll -> zoom in/out
Diffstat (limited to 'apps/unix/x11pdf.c')
-rw-r--r--apps/unix/x11pdf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/unix/x11pdf.c b/apps/unix/x11pdf.c
index 0df360db..f12d27f1 100644
--- a/apps/unix/x11pdf.c
+++ b/apps/unix/x11pdf.c
@@ -379,7 +379,7 @@ void onkey(int c)
pdfapp_onkey(&gapp, c);
}
-void onmouse(int x, int y, int btn, int state)
+void onmouse(int x, int y, int btn, int modifiers, int state)
{
if (state != 0 && justcopied)
{
@@ -387,7 +387,7 @@ void onmouse(int x, int y, int btn, int state)
winrepaint(&gapp);
}
- pdfapp_onmouse(&gapp, x, y, btn, state);
+ pdfapp_onmouse(&gapp, x, y, btn, modifiers, state);
}
void usage(void)
@@ -465,7 +465,7 @@ int main(int argc, char **argv)
len = XLookupString(&xevt.xkey, buf, sizeof buf, &keysym, 0);
if (len)
onkey(buf[0]);
- onmouse(oldx, oldy, 0, 0);
+ onmouse(oldx, oldy, 0, 0, 0);
if (dirty)
{
@@ -478,16 +478,16 @@ int main(int argc, char **argv)
case MotionNotify:
oldx = xevt.xbutton.x;
oldy = xevt.xbutton.y;
- onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, 0);
+ onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, xevt.xbutton.state, 0);
break;
case ButtonPress:
- onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, 1);
+ onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, xevt.xbutton.state, 1);
break;
case ButtonRelease:
copytime = xevt.xbutton.time;
- onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, -1);
+ onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, xevt.xbutton.state, -1);
break;
case SelectionRequest: