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