X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/d0a5ea5685a2c5e2f98b76fd771095ecf048a66f..68df8c0b7bacec286d4798408b5a110bdac88986:/iPhonePrivate.h diff --git a/iPhonePrivate.h b/iPhonePrivate.h index 70eef381..411ff964 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -2,16 +2,14 @@ #define CYDIA_UIKITPRIVATE_H // #include <*> {{{ -#include +#include #include // }}} -// #import <*> {{{ -#import -#import -#import -#import +// typedef GS* {{{ +typedef struct __GSEvent *GSEventRef; // }}} -// typedef enum {*} *; {{{ + +// enum UI* {{{ typedef enum { UIGestureAttributeMinDegrees, /*float*/ UIGestureAttributeMaxDegrees, /*float*/ @@ -37,12 +35,82 @@ static const UIActivityIndicatorViewStyle UIActivityIndicatorViewStyleWhiteTiny( // #define * * {{{ #define UIDataDetectorTypeAutomatic 0x80000000 // }}} + +// @class DOM*; {{{ +@class DOMRGBColor; +// }}} // @class Web*; {{{ @class WebDataSource; @class WebScriptObject; +@class WebView; // }}} -// @protocol *; {{{ -@protocol WebPolicyDecisionListener; + +// enum DOM_* {{{ +enum { + DOM_CSS_UNKNOWN = 0, + DOM_CSS_NUMBER = 1, + DOM_CSS_PERCENTAGE = 2, + DOM_CSS_EMS = 3, + DOM_CSS_EXS = 4, + DOM_CSS_PX = 5, + DOM_CSS_CM = 6, + DOM_CSS_MM = 7, + DOM_CSS_IN = 8, + DOM_CSS_PT = 9, + DOM_CSS_PC = 10, + DOM_CSS_DEG = 11, + DOM_CSS_RAD = 12, + DOM_CSS_GRAD = 13, + DOM_CSS_MS = 14, + DOM_CSS_S = 15, + DOM_CSS_HZ = 16, + DOM_CSS_KHZ = 17, + DOM_CSS_DIMENSION = 18, + DOM_CSS_STRING = 19, + DOM_CSS_URI = 20, + DOM_CSS_IDENT = 21, + DOM_CSS_ATTR = 22, + DOM_CSS_COUNTER = 23, + DOM_CSS_RECT = 24, + DOM_CSS_RGBCOLOR = 25, + DOM_CSS_VW = 26, + DOM_CSS_VH = 27, + DOM_CSS_VMIN = 28, + DOM_CSS_VMAX = 29 +}; +// }}} +// enum Web* {{{ +typedef NS_ENUM(NSUInteger, WebCacheModel) { + WebCacheModelDocumentViewer = 0, + WebCacheModelDocumentBrowser = 1, + WebCacheModelPrimaryWebBrowser = 2 +}; + +typedef enum { + WebEventMouseDown, + WebEventMouseUp, + WebEventMouseMoved, + WebEventScrollWheel, + WebEventKeyDown, + WebEventKeyUp, + WebEventTouchBegin, + WebEventTouchChange, + WebEventTouchEnd, + WebEventTouchCancel +} WebEventType; + +enum { + WebKitErrorCannotShowMIMEType = 100, + WebKitErrorCannotShowURL = 101, + WebKitErrorFrameLoadInterruptedByPolicyChange = 102, +}; +// }}} +// @protocol Web*; {{{ +@protocol WebPolicyDecisionListener +- (void) use; +- (void) download; +- (void) ignore; +@end // }}} // @interface * : UIView {{{ @@ -72,8 +140,8 @@ static const UIActivityIndicatorViewStyle UIActivityIndicatorViewStyleWhiteTiny( - (void) setDirectionalScrolling:(BOOL)directional; - (void) setEventMode:(NSInteger)mode; - (void) setOffset:(CGPoint)offset; -- (void) setScrollDecelerationFactor:(float)factor; -- (void) setScrollHysteresis:(float)hysteresis; +- (void) setScrollDecelerationFactor:(CGFloat)factor; +- (void) setScrollHysteresis:(CGFloat)hysteresis; - (void) setScrollerIndicatorStyle:(UIScrollViewIndicatorStyle)style; - (void) setThumbDetectionEnabled:(BOOL)enabled; @end @@ -147,26 +215,127 @@ static const UIActivityIndicatorViewStyle UIActivityIndicatorViewStyleWhiteTiny( + (WebDefaultUIKitDelegate *) sharedUIKitDelegate; @end // }}} -// @interface UIWeb* : * {{{ -@interface UIWebBrowserView : UIWebDocumentView +// @interface DOM* {{{ +@interface DOMObject @end -@interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer -- (int) type; -- (NSString *) _typeDescription; +@interface DOMCSSValue : DOMObject +@end + +@interface DOMCSSPrimitiveValue : DOMCSSValue +@property (readonly) unsigned short primitiveType; +- (DOMRGBColor *) getRGBColorValue; +- (float) getFloatValue:(unsigned short)unit; +@end + +@interface DOMRGBColor : DOMObject +@property (readonly, strong) DOMCSSPrimitiveValue *red; +@property (readonly, strong) DOMCSSPrimitiveValue *green; +@property (readonly, strong) DOMCSSPrimitiveValue *blue; +@property (readonly, strong) DOMCSSPrimitiveValue *alpha; +@end + +@interface DOMCSSStyleDeclaration : DOMObject +- (DOMCSSValue *) getPropertyCSSValue:(NSString *)name; +- (void) setProperty:(NSString *)name value:(NSString *)value priority:(NSString *)priority; +@end + +@interface DOMNode : DOMObject +@end + +@interface DOMNodeList : DOMObject +@property (readonly) unsigned length; +- (DOMNode *) item:(unsigned)index; +@end + +@interface DOMElement : DOMNode +@property (readonly) int scrollHeight; +@end + +@interface DOMHTMLElement : DOMElement +@property (readonly, strong) DOMCSSStyleDeclaration *style; +@end + +@interface DOMHTMLBodyElement : DOMHTMLElement +@end + +@interface DOMHTMLIFrameElement : DOMHTMLElement +@end + +@interface DOMDocument : DOMNode +@property (strong) DOMHTMLElement *body; +- (DOMCSSStyleDeclaration *) getComputedStyle:(DOMElement *)element pseudoElement:(NSString *)pseudo; +- (DOMNodeList *) getElementsByTagName:(NSString *)name; @end // }}} // @interface WAK* : * {{{ +@interface WAKResponder : NSObject +@end + +@interface WAKView : NSObject ++ (BOOL) hasLandscapeOrientation; +@end + @interface WAKWindow : NSObject + (BOOL) hasLandscapeOrientation; @end // }}} +// @interface Web* {{{ +@interface WebPreferences : NSObject +- (void) setCacheModel:(WebCacheModel)value; +- (void) setJavaScriptCanOpenWindowsAutomatically:(BOOL)value; +@end + +@interface WebFrame : NSObject +@property (nonatomic, readonly, copy) NSArray *childFrames; +@property (nonatomic, readonly, strong) WebDataSource *dataSource; +@property (nonatomic, readonly, strong) DOMDocument *DOMDocument; +@property (nonatomic, readonly, strong) DOMHTMLElement *frameElement; +@property (nonatomic, readonly) JSGlobalContextRef globalContext; +@property (nonatomic, readonly, strong) WebFrame *parentFrame; +@property (nonatomic, readonly, strong) WebDataSource *provisionalDataSource; +@property (nonatomic, readonly, strong) WebScriptObject *windowObject; +@end + +@interface WebView : WAKView +@property (nonatomic, readonly, strong) WebFrame *mainFrame; +@property (nonatomic, strong) WebPreferences *preferences; +- (IBAction) reloadFromOrigin:(id)sender; +- (void) setApplicationNameForUserAgent:(NSString *)value; +- (void) setShouldUpdateWhileOffscreen:(BOOL)value; +@end + +@interface WebScriptObject : NSObject +- (id) evaluateWebScript:(NSString *)script; ++ (BOOL) isKeyExcludedFromWebScript:(const char *)name; +- (JSObjectRef) JSObject; +- (void) setWebScriptValueAtIndex:(unsigned)index value:(id)value; +- (id) webScriptValueAtIndex:(unsigned)index; +@end + +@interface WebUndefined : NSObject ++ (WebUndefined *) undefined; +@end +// }}} +// @interface UIWeb* : * {{{ +@interface UIWebBrowserView : UIWebDocumentView +@end + +@interface UIWebTouchEventsGestureRecognizer : UIGestureRecognizer +- (int) type; +- (NSString *) _typeDescription; +@end +// }}} // @interface NS* (*) {{{ @interface NSMutableURLRequest (Apple) - (void) setHTTPShouldUsePipelining:(BOOL)pipelining; @end +@interface NSObject (Apple) ++ (BOOL) isKeyExcludedFromWebScript:(const char *)name; +@end + @interface NSString (Apple) - (NSString *) stringByAddingPercentEscapes; - (NSString *) stringByReplacingCharacter:(UniChar)from withCharacter:(UniChar)to; @@ -281,7 +450,7 @@ static const UIActivityIndicatorViewStyle UIActivityIndicatorViewStyleWhiteTiny( @end @interface UITextField (Apple) -- (UITextInputTraits *) textInputTraits; +- (NSObject *) textInputTraits; @end @interface UITextView (Apple) @@ -393,14 +562,14 @@ typedef enum { @end @interface UIScrollView (iOS_3_0) -@property(assign,nonatomic) float decelerationRate; +@property(assign,nonatomic) CGFloat decelerationRate; @end @interface UIWebView (iOS_3_0) @property(assign,nonatomic) NSUInteger dataDetectorTypes; @end -extern float const UIScrollViewDecelerationRateNormal; +extern CGFloat const UIScrollViewDecelerationRateNormal; #endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER // }}} @@ -433,14 +602,15 @@ extern float const UIScrollViewDecelerationRateNormal; extern CFStringRef const kGSDisplayIdentifiersCapability; extern float const UIWebViewGrowsAndShrinksToFitHeight; extern float const UIWebViewScalesToFitScale; +extern NSString *WebKitErrorDomain; // }}} // extern "C" *(); {{{ extern "C" void *reboot2(uint64_t flags); extern "C" mach_port_t SBSSpringBoardServerPort(); extern "C" int SBBundlePathForDisplayIdentifier(mach_port_t port, const char *identifier, char *path); -extern "C" NSSet *SBSCopyDisplayIdentifiers(); +extern "C" NSArray *SBSCopyApplicationDisplayIdentifiers(bool active, bool debuggable); extern "C" NSString *SBSCopyLocalizedApplicationNameForDisplayIdentifier(NSString *); -extern "C" NSData *SBSCopyIconImagePNGDataForDisplayIdentifier(NSString *); +extern "C" NSString *SBSCopyIconImagePathForDisplayIdentifier(NSString *); extern "C" UIImage *_UIImageWithName(NSString *name); extern "C" void UISetColor(CGColorRef color); // }}}