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