]> git.saurik.com Git - cydia.git/blob - UICaboodle/BrowserView.h
We don't want a compile-time flag for RotationEnabled: we want it to work that way...
[cydia.git] / UICaboodle / BrowserView.h
1 #import "ResetView.h"
2
3 #include <WebKit/DOMNodeList.h>
4 #include <WebKit/WebFrame.h>
5 #include <WebKit/WebScriptObject.h>
6 #include <WebKit/WebView.h>
7
8 #import <JavaScriptCore/JavaScriptCore.h>
9
10 @class NSMutableArray;
11 @class NSString;
12 @class NSURL;
13 @class NSURLRequest;
14
15 @class UIProgressIndicator;
16 @class UIScroller;
17 @class UIDocumentWebView;
18
19 @class WebView;
20
21 @class Database;
22 @class IndirectDelegate;
23
24 @interface WebScriptObject (UICaboodle)
25 - (unsigned) count;
26 - (id) objectAtIndex:(unsigned)index;
27 @end
28
29 @protocol BrowserControllerDelegate
30 - (UCViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag;
31 @end
32
33 @interface BrowserController : UCViewController <
34 HookProtocol
35 > {
36 UIScroller *scroller_;
37 UIWebDocumentView *document_;
38 UIProgressIndicator *indicator_;
39 IndirectDelegate *indirect_;
40 NSURLAuthenticationChallenge *challenge_;
41
42 bool error_;
43 NSURLRequest *request_;
44
45 NSNumber *confirm_;
46 NSNumber *sensitive_;
47 NSString *title_;
48 NSMutableSet *loading_;
49 bool reloading_;
50
51 NSString *button_;
52 NSString *style_;
53
54 WebScriptObject *function_;
55 WebScriptObject *closer_;
56 WebScriptObject *special_;
57 WebScriptObject *finish_;
58
59 bool pushed_;
60
61 float width_;
62 bool popup_;
63
64 CGSize size_;
65 bool editing_;
66
67 Class class_;
68
69 id reloaditem_;
70 id loadingitem_;
71 }
72
73 + (void) _initialize;
74
75 - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy;
76 - (void) loadURL:(NSURL *)url;
77
78 - (void) loadRequest:(NSURLRequest *)request;
79 - (void) reloadURL;
80 - (bool) isLoading;
81
82 - (void) fixScroller;
83
84 - (WebView *) webView;
85 - (UIWebDocumentView *) documentView;
86
87 - (id) init;
88 - (id) initWithWidth:(float)width;
89 - (id) initWithWidth:(float)width ofClass:(Class)_class;
90
91 - (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script;
92 - (void) callFunction:(WebScriptObject *)function;
93
94 - (void) webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame;
95 - (void) webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
96
97 - (NSURLRequest *) webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)source;
98
99 + (float) defaultWidth;
100 - (void) setViewportWidth:(float)width;
101
102 - (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
103 - (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
104 - (void) setFinishHook:(id)function;
105 - (void) setPopupHook:(id)function;
106
107 - (bool) promptForSensitive:(NSString *)name;
108 - (bool) allowSensitiveRequests;
109
110 - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button;
111 - (void) customButtonClicked;
112 - (void) applyRightButton;
113
114 - (void) _startLoading;
115 - (void) close;
116
117 @end