]> git.saurik.com Git - cydia.git/blob - iPhonePrivate.h
Fix the warnings when building with AlwaysReload=0, and fix the action button for...
[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 UIColor (Apple)
93 + (UIColor *) pinStripeColor;
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 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
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
292 @interface WebDefaultUIKitDelegate : NSObject
293 + (WebDefaultUIKitDelegate *) sharedUIKitDelegate;
294 @end
295
296
297 extern "C" CFStringRef const kGSDisplayIdentifiersCapability;
298
299 extern "C" float const UIWebViewGrowsAndShrinksToFitHeight;
300 extern "C" float const UIWebViewScalesToFitScale;
301
302
303 extern "C" UIImage *_UIImageWithName(NSString *name);
304 extern "C" void UISetColor(CGColorRef color);
305
306
307 #endif//CYDIA_UIKITPRIVATE_H