X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/48c0461e36f4bbf6e4a5d7be6e58af0125bb1f9c..ff1a355f39b4baacc1163b19e3ab7e99109cce4b:/UICaboodle/BrowserView.h diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index c9a1f7d7..c61fef41 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -1,4 +1,14 @@ -#import "ResetView.h" +#import +#import + +#import + +#include +#include +#include +#include + +#import @class NSMutableArray; @class NSString; @@ -7,32 +17,104 @@ @class UIProgressIndicator; @class UIScroller; -@class UIWebView; +@class UIDocumentWebView; + +@class WebView; @class Database; +@class IndirectDelegate; -@interface BrowserView : RVPage { - _transient Database *database_; +@interface WebScriptObject (UICaboodle) +- (NSUInteger) count; +- (id) objectAtIndex:(unsigned)index; +@end + +@protocol BrowserControllerDelegate +- (CYViewController *) pageForURL:(NSURL *)url hasTag:(int *)tag; +@end + +@interface BrowserController : CYViewController < + HookProtocol +> { UIScroller *scroller_; - UIWebView *webview_; - NSMutableArray *urls_; + UIWebDocumentView *document_; UIProgressIndicator *indicator_; + IndirectDelegate *indirect_; + NSURLAuthenticationChallenge *challenge_; + + bool error_; + NSURLRequest *request_; + NSNumber *confirm_; + NSNumber *sensitive_; NSString *title_; - bool loading_; + NSMutableSet *loading_; bool reloading_; + NSString *button_; + NSString *style_; + + WebScriptObject *function_; + WebScriptObject *closer_; + WebScriptObject *special_; + WebScriptObject *finish_; + bool pushed_; + + float width_; + bool popup_; + + CGSize size_; + bool editing_; + + Class class_; + + id reloaditem_; + id loadingitem_; } ++ (void) _initialize; + - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy; - (void) loadURL:(NSURL *)url; - (void) loadRequest:(NSURLRequest *)request; - (void) reloadURL; +- (bool) isLoading; + +- (void) fixScroller; - (WebView *) webView; +- (UIWebDocumentView *) documentView; + +- (id) init; +- (id) initWithWidth:(float)width; +- (id) initWithWidth:(float)width ofClass:(Class)_class; + +- (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script; +- (void) callFunction:(WebScriptObject *)function; + +- (void) webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame; +- (void) webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame; + +- (NSURLRequest *) webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)source; + ++ (float) defaultWidth; +- (void) setViewportWidth:(float)width; + +- (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function; +- (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function; +- (void) setFinishHook:(id)function; +- (void) setPopupHook:(id)function; + +- (bool) promptForSensitive:(NSString *)name; +- (bool) allowSensitiveRequests; + +- (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button; +- (void) customButtonClicked; +- (void) applyRightButton; -- (id) initWithBook:(RVBook *)book database:(Database *)database; +- (void) _startLoading; +- (void) close; @end