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