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 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
;
153 // @interface NS* (*) {{{
154 @interface
NSString (Apple
)
155 - (NSString
*) stringByAddingPercentEscapes
;
156 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
159 @interface
NSURL (Apple
)
160 - (BOOL
) isGoogleMapsURL
;
161 - (BOOL
) isSpringboardHandledURL
;
162 // XXX: make this an enum
163 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
165 - (NSURL
*) phobosURL
;
166 - (NSURL
*) youTubeURL
;
169 @interface
NSValue (Apple
)
170 + (NSValue
*) valueWithSize
:(CGSize
)size
;
173 // @interface UI* (*) {{{
174 @interface
UIActionSheet (Apple
)
175 - (void) setContext
:(NSString
*)context
;
176 - (NSString
*) context
;
179 @interface
UIAlertView (Apple
)
180 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
182 - (NSString
*) context
;
183 - (void) setContext
:(NSString
*)context
;
184 - (void) setNumberOfRows
:(int)rows
;
185 - (void) setRunsModal
:(BOOL
)modal
;
186 - (UITextField
*) textField
;
187 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
188 - (void) _updateFrameForDisplay
;
191 @interface
UIApplication (Apple
)
192 - (void) applicationSuspend
:(GSEventRef
)event
;
193 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
194 - (void) applicationOpenURL
:(NSURL
*)url
;
195 - (void) applicationWillResignActive
:(UIApplication
*)application
;
196 - (void) applicationWillSuspend
;
197 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
198 - (void) removeApplicationBadge
;
199 - (void) setApplicationBadge
:(NSString
*)badge
;
200 - (void) setApplicationBadgeString
:(NSString
*)badge
;
201 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
202 - (void) _setSuspended
:(BOOL
)suspended
;
203 - (void) terminateWithSuccess
;
206 @interface
UIBarButtonItem (Apple
)
210 @interface
UIColor (Apple
)
211 + (UIColor
*) pinStripeColor
;
214 @interface
UIControl (Apple
)
215 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
218 @interface
UIDevice (Apple
)
222 @interface
UIImage (Apple
)
223 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
224 + (UIImage
*) imageAtPath
:(NSString
*)path
;
227 @interface
UINavigationBar (Apple
)
228 + (CGSize
) defaultSize
;
229 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
232 @interface
UIScrollView (Apple
)
233 - (void) setScrollingEnabled
:(BOOL
)enabled
;
234 - (void) setShowBackgroundShadow
:(BOOL
)show
;
237 @interface
UISearchBar (Apple
)
238 - (UITextField
*) searchField
;
241 @interface
UITabBarController (Apple
)
242 - (UITransitionView
*) _transitionView
;
245 @interface
UITabBarItem (Apple
)
246 - (void) setAnimatedBadge
:(BOOL
)animated
;
249 @interface
UITableViewCell (Apple
)
250 - (float) selectionPercent
;
251 - (void) _updateHighlightColorsForView
:(id
)view highlighted
:(BOOL
)highlighted
;
254 @interface
UITextField (Apple
)
255 - (UITextInputTraits
*) textInputTraits
;
258 @interface
UITextView (Apple
)
260 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
261 - (void) setFont
:(UIFont
*)font
;
262 - (void) setMarginTop
:(int)margin
;
263 - (void) setTextColor
:(UIColor
*)color
;
266 @interface
UIView (Apple
)
267 - (UIScroller
*) _scroller
;
268 - (void) setClipsSubviews
:(BOOL
)clips
;
269 - (void) setEnabledGestures
:(NSInteger
)gestures
;
270 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
271 - (void) setGestureDelegate
:(id
)delegate
;
272 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
273 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
274 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
275 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
278 @interface
UIViewController (Apple
)
279 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
282 @interface
UIWindow (Apple
)
283 - (UIResponder
*) firstResponder
;
284 - (void) makeKey
:(UIApplication
*)application
;
285 - (void) orderFront
:(UIApplication
*)application
;
288 @interface
UIWebView (Apple
)
289 - (UIWebDocumentView
*) _documentView
;
290 - (UIScrollView
*) _scrollView
;
291 - (UIScroller
*) _scroller
;
292 - (void) _updateViewSettings
;
293 //- (WebView *) webView:(WebView *)view createWebViewWithRequest:(NSURLRequest *)request;
294 - (void) webView
:(WebView
*)view decidePolicyForNavigationAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request frame
:(WebFrame
*)frame decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
295 - (void) webView
:(WebView
*)view decidePolicyForNewWindowAction
:(NSDictionary
*)action request
:(NSURLRequest
*)request newFrameName
:(NSString
*)name decisionListener
:(id
<WebPolicyDecisionListener
>)listener
;
296 - (void) webView
:(WebView
*)view didClearWindowObject
:(WebScriptObject
*)window forFrame
:(WebFrame
*)frame
;
297 - (void) webView
:(WebView
*)view didFailLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
298 - (void) webView
:(WebView
*)view didFailProvisionalLoadWithError
:(NSError
*)error forFrame
:(WebFrame
*)frame
;
299 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
300 - (void) webView
:(WebView
*)view didReceiveTitle
:(id
)title forFrame
:(id
)frame
;
301 - (void) webView
:(WebView
*)view didStartProvisionalLoadForFrame
:(WebFrame
*)frame
;
302 - (NSURLRequest
*) webView
:(WebView
*)view resource
:(id
)identifier willSendRequest
:(NSURLRequest
*)request redirectResponse
:(NSURLResponse
*)response fromDataSource
:(WebDataSource
*)source
;
303 - (void) webView
:(WebView
*)view runJavaScriptAlertPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
304 - (BOOL
) webView
:(WebView
*)view runJavaScriptConfirmPanelWithMessage
:(NSString
*)message initiatedByFrame
:(WebFrame
*)frame
;
305 - (NSString
*) webView
:(WebView
*)view runJavaScriptTextInputPanelWithPrompt
:(NSString
*)prompt defaultText
:(NSString
*)text initiatedByFrame
:(WebFrame
*)frame
;
306 - (void) webViewClose
:(WebView
*)view
;
310 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
311 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
312 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
315 UIModalPresentationFullScreen
,
316 UIModalPresentationPageSheet
,
317 UIModalPresentationFormSheet
,
318 UIModalPresentationCurrentContext
,
319 } UIModalPresentationStyle
;
321 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
322 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
324 #define UIBarStyleBlack UIBarStyleBlackOpaque
326 @
class NSUndoManager
;
329 @interface
UIActionSheet (iPad
)
330 - (void) showFromBarButtonItem
:(UIBarButtonItem
*)item animated
:(BOOL
)animated
;
333 @interface
UIViewController (iPad
)
334 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
337 @interface
UIScrollView (iOS_3_0
)
338 @
property(assign
, nonatomic
) float decelerationRate
;
341 @interface
UIWebView (iOS_3_0
)
342 @
property(assign
, nonatomic
) NSUInteger dataDetectorTypes
;
345 extern float const UIScrollViewDecelerationRateNormal
;
347 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
351 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
352 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
353 extern float const UIWebViewScalesToFitScale
;
355 // extern "C" *(); {{{
356 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
357 extern "C" void UISetColor(CGColorRef color
);
360 #endif//CYDIA_UIKITPRIVATE_H