]> git.saurik.com Git - cydia.git/blame - iPhonePrivate.h
Reloading the data of an arbitrary viewcontroller involves loading its view.
[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;
4886cc81 83- (void) setScrollerIndicatorStyle:(UIScrollViewIndicatorStyle)style;
2634b249
JF
84- (void) setThumbDetectionEnabled:(BOOL)enabled;
85@end
86
87@interface UITextLabel : UIView
88- (void) setCentersHorizontally:(BOOL)centers;
89- (void) setColor:(UIColor *)color;
90- (void) setFont:(UIFont *)font;
91- (void) setText:(NSString *)text;
92@end
93
7585ce66
JF
94@interface UITransitionView : UIView
95@end
96
2634b249
JF
97@interface UIWebDocumentView : UIView
98- (CGRect) documentBounds;
99- (void) enableReachability;
100- (void) loadRequest:(NSURLRequest *)request;
101- (void) redrawScaledDocument;
102- (void) setAllowsImageSheet:(BOOL)allows;
103- (void) setAllowsMessaging:(BOOL)allows;
104- (void) setAutoresizes:(BOOL)autoresizes;
105- (void) setContentsPosition:(NSInteger)position;
2634b249
JF
106- (void) setDrawsBackground:(BOOL)draws;
107- (void) _setDocumentType:(NSInteger)type;
108- (void) setDrawsGrid:(BOOL)draws;
109- (void) setInitialScale:(float)scale forDocumentTypes:(NSInteger)types;
110- (void) setLogsTilingChanges:(BOOL)logs;
111- (void) setMinimumScale:(float)scale forDocumentTypes:(NSInteger)types;
112- (void) setMinimumSize:(CGSize)size;
113- (void) setMaximumScale:(float)scale forDocumentTypes:(NSInteger)tpyes;
114- (void) setSmoothsFonts:(BOOL)smooths;
115- (void) setTileMinificationFilter:(NSString *)filter;
116- (void) setTileSize:(CGSize)size;
117- (void) setTilingEnabled:(BOOL)enabled;
118- (void) setViewportSize:(CGSize)size forDocumentTypes:(NSInteger)types;
119- (void) setZoomsFocusedFormControl:(BOOL)zooms;
120- (void) useSelectionAssistantWithMode:(NSInteger)mode;
121- (WebView *) webView;
122@end
d49718a1
JF
123
124@interface UIWebViewWebViewDelegate : NSObject {
125 @public UIWebView *uiWebView;
126}
127@end
2634b249
JF
128// }}}
129// @interface *Button : * {{{
130@interface UINavigationButton : UIButton
131- (id) initWithTitle:(NSString *)title style:(UINavigationButtonStyle)style;
132- (void) setBarStyle:(UIBarStyle)style;
133@end
134
135@interface UIPushButton : UIControl
136- (id) backgroundForState:(NSUInteger)state;
137- (void) setAutosizesToFit:(BOOL)autosizes;
138- (void) setBackground:(id)background forState:(NSUInteger)state;
139- (void) setDrawsShadow:(BOOL)draws;
140- (void) setStretchBackground:(BOOL)stretch;
141- (void) setTitle:(NSString *)title;
142- (void) setTitleFont:(UIFont *)font;
143@end
144
145@interface UIThreePartButton : UIPushButton
146@end
147// }}}
148// @interface * : NS* {{{
149@interface WebDefaultUIKitDelegate : NSObject
150+ (WebDefaultUIKitDelegate *) sharedUIKitDelegate;
151@end
152// }}}
4f651400
JF
153// @interface UIWeb* : * {{{
154@interface UIWebBrowserView : UIWebDocumentView
155@end
156
157@interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer
158- (int) type;
159- (NSString *) _typeDescription;
160@end
161// }}}
c21004b9 162
f8e0cf06 163// @interface NS* (*) {{{
4825f34a
JF
164@interface NSMutableURLRequest (Apple)
165- (void) setHTTPShouldUsePipelining:(BOOL)pipelining;
166@end
167
c21004b9 168@interface NSString (Apple)
c21004b9
JF
169- (NSString *) stringByAddingPercentEscapes;
170- (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to;
171@end
172
173@interface NSURL (Apple)
174- (BOOL) isGoogleMapsURL;
175- (BOOL) isSpringboardHandledURL;
176// XXX: make this an enum
177- (NSURL *) itmsURL:(NSInteger *)store;
178- (NSURL *) mapsURL;
179- (NSURL *) phobosURL;
180- (NSURL *) youTubeURL;
181@end
182
5a652738
JF
183@interface NSURLRequest (Apple)
184+ (BOOL) allowsAnyHTTPSCertificateForHost:(NSString *)host;
185+ (void) setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
186@end
187
c21004b9
JF
188@interface NSValue (Apple)
189+ (NSValue *) valueWithSize:(CGSize)size;
190@end
f8e0cf06
JF
191// }}}
192// @interface UI* (*) {{{
c21004b9 193@interface UIActionSheet (Apple)
9daa7f25 194- (void) setContext:(NSString *)context;
c21004b9
JF
195- (NSString *) context;
196@end
197
198@interface UIAlertView (Apple)
199- (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label;
200- (id) buttons;
201- (NSString *) context;
202- (void) setContext:(NSString *)context;
203- (void) setNumberOfRows:(int)rows;
204- (void) setRunsModal:(BOOL)modal;
205- (UITextField *) textField;
206- (UITextField *) textFieldAtIndex:(NSUInteger)index;
207- (void) _updateFrameForDisplay;
208@end
209
210@interface UIApplication (Apple)
211- (void) applicationSuspend:(GSEventRef)event;
212- (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale;
213- (void) applicationOpenURL:(NSURL *)url;
214- (void) applicationWillResignActive:(UIApplication *)application;
215- (void) applicationWillSuspend;
216- (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
8ea72491 217- (void) openURL:(NSURL *)url asPanel:(BOOL)panel;
c21004b9
JF
218- (void) setStatusBarShowsProgress:(BOOL)shows;
219- (void) _setSuspended:(BOOL)suspended;
220- (void) terminateWithSuccess;
221@end
222
223@interface UIBarButtonItem (Apple)
224- (UIView *) view;
225@end
226
4985045e
JF
227@interface UIColor (Apple)
228+ (UIColor *) pinStripeColor;
229@end
230
c21004b9
JF
231@interface UIControl (Apple)
232- (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events;
233@end
234
235@interface UIDevice (Apple)
236- (BOOL) isWildcat;
237@end
238
239@interface UIImage (Apple)
240+ (UIImage *) applicationImageNamed:(NSString *)name;
241+ (UIImage *) imageAtPath:(NSString *)path;
242@end
243
244@interface UINavigationBar (Apple)
245+ (CGSize) defaultSize;
246- (UIBarStyle) _barStyle:(BOOL)style;
247@end
248
2634b249
JF
249@interface UIScrollView (Apple)
250- (void) setScrollingEnabled:(BOOL)enabled;
251- (void) setShowBackgroundShadow:(BOOL)show;
252@end
253
c21004b9
JF
254@interface UISearchBar (Apple)
255- (UITextField *) searchField;
256@end
257
7585ce66
JF
258@interface UITabBarController (Apple)
259- (UITransitionView *) _transitionView;
92860339
GP
260- (void) concealTabBarSelection;
261- (void) revealTabBarSelection;
7585ce66
JF
262@end
263
c21004b9
JF
264@interface UITabBarItem (Apple)
265- (void) setAnimatedBadge:(BOOL)animated;
266@end
267
268@interface UITableViewCell (Apple)
269- (float) selectionPercent;
555aaf71 270- (void) _updateHighlightColorsForView:(id)view highlighted:(BOOL)highlighted;
c21004b9
JF
271@end
272
273@interface UITextField (Apple)
274- (UITextInputTraits *) textInputTraits;
275@end
276
277@interface UITextView (Apple)
278- (UIFont *) font;
279- (void) setAllowsRubberBanding:(BOOL)rubberbanding;
280- (void) setFont:(UIFont *)font;
281- (void) setMarginTop:(int)margin;
282- (void) setTextColor:(UIColor *)color;
283@end
284
285@interface UIView (Apple)
2634b249
JF
286- (UIScroller *) _scroller;
287- (void) setClipsSubviews:(BOOL)clips;
c21004b9 288- (void) setEnabledGestures:(NSInteger)gestures;
2634b249 289- (void) setFixedBackgroundPattern:(BOOL)fixed;
c21004b9
JF
290- (void) setGestureDelegate:(id)delegate;
291- (void) setNeedsDisplayOnBoundsChange:(BOOL)needs;
292- (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute;
293- (void) setZoomScale:(float)scale duration:(double)duration;
294- (void) _setZoomScale:(float)scale duration:(double)duration;
295@end
296
297@interface UIViewController (Apple)
298- (void) _updateLayoutForStatusBarAndInterfaceOrientation;
299@end
300
301@interface UIWindow (Apple)
302- (UIResponder *) firstResponder;
303- (void) makeKey:(UIApplication *)application;
304- (void) orderFront:(UIApplication *)application;
305@end
c21004b9 306
2634b249
JF
307@interface UIWebView (Apple)
308- (UIWebDocumentView *) _documentView;
309- (UIScrollView *) _scrollView;
c21004b9 310- (UIScroller *) _scroller;
7e37a676 311- (void) _updateViewSettings;
72bdb258 312- (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message;
2634b249
JF
313//- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
314- (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
315- (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
316- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
64ffa332 317- (void) webView:(WebView *)view didCommitLoadForFrame:(WebFrame *)frame;
2634b249
JF
318- (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
319- (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
c21004b9 320- (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
2634b249
JF
321- (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame;
322- (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame;
323- (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
324- (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
325- (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
326- (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame;
327- (void) webViewClose:(WebView *)view;
c21004b9 328@end
f8e0cf06 329// }}}
c21004b9 330
89b0ea4a
JF
331// #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
332#ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
333#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
670fdb01 334// XXX: this is a random jumble of garbage
89b0ea4a
JF
335
336typedef enum {
337 UIModalPresentationFullScreen,
338 UIModalPresentationPageSheet,
339 UIModalPresentationFormSheet,
340 UIModalPresentationCurrentContext,
341} UIModalPresentationStyle;
c21004b9 342
1f984572 343#define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
1f984572 344
ad5271ca
JF
345#define UIBarStyleBlack UIBarStyleBlackOpaque
346
89b0ea4a
JF
347@class NSUndoManager;
348@class UIPasteboard;
349
b2a77283
JF
350@interface UIActionSheet (iPad)
351- (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
352@end
353
89b0ea4a
JF
354@interface UIViewController (iPad)
355- (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
356@end
357
b971f083
JF
358@interface UIApplication (iOS_3_0)
359@property(nonatomic) BOOL applicationSupportsShakeToEdit;
360@end
361
9c1605e2 362@interface UIScrollView (iOS_3_0)
df19d370 363@property(assign,nonatomic) float decelerationRate;
9c1605e2
JF
364@end
365
635c55b4 366@interface UIWebView (iOS_3_0)
df19d370 367@property(assign,nonatomic) NSUInteger dataDetectorTypes;
635c55b4
JF
368@end
369
9c1605e2
JF
370extern float const UIScrollViewDecelerationRateNormal;
371
89b0ea4a
JF
372#endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
373// }}}
670fdb01
JF
374// #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
375#if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
376
377#define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
7154cb90 378#define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
670fdb01
JF
379
380#endif
381// }}}
89b0ea4a 382
c6bcc0c1
JF
383#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
384#define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
385#endif
386
57e8b225
JF
387@interface UIScreen (iOS_4_0)
388@property(nonatomic,readonly) CGFloat scale;
389@end
390
89b0ea4a
JF
391// extern *; {{{
392extern CFStringRef const kGSDisplayIdentifiersCapability;
393extern float const UIWebViewGrowsAndShrinksToFitHeight;
394extern float const UIWebViewScalesToFitScale;
f8e0cf06
JF
395// }}}
396// extern "C" *(); {{{
bb0fe3c9 397extern "C" void *reboot2(uint64_t flags);
0e371502 398extern "C" mach_port_t SBSSpringBoardServerPort();
c21004b9
JF
399extern "C" UIImage *_UIImageWithName(NSString *name);
400extern "C" void UISetColor(CGColorRef color);
f8e0cf06 401// }}}
c21004b9
JF
402
403#endif//CYDIA_UIKITPRIVATE_H