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