summaryrefslogtreecommitdiff
path: root/pugl_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-17 21:56:37 +0000
committerDavid Robillard <d@drobilla.net>2014-01-17 21:56:37 +0000
commit12898ecf40723adb674bad95c10d1e8092794297 (patch)
tree131ca9eebaa3c488b7124db4831392872f25caf1 /pugl_test.c
parentcea41bcb9be36fdfe9d273133996e1622586f27b (diff)
Add mouse position to PuglScrollFunc (apply #896).
Fix compilation of pugl_test.
Diffstat (limited to 'pugl_test.c')
-rw-r--r--pugl_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pugl_test.c b/pugl_test.c
index 8338d51..b9a54f5 100644
--- a/pugl_test.c
+++ b/pugl_test.c
@@ -138,9 +138,9 @@ onMouse(PuglView* view, int button, bool press, int x, int y)
}
static void
-onScroll(PuglView* view, float dx, float dy)
+onScroll(PuglView* view, int x, int y, float dx, float dy)
{
- fprintf(stderr, "Scroll %f %f ", dx, dy);
+ fprintf(stderr, "Scroll %d %d %f %f ", x, y, dx, dy);
printModifiers(view);
dist += dy / 4.0f;
puglPostRedisplay(view);
@@ -173,7 +173,7 @@ main(int argc, char** argv)
}
}
- PuglView* view = puglCreate(0, "Pugl Test", 512, 512, resizable);
+ PuglView* view = puglCreate(0, "Pugl Test", 512, 512, resizable, true);
puglIgnoreKeyRepeat(view, ignoreKeyRepeat);
puglSetKeyboardFunc(view, onKeyboard);
puglSetMotionFunc(view, onMotion);