]> git.saurik.com Git - cydia.git/blame - iPhonePrivate.h
Add -[CyteWebViewController setRequest:].
[cydia.git] / iPhonePrivate.h
CommitLineData
c21004b9 1#ifndef CYDIA_UIKITPRIVATE_H
ffbc8ef2 2#define CYDIA_UIKITPRIVATE_H
c21004b9 3
f8e0cf06 4// #include <*> {{{
c21004b9 5#include <GraphicsServices/GraphicsServices.h>
f8e0cf06
JF
6// }}}
7// typedef enum {*} *; {{{
c21004b9
JF
8typedef enum {
9 UIGestureAttributeMinDegrees, /*float*/
10 UIGestureAttributeMaxDegrees, /*float*/
11 UIGestureAttributeMinScale, /*float*/
12 UIGestureAttributeMaxScale, /*float*/
13 UIGestureAttributeIsZoomRubberBandEnabled, /*BOOL*/
14 UIGestureAttributeZoomsFromCurrentToMinOrMax, /*BOOL*/
15 UIGestureAttributeVisibleSize, /*CGSize*/
16 UIGestureAttributeUpdatesScroller, /*BOOL*/
17} UIGestureAttribute;
18
19typedef enum {
20 UINavigationButtonStyleNormal,
21 UINavigationButtonStyleBack,
22 UINavigationButtonStyleHighlighted,
23 UINavigationButtonStyleDestructive
24} UINavigationButtonStyle;
25
26typedef enum {
27 UIProgressIndicatorStyleLargeWhite,
28 UIProgressIndicatorStyleMediumWhite,
29 UIProgressIndicatorStyleMediumBrown,
30 UIProgressIndicatorStyleSmallWhite,
31 UIProgressIndicatorStyleSmallBlack,
32 UIProgressIndicatorStyleTinyWhite,
33} UIProgressIndicatorStyle;
f8e0cf06 34// }}}
2634b249
JF
35// #define * * {{{
36#define UIDataDetectorTypeAutomatic 0x80000000
37// }}}
38// @class Web*; {{{
39@class WebDataSource;
40@class WebScriptObject;
c21004b9 41@class WebView;
f8e0cf06 42// }}}
2634b249
JF
43// @protocol *; {{{
44@protocol WebPolicyDecisionListener;
45// }}}
46
47// @interface * : UIView {{{
48@interface UIFormAssistant : UIView
49+ (UIFormAssistant *) sharedFormAssistant;
50- (CGRect) peripheralFrame;
51@end
52
53@interface UIKeyboard : UIView
54+ (void) initImplementationNow;
55@end
56
57@interface UIProgressBar : UIView
58+ (CGSize) defaultSize;
59- (void) setProgress:(float)progress;
60- (void) setStyle:(NSInteger)style;
61@end
62
63@interface UIProgressHUD : UIView
8c9453da 64- (void) hide;
2634b249 65- (void) setText:(NSString *)text;
8c9453da 66- (void) showInView:(UIView *)view;
2634b249
JF
67@end
68
69@interface UIProgressIndicator : UIView
70+ (CGSize) defaultSizeForStyle:(NSUInteger)style;
71- (NSUInteger) activityIndicatorViewStyle;
72- (void) setStyle:(UIProgressIndicatorStyle)style;
73- (void) startAnimation;
74@end
75
76@interface UIScroller : UIView
77- (CGSize) contentSize;
78- (void) setDirectionalScrolling:(BOOL)directional;
79- (void) setEventMode:(NSInteger)mode;
80- (void) setOffset:(CGPoint)offset;
81- (void) setScrollDecelerationFactor:(float)factor;
82- (void) setScrollHysteresis:(float)hysteresis;
83- (void) setThumbDetectionEnabled:(BOOL)enabled;
84@end
85
86@interface UITextLabel : UIView
87- (void) setCentersHorizontally:(BOOL)centers;
88- (void) setColor:(UIColor *)color;
89- (void) setFont:(UIFont *)font;
90- (void) setText:(NSString *)text;
91@end
92
7585ce66
JF
93@interface UITransitionView : UIView
94@end
95
2634b249
JF
96@interface UIWebDocumentView : UIView
97- (CGRect) documentBounds;
98- (void) enableReachability;
99- (void) loadRequest:(NSURLRequest *)request;
100- (void) redrawScaledDocument;
101- (void) setAllowsImageSheet:(BOOL)allows;
102- (void) setAllowsMessaging:(BOOL)allows;
103- (void) setAutoresizes:(BOOL)autoresizes;
104- (void) setContentsPosition:(NSInteger)position;
2634b249
JF
105- (void) setDrawsBackground:(BOOL)draws;
106- (void) _setDocumentType:(NSInteger)type;
107- (void) setDrawsGrid:(BOOL)draws;
108- (void) setInitialScale:(float)scale forDocumentTypes:(NSInteger)types;
109- (void) setLogsTilingChanges:(BOOL)logs;
110- (void) setMinimumScale:(float)scale forDocumentTypes:(NSInteger)types;
111- (void) setMinimumSize:(CGSize)size;
112- (void) setMaximumScale:(float)scale forDocumentTypes:(NSInteger)tpyes;
113- (void) setSmoothsFonts:(BOOL)smooths;
114- (void) setTileMinificationFilter:(NSString *)filter;
115- (void) setTileSize:(CGSize)size;
116- (void) setTilingEnabled:(BOOL)enabled;
117- (void) setViewportSize:(CGSize)size forDocumentTypes:(NSInteger)types;
118- (void) setZoomsFocusedFormControl:(BOOL)zooms;
119- (void) useSelectionAssistantWithMode:(NSInteger)mode;
120- (WebView *) webView;
121@end
d49718a1
JF
122
123@interface UIWebViewWebViewDelegate : NSObject {
124 @public UIWebView *uiWebView;
125}
126@end
2634b249
JF
127// }}}
128// @interface *Button : * {{{
129@interface UINavigationButton : UIButton
130- (id) initWithTitle:(NSString *)title style:(UINavigationButtonStyle)style;
131- (void) setBarStyle:(UIBarStyle)style;
132@end
133
134@interface UIPushButton : UIControl
135- (id) backgroundForState:(NSUInteger)state;
136- (void) setAutosizesToFit:(BOOL)autosizes;
137- (void) setBackground:(id)background forState:(NSUInteger)state;
138- (void) setDrawsShadow:(BOOL)draws;
139- (void) setStretchBackground:(BOOL)stretch;
140- (void) setTitle:(NSString *)title;
141- (void) setTitleFont:(UIFont *)font;
142@end
143
144@interface UIThreePartButton : UIPushButton
145@end
146// }}}
147// @interface * : NS* {{{
148@interface WebDefaultUIKitDelegate : NSObject
149+ (WebDefaultUIKitDelegate *) sharedUIKitDelegate;
150@end
151// }}}
4f651400
JF
152// @interface UIWeb* : * {{{
153@interface UIWebBrowserView : UIWebDocumentView
154@end
155
156@interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer
157- (int) type;
158- (NSString *) _typeDescription;
159@end
160// }}}
c21004b9 161
f8e0cf06 162// @interface NS* (*) {{{
4825f34a
JF
163@interface NSMutableURLRequest (Apple)
164- (void) setHTTPShouldUsePipelining:(BOOL)pipelining;
165@end
166
c21004b9 167@interface NSString (Apple)
c21004b9
JF
168- (NSString *) stringByAddingPercentEscapes;
169- (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to;
170@end
171
172@interface NSURL (Apple)
173- (BOOL) isGoogleMapsURL;
174- (BOOL) isSpringboardHandledURL;
175// XXX: make this an enum
176- (NSURL *) itmsURL:(NSInteger *)store;
177- (NSURL *) mapsURL;
178- (NSURL *) phobosURL;
179- (NSURL *) youTubeURL;
180@end
181
5a652738
JF
182@interface NSURLRequest (Apple)
183+ (BOOL) allowsAnyHTTPSCertificateForHost:(NSString *)host;
184+ (void) setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
185@end
186
c21004b9
JF
187@interface NSValue (Apple)
188+ (NSValue *) valueWithSize:(CGSize)size;
189@end
f8e0cf06
JF
190// }}}
191// @interface UI* (*) {{{
c21004b9 192@interface UIActionSheet (Apple)
9daa7f25 193- (void) setContext:(NSString *)context;
c21004b9
JF
194- (NSString *) context;
195@end
196
197@interface UIAlertView (Apple)
198- (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label;
199- (id) buttons;
200- (NSString *) context;
201- (void) setContext:(NSString *)context;
202- (void) setNumberOfRows:(int)rows;
203- (void) setRunsModal:(BOOL)modal;
204- (UITextField *) textField;
205- (UITextField *) textFieldAtIndex:(NSUInteger)index;
206- (void) _updateFrameForDisplay;
207@end
208
209@interface UIApplication (Apple)
210- (void) applicationSuspend:(GSEventRef)event;
211- (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale;
212- (void) applicationOpenURL:(NSURL *)url;
213- (void) applicationWillResignActive:(UIApplication *)application;
214- (void) applicationWillSuspend;
215- (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
8ea72491 216- (void) openURL:(NSURL *)url asPanel:(BOOL)panel;
c21004b9
JF
217- (void) setStatusBarShowsProgress:(BOOL)shows;
218- (void) _setSuspended:(BOOL)suspended;
219- (void) terminateWithSuccess;
220@end
221
222@interface UIBarButtonItem (Apple)
223- (UIView *) view;
224@end
225
4985045e
JF
226@interface UIColor (Apple)
227+ (UIColor *) pinStripeColor;
228@end
229
c21004b9
JF
230@interface UIControl (Apple)
231- (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events;
232@end
233
234@interface UIDevice (Apple)
235- (BOOL) isWildcat;
236@end
237
238@interface UIImage (Apple)
239+ (UIImage *) applicationImageNamed:(NSString *)name;
240+ (UIImage *) imageAtPath:(NSString *)path;
241@end
242
243@interface UINavigationBar (Apple)
244+ (CGSize) defaultSize;
245- (UIBarStyle) _barStyle:(BOOL)style;
246@end
247
2634b249
JF
248@interface UIScrollView (Apple)
249- (void) setScrollingEnabled:(BOOL)enabled;
250- (void) setShowBackgroundShadow:(BOOL)show;
251@end
252
c21004b9
JF
253@interface UISearchBar (Apple)
254- (UITextField *) searchField;
255@end
256
7585ce66
JF
257@interface UITabBarController (Apple)
258- (UITransitionView *) _transitionView;
92860339
GP
259- (void) concealTabBarSelection;
260- (void) revealTabBarSelection;
7585ce66
JF
261@end
262
c21004b9
JF
263@interface UITabBarItem (Apple)
264- (void) setAnimatedBadge:(BOOL)animated;
265@end
266
267@interface UITableViewCell (Apple)
268- (float) selectionPercent;
555aaf71 269- (void) _updateHighlightColorsForView:(id)view highlighted:(BOOL)highlighted;
c21004b9
JF
270@end
271
272@interface UITextField (Apple)
273- (UITextInputTraits *) textInputTraits;
274@end
275
276@interface UITextView (Apple)
277- (UIFont *) font;
278- (void) setAllowsRubberBanding:(BOOL)rubberbanding;
279- (void) setFont:(UIFont *)font;
280- (void) setMarginTop:(int)margin;
281- (void) setTextColor:(UIColor *)color;
282@end
283
284@interface UIView (Apple)
2634b249
JF
285- (UIScroller *) _scroller;
286- (void) setClipsSubviews:(BOOL)clips;
c21004b9 287- (void) setEnabledGestures:(NSInteger)gestures;
2634b249 288- (void) setFixedBackgroundPattern:(BOOL)fixed;
c21004b9
JF
289- (void) setGestureDelegate:(id)delegate;
290- (void) setNeedsDisplayOnBoundsChange:(BOOL)needs;
291- (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute;
292- (void) setZoomScale:(float)scale duration:(double)duration;
293- (void) _setZoomScale:(float)scale duration:(double)duration;
294@end
295
296@interface UIViewController (Apple)
297- (void) _updateLayoutForStatusBarAndInterfaceOrientation;
298@end
299
300@interface UIWindow (Apple)
301- (UIResponder *) firstResponder;
302- (void) makeKey:(UIApplication *)application;
303- (void) orderFront:(UIApplication *)application;
304@end
c21004b9 305
2634b249
JF
306@interface UIWebView (Apple)
307- (UIWebDocumentView *) _documentView;
308- (UIScrollView *) _scrollView;
c21004b9 309- (UIScroller *) _scroller;
7e37a676 310- (void) _updateViewSettings;
72bdb258 311- (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message;
2634b249
JF
312//- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
313- (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
314- (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
315- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
316- (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
317- (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
c21004b9 318- (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
2634b249
JF
319- (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame;
320- (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame;
321- (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
322- (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
323- (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
324- (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame;
325- (void) webViewClose:(WebView *)view;
c21004b9 326@end
f8e0cf06 327// }}}
c21004b9 328
89b0ea4a
JF
329// #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
330#ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
331#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
670fdb01 332// XXX: this is a random jumble of garbage
89b0ea4a
JF
333
334typedef enum {
335 UIModalPresentationFullScreen,
336 UIModalPresentationPageSheet,
337 UIModalPresentationFormSheet,
338 UIModalPresentationCurrentContext,
339} UIModalPresentationStyle;
c21004b9 340
1f984572 341#define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
1f984572 342
ad5271ca
JF
343#define UIBarStyleBlack UIBarStyleBlackOpaque
344
89b0ea4a
JF
345@class NSUndoManager;
346@class UIPasteboard;
347
b2a77283
JF
348@interface UIActionSheet (iPad)
349- (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
350@end
351
89b0ea4a
JF
352@interface UIViewController (iPad)
353- (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
354@end
355
b971f083
JF
356@interface UIApplication (iOS_3_0)
357@property(nonatomic) BOOL applicationSupportsShakeToEdit;
358@end
359
9c1605e2 360@interface UIScrollView (iOS_3_0)
df19d370 361@property(assign,nonatomic) float decelerationRate;
9c1605e2
JF
362@end
363
635c55b4 364@interface UIWebView (iOS_3_0)
df19d370 365@property(assign,nonatomic) NSUInteger dataDetectorTypes;
635c55b4
JF
366@end
367
9c1605e2
JF
368extern float const UIScrollViewDecelerationRateNormal;
369
89b0ea4a
JF
370#endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
371// }}}
670fdb01
JF
372// #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
373#if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
374
375#define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
7154cb90 376#define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
670fdb01
JF
377
378#endif
379// }}}
89b0ea4a 380
c6bcc0c1
JF
381#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
382#define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
383#endif
384
57e8b225
JF
385@interface UIScreen (iOS_4_0)
386@property(nonatomic,readonly) CGFloat scale;
387@end
388
89b0ea4a
JF
389// extern *; {{{
390extern CFStringRef const kGSDisplayIdentifiersCapability;
391extern float const UIWebViewGrowsAndShrinksToFitHeight;
392extern float const UIWebViewScalesToFitScale;
f8e0cf06
JF
393// }}}
394// extern "C" *(); {{{
bb0fe3c9 395extern "C" void *reboot2(uint64_t flags);
0e371502 396extern "C" mach_port_t SBSSpringBoardServerPort();
c21004b9
JF
397extern "C" UIImage *_UIImageWithName(NSString *name);
398extern "C" void UISetColor(CGColorRef color);
f8e0cf06 399// }}}
c21004b9
JF
400
401#endif//CYDIA_UIKITPRIVATE_H