summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-15 01:38:42 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-15 01:38:42 -0800
commit63755c48fd5fe4f31775e0f38857314879b93f39 (patch)
treec3018c82893e52b80a40b0795ee47001d3318da4
parent09e03d2385c301e68025da688831f50dd2e3734d (diff)
Move more of sysroot's sadness into iPhonePrivate.
-rw-r--r--Cydia/LoadingView.mm4
-rw-r--r--Cydia/LoadingViewController.mm2
-rw-r--r--Cydia/MIMEAddress.mm7
-rw-r--r--CyteKit/IndirectDelegate.h2
-rw-r--r--CyteKit/TabBarController.h1
-rw-r--r--CyteKit/TabBarController.mm2
-rw-r--r--CyteKit/TableViewCell.h2
-rw-r--r--CyteKit/TableViewCell.mm2
-rw-r--r--CyteKit/ViewController.h2
-rw-r--r--CyteKit/ViewController.mm4
-rw-r--r--CyteKit/WebScriptObject-Cyte.h2
-rw-r--r--CyteKit/WebScriptObject-Cyte.mm4
-rw-r--r--CyteKit/WebView.h11
-rw-r--r--CyteKit/WebView.mm2
-rw-r--r--CyteKit/WebViewController.mm23
-rw-r--r--CyteKit/WebViewTableViewCell.mm3
-rw-r--r--CyteKit/dispatchEvent.mm8
-rw-r--r--CyteKit/stringWithUTF8Bytes.mm2
-rw-r--r--Menes/Function.h2
-rw-r--r--Menes/ObjectHandle.h2
-rw-r--r--Menes/invocationWithSelector.mm2
-rw-r--r--Menes/yieldToSelector.mm2
-rw-r--r--MobileCydia.mm5
-rw-r--r--Sources.mm3
-rw-r--r--iPhonePrivate.h200
-rw-r--r--postinst.mm2
-rwxr-xr-xsysroot.sh61
27 files changed, 241 insertions, 121 deletions
diff --git a/Cydia/LoadingView.mm b/Cydia/LoadingView.mm
index 715b16f..4b54faa 100644
--- a/Cydia/LoadingView.mm
+++ b/Cydia/LoadingView.mm
@@ -19,9 +19,11 @@
**/
/* }}} */
-#include "Cydia/LoadingView.h"
+#include "CyteKit/UCPlatform.h"
#include "CyteKit/Localize.h"
+#include "Cydia/LoadingView.h"
+
@implementation CydiaLoadingView
- (id) initWithFrame:(CGRect)frame {
diff --git a/Cydia/LoadingViewController.mm b/Cydia/LoadingViewController.mm
index d5f4830..48e3312 100644
--- a/Cydia/LoadingViewController.mm
+++ b/Cydia/LoadingViewController.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "Cydia/LoadingView.h"
#include "Cydia/LoadingViewController.h"
diff --git a/Cydia/MIMEAddress.mm b/Cydia/MIMEAddress.mm
index c50525a..a30be35 100644
--- a/Cydia/MIMEAddress.mm
+++ b/Cydia/MIMEAddress.mm
@@ -19,12 +19,13 @@
**/
/* }}} */
-#include "Cydia/MIMEAddress.h"
-
-#include <WebKit/WebScriptObject.h>
+#include "CyteKit/UCPlatform.h"
+#include "Cydia/MIMEAddress.h"
#include "CyteKit/RegEx.hpp"
+#include "iPhonePrivate.h"
+
@implementation MIMEAddress
- (NSString *) name {
diff --git a/CyteKit/IndirectDelegate.h b/CyteKit/IndirectDelegate.h
index 42bbd0a..ae698cb 100644
--- a/CyteKit/IndirectDelegate.h
+++ b/CyteKit/IndirectDelegate.h
@@ -22,6 +22,8 @@
#ifndef CyteKit_IndirectDelegate_H
#define CyteKit_IndirectDelegate_H
+#include <Foundation/Foundation.h>
+
@interface IndirectDelegate : NSObject {
_transient volatile id delegate_;
}
diff --git a/CyteKit/TabBarController.h b/CyteKit/TabBarController.h
index cea17d2..2849b4b 100644
--- a/CyteKit/TabBarController.h
+++ b/CyteKit/TabBarController.h
@@ -22,7 +22,6 @@
#ifndef CyteKit_TabBarController_H
#define CyteKit_TabBarController_H
-#include <CyteKit/UCPlatform.h>
#include <CyteKit/ViewController.h>
#include <UIKit/UIKit.h>
diff --git a/CyteKit/TabBarController.mm b/CyteKit/TabBarController.mm
index bb3d98b..27a8000 100644
--- a/CyteKit/TabBarController.mm
+++ b/CyteKit/TabBarController.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/TabBarController.h"
#include "iPhonePrivate.h"
diff --git a/CyteKit/TableViewCell.h b/CyteKit/TableViewCell.h
index 46333aa..f97a592 100644
--- a/CyteKit/TableViewCell.h
+++ b/CyteKit/TableViewCell.h
@@ -22,8 +22,6 @@
#ifndef CyteKit_TableViewCell_H
#define CyteKit_TableViewCell_H
-#include <CyteKit/UCPlatform.h>
-
#include <UIKit/UIKit.h>
#include <Menes/ObjectHandle.h>
diff --git a/CyteKit/TableViewCell.mm b/CyteKit/TableViewCell.mm
index b4c4a4c..ce61ad5 100644
--- a/CyteKit/TableViewCell.mm
+++ b/CyteKit/TableViewCell.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/TableViewCell.h"
#include "iPhonePrivate.h"
diff --git a/CyteKit/ViewController.h b/CyteKit/ViewController.h
index 7cc550e..f724837 100644
--- a/CyteKit/ViewController.h
+++ b/CyteKit/ViewController.h
@@ -22,8 +22,6 @@
#ifndef CyteKit_ViewController_H
#define CyteKit_ViewController_H
-#include <CyteKit/UCPlatform.h>
-
#include <UIKit/UIKit.h>
#include <Menes/ObjectHandle.h>
diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm
index ae7539c..3bf9c41 100644
--- a/CyteKit/ViewController.mm
+++ b/CyteKit/ViewController.mm
@@ -19,11 +19,13 @@
**/
/* }}} */
-#include "CyteKit/ViewController.h"
+#include "CyteKit/UCPlatform.h"
#include <Foundation/Foundation.h>
#include <UIKit/UIKit.h>
+#include "CyteKit/ViewController.h"
+
#include "iPhonePrivate.h"
@implementation UIViewController (Cydia)
diff --git a/CyteKit/WebScriptObject-Cyte.h b/CyteKit/WebScriptObject-Cyte.h
index a7ffa29..6a394bc 100644
--- a/CyteKit/WebScriptObject-Cyte.h
+++ b/CyteKit/WebScriptObject-Cyte.h
@@ -22,7 +22,7 @@
#ifndef CyteKit_WebScriptObject_Cyte_H
#define CyteKit_WebScriptObject_Cyte_H
-#include <WebKit/WebScriptObject.h>
+#include "iPhonePrivate.h"
@interface WebScriptObject (Cyte)
- (NSUInteger) count;
diff --git a/CyteKit/WebScriptObject-Cyte.mm b/CyteKit/WebScriptObject-Cyte.mm
index df1bfca..7fa851d 100644
--- a/CyteKit/WebScriptObject-Cyte.mm
+++ b/CyteKit/WebScriptObject-Cyte.mm
@@ -19,8 +19,12 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/WebScriptObject-Cyte.h"
+#include "iPhonePrivate.h"
+
@implementation WebScriptObject (Cyte)
- (NSUInteger) count {
diff --git a/CyteKit/WebView.h b/CyteKit/WebView.h
index 02fce72..ddf4391 100644
--- a/CyteKit/WebView.h
+++ b/CyteKit/WebView.h
@@ -24,13 +24,12 @@
#include <UIKit/UIKit.h>
-#include <WebKit/DOMNodeList.h>
-#include <WebKit/WebFrame.h>
-#include <WebKit/WebPolicyDelegate.h>
-#include <WebKit/WebScriptObject.h>
-#include <WebKit/WebView.h>
+@protocol WebPolicyDecisionListener;
-#include <JavaScriptCore/JavaScriptCore.h>
+@class WebDataSource;
+@class WebFrame;
+@class WebScriptObject;
+@class WebView;
enum CYWebPolicyDecision {
CYWebPolicyDecisionUnknown,
diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm
index 09bb4c7..38f6a4f 100644
--- a/CyteKit/WebView.mm
+++ b/CyteKit/WebView.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/dispatchEvent.h"
#include "CyteKit/WebView.h"
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 6692c6c..18b40d9 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -1,15 +1,13 @@
#include "CyteKit/UCPlatform.h"
-#include "CyteKit/WebViewController.h"
-
-#include "CyteKit/MFMailComposeViewController-MailToURL.h"
-
-#include "iPhonePrivate.h"
#include "CyteKit/IndirectDelegate.h"
#include "CyteKit/Localize.h"
-#include "CyteKit/WebViewController.h"
+#include "CyteKit/MFMailComposeViewController-MailToURL.h"
#include "CyteKit/RegEx.hpp"
#include "CyteKit/WebThreadLocked.hpp"
+#include "CyteKit/WebViewController.h"
+
+#include "iPhonePrivate.h"
//#include <QuartzCore/CALayer.h>
// XXX: fix the minimum requirement
@@ -17,15 +15,6 @@ extern NSString * const kCAFilterNearest;
#include <WebCore/WebCoreThread.h>
-#import <WebKit/WebKitErrors.h>
-#import <WebKit/WebPreferences.h>
-
-#include <WebKit/DOMCSSPrimitiveValue.h>
-#include <WebKit/DOMCSSStyleDeclaration.h>
-#include <WebKit/DOMDocument.h>
-#include <WebKit/DOMHTMLBodyElement.h>
-#include <WebKit/DOMRGBColor.h>
-
#include <dlfcn.h>
#include <objc/runtime.h>
@@ -683,7 +672,7 @@ float CYScrollViewDecelerationRateNormal;
[alert addTextFieldWithValue:@"" label:UCLocalize("PASSWORD")];
UITextField *username([alert textFieldAtIndex:0]); {
- UITextInputTraits *traits([username textInputTraits]);
+ NSObject<UITextInputTraits> *traits([username textInputTraits]);
[traits setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[traits setAutocorrectionType:UITextAutocorrectionTypeNo];
[traits setKeyboardType:UIKeyboardTypeASCIICapable];
@@ -691,7 +680,7 @@ float CYScrollViewDecelerationRateNormal;
}
UITextField *password([alert textFieldAtIndex:1]); {
- UITextInputTraits *traits([password textInputTraits]);
+ NSObject<UITextInputTraits> *traits([password textInputTraits]);
[traits setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[traits setAutocorrectionType:UITextAutocorrectionTypeNo];
[traits setKeyboardType:UIKeyboardTypeASCIICapable];
diff --git a/CyteKit/WebViewTableViewCell.mm b/CyteKit/WebViewTableViewCell.mm
index ebba58a..3756a0f 100644
--- a/CyteKit/WebViewTableViewCell.mm
+++ b/CyteKit/WebViewTableViewCell.mm
@@ -19,7 +19,10 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/WebViewTableViewCell.h"
+
#include "iPhonePrivate.h"
@implementation CyteWebViewTableViewCell
diff --git a/CyteKit/dispatchEvent.mm b/CyteKit/dispatchEvent.mm
index 9efe1cb..f36be8c 100644
--- a/CyteKit/dispatchEvent.mm
+++ b/CyteKit/dispatchEvent.mm
@@ -19,15 +19,11 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/dispatchEvent.h"
#include "CyteKit/WebThreadLocked.hpp"
-#include <WebCore/WebEvent.h>
-
-#include <WebKit/WebFrame.h>
-#include <WebKit/WebScriptObject.h>
-#include <WebKit/WebView.h>
-
#include "Substrate.hpp"
@implementation UIWebDocumentView (CyteDispatchEvent)
diff --git a/CyteKit/stringWithUTF8Bytes.mm b/CyteKit/stringWithUTF8Bytes.mm
index 94fe1ed..2e94dd4 100644
--- a/CyteKit/stringWithUTF8Bytes.mm
+++ b/CyteKit/stringWithUTF8Bytes.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/stringWithUTF8Bytes.h"
@implementation NSString (Cyte)
diff --git a/Menes/Function.h b/Menes/Function.h
index fffdda9..37f8e97 100644
--- a/Menes/Function.h
+++ b/Menes/Function.h
@@ -22,8 +22,6 @@
#ifndef Menes_Function_H
#define Menes_Function_H
-#include "CyteKit/UCPlatform.h"
-
template <typename Result_, typename... Args_>
class Function {
private:
diff --git a/Menes/ObjectHandle.h b/Menes/ObjectHandle.h
index 6369fd0..9b8d57d 100644
--- a/Menes/ObjectHandle.h
+++ b/Menes/ObjectHandle.h
@@ -22,8 +22,6 @@
#ifndef Menes_ObjectHandle_H
#define Menes_ObjectHandle_H
-#include "CyteKit/UCPlatform.h"
-
#include <CoreFoundation/CoreFoundation.h>
#include <Foundation/Foundation.h>
diff --git a/Menes/invocationWithSelector.mm b/Menes/invocationWithSelector.mm
index a2214fb..b730c4d 100644
--- a/Menes/invocationWithSelector.mm
+++ b/Menes/invocationWithSelector.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "Menes/invocationWithSelector.h"
@implementation NSInvocation (MenesInvocationWithSelector)
diff --git a/Menes/yieldToSelector.mm b/Menes/yieldToSelector.mm
index f8f6203..f47c4a0 100644
--- a/Menes/yieldToSelector.mm
+++ b/Menes/yieldToSelector.mm
@@ -19,6 +19,8 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "Menes/yieldToSelector.h"
@implementation NSObject (MenesYieldToSelector)
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 4f90372..4e8f718 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -53,7 +53,6 @@
#include <QuartzCore/CALayer.h>
#include <WebCore/WebCoreThread.h>
-#include <WebKit/DOMHTMLIFrameElement.h>
#include <algorithm>
#include <fstream>
@@ -8855,7 +8854,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
[alert setNumberOfRows:1];
[alert addTextFieldWithValue:@"http://" label:@""];
- UITextInputTraits *traits = [[alert textField] textInputTraits];
+ NSObject<UITextInputTraits> *traits = [[alert textField] textInputTraits];
[traits setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[traits setAutocorrectionType:UITextAutocorrectionTypeNo];
[traits setKeyboardType:UIKeyboardTypeURL];
@@ -9605,7 +9604,7 @@ _end
[super applicationSuspend];
}
-- (void) applicationSuspend:(__GSEvent *)event {
+- (void) applicationSuspend:(GSEventRef)event {
if ([self isSafeToSuspend])
[super applicationSuspend:event];
}
diff --git a/Sources.mm b/Sources.mm
index f89ed18..a156ee2 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -19,9 +19,10 @@
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include <Foundation/Foundation.h>
#include <Menes/ObjectHandle.h>
-#include <CyteKit/UCPlatform.h>
#include <cstdio>
diff --git a/iPhonePrivate.h b/iPhonePrivate.h
index 19af1aa..411ff96 100644
--- a/iPhonePrivate.h
+++ b/iPhonePrivate.h
@@ -2,16 +2,14 @@
#define CYDIA_UIKITPRIVATE_H
// #include <*> {{{
-#include <GraphicsServices/GraphicsServices.h>
+#include <JavaScriptCore/JavaScriptCore.h>
#include <UIKit/UIKit.h>
// }}}
-// #import <*> {{{
-#import <WebKit/DOMHTMLIFrameElement.h>
-#import <WebKit/WebFrame.h>
-#import <WebKit/WebPreferences.h>
-#import <WebKit/WebView.h>
+// 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 <NSObject>
+- (void) use;
+- (void) download;
+- (void) ignore;
+@end
// }}}
// @interface * : UIView {{{
@@ -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<UITextInputTraits> *) textInputTraits;
@end
@interface UITextView (Apple)
@@ -433,6 +602,7 @@ extern CGFloat 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);
diff --git a/postinst.mm b/postinst.mm
index 1930b49..f826f4f 100644
--- a/postinst.mm
+++ b/postinst.mm
@@ -1,3 +1,5 @@
+#include "CyteKit/UCPlatform.h"
+
#include <dirent.h>
#include <strings.h>
diff --git a/sysroot.sh b/sysroot.sh
index 2860707..2a2c4b8 100755
--- a/sysroot.sh
+++ b/sysroot.sh
@@ -102,64 +102,9 @@ mkdir -p usr/include
cd usr/include
mkdir CoreFoundation
-wget -O CoreFoundation/CFBundlePriv.h "http://www.opensource.apple.com/source/CF/CF-550/CFBundlePriv.h?txt"
wget -O CoreFoundation/CFUniChar.h "http://www.opensource.apple.com/source/CF/CF-550/CFUniChar.h?txt"
-if true; then
- mkdir -p WebCore
- wget -O WebCore/WebCoreThread.h 'http://www.opensource.apple.com/source/WebCore/WebCore-658.28/wak/WebCoreThread.h?txt'
- wget -O WebCore/WebEvent.h 'http://www.opensource.apple.com/source/WebCore/WebCore-658.28/platform/iphone/WebEvent.h?txt'
-else
- wget -O WebCore.tgz http://www.opensource.apple.com/tarballs/WebCore/WebCore-658.28.tar.gz
- tar -zx --transform 's@^[^/]*/@WebCore.d/@' -f WebCore.tgz
-
- mkdir WebCore
- cp -a WebCore.d/{*,rendering/style,platform/graphics/transforms}/*.h WebCore
- cp -a WebCore.d/platform/{animation,graphics,network,text}/*.h WebCore
- cp -a WebCore.d/{accessibility,platform{,/{graphics,network,text}}}/{cf,mac,iphone}/*.h WebCore
- cp -a WebCore.d/bridge/objc/*.h WebCore
-
- wget -O JavaScriptCore.tgz http://www.opensource.apple.com/tarballs/JavaScriptCore/JavaScriptCore-554.1.tar.gz
- #tar -zx --transform 's@^[^/]*/API/@JavaScriptCore/@' -f JavaScriptCore.tgz $(tar -ztf JavaScriptCore.tgz | grep '/API/[^/]*.h$')
- tar -zx \
- --transform 's@^[^/]*/@@' \
- --transform 's@^icu/@@' \
- -f JavaScriptCore.tgz $(tar -ztf JavaScriptCore.tgz | sed -e '
- /\/icu\/unicode\/.*\.h$/ p;
- /\/profiler\/.*\.h$/ p;
- /\/runtime\/.*\.h$/ p;
- /\/wtf\/.*\.h$/ p;
- d;
- ')
-fi
-
-for framework in ApplicationServices CoreServices IOKit IOSurface JavaScriptCore WebKit; do
- ln -s "${xcode}"/System/Library/Frameworks/"${framework}".framework/Headers "${framework}"
-done
-
-for framework in /System/Library/Frameworks/CoreServices.framework/Frameworks/*.framework; do
- name=${framework}
- name=${name%.framework}
- name=${name##*/}
- ln -s "${xcode}/${framework}/Headers" "${name}"
-done
+mkdir -p WebCore
+wget -O WebCore/WebCoreThread.h 'http://www.opensource.apple.com/source/WebCore/WebCore-658.28/wak/WebCoreThread.h?txt'
-mkdir -p Cocoa
-cat >Cocoa/Cocoa.h <<EOF
-#define NSImage UIImage
-#define NSView UIView
-#define NSWindow UIWindow
-
-#define NSPoint CGPoint
-#define NSRect CGRect
-
-#define NSPasteboard UIPasteboard
-#define NSSelectionAffinity int
-@protocol NSUserInterfaceValidations;
-EOF
-
-mkdir -p GraphicsServices
-cat >GraphicsServices/GraphicsServices.h <<EOF
-typedef struct __GSEvent *GSEventRef;
-typedef struct __GSFont *GSFontRef;
-EOF
+ln -s /System/Library/Frameworks/IOKit.framework/Headers IOKit