]> git.saurik.com Git - cydia.git/blame - CyteKit/WebViewController.h
Also move ListController title support to CyteKit.
[cydia.git] / CyteKit / WebViewController.h
CommitLineData
819a0ab1 1/* Cydia - iPhone UIKit Front-End for Debian APT
4c66fad9 2 * Copyright (C) 2008-2015 Jay Freeman (saurik)
819a0ab1
JF
3*/
4
6d9696a5 5/* GNU General Public License, Version 3 {{{ */
819a0ab1 6/*
6d9696a5
JF
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.
819a0ab1 11 *
6d9696a5
JF
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.
819a0ab1 16 *
6d9696a5
JF
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**/
819a0ab1
JF
20/* }}} */
21
d458596e
JF
22#ifndef CyteKit_WebViewController_H
23#define CyteKit_WebViewController_H
819a0ab1 24
d458596e
JF
25#include "CyteKit/ViewController.h"
26#include "CyteKit/WebView.h"
819a0ab1
JF
27
28#include <UIKit/UIKit.h>
2b2a4e33 29#include <MessageUI/MessageUI.h>
ab398adf 30
facbc56d 31@class IndirectDelegate;
43f3d7f6 32
300a26c1
JF
33@interface Diversion : NSObject
34- (id) initWithFrom:(NSString *)from to:(NSString *)to;
35@end
36
09e89a8a 37@protocol CyteWebViewControllerDelegate
54043703
JF
38- (void) retainNetworkActivityIndicator;
39- (void) releaseNetworkActivityIndicator;
f050e4d9 40- (CyteViewController *) pageForURL:(NSURL *)url forExternal:(BOOL)external withReferrer:(NSString *)referrer;
302bf91c 41- (void) unloadData;
43f3d7f6 42@end
ab398adf 43
cd79e8cf 44@interface CyteWebViewController : CyteViewController <
1ee69bb4 45 CyteWebViewDelegate,
2b2a4e33 46 MFMailComposeViewControllerDelegate,
2634b249 47 UIWebViewDelegate
f8c9fd4c 48>
ab398adf 49
ea173384
JF
50+ (void) _initialize;
51
6f837280 52- (CyteWebView *) webView;
f8c9fd4c 53- (CyteWebViewController *) indirect;
6f837280 54
e8eda555 55- (void) setRequest:(NSURLRequest *)request;
f8c9fd4c
JF
56- (NSURLRequest *) request;
57
eb09425a 58- (void) setURL:(NSURL *)url;
f050e4d9 59- (void) setURL:(NSURL *)url withReferrer:(NSString *)referrer;
eb09425a 60
ab398adf
JF
61- (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy;
62- (void) loadURL:(NSURL *)url;
63
64- (void) loadRequest:(NSURLRequest *)request;
12b59862 65- (bool) isLoading;
ab398adf 66
b5e7eebb 67- (id) init;
68bd7c60 68
eb09425a 69- (id) initWithURL:(NSURL *)url;
68bd7c60
JF
70- (id) initWithRequest:(NSURLRequest *)request;
71
b5e7eebb
GP
72- (id) initWithWidth:(float)width;
73- (id) initWithWidth:(float)width ofClass:(Class)_class;
ab398adf 74
300a26c1
JF
75+ (void) setApplicationNameForUserAgent:(NSString *)userAgent;
76- (NSString *) applicationNameForUserAgent;
77
caa427d1 78- (void) callFunction:(WebScriptObject *)function;
fedd38fe 79- (void) reloadURLWithCache:(BOOL)cache;
caa427d1 80
2634b249 81- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
92de61aa 82
2634b249 83- (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
92de61aa 84- (NSURLRequest *) webThreadWebView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
43f3d7f6 85
3e9c9e85
JF
86+ (float) defaultWidth;
87
caa427d1
JF
88- (void) setButtonImage:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
89- (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function;
5cdfcd6f 90- (void) setHidesNavigationBar:(bool)value;
caa427d1 91
c21004b9 92- (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button;
a5938ea5 93- (void) customButtonClicked;
d53628b6 94
c21004b9 95- (void) applyRightButton;
d53628b6 96- (UIBarButtonItem *) rightButton;
c21004b9 97
e6124cb6
JF
98- (void) applyLeftButton;
99- (UIBarButtonItem *) leftButton;
100
4cc9e99a
JF
101- (void) removeButton;
102
2634b249
JF
103- (void) _didStartLoading;
104- (void) _didFinishLoading;
105
c21004b9
JF
106- (void) close;
107
f196b921
JF
108- (void) dispatchEvent:(NSString *)event;
109
8dbdaafa
JF
110- (void) setViewportWidthOnMainThread:(float)value;
111
db698f42 112- (void) setScrollAlwaysBounceVertical:(bool)value;
4886cc81
JF
113- (void) setScrollIndicatorStyle:(UIScrollViewIndicatorStyle)style;
114
aa1e1906
JF
115- (void) registerFrame:(WebFrame *)frame;
116
300a26c1
JF
117+ (void) addDiversion:(Diversion *)diversion;
118
a5938ea5 119@end
819a0ab1 120
d458596e 121#endif//CyteKit_WebViewController_H