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
;
129 // @interface *Button : * {{{
130 @interface UINavigationButton
: UIButton
131 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
132 - (void) setBarStyle
:(UIBarStyle
)style
;
135 @interface UIPushButton
: UIControl
136 - (id
) backgroundForState
:(NSUInteger
)state
;
137 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
138 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
139 - (void) setDrawsShadow
:(BOOL
)draws
;
140 - (void) setStretchBackground
:(BOOL
)stretch
;
141 - (void) setTitle
:(NSString
*)title
;
142 - (void) setTitleFont
:(UIFont
*)font
;
145 @interface UIThreePartButton
: UIPushButton
148 // @interface * : NS* {{{
149 @interface WebDefaultUIKitDelegate
: NSObject
150 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
153 // @interface UIWeb* : * {{{
154 @interface UIWebBrowserView
: UIWebDocumentView
157 @interface UIWebTouchEventsGestureRecognizer
: UIGestureRecognizer
159 - (NSString
*) _typeDescription
;
163 // @interface NS* (*) {{{
164 @interface
NSMutableURLRequest (Apple
)
165 - (void) setHTTPShouldUsePipelining
:(BOOL
)pipelining
;
168 @interface
NSString (Apple
)
169 - (NSString
*) stringByAddingPercentEscapes
;
170 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
173 @interface
NSURL (Apple
)
174 - (BOOL
) isGoogleMapsURL
;
175 - (BOOL
) isSpringboardHandledURL
;
176 // XXX: make this an enum
177 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
179 - (NSURL
*) phobosURL
;
180 - (NSURL
*) youTubeURL
;
183 @interface
NSURLRequest (Apple
)
184 + (BOOL
) allowsAnyHTTPSCertificateForHost
:(NSString
*)host
;
185 + (void) setAllowsAnyHTTPSCertificate
:(BOOL
)allow forHost
:(NSString
*)host
;
188 @interface
NSValue (Apple
)
189 + (NSValue
*) valueWithSize
:(CGSize
)size
;
192 // @interface UI* (*) {{{
193 @interface
UIActionSheet (Apple
)
194 - (void) setContext
:(NSString
*)context
;
195 - (NSString
*) context
;
198 @interface
UIAlertView (Apple
)
199 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
201 - (NSString
*) context
;
202 - (void) setContext
:(NSString
*)context
;
203 - (void) setNumberOfRows
:(int)rows
;
204 - (void) setRunsModal
:(BOOL
)modal
;
205 - (UITextField
*) textField
;
206 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
207 - (void) _updateFrameForDisplay
;
210 @interface
UIApplication (Apple
)
211 - (void) applicationSuspend
:(GSEventRef
)event
;
212 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
213 - (void) applicationOpenURL
:(NSURL
*)url
;
214 - (void) applicationWillResignActive
:(UIApplication
*)application
;
215 - (void) applicationWillSuspend
;
216 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
217 - (void) openURL
:(NSURL
*)url asPanel
:(BOOL
)panel
;
218 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
219 - (void) _setSuspended
:(BOOL
)suspended
;
220 - (void) terminateWithSuccess
;
223 @interface
UIBarButtonItem (Apple
)
227 @interface
UIColor (Apple
)
228 + (UIColor
*) pinStripeColor
;
231 @interface
UIControl (Apple
)
232 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
235 @interface
UIDevice (Apple
)
239 @interface
UIImage (Apple
)
240 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
241 + (UIImage
*) imageAtPath
:(NSString
*)path
;
244 @interface
UINavigationBar (Apple
)
245 + (CGSize
) defaultSize
;
246 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
249 @interface
UIScrollView (Apple
)
250 - (void) setScrollingEnabled
:(BOOL
)enabled
;
251 - (void) setShowBackgroundShadow
:(BOOL
)show
;
254 @interface
UISearchBar (Apple
)
255 - (UITextField
*) searchField
;
258 @interface
UITabBarController (Apple
)
259 - (UITransitionView
*) _transitionView
;
260 - (void) concealTabBarSelection
;
261 - (void) revealTabBarSelection
;
264 @interface
UITabBarItem (Apple
)
265 - (void) setAnimatedBadge
:(BOOL
)animated
;
268 @interface
UITableViewCell (Apple
)
269 - (float) selectionPercent
;
270 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
273 @interface
UITextField (Apple
)
274 - (UITextInputTraits
*) textInputTraits
;
277 @interface
UITextView (Apple
)
279 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
280 - (void) setFont
:(UIFont
*)font
;
281 - (void) setMarginTop
:(int)margin
;
282 - (void) setTextColor
:(UIColor
*)color
;
285 @interface
UIView (Apple
)
286 - (UIScroller
*) _scroller
;
287 - (void) setClipsSubviews
:(BOOL
)clips
;
288 - (void) setEnabledGestures
:(NSInteger
)gestures
;
289 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
290 - (void) setGestureDelegate
:(id
)delegate
;
291 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
292 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
293 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
294 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
297 @interface
UIViewController (Apple
)
298 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
301 @interface
UIWindow (Apple
)
302 - (UIResponder
*) firstResponder
;
303 - (void) makeKey
:(UIApplication
*)application
;
304 - (void) orderFront
:(UIApplication
*)application
;
307 @interface
UIWebView (Apple
)
308 - (UIWebDocumentView
*) _documentView
;
309 - (UIScrollView
*) _scrollView
;
310 - (UIScroller
*) _scroller
;
311 - (void) _updateViewSettings
;
312 - (void) webView
:(WebView
*)view addMessageToConsole
:(NSDictionary
*)message
;
313 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
314 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
315 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
316 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
317 - (void) webView
:(WebView
*)view didCommitLoadForFrame
:(WebFrame
*)frame
;
318 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
319 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
320 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
321 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
322 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
323 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
324 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
325 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
326 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
327 - (void) webViewClose
:(WebView
*)view
;
331 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
332 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
333 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
334 // XXX: this is a random jumble of garbage
337 UIModalPresentationFullScreen
,
338 UIModalPresentationPageSheet
,
339 UIModalPresentationFormSheet
,
340 UIModalPresentationCurrentContext
,
341 } UIModalPresentationStyle
;
343 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
345 #define UIBarStyleBlack UIBarStyleBlackOpaque
347 @
class NSUndoManager
;
350 @interface
UIActionSheet (iPad
)
351 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
354 @interface
UIViewController (iPad
)
355 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
358 @interface
UIApplication (iOS_3_0
)
359 @
property(nonatomic
) BOOL applicationSupportsShakeToEdit
;
362 @interface
UIScrollView (iOS_3_0
)
363 @
property(assign
,nonatomic
) float decelerationRate
;
366 @interface
UIWebView (iOS_3_0
)
367 @
property(assign
,nonatomic
) NSUInteger dataDetectorTypes
;
370 extern float const UIScrollViewDecelerationRateNormal
;
372 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
374 // #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000 {{{
375 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 30000
377 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
378 #define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
383 #ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
384 #define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
387 @interface
UIScreen (iOS_4_0
)
388 @
property(nonatomic
,readonly
) CGFloat scale
;
392 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
393 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
394 extern float const UIWebViewScalesToFitScale
;
396 // extern "C" *(); {{{
397 extern "C" void *reboot2(uint64_t flags
);
398 extern "C" mach_port_t
SBSSpringBoardServerPort();
399 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
400 extern "C" void UISetColor(CGColorRef color
);
403 #endif//CYDIA_UIKITPRIVATE_H