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) setThumbDetectionEnabled
:(BOOL
)enabled
;
86 @interface UITextLabel
: UIView
87 - (void) setCentersHorizontally
:(BOOL
)centers
;
88 - (void) setColor
:(UIColor
*)color
;
89 - (void) setFont
:(UIFont
*)font
;
90 - (void) setText
:(NSString
*)text
;
93 @interface UITransitionView
: UIView
96 @interface UIWebDocumentView
: UIView
97 - (CGRect
) documentBounds
;
98 - (void) enableReachability
;
99 - (void) loadRequest
:(NSURLRequest
*)request
;
100 - (void) redrawScaledDocument
;
101 - (void) setAllowsImageSheet
:(BOOL
)allows
;
102 - (void) setAllowsMessaging
:(BOOL
)allows
;
103 - (void) setAutoresizes
:(BOOL
)autoresizes
;
104 - (void) setContentsPosition
:(NSInteger
)position
;
105 - (void) setDrawsBackground
:(BOOL
)draws
;
106 - (void) _setDocumentType
:(NSInteger
)type
;
107 - (void) setDrawsGrid
:(BOOL
)draws
;
108 - (void) setInitialScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
109 - (void) setLogsTilingChanges
:(BOOL
)logs
;
110 - (void) setMinimumScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
111 - (void) setMinimumSize
:(CGSize
)size
;
112 - (void) setMaximumScale
:(float)scale forDocumentTypes
:(NSInteger
)tpyes
;
113 - (void) setSmoothsFonts
:(BOOL
)smooths
;
114 - (void) setTileMinificationFilter
:(NSString
*)filter
;
115 - (void) setTileSize
:(CGSize
)size
;
116 - (void) setTilingEnabled
:(BOOL
)enabled
;
117 - (void) setViewportSize
:(CGSize
)size forDocumentTypes
:(NSInteger
)types
;
118 - (void) setZoomsFocusedFormControl
:(BOOL
)zooms
;
119 - (void) useSelectionAssistantWithMode
:(NSInteger
)mode
;
120 - (WebView
*) webView
;
123 @interface UIWebViewWebViewDelegate
: NSObject
{
124 @
public UIWebView
*uiWebView
;
128 // @interface *Button : * {{{
129 @interface UINavigationButton
: UIButton
130 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
131 - (void) setBarStyle
:(UIBarStyle
)style
;
134 @interface UIPushButton
: UIControl
135 - (id
) backgroundForState
:(NSUInteger
)state
;
136 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
137 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
138 - (void) setDrawsShadow
:(BOOL
)draws
;
139 - (void) setStretchBackground
:(BOOL
)stretch
;
140 - (void) setTitle
:(NSString
*)title
;
141 - (void) setTitleFont
:(UIFont
*)font
;
144 @interface UIThreePartButton
: UIPushButton
147 // @interface * : NS* {{{
148 @interface WebDefaultUIKitDelegate
: NSObject
149 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
152 // @interface UIWeb* : * {{{
153 @interface UIWebBrowserView
: UIWebDocumentView
156 @interface UIWebTouchEventsGestureRecognizer
: UIGestureRecognizer
158 - (NSString
*) _typeDescription
;
162 // @interface NS* (*) {{{
163 @interface
NSMutableURLRequest (Apple
)
164 - (void) setHTTPShouldUsePipelining
:(BOOL
)pipelining
;
167 @interface
NSString (Apple
)
168 - (NSString
*) stringByAddingPercentEscapes
;
169 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
172 @interface
NSURL (Apple
)
173 - (BOOL
) isGoogleMapsURL
;
174 - (BOOL
) isSpringboardHandledURL
;
175 // XXX: make this an enum
176 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
178 - (NSURL
*) phobosURL
;
179 - (NSURL
*) youTubeURL
;
182 @interface
NSURLRequest (Apple
)
183 + (BOOL
) allowsAnyHTTPSCertificateForHost
:(NSString
*)host
;
184 + (void) setAllowsAnyHTTPSCertificate
:(BOOL
)allow forHost
:(NSString
*)host
;
187 @interface
NSValue (Apple
)
188 + (NSValue
*) valueWithSize
:(CGSize
)size
;
191 // @interface UI* (*) {{{
192 @interface
UIActionSheet (Apple
)
193 - (void) setContext
:(NSString
*)context
;
194 - (NSString
*) context
;
197 @interface
UIAlertView (Apple
)
198 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
200 - (NSString
*) context
;
201 - (void) setContext
:(NSString
*)context
;
202 - (void) setNumberOfRows
:(int)rows
;
203 - (void) setRunsModal
:(BOOL
)modal
;
204 - (UITextField
*) textField
;
205 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
206 - (void) _updateFrameForDisplay
;
209 @interface
UIApplication (Apple
)
210 - (void) applicationSuspend
:(GSEventRef
)event
;
211 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
212 - (void) applicationOpenURL
:(NSURL
*)url
;
213 - (void) applicationWillResignActive
:(UIApplication
*)application
;
214 - (void) applicationWillSuspend
;
215 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
216 - (void) openURL
:(NSURL
*)url asPanel
:(BOOL
)panel
;
217 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
218 - (void) _setSuspended
:(BOOL
)suspended
;
219 - (void) terminateWithSuccess
;
222 @interface
UIBarButtonItem (Apple
)
226 @interface
UIColor (Apple
)
227 + (UIColor
*) pinStripeColor
;
230 @interface
UIControl (Apple
)
231 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
234 @interface
UIDevice (Apple
)
238 @interface
UIImage (Apple
)
239 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
240 + (UIImage
*) imageAtPath
:(NSString
*)path
;
243 @interface
UINavigationBar (Apple
)
244 + (CGSize
) defaultSize
;
245 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
248 @interface
UIScrollView (Apple
)
249 - (void) setScrollingEnabled
:(BOOL
)enabled
;
250 - (void) setShowBackgroundShadow
:(BOOL
)show
;
253 @interface
UISearchBar (Apple
)
254 - (UITextField
*) searchField
;
257 @interface
UITabBarController (Apple
)
258 - (UITransitionView
*) _transitionView
;
259 - (void) concealTabBarSelection
;
260 - (void) revealTabBarSelection
;
263 @interface
UITabBarItem (Apple
)
264 - (void) setAnimatedBadge
:(BOOL
)animated
;
267 @interface
UITableViewCell (Apple
)
268 - (float) selectionPercent
;
269 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
272 @interface
UITextField (Apple
)
273 - (UITextInputTraits
*) textInputTraits
;
276 @interface
UITextView (Apple
)
278 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
279 - (void) setFont
:(UIFont
*)font
;
280 - (void) setMarginTop
:(int)margin
;
281 - (void) setTextColor
:(UIColor
*)color
;
284 @interface
UIView (Apple
)
285 - (UIScroller
*) _scroller
;
286 - (void) setClipsSubviews
:(BOOL
)clips
;
287 - (void) setEnabledGestures
:(NSInteger
)gestures
;
288 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
289 - (void) setGestureDelegate
:(id
)delegate
;
290 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
291 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
292 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
293 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
296 @interface
UIViewController (Apple
)
297 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
300 @interface
UIWindow (Apple
)
301 - (UIResponder
*) firstResponder
;
302 - (void) makeKey
:(UIApplication
*)application
;
303 - (void) orderFront
:(UIApplication
*)application
;
306 @interface
UIWebView (Apple
)
307 - (UIWebDocumentView
*) _documentView
;
308 - (UIScrollView
*) _scrollView
;
309 - (UIScroller
*) _scroller
;
310 - (void) _updateViewSettings
;
311 - (void) webView
:(WebView
*)view addMessageToConsole
:(NSDictionary
*)message
;
312 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
313 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
314 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
315 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
316 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
317 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
318 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
319 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
320 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
321 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
322 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
323 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
324 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
325 - (void) webViewClose
:(WebView
*)view
;
329 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
330 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
331 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
332 // XXX: this is a random jumble of garbage
335 UIModalPresentationFullScreen
,
336 UIModalPresentationPageSheet
,
337 UIModalPresentationFormSheet
,
338 UIModalPresentationCurrentContext
,
339 } UIModalPresentationStyle
;
341 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
343 #define UIBarStyleBlack UIBarStyleBlackOpaque
345 @
class NSUndoManager
;
348 @interface
UIActionSheet (iPad
)
349 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
352 @interface
UIViewController (iPad
)
353 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
356 @interface
UIApplication (iOS_3_0
)
357 @
property(nonatomic
) BOOL applicationSupportsShakeToEdit
;
360 @interface
UIScrollView (iOS_3_0
)
361 @
property(assign
,nonatomic
) float decelerationRate
;
364 @interface
UIWebView (iOS_3_0
)
365 @
property(assign
,nonatomic
) NSUInteger dataDetectorTypes
;
368 extern float const UIScrollViewDecelerationRateNormal
;
370 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
372 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
373 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
375 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
376 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
381 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
382 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
385 @interface
UIScreen (iOS_4_0
)
386 @
property(nonatomic
,readonly
) CGFloat scale
;
390 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
391 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
392 extern float const UIWebViewScalesToFitScale
;
394 // extern "C" *(); {{{
395 extern "C" void *reboot2(uint64_t flags
);
396 extern "C" mach_port_t
SBSSpringBoardServerPort();
397 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
398 extern "C" void UISetColor(CGColorRef color
);
401 #endif//CYDIA_UIKITPRIVATE_H