From: Jay Freeman (saurik) Date: Sun, 13 Mar 2011 23:03:27 +0000 (-0700) Subject: Add WebEventTouchCancel, using WebEvent.h. X-Git-Tag: v1.1.0%b7~19 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/ea5bf5ccf084c34aaf358b4b197b88ea4143a695?ds=inline Add WebEventTouchCancel, using WebEvent.h. --- diff --git a/CyteKit/dispatchEvent.mm b/CyteKit/dispatchEvent.mm index f0e79add..76e24afc 100644 --- a/CyteKit/dispatchEvent.mm +++ b/CyteKit/dispatchEvent.mm @@ -40,6 +40,8 @@ #include "CyteKit/dispatchEvent.h" #include "CyteKit/WebThreadLocked.hpp" +#include + #include #include #include @@ -78,9 +80,15 @@ MSHook(void, UIWebBrowserView$_webTouchEventsRecognized$, UIWebBrowserView *self, SEL _cmd, UIWebTouchEventsGestureRecognizer *recognizer) { _UIWebBrowserView$_webTouchEventsRecognized$(self, _cmd, recognizer); - if ([recognizer type] == 8) - //if ([[recognizer _typeDescription] isEqualToString:@"WebEventTouchEnd"]) - [self dispatchEvent:@"CydiaTouchEnd"]; + switch ([recognizer type]) { + case WebEventTouchEnd: + [self dispatchEvent:@"CydiaTouchEnd"]; + break; + + case WebEventTouchCancel: + [self dispatchEvent:@"CydiaTouchCancel"]; + break; + } } __attribute__((__constructor__)) static void $() { diff --git a/sysroot.sh b/sysroot.sh index dab2084f..7845792f 100755 --- a/sysroot.sh +++ b/sysroot.sh @@ -117,6 +117,7 @@ wget -O CoreFoundation/CFUniChar.h "http://www.opensource.apple.com/source/CF/CF if true; then mkdir -p WebCore wget -O WebCore/WebCoreThread.h 'http://www.opensource.apple.com/source/WebCore/WebCore-658.28/wak/WebCoreThread.h?txt' + wget -O WebCore/WebEvent.h 'http://www.opensource.apple.com/source/WebCore/WebCore-658.28/platform/iphone/WebEvent.h?txt' else wget -O WebCore.tgz http://www.opensource.apple.com/tarballs/WebCore/WebCore-658.28.tar.gz tar -zx --transform 's@^[^/]*/@WebCore.d/@' -f WebCore.tgz