aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-10-27 14:17:08 -0400
committerDavid Robillard <d@drobilla.net>2016-10-27 14:17:08 -0400
commit38fab74452bd06732b1b4fc6213b8cca62718d9d (patch)
tree9f63fcf7d2576ef5db2f5c462ac026996f288272
parentbe0df74bfc3aca82522080ad62f08320bb24ea4d (diff)
downloadpugl-38fab74452bd06732b1b4fc6213b8cca62718d9d.tar.gz
pugl-38fab74452bd06732b1b4fc6213b8cca62718d9d.tar.bz2
pugl-38fab74452bd06732b1b4fc6213b8cca62718d9d.zip
Support many mouse buttons on OSX
-rw-r--r--pugl/pugl_osx.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 250e5d5..d2681cb 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -131,6 +131,9 @@ struct PuglInternalsImpl {
- (void) rightMouseDragged:(NSEvent*)event;
- (void) rightMouseDown:(NSEvent*)event;
- (void) rightMouseUp:(NSEvent*)event;
+- (void) otherMouseDragged:(NSEvent*)event;
+- (void) otherMouseDown:(NSEvent*)event;
+- (void) otherMouseUp:(NSEvent*)event;
- (void) scrollWheel:(NSEvent*)event;
- (void) keyDown:(NSEvent*)event;
- (void) keyUp:(NSEvent*)event;
@@ -303,6 +306,11 @@ getModifiers(PuglView* view, NSEvent* ev)
[self mouseMoved: event];
}
+- (void) otherMouseDragged:(NSEvent*)event
+{
+ [self mouseMoved: event];
+}
+
- (void) mouseDown:(NSEvent*)event
{
const NSPoint wloc = [self eventLocation:event];
@@ -352,6 +360,16 @@ getModifiers(PuglView* view, NSEvent* ev)
[self mouseUp: event];
}
+- (void) otherMouseDown:(NSEvent*)event
+{
+ [self mouseDown: event];
+}
+
+- (void) otherMouseUp:(NSEvent*)event
+{
+ [self mouseUp: event];
+}
+
- (void) scrollWheel:(NSEvent*)event
{
[self updateTrackingAreas];