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