summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CyteKit/dispatchEvent.mm14
-rwxr-xr-xsysroot.sh1
2 files changed, 12 insertions, 3 deletions
diff --git a/CyteKit/dispatchEvent.mm b/CyteKit/dispatchEvent.mm
index f0e79ad..76e24af 100644
--- a/CyteKit/dispatchEvent.mm
+++ b/CyteKit/dispatchEvent.mm
@@ -40,6 +40,8 @@
#include "CyteKit/dispatchEvent.h"
#include "CyteKit/WebThreadLocked.hpp"
+#include <WebCore/WebEvent.h>
+
#include <WebKit/WebFrame.h>
#include <WebKit/WebScriptObject.h>
#include <WebKit/WebView.h>
@@ -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 dab2084..7845792 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