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