1 #ifndef CYDIA_UIKITPRIVATE_H
2 #define CYDIA_UIKITPRIVATE_H
5 #include <GraphicsServices/GraphicsServices.h>
8 #import <WebKit/WebPreferences.h>
10 // typedef enum {*} *; {{{
12 UIGestureAttributeMinDegrees
, /*float*/
13 UIGestureAttributeMaxDegrees
, /*float*/
14 UIGestureAttributeMinScale
, /*float*/
15 UIGestureAttributeMaxScale
, /*float*/
16 UIGestureAttributeIsZoomRubberBandEnabled
, /*BOOL*/
17 UIGestureAttributeZoomsFromCurrentToMinOrMax
, /*BOOL*/
18 UIGestureAttributeVisibleSize
, /*CGSize*/
19 UIGestureAttributeUpdatesScroller
, /*BOOL*/
23 UINavigationButtonStyleNormal
,
24 UINavigationButtonStyleBack
,
25 UINavigationButtonStyleHighlighted
,
26 UINavigationButtonStyleDestructive
27 } UINavigationButtonStyle
;
30 UIProgressIndicatorStyleLargeWhite
,
31 UIProgressIndicatorStyleMediumWhite
,
32 UIProgressIndicatorStyleMediumBrown
,
33 UIProgressIndicatorStyleSmallWhite
,
34 UIProgressIndicatorStyleSmallBlack
,
35 UIProgressIndicatorStyleTinyWhite
,
36 } UIProgressIndicatorStyle
;
39 #define UIDataDetectorTypeAutomatic 0x80000000
43 @
class WebScriptObject
;
47 @protocol WebPolicyDecisionListener
;
50 // @interface * : UIView {{{
51 @interface UIFormAssistant
: UIView
52 + (UIFormAssistant
*) sharedFormAssistant
;
53 - (CGRect
) peripheralFrame
;
56 @interface UIKeyboard
: UIView
57 + (void) initImplementationNow
;
60 @interface UIProgressBar
: UIView
61 + (CGSize
) defaultSize
;
62 - (void) setProgress
:(float)progress
;
63 - (void) setStyle
:(NSInteger
)style
;
66 @interface UIProgressHUD
: UIView
68 - (void) setText
:(NSString
*)text
;
69 - (void) showInView
:(UIView
*)view
;
72 @interface UIProgressIndicator
: UIView
73 + (CGSize
) defaultSizeForStyle
:(NSUInteger
)style
;
74 - (NSUInteger
) activityIndicatorViewStyle
;
75 - (void) setStyle
:(UIProgressIndicatorStyle
)style
;
76 - (void) startAnimation
;
79 @interface UIScroller
: UIView
80 - (CGSize
) contentSize
;
81 - (void) setDirectionalScrolling
:(BOOL
)directional
;
82 - (void) setEventMode
:(NSInteger
)mode
;
83 - (void) setOffset
:(CGPoint
)offset
;
84 - (void) setScrollDecelerationFactor
:(float)factor
;
85 - (void) setScrollHysteresis
:(float)hysteresis
;
86 - (void) setScrollerIndicatorStyle
:(UIScrollViewIndicatorStyle
)style
;
87 - (void) setThumbDetectionEnabled
:(BOOL
)enabled
;
90 @interface UITextLabel
: UIView
91 - (void) setCentersHorizontally
:(BOOL
)centers
;
92 - (void) setColor
:(UIColor
*)color
;
93 - (void) setFont
:(UIFont
*)font
;
94 - (void) setText
:(NSString
*)text
;
97 @interface UITransitionView
: UIView
100 @interface UIWebDocumentView
: UIView
101 - (CGRect
) documentBounds
;
102 - (void) enableReachability
;
103 - (void) loadRequest
:(NSURLRequest
*)request
;
104 - (void) redrawScaledDocument
;
105 - (void) setAllowsImageSheet
:(BOOL
)allows
;
106 - (void) setAllowsMessaging
:(BOOL
)allows
;
107 - (void) setAutoresizes
:(BOOL
)autoresizes
;
108 - (void) setContentsPosition
:(NSInteger
)position
;
109 - (void) setDrawsBackground
:(BOOL
)draws
;
110 - (void) _setDocumentType
:(NSInteger
)type
;
111 - (void) setDrawsGrid
:(BOOL
)draws
;
112 - (void) setInitialScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
113 - (void) setLogsTilingChanges
:(BOOL
)logs
;
114 - (void) setMinimumScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
115 - (void) setMinimumSize
:(CGSize
)size
;
116 - (void) setMaximumScale
:(float)scale forDocumentTypes
:(NSInteger
)tpyes
;
117 - (void) setSmoothsFonts
:(BOOL
)smooths
;
118 - (void) setTileMinificationFilter
:(NSString
*)filter
;
119 - (void) setTileSize
:(CGSize
)size
;
120 - (void) setTilingEnabled
:(BOOL
)enabled
;
121 - (void) setViewportSize
:(CGSize
)size forDocumentTypes
:(NSInteger
)types
;
122 - (void) setZoomsFocusedFormControl
:(BOOL
)zooms
;
123 - (void) useSelectionAssistantWithMode
:(NSInteger
)mode
;
124 - (WebView
*) webView
;
127 @interface UIWebViewWebViewDelegate
: NSObject
{
128 @
public UIWebView
*uiWebView
;
131 - (void) _clearUIWebView
;
135 // @interface *Button : * {{{
136 @interface UINavigationButton
: UIButton
137 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
138 - (void) setBarStyle
:(UIBarStyle
)style
;
141 @interface UIPushButton
: UIControl
142 - (id
) backgroundForState
:(NSUInteger
)state
;
143 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
144 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
145 - (void) setDrawsShadow
:(BOOL
)draws
;
146 - (void) setStretchBackground
:(BOOL
)stretch
;
147 - (void) setTitle
:(NSString
*)title
;
148 - (void) setTitleFont
:(UIFont
*)font
;
151 @interface UIThreePartButton
: UIPushButton
154 // @interface * : NS* {{{
155 @interface WebDefaultUIKitDelegate
: NSObject
156 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
159 // @interface UIWeb* : * {{{
160 @interface UIWebBrowserView
: UIWebDocumentView
163 @interface UIWebTouchEventsGestureRecognizer
: UIGestureRecognizer
165 - (NSString
*) _typeDescription
;
169 // @interface NS* (*) {{{
170 @interface
NSMutableURLRequest (Apple
)
171 - (void) setHTTPShouldUsePipelining
:(BOOL
)pipelining
;
174 @interface
NSString (Apple
)
175 - (NSString
*) stringByAddingPercentEscapes
;
176 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
179 @interface
NSURL (Apple
)
180 - (BOOL
) isGoogleMapsURL
;
181 - (BOOL
) isSpringboardHandledURL
;
182 // XXX: make this an enum
183 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
185 - (NSURL
*) phobosURL
;
186 - (NSURL
*) youTubeURL
;
189 @interface
NSURLRequest (Apple
)
190 + (BOOL
) allowsAnyHTTPSCertificateForHost
:(NSString
*)host
;
191 + (void) setAllowsAnyHTTPSCertificate
:(BOOL
)allow forHost
:(NSString
*)host
;
194 @interface
NSValue (Apple
)
195 + (NSValue
*) valueWithSize
:(CGSize
)size
;
198 // @interface UI* (*) {{{
199 @interface
UIActionSheet (Apple
)
200 - (void) setContext
:(NSString
*)context
;
201 - (NSString
*) context
;
204 @interface
UIAlertView (Apple
)
205 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
207 - (NSString
*) context
;
208 - (void) setContext
:(NSString
*)context
;
209 - (void) setNumberOfRows
:(int)rows
;
210 - (void) setRunsModal
:(BOOL
)modal
;
211 - (UITextField
*) textField
;
212 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
213 - (void) _updateFrameForDisplay
;
216 @interface
UIApplication (Apple
)
217 - (void) applicationSuspend
:(GSEventRef
)event
;
218 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
219 - (void) applicationOpenURL
:(NSURL
*)url
;
220 - (void) applicationWillResignActive
:(UIApplication
*)application
;
221 - (void) applicationWillSuspend
;
222 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
223 - (void) openURL
:(NSURL
*)url asPanel
:(BOOL
)panel
;
224 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
225 - (void) _setSuspended
:(BOOL
)suspended
;
226 - (void) terminateWithSuccess
;
229 @interface
UIBarButtonItem (Apple
)
233 @interface
UIColor (Apple
)
234 + (UIColor
*) pinStripeColor
;
237 @interface
UIControl (Apple
)
238 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
241 @interface
UIDevice (Apple
)
245 @interface
UIImage (Apple
)
246 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
247 + (UIImage
*) imageAtPath
:(NSString
*)path
;
250 @interface
UINavigationBar (Apple
)
251 + (CGSize
) defaultSize
;
252 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
255 @interface
UIScrollView (Apple
)
256 - (void) setScrollingEnabled
:(BOOL
)enabled
;
257 - (void) setShowBackgroundShadow
:(BOOL
)show
;
260 @interface
UISearchBar (Apple
)
261 - (UITextField
*) searchField
;
264 @interface
UITabBarController (Apple
)
265 - (UITransitionView
*) _transitionView
;
266 - (void) concealTabBarSelection
;
267 - (void) revealTabBarSelection
;
270 @interface
UITabBarItem (Apple
)
271 - (void) setAnimatedBadge
:(BOOL
)animated
;
274 @interface
UITableViewCell (Apple
)
275 - (float) selectionPercent
;
276 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
279 @interface
UITextField (Apple
)
280 - (UITextInputTraits
*) textInputTraits
;
283 @interface
UITextView (Apple
)
285 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
286 - (void) setFont
:(UIFont
*)font
;
287 - (void) setMarginTop
:(int)margin
;
288 - (void) setTextColor
:(UIColor
*)color
;
291 @interface
UIView (Apple
)
292 - (UIScroller
*) _scroller
;
293 - (void) setClipsSubviews
:(BOOL
)clips
;
294 - (void) setEnabledGestures
:(NSInteger
)gestures
;
295 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
296 - (void) setGestureDelegate
:(id
)delegate
;
297 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
298 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
299 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
300 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
303 @interface
UIViewController (Apple
)
304 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
308 @interface
UIWindow (Apple
)
309 - (UIResponder
*) firstResponder
;
310 - (void) makeKey
:(UIApplication
*)application
;
311 - (void) orderFront
:(UIApplication
*)application
;
314 @interface
UIWebView (Apple
)
315 - (UIWebDocumentView
*) _documentView
;
316 - (UIScrollView
*) _scrollView
;
317 - (UIScroller
*) _scroller
;
318 - (void) _updateViewSettings
;
319 - (void) webView
:(WebView
*)view addMessageToConsole
:(NSDictionary
*)message
;
320 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
321 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
322 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
323 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
324 - (void) webView
:(WebView
*)view didCommitLoadForFrame
:(WebFrame
*)frame
;
325 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
326 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
327 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
328 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
329 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
330 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
331 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
332 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
333 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
334 - (void) webViewClose
:(WebView
*)view
;
337 // @interface Web* (*) {{{
338 @interface
WebPreferences (Apple
)
339 + (void) _setInitialDefaultTextEncodingToSystemEncoding
;
340 - (void) _setLayoutInterval
:(NSInteger
)interval
;
341 - (void) setOfflineWebApplicationCacheEnabled
:(BOOL
)enabled
;
345 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
346 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
347 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
348 // XXX: this is a random jumble of garbage
351 UIModalPresentationFullScreen
,
352 UIModalPresentationPageSheet
,
353 UIModalPresentationFormSheet
,
354 UIModalPresentationCurrentContext
,
355 } UIModalPresentationStyle
;
357 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
359 #define UIBarStyleBlack UIBarStyleBlackOpaque
361 @
class NSUndoManager
;
364 @interface
UIActionSheet (iPad
)
365 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
368 @interface
UIViewController (iPad
)
369 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
372 @interface
UIApplication (iOS_3_0
)
373 @
property(nonatomic
) BOOL applicationSupportsShakeToEdit
;
376 @interface
UIScrollView (iOS_3_0
)
377 @
property(assign
,nonatomic
) float decelerationRate
;
380 @interface
UIWebView (iOS_3_0
)
381 @
property(assign
,nonatomic
) NSUInteger dataDetectorTypes
;
384 extern float const UIScrollViewDecelerationRateNormal
;
386 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
388 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
389 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
391 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
392 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
397 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
398 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
401 @interface
UIScreen (iOS_4_0
)
402 @
property(nonatomic
,readonly
) CGFloat scale
;
406 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
407 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
408 extern float const UIWebViewScalesToFitScale
;
410 // extern "C" *(); {{{
411 extern "C" void *reboot2(uint64_t flags
);
412 extern "C" mach_port_t
SBSSpringBoardServerPort();
413 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
414 extern "C" void UISetColor(CGColorRef color
);
417 #endif//CYDIA_UIKITPRIVATE_H