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
;
170 // @interface NS* (*) {{{
171 @interface
NSMutableURLRequest (Apple
)
172 - (void) setHTTPShouldUsePipelining
:(BOOL
)pipelining
;
175 @interface
NSString (Apple
)
176 - (NSString
*) stringByAddingPercentEscapes
;
177 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
180 @interface
NSURL (Apple
)
181 - (BOOL
) isGoogleMapsURL
;
182 - (BOOL
) isSpringboardHandledURL
;
183 // XXX: make this an enum
184 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
186 - (NSURL
*) phobosURL
;
187 - (NSURL
*) youTubeURL
;
190 @interface
NSURLRequest (Apple
)
191 + (BOOL
) allowsAnyHTTPSCertificateForHost
:(NSString
*)host
;
192 + (void) setAllowsAnyHTTPSCertificate
:(BOOL
)allow forHost
:(NSString
*)host
;
195 @interface
NSValue (Apple
)
196 + (NSValue
*) valueWithSize
:(CGSize
)size
;
199 // @interface UI* (*) {{{
200 @interface
UIActionSheet (Apple
)
201 - (void) setContext
:(NSString
*)context
;
202 - (NSString
*) context
;
205 @interface
UIAlertView (Apple
)
206 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
208 - (NSString
*) context
;
209 - (void) setContext
:(NSString
*)context
;
210 - (void) setNumberOfRows
:(int)rows
;
211 - (void) setRunsModal
:(BOOL
)modal
;
212 - (UITextField
*) textField
;
213 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
214 - (void) _updateFrameForDisplay
;
217 @interface
UIApplication (Apple
)
218 - (void) applicationSuspend
:(GSEventRef
)event
;
219 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
220 - (void) applicationOpenURL
:(NSURL
*)url
;
221 - (void) applicationWillResignActive
:(UIApplication
*)application
;
222 - (void) applicationWillSuspend
;
223 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
224 - (void) openURL
:(NSURL
*)url asPanel
:(BOOL
)panel
;
225 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
226 - (void) _setSuspended
:(BOOL
)suspended
;
227 - (void) terminateWithSuccess
;
230 @interface
UIBarButtonItem (Apple
)
234 @interface
UIColor (Apple
)
235 + (UIColor
*) pinStripeColor
;
238 @interface
UIControl (Apple
)
239 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
242 @interface
UIDevice (Apple
)
246 @interface
UIImage (Apple
)
247 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
248 + (UIImage
*) imageAtPath
:(NSString
*)path
;
251 @interface
UINavigationBar (Apple
)
252 + (CGSize
) defaultSize
;
253 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
256 @interface
UIScrollView (Apple
)
257 - (void) setScrollingEnabled
:(BOOL
)enabled
;
258 - (void) setShowBackgroundShadow
:(BOOL
)show
;
261 @interface
UISearchBar (Apple
)
262 - (UITextField
*) searchField
;
265 @interface
UITabBarController (Apple
)
266 - (UITransitionView
*) _transitionView
;
267 - (void) concealTabBarSelection
;
268 - (void) revealTabBarSelection
;
271 @interface
UITabBarItem (Apple
)
272 - (void) setAnimatedBadge
:(BOOL
)animated
;
275 @interface
UITableViewCell (Apple
)
276 - (float) selectionPercent
;
277 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
280 @interface
UITextField (Apple
)
281 - (UITextInputTraits
*) textInputTraits
;
284 @interface
UITextView (Apple
)
286 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
287 - (void) setFont
:(UIFont
*)font
;
288 - (void) setMarginTop
:(int)margin
;
289 - (void) setTextColor
:(UIColor
*)color
;
292 @interface
UIView (Apple
)
293 - (UIScroller
*) _scroller
;
294 - (void) setClipsSubviews
:(BOOL
)clips
;
295 - (void) setEnabledGestures
:(NSInteger
)gestures
;
296 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
297 - (void) setGestureDelegate
:(id
)delegate
;
298 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
299 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
300 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
301 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
304 @interface
UIViewController (Apple
)
305 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
309 @interface
UIWindow (Apple
)
310 - (UIResponder
*) firstResponder
;
311 - (void) makeKey
:(UIApplication
*)application
;
312 - (void) orderFront
:(UIApplication
*)application
;
315 @interface
UIWebView (Apple
)
316 - (UIWebDocumentView
*) _documentView
;
317 - (UIScrollView
*) _scrollView
;
318 - (UIScroller
*) _scroller
;
319 - (void) _updateViewSettings
;
320 - (void) webView
:(WebView
*)view addMessageToConsole
:(NSDictionary
*)message
;
321 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
322 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
323 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
324 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
325 - (void) webView
:(WebView
*)view didCommitLoadForFrame
:(WebFrame
*)frame
;
326 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
327 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
328 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
329 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
330 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
331 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
332 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
333 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
334 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
335 - (void) webViewClose
:(WebView
*)view
;
338 // @interface Web* (*) {{{
339 @interface
WebPreferences (Apple
)
340 + (void) _setInitialDefaultTextEncodingToSystemEncoding
;
341 - (void) _setLayoutInterval
:(NSInteger
)interval
;
342 - (void) setOfflineWebApplicationCacheEnabled
:(BOOL
)enabled
;
346 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
347 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
348 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
349 // XXX: this is a random jumble of garbage
352 UIModalPresentationFullScreen
,
353 UIModalPresentationPageSheet
,
354 UIModalPresentationFormSheet
,
355 UIModalPresentationCurrentContext
,
356 } UIModalPresentationStyle
;
358 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
360 #define UIBarStyleBlack UIBarStyleBlackOpaque
362 @
class NSUndoManager
;
365 @interface
UIActionSheet (iPad
)
366 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
369 @interface
UIViewController (iPad
)
370 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
373 @interface
UIApplication (iOS_3_0
)
374 @
property(nonatomic
) BOOL applicationSupportsShakeToEdit
;
377 @interface
UIScrollView (iOS_3_0
)
378 @
property(assign
,nonatomic
) float decelerationRate
;
381 @interface
UIWebView (iOS_3_0
)
382 @
property(assign
,nonatomic
) NSUInteger dataDetectorTypes
;
385 extern float const UIScrollViewDecelerationRateNormal
;
387 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
389 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
390 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
392 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
393 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
398 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
399 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
402 @interface
UIScreen (iOS_4_0
)
403 @
property(nonatomic
,readonly
) CGFloat scale
;
407 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
408 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
409 extern float const UIWebViewScalesToFitScale
;
411 // extern "C" *(); {{{
412 extern "C" void *reboot2(uint64_t flags
);
413 extern "C" mach_port_t
SBSSpringBoardServerPort();
414 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
415 extern "C" void UISetColor(CGColorRef color
);
418 #endif//CYDIA_UIKITPRIVATE_H