]>
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 | ||
93 | @interface UIWebDocumentView : UIView | |
94 | - (CGRect) documentBounds; | |
95 | - (void) enableReachability; | |
96 | - (void) loadRequest:(NSURLRequest *)request; | |
97 | - (void) redrawScaledDocument; | |
98 | - (void) setAllowsImageSheet:(BOOL)allows; | |
99 | - (void) setAllowsMessaging:(BOOL)allows; | |
100 | - (void) setAutoresizes:(BOOL)autoresizes; | |
101 | - (void) setContentsPosition:(NSInteger)position; | |
c2292b80 JF |
102 | - (void) setDrawsBackground:(BOOL)draws; |
103 | - (void) _setDocumentType:(NSInteger)type; | |
104 | - (void) setDrawsGrid:(BOOL)draws; | |
105 | - (void) setInitialScale:(float)scale forDocumentTypes:(NSInteger)types; | |
106 | - (void) setLogsTilingChanges:(BOOL)logs; | |
107 | - (void) setMinimumScale:(float)scale forDocumentTypes:(NSInteger)types; | |
108 | - (void) setMinimumSize:(CGSize)size; | |
109 | - (void) setMaximumScale:(float)scale forDocumentTypes:(NSInteger)tpyes; | |
110 | - (void) setSmoothsFonts:(BOOL)smooths; | |
111 | - (void) setTileMinificationFilter:(NSString *)filter; | |
112 | - (void) setTileSize:(CGSize)size; | |
113 | - (void) setTilingEnabled:(BOOL)enabled; | |
114 | - (void) setViewportSize:(CGSize)size forDocumentTypes:(NSInteger)types; | |
115 | - (void) setZoomsFocusedFormControl:(BOOL)zooms; | |
116 | - (void) useSelectionAssistantWithMode:(NSInteger)mode; | |
117 | - (WebView *) webView; | |
118 | @end | |
c351c4ad JF |
119 | |
120 | @interface UIWebViewWebViewDelegate : NSObject { | |
121 | @public UIWebView *uiWebView; | |
122 | } | |
123 | @end | |
c2292b80 JF |
124 | // }}} |
125 | // @interface *Button : * {{{ | |
126 | @interface UINavigationButton : UIButton | |
127 | - (id) initWithTitle:(NSString *)title style:(UINavigationButtonStyle)style; | |
128 | - (void) setBarStyle:(UIBarStyle)style; | |
129 | @end | |
130 | ||
131 | @interface UIPushButton : UIControl | |
132 | - (id) backgroundForState:(NSUInteger)state; | |
133 | - (void) setAutosizesToFit:(BOOL)autosizes; | |
134 | - (void) setBackground:(id)background forState:(NSUInteger)state; | |
135 | - (void) setDrawsShadow:(BOOL)draws; | |
136 | - (void) setStretchBackground:(BOOL)stretch; | |
137 | - (void) setTitle:(NSString *)title; | |
138 | - (void) setTitleFont:(UIFont *)font; | |
139 | @end | |
140 | ||
141 | @interface UIThreePartButton : UIPushButton | |
142 | @end | |
143 | // }}} | |
144 | // @interface * : NS* {{{ | |
145 | @interface WebDefaultUIKitDelegate : NSObject | |
146 | + (WebDefaultUIKitDelegate *) sharedUIKitDelegate; | |
147 | @end | |
148 | // }}} | |
1e4922b8 | 149 | |
4c3cf6af | 150 | // @interface NS* (*) {{{ |
1e4922b8 | 151 | @interface NSString (Apple) |
1e4922b8 JF |
152 | - (NSString *) stringByAddingPercentEscapes; |
153 | - (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to; | |
154 | @end | |
155 | ||
156 | @interface NSURL (Apple) | |
157 | - (BOOL) isGoogleMapsURL; | |
158 | - (BOOL) isSpringboardHandledURL; | |
159 | // XXX: make this an enum | |
160 | - (NSURL *) itmsURL:(NSInteger *)store; | |
161 | - (NSURL *) mapsURL; | |
162 | - (NSURL *) phobosURL; | |
163 | - (NSURL *) youTubeURL; | |
164 | @end | |
165 | ||
166 | @interface NSValue (Apple) | |
167 | + (NSValue *) valueWithSize:(CGSize)size; | |
168 | @end | |
4c3cf6af JF |
169 | // }}} |
170 | // @interface UI* (*) {{{ | |
1e4922b8 | 171 | @interface UIActionSheet (Apple) |
48861ec9 | 172 | - (void) setContext:(NSString *)context; |
1e4922b8 JF |
173 | - (NSString *) context; |
174 | @end | |
175 | ||
176 | @interface UIAlertView (Apple) | |
177 | - (void) addTextFieldWithValue:(NSString *)value label:(NSString *)label; | |
178 | - (id) buttons; | |
179 | - (NSString *) context; | |
180 | - (void) setContext:(NSString *)context; | |
181 | - (void) setNumberOfRows:(int)rows; | |
182 | - (void) setRunsModal:(BOOL)modal; | |
183 | - (UITextField *) textField; | |
184 | - (UITextField *) textFieldAtIndex:(NSUInteger)index; | |
185 | - (void) _updateFrameForDisplay; | |
186 | @end | |
187 | ||
188 | @interface UIApplication (Apple) | |
189 | - (void) applicationSuspend:(GSEventRef)event; | |
190 | - (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale; | |
191 | - (void) applicationOpenURL:(NSURL *)url; | |
192 | - (void) applicationWillResignActive:(UIApplication *)application; | |
193 | - (void) applicationWillSuspend; | |
194 | - (void) launchApplicationWithIdentifier:(NSString *)identifier suspended:(BOOL)suspended; | |
195 | - (void) removeApplicationBadge; | |
196 | - (void) setApplicationBadge:(NSString *)badge; | |
197 | - (void) setApplicationBadgeString:(NSString *)badge; | |
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 | ||
1e4922b8 JF |
207 | @interface UIControl (Apple) |
208 | - (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events; | |
209 | @end | |
210 | ||
211 | @interface UIDevice (Apple) | |
212 | - (BOOL) isWildcat; | |
213 | @end | |
214 | ||
215 | @interface UIImage (Apple) | |
216 | + (UIImage *) applicationImageNamed:(NSString *)name; | |
217 | + (UIImage *) imageAtPath:(NSString *)path; | |
218 | @end | |
219 | ||
220 | @interface UINavigationBar (Apple) | |
221 | + (CGSize) defaultSize; | |
222 | - (UIBarStyle) _barStyle:(BOOL)style; | |
223 | @end | |
224 | ||
c2292b80 JF |
225 | @interface UIScrollView (Apple) |
226 | - (void) setScrollingEnabled:(BOOL)enabled; | |
227 | - (void) setShowBackgroundShadow:(BOOL)show; | |
228 | @end | |
229 | ||
1e4922b8 JF |
230 | @interface UISearchBar (Apple) |
231 | - (UITextField *) searchField; | |
232 | @end | |
233 | ||
234 | @interface UITabBarItem (Apple) | |
235 | - (void) setAnimatedBadge:(BOOL)animated; | |
236 | @end | |
237 | ||
238 | @interface UITableViewCell (Apple) | |
239 | - (float) selectionPercent; | |
240 | @end | |
241 | ||
242 | @interface UITextField (Apple) | |
243 | - (UITextInputTraits *) textInputTraits; | |
244 | @end | |
245 | ||
246 | @interface UITextView (Apple) | |
247 | - (UIFont *) font; | |
248 | - (void) setAllowsRubberBanding:(BOOL)rubberbanding; | |
249 | - (void) setFont:(UIFont *)font; | |
250 | - (void) setMarginTop:(int)margin; | |
251 | - (void) setTextColor:(UIColor *)color; | |
252 | @end | |
253 | ||
254 | @interface UIView (Apple) | |
c2292b80 JF |
255 | - (UIScroller *) _scroller; |
256 | - (void) setClipsSubviews:(BOOL)clips; | |
1e4922b8 | 257 | - (void) setEnabledGestures:(NSInteger)gestures; |
c2292b80 | 258 | - (void) setFixedBackgroundPattern:(BOOL)fixed; |
1e4922b8 JF |
259 | - (void) setGestureDelegate:(id)delegate; |
260 | - (void) setNeedsDisplayOnBoundsChange:(BOOL)needs; | |
261 | - (void) setValue:(NSValue *)value forGestureAttribute:(NSInteger)attribute; | |
262 | - (void) setZoomScale:(float)scale duration:(double)duration; | |
263 | - (void) _setZoomScale:(float)scale duration:(double)duration; | |
264 | @end | |
265 | ||
266 | @interface UIViewController (Apple) | |
267 | - (void) _updateLayoutForStatusBarAndInterfaceOrientation; | |
268 | @end | |
269 | ||
270 | @interface UIWindow (Apple) | |
271 | - (UIResponder *) firstResponder; | |
272 | - (void) makeKey:(UIApplication *)application; | |
273 | - (void) orderFront:(UIApplication *)application; | |
274 | @end | |
1e4922b8 | 275 | |
c2292b80 JF |
276 | @interface UIWebView (Apple) |
277 | - (UIWebDocumentView *) _documentView; | |
278 | - (UIScrollView *) _scrollView; | |
1e4922b8 | 279 | - (UIScroller *) _scroller; |
c2292b80 JF |
280 | //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request; |
281 | - (void) webView:(WebView *)view decidePolicyForNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener; | |
282 | - (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)name decisionListener:(id<WebPolicyDecisionListener>)listener; | |
283 | - (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame; | |
284 | - (void) webView:(WebView *)view didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame; | |
285 | - (void) webView:(WebView *)view didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame; | |
1e4922b8 | 286 | - (void) webView:(WebView *)view didFinishLoadForFrame:(WebFrame *)frame; |
c2292b80 JF |
287 | - (void) webView:(WebView *)view didReceiveTitle:(id)title forFrame:(id)frame; |
288 | - (void) webView:(WebView *)view didStartProvisionalLoadForFrame:(WebFrame *)frame; | |
289 | - (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source; | |
290 | - (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; | |
291 | - (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; | |
292 | - (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame; | |
293 | - (void) webViewClose:(WebView *)view; | |
1e4922b8 | 294 | @end |
4c3cf6af | 295 | // }}} |
1e4922b8 | 296 | |
cbc40330 JF |
297 | // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{ |
298 | #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | |
299 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | |
300 | ||
301 | typedef enum { | |
302 | UIModalPresentationFullScreen, | |
303 | UIModalPresentationPageSheet, | |
304 | UIModalPresentationFormSheet, | |
305 | UIModalPresentationCurrentContext, | |
306 | } UIModalPresentationStyle; | |
1e4922b8 | 307 | |
868fe07c JF |
308 | #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic |
309 | #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5) | |
310 | ||
d10260cf JF |
311 | #define UIBarStyleBlack UIBarStyleBlackOpaque |
312 | ||
cbc40330 JF |
313 | @class NSUndoManager; |
314 | @class UIPasteboard; | |
315 | ||
ec843f22 JF |
316 | @interface UIActionSheet (iPad) |
317 | - (void) showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated; | |
318 | @end | |
319 | ||
cbc40330 JF |
320 | @interface UIViewController (iPad) |
321 | - (void) setModalPresentationStyle:(UIModalPresentationStyle)style; | |
322 | @end | |
323 | ||
e44924fb JF |
324 | @interface UIScrollView (iOS_3_0) |
325 | @property(assign, nonatomic) float decelerationRate; | |
326 | @end | |
327 | ||
fb59b296 JF |
328 | @interface UIWebView (iOS_3_0) |
329 | @property(assign, nonatomic) NSUInteger dataDetectorTypes; | |
330 | @end | |
331 | ||
e44924fb JF |
332 | extern float const UIScrollViewDecelerationRateNormal; |
333 | ||
cbc40330 JF |
334 | #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER |
335 | // }}} | |
336 | ||
337 | // extern *; {{{ | |
338 | extern CFStringRef const kGSDisplayIdentifiersCapability; | |
339 | extern float const UIWebViewGrowsAndShrinksToFitHeight; | |
340 | extern float const UIWebViewScalesToFitScale; | |
4c3cf6af JF |
341 | // }}} |
342 | // extern "C" *(); {{{ | |
1e4922b8 JF |
343 | extern "C" UIImage *_UIImageWithName(NSString *name); |
344 | extern "C" void UISetColor(CGColorRef color); | |
4c3cf6af | 345 | // }}} |
1e4922b8 JF |
346 | |
347 | #endif//CYDIA_UIKITPRIVATE_H |