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