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