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
;
39 // @interface NS* (*) {{{
40 @interface
NSString (Apple
)
41 - (NSString
*) stringByAddingPercentEscapes
;
42 - (NSString
*) stringByReplacingCharacter
:(UniChar
)from withCharacter
:(UniChar
)to
;
45 @interface
NSURL (Apple
)
46 - (BOOL
) isGoogleMapsURL
;
47 - (BOOL
) isSpringboardHandledURL
;
48 // XXX: make this an enum
49 - (NSURL
*) itmsURL
:(NSInteger
*)store
;
51 - (NSURL
*) phobosURL
;
52 - (NSURL
*) youTubeURL
;
55 @interface
NSValue (Apple
)
56 + (NSValue
*) valueWithSize
:(CGSize
)size
;
59 // @interface UI* (*) {{{
60 @interface
UIActionSheet (Apple
)
61 - (void) setContext
:(NSString
*)context
;
62 - (NSString
*) context
;
65 @interface
UIAlertView (Apple
)
66 - (void) addTextFieldWithValue
:(NSString
*)value label
:(NSString
*)label
;
68 - (NSString
*) context
;
69 - (void) setContext
:(NSString
*)context
;
70 - (void) setNumberOfRows
:(int)rows
;
71 - (void) setRunsModal
:(BOOL
)modal
;
72 - (UITextField
*) textField
;
73 - (UITextField
*) textFieldAtIndex
:(NSUInteger
)index
;
74 - (void) _updateFrameForDisplay
;
77 @interface
UIApplication (Apple
)
78 - (void) applicationSuspend
:(GSEventRef
)event
;
79 - (void) _animateSuspension
:(BOOL
)suspend duration
:(double)duration startTime
:(double)start scale
:(float)scale
;
80 - (void) applicationOpenURL
:(NSURL
*)url
;
81 - (void) applicationWillResignActive
:(UIApplication
*)application
;
82 - (void) applicationWillSuspend
;
83 - (void) launchApplicationWithIdentifier
:(NSString
*)identifier suspended
:(BOOL
)suspended
;
84 - (void) removeApplicationBadge
;
85 - (void) setApplicationBadge
:(NSString
*)badge
;
86 - (void) setApplicationBadgeString
:(NSString
*)badge
;
87 - (void) setStatusBarShowsProgress
:(BOOL
)shows
;
88 - (void) _setSuspended
:(BOOL
)suspended
;
89 - (void) terminateWithSuccess
;
92 @interface
UIBarButtonItem (Apple
)
96 @interface
UIControl (Apple
)
97 - (void) addTarget
:(id
)target action
:(SEL
)action forEvents
:(NSInteger
)events
;
100 @interface
UIDevice (Apple
)
104 @interface
UIImage (Apple
)
105 + (UIImage
*) applicationImageNamed
:(NSString
*)name
;
106 + (UIImage
*) imageAtPath
:(NSString
*)path
;
109 @interface
UINavigationBar (Apple
)
110 + (CGSize
) defaultSize
;
111 - (UIBarStyle
) _barStyle
:(BOOL
)style
;
114 @interface
UISearchBar (Apple
)
115 - (UITextField
*) searchField
;
118 @interface
UITabBarItem (Apple
)
119 - (void) setAnimatedBadge
:(BOOL
)animated
;
122 @interface
UITableViewCell (Apple
)
123 - (float) selectionPercent
;
126 @interface
UITextField (Apple
)
127 - (UITextInputTraits
*) textInputTraits
;
130 @interface
UITextView (Apple
)
132 - (void) setAllowsRubberBanding
:(BOOL
)rubberbanding
;
133 - (void) setFont
:(UIFont
*)font
;
134 - (void) setMarginTop
:(int)margin
;
135 - (void) setTextColor
:(UIColor
*)color
;
138 @interface
UIView (Apple
)
139 - (void) setEnabledGestures
:(NSInteger
)gestures
;
140 - (void) setGestureDelegate
:(id
)delegate
;
141 - (void) setNeedsDisplayOnBoundsChange
:(BOOL
)needs
;
142 - (void) setValue
:(NSValue
*)value forGestureAttribute
:(NSInteger
)attribute
;
143 - (void) setZoomScale
:(float)scale duration
:(double)duration
;
144 - (void) _setZoomScale
:(float)scale duration
:(double)duration
;
147 @interface
UIViewController (Apple
)
148 - (void) _updateLayoutForStatusBarAndInterfaceOrientation
;
151 @interface
UIWindow (Apple
)
152 - (UIResponder
*) firstResponder
;
153 - (void) makeKey
:(UIApplication
*)application
;
154 - (void) orderFront
:(UIApplication
*)application
;
158 // @interface * : UIView {{{
159 @interface UIFormAssistant
: UIView
160 + (UIFormAssistant
*) sharedFormAssistant
;
161 - (CGRect
) peripheralFrame
;
164 @interface UIKeyboard
: UIView
165 + (void) initImplementationNow
;
168 @interface UIProgressBar
: UIView
169 + (CGSize
) defaultSize
;
170 - (void) setProgress
:(float)progress
;
171 - (void) setStyle
:(NSInteger
)style
;
174 @interface UIProgressHUD
: UIView
175 - (id
) initWithWindow
:(UIWindow
*)window
;
176 - (void) setText
:(NSString
*)text
;
177 - (void) show
:(BOOL
)show
;
180 @interface UIProgressIndicator
: UIView
181 + (CGSize
) defaultSizeForStyle
:(NSUInteger
)style
;
182 - (NSUInteger
) activityIndicatorViewStyle
;
183 - (void) setStyle
:(UIProgressIndicatorStyle
)style
;
184 - (void) startAnimation
;
187 @interface UIScroller
: UIView
188 - (CGSize
) contentSize
;
189 - (BOOL
) releaseRubberBandIfNecessary
;
190 - (void) scrollPointVisibleAtTopLeft
:(CGPoint
)point
;
191 - (void) scrollRectToVisible
:(CGRect
)rect animated
:(BOOL
)animated
;
192 - (void) setAdjustForContentSizeChange
:(BOOL
)adjust
;
193 - (void) setAllowsRubberBanding
:(BOOL
)allows
;
194 - (void) setBounces
:(BOOL
)bounces
;
195 - (void) setClipsSubviews
:(BOOL
)clips
;
196 - (void) setContentSize
:(CGSize
)size
;
197 - (void) setDelegate
:(id
)delegate
;
198 - (void) setDirectionalScrolling
:(BOOL
)directional
;
199 - (void) setEventMode
:(NSInteger
)mode
;
200 - (void) setFixedBackgroundPattern
:(BOOL
)fixed
;
201 - (void) setOffset
:(CGPoint
)offset
;
202 - (void) setScrollHysteresis
:(float)hysteresis
;
203 - (void) setScrollerIndicatorSubrect
:(CGRect
)rect
;
204 - (void) setScrollingEnabled
:(BOOL
)enabled
;
205 - (void) setShowBackgroundShadow
:(BOOL
)shows
;
206 - (void) setThumbDetectionEnabled
:(BOOL
)enabled
;
209 @interface UITextLabel
: UIView
210 - (void) setCentersHorizontally
:(BOOL
)centers
;
211 - (void) setColor
:(UIColor
*)color
;
212 - (void) setFont
:(UIFont
*)font
;
213 - (void) setText
:(NSString
*)text
;
216 @interface UIWebDocumentView
: UIView
217 - (CGRect
) documentBounds
;
218 - (void) enableReachability
;
219 - (void) loadRequest
:(NSURLRequest
*)request
;
220 - (void) redrawScaledDocument
;
221 - (UIScroller
*) _scroller
;
222 - (void) setAllowsImageSheet
:(BOOL
)allows
;
223 - (void) setAllowsMessaging
:(BOOL
)allows
;
224 - (void) setAutoresizes
:(BOOL
)autoresizes
;
225 - (void) setContentsPosition
:(NSInteger
)position
;
226 - (void) setDataDetectorTypes
:(NSUInteger
)types
;
227 - (void) setDelegate
:(id
)delegate
;
228 - (void) setDetectsPhoneNumbers
:(BOOL
)detects
;
229 - (void) _setDocumentType
:(NSInteger
)type
;
230 - (void) setDrawsGrid
:(BOOL
)draws
;
231 - (void) setFormEditingDelegate
:(id
)delegate
;
232 - (void) setInitialScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
233 - (void) setInteractionDelegate
:(id
)delegate
;
234 - (void) setLogsTilingChanges
:(BOOL
)logs
;
235 - (void) setMinimumScale
:(float)scale forDocumentTypes
:(NSInteger
)types
;
236 - (void) setMinimumSize
:(CGSize
)size
;
237 - (void) setMaximumScale
:(float)scale forDocumentTypes
:(NSInteger
)tpyes
;
238 - (void) setSmoothsFonts
:(BOOL
)smooths
;
239 - (void) setTileMinificationFilter
:(NSString
*)filter
;
240 - (void) setTileSize
:(CGSize
)size
;
241 - (void) setTilingEnabled
:(BOOL
)enabled
;
242 - (void) setViewportSize
:(CGSize
)size forDocumentTypes
:(NSInteger
)types
;
243 - (void) setZoomsFocusedFormControl
:(BOOL
)zooms
;
244 - (void) useSelectionAssistantWithMode
:(NSInteger
)mode
;
245 - (WebView
*) webView
;
246 - (void) webView
:(WebView
*)view attachRootLayer
:(id
)layer
;
247 - (void) webView
:(WebView
*)view didCommitLoadForFrame
:(WebFrame
*)frame
;
248 - (void) webView
:(WebView
*)view didFailLoadWithError
:(id
)error forFrame
:(WebFrame
*)frame
;
249 - (void) webView
:(WebView
*)view didFinishDocumentLoadForFrame
:(WebFrame
*)frame
;
250 - (void) webView
:(WebView
*)view didFinishLoadForFrame
:(WebFrame
*)frame
;
251 - (void) webView
:(WebView
*)view didFirstLayoutInFrame
:(WebFrame
*)frame
;
252 - (void) webView
:(WebView
*)view didFirstVisuallyNonEmptyLayoutInFrame
:(WebFrame
*)frame
;
253 - (void) webView
:(WebView
*)view didHideFullScreenForPlugInView
:(id
)plugin
;
254 - (void) webView
:(WebView
*)view didObserveDeferredContentChange
:(NSInteger
)change forFrame
:(WebFrame
*)frame
;
255 - (void) webView
:(WebView
*)view didReceiveDocTypeForFrame
:(WebFrame
*)frame
;
256 - (void) webView
:(WebView
*)view didReceiveMessage
:(id
)message
;
257 - (void) webView
:(WebView
*)view didReceiveViewportArguments
:(id
)arguments forFrame
:(WebFrame
*)frame
;
258 - (void) webView
:(WebView
*)view formStateDidBlurNode
:(id
)state
;
259 - (void) webView
:(WebView
*)view formStateDidFocusNode
:(id
)state
;
260 - (void) webView
:(WebView
*)view needsScrollNotifications
:(id
)notifications forFrame
:(WebFrame
*)frame
;
261 - (id
) webView
:(WebView
*)view plugInViewWithArguments
:(id
)arguments fromPlugInPackage
:(id
)package
;
262 - (void) webView
:(WebView
*)view restoreStateFromHistoryItem
:(id
)item forFrame
:(WebFrame
*)frame force
:(BOOL
)force
;
263 - (void) webView
:(WebView
*)view saveStateToHistoryItem
:(id
)item forFrame
:(WebFrame
*)frame
;
264 - (void) webView
:(WebView
*)view willAddPlugInView
:(id
)plugin
;
265 - (void) webView
:(WebView
*)view willCloseFrame
:(WebFrame
*)frame
;
266 - (void) webView
:(WebView
*)view willShowFullScreenForPlugInView
:(id
)plugin
;
267 - (BOOL
) webView
:(WebView
*)view shouldScrollToPoint
:(CGPoint
)point forFrame
:(WebFrame
*)frame
;
268 - (void) webViewDidLayout
:(WebView
*)view
;
269 - (void) webViewDidPreventDefaultForEvent
:(WebView
*)view
;
270 - (void) webViewFormEditedStatusHasChanged
:(WebView
*)changed
;
273 // @interface *Button : * {{{
274 @interface UINavigationButton
: UIButton
275 - (id
) initWithTitle
:(NSString
*)title style
:(UINavigationButtonStyle
)style
;
276 - (void) setBarStyle
:(UIBarStyle
)style
;
279 @interface UIPushButton
: UIControl
280 - (id
) backgroundForState
:(NSUInteger
)state
;
281 - (void) setAutosizesToFit
:(BOOL
)autosizes
;
282 - (void) setBackground
:(id
)background forState
:(NSUInteger
)state
;
283 - (void) setDrawsShadow
:(BOOL
)draws
;
284 - (void) setStretchBackground
:(BOOL
)stretch
;
285 - (void) setTitle
:(NSString
*)title
;
286 - (void) setTitleFont
:(UIFont
*)font
;
289 @interface UIThreePartButton
: UIPushButton
292 // @interface * : NS* {{{
293 @interface WebDefaultUIKitDelegate
: NSObject
294 + (WebDefaultUIKitDelegate
*) sharedUIKitDelegate
;
298 // #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
299 #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
300 #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
303 UIModalPresentationFullScreen
,
304 UIModalPresentationPageSheet
,
305 UIModalPresentationFormSheet
,
306 UIModalPresentationCurrentContext
,
307 } UIModalPresentationStyle
;
309 #define kSCNetworkReachabilityFlagsConnectionOnTraffic kSCNetworkReachabilityFlagsConnectionAutomatic
310 #define kSCNetworkReachabilityFlagsConnectionOnDemand (1 << 5)
312 @
class NSUndoManager
;
315 @interface
UIViewController (iPad
)
316 - (void) setModalPresentationStyle
:(UIModalPresentationStyle
)style
;
319 #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
323 extern CFStringRef
const kGSDisplayIdentifiersCapability
;
324 extern float const UIWebViewGrowsAndShrinksToFitHeight
;
325 extern float const UIWebViewScalesToFitScale
;
327 // extern "C" *(); {{{
328 extern "C" UIImage
*_UIImageWithName(NSString
*name
);
329 extern "C" void UISetColor(CGColorRef color
);
332 #endif//CYDIA_UIKITPRIVATE_H