Mercurial > sdl-ios-xcode
diff src/video/cocoa/SDL_cocoawindow.h @ 4673:c17ac64abb70
Fixed the code so we receive Cocoa touch events
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 28 Jul 2010 23:32:13 -0700 |
parents | f7b03b6838cb |
children | 514f811a4887 |
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoawindow.h Tue Jul 27 18:14:09 2010 +0400 +++ b/src/video/cocoa/SDL_cocoawindow.h Wed Jul 28 23:32:13 2010 -0700 @@ -64,6 +64,20 @@ -(void) rightMouseDragged:(NSEvent *) theEvent; -(void) otherMouseDragged:(NSEvent *) theEvent; -(void) scrollWheel:(NSEvent *) theEvent; +-(void) touchesBeganWithEvent:(NSEvent *) theEvent; +-(void) touchesMovedWithEvent:(NSEvent *) theEvent; +-(void) touchesEndedWithEvent:(NSEvent *) theEvent; +-(void) touchesCancelledWithEvent:(NSEvent *) theEvent; + +/* Touch event handling */ +typedef enum { + COCOA_TOUCH_DOWN, + COCOA_TOUCH_UP, + COCOA_TOUCH_MOVE, + COCOA_TOUCH_CANCELLED +} cocoaTouchType; +-(void) handleTouches:(cocoaTouchType)type withEvent:(NSEvent*) event; + @end /* *INDENT-ON* */