**/
/* }}} */
-#include "Cydia/LoadingView.h"
+#include "CyteKit/UCPlatform.h"
#include "CyteKit/Localize.h"
+#include "Cydia/LoadingView.h"
+
@implementation CydiaLoadingView
- (id) initWithFrame:(CGRect)frame {
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "Cydia/LoadingView.h"
#include "Cydia/LoadingViewController.h"
**/
/* }}} */
-#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 {
#ifndef CyteKit_IndirectDelegate_H
#define CyteKit_IndirectDelegate_H
+#include <Foundation/Foundation.h>
+
@interface IndirectDelegate : NSObject {
_transient volatile id delegate_;
}
#ifndef CyteKit_TabBarController_H
#define CyteKit_TabBarController_H
-#include <CyteKit/UCPlatform.h>
#include <CyteKit/ViewController.h>
#include <UIKit/UIKit.h>
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/TabBarController.h"
#include "iPhonePrivate.h"
#ifndef CyteKit_TableViewCell_H
#define CyteKit_TableViewCell_H
-#include <CyteKit/UCPlatform.h>
-
#include <UIKit/UIKit.h>
#include <Menes/ObjectHandle.h>
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/TableViewCell.h"
#include "iPhonePrivate.h"
#ifndef CyteKit_ViewController_H
#define CyteKit_ViewController_H
-#include <CyteKit/UCPlatform.h>
-
#include <UIKit/UIKit.h>
#include <Menes/ObjectHandle.h>
**/
/* }}} */
-#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)
#ifndef CyteKit_WebScriptObject_Cyte_H
#define CyteKit_WebScriptObject_Cyte_H
-#include <WebKit/WebScriptObject.h>
+#include "iPhonePrivate.h"
@interface WebScriptObject (Cyte)
- (NSUInteger) count;
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/WebScriptObject-Cyte.h"
+#include "iPhonePrivate.h"
+
@implementation WebScriptObject (Cyte)
- (NSUInteger) count {
#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,
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/dispatchEvent.h"
#include "CyteKit/WebView.h"
#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
#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>
[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];
}
UITextField *password([alert textFieldAtIndex:1]); {
- UITextInputTraits *traits([password textInputTraits]);
+ NSObject<UITextInputTraits> *traits([password textInputTraits]);
[traits setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[traits setAutocorrectionType:UITextAutocorrectionTypeNo];
[traits setKeyboardType:UIKeyboardTypeASCIICapable];
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/WebViewTableViewCell.h"
+
#include "iPhonePrivate.h"
@implementation CyteWebViewTableViewCell
**/
/* }}} */
+#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)
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/stringWithUTF8Bytes.h"
@implementation NSString (Cyte)
#ifndef Menes_Function_H
#define Menes_Function_H
-#include "CyteKit/UCPlatform.h"
-
template <typename Result_, typename... Args_>
class Function {
private:
#ifndef Menes_ObjectHandle_H
#define Menes_ObjectHandle_H
-#include "CyteKit/UCPlatform.h"
-
#include <CoreFoundation/CoreFoundation.h>
#include <Foundation/Foundation.h>
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "Menes/invocationWithSelector.h"
@implementation NSInvocation (MenesInvocationWithSelector)
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "Menes/yieldToSelector.h"
@implementation NSObject (MenesYieldToSelector)
#include <QuartzCore/CALayer.h>
#include <WebCore/WebCoreThread.h>
-#include <WebKit/DOMHTMLIFrameElement.h>
#include <algorithm>
#include <fstream>
[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];
[super applicationSuspend];
}
-- (void) applicationSuspend:(__GSEvent *)event {
+- (void) applicationSuspend:(GSEventRef)event {
if ([self isSafeToSuspend])
[super applicationSuspend:event];
}
**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include <Foundation/Foundation.h>
#include <Menes/ObjectHandle.h>
-#include <CyteKit/UCPlatform.h>
#include <cstdio>
#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*/
// #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 {{{
+ (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;
@end
@interface UITextField (Apple)
-- (UITextInputTraits *) textInputTraits;
+- (NSObject<UITextInputTraits> *) textInputTraits;
@end
@interface UITextView (Apple)
extern CFStringRef const kGSDisplayIdentifiersCapability;
extern float const UIWebViewGrowsAndShrinksToFitHeight;
extern float const UIWebViewScalesToFitScale;
+extern NSString *WebKitErrorDomain;
// }}}
// extern "C" *(); {{{
extern "C" void *reboot2(uint64_t flags);
+#include "CyteKit/UCPlatform.h"
+
#include <dirent.h>
#include <strings.h>
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