1 #ifndef CYDIA_UIKITPRIVATE_H
2 #define CYDIA_UIKITPRIVATE_H
5 #include <GraphicsServices/GraphicsServices.h>
6 #include <UIKit/UIKit.h>
9 #import <WebKit/WebPreferences.h>
11 // typedef enum {*} *; {{{
13 UIGestureAttributeMinDegrees
, /*float*/
14 UIGestureAttributeMaxDegrees
, /*float*/
15 UIGestureAttributeMinScale
, /*float*/
16 UIGestureAttributeMaxScale
, /*float*/
17 UIGestureAttributeIsZoomRubberBandEnabled
, /*BOOL*/
18 UIGestureAttributeZoomsFromCurrentToMinOrMax
, /*BOOL*/
19 UIGestureAttributeVisibleSize
, /*CGSize*/
20 UIGestureAttributeUpdatesScroller
, /*BOOL*/
24 UINavigationButtonStyleNormal
,
25 UINavigationButtonStyleBack
,
26 UINavigationButtonStyleHighlighted
,
27 UINavigationButtonStyleDestructive
28 } UINavigationButtonStyle
;
31 UIProgressIndicatorStyleLargeWhite
,
32 UIProgressIndicatorStyleMediumWhite
,
33 UIProgressIndicatorStyleMediumBrown
,
34 UIProgressIndicatorStyleSmallWhite
,
35 UIProgressIndicatorStyleSmallBlack
,
36 UIProgressIndicatorStyleTinyWhite
,
37 } UIProgressIndicatorStyle
;
40 #define UIDataDetectorTypeAutomatic 0x80000000
44 @
class WebScriptObject
;
48 @protocol WebPolicyDecisionListener
;
51 // @interface * : UIView {{{
52 @interface UIFormAssistant
: UIView
53 + (UIFormAssistant
*) sharedFormAssistant
;
54 - (CGRect
) peripheralFrame
;
57 @interface UIKeyboard
: UIView
58 + (void) initImplementationNow
;
61 @interface UIProgressBar
: UIView
62 + (CGSize
) defaultSize
;
63 - (void) setProgress
:(float)progress
;
64 - (void) setStyle
:(NSInteger
)style
;
67 @interface UIProgressHUD
: UIView
69 - (void) setText
:(NSString
*)text
;
70 - (void) showInView
:(UIView
*)view
;
73 @interface UIProgressIndicator
: UIView
74 + (CGSize
) defaultSizeForStyle
:(NSUInteger
)style
;
75 - (NSUInteger
) activityIndicatorViewStyle
;
76 - (void) setStyle
:(UIProgressIndicatorStyle
)style
;
77 - (void) startAnimation
;
80 @interface UIScroller
: UIView
81 - (CGSize
) contentSize
;
82 - (void) setDirectionalScrolling
:(BOOL
)directional
;
83 - (void) setEventMode
:(NSInteger
)mode
;
84 - (void) setOffset
:(CGPoint
)offset
;
85 - (void) setScrollDecelerationFactor
:(float)factor
;
86 - (void) setScrollHysteresis
:(float)hysteresis
;
87 - (void) setScrollerIndicatorStyle
:(UIScrollViewIndicatorStyle
)style
;
88 - (void) setThumbDetectionEnabled
:(BOOL
)enabled
;
91 @interface UITextLabel
: UIView
92 - (void) setCentersHorizontally
:(BOOL
)centers
;
93 - (void) setColor
:(UIColor
*)color
;
94 - (void) setFont
:(UIFont
*)font
;
95 - (void) setText
:(NSString
*)text
;
98 @interface UITransitionView
: UIView
101 @interface UIWebDocumentView
: UIView
102 - (CGRect
) documentBounds
;
103 - (void) enableReachability
;
104 - (void) loadRequest
:(NSURLRequest
*)request
;
105 - (void) redrawScaledDocument
;
106 - (void) setAllowsImageSheet
:(BOOL
)allows
;
107 - (void) setAllowsMessaging
:(BOOL
)allows
;
108 - (void) setAutoresizes
:(BOOL
)autoresizes
;
109 - (void) setContentsPosition
:(NSInteger
)position
;
110 - (void) setDrawsBackground
:(BOOL
)draws
;
111 - (void) _setDocumentType
:(NSInteger
)type
;
112 - (void) setDrawsGrid
:(BOOL
)draws
;
113 - (void) setInitialScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
114 - (void) setLogsTilingChanges
:(BOOL
)logs
;
115 - (void) setMinimumScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
116 - (void) setMinimumSize
:(CGSize
)size
;
117 - (void) setMaximumScale
:(float)scale forDocumentTypes
:(NSInteger
)tpyes
;
118 - (void) setSmoothsFonts
:(BOOL
)smooths
;
119 - (void) setTileMinificationFilter
:(NSString
*)filter
;
120 - (void) setTileSize
:(CGSize
)size
;
121 - (void) setTilingEnabled
:(BOOL
)enabled
;
122 - (void) setViewportSize
:(CGSize
)size forDocumentTypes
:(NSInteger
)types
;
123 - (void) setZoomsFocusedFormControl
:(BOOL
)zooms
;
124 - (void) useSelectionAssistantWithMode
:(NSInteger
)mode
;
125 - (WebView
*) webView
;
128 @interface UIWebViewWebViewDelegate
: NSObject
{
129 @
public UIWebView
*uiWebView
;
132 - (void) _clearUIWebView
;
136 // @interface *Button : * {{{
137 @interface UINavigationButton
: UIButton
138 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
139 - (void) setBarStyle
:(UIBarStyle
)style
;
142 @interface UIPushButton
: UIControl
143 - (id
) backgroundForState
:(NSUInteger
)state
;
144 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
145 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
146 - (void) setDrawsShadow
:(BOOL
)draws
;
147 - (void) setStretchBackground
:(BOOL
)stretch
;
148 - (void) setTitle
:(NSString
*)title
;
149 - (void) setTitleFont
:(UIFont
*)font
;
152 @interface UIThreePartButton
: UIPushButton
155 // @interface * : NS* {{{
156 @interface WebDefaultUIKitDelegate
: NSObject
157 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
160 // @interface UIWeb* : * {{{
161 @interface UIWebBrowserView
: UIWebDocumentView
164 @interface UIWebTouchEventsGestureRecognizer
: UIGestureRecognizer
166 - (NSString
*) _typeDescription
;
169 // @interface WAK* : * {{{
170 @interface WAKWindow
: NSObject
171 + (BOOL
) hasLandscapeOrientation
;
175 // @interface NS* (*) {{{
176 @interface
NSMutableURLRequest (Apple
)
177 - (void) setHTTPShouldUsePipelining
:(BOOL
)pipelining
;
180 @interface
NSString (Apple
)
181 - (NSString
*) stringByAddingPercentEscapes
;
182 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
185 @interface
NSURL (Apple
)
186 - (BOOL
) isGoogleMapsURL
;
187 - (BOOL
) isSpringboardHandledURL
;
188 // XXX: make this an enum
189 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
191 - (NSURL
*) phobosURL
;
192 - (NSURL
*) youTubeURL
;
195 @interface
NSURLRequest (Apple
)
196 + (BOOL
) allowsAnyHTTPSCertificateForHost
:(NSString
*)host
;
197 + (void) setAllowsAnyHTTPSCertificate
:(BOOL
)allow forHost
:(NSString
*)host
;
200 @interface
NSValue (Apple
)
201 + (NSValue
*) valueWithSize
:(CGSize
)size
;
204 // @interface UI* (*) {{{
205 @interface
UIActionSheet (Apple
)
206 - (void) setContext
:(NSString
*)context
;
207 - (NSString
*) context
;
210 @interface
UIAlertView (Apple
)
211 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
213 - (NSString
*) context
;
214 - (void) setContext
:(NSString
*)context
;
215 - (void) setNumberOfRows
:(int)rows
;
216 - (void) setRunsModal
:(BOOL
)modal
;
217 - (UITextField
*) textField
;
218 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
219 - (void) _updateFrameForDisplay
;
222 @interface
UIApplication (Apple
)
223 - (void) applicationSuspend
:(GSEventRef
)event
;
224 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
225 - (void) applicationOpenURL
:(NSURL
*)url
;
226 - (void) applicationWillResignActive
:(UIApplication
*)application
;
227 - (void) applicationWillSuspend
;
228 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
229 - (void) openURL
:(NSURL
*)url asPanel
:(BOOL
)panel
;
230 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
231 - (void) _setSuspended
:(BOOL
)suspended
;
232 - (void) terminateWithSuccess
;
235 @interface
UIBarButtonItem (Apple
)
239 @interface
UIColor (Apple
)
240 + (UIColor
*) pinStripeColor
;
243 @interface
UIControl (Apple
)
244 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
247 @interface
UIDevice (Apple
)
251 @interface
UIImage (Apple
)
252 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
253 + (UIImage
*) imageAtPath
:(NSString
*)path
;
256 @interface
UINavigationBar (Apple
)
257 + (CGSize
) defaultSize
;
258 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
261 @interface
UIScrollView (Apple
)
262 - (void) setScrollingEnabled
:(BOOL
)enabled
;
263 - (void) setShowBackgroundShadow
:(BOOL
)show
;
266 @interface
UISearchBar (Apple
)
267 - (UITextField
*) searchField
;
270 @interface
UITabBarController (Apple
)
271 - (UITransitionView
*) _transitionView
;
272 - (void) concealTabBarSelection
;
273 - (void) revealTabBarSelection
;
276 @interface
UITabBarItem (Apple
)
277 - (void) setAnimatedBadge
:(BOOL
)animated
;
280 @interface
UITableViewCell (Apple
)
281 - (float) selectionPercent
;
282 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
285 @interface
UITextField (Apple
)
286 - (UITextInputTraits
*) textInputTraits
;
289 @interface
UITextView (Apple
)
291 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
292 - (void) setFont
:(UIFont
*)font
;
293 - (void) setMarginTop
:(int)margin
;
294 - (void) setTextColor
:(UIColor
*)color
;
297 @interface
UIView (Apple
)
298 - (UIScroller
*) _scroller
;
299 - (void) setClipsSubviews
:(BOOL
)clips
;
300 - (void) setEnabledGestures
:(NSInteger
)gestures
;
301 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
302 - (void) setGestureDelegate
:(id
)delegate
;
303 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
304 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
305 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
306 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
309 @interface
UIViewController (Apple
)
310 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
314 @interface
UIWindow (Apple
)
315 - (UIResponder
*) firstResponder
;
316 - (void) makeKey
:(UIApplication
*)application
;
317 - (void) orderFront
:(UIApplication
*)application
;
320 @interface
UIWebView (Apple
)
321 - (UIWebDocumentView
*) _documentView
;
322 - (UIScrollView
*) _scrollView
;
323 - (UIScroller
*) _scroller
;
324 - (void) _updateViewSettings
;
325 - (void) webView
:(WebView
*)view addMessageToConsole
:(NSDictionary
*)message
;
326 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
327 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
328 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
329 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
330 - (void) webView
:(WebView
*)view didCommitLoadForFrame
:(WebFrame
*)frame
;
331 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
332 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
333 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
334 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
335 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
336 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
337 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
338 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
339 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
340 - (void) webViewClose
:(WebView
*)view
;
343 // @interface Web* (*) {{{
344 @interface
WebPreferences (Apple
)
345 + (void) _setInitialDefaultTextEncodingToSystemEncoding
;
346 - (void) _setLayoutInterval
:(NSInteger
)interval
;
347 - (void) setOfflineWebApplicationCacheEnabled
:(BOOL
)enabled
;
351 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
352 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
353 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
354 // XXX: this is a random jumble of garbage
357 UIModalPresentationFullScreen
,
358 UIModalPresentationPageSheet
,
359 UIModalPresentationFormSheet
,
360 UIModalPresentationCurrentContext
,
361 } UIModalPresentationStyle
;
363 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
365 #define UIBarStyleBlack UIBarStyleBlackOpaque
367 @
class NSUndoManager
;
370 @interface
UIActionSheet (iPad
)
371 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
374 @interface
UIViewController (iPad
)
375 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
378 @interface
UIApplication (iOS_3_0
)
379 @
property(nonatomic
) BOOL applicationSupportsShakeToEdit
;
382 @interface
UIScrollView (iOS_3_0
)
383 @
property(assign
,nonatomic
) float decelerationRate
;
386 @interface
UIWebView (iOS_3_0
)
387 @
property(assign
,nonatomic
) NSUInteger dataDetectorTypes
;
390 extern float const UIScrollViewDecelerationRateNormal
;
392 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
394 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
395 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
397 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
398 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
403 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
404 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
407 @interface
UIScreen (iOS_4_0
)
408 @
property(nonatomic
,readonly
) CGFloat scale
;
412 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
413 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
414 extern float const UIWebViewScalesToFitScale
;
416 // extern "C" *(); {{{
417 extern "C" void *reboot2(uint64_t flags
);
418 extern "C" mach_port_t
SBSSpringBoardServerPort();
419 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
420 extern "C" void UISetColor(CGColorRef color
);
423 #endif//CYDIA_UIKITPRIVATE_H