]> git.saurik.com Git - cydia.git/blame - iPhonePrivate.h
Replace all images with the new ones from Kyle.
[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>
a68d4636 6#include <UIKit/UIKit.h>
f8e0cf06 7// }}}
5e640a64 8// #import <*> {{{
aa1e1906 9#import <WebKit/DOMHTMLIFrameElement.h>
3cf38067 10#import <WebKit/WebFrame.h>
5e640a64
JF
11#import <WebKit/WebPreferences.h>
12// }}}
f8e0cf06 13// typedef enum {*} *; {{{
c21004b9
JF
14typedef 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
25typedef enum {
26 UINavigationButtonStyleNormal,
27 UINavigationButtonStyleBack,
28 UINavigationButtonStyleHighlighted,
29 UINavigationButtonStyleDestructive
30} UINavigationButtonStyle;
31
32typedef enum {
33 UIProgressIndicatorStyleLargeWhite,
34 UIProgressIndicatorStyleMediumWhite,
35 UIProgressIndicatorStyleMediumBrown,
36 UIProgressIndicatorStyleSmallWhite,
37 UIProgressIndicatorStyleSmallBlack,
38 UIProgressIndicatorStyleTinyWhite,
39} UIProgressIndicatorStyle;
f8e0cf06 40// }}}
2634b249
JF
41// #define * * {{{
42#define UIDataDetectorTypeAutomatic 0x80000000
43// }}}
44// @class Web*; {{{
45@class WebDataSource;
46@class WebScriptObject;
c21004b9 47@class WebView;
f8e0cf06 48// }}}
2634b249
JF
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
8c9453da 70- (void) hide;
2634b249 71- (void) setText:(NSString *)text;
8c9453da 72- (void) showInView:(UIView *)view;
2634b249
JF
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;
4886cc81 89- (void) setScrollerIndicatorStyle:(UIScrollViewIndicatorStyle)style;
2634b249
JF
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
7585ce66
JF
100@interface UITransitionView : UIView
101@end
102
2634b249
JF
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;
2634b249
JF
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
d49718a1
JF
129
130@interface UIWebViewWebViewDelegate : NSObject {
131 @public UIWebView *uiWebView;
132}
0291a3a6
JF
133
134- (void) _clearUIWebView;
135
d49718a1 136@end
2634b249
JF
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// }}}
4f651400
JF
162// @interface UIWeb* : * {{{
163@interface UIWebBrowserView : UIWebDocumentView
164@end
165
166@interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer
167- (int) type;
168- (NSString *) _typeDescription;
169@end
170// }}}
b1497b56
JF
171// @interface WAK* : * {{{
172@interface WAKWindow : NSObject
173+ (BOOL) hasLandscapeOrientation;
174@end
175// }}}
c21004b9 176
f8e0cf06 177// @interface NS* (*) {{{
4825f34a
JF
178@interface NSMutableURLRequest (Apple)
179- (void) setHTTPShouldUsePipelining:(BOOL)pipelining;
180@end
181
c21004b9 182@interface NSString (Apple)
c21004b9
JF
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
5a652738
JF
197@interface NSURLRequest (Apple)
198+ (BOOL) allowsAnyHTTPSCertificateForHost:(NSString *)host;
199+ (void) setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
200@end
201
c21004b9
JF
202@interface NSValue (Apple)
203+ (NSValue *) valueWithSize:(CGSize)size;
204@end
f8e0cf06
JF
205// }}}
206// @interface UI* (*) {{{
c21004b9 207@interface UIActionSheet (Apple)
9daa7f25 208- (void) setContext:(NSString *)context;
c21004b9
JF
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;
8ea72491 231- (void) openURL:(NSURL *)url asPanel:(BOOL)panel;
c21004b9
JF
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
4985045e
JF
241@interface UIColor (Apple)
242+ (UIColor *) pinStripeColor;
243@end
244
c21004b9
JF
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
2634b249
JF
263@interface UIScrollView (Apple)
264- (void) setScrollingEnabled:(BOOL)enabled;
265- (void) setShowBackgroundShadow:(BOOL)show;
266@end
267
c21004b9
JF
268@interface UISearchBar (Apple)
269- (UITextField *) searchField;
270@end
271
7585ce66
JF
272@interface UITabBarController (Apple)
273- (UITransitionView *) _transitionView;
92860339
GP
274- (void) concealTabBarSelection;
275- (void) revealTabBarSelection;
7585ce66
JF
276@end
277
c21004b9
JF
278@interface UITabBarItem (Apple)
279- (void) setAnimatedBadge:(BOOL)animated;
280@end
281
282@interface UITableViewCell (Apple)
283- (float) selectionPercent;
555aaf71 284- (void) _updateHighlightColorsForView:(id)view highlighted:(BOOL)highlighted;
c21004b9
JF
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)
2634b249
JF
300- (UIScroller *) _scroller;
301- (void) setClipsSubviews:(BOOL)clips;
c21004b9 302- (void) setEnabledGestures:(NSInteger)gestures;
2634b249 303- (void) setFixedBackgroundPattern:(BOOL)fixed;
c21004b9
JF
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;
2fcb1d49 313- (void) unloadView;
c21004b9
JF
314@end
315
316@interface UIWindow (Apple)
317- (UIResponder *) firstResponder;
318- (void) makeKey:(UIApplication *)application;
319- (void) orderFront:(UIApplication *)application;
320@end
c21004b9 321
2634b249
JF
322@interface UIWebView (Apple)
323- (UIWebDocumentView *) _documentView;
324- (UIScrollView *) _scrollView;
c21004b9 325- (UIScroller *) _scroller;
7e37a676 326- (void) _updateViewSettings;
72bdb258 327- (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message;
2634b249
JF
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;
64ffa332 332- (void) webView:(WebView *)view didCommitLoadForFrame:(WebFrame *)frame;
2634b249
JF
333- (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
334- (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
c21004b9 335- (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
2634b249
JF
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;
c21004b9 343@end
f8e0cf06 344// }}}
5e640a64 345// @interface Web* (*) {{{
3cf38067
JF
346@interface WebFrame (Apple)
347- (void) setNeedsLayout;
348@end
349
5e640a64
JF
350@interface WebPreferences (Apple)
351+ (void) _setInitialDefaultTextEncodingToSystemEncoding;
352- (void) _setLayoutInterval:(NSInteger)interval;
353- (void) setOfflineWebApplicationCacheEnabled:(BOOL)enabled;
354@end
355// }}}
c21004b9 356
89b0ea4a
JF
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
670fdb01 360// XXX: this is a random jumble of garbage
89b0ea4a
JF
361
362typedef enum {
363 UIModalPresentationFullScreen,
364 UIModalPresentationPageSheet,
365 UIModalPresentationFormSheet,
366 UIModalPresentationCurrentContext,
367} UIModalPresentationStyle;
c21004b9 368
1f984572 369#define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
1f984572 370
ad5271ca
JF
371#define UIBarStyleBlack UIBarStyleBlackOpaque
372
89b0ea4a
JF
373@class NSUndoManager;
374@class UIPasteboard;
375
b2a77283
JF
376@interface UIActionSheet (iPad)
377- (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
378@end
379
89b0ea4a
JF
380@interface UIViewController (iPad)
381- (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
382@end
383
b971f083
JF
384@interface UIApplication (iOS_3_0)
385@property(nonatomic) BOOL applicationSupportsShakeToEdit;
386@end
387
9c1605e2 388@interface UIScrollView (iOS_3_0)
df19d370 389@property(assign,nonatomic) float decelerationRate;
9c1605e2
JF
390@end
391
635c55b4 392@interface UIWebView (iOS_3_0)
df19d370 393@property(assign,nonatomic) NSUInteger dataDetectorTypes;
635c55b4
JF
394@end
395
9c1605e2
JF
396extern float const UIScrollViewDecelerationRateNormal;
397
89b0ea4a
JF
398#endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
399// }}}
670fdb01
JF
400// #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
401#if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
402
403#define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
7154cb90 404#define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
670fdb01
JF
405
406#endif
407// }}}
89b0ea4a 408
c6bcc0c1
JF
409#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
410#define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
411#endif
412
6445279b
JF
413@interface UITabBarItem (iOS_7_0)
414- (id) initWithTitle:(NSString *)title image:(UIImage *)image selectedImage:(UIImage *)selectedImage;
415@end
416
57e8b225
JF
417@interface UIScreen (iOS_4_0)
418@property(nonatomic,readonly) CGFloat scale;
419@end
420
aa1e1906
JF
421@interface DOMHTMLIFrameElement (IDL)
422- (WebFrame *) contentFrame;
423@end
424
89b0ea4a
JF
425// extern *; {{{
426extern CFStringRef const kGSDisplayIdentifiersCapability;
427extern float const UIWebViewGrowsAndShrinksToFitHeight;
428extern float const UIWebViewScalesToFitScale;
f8e0cf06
JF
429// }}}
430// extern "C" *(); {{{
bb0fe3c9 431extern "C" void *reboot2(uint64_t flags);
0e371502 432extern "C" mach_port_t SBSSpringBoardServerPort();
8c5b623f 433extern "C" int SBBundlePathForDisplayIdentifier(mach_port_t port, const char *identifier, char *path);
c21004b9
JF
434extern "C" UIImage *_UIImageWithName(NSString *name);
435extern "C" void UISetColor(CGColorRef color);
f8e0cf06 436// }}}
c21004b9
JF
437
438#endif//CYDIA_UIKITPRIVATE_H