]> git.saurik.com Git - cydia.git/blob - iPhonePrivate.h
Only do uicache during installation.
[cydia.git] / iPhonePrivate.h
1 #ifndef CYDIA_UIKITPRIVATE_H
2 #define CYDIA_UIKITPRIVATE_H
3
4 // #include <*> {{{
5 #include <GraphicsServices/GraphicsServices.h>
6 #include <UIKit/UIKit.h>
7 // }}}
8 // #import <*> {{{
9 #import <WebKit/WebFrame.h>
10 #import <WebKit/WebPreferences.h>
11 // }}}
12 // typedef enum {*} *; {{{
13 typedef enum {
14 UIGestureAttributeMinDegrees, /*float*/
15 UIGestureAttributeMaxDegrees, /*float*/
16 UIGestureAttributeMinScale, /*float*/
17 UIGestureAttributeMaxScale, /*float*/
18 UIGestureAttributeIsZoomRubberBandEnabled, /*BOOL*/
19 UIGestureAttributeZoomsFromCurrentToMinOrMax, /*BOOL*/
20 UIGestureAttributeVisibleSize, /*CGSize*/
21 UIGestureAttributeUpdatesScroller, /*BOOL*/
22 } UIGestureAttribute;
23
24 typedef enum {
25 UINavigationButtonStyleNormal,
26 UINavigationButtonStyleBack,
27 UINavigationButtonStyleHighlighted,
28 UINavigationButtonStyleDestructive
29 } UINavigationButtonStyle;
30
31 typedef enum {
32 UIProgressIndicatorStyleLargeWhite,
33 UIProgressIndicatorStyleMediumWhite,
34 UIProgressIndicatorStyleMediumBrown,
35 UIProgressIndicatorStyleSmallWhite,
36 UIProgressIndicatorStyleSmallBlack,
37 UIProgressIndicatorStyleTinyWhite,
38 } UIProgressIndicatorStyle;
39 // }}}
40 // #define * * {{{
41 #define UIDataDetectorTypeAutomatic 0x80000000
42 // }}}
43 // @class Web*; {{{
44 @class WebDataSource;
45 @class WebScriptObject;
46 @class WebView;
47 // }}}
48 // @protocol *; {{{
49 @protocol WebPolicyDecisionListener;
50 // }}}
51
52 // @interface * : UIView {{{
53 @interface UIFormAssistant : UIView
54 + (UIFormAssistant *) sharedFormAssistant;
55 - (CGRect) peripheralFrame;
56 @end
57
58 @interface UIKeyboard : UIView
59 + (void) initImplementationNow;
60 @end
61
62 @interface UIProgressBar : UIView
63 + (CGSize) defaultSize;
64 - (void) setProgress:(float)progress;
65 - (void) setStyle:(NSInteger)style;
66 @end
67
68 @interface UIProgressHUD : UIView
69 - (void) hide;
70 - (void) setText:(NSString *)text;
71 - (void) showInView:(UIView *)view;
72 @end
73
74 @interface UIProgressIndicator : UIView
75 + (CGSize) defaultSizeForStyle:(NSUInteger)style;
76 - (NSUInteger) activityIndicatorViewStyle;
77 - (void) setStyle:(UIProgressIndicatorStyle)style;
78 - (void) startAnimation;
79 @end
80
81 @interface UIScroller : UIView
82 - (CGSize) contentSize;
83 - (void) setDirectionalScrolling:(BOOL)directional;
84 - (void) setEventMode:(NSInteger)mode;
85 - (void) setOffset:(CGPoint)offset;
86 - (void) setScrollDecelerationFactor:(float)factor;
87 - (void) setScrollHysteresis:(float)hysteresis;
88 - (void) setScrollerIndicatorStyle:(UIScrollViewIndicatorStyle)style;
89 - (void) setThumbDetectionEnabled:(BOOL)enabled;
90 @end
91
92 @interface UITextLabel : UIView
93 - (void) setCentersHorizontally:(BOOL)centers;
94 - (void) setColor:(UIColor *)color;
95 - (void) setFont:(UIFont *)font;
96 - (void) setText:(NSString *)text;
97 @end
98
99 @interface UITransitionView : UIView
100 @end
101
102 @interface UIWebDocumentView : UIView
103 - (CGRect) documentBounds;
104 - (void) enableReachability;
105 - (void) loadRequest:(NSURLRequest *)request;
106 - (void) redrawScaledDocument;
107 - (void) setAllowsImageSheet:(BOOL)allows;
108 - (void) setAllowsMessaging:(BOOL)allows;
109 - (void) setAutoresizes:(BOOL)autoresizes;
110 - (void) setContentsPosition:(NSInteger)position;
111 - (void) setDrawsBackground:(BOOL)draws;
112 - (void) _setDocumentType:(NSInteger)type;
113 - (void) setDrawsGrid:(BOOL)draws;
114 - (void) setInitialScale:(float)scale forDocumentTypes:(NSInteger)types;
115 - (void) setLogsTilingChanges:(BOOL)logs;
116 - (void) setMinimumScale:(float)scale forDocumentTypes:(NSInteger)types;
117 - (void) setMinimumSize:(CGSize)size;
118 - (void) setMaximumScale:(float)scale forDocumentTypes:(NSInteger)tpyes;
119 - (void) setSmoothsFonts:(BOOL)smooths;
120 - (void) setTileMinificationFilter:(NSString *)filter;
121 - (void) setTileSize:(CGSize)size;
122 - (void) setTilingEnabled:(BOOL)enabled;
123 - (void) setViewportSize:(CGSize)size forDocumentTypes:(NSInteger)types;
124 - (void) setZoomsFocusedFormControl:(BOOL)zooms;
125 - (void) useSelectionAssistantWithMode:(NSInteger)mode;
126 - (WebView *) webView;
127 @end
128
129 @interface UIWebViewWebViewDelegate : NSObject {
130 @public UIWebView *uiWebView;
131 }
132
133 - (void) _clearUIWebView;
134
135 @end
136 // }}}
137 // @interface *Button : * {{{
138 @interface UINavigationButton : UIButton
139 - (id) initWithTitle:(NSString *)title style:(UINavigationButtonStyle)style;
140 - (void) setBarStyle:(UIBarStyle)style;
141 @end
142
143 @interface UIPushButton : UIControl
144 - (id) backgroundForState:(NSUInteger)state;
145 - (void) setAutosizesToFit:(BOOL)autosizes;
146 - (void) setBackground:(id)background forState:(NSUInteger)state;
147 - (void) setDrawsShadow:(BOOL)draws;
148 - (void) setStretchBackground:(BOOL)stretch;
149 - (void) setTitle:(NSString *)title;
150 - (void) setTitleFont:(UIFont *)font;
151 @end
152
153 @interface UIThreePartButton : UIPushButton
154 @end
155 // }}}
156 // @interface * : NS* {{{
157 @interface WebDefaultUIKitDelegate : NSObject
158 + (WebDefaultUIKitDelegate *) sharedUIKitDelegate;
159 @end
160 // }}}
161 // @interface UIWeb* : * {{{
162 @interface UIWebBrowserView : UIWebDocumentView
163 @end
164
165 @interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer
166 - (int) type;
167 - (NSString *) _typeDescription;
168 @end
169 // }}}
170 // @interface WAK* : * {{{
171 @interface WAKWindow : NSObject
172 + (BOOL) hasLandscapeOrientation;
173 @end
174 // }}}
175
176 // @interface NS* (*) {{{
177 @interface NSMutableURLRequest (Apple)
178 - (void) setHTTPShouldUsePipelining:(BOOL)pipelining;
179 @end
180
181 @interface NSString (Apple)
182 - (NSString *) stringByAddingPercentEscapes;
183 - (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to;
184 @end
185
186 @interface NSURL (Apple)
187 - (BOOL) isGoogleMapsURL;
188 - (BOOL) isSpringboardHandledURL;
189 // XXX: make this an enum
190 - (NSURL *) itmsURL:(NSInteger *)store;
191 - (NSURL *) mapsURL;
192 - (NSURL *) phobosURL;
193 - (NSURL *) youTubeURL;
194 @end
195
196 @interface NSURLRequest (Apple)
197 + (BOOL) allowsAnyHTTPSCertificateForHost:(NSString *)host;
198 + (void) setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
199 @end
200
201 @interface NSValue (Apple)
202 + (NSValue *) valueWithSize:(CGSize)size;
203 @end
204 // }}}
205 // @interface UI* (*) {{{
206 @interface UIActionSheet (Apple)
207 - (void) setContext:(NSString *)context;
208 - (NSString *) context;
209 @end
210
211 @interface UIAlertView (Apple)
212 - (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label;
213 - (id) buttons;
214 - (NSString *) context;
215 - (void) setContext:(NSString *)context;
216 - (void) setNumberOfRows:(int)rows;
217 - (void) setRunsModal:(BOOL)modal;
218 - (UITextField *) textField;
219 - (UITextField *) textFieldAtIndex:(NSUInteger)index;
220 - (void) _updateFrameForDisplay;
221 @end
222
223 @interface UIApplication (Apple)
224 - (void) applicationSuspend:(GSEventRef)event;
225 - (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale;
226 - (void) applicationOpenURL:(NSURL *)url;
227 - (void) applicationWillResignActive:(UIApplication *)application;
228 - (void) applicationWillSuspend;
229 - (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended;
230 - (void) openURL:(NSURL *)url asPanel:(BOOL)panel;
231 - (void) setStatusBarShowsProgress:(BOOL)shows;
232 - (void) _setSuspended:(BOOL)suspended;
233 - (void) terminateWithSuccess;
234 @end
235
236 @interface UIBarButtonItem (Apple)
237 - (UIView *) view;
238 @end
239
240 @interface UIColor (Apple)
241 + (UIColor *) pinStripeColor;
242 @end
243
244 @interface UIControl (Apple)
245 - (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events;
246 @end
247
248 @interface UIDevice (Apple)
249 - (BOOL) isWildcat;
250 @end
251
252 @interface UIImage (Apple)
253 + (UIImage *) applicationImageNamed:(NSString *)name;
254 + (UIImage *) imageAtPath:(NSString *)path;
255 @end
256
257 @interface UINavigationBar (Apple)
258 + (CGSize) defaultSize;
259 - (UIBarStyle) _barStyle:(BOOL)style;
260 @end
261
262 @interface UIScrollView (Apple)
263 - (void) setScrollingEnabled:(BOOL)enabled;
264 - (void) setShowBackgroundShadow:(BOOL)show;
265 @end
266
267 @interface UISearchBar (Apple)
268 - (UITextField *) searchField;
269 @end
270
271 @interface UITabBarController (Apple)
272 - (UITransitionView *) _transitionView;
273 - (void) concealTabBarSelection;
274 - (void) revealTabBarSelection;
275 @end
276
277 @interface UITabBarItem (Apple)
278 - (void) setAnimatedBadge:(BOOL)animated;
279 @end
280
281 @interface UITableViewCell (Apple)
282 - (float) selectionPercent;
283 - (void) _updateHighlightColorsForView:(id)view highlighted:(BOOL)highlighted;
284 @end
285
286 @interface UITextField (Apple)
287 - (UITextInputTraits *) textInputTraits;
288 @end
289
290 @interface UITextView (Apple)
291 - (UIFont *) font;
292 - (void) setAllowsRubberBanding:(BOOL)rubberbanding;
293 - (void) setFont:(UIFont *)font;
294 - (void) setMarginTop:(int)margin;
295 - (void) setTextColor:(UIColor *)color;
296 @end
297
298 @interface UIView (Apple)
299 - (UIScroller *) _scroller;
300 - (void) setClipsSubviews:(BOOL)clips;
301 - (void) setEnabledGestures:(NSInteger)gestures;
302 - (void) setFixedBackgroundPattern:(BOOL)fixed;
303 - (void) setGestureDelegate:(id)delegate;
304 - (void) setNeedsDisplayOnBoundsChange:(BOOL)needs;
305 - (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute;
306 - (void) setZoomScale:(float)scale duration:(double)duration;
307 - (void) _setZoomScale:(float)scale duration:(double)duration;
308 @end
309
310 @interface UIViewController (Apple)
311 - (void) _updateLayoutForStatusBarAndInterfaceOrientation;
312 - (void) unloadView;
313 @end
314
315 @interface UIWindow (Apple)
316 - (UIResponder *) firstResponder;
317 - (void) makeKey:(UIApplication *)application;
318 - (void) orderFront:(UIApplication *)application;
319 @end
320
321 @interface UIWebView (Apple)
322 - (UIWebDocumentView *) _documentView;
323 - (UIScrollView *) _scrollView;
324 - (UIScroller *) _scroller;
325 - (void) _updateViewSettings;
326 - (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message;
327 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
328 - (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener;
329 - (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener;
330 - (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
331 - (void) webView:(WebView *)view didCommitLoadForFrame:(WebFrame *)frame;
332 - (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
333 - (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
334 - (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame;
335 - (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame;
336 - (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame;
337 - (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source;
338 - (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
339 - (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
340 - (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame;
341 - (void) webViewClose:(WebView *)view;
342 @end
343 // }}}
344 // @interface Web* (*) {{{
345 @interface WebFrame (Apple)
346 - (void) setNeedsLayout;
347 @end
348
349 @interface WebPreferences (Apple)
350 + (void) _setInitialDefaultTextEncodingToSystemEncoding;
351 - (void) _setLayoutInterval:(NSInteger)interval;
352 - (void) setOfflineWebApplicationCacheEnabled:(BOOL)enabled;
353 @end
354 // }}}
355
356 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
357 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
358 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
359 // XXX: this is a random jumble of garbage
360
361 typedef enum {
362 UIModalPresentationFullScreen,
363 UIModalPresentationPageSheet,
364 UIModalPresentationFormSheet,
365 UIModalPresentationCurrentContext,
366 } UIModalPresentationStyle;
367
368 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
369
370 #define UIBarStyleBlack UIBarStyleBlackOpaque
371
372 @class NSUndoManager;
373 @class UIPasteboard;
374
375 @interface UIActionSheet (iPad)
376 - (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
377 @end
378
379 @interface UIViewController (iPad)
380 - (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
381 @end
382
383 @interface UIApplication (iOS_3_0)
384 @property(nonatomic) BOOL applicationSupportsShakeToEdit;
385 @end
386
387 @interface UIScrollView (iOS_3_0)
388 @property(assign,nonatomic) float decelerationRate;
389 @end
390
391 @interface UIWebView (iOS_3_0)
392 @property(assign,nonatomic) NSUInteger dataDetectorTypes;
393 @end
394
395 extern float const UIScrollViewDecelerationRateNormal;
396
397 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
398 // }}}
399 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
400 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
401
402 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
403 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
404
405 #endif
406 // }}}
407
408 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
409 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
410 #endif
411
412 @interface UIScreen (iOS_4_0)
413 @property(nonatomic,readonly) CGFloat scale;
414 @end
415
416 // extern *; {{{
417 extern CFStringRef const kGSDisplayIdentifiersCapability;
418 extern float const UIWebViewGrowsAndShrinksToFitHeight;
419 extern float const UIWebViewScalesToFitScale;
420 // }}}
421 // extern "C" *(); {{{
422 extern "C" void *reboot2(uint64_t flags);
423 extern "C" mach_port_t SBSSpringBoardServerPort();
424 extern "C" UIImage *_UIImageWithName(NSString *name);
425 extern "C" void UISetColor(CGColorRef color);
426 // }}}
427
428 #endif//CYDIA_UIKITPRIVATE_H