]>
Commit | Line | Data |
---|---|---|
a2ae332e JF |
1 | #import <UICaboodle/RVPage.h> |
2 | #import <UICaboodle/RVBook.h> | |
3 | ||
4 | #import <UIKit/UIKit.h> | |
59efd93a | 5 | |
bde2d79b | 6 | #include <WebKit/DOMNodeList.h> |
bde2d79b | 7 | #include <WebKit/WebFrame.h> |
bde2d79b | 8 | #include <WebKit/WebScriptObject.h> |
1e4922b8 | 9 | #include <WebKit/WebView.h> |
bde2d79b JF |
10 | |
11 | #import <JavaScriptCore/JavaScriptCore.h> | |
12 | ||
59efd93a JF |
13 | @class NSMutableArray; |
14 | @class NSString; | |
15 | @class NSURL; | |
16 | @class NSURLRequest; | |
17 | ||
18 | @class UIProgressIndicator; | |
19 | @class UIScroller; | |
20b8724d | 20 | @class UIDocumentWebView; |
59efd93a | 21 | |
d210b85d JF |
22 | @class WebView; |
23 | ||
59efd93a | 24 | @class Database; |
20b8724d | 25 | @class IndirectDelegate; |
61b13cae JF |
26 | |
27 | @interface WebScriptObject (UICaboodle) | |
28 | - (unsigned) count; | |
29 | - (id) objectAtIndex:(unsigned)index; | |
30 | @end | |
31 | ||
c8e3b4b3 | 32 | @protocol BrowserControllerDelegate |
881fe77f | 33 | - (CYViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag; |
61b13cae | 34 | @end |
59efd93a | 35 | |
881fe77f | 36 | @interface BrowserController : CYViewController < |
1e4922b8 JF |
37 | HookProtocol |
38 | > { | |
59efd93a | 39 | UIScroller *scroller_; |
2fd3803f | 40 | UIWebDocumentView *document_; |
59efd93a | 41 | UIProgressIndicator *indicator_; |
20b8724d | 42 | IndirectDelegate *indirect_; |
67c04058 | 43 | NSURLAuthenticationChallenge *challenge_; |
f4772bd1 JF |
44 | |
45 | bool error_; | |
2c3974c5 | 46 | NSURLRequest *request_; |
59efd93a | 47 | |
a99d2808 | 48 | NSNumber *confirm_; |
0fc560b6 | 49 | NSNumber *sensitive_; |
59efd93a | 50 | NSString *title_; |
9d7f5e2d | 51 | NSMutableSet *loading_; |
59efd93a | 52 | bool reloading_; |
48c0461e | 53 | |
a99d2808 JF |
54 | NSString *button_; |
55 | NSString *style_; | |
9d7f5e2d | 56 | |
a99d2808 | 57 | WebScriptObject *function_; |
1ce016d4 | 58 | WebScriptObject *closer_; |
9d7f5e2d JF |
59 | WebScriptObject *special_; |
60 | WebScriptObject *finish_; | |
a99d2808 | 61 | |
48c0461e | 62 | bool pushed_; |
7b00c562 JF |
63 | |
64 | float width_; | |
65 | bool popup_; | |
dcc55b8b JF |
66 | |
67 | CGSize size_; | |
68 | bool editing_; | |
85021801 JF |
69 | |
70 | Class class_; | |
f99f86e2 | 71 | |
c8e3b4b3 GP |
72 | id reloaditem_; |
73 | id loadingitem_; | |
59efd93a JF |
74 | } |
75 | ||
4825688a JF |
76 | + (void) _initialize; |
77 | ||
59efd93a JF |
78 | - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy; |
79 | - (void) loadURL:(NSURL *)url; | |
80 | ||
81 | - (void) loadRequest:(NSURLRequest *)request; | |
82 | - (void) reloadURL; | |
1ce016d4 | 83 | - (bool) isLoading; |
59efd93a | 84 | |
9d7f5e2d JF |
85 | - (void) fixScroller; |
86 | ||
59efd93a | 87 | - (WebView *) webView; |
5a5c1e4b | 88 | - (UIWebDocumentView *) documentView; |
59efd93a | 89 | |
9ae52960 GP |
90 | - (id) init; |
91 | - (id) initWithWidth:(float)width; | |
92 | - (id) initWithWidth:(float)width ofClass:(Class)_class; | |
59efd93a | 93 | |
9d7f5e2d JF |
94 | - (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script; |
95 | - (void) callFunction:(WebScriptObject *)function; | |
96 | ||
853d14d3 | 97 | - (void) webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame; |
cb9c2100 | 98 | - (void) webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame; |
853d14d3 | 99 | |
61b13cae JF |
100 | - (NSURLRequest *) webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)source; |
101 | ||
7b00c562 | 102 | + (float) defaultWidth; |
dcc55b8b | 103 | - (void) setViewportWidth:(float)width; |
7b00c562 | 104 | |
9d7f5e2d JF |
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; | |
109 | ||
0fc560b6 JF |
110 | - (bool) promptForSensitive:(NSString *)name; |
111 | - (bool) allowSensitiveRequests; | |
112 | ||
1e4922b8 | 113 | - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button; |
3db9f43c | 114 | - (void) customButtonClicked; |
1e4922b8 JF |
115 | - (void) applyRightButton; |
116 | ||
117 | - (void) _startLoading; | |
118 | - (void) close; | |
119 | ||
3db9f43c | 120 | @end |