]> git.saurik.com Git - cydia.git/blame - iPhonePrivate.h
Use the correct color for 'Loading...'.
[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// }}}
c21004b9 152
f8e0cf06 153// @interface NS* (*) {{{
4825f34a
JF
154@interface NSMutableURLRequest (Apple)
155- (void) setHTTPShouldUsePipelining:(BOOL)pipelining;
156@end
157
c21004b9 158@interface NSString (Apple)
c21004b9
JF
159- (NSString *) stringByAddingPercentEscapes;
160- (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to;
161@end
162
163@interface NSURL (Apple)
164- (BOOL) isGoogleMapsURL;
165- (BOOL) isSpringboardHandledURL;
166// XXX: make this an enum
167- (NSURL *) itmsURL:(NSInteger *)store;
168- (NSURL *) mapsURL;
169- (NSURL *) phobosURL;
170- (NSURL *) youTubeURL;
171@end
172
5a652738
JF
173@interface NSURLRequest (Apple)
174+ (BOOL) allowsAnyHTTPSCertificateForHost:(NSString *)host;
175+ (void) setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
176@end
177
c21004b9
JF
178@interface NSValue (Apple)
179+ (NSValue *) valueWithSize:(CGSize)size;
180@end
f8e0cf06
JF
181// }}}
182// @interface UI* (*) {{{
c21004b9 183@interface UIActionSheet (Apple)
9daa7f25 184- (void) setContext:(NSString *)context;
c21004b9
JF
185- (NSString *) context;
186@end
187
188@interface UIAlertView (Apple)
189- (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label;
190- (id) buttons;
191- (NSString *) context;
192- (void) setContext:(NSString *)context;
193- (void) setNumberOfRows:(int)rows;
194- (void) setRunsModal:(BOOL)modal;
195- (UITextField *) textField;
196- (UITextField *) textFieldAtIndex:(NSUInteger)index;
197- (void) _updateFrameForDisplay;
198@end
199
200@interface UIApplication (Apple)
201- (void) applicationSuspend:(GSEventRef)event;
202- (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale;
203- (void) applicationOpenURL:(NSURL *)url;
204- (void) applicationWillResignActive:(UIApplication *)application;
205- (void) applicationWillSuspend;
206- (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
8ea72491 207- (void) openURL:(NSURL *)url asPanel:(BOOL)panel;
c21004b9
JF
208- (void) setStatusBarShowsProgress:(BOOL)shows;
209- (void) _setSuspended:(BOOL)suspended;
210- (void) terminateWithSuccess;
211@end
212
213@interface UIBarButtonItem (Apple)
214- (UIView *) view;
215@end
216
4985045e
JF
217@interface UIColor (Apple)
218+ (UIColor *) pinStripeColor;
219@end
220
c21004b9
JF
221@interface UIControl (Apple)
222- (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events;
223@end
224
225@interface UIDevice (Apple)
226- (BOOL) isWildcat;
227@end
228
229@interface UIImage (Apple)
230+ (UIImage *) applicationImageNamed:(NSString *)name;
231+ (UIImage *) imageAtPath:(NSString *)path;
232@end
233
234@interface UINavigationBar (Apple)
235+ (CGSize) defaultSize;
236- (UIBarStyle) _barStyle:(BOOL)style;
237@end
238
2634b249
JF
239@interface UIScrollView (Apple)
240- (void) setScrollingEnabled:(BOOL)enabled;
241- (void) setShowBackgroundShadow:(BOOL)show;
242@end
243
c21004b9
JF
244@interface UISearchBar (Apple)
245- (UITextField *) searchField;
246@end
247
7585ce66
JF
248@interface UITabBarController (Apple)
249- (UITransitionView *) _transitionView;
92860339
GP
250- (void) concealTabBarSelection;
251- (void) revealTabBarSelection;
7585ce66
JF
252@end
253
c21004b9
JF
254@interface UITabBarItem (Apple)
255- (void) setAnimatedBadge:(BOOL)animated;
256@end
257
258@interface UITableViewCell (Apple)
259- (float) selectionPercent;
555aaf71 260- (void) _updateHighlightColorsForView:(id)view highlighted:(BOOL)highlighted;
c21004b9
JF
261@end
262
263@interface UITextField (Apple)
264- (UITextInputTraits *) textInputTraits;
265@end
266
267@interface UITextView (Apple)
268- (UIFont *) font;
269- (void) setAllowsRubberBanding:(BOOL)rubberbanding;
270- (void) setFont:(UIFont *)font;
271- (void) setMarginTop:(int)margin;
272- (void) setTextColor:(UIColor *)color;
273@end
274
275@interface UIView (Apple)
2634b249
JF
276- (UIScroller *) _scroller;
277- (void) setClipsSubviews:(BOOL)clips;
c21004b9 278- (void) setEnabledGestures:(NSInteger)gestures;
2634b249 279- (void) setFixedBackgroundPattern:(BOOL)fixed;
c21004b9
JF
280- (void) setGestureDelegate:(id)delegate;
281- (void) setNeedsDisplayOnBoundsChange:(BOOL)needs;
282- (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute;
283- (void) setZoomScale:(float)scale duration:(double)duration;
284- (void) _setZoomScale:(float)scale duration:(double)duration;
285@end
286
287@interface UIViewController (Apple)
288- (void) _updateLayoutForStatusBarAndInterfaceOrientation;
289@end
290
291@interface UIWindow (Apple)
292- (UIResponder *) firstResponder;
293- (void) makeKey:(UIApplication *)application;
294- (void) orderFront:(UIApplication *)application;
295@end
c21004b9 296
2634b249
JF
297@interface UIWebView (Apple)
298- (UIWebDocumentView *) _documentView;
299- (UIScrollView *) _scrollView;
c21004b9 300- (UIScroller *) _scroller;
7e37a676 301- (void) _updateViewSettings;
72bdb258 302- (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message;
2634b249
JF
303//- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
304- (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
305- (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
306- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
307- (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
308- (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
c21004b9 309- (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
2634b249
JF
310- (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame;
311- (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame;
312- (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
313- (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
314- (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
315- (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame;
316- (void) webViewClose:(WebView *)view;
c21004b9 317@end
f8e0cf06 318// }}}
c21004b9 319
89b0ea4a
JF
320// #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
321#ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
322#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
670fdb01 323// XXX: this is a random jumble of garbage
89b0ea4a
JF
324
325typedef enum {
326 UIModalPresentationFullScreen,
327 UIModalPresentationPageSheet,
328 UIModalPresentationFormSheet,
329 UIModalPresentationCurrentContext,
330} UIModalPresentationStyle;
c21004b9 331
1f984572 332#define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
1f984572 333
ad5271ca
JF
334#define UIBarStyleBlack UIBarStyleBlackOpaque
335
89b0ea4a
JF
336@class NSUndoManager;
337@class UIPasteboard;
338
b2a77283
JF
339@interface UIActionSheet (iPad)
340- (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
341@end
342
89b0ea4a
JF
343@interface UIViewController (iPad)
344- (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
345@end
346
b971f083
JF
347@interface UIApplication (iOS_3_0)
348@property(nonatomic) BOOL applicationSupportsShakeToEdit;
349@end
350
9c1605e2 351@interface UIScrollView (iOS_3_0)
df19d370 352@property(assign,nonatomic) float decelerationRate;
9c1605e2
JF
353@end
354
635c55b4 355@interface UIWebView (iOS_3_0)
df19d370 356@property(assign,nonatomic) NSUInteger dataDetectorTypes;
635c55b4
JF
357@end
358
9c1605e2
JF
359extern float const UIScrollViewDecelerationRateNormal;
360
89b0ea4a
JF
361#endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
362// }}}
670fdb01
JF
363// #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
364#if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
365
366#define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
7154cb90 367#define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
670fdb01
JF
368
369#endif
370// }}}
89b0ea4a 371
c6bcc0c1
JF
372#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
373#define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
374#endif
375
57e8b225
JF
376@interface UIScreen (iOS_4_0)
377@property(nonatomic,readonly) CGFloat scale;
378@end
379
89b0ea4a
JF
380// extern *; {{{
381extern CFStringRef const kGSDisplayIdentifiersCapability;
382extern float const UIWebViewGrowsAndShrinksToFitHeight;
383extern float const UIWebViewScalesToFitScale;
f8e0cf06
JF
384// }}}
385// extern "C" *(); {{{
bb0fe3c9 386extern "C" void *reboot2(uint64_t flags);
0e371502 387extern "C" mach_port_t SBSSpringBoardServerPort();
c21004b9
JF
388extern "C" UIImage *_UIImageWithName(NSString *name);
389extern "C" void UISetColor(CGColorRef color);
f8e0cf06 390// }}}
c21004b9
JF
391
392#endif//CYDIA_UIKITPRIVATE_H