]> git.saurik.com Git - cydia.git/blob - iPhonePrivate.h
Downgrade support for -[UIWebView setDataDetectorTypes].
[cydia.git] / iPhonePrivate.h
1 #ifndef CYDIA_UIKITPRIVATE_H
2 #define CYDIA_UIKITPRIVATE_H
3
4 // #include <*> {{{
5 #include <GraphicsServices/GraphicsServices.h>
6 // }}}
7 // typedef enum {*} *; {{{
8 typedef 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
19 typedef enum {
20 UINavigationButtonStyleNormal,
21 UINavigationButtonStyleBack,
22 UINavigationButtonStyleHighlighted,
23 UINavigationButtonStyleDestructive
24 } UINavigationButtonStyle;
25
26 typedef enum {
27 UIProgressIndicatorStyleLargeWhite,
28 UIProgressIndicatorStyleMediumWhite,
29 UIProgressIndicatorStyleMediumBrown,
30 UIProgressIndicatorStyleSmallWhite,
31 UIProgressIndicatorStyleSmallBlack,
32 UIProgressIndicatorStyleTinyWhite,
33 } UIProgressIndicatorStyle;
34 // }}}
35 // #define * * {{{
36 #define UIDataDetectorTypeAutomatic 0x80000000
37 // }}}
38 // @class Web*; {{{
39 @class WebDataSource;
40 @class WebScriptObject;
41 @class WebView;
42 // }}}
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
64 - (id) initWithWindow:(UIWindow *)window;
65 - (void) setText:(NSString *)text;
66 - (void) show:(BOOL)show;
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
93 @interface UIWebDocumentView : UIView
94 - (CGRect) documentBounds;
95 - (void) enableReachability;
96 - (void) loadRequest:(NSURLRequest *)request;
97 - (void) redrawScaledDocument;
98 - (void) setAllowsImageSheet:(BOOL)allows;
99 - (void) setAllowsMessaging:(BOOL)allows;
100 - (void) setAutoresizes:(BOOL)autoresizes;
101 - (void) setContentsPosition:(NSInteger)position;
102 - (void) setDrawsBackground:(BOOL)draws;
103 - (void) _setDocumentType:(NSInteger)type;
104 - (void) setDrawsGrid:(BOOL)draws;
105 - (void) setInitialScale:(float)scale forDocumentTypes:(NSInteger)types;
106 - (void) setLogsTilingChanges:(BOOL)logs;
107 - (void) setMinimumScale:(float)scale forDocumentTypes:(NSInteger)types;
108 - (void) setMinimumSize:(CGSize)size;
109 - (void) setMaximumScale:(float)scale forDocumentTypes:(NSInteger)tpyes;
110 - (void) setSmoothsFonts:(BOOL)smooths;
111 - (void) setTileMinificationFilter:(NSString *)filter;
112 - (void) setTileSize:(CGSize)size;
113 - (void) setTilingEnabled:(BOOL)enabled;
114 - (void) setViewportSize:(CGSize)size forDocumentTypes:(NSInteger)types;
115 - (void) setZoomsFocusedFormControl:(BOOL)zooms;
116 - (void) useSelectionAssistantWithMode:(NSInteger)mode;
117 - (WebView *) webView;
118 @end
119 // }}}
120 // @interface *Button : * {{{
121 @interface UINavigationButton : UIButton
122 - (id) initWithTitle:(NSString *)title style:(UINavigationButtonStyle)style;
123 - (void) setBarStyle:(UIBarStyle)style;
124 @end
125
126 @interface UIPushButton : UIControl
127 - (id) backgroundForState:(NSUInteger)state;
128 - (void) setAutosizesToFit:(BOOL)autosizes;
129 - (void) setBackground:(id)background forState:(NSUInteger)state;
130 - (void) setDrawsShadow:(BOOL)draws;
131 - (void) setStretchBackground:(BOOL)stretch;
132 - (void) setTitle:(NSString *)title;
133 - (void) setTitleFont:(UIFont *)font;
134 @end
135
136 @interface UIThreePartButton : UIPushButton
137 @end
138 // }}}
139 // @interface * : NS* {{{
140 @interface WebDefaultUIKitDelegate : NSObject
141 + (WebDefaultUIKitDelegate *) sharedUIKitDelegate;
142 @end
143 // }}}
144
145 // @interface NS* (*) {{{
146 @interface NSString (Apple)
147 - (NSString *) stringByAddingPercentEscapes;
148 - (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to;
149 @end
150
151 @interface NSURL (Apple)
152 - (BOOL) isGoogleMapsURL;
153 - (BOOL) isSpringboardHandledURL;
154 // XXX: make this an enum
155 - (NSURL *) itmsURL:(NSInteger *)store;
156 - (NSURL *) mapsURL;
157 - (NSURL *) phobosURL;
158 - (NSURL *) youTubeURL;
159 @end
160
161 @interface NSValue (Apple)
162 + (NSValue *) valueWithSize:(CGSize)size;
163 @end
164 // }}}
165 // @interface UI* (*) {{{
166 @interface UIActionSheet (Apple)
167 - (void) setContext:(NSString *)context;
168 - (NSString *) context;
169 @end
170
171 @interface UIAlertView (Apple)
172 - (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label;
173 - (id) buttons;
174 - (NSString *) context;
175 - (void) setContext:(NSString *)context;
176 - (void) setNumberOfRows:(int)rows;
177 - (void) setRunsModal:(BOOL)modal;
178 - (UITextField *) textField;
179 - (UITextField *) textFieldAtIndex:(NSUInteger)index;
180 - (void) _updateFrameForDisplay;
181 @end
182
183 @interface UIApplication (Apple)
184 - (void) applicationSuspend:(GSEventRef)event;
185 - (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale;
186 - (void) applicationOpenURL:(NSURL *)url;
187 - (void) applicationWillResignActive:(UIApplication *)application;
188 - (void) applicationWillSuspend;
189 - (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
190 - (void) removeApplicationBadge;
191 - (void) setApplicationBadge:(NSString *)badge;
192 - (void) setApplicationBadgeString:(NSString *)badge;
193 - (void) setStatusBarShowsProgress:(BOOL)shows;
194 - (void) _setSuspended:(BOOL)suspended;
195 - (void) terminateWithSuccess;
196 @end
197
198 @interface UIBarButtonItem (Apple)
199 - (UIView *) view;
200 @end
201
202 @interface UIControl (Apple)
203 - (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events;
204 @end
205
206 @interface UIDevice (Apple)
207 - (BOOL) isWildcat;
208 @end
209
210 @interface UIImage (Apple)
211 + (UIImage *) applicationImageNamed:(NSString *)name;
212 + (UIImage *) imageAtPath:(NSString *)path;
213 @end
214
215 @interface UINavigationBar (Apple)
216 + (CGSize) defaultSize;
217 - (UIBarStyle) _barStyle:(BOOL)style;
218 @end
219
220 @interface UIScrollView (Apple)
221 - (void) setScrollingEnabled:(BOOL)enabled;
222 - (void) setShowBackgroundShadow:(BOOL)show;
223 @end
224
225 @interface UISearchBar (Apple)
226 - (UITextField *) searchField;
227 @end
228
229 @interface UITabBarItem (Apple)
230 - (void) setAnimatedBadge:(BOOL)animated;
231 @end
232
233 @interface UITableViewCell (Apple)
234 - (float) selectionPercent;
235 @end
236
237 @interface UITextField (Apple)
238 - (UITextInputTraits *) textInputTraits;
239 @end
240
241 @interface UITextView (Apple)
242 - (UIFont *) font;
243 - (void) setAllowsRubberBanding:(BOOL)rubberbanding;
244 - (void) setFont:(UIFont *)font;
245 - (void) setMarginTop:(int)margin;
246 - (void) setTextColor:(UIColor *)color;
247 @end
248
249 @interface UIView (Apple)
250 - (UIScroller *) _scroller;
251 - (void) setClipsSubviews:(BOOL)clips;
252 - (void) setEnabledGestures:(NSInteger)gestures;
253 - (void) setFixedBackgroundPattern:(BOOL)fixed;
254 - (void) setGestureDelegate:(id)delegate;
255 - (void) setNeedsDisplayOnBoundsChange:(BOOL)needs;
256 - (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute;
257 - (void) setZoomScale:(float)scale duration:(double)duration;
258 - (void) _setZoomScale:(float)scale duration:(double)duration;
259 @end
260
261 @interface UIViewController (Apple)
262 - (void) _updateLayoutForStatusBarAndInterfaceOrientation;
263 @end
264
265 @interface UIWindow (Apple)
266 - (UIResponder *) firstResponder;
267 - (void) makeKey:(UIApplication *)application;
268 - (void) orderFront:(UIApplication *)application;
269 @end
270
271 @interface UIWebView (Apple)
272 - (UIWebDocumentView *) _documentView;
273 - (UIScrollView *) _scrollView;
274 - (UIScroller *) _scroller;
275 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
276 - (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
277 - (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
278 - (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
279 - (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
280 - (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
281 - (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
282 - (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame;
283 - (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame;
284 - (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
285 - (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
286 - (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
287 - (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame;
288 - (void) webViewClose:(WebView *)view;
289 @end
290 // }}}
291
292 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
293 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
294 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
295
296 typedef enum {
297 UIModalPresentationFullScreen,
298 UIModalPresentationPageSheet,
299 UIModalPresentationFormSheet,
300 UIModalPresentationCurrentContext,
301 } UIModalPresentationStyle;
302
303 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
304 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
305
306 #define UIBarStyleBlack UIBarStyleBlackOpaque
307
308 @class NSUndoManager;
309 @class UIPasteboard;
310
311 @interface UIActionSheet (iPad)
312 - (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
313 @end
314
315 @interface UIViewController (iPad)
316 - (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
317 @end
318
319 @interface UIScrollView (iOS_3_0)
320 @property(assign, nonatomic) float decelerationRate;
321 @end
322
323 @interface UIWebView (iOS_3_0)
324 @property(assign, nonatomic) NSUInteger dataDetectorTypes;
325 @end
326
327 extern float const UIScrollViewDecelerationRateNormal;
328
329 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
330 // }}}
331
332 // extern *; {{{
333 extern CFStringRef const kGSDisplayIdentifiersCapability;
334 extern float const UIWebViewGrowsAndShrinksToFitHeight;
335 extern float const UIWebViewScalesToFitScale;
336 // }}}
337 // extern "C" *(); {{{
338 extern "C" UIImage *_UIImageWithName(NSString *name);
339 extern "C" void UISetColor(CGColorRef color);
340 // }}}
341
342 #endif//CYDIA_UIKITPRIVATE_H