]> git.saurik.com Git - cydia.git/blob - UICaboodle/BrowserView.h
f1a9dbcb56101e97d0226e65e2b9c01dbc25d5a6
[cydia.git] / UICaboodle / BrowserView.h
1 #import "ResetView.h"
2
3 #include <WebKit/DOMCSSPrimitiveValue.h>
4 #include <WebKit/DOMCSSStyleDeclaration.h>
5 #include <WebKit/DOMDocument.h>
6 #include <WebKit/DOMHTMLBodyElement.h>
7 #include <WebKit/DOMNodeList.h>
8 #include <WebKit/DOMRGBColor.h>
9
10 #include <WebKit/WebFrame.h>
11 #include <WebKit/WebPolicyDelegate.h>
12 #include <WebKit/WebPreferences.h>
13 #include <WebKit/WebScriptObject.h>
14
15 #import <WebKit/WebView.h>
16 #import <WebKit/WebView-WebPrivate.h>
17
18 #include <WebCore/Page.h>
19 #include <WebCore/Settings.h>
20
21 #import <JavaScriptCore/JavaScriptCore.h>
22
23 @class NSMutableArray;
24 @class NSString;
25 @class NSURL;
26 @class NSURLRequest;
27
28 @class UIProgressIndicator;
29 @class UIScroller;
30 @class UIDocumentWebView;
31
32 @class WebView;
33
34 @class Database;
35 @class IndirectDelegate;
36
37 @interface WebScriptObject (UICaboodle)
38 - (unsigned) count;
39 - (id) objectAtIndex:(unsigned)index;
40 @end
41
42 @protocol BrowserViewDelegate
43 - (RVPage *) pageForURL:(NSURL *)url hasTag:(int *)tag;
44 @end
45
46 @interface BrowserView : RVPage <
47 RVBookHook
48 > {
49 UIScroller *scroller_;
50 UIWebDocumentView *webview_;
51 UIProgressIndicator *indicator_;
52 IndirectDelegate *indirect_;
53 NSURLAuthenticationChallenge *challenge_;
54
55 bool error_;
56 NSURLRequest *request_;
57
58 NSNumber *confirm_;
59 NSNumber *sensitive_;
60 NSString *title_;
61 NSMutableSet *loading_;
62 bool reloading_;
63
64 NSString *button_;
65 NSString *style_;
66
67 WebScriptObject *function_;
68 WebScriptObject *closer_;
69 WebScriptObject *special_;
70 WebScriptObject *finish_;
71
72 bool pushed_;
73
74 float width_;
75 bool popup_;
76
77 CGSize size_;
78 bool editing_;
79
80 Class class_;
81 }
82
83 - (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button;
84
85 - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy;
86 - (void) loadURL:(NSURL *)url;
87
88 - (void) loadRequest:(NSURLRequest *)request;
89 - (void) reloadURL;
90 - (bool) isLoading;
91
92 - (void) fixScroller;
93
94 - (WebView *) webView;
95 - (UIWebDocumentView *) documentView;
96
97 - (id) initWithBook:(RVBook *)book;
98 - (id) initWithBook:(RVBook *)book forWidth:(float)width;
99 - (id) initWithBook:(RVBook *)book forWidth:(float)width ofClass:(Class)_class;
100
101 - (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script;
102 - (void) callFunction:(WebScriptObject *)function;
103
104 - (void) webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame;
105 - (void) webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
106
107 - (NSURLRequest *) webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)source;
108
109 + (float) defaultWidth;
110 - (void) setViewportWidth:(float)width;
111
112 - (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
113 - (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
114 - (void) setFinishHook:(id)function;
115 - (void) setPopupHook:(id)function;
116
117 - (id) _rightButtonTitle;
118
119 - (bool) promptForSensitive:(NSString *)name;
120 - (bool) allowSensitiveRequests;
121
122 @end