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