]>
Commit | Line | Data |
---|---|---|
1 | /* Cydia - iPhone UIKit Front-End for Debian APT | |
2 | * Copyright (C) 2008-2015 Jay Freeman (saurik) | |
3 | */ | |
4 | ||
5 | /* GNU General Public License, Version 3 {{{ */ | |
6 | /* | |
7 | * Cydia is free software: you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published | |
9 | * by the Free Software Foundation, either version 3 of the License, | |
10 | * or (at your option) any later version. | |
11 | * | |
12 | * Cydia is distributed in the hope that it will be useful, but | |
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License | |
18 | * along with Cydia. If not, see <http://www.gnu.org/licenses/>. | |
19 | **/ | |
20 | /* }}} */ | |
21 | ||
22 | #ifndef CyteKit_WebViewController_H | |
23 | #define CyteKit_WebViewController_H | |
24 | ||
25 | #include "CyteKit/ViewController.h" | |
26 | #include "CyteKit/WebView.h" | |
27 | ||
28 | #include <UIKit/UIKit.h> | |
29 | #include <MessageUI/MessageUI.h> | |
30 | ||
31 | @class IndirectDelegate; | |
32 | ||
33 | @interface Diversion : NSObject | |
34 | - (id) initWithFrom:(NSString *)from to:(NSString *)to; | |
35 | @end | |
36 | ||
37 | @protocol CyteWebViewControllerDelegate | |
38 | - (void) retainNetworkActivityIndicator; | |
39 | - (void) releaseNetworkActivityIndicator; | |
40 | - (CyteViewController *) pageForURL:(NSURL *)url forExternal:(BOOL)external withReferrer:(NSString *)referrer; | |
41 | - (void) unloadData; | |
42 | @end | |
43 | ||
44 | @interface CyteWebViewController : CyteViewController < | |
45 | CyteWebViewDelegate, | |
46 | MFMailComposeViewControllerDelegate, | |
47 | UIWebViewDelegate | |
48 | > | |
49 | ||
50 | + (void) _initialize; | |
51 | ||
52 | - (CyteWebView *) webView; | |
53 | - (CyteWebViewController *) indirect; | |
54 | ||
55 | - (void) setRequest:(NSURLRequest *)request; | |
56 | - (NSURLRequest *) request; | |
57 | ||
58 | - (void) setURL:(NSURL *)url; | |
59 | - (void) setURL:(NSURL *)url withReferrer:(NSString *)referrer; | |
60 | ||
61 | - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy; | |
62 | - (void) loadURL:(NSURL *)url; | |
63 | ||
64 | - (void) loadRequest:(NSURLRequest *)request; | |
65 | - (bool) isLoading; | |
66 | ||
67 | - (id) init; | |
68 | ||
69 | - (id) initWithURL:(NSURL *)url; | |
70 | - (id) initWithRequest:(NSURLRequest *)request; | |
71 | ||
72 | - (id) initWithWidth:(float)width; | |
73 | - (id) initWithWidth:(float)width ofClass:(Class)_class; | |
74 | ||
75 | + (void) setApplicationNameForUserAgent:(NSString *)userAgent; | |
76 | - (NSString *) applicationNameForUserAgent; | |
77 | ||
78 | - (void) callFunction:(WebScriptObject *)function; | |
79 | - (void) reloadURLWithCache:(BOOL)cache; | |
80 | ||
81 | - (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame; | |
82 | ||
83 | - (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source; | |
84 | - (NSURLRequest *) webThreadWebView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source; | |
85 | ||
86 | + (float) defaultWidth; | |
87 | ||
88 | - (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function; | |
89 | - (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function; | |
90 | - (void) setHidesNavigationBar:(bool)value; | |
91 | ||
92 | - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button; | |
93 | - (void) customButtonClicked; | |
94 | ||
95 | - (void) applyRightButton; | |
96 | - (UIBarButtonItem *) rightButton; | |
97 | ||
98 | - (void) applyLeftButton; | |
99 | - (UIBarButtonItem *) leftButton; | |
100 | ||
101 | - (void) removeButton; | |
102 | ||
103 | - (void) _didStartLoading; | |
104 | - (void) _didFinishLoading; | |
105 | ||
106 | - (void) close; | |
107 | ||
108 | - (void) dispatchEvent:(NSString *)event; | |
109 | ||
110 | - (void) setViewportWidthOnMainThread:(float)value; | |
111 | ||
112 | - (void) setScrollAlwaysBounceVertical:(bool)value; | |
113 | - (void) setScrollIndicatorStyle:(UIScrollViewIndicatorStyle)style; | |
114 | ||
115 | - (void) registerFrame:(WebFrame *)frame; | |
116 | ||
117 | + (void) addDiversion:(Diversion *)diversion; | |
118 | ||
119 | @end | |
120 | ||
121 | #endif//CyteKit_WebViewController_H |