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
64 - (id
) initWithWindow
:(UIWindow
*)window
;
65 - (void) setText
:(NSString
*)text
;
66 - (void) show
:(BOOL
)show
;
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 UIWebDocumentView
: UIView
94 - (CGRect
) documentBounds
;
95 - (void) enableReachability
;
96 - (void) loadRequest
:(NSURLRequest
*)request
;
97 - (void) redrawScaledDocument
;
98 - (void) setAllowsImageSheet
:(BOOL
)allows
;
99 - (void) setAllowsMessaging
:(BOOL
)allows
;
100 - (void) setAutoresizes
:(BOOL
)autoresizes
;
101 - (void) setContentsPosition
:(NSInteger
)position
;
102 - (void) setDrawsBackground
:(BOOL
)draws
;
103 - (void) _setDocumentType
:(NSInteger
)type
;
104 - (void) setDrawsGrid
:(BOOL
)draws
;
105 - (void) setInitialScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
106 - (void) setLogsTilingChanges
:(BOOL
)logs
;
107 - (void) setMinimumScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
108 - (void) setMinimumSize
:(CGSize
)size
;
109 - (void) setMaximumScale
:(float)scale forDocumentTypes
:(NSInteger
)tpyes
;
110 - (void) setSmoothsFonts
:(BOOL
)smooths
;
111 - (void) setTileMinificationFilter
:(NSString
*)filter
;
112 - (void) setTileSize
:(CGSize
)size
;
113 - (void) setTilingEnabled
:(BOOL
)enabled
;
114 - (void) setViewportSize
:(CGSize
)size forDocumentTypes
:(NSInteger
)types
;
115 - (void) setZoomsFocusedFormControl
:(BOOL
)zooms
;
116 - (void) useSelectionAssistantWithMode
:(NSInteger
)mode
;
117 - (WebView
*) webView
;
120 @interface UIWebViewWebViewDelegate
: NSObject
{
121 @
public UIWebView
*uiWebView
;
125 // @interface *Button : * {{{
126 @interface UINavigationButton
: UIButton
127 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
128 - (void) setBarStyle
:(UIBarStyle
)style
;
131 @interface UIPushButton
: UIControl
132 - (id
) backgroundForState
:(NSUInteger
)state
;
133 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
134 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
135 - (void) setDrawsShadow
:(BOOL
)draws
;
136 - (void) setStretchBackground
:(BOOL
)stretch
;
137 - (void) setTitle
:(NSString
*)title
;
138 - (void) setTitleFont
:(UIFont
*)font
;
141 @interface UIThreePartButton
: UIPushButton
144 // @interface * : NS* {{{
145 @interface WebDefaultUIKitDelegate
: NSObject
146 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
150 // @interface NS* (*) {{{
151 @interface
NSString (Apple
)
152 - (NSString
*) stringByAddingPercentEscapes
;
153 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
156 @interface
NSURL (Apple
)
157 - (BOOL
) isGoogleMapsURL
;
158 - (BOOL
) isSpringboardHandledURL
;
159 // XXX: make this an enum
160 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
162 - (NSURL
*) phobosURL
;
163 - (NSURL
*) youTubeURL
;
166 @interface
NSValue (Apple
)
167 + (NSValue
*) valueWithSize
:(CGSize
)size
;
170 // @interface UI* (*) {{{
171 @interface
UIActionSheet (Apple
)
172 - (void) setContext
:(NSString
*)context
;
173 - (NSString
*) context
;
176 @interface
UIAlertView (Apple
)
177 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
179 - (NSString
*) context
;
180 - (void) setContext
:(NSString
*)context
;
181 - (void) setNumberOfRows
:(int)rows
;
182 - (void) setRunsModal
:(BOOL
)modal
;
183 - (UITextField
*) textField
;
184 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
185 - (void) _updateFrameForDisplay
;
188 @interface
UIApplication (Apple
)
189 - (void) applicationSuspend
:(GSEventRef
)event
;
190 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
191 - (void) applicationOpenURL
:(NSURL
*)url
;
192 - (void) applicationWillResignActive
:(UIApplication
*)application
;
193 - (void) applicationWillSuspend
;
194 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
195 - (void) removeApplicationBadge
;
196 - (void) setApplicationBadge
:(NSString
*)badge
;
197 - (void) setApplicationBadgeString
:(NSString
*)badge
;
198 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
199 - (void) _setSuspended
:(BOOL
)suspended
;
200 - (void) terminateWithSuccess
;
203 @interface
UIBarButtonItem (Apple
)
207 @interface
UIColor (Apple
)
208 + (UIColor
*) pinStripeColor
;
211 @interface
UIControl (Apple
)
212 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
215 @interface
UIDevice (Apple
)
219 @interface
UIImage (Apple
)
220 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
221 + (UIImage
*) imageAtPath
:(NSString
*)path
;
224 @interface
UINavigationBar (Apple
)
225 + (CGSize
) defaultSize
;
226 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
229 @interface
UIScrollView (Apple
)
230 - (void) setScrollingEnabled
:(BOOL
)enabled
;
231 - (void) setShowBackgroundShadow
:(BOOL
)show
;
234 @interface
UISearchBar (Apple
)
235 - (UITextField
*) searchField
;
238 @interface
UITabBarItem (Apple
)
239 - (void) setAnimatedBadge
:(BOOL
)animated
;
242 @interface
UITableViewCell (Apple
)
243 - (float) selectionPercent
;
244 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
247 @interface
UITextField (Apple
)
248 - (UITextInputTraits
*) textInputTraits
;
251 @interface
UITextView (Apple
)
253 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
254 - (void) setFont
:(UIFont
*)font
;
255 - (void) setMarginTop
:(int)margin
;
256 - (void) setTextColor
:(UIColor
*)color
;
259 @interface
UIView (Apple
)
260 - (UIScroller
*) _scroller
;
261 - (void) setClipsSubviews
:(BOOL
)clips
;
262 - (void) setEnabledGestures
:(NSInteger
)gestures
;
263 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
264 - (void) setGestureDelegate
:(id
)delegate
;
265 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
266 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
267 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
268 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
271 @interface
UIViewController (Apple
)
272 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
275 @interface
UIWindow (Apple
)
276 - (UIResponder
*) firstResponder
;
277 - (void) makeKey
:(UIApplication
*)application
;
278 - (void) orderFront
:(UIApplication
*)application
;
281 @interface
UIWebView (Apple
)
282 - (UIWebDocumentView
*) _documentView
;
283 - (UIScrollView
*) _scrollView
;
284 - (UIScroller
*) _scroller
;
285 - (void) _updateViewSettings
;
286 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
287 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
288 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
289 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
290 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
291 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
292 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
293 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
294 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
295 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
296 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
297 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
298 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
299 - (void) webViewClose
:(WebView
*)view
;
303 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
304 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
305 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
308 UIModalPresentationFullScreen
,
309 UIModalPresentationPageSheet
,
310 UIModalPresentationFormSheet
,
311 UIModalPresentationCurrentContext
,
312 } UIModalPresentationStyle
;
314 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
315 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
317 #define UIBarStyleBlack UIBarStyleBlackOpaque
319 @
class NSUndoManager
;
322 @interface
UIActionSheet (iPad
)
323 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
326 @interface
UIViewController (iPad
)
327 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
330 @interface
UIScrollView (iOS_3_0
)
331 @
property(assign
, nonatomic
) float decelerationRate
;
334 @interface
UIWebView (iOS_3_0
)
335 @
property(assign
, nonatomic
) NSUInteger dataDetectorTypes
;
338 extern float const UIScrollViewDecelerationRateNormal
;
340 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
344 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
345 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
346 extern float const UIWebViewScalesToFitScale
;
348 // extern "C" *(); {{{
349 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
350 extern "C" void UISetColor(CGColorRef color
);
353 #endif//CYDIA_UIKITPRIVATE_H