1 #ifndef CYDIA_UIKITPRIVATE_H
2 #define CYDIA_UIKITPRIVATE_H
5 #include <GraphicsServices/GraphicsServices.h>
7 // 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*/
20 UINavigationButtonStyleNormal
,
21 UINavigationButtonStyleBack
,
22 UINavigationButtonStyleHighlighted
,
23 UINavigationButtonStyleDestructive
24 } UINavigationButtonStyle
;
27 UIProgressIndicatorStyleLargeWhite
,
28 UIProgressIndicatorStyleMediumWhite
,
29 UIProgressIndicatorStyleMediumBrown
,
30 UIProgressIndicatorStyleSmallWhite
,
31 UIProgressIndicatorStyleSmallBlack
,
32 UIProgressIndicatorStyleTinyWhite
,
33 } UIProgressIndicatorStyle
;
36 #define UIDataDetectorTypeAutomatic 0x80000000
40 @
class WebScriptObject
;
44 @protocol WebPolicyDecisionListener
;
47 // @interface * : UIView {{{
48 @interface UIFormAssistant
: UIView
49 + (UIFormAssistant
*) sharedFormAssistant
;
50 - (CGRect
) peripheralFrame
;
53 @interface UIKeyboard
: UIView
54 + (void) initImplementationNow
;
57 @interface UIProgressBar
: UIView
58 + (CGSize
) defaultSize
;
59 - (void) setProgress
:(float)progress
;
60 - (void) setStyle
:(NSInteger
)style
;
63 @interface UIProgressHUD
: UIView
65 - (void) setText
:(NSString
*)text
;
66 - (void) showInView
:(UIView
*)view
;
69 @interface UIProgressIndicator
: UIView
70 + (CGSize
) defaultSizeForStyle
:(NSUInteger
)style
;
71 - (NSUInteger
) activityIndicatorViewStyle
;
72 - (void) setStyle
:(UIProgressIndicatorStyle
)style
;
73 - (void) startAnimation
;
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) setScrollerIndicatorStyle
:(UIScrollViewIndicatorStyle
)style
;
84 - (void) setThumbDetectionEnabled
:(BOOL
)enabled
;
87 @interface UITextLabel
: UIView
88 - (void) setCentersHorizontally
:(BOOL
)centers
;
89 - (void) setColor
:(UIColor
*)color
;
90 - (void) setFont
:(UIFont
*)font
;
91 - (void) setText
:(NSString
*)text
;
94 @interface UITransitionView
: UIView
97 @interface UIWebDocumentView
: UIView
98 - (CGRect
) documentBounds
;
99 - (void) enableReachability
;
100 - (void) loadRequest
:(NSURLRequest
*)request
;
101 - (void) redrawScaledDocument
;
102 - (void) setAllowsImageSheet
:(BOOL
)allows
;
103 - (void) setAllowsMessaging
:(BOOL
)allows
;
104 - (void) setAutoresizes
:(BOOL
)autoresizes
;
105 - (void) setContentsPosition
:(NSInteger
)position
;
106 - (void) setDrawsBackground
:(BOOL
)draws
;
107 - (void) _setDocumentType
:(NSInteger
)type
;
108 - (void) setDrawsGrid
:(BOOL
)draws
;
109 - (void) setInitialScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
110 - (void) setLogsTilingChanges
:(BOOL
)logs
;
111 - (void) setMinimumScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
112 - (void) setMinimumSize
:(CGSize
)size
;
113 - (void) setMaximumScale
:(float)scale forDocumentTypes
:(NSInteger
)tpyes
;
114 - (void) setSmoothsFonts
:(BOOL
)smooths
;
115 - (void) setTileMinificationFilter
:(NSString
*)filter
;
116 - (void) setTileSize
:(CGSize
)size
;
117 - (void) setTilingEnabled
:(BOOL
)enabled
;
118 - (void) setViewportSize
:(CGSize
)size forDocumentTypes
:(NSInteger
)types
;
119 - (void) setZoomsFocusedFormControl
:(BOOL
)zooms
;
120 - (void) useSelectionAssistantWithMode
:(NSInteger
)mode
;
121 - (WebView
*) webView
;
124 @interface UIWebViewWebViewDelegate
: NSObject
{
125 @
public UIWebView
*uiWebView
;
128 - (void) _clearUIWebView
;
132 // @interface *Button : * {{{
133 @interface UINavigationButton
: UIButton
134 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
135 - (void) setBarStyle
:(UIBarStyle
)style
;
138 @interface UIPushButton
: UIControl
139 - (id
) backgroundForState
:(NSUInteger
)state
;
140 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
141 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
142 - (void) setDrawsShadow
:(BOOL
)draws
;
143 - (void) setStretchBackground
:(BOOL
)stretch
;
144 - (void) setTitle
:(NSString
*)title
;
145 - (void) setTitleFont
:(UIFont
*)font
;
148 @interface UIThreePartButton
: UIPushButton
151 // @interface * : NS* {{{
152 @interface WebDefaultUIKitDelegate
: NSObject
153 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
156 // @interface UIWeb* : * {{{
157 @interface UIWebBrowserView
: UIWebDocumentView
160 @interface UIWebTouchEventsGestureRecognizer
: UIGestureRecognizer
162 - (NSString
*) _typeDescription
;
166 // @interface NS* (*) {{{
167 @interface
NSMutableURLRequest (Apple
)
168 - (void) setHTTPShouldUsePipelining
:(BOOL
)pipelining
;
171 @interface
NSString (Apple
)
172 - (NSString
*) stringByAddingPercentEscapes
;
173 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
176 @interface
NSURL (Apple
)
177 - (BOOL
) isGoogleMapsURL
;
178 - (BOOL
) isSpringboardHandledURL
;
179 // XXX: make this an enum
180 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
182 - (NSURL
*) phobosURL
;
183 - (NSURL
*) youTubeURL
;
186 @interface
NSURLRequest (Apple
)
187 + (BOOL
) allowsAnyHTTPSCertificateForHost
:(NSString
*)host
;
188 + (void) setAllowsAnyHTTPSCertificate
:(BOOL
)allow forHost
:(NSString
*)host
;
191 @interface
NSValue (Apple
)
192 + (NSValue
*) valueWithSize
:(CGSize
)size
;
195 // @interface UI* (*) {{{
196 @interface
UIActionSheet (Apple
)
197 - (void) setContext
:(NSString
*)context
;
198 - (NSString
*) context
;
201 @interface
UIAlertView (Apple
)
202 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
204 - (NSString
*) context
;
205 - (void) setContext
:(NSString
*)context
;
206 - (void) setNumberOfRows
:(int)rows
;
207 - (void) setRunsModal
:(BOOL
)modal
;
208 - (UITextField
*) textField
;
209 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
210 - (void) _updateFrameForDisplay
;
213 @interface
UIApplication (Apple
)
214 - (void) applicationSuspend
:(GSEventRef
)event
;
215 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
216 - (void) applicationOpenURL
:(NSURL
*)url
;
217 - (void) applicationWillResignActive
:(UIApplication
*)application
;
218 - (void) applicationWillSuspend
;
219 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
220 - (void) openURL
:(NSURL
*)url asPanel
:(BOOL
)panel
;
221 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
222 - (void) _setSuspended
:(BOOL
)suspended
;
223 - (void) terminateWithSuccess
;
226 @interface
UIBarButtonItem (Apple
)
230 @interface
UIColor (Apple
)
231 + (UIColor
*) pinStripeColor
;
234 @interface
UIControl (Apple
)
235 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
238 @interface
UIDevice (Apple
)
242 @interface
UIImage (Apple
)
243 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
244 + (UIImage
*) imageAtPath
:(NSString
*)path
;
247 @interface
UINavigationBar (Apple
)
248 + (CGSize
) defaultSize
;
249 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
252 @interface
UIScrollView (Apple
)
253 - (void) setScrollingEnabled
:(BOOL
)enabled
;
254 - (void) setShowBackgroundShadow
:(BOOL
)show
;
257 @interface
UISearchBar (Apple
)
258 - (UITextField
*) searchField
;
261 @interface
UITabBarController (Apple
)
262 - (UITransitionView
*) _transitionView
;
263 - (void) concealTabBarSelection
;
264 - (void) revealTabBarSelection
;
267 @interface
UITabBarItem (Apple
)
268 - (void) setAnimatedBadge
:(BOOL
)animated
;
271 @interface
UITableViewCell (Apple
)
272 - (float) selectionPercent
;
273 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
276 @interface
UITextField (Apple
)
277 - (UITextInputTraits
*) textInputTraits
;
280 @interface
UITextView (Apple
)
282 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
283 - (void) setFont
:(UIFont
*)font
;
284 - (void) setMarginTop
:(int)margin
;
285 - (void) setTextColor
:(UIColor
*)color
;
288 @interface
UIView (Apple
)
289 - (UIScroller
*) _scroller
;
290 - (void) setClipsSubviews
:(BOOL
)clips
;
291 - (void) setEnabledGestures
:(NSInteger
)gestures
;
292 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
293 - (void) setGestureDelegate
:(id
)delegate
;
294 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
295 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
296 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
297 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
300 @interface
UIViewController (Apple
)
301 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
305 @interface
UIWindow (Apple
)
306 - (UIResponder
*) firstResponder
;
307 - (void) makeKey
:(UIApplication
*)application
;
308 - (void) orderFront
:(UIApplication
*)application
;
311 @interface
UIWebView (Apple
)
312 - (UIWebDocumentView
*) _documentView
;
313 - (UIScrollView
*) _scrollView
;
314 - (UIScroller
*) _scroller
;
315 - (void) _updateViewSettings
;
316 - (void) webView
:(WebView
*)view addMessageToConsole
:(NSDictionary
*)message
;
317 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
318 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
319 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
320 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
321 - (void) webView
:(WebView
*)view didCommitLoadForFrame
:(WebFrame
*)frame
;
322 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
323 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
324 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
325 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
326 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
327 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
328 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
329 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
330 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
331 - (void) webViewClose
:(WebView
*)view
;
335 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
336 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
337 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
338 // XXX: this is a random jumble of garbage
341 UIModalPresentationFullScreen
,
342 UIModalPresentationPageSheet
,
343 UIModalPresentationFormSheet
,
344 UIModalPresentationCurrentContext
,
345 } UIModalPresentationStyle
;
347 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
349 #define UIBarStyleBlack UIBarStyleBlackOpaque
351 @
class NSUndoManager
;
354 @interface
UIActionSheet (iPad
)
355 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
358 @interface
UIViewController (iPad
)
359 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
362 @interface
UIApplication (iOS_3_0
)
363 @
property(nonatomic
) BOOL applicationSupportsShakeToEdit
;
366 @interface
UIScrollView (iOS_3_0
)
367 @
property(assign
,nonatomic
) float decelerationRate
;
370 @interface
UIWebView (iOS_3_0
)
371 @
property(assign
,nonatomic
) NSUInteger dataDetectorTypes
;
374 extern float const UIScrollViewDecelerationRateNormal
;
376 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
378 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
379 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
381 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
382 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
387 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
388 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
391 @interface
UIScreen (iOS_4_0
)
392 @
property(nonatomic
,readonly
) CGFloat scale
;
396 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
397 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
398 extern float const UIWebViewScalesToFitScale
;
400 // extern "C" *(); {{{
401 extern "C" void *reboot2(uint64_t flags
);
402 extern "C" mach_port_t
SBSSpringBoardServerPort();
403 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
404 extern "C" void UISetColor(CGColorRef color
);
407 #endif//CYDIA_UIKITPRIVATE_H