]>
Commit | Line | Data |
---|---|---|
1e4922b8 | 1 | #ifndef CYDIA_UIKITPRIVATE_H |
d50f42a9 | 2 | #define CYDIA_UIKITPRIVATE_H |
1e4922b8 | 3 | |
4c3cf6af | 4 | // #include <*> {{{ |
1e4922b8 | 5 | #include <GraphicsServices/GraphicsServices.h> |
4c3cf6af JF |
6 | // }}} |
7 | // typedef enum {*} *; {{{ | |
1e4922b8 JF |
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; | |
4c3cf6af | 34 | // }}} |
c2292b80 JF |
35 | // #define * * {{{ |
36 | #define UIDataDetectorTypeAutomatic 0x80000000 | |
37 | // }}} | |
38 | // @class Web*; {{{ | |
39 | @class WebDataSource; | |
40 | @class WebScriptObject; | |
1e4922b8 | 41 | @class WebView; |
4c3cf6af | 42 | // }}} |
c2292b80 JF |
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 | ||
23aa03a3 JF |
93 | @interface UITransitionView : UIView |
94 | @end | |
95 | ||
c2292b80 JF |
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; | |
c2292b80 JF |
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 | |
c351c4ad JF |
122 | |
123 | @interface UIWebViewWebViewDelegate : NSObject { | |
124 | @public UIWebView *uiWebView; | |
125 | } | |
126 | @end | |
c2292b80 JF |
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 | // }}} | |
1e4922b8 | 152 | |
4c3cf6af | 153 | // @interface NS* (*) {{{ |
1e4922b8 | 154 | @interface NSString (Apple) |
1e4922b8 JF |
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 NSValue (Apple) | |
170 | + (NSValue *) valueWithSize:(CGSize)size; | |
171 | @end | |
4c3cf6af JF |
172 | // }}} |
173 | // @interface UI* (*) {{{ | |
1e4922b8 | 174 | @interface UIActionSheet (Apple) |
48861ec9 | 175 | - (void) setContext:(NSString *)context; |
1e4922b8 JF |
176 | - (NSString *) context; |
177 | @end | |
178 | ||
179 | @interface UIAlertView (Apple) | |
180 | - (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label; | |
181 | - (id) buttons; | |
182 | - (NSString *) context; | |
183 | - (void) setContext:(NSString *)context; | |
184 | - (void) setNumberOfRows:(int)rows; | |
185 | - (void) setRunsModal:(BOOL)modal; | |
186 | - (UITextField *) textField; | |
187 | - (UITextField *) textFieldAtIndex:(NSUInteger)index; | |
188 | - (void) _updateFrameForDisplay; | |
189 | @end | |
190 | ||
191 | @interface UIApplication (Apple) | |
192 | - (void) applicationSuspend:(GSEventRef)event; | |
193 | - (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale; | |
194 | - (void) applicationOpenURL:(NSURL *)url; | |
195 | - (void) applicationWillResignActive:(UIApplication *)application; | |
196 | - (void) applicationWillSuspend; | |
197 | - (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended; | |
1e4922b8 JF |
198 | - (void) setStatusBarShowsProgress:(BOOL)shows; |
199 | - (void) _setSuspended:(BOOL)suspended; | |
200 | - (void) terminateWithSuccess; | |
201 | @end | |
202 | ||
203 | @interface UIBarButtonItem (Apple) | |
204 | - (UIView *) view; | |
205 | @end | |
206 | ||
c961857b JF |
207 | @interface UIColor (Apple) |
208 | + (UIColor *) pinStripeColor; | |
209 | @end | |
210 | ||
1e4922b8 JF |
211 | @interface UIControl (Apple) |
212 | - (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events; | |
213 | @end | |
214 | ||
215 | @interface UIDevice (Apple) | |
216 | - (BOOL) isWildcat; | |
217 | @end | |
218 | ||
219 | @interface UIImage (Apple) | |
220 | + (UIImage *) applicationImageNamed:(NSString *)name; | |
221 | + (UIImage *) imageAtPath:(NSString *)path; | |
222 | @end | |
223 | ||
224 | @interface UINavigationBar (Apple) | |
225 | + (CGSize) defaultSize; | |
226 | - (UIBarStyle) _barStyle:(BOOL)style; | |
227 | @end | |
228 | ||
c2292b80 JF |
229 | @interface UIScrollView (Apple) |
230 | - (void) setScrollingEnabled:(BOOL)enabled; | |
231 | - (void) setShowBackgroundShadow:(BOOL)show; | |
232 | @end | |
233 | ||
1e4922b8 JF |
234 | @interface UISearchBar (Apple) |
235 | - (UITextField *) searchField; | |
236 | @end | |
237 | ||
23aa03a3 JF |
238 | @interface UITabBarController (Apple) |
239 | - (UITransitionView *) _transitionView; | |
240 | @end | |
241 | ||
1e4922b8 JF |
242 | @interface UITabBarItem (Apple) |
243 | - (void) setAnimatedBadge:(BOOL)animated; | |
244 | @end | |
245 | ||
246 | @interface UITableViewCell (Apple) | |
247 | - (float) selectionPercent; | |
1b242491 | 248 | - (void) _updateHighlightColorsForView:(id)view highlighted:(BOOL)highlighted; |
1e4922b8 JF |
249 | @end |
250 | ||
251 | @interface UITextField (Apple) | |
252 | - (UITextInputTraits *) textInputTraits; | |
253 | @end | |
254 | ||
255 | @interface UITextView (Apple) | |
256 | - (UIFont *) font; | |
257 | - (void) setAllowsRubberBanding:(BOOL)rubberbanding; | |
258 | - (void) setFont:(UIFont *)font; | |
259 | - (void) setMarginTop:(int)margin; | |
260 | - (void) setTextColor:(UIColor *)color; | |
261 | @end | |
262 | ||
263 | @interface UIView (Apple) | |
c2292b80 JF |
264 | - (UIScroller *) _scroller; |
265 | - (void) setClipsSubviews:(BOOL)clips; | |
1e4922b8 | 266 | - (void) setEnabledGestures:(NSInteger)gestures; |
c2292b80 | 267 | - (void) setFixedBackgroundPattern:(BOOL)fixed; |
1e4922b8 JF |
268 | - (void) setGestureDelegate:(id)delegate; |
269 | - (void) setNeedsDisplayOnBoundsChange:(BOOL)needs; | |
270 | - (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute; | |
271 | - (void) setZoomScale:(float)scale duration:(double)duration; | |
272 | - (void) _setZoomScale:(float)scale duration:(double)duration; | |
273 | @end | |
274 | ||
275 | @interface UIViewController (Apple) | |
276 | - (void) _updateLayoutForStatusBarAndInterfaceOrientation; | |
277 | @end | |
278 | ||
279 | @interface UIWindow (Apple) | |
280 | - (UIResponder *) firstResponder; | |
281 | - (void) makeKey:(UIApplication *)application; | |
282 | - (void) orderFront:(UIApplication *)application; | |
283 | @end | |
1e4922b8 | 284 | |
c2292b80 JF |
285 | @interface UIWebView (Apple) |
286 | - (UIWebDocumentView *) _documentView; | |
287 | - (UIScrollView *) _scrollView; | |
1e4922b8 | 288 | - (UIScroller *) _scroller; |
9297d5d5 | 289 | - (void) _updateViewSettings; |
c2292b80 JF |
290 | //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request; |
291 | - (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener; | |
292 | - (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener; | |
293 | - (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame; | |
294 | - (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame; | |
295 | - (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame; | |
1e4922b8 | 296 | - (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame; |
c2292b80 JF |
297 | - (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame; |
298 | - (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame; | |
299 | - (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source; | |
300 | - (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; | |
301 | - (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; | |
302 | - (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame; | |
303 | - (void) webViewClose:(WebView *)view; | |
1e4922b8 | 304 | @end |
4c3cf6af | 305 | // }}} |
1e4922b8 | 306 | |
cbc40330 JF |
307 | // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{ |
308 | #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | |
309 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | |
e4e75caf | 310 | // XXX: this is a random jumble of garbage |
cbc40330 JF |
311 | |
312 | typedef enum { | |
313 | UIModalPresentationFullScreen, | |
314 | UIModalPresentationPageSheet, | |
315 | UIModalPresentationFormSheet, | |
316 | UIModalPresentationCurrentContext, | |
317 | } UIModalPresentationStyle; | |
1e4922b8 | 318 | |
868fe07c | 319 | #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic |
868fe07c | 320 | |
d10260cf JF |
321 | #define UIBarStyleBlack UIBarStyleBlackOpaque |
322 | ||
cbc40330 JF |
323 | @class NSUndoManager; |
324 | @class UIPasteboard; | |
325 | ||
ec843f22 JF |
326 | @interface UIActionSheet (iPad) |
327 | - (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated; | |
328 | @end | |
329 | ||
cbc40330 JF |
330 | @interface UIViewController (iPad) |
331 | - (void) setModalPresentationStyle:(UIModalPresentationStyle)style; | |
332 | @end | |
333 | ||
e44924fb JF |
334 | @interface UIScrollView (iOS_3_0) |
335 | @property(assign, nonatomic) float decelerationRate; | |
336 | @end | |
337 | ||
fb59b296 JF |
338 | @interface UIWebView (iOS_3_0) |
339 | @property(assign, nonatomic) NSUInteger dataDetectorTypes; | |
340 | @end | |
341 | ||
e44924fb JF |
342 | extern float const UIScrollViewDecelerationRateNormal; |
343 | ||
cbc40330 JF |
344 | #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER |
345 | // }}} | |
e4e75caf JF |
346 | // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{ |
347 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 | |
348 | ||
349 | #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5) | |
350 | ||
351 | #endif | |
352 | // }}} | |
cbc40330 JF |
353 | |
354 | // extern *; {{{ | |
355 | extern CFStringRef const kGSDisplayIdentifiersCapability; | |
356 | extern float const UIWebViewGrowsAndShrinksToFitHeight; | |
357 | extern float const UIWebViewScalesToFitScale; | |
4c3cf6af JF |
358 | // }}} |
359 | // extern "C" *(); {{{ | |
8899f78d | 360 | extern "C" void *reboot2(uint64_t flags); |
92cb9864 | 361 | extern "C" mach_port_t SBSSpringBoardServerPort(); |
1e4922b8 JF |
362 | extern "C" UIImage *_UIImageWithName(NSString *name); |
363 | extern "C" void UISetColor(CGColorRef color); | |
4c3cf6af | 364 | // }}} |
1e4922b8 JF |
365 | |
366 | #endif//CYDIA_UIKITPRIVATE_H |