Skip to content

Commit

Permalink
add touch event stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlebron committed Nov 28, 2022
1 parent eb934b2 commit 49a4483
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions macos/cc/JWMMainView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,30 @@ - (BOOL)acceptsFirstResponder {
return YES;
}

- (NSTouchTypeMask)allowedTouchTypes {
return NSTouchTypeMaskIndirect | NSTouchTypeMaskDirect;
}

- (BOOL)acceptsTouchEvents {
return YES;
}

- (void)touchesBeganWithEvent:(NSEvent *)event {
NSLog(@"TOUCH BEGAN");
}

- (void)touchesMovedWithEvent:(NSEvent *)event {
NSLog(@"TOUCH MOVED");
}

- (void)touchesEndedWithEvent:(NSEvent *)event {
NSLog(@"TOUCH ENDED");
}

- (void)touchesCancelledWithEvent:(NSEvent *)event {
NSLog(@"TOUCH CANCELED");
}

- (void)updateTrackingAreas {
if (fTrackingArea != nil) {
[self removeTrackingArea:fTrackingArea];
Expand Down

0 comments on commit 49a4483

Please sign in to comment.