1 #import <UICaboodle/RVPage.h>
2 #import <UICaboodle/RVBook.h>
4 #import <UIKit/UIKit.h>
6 #include <WebKit/DOMNodeList.h>
7 #include <WebKit/WebFrame.h>
8 #include <WebKit/WebScriptObject.h>
9 #include <WebKit/WebView.h>
11 #import <JavaScriptCore/JavaScriptCore.h>
13 @
class NSMutableArray
;
18 @
class UIProgressIndicator
;
20 @
class UIDocumentWebView
;
25 @
class IndirectDelegate
;
27 @interface
WebScriptObject (UICaboodle
)
29 - (id
) objectAtIndex
:(unsigned)index
;
32 @protocol BrowserControllerDelegate
33 - (CYViewController
*) pageForURL
:(NSURL
*)url hasTag
:(int *)tag
;
36 @interface BrowserController
: CYViewController
<
39 UIScroller
*scroller_
;
40 UIWebDocumentView
*document_
;
41 UIProgressIndicator
*indicator_
;
42 IndirectDelegate
*indirect_
;
43 NSURLAuthenticationChallenge
*challenge_
;
46 NSURLRequest
*request_
;
51 NSMutableSet
*loading_
;
57 WebScriptObject
*function_
;
58 WebScriptObject
*closer_
;
59 WebScriptObject
*special_
;
60 WebScriptObject
*finish_
;
78 - (void) loadURL
:(NSURL
*)url cachePolicy
:(NSURLRequestCachePolicy
)policy
;
79 - (void) loadURL
:(NSURL
*)url
;
81 - (void) loadRequest
:(NSURLRequest
*)request
;
87 - (WebView
*) webView
;
88 - (UIWebDocumentView
*) documentView
;
91 - (id
) initWithWidth
:(float)width
;
92 - (id
) initWithWidth
:(float)width ofClass
:(Class
)_class
;
94 - (NSString
*) stringByEvaluatingJavaScriptFromString
:(NSString
*)script
;
95 - (void) callFunction
:(WebScriptObject
*)function
;
97 - (void) webView
:(WebView
*)sender didFinishLoadForFrame
:(WebFrame
*)frame
;
98 - (void) webView
:(WebView
*)sender didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
100 - (NSURLRequest
*) webView
:(WebView
*)sender resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)redirectResponse fromDataSource
:(WebDataSource
*)source
;
102 + (float) defaultWidth
;
103 - (void) setViewportWidth
:(float)width
;
105 - (void) setButtonImage
:(NSString
*)button withStyle
:(NSString
*)style toFunction
:(id
)function
;
106 - (void) setButtonTitle
:(NSString
*)button withStyle
:(NSString
*)style toFunction
:(id
)function
;
107 - (void) setFinishHook
:(id
)function
;
108 - (void) setPopupHook
:(id
)function
;
110 - (bool) promptForSensitive
:(NSString
*)name
;
111 - (bool) allowSensitiveRequests
;
113 - (void) alertView
:(UIAlertView
*)alert clickedButtonAtIndex
:(NSInteger
)button
;
114 - (void) customButtonClicked
;
115 - (void) applyRightButton
;
117 - (void) _startLoading
;