]> git.saurik.com Git - cydia.git/blob - iPhonePrivate.h
Merge branch 'master' of saurik.com:cydia
[cydia.git] / iPhonePrivate.h
1 #ifndef CYDIA_UIKITPRIVATE_H
2 #define CYDIA_UIKITPRIVATE_H
3
4 // #include <*> {{{
5 #include <GraphicsServices/GraphicsServices.h>
6 // }}}
7 // typedef enum {*} *; {{{
8 typedef 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
19 typedef enum {
20 UINavigationButtonStyleNormal,
21 UINavigationButtonStyleBack,
22 UINavigationButtonStyleHighlighted,
23 UINavigationButtonStyleDestructive
24 } UINavigationButtonStyle;
25
26 typedef enum {
27 UIProgressIndicatorStyleLargeWhite,
28 UIProgressIndicatorStyleMediumWhite,
29 UIProgressIndicatorStyleMediumBrown,
30 UIProgressIndicatorStyleSmallWhite,
31 UIProgressIndicatorStyleSmallBlack,
32 UIProgressIndicatorStyleTinyWhite,
33 } UIProgressIndicatorStyle;
34 // }}}
35 // @class *; {{{
36 @class WebView;
37 // }}}
38
39 // @interface NS* (*) {{{
40 @interface NSString (Apple)
41 - (NSString *) stringByAddingPercentEscapes;
42 - (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to;
43 @end
44
45 @interface NSURL (Apple)
46 - (BOOL) isGoogleMapsURL;
47 - (BOOL) isSpringboardHandledURL;
48 // XXX: make this an enum
49 - (NSURL *) itmsURL:(NSInteger *)store;
50 - (NSURL *) mapsURL;
51 - (NSURL *) phobosURL;
52 - (NSURL *) youTubeURL;
53 @end
54
55 @interface NSValue (Apple)
56 + (NSValue *) valueWithSize:(CGSize)size;
57 @end
58 // }}}
59 // @interface UI* (*) {{{
60 @interface UIActionSheet (Apple)
61 - (void) setContext:(NSString *)context;
62 - (NSString *) context;
63 @end
64
65 @interface UIAlertView (Apple)
66 - (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label;
67 - (id) buttons;
68 - (NSString *) context;
69 - (void) setContext:(NSString *)context;
70 - (void) setNumberOfRows:(int)rows;
71 - (void) setRunsModal:(BOOL)modal;
72 - (UITextField *) textField;
73 - (UITextField *) textFieldAtIndex:(NSUInteger)index;
74 - (void) _updateFrameForDisplay;
75 @end
76
77 @interface UIApplication (Apple)
78 - (void) applicationSuspend:(GSEventRef)event;
79 - (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale;
80 - (void) applicationOpenURL:(NSURL *)url;
81 - (void) applicationWillResignActive:(UIApplication *)application;
82 - (void) applicationWillSuspend;
83 - (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
84 - (void) removeApplicationBadge;
85 - (void) setApplicationBadge:(NSString *)badge;
86 - (void) setApplicationBadgeString:(NSString *)badge;
87 - (void) setStatusBarShowsProgress:(BOOL)shows;
88 - (void) _setSuspended:(BOOL)suspended;
89 - (void) terminateWithSuccess;
90 @end
91
92 @interface UIBarButtonItem (Apple)
93 - (UIView *) view;
94 @end
95
96 @interface UIControl (Apple)
97 - (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events;
98 @end
99
100 @interface UIDevice (Apple)
101 - (BOOL) isWildcat;
102 @end
103
104 @interface UIImage (Apple)
105 + (UIImage *) applicationImageNamed:(NSString *)name;
106 + (UIImage *) imageAtPath:(NSString *)path;
107 @end
108
109 @interface UINavigationBar (Apple)
110 + (CGSize) defaultSize;
111 - (UIBarStyle) _barStyle:(BOOL)style;
112 @end
113
114 @interface UISearchBar (Apple)
115 - (UITextField *) searchField;
116 @end
117
118 @interface UITabBarItem (Apple)
119 - (void) setAnimatedBadge:(BOOL)animated;
120 @end
121
122 @interface UITableViewCell (Apple)
123 - (float) selectionPercent;
124 @end
125
126 @interface UITextField (Apple)
127 - (UITextInputTraits *) textInputTraits;
128 @end
129
130 @interface UITextView (Apple)
131 - (UIFont *) font;
132 - (void) setAllowsRubberBanding:(BOOL)rubberbanding;
133 - (void) setFont:(UIFont *)font;
134 - (void) setMarginTop:(int)margin;
135 - (void) setTextColor:(UIColor *)color;
136 @end
137
138 @interface UIView (Apple)
139 - (void) setEnabledGestures:(NSInteger)gestures;
140 - (void) setGestureDelegate:(id)delegate;
141 - (void) setNeedsDisplayOnBoundsChange:(BOOL)needs;
142 - (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute;
143 - (void) setZoomScale:(float)scale duration:(double)duration;
144 - (void) _setZoomScale:(float)scale duration:(double)duration;
145 @end
146
147 @interface UIViewController (Apple)
148 - (void) _updateLayoutForStatusBarAndInterfaceOrientation;
149 @end
150
151 @interface UIWindow (Apple)
152 - (UIResponder *) firstResponder;
153 - (void) makeKey:(UIApplication *)application;
154 - (void) orderFront:(UIApplication *)application;
155 @end
156 // }}}
157
158 // @interface * : UIView {{{
159 @interface UIFormAssistant : UIView
160 + (UIFormAssistant *) sharedFormAssistant;
161 - (CGRect) peripheralFrame;
162 @end
163
164 @interface UIKeyboard : UIView
165 + (void) initImplementationNow;
166 @end
167
168 @interface UIProgressBar : UIView
169 + (CGSize) defaultSize;
170 - (void) setProgress:(float)progress;
171 - (void) setStyle:(NSInteger)style;
172 @end
173
174 @interface UIProgressHUD : UIView
175 - (id) initWithWindow:(UIWindow *)window;
176 - (void) setText:(NSString *)text;
177 - (void) show:(BOOL)show;
178 @end
179
180 @interface UIProgressIndicator : UIView
181 + (CGSize) defaultSizeForStyle:(NSUInteger)style;
182 - (NSUInteger) activityIndicatorViewStyle;
183 - (void) setStyle:(UIProgressIndicatorStyle)style;
184 - (void) startAnimation;
185 @end
186
187 @interface UIScroller : UIView
188 - (CGSize) contentSize;
189 - (BOOL) releaseRubberBandIfNecessary;
190 - (void) scrollPointVisibleAtTopLeft:(CGPoint)point;
191 - (void) scrollRectToVisible:(CGRect)rect animated:(BOOL)animated;
192 - (void) setAdjustForContentSizeChange:(BOOL)adjust;
193 - (void) setAllowsRubberBanding:(BOOL)allows;
194 - (void) setBounces:(BOOL)bounces;
195 - (void) setClipsSubviews:(BOOL)clips;
196 - (void) setContentSize:(CGSize)size;
197 - (void) setDelegate:(id)delegate;
198 - (void) setDirectionalScrolling:(BOOL)directional;
199 - (void) setEventMode:(NSInteger)mode;
200 - (void) setFixedBackgroundPattern:(BOOL)fixed;
201 - (void) setOffset:(CGPoint)offset;
202 - (void) setScrollHysteresis:(float)hysteresis;
203 - (void) setScrollerIndicatorSubrect:(CGRect)rect;
204 - (void) setScrollingEnabled:(BOOL)enabled;
205 - (void) setShowBackgroundShadow:(BOOL)shows;
206 - (void) setThumbDetectionEnabled:(BOOL)enabled;
207 @end
208
209 @interface UITextLabel : UIView
210 - (void) setCentersHorizontally:(BOOL)centers;
211 - (void) setColor:(UIColor *)color;
212 - (void) setFont:(UIFont *)font;
213 - (void) setText:(NSString *)text;
214 @end
215
216 @interface UIWebDocumentView : UIView
217 - (CGRect) documentBounds;
218 - (void) enableReachability;
219 - (void) loadRequest:(NSURLRequest *)request;
220 - (void) redrawScaledDocument;
221 - (UIScroller *) _scroller;
222 - (void) setAllowsImageSheet:(BOOL)allows;
223 - (void) setAllowsMessaging:(BOOL)allows;
224 - (void) setAutoresizes:(BOOL)autoresizes;
225 - (void) setContentsPosition:(NSInteger)position;
226 - (void) setDataDetectorTypes:(NSUInteger)types;
227 - (void) setDelegate:(id)delegate;
228 - (void) setDetectsPhoneNumbers:(BOOL)detects;
229 - (void) _setDocumentType:(NSInteger)type;
230 - (void) setDrawsGrid:(BOOL)draws;
231 - (void) setFormEditingDelegate:(id)delegate;
232 - (void) setInitialScale:(float)scale forDocumentTypes:(NSInteger)types;
233 - (void) setInteractionDelegate:(id)delegate;
234 - (void) setLogsTilingChanges:(BOOL)logs;
235 - (void) setMinimumScale:(float)scale forDocumentTypes:(NSInteger)types;
236 - (void) setMinimumSize:(CGSize)size;
237 - (void) setMaximumScale:(float)scale forDocumentTypes:(NSInteger)tpyes;
238 - (void) setSmoothsFonts:(BOOL)smooths;
239 - (void) setTileMinificationFilter:(NSString *)filter;
240 - (void) setTileSize:(CGSize)size;
241 - (void) setTilingEnabled:(BOOL)enabled;
242 - (void) setViewportSize:(CGSize)size forDocumentTypes:(NSInteger)types;
243 - (void) setZoomsFocusedFormControl:(BOOL)zooms;
244 - (void) useSelectionAssistantWithMode:(NSInteger)mode;
245 - (WebView *) webView;
246 - (void) webView:(WebView *)view attachRootLayer:(id)layer;
247 - (void) webView:(WebView *)view didCommitLoadForFrame:(WebFrame *)frame;
248 - (void) webView:(WebView *)view didFailLoadWithError:(id)error forFrame:(WebFrame *)frame;
249 - (void) webView:(WebView *)view didFinishDocumentLoadForFrame:(WebFrame *)frame;
250 - (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
251 - (void) webView:(WebView *)view didFirstLayoutInFrame:(WebFrame *)frame;
252 - (void) webView:(WebView *)view didFirstVisuallyNonEmptyLayoutInFrame:(WebFrame *)frame;
253 - (void) webView:(WebView *)view didHideFullScreenForPlugInView:(id)plugin;
254 - (void) webView:(WebView *)view didObserveDeferredContentChange:(NSInteger)change forFrame:(WebFrame *)frame;
255 - (void) webView:(WebView *)view didReceiveDocTypeForFrame:(WebFrame *)frame;
256 - (void) webView:(WebView *)view didReceiveMessage:(id)message;
257 - (void) webView:(WebView *)view didReceiveViewportArguments:(id)arguments forFrame:(WebFrame *)frame;
258 - (void) webView:(WebView *)view formStateDidBlurNode:(id)state;
259 - (void) webView:(WebView *)view formStateDidFocusNode:(id)state;
260 - (void) webView:(WebView *)view needsScrollNotifications:(id)notifications forFrame:(WebFrame *)frame;
261 - (id) webView:(WebView *)view plugInViewWithArguments:(id)arguments fromPlugInPackage:(id)package;
262 - (void) webView:(WebView *)view restoreStateFromHistoryItem:(id)item forFrame:(WebFrame *)frame force:(BOOL)force;
263 - (void) webView:(WebView *)view saveStateToHistoryItem:(id)item forFrame:(WebFrame *)frame;
264 - (void) webView:(WebView *)view willAddPlugInView:(id)plugin;
265 - (void) webView:(WebView *)view willCloseFrame:(WebFrame *)frame;
266 - (void) webView:(WebView *)view willShowFullScreenForPlugInView:(id)plugin;
267 - (BOOL) webView:(WebView *)view shouldScrollToPoint:(CGPoint)point forFrame:(WebFrame *)frame;
268 - (void) webViewDidLayout:(WebView *)view;
269 - (void) webViewDidPreventDefaultForEvent:(WebView *)view;
270 - (void) webViewFormEditedStatusHasChanged:(WebView *)changed;
271 @end
272 // }}}
273 // @interface *Button : * {{{
274 @interface UINavigationButton : UIButton
275 - (id) initWithTitle:(NSString *)title style:(UINavigationButtonStyle)style;
276 - (void) setBarStyle:(UIBarStyle)style;
277 @end
278
279 @interface UIPushButton : UIControl
280 - (id) backgroundForState:(NSUInteger)state;
281 - (void) setAutosizesToFit:(BOOL)autosizes;
282 - (void) setBackground:(id)background forState:(NSUInteger)state;
283 - (void) setDrawsShadow:(BOOL)draws;
284 - (void) setStretchBackground:(BOOL)stretch;
285 - (void) setTitle:(NSString *)title;
286 - (void) setTitleFont:(UIFont *)font;
287 @end
288
289 @interface UIThreePartButton : UIPushButton
290 @end
291 // }}}
292 // @interface * : NS* {{{
293 @interface WebDefaultUIKitDelegate : NSObject
294 + (WebDefaultUIKitDelegate *) sharedUIKitDelegate;
295 @end
296 // }}}
297
298 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
299 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
300 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
301
302 typedef enum {
303 UIModalPresentationFullScreen,
304 UIModalPresentationPageSheet,
305 UIModalPresentationFormSheet,
306 UIModalPresentationCurrentContext,
307 } UIModalPresentationStyle;
308
309 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
310 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
311
312 #define UIBarStyleBlack UIBarStyleBlackOpaque
313
314 @class NSUndoManager;
315 @class UIPasteboard;
316
317 @interface UIActionSheet (iPad)
318 - (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
319 @end
320
321 @interface UIViewController (iPad)
322 - (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
323 @end
324
325 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
326 // }}}
327
328 // extern *; {{{
329 extern CFStringRef const kGSDisplayIdentifiersCapability;
330 extern float const UIWebViewGrowsAndShrinksToFitHeight;
331 extern float const UIWebViewScalesToFitScale;
332 // }}}
333 // extern "C" *(); {{{
334 extern "C" UIImage *_UIImageWithName(NSString *name);
335 extern "C" void UISetColor(CGColorRef color);
336 // }}}
337
338 #endif//CYDIA_UIKITPRIVATE_H