summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-16 18:42:37 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-02-17 02:21:53 -0800
commit0815487b46ade8251134bd69837235709e2ce3f0 (patch)
tree01e9315efa47269bb22dc9a5c4becc100409658a /UICaboodle
parent6f9865b332e0c83b101ccac28ba43d6766b2c040 (diff)
Support ShowInternals in more places.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.mm28
1 files changed, 21 insertions, 7 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index c4e4b36..56ee266 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -29,6 +29,11 @@ extern NSString * const kCAFilterNearest;
#define ForSaurik 0
#define DefaultTimeout_ 120.0
+#define ShowInternals 0
+#define LogBrowser 0
+
+#define lprintf(args...) fprintf(stderr, args)
+
template <typename Type_>
static inline void CYRelease(Type_ &value) {
if (value != nil) {
@@ -86,18 +91,28 @@ float CYScrollViewDecelerationRateNormal;
- (BOOL) respondsToSelector:(SEL)sel {
if ([super respondsToSelector:sel])
return YES;
+
// XXX: WebThreadCreateNSInvocation returns nil
- //fprintf(stderr, "[%s]R?%s\n", class_getName(self->isa), sel_getName(sel));
+
+#if ShowInternals
+ fprintf(stderr, "[%s]R?%s\n", class_getName(self->isa), sel_getName(sel));
+#endif
+
return delegate_ == nil ? NO : [delegate_ respondsToSelector:sel];
}
- (NSMethodSignature *) methodSignatureForSelector:(SEL)sel {
if (NSMethodSignature *method = [super methodSignatureForSelector:sel])
return method;
- //fprintf(stderr, "[%s]S?%s\n", class_getName(self->isa), sel_getName(sel));
+
+#if ShowInternals
+ fprintf(stderr, "[%s]S?%s\n", class_getName(self->isa), sel_getName(sel));
+#endif
+
if (delegate_ != nil)
if (NSMethodSignature *sig = [delegate_ methodSignatureForSelector:sel])
return sig;
+
// XXX: I fucking hate Apple so very very bad
return [NSMethodSignature signatureWithObjCTypes:"v@:"];
}
@@ -198,6 +213,10 @@ enum CYWebPolicyDecision {
@implementation CYWebView : UIWebView
+#if ShowInternals
+#include "UICaboodle/UCInternal.h"
+#endif
+
- (id) initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame]) != nil) {
} return self;
@@ -403,11 +422,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
@end
-#define ShowInternals 0
-#define LogBrowser 0
-
-#define lprintf(args...) fprintf(stderr, args)
-
@implementation BrowserController
#if ShowInternals