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