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