]> git.saurik.com Git - cydia.git/blame - UICaboodle/BrowserView.h
Add back a documentation warning from the old BrowserView.
[cydia.git] / UICaboodle / BrowserView.h
CommitLineData
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 26
c2292b80
JF
27@protocol CYWebViewDelegate <UIWebViewDelegate>
28- (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
29- (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
30- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
31- (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
32- (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
33- (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
34- (void) webView:(WebView *)view didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame;
35- (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame;
36- (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
37- (void) webViewClose:(WebView *)view;
38- (bool) webView:(WebView *)view shouldRunJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
39- (bool) webView:(WebView *)view shouldRunJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
40- (bool) webView:(WebView *)view shouldRunJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame;
9297d5d5 41- (void) webViewUpdateViewSettings:(UIWebView *)view;
c2292b80
JF
42@end
43
44@interface CYWebView : UIWebView
45- (id<CYWebViewDelegate>) delegate;
46@end
47
61b13cae 48@interface WebScriptObject (UICaboodle)
485f16d6 49- (NSUInteger) count;
61b13cae
JF
50- (id) objectAtIndex:(unsigned)index;
51@end
52
c8e3b4b3 53@protocol BrowserControllerDelegate
881fe77f 54- (CYViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag;
61b13cae 55@end
59efd93a 56
881fe77f 57@interface BrowserController : CYViewController <
c2292b80
JF
58 CYWebViewDelegate,
59 HookProtocol,
60 UIWebViewDelegate
1e4922b8 61> {
a591888a
JF
62 _transient CYWebView *webview_;
63 _transient UIScrollView *scroller_;
c2292b80 64
59efd93a 65 UIProgressIndicator *indicator_;
20b8724d 66 IndirectDelegate *indirect_;
67c04058 67 NSURLAuthenticationChallenge *challenge_;
f4772bd1
JF
68
69 bool error_;
2c3974c5 70 NSURLRequest *request_;
59efd93a 71
a591888a 72 _transient NSNumber *sensitive_;
c2292b80 73
59efd93a 74 NSString *title_;
9d7f5e2d 75 NSMutableSet *loading_;
48c0461e 76
c2292b80
JF
77 // XXX: NSString * or UIImage *
78 id custom_;
a99d2808 79 NSString *style_;
9d7f5e2d 80
a99d2808 81 WebScriptObject *function_;
1ce016d4 82 WebScriptObject *closer_;
7b00c562
JF
83
84 float width_;
85021801 85 Class class_;
f99f86e2 86
c2292b80
JF
87 UIBarButtonItem *reloaditem_;
88 UIBarButtonItem *loadingitem_;
59efd93a
JF
89}
90
4825688a
JF
91+ (void) _initialize;
92
59efd93a
JF
93- (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy;
94- (void) loadURL:(NSURL *)url;
95
96- (void) loadRequest:(NSURLRequest *)request;
97- (void) reloadURL;
1ce016d4 98- (bool) isLoading;
59efd93a 99
9ae52960
GP
100- (id) init;
101- (id) initWithWidth:(float)width;
102- (id) initWithWidth:(float)width ofClass:(Class)_class;
59efd93a 103
9d7f5e2d
JF
104- (void) callFunction:(WebScriptObject *)function;
105
c2292b80
JF
106- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
107- (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
61b13cae 108
7b00c562
JF
109+ (float) defaultWidth;
110
9d7f5e2d
JF
111- (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
112- (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
9d7f5e2d
JF
113- (void) setPopupHook:(id)function;
114
1e4922b8 115- (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button;
3db9f43c 116- (void) customButtonClicked;
1e4922b8
JF
117- (void) applyRightButton;
118
c2292b80
JF
119- (void) _didStartLoading;
120- (void) _didFinishLoading;
121
1e4922b8
JF
122- (void) close;
123
3db9f43c 124@end