summaryrefslogtreecommitdiff
path: root/CyteKit
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-06-08 22:42:18 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-06-08 22:42:18 -0700
commit4cc9e99a32a73858f3b9739c0cf8ec82bb35e93e (patch)
tree31fbd2791655a0e23e3bd0a173744d92602dd0f1 /CyteKit
parent058813ae78aec1b25c7c44b2a6188b7ae2264107 (diff)
Make compilations with clang succeed.
Diffstat (limited to 'CyteKit')
-rw-r--r--CyteKit/WebView.h3
-rw-r--r--CyteKit/WebView.mm4
-rw-r--r--CyteKit/WebViewController.h2
-rw-r--r--CyteKit/WebViewController.mm4
-rw-r--r--CyteKit/WebViewTableViewCell.h4
-rw-r--r--CyteKit/dispatchEvent.mm2
6 files changed, 15 insertions, 4 deletions
diff --git a/CyteKit/WebView.h b/CyteKit/WebView.h
index c9e10c8..39fd8ff 100644
--- a/CyteKit/WebView.h
+++ b/CyteKit/WebView.h
@@ -58,6 +58,7 @@ enum CYWebPolicyDecision {
};
@protocol CyteWebViewDelegate <UIWebViewDelegate>
+@optional
- (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message;
- (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
- (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
@@ -81,6 +82,8 @@ enum CYWebPolicyDecision {
}
- (id<CyteWebViewDelegate>) delegate;
+- (void) setDelegate:(id<CyteWebViewDelegate>)delegate;
+
- (void) dispatchEvent:(NSString *)event;
- (void) reloadFromOrigin;
- (UIScrollView *) scrollView;
diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm
index 1706cc0..084926b 100644
--- a/CyteKit/WebView.mm
+++ b/CyteKit/WebView.mm
@@ -138,6 +138,10 @@
return (id<CyteWebViewDelegate>) [super delegate];
}
+- (void) setDelegate:(id<CyteWebViewDelegate>)delegate {
+ [super setDelegate:delegate];
+}
+
/*- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request {
id<CyteWebViewDelegate> delegate([self delegate]);
WebView *created(nil);
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h
index 9b9ba94..5807e78 100644
--- a/CyteKit/WebViewController.h
+++ b/CyteKit/WebViewController.h
@@ -138,6 +138,8 @@
- (void) applyLeftButton;
- (UIBarButtonItem *) leftButton;
+- (void) removeButton;
+
- (void) _didStartLoading;
- (void) _didFinishLoading;
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index e5cfbb4..25e9aeb 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -534,7 +534,7 @@ float CYScrollViewDecelerationRateNormal;
if ([frame parentFrame] == nil) {
if (DOMDocument *document = [frame DOMDocument])
- if (DOMNodeList<NSFastEnumeration> *bodies = [document getElementsByTagName:@"body"])
+ if (DOMNodeList *bodies = [document getElementsByTagName:@"body"])
for (DOMHTMLBodyElement *body in (id) bodies) {
DOMCSSStyleDeclaration *style([document getComputedStyle:body pseudoElement:nil]);
@@ -697,7 +697,7 @@ float CYScrollViewDecelerationRateNormal;
- (UIBarButtonItem *) customButton {
if (custom_ == nil)
return nil;
- else if (custom_ == [NSNull null])
+ else if ((/*clang:*/id) custom_ == [NSNull null])
return (UIBarButtonItem *) [NSNull null];
return [[[UIBarButtonItem alloc]
diff --git a/CyteKit/WebViewTableViewCell.h b/CyteKit/WebViewTableViewCell.h
index c328e33..bff680e 100644
--- a/CyteKit/WebViewTableViewCell.h
+++ b/CyteKit/WebViewTableViewCell.h
@@ -45,7 +45,9 @@
#include "Menes/ObjectHandle.h"
#include "CyteKit/WebView.h"
-@interface CyteWebViewTableViewCell : UITableViewCell {
+@interface CyteWebViewTableViewCell : UITableViewCell <
+ CyteWebViewDelegate
+> {
// XXX: I'm not really the delegate here: fix this!
_H<CyteWebView, 1> webview_;
}
diff --git a/CyteKit/dispatchEvent.mm b/CyteKit/dispatchEvent.mm
index 76e24af..81b7089 100644
--- a/CyteKit/dispatchEvent.mm
+++ b/CyteKit/dispatchEvent.mm
@@ -94,7 +94,7 @@ MSHook(void, UIWebBrowserView$_webTouchEventsRecognized$, UIWebBrowserView *self
__attribute__((__constructor__)) static void $() {
if (Class $UIWebBrowserView = objc_getClass("UIWebBrowserView")) {
if (Method method = class_getInstanceMethod($UIWebBrowserView, @selector(_webTouchEventsRecognized:))) {
- _UIWebBrowserView$_webTouchEventsRecognized$ = reinterpret_cast<void (*)(UIWebBrowserView *, SEL, id)>(method_getImplementation(method));
+ _UIWebBrowserView$_webTouchEventsRecognized$ = reinterpret_cast<void (*)(UIWebBrowserView *, SEL, UIWebTouchEventsGestureRecognizer *)>(method_getImplementation(method));
method_setImplementation(method, reinterpret_cast<IMP>(&$UIWebBrowserView$_webTouchEventsRecognized$));
}
}