diff --git a/Ejecta.xcodeproj/project.pbxproj b/Ejecta.xcodeproj/project.pbxproj index 0d2eb74e..a1d67239 100644 --- a/Ejecta.xcodeproj/project.pbxproj +++ b/Ejecta.xcodeproj/project.pbxproj @@ -59,7 +59,6 @@ B66847591823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = B66847581823FEDF00ABCDF9 /* EJCanvasContextWebGLTexture.m */; }; B668475C182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = B668475B182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m */; }; B668FCEE1821C08500D4F629 /* EJFontCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B668FCED1821C08500D4F629 /* EJFontCache.m */; }; - B66F1E811476B6B90090D208 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B66F1E771476B3AC0090D208 /* libicucore.dylib */; }; B68037011682A58300833604 /* EJConvertWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B68037001682A58200833604 /* EJConvertWebGL.m */; }; B68C5B95132E6CD60015092E /* App in Resources */ = {isa = PBXBuildFile; fileRef = B68C5AEF132E6CD60015092E /* App */; }; B699669816CC4E6E006B9456 /* EJTextureStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B699669716CC4E6D006B9456 /* EJTextureStorage.m */; }; @@ -74,7 +73,10 @@ B6B41FA11BF25A7F0075C00F /* EJBindingGamepadButton.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B41F9D1BF25A7F0075C00F /* EJBindingGamepadButton.m */; }; B6B41FA21BF25A7F0075C00F /* EJBindingGamepadProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B41F9F1BF25A7F0075C00F /* EJBindingGamepadProvider.m */; }; B6B41FA31BF25A7F0075C00F /* EJBindingGamepadProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B41F9F1BF25A7F0075C00F /* EJBindingGamepadProvider.m */; }; - B6CDA16018295A5F00190074 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CDA15F18295A5F00190074 /* libc++.dylib */; }; + B6C83BAF1C039B6D00E6C012 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C83BAE1C039B6D00E6C012 /* JavaScriptCore.framework */; }; + B6C83BB01C039B7600E6C012 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C83BAE1C039B6D00E6C012 /* JavaScriptCore.framework */; }; + B6C83BB21C039BE700E6C012 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C83BB11C039BE700E6C012 /* libicucore.tbd */; }; + B6C83BB31C039BF800E6C012 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C83BB11C039BE700E6C012 /* libicucore.tbd */; }; B6CFCCD91332F152001F17AF /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CFCCD81332F152001F17AF /* AVFoundation.framework */; }; B6D4B281183CDFBB008251EB /* EJBindingGeolocation.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D4B280183CDFBB008251EB /* EJBindingGeolocation.m */; }; B6D4B283183CF43A008251EB /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D4B282183CF43A008251EB /* CoreLocation.framework */; }; @@ -102,9 +104,10 @@ B6F1154D167A7D17001F1324 /* EJBindingCanvasContextWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F1154C167A7D17001F1324 /* EJBindingCanvasContextWebGL.m */; }; B6F11550167A7DA1001F1324 /* EJCanvasContextWebGL.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F1154F167A7DA1001F1324 /* EJCanvasContextWebGL.m */; }; B6F11556167BD59D001F1324 /* EJBindingWebGLObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F11555167BD59B001F1324 /* EJBindingWebGLObjects.m */; }; + B6F455CA1C00D52C002A8EAC /* EJConvertTypedArray.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F455C91C00D52C002A8EAC /* EJConvertTypedArray.m */; }; + B6F455CB1C00D52C002A8EAC /* EJConvertTypedArray.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F455C91C00D52C002A8EAC /* EJConvertTypedArray.m */; }; B6F463A41636C3FB00FC89C1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */; }; B6F629D116F353C800F16BAC /* EJBindingCanvasStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F629D016F353C700F16BAC /* EJBindingCanvasStyle.m */; }; - B6F714801BCF116E0082A90F /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F7147F1BCF116E0082A90F /* JavaScriptCore.framework */; }; B6F714841BCF126A0082A90F /* App in Resources */ = {isa = PBXBuildFile; fileRef = B68C5AEF132E6CD60015092E /* App */; }; B6F714891BCF126A0082A90F /* LaunchScreen-Logo.png in Resources */ = {isa = PBXBuildFile; fileRef = B637065F1A27C15200F42B90 /* LaunchScreen-Logo.png */; }; B6F7148B1BCF126A0082A90F /* Ejecta.js in Resources */ = {isa = PBXBuildFile; fileRef = B64CE63F166682700087CF94 /* Ejecta.js */; }; @@ -173,14 +176,12 @@ B6F714D51BCF126A0082A90F /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6E314E11BC7D08A00D024C3 /* AVKit.framework */; }; B6F714D61BCF126A0082A90F /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33BE9DE31868183900E0D16E /* MobileCoreServices.framework */; }; B6F714D71BCF126A0082A90F /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D4B282183CF43A008251EB /* CoreLocation.framework */; }; - B6F714D81BCF126A0082A90F /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CDA15F18295A5F00190074 /* libc++.dylib */; }; B6F714D91BCF126A0082A90F /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6D6E09916F7D03C009AB75F /* StoreKit.framework */; }; B6F714DA1BCF126A0082A90F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256916E8DF33007E6034 /* Security.framework */; }; B6F714DB1BCF126A0082A90F /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63D256716E8DF23007E6034 /* CFNetwork.framework */; }; B6F714DD1BCF126A0082A90F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */; }; B6F714DE1BCF126A0082A90F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7B76751619DB9700691910 /* CoreText.framework */; }; B6F714DF1BCF126A0082A90F /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6074FF215F8E41600D987F9 /* GameKit.framework */; }; - B6F714E01BCF126A0082A90F /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B66F1E771476B3AC0090D208 /* libicucore.dylib */; }; B6F714E11BCF126A0082A90F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; B6F714E21BCF126A0082A90F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; B6F714E31BCF126A0082A90F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; @@ -189,7 +190,6 @@ B6F714E61BCF126A0082A90F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AD09132EB51000D7C3EA /* OpenGLES.framework */; }; B6F714E71BCF126A0082A90F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B607AD0F132EB52400D7C3EA /* QuartzCore.framework */; }; B6F714E81BCF126A0082A90F /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6CFCCD81332F152001F17AF /* AVFoundation.framework */; }; - B6F714F01BCF130C0082A90F /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6F714EF1BCF130C0082A90F /* JavaScriptCore.framework */; }; B6F9AFC0169F81D400ABD91A /* EJBindingWindowEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F9AFBF169F81D400ABD91A /* EJBindingWindowEvents.m */; }; B870BDE916F2E11A00827F01 /* EJBindingWebGLExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = B870BDE816F2E11A00827F01 /* EJBindingWebGLExtensions.m */; }; /* End PBXBuildFile section */ @@ -289,8 +289,6 @@ B668475B182419A500ABCDF9 /* EJCanvasContextWebGLScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJCanvasContextWebGLScreen.m; path = WebGL/EJCanvasContextWebGLScreen.m; sourceTree = ""; }; B668FCEC1821C08500D4F629 /* EJFontCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJFontCache.h; sourceTree = ""; }; B668FCED1821C08500D4F629 /* EJFontCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJFontCache.m; sourceTree = ""; }; - B66F1E771476B3AC0090D208 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; - B66F1E7F1476B6A40090D208 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/libstdc++.dylib"; sourceTree = SDKROOT; }; B68036FF1682A58200833604 /* EJConvertWebGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EJConvertWebGL.h; path = WebGL/EJConvertWebGL.h; sourceTree = ""; }; B68037001682A58200833604 /* EJConvertWebGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJConvertWebGL.m; path = WebGL/EJConvertWebGL.m; sourceTree = ""; }; B68C5AEF132E6CD60015092E /* App */ = {isa = PBXFileReference; lastKnownFileType = folder; path = App; sourceTree = ""; }; @@ -311,7 +309,8 @@ B6B41F9D1BF25A7F0075C00F /* EJBindingGamepadButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJBindingGamepadButton.m; path = Gamepad/EJBindingGamepadButton.m; sourceTree = ""; }; B6B41F9E1BF25A7F0075C00F /* EJBindingGamepadProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EJBindingGamepadProvider.h; path = Gamepad/EJBindingGamepadProvider.h; sourceTree = ""; }; B6B41F9F1BF25A7F0075C00F /* EJBindingGamepadProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJBindingGamepadProvider.m; path = Gamepad/EJBindingGamepadProvider.m; sourceTree = ""; }; - B6CDA15F18295A5F00190074 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; }; + B6C83BAE1C039B6D00E6C012 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + B6C83BB11C039BE700E6C012 /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; B6CFCCD81332F152001F17AF /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; B6D4B27F183CDFBB008251EB /* EJBindingGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingGeolocation.h; sourceTree = ""; }; B6D4B280183CDFBB008251EB /* EJBindingGeolocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingGeolocation.m; sourceTree = ""; }; @@ -362,13 +361,13 @@ B6F1154F167A7DA1001F1324 /* EJCanvasContextWebGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJCanvasContextWebGL.m; path = WebGL/EJCanvasContextWebGL.m; sourceTree = ""; }; B6F11554167BD599001F1324 /* EJBindingWebGLObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EJBindingWebGLObjects.h; path = WebGL/EJBindingWebGLObjects.h; sourceTree = ""; }; B6F11555167BD59B001F1324 /* EJBindingWebGLObjects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EJBindingWebGLObjects.m; path = WebGL/EJBindingWebGLObjects.m; sourceTree = ""; }; + B6F455C81C00D52C002A8EAC /* EJConvertTypedArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJConvertTypedArray.h; sourceTree = ""; }; + B6F455C91C00D52C002A8EAC /* EJConvertTypedArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJConvertTypedArray.m; sourceTree = ""; }; B6F463A31636C3FA00FC89C1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; B6F629CF16F353C600F16BAC /* EJBindingCanvasStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingCanvasStyle.h; sourceTree = ""; }; B6F629D016F353C700F16BAC /* EJBindingCanvasStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingCanvasStyle.m; sourceTree = ""; }; - B6F7147F1BCF116E0082A90F /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Source/lib/ios/JavaScriptCore.framework; sourceTree = ""; }; B6F714ED1BCF126A0082A90F /* Ejecta-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Ejecta-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; }; B6F714EE1BCF126B0082A90F /* Info-TV.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-TV.plist"; path = "/Users/dominic/xcode/Ejecta/Resources/Info-TV.plist"; sourceTree = ""; }; - B6F714EF1BCF130C0082A90F /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Source/lib/tvos/JavaScriptCore.framework; sourceTree = ""; }; B6F9AFBE169F81D400ABD91A /* EJBindingWindowEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EJBindingWindowEvents.h; sourceTree = ""; }; B6F9AFBF169F81D400ABD91A /* EJBindingWindowEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EJBindingWindowEvents.m; sourceTree = ""; }; B870BDE716F2E10400827F01 /* EJBindingWebGLExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EJBindingWebGLExtensions.h; path = WebGL/EJBindingWebGLExtensions.h; sourceTree = ""; }; @@ -380,12 +379,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B6F714801BCF116E0082A90F /* JavaScriptCore.framework in Frameworks */, + B6C83BB21C039BE700E6C012 /* libicucore.tbd in Frameworks */, + B6C83BAF1C039B6D00E6C012 /* JavaScriptCore.framework in Frameworks */, B6E314E81BC7E51200D024C3 /* CoreMedia.framework in Frameworks */, B6E314E61BC7D1D000D024C3 /* AVKit.framework in Frameworks */, 33BE9DE41868183900E0D16E /* MobileCoreServices.framework in Frameworks */, B6D4B283183CF43A008251EB /* CoreLocation.framework in Frameworks */, - B6CDA16018295A5F00190074 /* libc++.dylib in Frameworks */, B6D6E09A16F7D03F009AB75F /* StoreKit.framework in Frameworks */, B63D256A16E8DF33007E6034 /* Security.framework in Frameworks */, B63D256816E8DF23007E6034 /* CFNetwork.framework in Frameworks */, @@ -393,7 +392,6 @@ B6F463A41636C3FB00FC89C1 /* SystemConfiguration.framework in Frameworks */, 5B7B76761619DB9700691910 /* CoreText.framework in Frameworks */, B6074FF315F8E41700D987F9 /* GameKit.framework in Frameworks */, - B66F1E811476B6B90090D208 /* libicucore.dylib in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, @@ -410,25 +408,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B6F714F01BCF130C0082A90F /* JavaScriptCore.framework in Frameworks */, B6F714D41BCF126A0082A90F /* CoreMedia.framework in Frameworks */, B6F714D51BCF126A0082A90F /* AVKit.framework in Frameworks */, B6F714D61BCF126A0082A90F /* MobileCoreServices.framework in Frameworks */, B6F714D71BCF126A0082A90F /* CoreLocation.framework in Frameworks */, - B6F714D81BCF126A0082A90F /* libc++.dylib in Frameworks */, B6F714D91BCF126A0082A90F /* StoreKit.framework in Frameworks */, B6F714DA1BCF126A0082A90F /* Security.framework in Frameworks */, B6F714DB1BCF126A0082A90F /* CFNetwork.framework in Frameworks */, B6F714DD1BCF126A0082A90F /* SystemConfiguration.framework in Frameworks */, B6F714DE1BCF126A0082A90F /* CoreText.framework in Frameworks */, B6F714DF1BCF126A0082A90F /* GameKit.framework in Frameworks */, - B6F714E01BCF126A0082A90F /* libicucore.dylib in Frameworks */, B6F714E11BCF126A0082A90F /* Foundation.framework in Frameworks */, + B6C83BB31C039BF800E6C012 /* libicucore.tbd in Frameworks */, B6F714E21BCF126A0082A90F /* UIKit.framework in Frameworks */, B6F714E31BCF126A0082A90F /* CoreGraphics.framework in Frameworks */, B6F714E41BCF126A0082A90F /* OpenAL.framework in Frameworks */, B6F714E51BCF126A0082A90F /* AudioToolbox.framework in Frameworks */, B6F714E61BCF126A0082A90F /* OpenGLES.framework in Frameworks */, + B6C83BB01C039B7600E6C012 /* JavaScriptCore.framework in Frameworks */, B6F714E71BCF126A0082A90F /* QuartzCore.framework in Frameworks */, B6F714E81BCF126A0082A90F /* AVFoundation.framework in Frameworks */, ); @@ -461,15 +458,12 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - B6F714EF1BCF130C0082A90F /* JavaScriptCore.framework */, - B6F7147F1BCF116E0082A90F /* JavaScriptCore.framework */, + B6C83BB11C039BE700E6C012 /* libicucore.tbd */, + B6C83BAE1C039B6D00E6C012 /* JavaScriptCore.framework */, B6E314E71BC7E51200D024C3 /* CoreMedia.framework */, B6E314E11BC7D08A00D024C3 /* AVKit.framework */, 33BE9DE31868183900E0D16E /* MobileCoreServices.framework */, B6D4B282183CF43A008251EB /* CoreLocation.framework */, - B6CDA15F18295A5F00190074 /* libc++.dylib */, - B66F1E7F1476B6A40090D208 /* libstdc++.dylib */, - B66F1E771476B3AC0090D208 /* libicucore.dylib */, B6D6E09916F7D03C009AB75F /* StoreKit.framework */, B63D256916E8DF33007E6034 /* Security.framework */, B63D256716E8DF23007E6034 /* CFNetwork.framework */, @@ -537,6 +531,8 @@ B6E314E41BC7D1BF00D024C3 /* EJBindingVideo.m */, B64CE63D166682700087CF94 /* EJConvert.h */, B64CE63E166682700087CF94 /* EJConvert.m */, + B6F455C81C00D52C002A8EAC /* EJConvertTypedArray.h */, + B6F455C91C00D52C002A8EAC /* EJConvertTypedArray.m */, B64CE640166682700087CF94 /* EJTimer.h */, B64CE641166682700087CF94 /* EJTimer.m */, B64CE63F166682700087CF94 /* Ejecta.js */, @@ -840,6 +836,7 @@ files = ( B630048916C1A2390036D8D4 /* EJBindingTextMetrics.m in Sources */, B64C87AC16B81BAA0097CD5B /* EJGLProgram2D.m in Sources */, + B6F455CA1C00D52C002A8EAC /* EJConvertTypedArray.m in Sources */, B64C87AE16B81BAA0097CD5B /* EJGLProgram2DRadialGradient.m in Sources */, B64CE662166682700087CF94 /* EJAppViewController.m in Sources */, B64CE663166682700087CF94 /* EJAudioSourceAVAudio.m in Sources */, @@ -919,6 +916,7 @@ B6F714941BCF126A0082A90F /* EJAppViewController.m in Sources */, B6F714951BCF126A0082A90F /* EJAudioSourceAVAudio.m in Sources */, B6F714961BCF126A0082A90F /* EJAudioSourceOpenAL.m in Sources */, + B6F455CB1C00D52C002A8EAC /* EJConvertTypedArray.m in Sources */, B6F714971BCF126A0082A90F /* EJBindingAudio.m in Sources */, B6F714981BCF126A0082A90F /* EJOpenALBuffer.m in Sources */, B6F714991BCF126A0082A90F /* EJSharedOpenALManager.m in Sources */, @@ -993,10 +991,6 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Source/lib/ios", - ); GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1027,10 +1021,6 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Source/lib/ios", - ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; @@ -1058,10 +1048,6 @@ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Source/lib/tvos", - ); GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1093,10 +1079,6 @@ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Source/lib/tvos", - ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/Prefix.pch; INFOPLIST_FILE = "$(SRCROOT)/Resources/Info-TV.plist"; diff --git a/README.md b/README.md index a70dd33f..1307f6cd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +# About The typed-array-clusterfuck Branch + +This branch of Ejecta uses the JavaScriptCore library provided by the system. This mainly means two things: The resulting binary will be much smaller and Typed Arrays are extremely slow. + +On 32bit systems reading/writing large Typed Arrays will be pretty much unusably slow. On 64bit systems it's highly optimized to take about 8ms for reading for 1MB of data and about 20ms for writing. This _may_ be ok for simple WebGL stuff or if you don't use g`et/setImageData()` on the Canvas2D context much. + +This branch of Ejecta _may_ be AppStore compatible for tvOS. I'm still waiting on the review, but at least the binary upload didn't fail like with the main branch. + + # Ejecta Ejecta is a fast, open source JavaScript, Canvas & Audio implementation for iOS. Think of it as a Browser that can only display a Canvas element. diff --git a/Source/Ejecta/EJCanvas/2D/EJBindingImageData.m b/Source/Ejecta/EJCanvas/2D/EJBindingImageData.m index 5a184464..9fd7fb55 100644 --- a/Source/Ejecta/EJCanvas/2D/EJBindingImageData.m +++ b/Source/Ejecta/EJCanvas/2D/EJBindingImageData.m @@ -1,6 +1,6 @@ #import "EJBindingImageData.h" #import "EJJavaScriptView.h" -#import +#import "EJConvertTypedArray.h" @implementation EJBindingImageData @synthesize imageData; @@ -28,7 +28,7 @@ - (EJImageData *)imageData { int byteLength = imageData.width * imageData.height * 4; [EJTexture - premultiplyPixels:JSObjectGetTypedArrayDataPtr(scriptView.jsGlobalContext, dataArray, NULL) + premultiplyPixels:JSObjectGetTypedArrayData(scriptView.jsGlobalContext, dataArray).bytes to:imageData.pixels.mutableBytes byteLength:byteLength format:GL_RGBA]; } @@ -48,10 +48,13 @@ - (EJTexture *)texture { dataArray = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeUint8ClampedArray, byteLength); JSValueProtect(ctx, dataArray); + NSMutableData *unPremultiplied = [NSMutableData dataWithLength:byteLength]; [EJTexture unPremultiplyPixels:imageData.pixels.bytes - to:JSObjectGetTypedArrayDataPtr(ctx, dataArray, NULL) + to:unPremultiplied.mutableBytes byteLength:byteLength format:GL_RGBA]; + + JSObjectSetTypedArrayData(ctx, dataArray, unPremultiplied); } return dataArray; } diff --git a/Source/Ejecta/EJCanvas/WebGL/EJBindingCanvasContextWebGL.m b/Source/Ejecta/EJCanvas/WebGL/EJBindingCanvasContextWebGL.m index 94591709..51008ad6 100644 --- a/Source/Ejecta/EJCanvas/WebGL/EJBindingCanvasContextWebGL.m +++ b/Source/Ejecta/EJCanvas/WebGL/EJBindingCanvasContextWebGL.m @@ -6,7 +6,7 @@ #import "EJConvertWebGL.h" #import "EJJavaScriptView.h" -#import +#import "EJConvertTypedArray.h" @implementation EJBindingCanvasContextWebGL @@ -365,10 +365,10 @@ - (void)deleteVertexArray:(GLuint)vertexArray { glBufferData(target, psize, NULL, usage); } else if( JSValueIsObject(ctx, argv[1]) ) { - size_t size; - GLvoid *buffer = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[1], &size); - if( buffer ) { - glBufferData(target, size, buffer, usage); + NSData *data = JSObjectGetTypedArrayData(ctx, (JSObjectRef)argv[1]); + if( data ) { + const GLvoid *buffer = data.bytes; + glBufferData(target, data.length, buffer, usage); } } @@ -383,10 +383,10 @@ - (void)deleteVertexArray:(GLuint)vertexArray { GLenum target = JSValueToNumberFast(ctx, argv[0]); GLintptr offset = JSValueToNumberFast(ctx, argv[1]); - size_t size; - GLvoid *buffer = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[2], &size); - if( buffer ) { - glBufferSubData(target, offset, size, buffer); + NSData *data = JSObjectGetTypedArrayData(ctx, (JSObjectRef)argv[2]); + if( data ) { + const GLvoid *buffer = data.bytes; + glBufferSubData(target, offset, data.length, buffer); } return NULL; } @@ -726,6 +726,7 @@ - (void)deleteVertexArray:(GLuint)vertexArray { int intbuffer[4]; float floatvalue; JSValueRef arrayArgs[4]; + NSMutableData *data; switch( pname ) { // Float32Array (with 0 elements) @@ -737,28 +738,40 @@ - (void)deleteVertexArray:(GLuint)vertexArray { case GL_ALIASED_LINE_WIDTH_RANGE: case GL_ALIASED_POINT_SIZE_RANGE: case GL_DEPTH_RANGE: + data = [[NSMutableData alloc] initWithLength:2 * sizeof(GLfloat)]; + glGetFloatv(pname, data.mutableBytes); ret = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeFloat32Array, 2); - glGetFloatv(pname, JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)ret, NULL)); + JSObjectSetTypedArrayData(ctx, (JSObjectRef)ret, data); + [data release]; break; // Float32Array (with 4 values) case GL_BLEND_COLOR: case GL_COLOR_CLEAR_VALUE: + data = [[NSMutableData alloc] initWithLength:4 * sizeof(GLfloat)]; + glGetFloatv(pname, data.mutableBytes); ret = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeFloat32Array, 4); - glGetFloatv(pname, JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)ret, NULL)); + JSObjectSetTypedArrayData(ctx, (JSObjectRef)ret, data); + [data release]; break; // Int32Array (with 2 values) case GL_MAX_VIEWPORT_DIMS: + data = [[NSMutableData alloc] initWithLength:2 * sizeof(GLint)]; + glGetIntegerv(pname, data.mutableBytes); ret = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeInt32Array, 2); - glGetIntegerv(pname, JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)ret, NULL)); + JSObjectSetTypedArrayData(ctx, (JSObjectRef)ret, data); + [data release]; break; // Int32Array (with 4 values) case GL_SCISSOR_BOX: case GL_VIEWPORT: + data = [[NSMutableData alloc] initWithLength:4 * sizeof(GLint)]; + glGetIntegerv(pname, data.mutableBytes); ret = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeInt32Array, 4); - glGetIntegerv(pname, JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)ret, NULL)); + JSObjectSetTypedArrayData(ctx, (JSObjectRef)ret, data); + [data release]; break; // boolean[] (with 4 values) @@ -1147,15 +1160,21 @@ - (void)deleteVertexArray:(GLuint)vertexArray { // Float32Array if( type == GL_FLOAT ) { array = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeFloat32Array, size); - void *buffer = JSObjectGetTypedArrayDataPtr(ctx, array, NULL); - glGetUniformfv(program, uniform, buffer); + NSMutableData *data = [[NSMutableData alloc] initWithLength:size * sizeof(GLfloat)]; + glGetUniformfv(program, uniform, data.mutableBytes); + + JSObjectSetTypedArrayData(ctx, array, data); + [data release]; } // Int32Array else if( type == GL_INT ) { array = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeInt32Array, size); - void *buffer = JSObjectGetTypedArrayDataPtr(ctx, array, NULL); - glGetUniformiv(program, uniform, buffer); + NSMutableData *data = [[NSMutableData alloc] initWithLength:size * sizeof(GLint)]; + glGetUniformiv(program, uniform, data.mutableBytes); + + JSObjectSetTypedArrayData(ctx, array, data); + [data release]; } // boolean[] @@ -1202,8 +1221,10 @@ - (void)deleteVertexArray:(GLuint)vertexArray { } else if( pname == GL_CURRENT_VERTEX_ATTRIB ) { JSObjectRef array = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeFloat32Array, 4); - GLint *values = JSObjectGetTypedArrayDataPtr(ctx, array, NULL); - glGetVertexAttribiv(index, pname, values); + NSMutableData *data = [[NSMutableData alloc] initWithLength:4 * sizeof(GLfloat)]; + glGetVertexAttribiv(index, pname, data.mutableBytes); + JSObjectSetTypedArrayData(ctx, array, data); + [data release]; return array; } else { @@ -1302,13 +1323,11 @@ - (void)deleteVertexArray:(GLuint)vertexArray { scriptView.currentRenderingContext = renderingContext; - size_t size; - void *pixels = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[6], &size); - GLuint bytesPerPixel = EJGetBytesPerPixel(type, format); - if( bytesPerPixel && size >= width * height * bytesPerPixel ) { - glReadPixels(x, y, width, height, format, type, pixels); - } + NSMutableData *data = [[NSMutableData alloc] initWithLength:width*height*bytesPerPixel]; + glReadPixels(x, y, width, height, format, type, data.mutableBytes); + JSObjectSetTypedArrayData(ctx, (JSObjectRef)argv[6], data); + [data release]; return NULL; } @@ -1463,10 +1482,10 @@ - (void)deleteVertexArray:(GLuint)vertexArray { if( border == 0 && EJ_ARRAY_MATCHES_TYPE(arrayType, type) ) { int bytesPerPixel = EJGetBytesPerPixel(type, format); - size_t byteLength; - void *pixels = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[8], &byteLength); + NSMutableData *data = JSObjectGetTypedArrayData(ctx, (JSObjectRef)argv[8]); + void *pixels = data.mutableBytes; - if( bytesPerPixel && byteLength >= width * height * bytesPerPixel ) { + if( bytesPerPixel && data.length >= width * height * bytesPerPixel ) { if( unpackFlipY ) { [EJTexture flipPixelsY:pixels bytesPerRow:(width * bytesPerPixel) rows:height]; } @@ -1595,10 +1614,10 @@ - (void)deleteVertexArray:(GLuint)vertexArray { if( EJ_ARRAY_MATCHES_TYPE(arrayType, type) ) { int bytesPerPixel = EJGetBytesPerPixel(type, format); - size_t byteLength; - void *pixels = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[8], &byteLength); + NSMutableData *data = JSObjectGetTypedArrayData(ctx, (JSObjectRef)argv[8]); + void *pixels = data.mutableBytes; - if( bytesPerPixel && byteLength >= width * height * bytesPerPixel ) { + if( bytesPerPixel && data.length >= width * height * bytesPerPixel ) { if( unpackFlipY ) { [EJTexture flipPixelsY:pixels bytesPerRow:(width * bytesPerPixel) rows:height]; } diff --git a/Source/Ejecta/EJCanvas/WebGL/EJConvertWebGL.m b/Source/Ejecta/EJCanvas/WebGL/EJConvertWebGL.m index 22405872..d3dec9db 100644 --- a/Source/Ejecta/EJCanvas/WebGL/EJConvertWebGL.m +++ b/Source/Ejecta/EJCanvas/WebGL/EJConvertWebGL.m @@ -1,6 +1,6 @@ #import "EJConvertWebGL.h" #import "EJConvert.h" -#import +#import "EJConvertTypedArray.h" // FIXME: use C++ with a template? #define CREATE_JS_VALUE_TO_ARRAY_FUNC(NAME, TYPE, ARRAY_TYPE) \ @@ -10,8 +10,9 @@ } \ JSObjectRef jsObject = (JSObjectRef)value; \ if( JSObjectGetTypedArrayType(ctx, jsObject) == ARRAY_TYPE ) { \ - size_t byteLength; \ - TYPE *arrayValue = JSObjectGetTypedArrayDataPtr(ctx, jsObject, &byteLength); \ + NSMutableData *data = JSObjectGetTypedArrayData(ctx, jsObject); \ + size_t byteLength = data.length; \ + TYPE *arrayValue = data.mutableBytes; \ GLsizei count = (GLsizei)(byteLength/sizeof(TYPE)); \ if( arrayValue && count && (count % elementSize) == 0 ) { \ *numElements = count / elementSize; \ diff --git a/Source/Ejecta/EJConvert.h b/Source/Ejecta/EJConvert.h index 8b31fe30..c961e503 100644 --- a/Source/Ejecta/EJConvert.h +++ b/Source/Ejecta/EJConvert.h @@ -19,8 +19,9 @@ static inline void *JSValueGetPrivate(JSValueRef v) { // undefined) will crash the app. So we check for these first. #if __LP64__ - #define JSValueTagMask (0xffff000000000000ll | 0x2ll) - return !((int64_t)v & JSValueTagMask) ? JSObjectGetPrivate((JSObjectRef)v) : NULL; + return !((int64_t)v & 0xffff000000000002ll) + ? JSObjectGetPrivate((JSObjectRef)v) + : NULL; #else return JSObjectGetPrivate((JSObjectRef)v); #endif diff --git a/Source/Ejecta/EJConvert.m b/Source/Ejecta/EJConvert.m index 8dd54c1c..467f65d6 100644 --- a/Source/Ejecta/EJConvert.m +++ b/Source/Ejecta/EJConvert.m @@ -24,9 +24,11 @@ JSValueRef NSStringToJSValue( JSContextRef ctx, NSString *string ) { // This functions comes in a 64bit and 32bit flavor, since the NaN-Boxing // in JSC works a bit differently on each platforms. For an explanation // of the taggging refer to JSC/runtime/JSCJSValue.h +// The 32bit version just calls the normal JSValueToNumber() function +// and is thus a lot slower. -#if __LP64__ // arm64 version - double JSValueToNumberFast(JSContextRef ctx, JSValueRef v) { +double JSValueToNumberFast(JSContextRef ctx, JSValueRef v) { + #if __LP64__ // arm64 version union { int64_t asInt64; double asDouble; @@ -50,22 +52,10 @@ JSValueRef NSStringToJSValue( JSContextRef ctx, NSString *string ) { else { return 0; // false, undefined, null, object } - } -#else // armv7 version - double JSValueToNumberFast( JSContextRef ctx, JSValueRef v ) { - struct { - unsigned char cppClassData[4]; - union { - double asDouble; - struct { int32_t asInt; int32_t tag; } asBits; - } payload; - } *decoded = (void *)v; - - return decoded->payload.asBits.tag < 0xfffffff9 - ? decoded->payload.asDouble - : decoded->payload.asBits.asInt; - } -#endif + #else // armv7 version + return JSValueToNumber(ctx, v, NULL); + #endif +} void JSValueUnprotectSafe( JSContextRef ctx, JSValueRef v ) { if( ctx && v ) { diff --git a/Source/Ejecta/EJConvertTypedArray.h b/Source/Ejecta/EJConvertTypedArray.h new file mode 100644 index 00000000..1b9081c4 --- /dev/null +++ b/Source/Ejecta/EJConvertTypedArray.h @@ -0,0 +1,75 @@ +#import +#import + +/*! +@enum JSType +@abstract A constant identifying the Typed Array type of a JSValue. +@constant kJSTypedArrayTypeNone Not a Typed Array. +@constant kJSTypedArrayTypeInt8Array Int8Array +@constant kJSTypedArrayTypeInt16Array Int16Array +@constant kJSTypedArrayTypeInt32Array Int32Array +@constant kJSTypedArrayTypeUint8Array Int8Array +@constant kJSTypedArrayTypeUint8ClampedArray Int8ClampedArray +@constant kJSTypedArrayTypeUint16Array Uint16Array +@constant kJSTypedArrayTypeUint32Array Uint32Array +@constant kJSTypedArrayTypeFloat32Array Float32Array +@constant kJSTypedArrayTypeFloat64Array Float64Array +@constant kJSTypedArrayTypeArrayBuffer ArrayBuffer +*/ +typedef enum { + kJSTypedArrayTypeNone = 0, + kJSTypedArrayTypeInt8Array = 1, + kJSTypedArrayTypeInt16Array = 2, + kJSTypedArrayTypeInt32Array = 3, + kJSTypedArrayTypeUint8Array = 4, + kJSTypedArrayTypeUint8ClampedArray = 5, + kJSTypedArrayTypeUint16Array = 6, + kJSTypedArrayTypeUint32Array = 7, + kJSTypedArrayTypeFloat32Array = 8, + kJSTypedArrayTypeFloat64Array = 9, + kJSTypedArrayTypeArrayBuffer = 10 +} JSTypedArrayType; + +/*! +@function +@abstract Setup the JSContext for use of the Typed Array functions. +@param ctx The execution context to use +*/ +void JSContextPrepareTypedArrayAPI(JSContextRef ctx); + +/*! +@function +@abstract Returns a JavaScript value's Typed Array type +@param ctx The execution context to use. +@param value The JSObject whose Typed Array type you want to obtain. +@result A value of type JSTypedArrayType that identifies value's Typed Array type +*/ +JSTypedArrayType JSObjectGetTypedArrayType(JSContextRef ctx, JSObjectRef object); + +/*! +@function +@abstract Creates an empty JavaScript Typed Array with the given number of elements +@param ctx The execution context to use. +@param arrayType A value of type JSTypedArrayType identifying the type of array you want to create +@param numElements The number of elements for the array. +@result A JSObjectRef that is a Typed Array or NULL if there was an error +*/ +JSObjectRef JSObjectMakeTypedArray(JSContextRef ctx, JSTypedArrayType arrayType, size_t numElements); + +/*! +@function +@abstract Returns a copy of the Typed Array's data +@param ctx The execution context to use. +@param value The JSObject whose Typed Array data you want to obtain. +@result A copy of the Typed Array's data or NULL if the JSObject is not a Typed Array +*/ +NSMutableData *JSObjectGetTypedArrayData(JSContextRef ctx, JSObjectRef object); + +/*! +@function +@abstract Replaces a Typed Array's data +@param ctx The execution context to use. +@param value The JSObject whose Typed Array data you want to replace +*/ +void JSObjectSetTypedArrayData(JSContextRef ctx, JSObjectRef object, NSData *data); + diff --git a/Source/Ejecta/EJConvertTypedArray.m b/Source/Ejecta/EJConvertTypedArray.m new file mode 100644 index 00000000..cb7f9b9d --- /dev/null +++ b/Source/Ejecta/EJConvertTypedArray.m @@ -0,0 +1,395 @@ +#import "EJConvertTypedArray.h" +#import "EJConvert.h" + +#if defined __ARM_NEON__ +#include +#endif + +// These functions deal with getting and setting a JavaScript Typed Array's data. +// The process in which this is done is extremely backwards, prohibitively +// memory inefficient and painfully slow. + +// JavaScriptCore still doesn't have an API to deal with Typed Arrays directly +// and nobody seems to care. See this WebKit bug for the details: +// https://bugs.webkit.org/show_bug.cgi?id=120112 + +// The naive method of getting the array's data would be to read the "length" +// property and call JSObjectGetPropertyAtIndex() for each element. This function +// returns a JSValue and since the array's data is just a raw memory pointer +// internally, this JSValue has be constructed first by JSC. Afterwards this +// JSValue has to be converted back into an int and stored in a native buffer. +// This ordeal takes about 1200ms per megabyte on an iPhone5S. + +// So, instead of extracting each byte on its own, we create Int32 view on the +// Array, so that we can extract 4 bytes at a time. Now, the fastest method to +// get to the values is to call a function with .apply(null, theInt32Array). +// This causes the typed array to be converted into plain JSValues - we can then +// iterate all function arguments and convert each JSValue into a Int32. + +// There's one big caveat, though: a function can only be called with 64k +// arguments at once, or it will blow the stack. So we have to divide the Int32 +// Array into smaller subarrays and convert the data in chunks. + +// Setting the Array's data works about the same. We can create a plain JS +// Array in reasonable time by treating the data as 32bit ints. This plain +// Array can then be used to call .set() on an Int32 View of the Typed Array. + +// To be able to quickly determine the type of a typed array, we install an +// enum with the type id ("__ejTypedArrayType") onto each array constructor's +// prototype. + +// This all brings the time down to about 7ms per megabyte for reading and about +// 20ms per megabyte for writing. Even though this 7ms/MB number may not sound +// all too bad, keep in mind that it's still 7ms slower than what we would have +// with a better API. + + + + + +// Array Types to constructor names. We need to obtain the Constructors from +// the JSGlobalObject when creating Typed Arrays and when attaching our methods +// to them. + +const static char *ConstructorNames[] = { + [kJSTypedArrayTypeNone] = NULL, + [kJSTypedArrayTypeInt8Array] = "Int8Array", + [kJSTypedArrayTypeInt16Array] = "Int16Array", + [kJSTypedArrayTypeInt32Array] = "Int32Array", + [kJSTypedArrayTypeUint8Array] = "Uint8Array", + [kJSTypedArrayTypeUint8ClampedArray] = "Uint8ClampedArray", + [kJSTypedArrayTypeUint16Array] = "Uint16Array", + [kJSTypedArrayTypeUint32Array] = "Uint32Array", + [kJSTypedArrayTypeFloat32Array] = "Float32Array", + [kJSTypedArrayTypeFloat64Array] = "Float64Array", + [kJSTypedArrayTypeArrayBuffer] = "ArrayBuffer" +}; + + +// Data from Typed Arrays smaller than CopyInChunksThreshold will be extracted +// one byte at a time. + +const static int CopyInChunksThreshold = 32; + + +// For large arrays, copy the data in Chunks of 16k elements, so that we don't +// blow the stack. + +const static int CopyChunkSize = 0x4000; + + + +// Hobo version to get an Int32 from a JSValueRef. This is even faster than +// JSValueToNumberFast() because it blindly assumes the value is an Int32. +// A number stored as double will produce a bogus Int value. JSC stores all +// values that are outside of the Int32 range as double. + +// This function is only fast on 64bit systems. On 32bit systems we can't +// easily access the integer value. +// See JavaScriptCore/runtime/JSCJSValue.h for an explanation of the NaN- +// boxing used in JSC. + +// Use with extreme caution! + +static inline int32_t GetInt32(JSContextRef ctx, JSValueRef v) { + #if __LP64__ + return (int32_t)(0x00000000ffffffffll & (uint64_t)v); + #else + return JSValueToNumber(ctx, v, NULL); + #endif +} + + +// Hobo version to create an Int32 fast. Falls back to JSValueMakeNumber() +// on 32bit systems. + +static inline JSValueRef MakeInt32(JSContextRef ctx, int32_t number) { + #if __LP64__ + return (0xffff000000000000ll | (uint64_t)number); + #else + return JSValueMakeNumber(ctx, number); + #endif +} + + +// Shorthand to get a property by name + +static JSValueRef GetPropertyNamed(JSContextRef ctx, JSObjectRef object, const char *name) { + JSStringRef jsPropertyName = JSStringCreateWithUTF8CString(name); + JSValueRef value = JSObjectGetProperty(ctx, object, jsPropertyName, NULL); + JSStringRelease(jsPropertyName); + return value; +} + + +// Shorthand to get the Constructor for the given JSTypedArrayType + +static JSObjectRef GetConstructor(JSContextRef ctx, JSTypedArrayType type) { + if( type <= kJSTypedArrayTypeNone || type > kJSTypedArrayTypeArrayBuffer ) { + return NULL; + } + + const char *constructorName = ConstructorNames[type]; + JSObjectRef global = JSContextGetGlobalObject(ctx); + return (JSObjectRef)GetPropertyNamed(ctx, global, constructorName); +} + + +// Create a typed array view from another typed array or arraybuffer + +static JSObjectRef GetView(JSContextRef ctx, JSObjectRef object, JSTypedArrayType type, size_t count) { + JSTypedArrayType currentType = JSObjectGetTypedArrayType(ctx, object); + if( currentType == kJSTypedArrayTypeNone ) { + return NULL; + } + else if( currentType == type ) { + return object; + } + + JSValueRef args[3]; + if( currentType == kJSTypedArrayTypeArrayBuffer ) { + args[0] = object; + args[1] = MakeInt32(ctx, 0); + args[2] = MakeInt32(ctx, (int)count); + } + else { + args[0] = GetPropertyNamed(ctx, object, "buffer"); + args[1] = GetPropertyNamed(ctx, object, "byteOffset"); + args[2] = MakeInt32(ctx, (int)count); + } + JSObjectRef constructor = GetConstructor(ctx, type); + return JSObjectCallAsConstructor(ctx, constructor, 3, args, NULL); +} + + +// The callback called from JSObjectGetTypedArrayData with chunks of data. This writes +// into the state's data. + +typedef struct { + int32_t *currentDataPtr; + JSObjectRef jsGetCallback; + JSObjectRef jsGetCallbackApply; +} AppendDataCallbackState; + +static JSValueRef AppendDataCallback( + JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, + size_t argc, const JSValueRef argv[], JSValueRef* exception +) { + AppendDataCallbackState *state = JSObjectGetPrivate(thisObject); + int32_t *dst = state->currentDataPtr; + int remainderStart = 0; + + // On 64bit systems where ARM_NEON instructions are available we can use + // some SIMD intrinsics to extract the lower 32bit of each JSValueRef. + // Hopefully the JSValueRef encodes an Int32 so the lower 32bit corresponds + // to that Int32 exactly. + + #if __LP64__ && defined __ARM_NEON__ + // Iterate over the arguments in packs of 4. + // Load arguments as 2 lanes of 4 int32 values and store the first + // lane (the lower 32bit) into the dst buffer. + + int argPacks4 = (int)argc/4; + int32_t *src = (int32_t*)argv; + + for(int i = 0; i < argPacks4; i++ ) { + const int32x4x2_t lanes32 = vld2q_s32(src); + vst1q_s32(dst, lanes32.val[0]); + src += 8; + dst += 4; + } + remainderStart = argPacks4 * 4; + #endif + + for( int i = remainderStart; i < argc; i++ ) { + *(dst++) = GetInt32(ctx, argv[i]); + } + + state->currentDataPtr += argc; + return MakeInt32(ctx, (int)argc); +} + + +// To store the AppendDataCallbackState and access it _per context_, we create +// a plain JSObject where we can store a pointer to the state in the private +// data. + +static void FinalizeAppendDataCallbackState(JSObjectRef object) { + AppendDataCallbackState *state = JSObjectGetPrivate(object); + free(state); +} + +static JSObjectRef CreateAppendDataCallbackState(JSContextRef ctx) { + // Create a JS function that calls the AppendDataCallback + JSObjectRef jsAppendDataCallback = JSObjectMakeFunctionWithCallback(ctx, NULL, AppendDataCallback); + JSValueProtect(ctx, jsAppendDataCallback); + + // Allocate and create the state and attach the AppendDataCallback + // function and its .apply property. + AppendDataCallbackState *state = malloc(sizeof(AppendDataCallbackState)); + state->currentDataPtr = NULL; + state->jsGetCallback = jsAppendDataCallback; + state->jsGetCallbackApply = (JSObjectRef)GetPropertyNamed(ctx, jsAppendDataCallback, "apply"); + + + // Create the empty js object that holds the state in its Private data + JSClassDefinition internalStateClassDef = kJSClassDefinitionEmpty; + internalStateClassDef.finalize = FinalizeAppendDataCallbackState; + + JSClassRef internalStateClass = JSClassCreate(&internalStateClassDef); + JSObjectRef internalStateObject = JSObjectMake(ctx, internalStateClass, state); + JSClassRelease(internalStateClass); + return internalStateObject; +} + + + + +void JSContextPrepareTypedArrayAPI(JSContextRef ctx) { + // The __ejTypedArrayType property is read only, not enumerable + JSPropertyAttributes attributes = + kJSPropertyAttributeReadOnly | + kJSPropertyAttributeDontEnum | + kJSPropertyAttributeDontDelete; + + // Install the __ejTypedArrayType property on each Typed Array prototype + JSStringRef jsTypeName = JSStringCreateWithUTF8CString("__ejTypedArrayType"); + + for( int type = kJSTypedArrayTypeInt8Array; type <= kJSTypedArrayTypeArrayBuffer; type++ ) { + JSObjectRef jsConstructor = GetConstructor(ctx, type); + JSObjectRef jsPrototype = (JSObjectRef)GetPropertyNamed(ctx, jsConstructor, "prototype"); + + JSValueRef jsType = MakeInt32(ctx, type); + JSObjectSetProperty(ctx, jsPrototype, jsTypeName, jsType, attributes, NULL); + } + + JSStringRelease(jsTypeName); + + + // Create the state object for the AppendData Callback and attach it to the global + // object + JSObjectRef jsCallbackStateObject = CreateAppendDataCallbackState(ctx); + + JSStringRef jsInternalStateName = JSStringCreateWithUTF8CString("__ejTypedArrayState"); + JSObjectRef global = JSContextGetGlobalObject(ctx); + JSObjectSetProperty(ctx, global, jsInternalStateName, jsCallbackStateObject, attributes, NULL); + JSStringRelease(jsInternalStateName); +} + + +JSTypedArrayType JSObjectGetTypedArrayType(JSContextRef ctx, JSObjectRef object) { + JSValueRef jsType = GetPropertyNamed(ctx, object, "__ejTypedArrayType"); + return jsType ? GetInt32(ctx, jsType) : kJSTypedArrayTypeNone; +} + + +JSObjectRef JSObjectMakeTypedArray(JSContextRef ctx, JSTypedArrayType arrayType, size_t numElements) { + JSObjectRef jsConstructor = GetConstructor(ctx, arrayType); + if( !jsConstructor ) { + return NULL; + } + + JSValueRef jsNumElements = MakeInt32(ctx, (int)numElements); + return JSObjectCallAsConstructor(ctx, jsConstructor, 1, (JSValueRef[]){jsNumElements}, NULL); +} + + +NSMutableData *JSObjectGetTypedArrayData(JSContextRef ctx, JSObjectRef object) { + size_t length = GetInt32(ctx, GetPropertyNamed(ctx, object, "byteLength")); + if( !length ) { + return NULL; + } + + size_t int32Count = length / 4; + size_t uint8Count = length % 4; + + // For very small typed arrays it's faster to read all bytes individually + // instead of doing the callback dance. + if( length < CopyInChunksThreshold ) { + int32Count = 0; + uint8Count = length; + } + + NSMutableData *data = [NSMutableData dataWithLength:length]; + + // Read data in large chunks of 32bit values + if( int32Count ) { + JSObjectRef int32View = GetView(ctx, object, kJSTypedArrayTypeInt32Array, int32Count); + if( !int32View ) { + return NULL; + } + + JSObjectRef jsState = (JSObjectRef)GetPropertyNamed(ctx, JSContextGetGlobalObject(ctx), "__ejTypedArrayState"); + AppendDataCallbackState *state = JSObjectGetPrivate(jsState); + state->currentDataPtr = data.mutableBytes; + + + // If the whole data is smaller than the chunk size, we only have to call our callback once, otherwise + // we have to create subarrays and call the callback with these. + if( int32Count < CopyChunkSize ) { + JSValueRef getArgs[] = {jsState, int32View}; + JSObjectCallAsFunction(ctx, state->jsGetCallbackApply, state->jsGetCallback, 2, getArgs, NULL); + } + else { + JSObjectRef subarrayFunc = (JSObjectRef)GetPropertyNamed(ctx, int32View, "subarray"); + + for( int i = 0; i < int32Count; i+= CopyChunkSize) { + JSValueRef subarrayArgs[] = {MakeInt32(ctx, i), MakeInt32(ctx, i + CopyChunkSize)}; + JSObjectRef jsSubarray = (JSObjectRef)JSObjectCallAsFunction(ctx, subarrayFunc, int32View, 2, subarrayArgs, NULL); + + JSValueRef getArgs[] = {jsState, jsSubarray}; + JSObjectCallAsFunction(ctx, state->jsGetCallbackApply, state->jsGetCallback, 2, getArgs, NULL); + } + } + } + + // Read remaining bytes directly + if( uint8Count ) { + uint8_t *values8 = data.mutableBytes; + JSObjectRef uint8View = GetView(ctx, object, kJSTypedArrayTypeUint8Array, length); + for( int i = 0; i < uint8Count; i++ ) { + int index = (int)int32Count * 4 + i; + values8[index] = GetInt32(ctx, JSObjectGetPropertyAtIndex(ctx, uint8View, index, NULL)); + } + } + + return data; +} + + +void JSObjectSetTypedArrayData(JSContextRef ctx, JSObjectRef object, NSData *data) { + size_t int32Count = data.length / 4; + size_t uint8Count = data.length % 4; + + if( int32Count ) { + JSObjectRef int32View = GetView(ctx, object, kJSTypedArrayTypeInt32Array, int32Count); + if( !int32View ) { + return; + } + + // Construct the JSValues and create the plain JSArray + JSValueRef *jsValues = malloc(int32Count * sizeof(JSValueRef)); + + const int32_t *values32 = data.bytes; + for(int i = 0; i < int32Count; i++) { + jsValues[i] = MakeInt32(ctx, values32[i]); + } + JSObjectRef jsArray = JSObjectMakeArray(ctx, int32Count, jsValues, NULL); + + free(jsValues); + + // Call the .set() function on the Typed Array + JSObjectRef setFunction = (JSObjectRef)GetPropertyNamed(ctx, int32View, "set"); + JSObjectCallAsFunction(ctx, setFunction, int32View, 1, (JSValueRef[]){jsArray}, NULL); + } + + // Set remaining bytes directly + if( uint8Count ) { + const uint8_t *values8 = data.bytes; + JSObjectRef uint8View = GetView(ctx, object, kJSTypedArrayTypeUint8Array, data.length); + for( int i = 0; i < uint8Count; i++ ) { + int index = (int)int32Count * 4 + i; + JSObjectSetPropertyAtIndex(ctx, uint8View, index, MakeInt32(ctx, values8[index]), NULL); + } + } +} diff --git a/Source/Ejecta/EJJavaScriptView.m b/Source/Ejecta/EJJavaScriptView.m index 69c19a65..8ff3da78 100755 --- a/Source/Ejecta/EJJavaScriptView.m +++ b/Source/Ejecta/EJJavaScriptView.m @@ -2,6 +2,7 @@ #import "EJTimer.h" #import "EJBindingBase.h" #import "EJClassLoader.h" +#import "EJConvertTypedArray.h" #import @@ -94,7 +95,10 @@ -(void)setupWithAppFolder:(NSString*)folder { // Attach all native class constructors to 'Ejecta' classLoader = [[EJClassLoader alloc] initWithScriptView:self name:@"Ejecta"]; - + + // Prepare Typed Array clusterfuck + JSContextPrepareTypedArrayAPI(jsGlobalContext); + // Retain the caches here, so even if they're currently unused in JavaScript, // they will persist until the last scriptView is released @@ -456,7 +460,11 @@ -(void)pressesEnded:(NSSet*)presses withEvent:(UIPressesEvent *)event { #pragma mark Timers - (JSValueRef)createTimer:(JSContextRef)ctxp argc:(size_t)argc argv:(const JSValueRef [])argv repeat:(BOOL)repeat { - if( argc != 2 || !JSValueIsObject(ctxp, argv[0]) || !JSValueIsNumber(jsGlobalContext, argv[1]) ) { + if( + argc != 2 || + !JSValueIsObject(ctxp, argv[0]) || + !JSValueIsNumber(jsGlobalContext, argv[1]) + ) { return NULL; } diff --git a/Source/Ejecta/EJUtils/EJBindingHttpRequest.m b/Source/Ejecta/EJUtils/EJBindingHttpRequest.m index 1c6549a6..78cc9810 100644 --- a/Source/Ejecta/EJUtils/EJBindingHttpRequest.m +++ b/Source/Ejecta/EJUtils/EJBindingHttpRequest.m @@ -1,5 +1,5 @@ #import "EJBindingHttpRequest.h" -#import +#import "EJConvertTypedArray.h" #import "EJJavaScriptView.h" @implementation EJBindingHttpRequest @@ -270,9 +270,7 @@ - (void)URLSession:(NSURLSession * _Nonnull)session JSValueIsObject(ctx, argv[0]) && JSObjectGetTypedArrayType(ctx, (JSObjectRef)argv[0]) != kJSTypedArrayTypeNone ) { - size_t length = 0; - void *data = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[0], &length); - request.HTTPBody = [NSData dataWithBytes:data length:length]; + request.HTTPBody = JSObjectGetTypedArrayData(ctx, (JSObjectRef)argv[0]); } else { NSString *requestBody = JSValueToNSString( ctx, argv[0] ); @@ -317,7 +315,7 @@ - (void)URLSession:(NSURLSession * _Nonnull)session if( type == kEJHttpRequestTypeArrayBuffer ) { JSObjectRef array = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeArrayBuffer, responseBody.length); - memcpy(JSObjectGetTypedArrayDataPtr(ctx, array, NULL), responseBody.bytes, responseBody.length); + JSObjectSetTypedArrayData(ctx, array, responseBody); return array; } diff --git a/Source/Ejecta/EJUtils/EJBindingWebSocket.m b/Source/Ejecta/EJUtils/EJBindingWebSocket.m index cbb1316c..fda1732f 100644 --- a/Source/Ejecta/EJUtils/EJBindingWebSocket.m +++ b/Source/Ejecta/EJUtils/EJBindingWebSocket.m @@ -1,5 +1,5 @@ #import "EJBindingWebSocket.h" -#import +#import "EJConvertTypedArray.h" @implementation EJBindingWebSocket @@ -80,7 +80,7 @@ - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message { if( binaryType == kEJWebSocketBinaryTypeArrayBuffer ) { jsMessage = JSObjectMakeTypedArray(ctx, kJSTypedArrayTypeArrayBuffer, data.length); - memcpy(JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)jsMessage, NULL), data.bytes, data.length); + JSObjectSetTypedArrayData(ctx, (JSObjectRef)jsMessage, data); } else if( binaryType == kEJWebSocketBinaryTypeBlob ) { NSLog(@"WebSocket Error: binaryType='blob' is not supported. Use 'arraybuffer' instead."); @@ -149,10 +149,9 @@ - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reas // Try TypedArray else if( JSValueIsObject(ctx, argv[0]) ) { - size_t byteLength; - void *dataPtr = JSObjectGetTypedArrayDataPtr(ctx, (JSObjectRef)argv[0], &byteLength); - if( dataPtr && byteLength ) { - [socket send:[NSData dataWithBytes:dataPtr length:byteLength]]; + NSData *data = JSObjectGetTypedArrayData(ctx, (JSObjectRef)argv[0]); + if( data ) { + [socket send:data]; } else { NSLog(@"WebSocket Error: Can't send message that is neither String, ArrayBuffer or ArrayBufferView."); diff --git a/Source/lib/ios/JavaScriptCore.framework/Headers b/Source/lib/ios/JavaScriptCore.framework/Headers deleted file mode 120000 index a177d2a6..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/Source/lib/ios/JavaScriptCore.framework/JavaScriptCore b/Source/lib/ios/JavaScriptCore.framework/JavaScriptCore deleted file mode 120000 index c9c4e601..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/JavaScriptCore +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/JavaScriptCore \ No newline at end of file diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSBase.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSBase.h deleted file mode 100644 index 6b4dc155..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSBase.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSBase_h -#define JSBase_h - -#ifndef __cplusplus -#include -#endif - -#ifdef __OBJC__ -#import -#endif - -/* JavaScript engine interface */ - -/*! @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. */ -typedef const struct OpaqueJSContextGroup* JSContextGroupRef; - -/*! @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state. */ -typedef const struct OpaqueJSContext* JSContextRef; - -/*! @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext. */ -typedef struct OpaqueJSContext* JSGlobalContextRef; - -/*! @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript. */ -typedef struct OpaqueJSString* JSStringRef; - -/*! @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior. */ -typedef struct OpaqueJSClass* JSClassRef; - -/*! @typedef JSPropertyNameArrayRef An array of JavaScript property names. */ -typedef struct OpaqueJSPropertyNameArray* JSPropertyNameArrayRef; - -/*! @typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object's properties. */ -typedef struct OpaqueJSPropertyNameAccumulator* JSPropertyNameAccumulatorRef; - - -/* JavaScript data types */ - -/*! @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them. */ -typedef const struct OpaqueJSValue* JSValueRef; - -/*! @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue. */ -typedef struct OpaqueJSValue* JSObjectRef; - -/* JavaScript symbol exports */ -/* These rules should stay the same as in WebKit2/Shared/API/c/WKBase.h */ - -#undef JS_EXPORT -#if defined(JS_NO_EXPORT) -#define JS_EXPORT -#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) -#define JS_EXPORT __attribute__((visibility("default"))) -#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) || defined(__CC_ARM) || defined(__ARMCC__) -#if defined(BUILDING_JavaScriptCore) || defined(STATICALLY_LINKED_WITH_JavaScriptCore) -#define JS_EXPORT __declspec(dllexport) -#else -#define JS_EXPORT __declspec(dllimport) -#endif -#else /* !defined(JS_NO_EXPORT) */ -#define JS_EXPORT -#endif /* defined(JS_NO_EXPORT) */ - -/* JS tests uses WTF but has no config.h, so we need to set the export defines here. */ -#ifndef WTF_EXPORT_PRIVATE -#define WTF_EXPORT_PRIVATE JS_EXPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Script Evaluation */ - -/*! -@function JSEvaluateScript -@abstract Evaluates a string of JavaScript. -@param ctx The execution context to use. -@param script A JSString containing the script to evaluate. -@param thisObject The object to use as "this," or NULL to use the global object as "this." -@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. -@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSValue that results from evaluating script, or NULL if an exception is thrown. -*/ -JS_EXPORT JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); - -/*! -@function JSCheckScriptSyntax -@abstract Checks for syntax errors in a string of JavaScript. -@param ctx The execution context to use. -@param script A JSString containing the script to check for syntax errors. -@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. -@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. -@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. -@result true if the script is syntactically correct, otherwise false. -*/ -JS_EXPORT bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); - -/*! -@function JSGarbageCollect -@abstract Performs a JavaScript garbage collection. -@param ctx The execution context to use. -@discussion JavaScript values that are on the machine stack, in a register, - protected by JSValueProtect, set as the global object of an execution context, - or reachable from any such value will not be collected. - - During JavaScript execution, you are not required to call this function; the - JavaScript engine will garbage collect as needed. JavaScript values created - within a context group are automatically destroyed when the last reference - to the context group is released. -*/ -JS_EXPORT void JSGarbageCollect(JSContextRef ctx); - -#ifdef __cplusplus -} -#endif - -/* Enable the Objective-C API for platforms with a modern runtime. */ -#if !defined(JSC_OBJC_API_ENABLED) -#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE))) -#endif - -#endif /* JSBase_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSContext.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSContext.h deleted file mode 100644 index e37113ca..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSContext.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSContext_h -#define JSContext_h - -#include - -#if JSC_OBJC_API_ENABLED - -@class JSVirtualMachine, JSValue; - -/*! -@interface -@discussion An instance of JSContext represents a JavaScript execution environment. All - JavaScript execution takes place within a context. - JSContext is also used to manage the life-cycle of objects within the - JavaScript virtual machine. Every instance of JSValue is associated with a - JSContext via a strong reference. The JSValue will keep the JSContext it - references alive so long as the JSValue remains alive. When all of the JSValues - that reference a particular JSContext have been deallocated the JSContext - will be deallocated unless it has been previously retained. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSContext : NSObject - -/*! -@methodgroup Creating New JSContexts -*/ -/*! -@method -@abstract Create a JSContext. -@result The new context. -*/ -- (instancetype)init; - -/*! -@method -@abstract Create a JSContext in the specified virtual machine. -@param virtualMachine The JSVirtualMachine in which the context will be created. -@result The new context. -*/ -- (instancetype)initWithVirtualMachine:(JSVirtualMachine *)virtualMachine; - -/*! -@methodgroup Evaluating Scripts -*/ -/*! -@method -@abstract Evaluate a string of JavaScript code. -@param script A string containing the JavaScript code to evaluate. -@result The last value generated by the script. -*/ -- (JSValue *)evaluateScript:(NSString *)script; - -/*! -@methodgroup Callback Accessors -*/ -/*! -@method -@abstract Get the JSContext that is currently executing. -@discussion This method may be called from within an Objective-C block or method invoked - as a callback from JavaScript to retrieve the callback's context. Outside of - a callback from JavaScript this method will return nil. -@result The currently executing JSContext or nil if there isn't one. -*/ -+ (JSContext *)currentContext; - -/*! -@method -@abstract Get the this value of the currently executing method. -@discussion This method may be called from within an Objective-C block or method invoked - as a callback from JavaScript to retrieve the callback's this value. Outside - of a callback from JavaScript this method will return nil. -@result The current this value or nil if there isn't one. -*/ -+ (JSValue *)currentThis; - -/*! -@method -@abstract Get the arguments to the current callback. -@discussion This method may be called from within an Objective-C block or method invoked - as a callback from JavaScript to retrieve the callback's arguments, objects - in the returned array are instances of JSValue. Outside of a callback from - JavaScript this method will return nil. -@result An NSArray of the arguments nil if there is no current callback. -*/ -+ (NSArray *)currentArguments; - -/*! -@methodgroup Global Properties -*/ -/*! -@property -@abstract Get the global object of the context. -@discussion This method retrieves the global object of the JavaScript execution context. - Instances of JSContext originating from WebKit will return a reference to the - WindowProxy object. -@result The global object. -*/ -@property (readonly, strong) JSValue *globalObject; - -/*! -@property -@discussion The exception property may be used to throw an exception to JavaScript. - - Before a callback is made from JavaScript to an Objective-C block or method, - the prior value of the exception property will be preserved and the property - will be set to nil. After the callback has completed the new value of the - exception property will be read, and prior value restored. If the new value - of exception is not nil, the callback will result in that value being thrown. - - This property may also be used to check for uncaught exceptions arising from - API function calls (since the default behaviour of exceptionHandler is to - assign an uncaught exception to this property). - - If a JSValue originating from a different JSVirtualMachine than this context - is assigned to this property, an Objective-C exception will be raised. -*/ -@property (strong) JSValue *exception; - -/*! -@property -@discussion If a call to an API function results in an uncaught JavaScript exception, the - exceptionHandler block will be invoked. The default implementation for the - exception handler will store the exception to the exception property on - context. As a consequence the default behaviour is for unhandled exceptions - occurring within a callback from JavaScript to be rethrown upon return. - Setting this value to nil will result in all uncaught exceptions thrown from - the API being silently consumed. -*/ -@property (copy) void(^exceptionHandler)(JSContext *context, JSValue *exception); - -/*! -@property -@discussion All instances of JSContext are associated with a single JSVirtualMachine. The - virtual machine provides an "object space" or set of execution resources. -*/ -@property (readonly, strong) JSVirtualMachine *virtualMachine; - -/*! -@property -@discussion Name of the JSContext. Exposed when remote debugging the context. -*/ -@property (copy) NSString *name; - -@end - -/*! -@category -@discussion Instances of JSContext implement the following methods in order to enable - support for subscript access by key and index, for example: - -@textblock - JSContext *context; - JSValue *v = context[@"X"]; // Get value for "X" from the global object. - context[@"Y"] = v; // Assign 'v' to "Y" on the global object. -@/textblock - - An object key passed as a subscript will be converted to a JavaScript value, - and then the value converted to a string used to resolve a property of the - global object. -*/ -@interface JSContext (SubscriptSupport) - -/*! -method -@abstract Get a particular property on the global object. -@param key -@result The JSValue for the global object's property. -*/ -- (JSValue *)objectForKeyedSubscript:(id)key; - -/*! -method -@abstract Set a particular property on the global object. -@param object -@param key -*/ -- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key; - -@end - -/*! -@category -@discussion These functions are for bridging between the C API and the Objective-C API. -*/ -@interface JSContext (JSContextRefSupport) - -/*! -@method -@abstract Create a JSContext, wrapping its C API counterpart. -@param jsGlobalContextRef -@result The JSContext equivalent of the provided JSGlobalContextRef. -*/ -+ (JSContext *)contextWithJSGlobalContextRef:(JSGlobalContextRef)jsGlobalContextRef; - -/*! -@property -@abstract Get the C API counterpart wrapped by a JSContext. -@result The C API equivalent of this JSContext. -*/ -@property (readonly) JSGlobalContextRef JSGlobalContextRef; -@end - -#endif - -#endif // JSContext_h diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSContextRef.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSContextRef.h deleted file mode 100644 index c8db1e56..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSContextRef.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSContextRef_h -#define JSContextRef_h - -#include -#include -#include - -#ifndef __cplusplus -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@function -@abstract Creates a JavaScript context group. -@discussion A JSContextGroup associates JavaScript contexts with one another. - Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging - JavaScript objects between contexts in different groups will produce undefined behavior. - When objects from the same context group are used in multiple threads, explicit - synchronization is required. -@result The created JSContextGroup. -*/ -JS_EXPORT JSContextGroupRef JSContextGroupCreate() CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Retains a JavaScript context group. -@param group The JSContextGroup to retain. -@result A JSContextGroup that is the same as group. -*/ -JS_EXPORT JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Releases a JavaScript context group. -@param group The JSContextGroup to release. -*/ -JS_EXPORT void JSContextGroupRelease(JSContextGroupRef group) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Creates a global JavaScript execution context. -@discussion JSGlobalContextCreate allocates a global object and populates it with all the - built-in JavaScript objects, such as Object, Function, String, and Array. - - In WebKit version 4.0 and later, the context is created in a unique context group. - Therefore, scripts may execute in it concurrently with scripts executing in other contexts. - However, you may not use values created in the context in other contexts. -@param globalObjectClass The class to use when creating the global object. Pass - NULL to use the default object class. -@result A JSGlobalContext with a global object of class globalObjectClass. -*/ -JS_EXPORT JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) CF_AVAILABLE(10_5, 7_0); - -/*! -@function -@abstract Creates a global JavaScript execution context in the context group provided. -@discussion JSGlobalContextCreateInGroup allocates a global object and populates it with - all the built-in JavaScript objects, such as Object, Function, String, and Array. -@param globalObjectClass The class to use when creating the global object. Pass - NULL to use the default object class. -@param group The context group to use. The created global context retains the group. - Pass NULL to create a unique group for the context. -@result A JSGlobalContext with a global object of class globalObjectClass and a context - group equal to group. -*/ -JS_EXPORT JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Retains a global JavaScript execution context. -@param ctx The JSGlobalContext to retain. -@result A JSGlobalContext that is the same as ctx. -*/ -JS_EXPORT JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx); - -/*! -@function -@abstract Releases a global JavaScript execution context. -@param ctx The JSGlobalContext to release. -*/ -JS_EXPORT void JSGlobalContextRelease(JSGlobalContextRef ctx); - -/*! -@function -@abstract Gets the global object of a JavaScript execution context. -@param ctx The JSContext whose global object you want to get. -@result ctx's global object. -*/ -JS_EXPORT JSObjectRef JSContextGetGlobalObject(JSContextRef ctx); - -/*! -@function -@abstract Gets the context group to which a JavaScript execution context belongs. -@param ctx The JSContext whose group you want to get. -@result ctx's group. -*/ -JS_EXPORT JSContextGroupRef JSContextGetGroup(JSContextRef ctx) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Gets the global context of a JavaScript execution context. -@param ctx The JSContext whose global context you want to get. -@result ctx's global context. -*/ -JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) CF_AVAILABLE(10_7, 7_0); - -/*! -@function -@abstract Gets a copy of the name of a context. -@param ctx The JSGlobalContext whose name you want to get. -@result The name for ctx. -@discussion A JSGlobalContext's name is exposed for remote debugging to make it -easier to identify the context you would like to attach to. -*/ -JS_EXPORT JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx); - -/*! -@function -@abstract Sets the remote debugging name for a context. -@param ctx The JSGlobalContext that you want to name. -@param name The remote debugging name to set on ctx. -*/ -JS_EXPORT void JSGlobalContextSetName(JSGlobalContextRef ctx, JSStringRef name); - -#ifdef __cplusplus -} -#endif - -#endif /* JSContextRef_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSExport.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSExport.h deleted file mode 100644 index 2d78dcc7..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSExport.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -#if JSC_OBJC_API_ENABLED - -/*! -@protocol -@abstract JSExport provides a declarative way to export Objective-C instance methods, - class methods, and properties to JavaScript code. - -@discussion When a JavaScript value is created from an instance of an Objective-C class - for which no copying conversion is specified a JavaScript wrapper object will - be created. - - In JavaScript, inheritance is supported via a chain of prototype objects, and - for each Objective-C class (and per JSContext) an object appropriate for use - as a prototype will be provided. For the class NSObject the prototype object - will be the JavaScript context's Object Prototype. For all other Objective-C - classes a Prototype object will be created. The Prototype object for a given - Objective-C class will have its internal [Prototype] property set to point to - the Prototype object of the Objective-C class's superclass. As such the - prototype chain for a JavaScript wrapper object will reflect the wrapped - Objective-C type's inheritance hierarchy. - - In addition to the Prototype object a JavaScript Constructor object will also - be produced for each Objective-C class. The Constructor object has a property - named 'prototype' that references the Prototype object, and the Prototype - object has a property named 'constructor' that references the Constructor. - The Constructor object is not callable. - - By default no methods or properties of the Objective-C class will be exposed - to JavaScript; however methods and properties may explicitly be exported. - For each protocol that a class conforms to, if the protocol incorporates the - protocol JSExport, then the protocol will be interpreted as a list of methods - and properties to be exported to JavaScript. - - For each instance method being exported a corresponding JavaScript function - will be assigned as a property of the Prototype object. For each Objective-C - property being exported a JavaScript accessor property will be created on the - Prototype. For each class method exported a JavaScript function will be - created on the Constructor object. For example: - -
-@textblock
-    @protocol MyClassJavaScriptMethods 
-    - (void)foo;
-    @end
-
-    @interface MyClass : NSObject 
-    - (void)foo;
-    - (void)bar;
-    @end
-@/textblock
-
- - Data properties that are created on the prototype or constructor objects have - the attributes: writable:true, enumerable:false, configurable:true. - Accessor properties have the attributes: enumerable:false and configurable:true. - - If an instance of MyClass is converted to a JavaScript value, the resulting - wrapper object will (via its prototype) export the method foo to JavaScript, - since the class conforms to the MyClassJavaScriptMethods protocol, and this - protocol incorporates JSExport. bar will not be exported. - - Properties, arguments, and return values of the following types are - supported: - - Primitive numbers: signed values of up to 32-bits are converted in a manner - consistent with valueWithInt32/toInt32, unsigned values of up to 32-bits - are converted in a manner consistent with valueWithUInt32/toUInt32, all - other numeric values are converted consistently with valueWithDouble/ - toDouble. - - BOOL: values are converted consistently with valueWithBool/toBool. - - id: values are converted consistently with valueWithObject/toObject. - - Objective-C Class: - where the type is a pointer to a specified Objective-C - class, conversion is consistent with valueWithObjectOfClass/toObject. - - struct types: C struct types are supported, where JSValue provides support - for the given type. Support is built in for CGPoint, NSRange, CGRect, and - CGSize. - - block types: Blocks can only be passed if they had been converted - successfully by valueWithObject/toObject previously. - - For any interface that conforms to JSExport the normal copying conversion for - built in types will be inhibited - so, for example, if an instance that - derives from NSString but conforms to JSExport is passed to valueWithObject: - then a wrapper object for the Objective-C object will be returned rather than - a JavaScript string primitive. -*/ -@protocol JSExport -@end - -/*! -@define -@abstract Rename a selector when it's exported to JavaScript. -@discussion When a selector that takes one or more arguments is converted to a JavaScript - property name, by default a property name will be generated by performing the - following conversion: - - - All colons are removed from the selector - - - Any lowercase letter that had followed a colon will be capitalized. - - Under the default conversion a selector doFoo:withBar: will be exported as - doFooWithBar. The default conversion may be overriden using the JSExportAs - macro, for example to export a method doFoo:withBar: as doFoo: - -
-@textblock
-    @protocol MyClassJavaScriptMethods 
-    JSExportAs(doFoo,
-    - (void)doFoo:(id)foo withBar:(id)bar
-    );
-    @end
-@/textblock
-
- - Note that the JSExport macro may only be applied to a selector that takes one - or more argument. -*/ -#define JSExportAs(PropertyName, Selector) \ - @optional Selector __JS_EXPORT_AS__##PropertyName:(id)argument; @required Selector - -#endif diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSManagedValue.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSManagedValue.h deleted file mode 100644 index b78658b6..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSManagedValue.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSManagedValue_h -#define JSManagedValue_h - -#import - -#if JSC_OBJC_API_ENABLED - -@class JSValue; -@class JSContext; - -/*! -@interface -@discussion JSManagedValue represents a "conditionally retained" JSValue. - "Conditionally retained" means that as long as either the JSManagedValue's - JavaScript value is reachable through the JavaScript object graph - or the JSManagedValue object is reachable through the external Objective-C - object graph as reported to the JSVirtualMachine using - addManagedReference:withOwner:, the corresponding JavaScript value will - be retained. However, if neither of these conditions are true, the - corresponding JSValue will be released and set to nil. - - The primary use case for JSManagedValue is for safely referencing JSValues - from the Objective-C heap. It is incorrect to store a JSValue into an - Objective-C heap object, as this can very easily create a reference cycle, - keeping the entire JSContext alive. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSManagedValue : NSObject - -/*! -@method -@abstract Create a JSManagedValue from a JSValue. -@param value -@result The new JSManagedValue. -*/ -+ (JSManagedValue *)managedValueWithValue:(JSValue *)value; - -/*! -@method -@abstract Create a JSManagedValue. -@param value -@result The new JSManagedValue. -*/ -- (instancetype)initWithValue:(JSValue *)value; - -/*! -@property -@abstract Get the JSValue from the JSManagedValue. -@result The corresponding JSValue for this JSManagedValue or - nil if the JSValue has been collected. -*/ -@property (readonly, strong) JSValue *value; - -@end - -#endif // JSC_OBJC_API_ENABLED - -#endif // JSManagedValue_h diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSObjectRef.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSObjectRef.h deleted file mode 100644 index 6aa84358..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSObjectRef.h +++ /dev/null @@ -1,694 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. - * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSObjectRef_h -#define JSObjectRef_h - -#include -#include -#include - -#ifndef __cplusplus -#include -#endif -#include /* for size_t */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@enum JSPropertyAttribute -@constant kJSPropertyAttributeNone Specifies that a property has no special attributes. -@constant kJSPropertyAttributeReadOnly Specifies that a property is read-only. -@constant kJSPropertyAttributeDontEnum Specifies that a property should not be enumerated by JSPropertyEnumerators and JavaScript for...in loops. -@constant kJSPropertyAttributeDontDelete Specifies that the delete operation should fail on a property. -*/ -enum { - kJSPropertyAttributeNone = 0, - kJSPropertyAttributeReadOnly = 1 << 1, - kJSPropertyAttributeDontEnum = 1 << 2, - kJSPropertyAttributeDontDelete = 1 << 3 -}; - -/*! -@typedef JSPropertyAttributes -@abstract A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together. -*/ -typedef unsigned JSPropertyAttributes; - -/*! -@enum JSClassAttribute -@constant kJSClassAttributeNone Specifies that a class has no special attributes. -@constant kJSClassAttributeNoAutomaticPrototype Specifies that a class should not automatically generate a shared prototype for its instance objects. Use kJSClassAttributeNoAutomaticPrototype in combination with JSObjectSetPrototype to manage prototypes manually. -*/ -enum { - kJSClassAttributeNone = 0, - kJSClassAttributeNoAutomaticPrototype = 1 << 1 -}; - -/*! -@typedef JSClassAttributes -@abstract A set of JSClassAttributes. Combine multiple attributes by logically ORing them together. -*/ -typedef unsigned JSClassAttributes; - -/*! -@typedef JSObjectInitializeCallback -@abstract The callback invoked when an object is first created. -@param ctx The execution context to use. -@param object The JSObject being created. -@discussion If you named your function Initialize, you would declare it like this: - -void Initialize(JSContextRef ctx, JSObjectRef object); - -Unlike the other object callbacks, the initialize callback is called on the least -derived class (the parent class) first, and the most derived class last. -*/ -typedef void -(*JSObjectInitializeCallback) (JSContextRef ctx, JSObjectRef object); - -/*! -@typedef JSObjectFinalizeCallback -@abstract The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread. -@param object The JSObject being finalized. -@discussion If you named your function Finalize, you would declare it like this: - -void Finalize(JSObjectRef object); - -The finalize callback is called on the most derived class first, and the least -derived class (the parent class) last. - -You must not call any function that may cause a garbage collection or an allocation -of a garbage collected object from within a JSObjectFinalizeCallback. This includes -all functions that have a JSContextRef parameter. -*/ -typedef void -(*JSObjectFinalizeCallback) (JSObjectRef object); - -/*! -@typedef JSObjectHasPropertyCallback -@abstract The callback invoked when determining whether an object has a property. -@param ctx The execution context to use. -@param object The JSObject to search for the property. -@param propertyName A JSString containing the name of the property look up. -@result true if object has the property, otherwise false. -@discussion If you named your function HasProperty, you would declare it like this: - -bool HasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - -If this function returns false, the hasProperty request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain. - -This callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value would be expensive. - -If this callback is NULL, the getProperty callback will be used to service hasProperty requests. -*/ -typedef bool -(*JSObjectHasPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - -/*! -@typedef JSObjectGetPropertyCallback -@abstract The callback invoked when getting a property's value. -@param ctx The execution context to use. -@param object The JSObject to search for the property. -@param propertyName A JSString containing the name of the property to get. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result The property's value if object has the property, otherwise NULL. -@discussion If you named your function GetProperty, you would declare it like this: - -JSValueRef GetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -If this function returns NULL, the get request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain. -*/ -typedef JSValueRef -(*JSObjectGetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@typedef JSObjectSetPropertyCallback -@abstract The callback invoked when setting a property's value. -@param ctx The execution context to use. -@param object The JSObject on which to set the property's value. -@param propertyName A JSString containing the name of the property to set. -@param value A JSValue to use as the property's value. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result true if the property was set, otherwise false. -@discussion If you named your function SetProperty, you would declare it like this: - -bool SetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - -If this function returns false, the set request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). -*/ -typedef bool -(*JSObjectSetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - -/*! -@typedef JSObjectDeletePropertyCallback -@abstract The callback invoked when deleting a property. -@param ctx The execution context to use. -@param object The JSObject in which to delete the property. -@param propertyName A JSString containing the name of the property to delete. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result true if propertyName was successfully deleted, otherwise false. -@discussion If you named your function DeleteProperty, you would declare it like this: - -bool DeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -If this function returns false, the delete request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). -*/ -typedef bool -(*JSObjectDeletePropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@typedef JSObjectGetPropertyNamesCallback -@abstract The callback invoked when collecting the names of an object's properties. -@param ctx The execution context to use. -@param object The JSObject whose property names are being collected. -@param accumulator A JavaScript property name accumulator in which to accumulate the names of object's properties. -@discussion If you named your function GetPropertyNames, you would declare it like this: - -void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); - -Property name accumulators are used by JSObjectCopyPropertyNames and JavaScript for...in loops. - -Use JSPropertyNameAccumulatorAddName to add property names to accumulator. A class's getPropertyNames callback only needs to provide the names of properties that the class vends through a custom getProperty or setProperty callback. Other properties, including statically declared properties, properties vended by other classes, and properties belonging to object's prototype, are added independently. -*/ -typedef void -(*JSObjectGetPropertyNamesCallback) (JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); - -/*! -@typedef JSObjectCallAsFunctionCallback -@abstract The callback invoked when an object is called as a function. -@param ctx The execution context to use. -@param function A JSObject that is the function being called. -@param thisObject A JSObject that is the 'this' variable in the function's scope. -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of the arguments passed to the function. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result A JSValue that is the function's return value. -@discussion If you named your function CallAsFunction, you would declare it like this: - -JSValueRef CallAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -If your callback were invoked by the JavaScript expression 'myObject.myFunction()', function would be set to myFunction, and thisObject would be set to myObject. - -If this callback is NULL, calling your object as a function will throw an exception. -*/ -typedef JSValueRef -(*JSObjectCallAsFunctionCallback) (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@typedef JSObjectCallAsConstructorCallback -@abstract The callback invoked when an object is used as a constructor in a 'new' expression. -@param ctx The execution context to use. -@param constructor A JSObject that is the constructor being called. -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of the arguments passed to the function. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result A JSObject that is the constructor's return value. -@discussion If you named your function CallAsConstructor, you would declare it like this: - -JSObjectRef CallAsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -If your callback were invoked by the JavaScript expression 'new myConstructor()', constructor would be set to myConstructor. - -If this callback is NULL, using your object as a constructor in a 'new' expression will throw an exception. -*/ -typedef JSObjectRef -(*JSObjectCallAsConstructorCallback) (JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@typedef JSObjectHasInstanceCallback -@abstract hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. -@param ctx The execution context to use. -@param constructor The JSObject that is the target of the 'instanceof' expression. -@param possibleInstance The JSValue being tested to determine if it is an instance of constructor. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result true if possibleInstance is an instance of constructor, otherwise false. -@discussion If you named your function HasInstance, you would declare it like this: - -bool HasInstance(JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception); - -If your callback were invoked by the JavaScript expression 'someValue instanceof myObject', constructor would be set to myObject and possibleInstance would be set to someValue. - -If this callback is NULL, 'instanceof' expressions that target your object will return false. - -Standard JavaScript practice calls for objects that implement the callAsConstructor callback to implement the hasInstance callback as well. -*/ -typedef bool -(*JSObjectHasInstanceCallback) (JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception); - -/*! -@typedef JSObjectConvertToTypeCallback -@abstract The callback invoked when converting an object to a particular JavaScript type. -@param ctx The execution context to use. -@param object The JSObject to convert. -@param type A JSType specifying the JavaScript type to convert to. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result The objects's converted value, or NULL if the object was not converted. -@discussion If you named your function ConvertToType, you would declare it like this: - -JSValueRef ConvertToType(JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception); - -If this function returns false, the conversion request forwards to object's parent class chain (which includes the default object class). - -This function is only invoked when converting an object to number or string. An object converted to boolean is 'true.' An object converted to object is itself. -*/ -typedef JSValueRef -(*JSObjectConvertToTypeCallback) (JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception); - -/*! -@struct JSStaticValue -@abstract This structure describes a statically declared value property. -@field name A null-terminated UTF8 string containing the property's name. -@field getProperty A JSObjectGetPropertyCallback to invoke when getting the property's value. -@field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value. May be NULL if the ReadOnly attribute is set. -@field attributes A logically ORed set of JSPropertyAttributes to give to the property. -*/ -typedef struct { - const char* name; - JSObjectGetPropertyCallback getProperty; - JSObjectSetPropertyCallback setProperty; - JSPropertyAttributes attributes; -} JSStaticValue; - -/*! -@struct JSStaticFunction -@abstract This structure describes a statically declared function property. -@field name A null-terminated UTF8 string containing the property's name. -@field callAsFunction A JSObjectCallAsFunctionCallback to invoke when the property is called as a function. -@field attributes A logically ORed set of JSPropertyAttributes to give to the property. -*/ -typedef struct { - const char* name; - JSObjectCallAsFunctionCallback callAsFunction; - JSPropertyAttributes attributes; -} JSStaticFunction; - -/*! -@struct JSClassDefinition -@abstract This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL. -@field version The version number of this structure. The current version is 0. -@field attributes A logically ORed set of JSClassAttributes to give to the class. -@field className A null-terminated UTF8 string containing the class's name. -@field parentClass A JSClass to set as the class's parent class. Pass NULL use the default object class. -@field staticValues A JSStaticValue array containing the class's statically declared value properties. Pass NULL to specify no statically declared value properties. The array must be terminated by a JSStaticValue whose name field is NULL. -@field staticFunctions A JSStaticFunction array containing the class's statically declared function properties. Pass NULL to specify no statically declared function properties. The array must be terminated by a JSStaticFunction whose name field is NULL. -@field initialize The callback invoked when an object is first created. Use this callback to initialize the object. -@field finalize The callback invoked when an object is finalized (prepared for garbage collection). Use this callback to release resources allocated for the object, and perform other cleanup. -@field hasProperty The callback invoked when determining whether an object has a property. If this field is NULL, getProperty is called instead. The hasProperty callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value is expensive. -@field getProperty The callback invoked when getting a property's value. -@field setProperty The callback invoked when setting a property's value. -@field deleteProperty The callback invoked when deleting a property. -@field getPropertyNames The callback invoked when collecting the names of an object's properties. -@field callAsFunction The callback invoked when an object is called as a function. -@field hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. -@field callAsConstructor The callback invoked when an object is used as a constructor in a 'new' expression. -@field convertToType The callback invoked when converting an object to a particular JavaScript type. -@discussion The staticValues and staticFunctions arrays are the simplest and most efficient means for vending custom properties. Statically declared properties autmatically service requests like getProperty, setProperty, and getPropertyNames. Property access callbacks are required only to implement unusual properties, like array indexes, whose names are not known at compile-time. - -If you named your getter function "GetX" and your setter function "SetX", you would declare a JSStaticValue array containing "X" like this: - -JSStaticValue StaticValueArray[] = { - { "X", GetX, SetX, kJSPropertyAttributeNone }, - { 0, 0, 0, 0 } -}; - -Standard JavaScript practice calls for storing function objects in prototypes, so they can be shared. The default JSClass created by JSClassCreate follows this idiom, instantiating objects with a shared, automatically generating prototype containing the class's function objects. The kJSClassAttributeNoAutomaticPrototype attribute specifies that a JSClass should not automatically generate such a prototype. The resulting JSClass instantiates objects with the default object prototype, and gives each instance object its own copy of the class's function objects. - -A NULL callback specifies that the default object callback should substitute, except in the case of hasProperty, where it specifies that getProperty should substitute. -*/ -typedef struct { - int version; /* current (and only) version is 0 */ - JSClassAttributes attributes; - - const char* className; - JSClassRef parentClass; - - const JSStaticValue* staticValues; - const JSStaticFunction* staticFunctions; - - JSObjectInitializeCallback initialize; - JSObjectFinalizeCallback finalize; - JSObjectHasPropertyCallback hasProperty; - JSObjectGetPropertyCallback getProperty; - JSObjectSetPropertyCallback setProperty; - JSObjectDeletePropertyCallback deleteProperty; - JSObjectGetPropertyNamesCallback getPropertyNames; - JSObjectCallAsFunctionCallback callAsFunction; - JSObjectCallAsConstructorCallback callAsConstructor; - JSObjectHasInstanceCallback hasInstance; - JSObjectConvertToTypeCallback convertToType; -} JSClassDefinition; - -/*! -@const kJSClassDefinitionEmpty -@abstract A JSClassDefinition structure of the current version, filled with NULL pointers and having no attributes. -@discussion Use this constant as a convenience when creating class definitions. For example, to create a class definition with only a finalize method: - -JSClassDefinition definition = kJSClassDefinitionEmpty; -definition.finalize = Finalize; -*/ -JS_EXPORT extern const JSClassDefinition kJSClassDefinitionEmpty; - -/*! -@function -@abstract Creates a JavaScript class suitable for use with JSObjectMake. -@param definition A JSClassDefinition that defines the class. -@result A JSClass with the given definition. Ownership follows the Create Rule. -*/ -JS_EXPORT JSClassRef JSClassCreate(const JSClassDefinition* definition); - -/*! -@function -@abstract Retains a JavaScript class. -@param jsClass The JSClass to retain. -@result A JSClass that is the same as jsClass. -*/ -JS_EXPORT JSClassRef JSClassRetain(JSClassRef jsClass); - -/*! -@function -@abstract Releases a JavaScript class. -@param jsClass The JSClass to release. -*/ -JS_EXPORT void JSClassRelease(JSClassRef jsClass); - -/*! -@function -@abstract Creates a JavaScript object. -@param ctx The execution context to use. -@param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. -@param data A void* to set as the object's private data. Pass NULL to specify no private data. -@result A JSObject with the given class and private data. -@discussion The default object class does not allocate storage for private data, so you must provide a non-NULL jsClass to JSObjectMake if you want your object to be able to store private data. - -data is set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate. -*/ -JS_EXPORT JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data); - -/*! -@function -@abstract Convenience method for creating a JavaScript function with a given callback as its implementation. -@param ctx The execution context to use. -@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. -@param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called. -@result A JSObject that is a function. The object's prototype will be the default function prototype. -*/ -JS_EXPORT JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction); - -/*! -@function -@abstract Convenience method for creating a JavaScript constructor. -@param ctx The execution context to use. -@param jsClass A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor's .prototype property, and to evaluate 'instanceof' expressions. Pass NULL to use the default object class. -@param callAsConstructor A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a 'new' expression. Pass NULL to use the default object constructor. -@result A JSObject that is a constructor. The object's prototype will be the default object prototype. -@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data. -*/ -JS_EXPORT JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor); - -/*! - @function - @abstract Creates a JavaScript Array object. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is an Array. - @discussion The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument - is supplied, this function returns an array with one element. - */ -JS_EXPORT JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! - @function - @abstract Creates a JavaScript Date object, as if by invoking the built-in Date constructor. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is a Date. - */ -JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! - @function - @abstract Creates a JavaScript Error object, as if by invoking the built-in Error constructor. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is a Error. - */ -JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! - @function - @abstract Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is a RegExp. - */ -JS_EXPORT JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Creates a function with a given script as its body. -@param ctx The execution context to use. -@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. -@param parameterCount An integer count of the number of parameter names in parameterNames. -@param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0. -@param body A JSString containing the script to use as the function's body. -@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. -@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. -@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. -@result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype. -@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution. -*/ -JS_EXPORT JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); - -/*! -@function -@abstract Gets an object's prototype. -@param ctx The execution context to use. -@param object A JSObject whose prototype you want to get. -@result A JSValue that is the object's prototype. -*/ -JS_EXPORT JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Sets an object's prototype. -@param ctx The execution context to use. -@param object The JSObject whose prototype you want to set. -@param value A JSValue to set as the object's prototype. -*/ -JS_EXPORT void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value); - -/*! -@function -@abstract Tests whether an object has a given property. -@param object The JSObject to test. -@param propertyName A JSString containing the property's name. -@result true if the object has a property whose name matches propertyName, otherwise false. -*/ -JS_EXPORT bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - -/*! -@function -@abstract Gets a property from an object. -@param ctx The execution context to use. -@param object The JSObject whose property you want to get. -@param propertyName A JSString containing the property's name. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The property's value if object has the property, otherwise the undefined value. -*/ -JS_EXPORT JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@function -@abstract Sets a property on an object. -@param ctx The execution context to use. -@param object The JSObject whose property you want to set. -@param propertyName A JSString containing the property's name. -@param value A JSValue to use as the property's value. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@param attributes A logically ORed set of JSPropertyAttributes to give to the property. -*/ -JS_EXPORT void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception); - -/*! -@function -@abstract Deletes a property from an object. -@param ctx The execution context to use. -@param object The JSObject whose property you want to delete. -@param propertyName A JSString containing the property's name. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set). -*/ -JS_EXPORT bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@function -@abstract Gets a property from an object by numeric index. -@param ctx The execution context to use. -@param object The JSObject whose property you want to get. -@param propertyIndex An integer value that is the property's name. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The property's value if object has the property, otherwise the undefined value. -@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties. -*/ -JS_EXPORT JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception); - -/*! -@function -@abstract Sets a property on an object by numeric index. -@param ctx The execution context to use. -@param object The JSObject whose property you want to set. -@param propertyIndex The property's name as a number. -@param value A JSValue to use as the property's value. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties. -*/ -JS_EXPORT void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception); - -/*! -@function -@abstract Gets an object's private data. -@param object A JSObject whose private data you want to get. -@result A void* that is the object's private data, if the object has private data, otherwise NULL. -*/ -JS_EXPORT void* JSObjectGetPrivate(JSObjectRef object); - -/*! -@function -@abstract Sets a pointer to private data on an object. -@param object The JSObject whose private data you want to set. -@param data A void* to set as the object's private data. -@result true if object can store private data, otherwise false. -@discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data. -*/ -JS_EXPORT bool JSObjectSetPrivate(JSObjectRef object, void* data); - -/*! -@function -@abstract Tests whether an object can be called as a function. -@param ctx The execution context to use. -@param object The JSObject to test. -@result true if the object can be called as a function, otherwise false. -*/ -JS_EXPORT bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Calls an object as a function. -@param ctx The execution context to use. -@param object The JSObject to call as a function. -@param thisObject The object to use as "this," or NULL to use the global object as "this." -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function. -*/ -JS_EXPORT JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@function -@abstract Tests whether an object can be called as a constructor. -@param ctx The execution context to use. -@param object The JSObject to test. -@result true if the object can be called as a constructor, otherwise false. -*/ -JS_EXPORT bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Calls an object as a constructor. -@param ctx The execution context to use. -@param object The JSObject to call as a constructor. -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of arguments to pass to the constructor. Pass NULL if argumentCount is 0. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor. -*/ -JS_EXPORT JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@function -@abstract Gets the names of an object's enumerable properties. -@param ctx The execution context to use. -@param object The object whose property names you want to get. -@result A JSPropertyNameArray containing the names object's enumerable properties. Ownership follows the Create Rule. -*/ -JS_EXPORT JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Retains a JavaScript property name array. -@param array The JSPropertyNameArray to retain. -@result A JSPropertyNameArray that is the same as array. -*/ -JS_EXPORT JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array); - -/*! -@function -@abstract Releases a JavaScript property name array. -@param array The JSPropetyNameArray to release. -*/ -JS_EXPORT void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array); - -/*! -@function -@abstract Gets a count of the number of items in a JavaScript property name array. -@param array The array from which to retrieve the count. -@result An integer count of the number of names in array. -*/ -JS_EXPORT size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array); - -/*! -@function -@abstract Gets a property name at a given index in a JavaScript property name array. -@param array The array from which to retrieve the property name. -@param index The index of the property name to retrieve. -@result A JSStringRef containing the property name. -*/ -JS_EXPORT JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index); - -/*! -@function -@abstract Adds a property name to a JavaScript property name accumulator. -@param accumulator The accumulator object to which to add the property name. -@param propertyName The property name to add. -*/ -JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName); - -#ifdef __cplusplus -} -#endif - -#endif /* JSObjectRef_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSStringRef.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSStringRef.h deleted file mode 100644 index 75d73c91..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSStringRef.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSStringRef_h -#define JSStringRef_h - -#include - -#ifndef __cplusplus -#include -#endif -#include /* for size_t */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(WIN32) && !defined(_WIN32) \ - && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */ -/*! -@typedef JSChar -@abstract A Unicode character. -*/ - typedef unsigned short JSChar; -#else - typedef wchar_t JSChar; -#endif - -/*! -@function -@abstract Creates a JavaScript string from a buffer of Unicode characters. -@param chars The buffer of Unicode characters to copy into the new JSString. -@param numChars The number of characters to copy from the buffer pointed to by chars. -@result A JSString containing chars. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars); -/*! -@function -@abstract Creates a JavaScript string from a null-terminated UTF8 string. -@param string The null-terminated UTF8 string to copy into the new JSString. -@result A JSString containing string. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSStringCreateWithUTF8CString(const char* string); - -/*! -@function -@abstract Retains a JavaScript string. -@param string The JSString to retain. -@result A JSString that is the same as string. -*/ -JS_EXPORT JSStringRef JSStringRetain(JSStringRef string); -/*! -@function -@abstract Releases a JavaScript string. -@param string The JSString to release. -*/ -JS_EXPORT void JSStringRelease(JSStringRef string); - -/*! -@function -@abstract Returns the number of Unicode characters in a JavaScript string. -@param string The JSString whose length (in Unicode characters) you want to know. -@result The number of Unicode characters stored in string. -*/ -JS_EXPORT size_t JSStringGetLength(JSStringRef string); -/*! -@function -@abstract Returns a pointer to the Unicode character buffer that - serves as the backing store for a JavaScript string. -@param string The JSString whose backing store you want to access. -@result A pointer to the Unicode character buffer that serves as string's - backing store, which will be deallocated when string is deallocated. -*/ -JS_EXPORT const JSChar* JSStringGetCharactersPtr(JSStringRef string); - -/*! -@function -@abstract Returns the maximum number of bytes a JavaScript string will - take up if converted into a null-terminated UTF8 string. -@param string The JSString whose maximum converted size (in bytes) you - want to know. -@result The maximum number of bytes that could be required to convert string into a - null-terminated UTF8 string. The number of bytes that the conversion actually ends - up requiring could be less than this, but never more. -*/ -JS_EXPORT size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string); -/*! -@function -@abstract Converts a JavaScript string into a null-terminated UTF8 string, - and copies the result into an external byte buffer. -@param string The source JSString. -@param buffer The destination byte buffer into which to copy a null-terminated - UTF8 representation of string. On return, buffer contains a UTF8 string - representation of string. If bufferSize is too small, buffer will contain only - partial results. If buffer is not at least bufferSize bytes in size, - behavior is undefined. -@param bufferSize The size of the external buffer in bytes. -@result The number of bytes written into buffer (including the null-terminator byte). -*/ -JS_EXPORT size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize); - -/*! -@function -@abstract Tests whether two JavaScript strings match. -@param a The first JSString to test. -@param b The second JSString to test. -@result true if the two strings match, otherwise false. -*/ -JS_EXPORT bool JSStringIsEqual(JSStringRef a, JSStringRef b); -/*! -@function -@abstract Tests whether a JavaScript string matches a null-terminated UTF8 string. -@param a The JSString to test. -@param b The null-terminated UTF8 string to test. -@result true if the two strings match, otherwise false. -*/ -JS_EXPORT bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b); - -#ifdef __cplusplus -} -#endif - -#endif /* JSStringRef_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSStringRefCF.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSStringRefCF.h deleted file mode 100644 index a7555f96..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSStringRefCF.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSStringRefCF_h -#define JSStringRefCF_h - -#include "JSBase.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* CFString convenience methods */ - -/*! -@function -@abstract Creates a JavaScript string from a CFString. -@discussion This function is optimized to take advantage of cases when - CFStringGetCharactersPtr returns a valid pointer. -@param string The CFString to copy into the new JSString. -@result A JSString containing string. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSStringCreateWithCFString(CFStringRef string); -/*! -@function -@abstract Creates a CFString from a JavaScript string. -@param alloc The alloc parameter to pass to CFStringCreate. -@param string The JSString to copy into the new CFString. -@result A CFString containing string. Ownership follows the Create Rule. -*/ -JS_EXPORT CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string) CF_RETURNS_RETAINED; - -#ifdef __cplusplus -} -#endif - -#endif /* JSStringRefCF_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSTypedArray.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSTypedArray.h deleted file mode 100644 index b7c827b6..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSTypedArray.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef JSTypedArray_h -#define JSTypedArray_h - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@enum JSType -@abstract A constant identifying the Typed Array type of a JSValue. -@constant kJSTypedArrayTypeNone Not a Typed Array. -@constant kJSTypedArrayTypeInt8Array Int8Array -@constant kJSTypedArrayTypeInt16Array Int16Array -@constant kJSTypedArrayTypeInt32Array Int32Array -@constant kJSTypedArrayTypeUint8Array Int8Array -@constant kJSTypedArrayTypeUint8ClampedArray Int8ClampedArray -@constant kJSTypedArrayTypeUint16Array Uint16Array -@constant kJSTypedArrayTypeUint32Array Uint32Array -@constant kJSTypedArrayTypeFloat32Array Float32Array -@constant kJSTypedArrayTypeFloat64Array Float64Array -@constant kJSTypedArrayTypeArrayBuffer ArrayBuffer -*/ -typedef enum { - kJSTypedArrayTypeNone, - kJSTypedArrayTypeInt8Array, - kJSTypedArrayTypeInt16Array, - kJSTypedArrayTypeInt32Array, - kJSTypedArrayTypeUint8Array, - kJSTypedArrayTypeUint8ClampedArray, - kJSTypedArrayTypeUint16Array, - kJSTypedArrayTypeUint32Array, - kJSTypedArrayTypeFloat32Array, - kJSTypedArrayTypeFloat64Array, - kJSTypedArrayTypeArrayBuffer -} JSTypedArrayType; - -/*! -@function -@abstract Returns a JavaScript value's Typed Array type -@param ctx The execution context to use. -@param value The JSValue whose Typed Array type you want to obtain. -@result A value of type JSTypedArrayType that identifies value's Typed Array type. -*/ -JS_EXPORT JSTypedArrayType JSObjectGetTypedArrayType(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Creates a JavaScript Typed Array with the given number of elements -@param ctx The execution context to use. -@param arrayType A value of type JSTypedArrayType identifying the type of array you want to create -@param numElements The number of elements for the array. -@result A JSObjectRef that is a Typed Array or NULL if there was an error -*/ -JS_EXPORT JSObjectRef JSObjectMakeTypedArray(JSContextRef ctx, JSTypedArrayType arrayType, size_t numElements); - -/*! -@function -@abstract Returns a pointer to a Typed Array's data in memory -@param ctx The execution context to use. -@param value The JSValue whose Typed Array type data pointer you want to obtain. -@param byteLength A pointer to a size_t in which to store the byte length of the Typed Array -@result A pointer to the Typed Array's data or NULL if the JSValue is not a Typed Array. -*/ -JS_EXPORT void * JSObjectGetTypedArrayDataPtr(JSContextRef ctx, JSObjectRef object, size_t* byteLength); - - -#ifdef __cplusplus -} -#endif - -#endif /* JSTypedArray_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSValue.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSValue.h deleted file mode 100644 index 4fb4bf45..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSValue.h +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSValue_h -#define JSValue_h - -#if JSC_OBJC_API_ENABLED - -#import - -@class JSContext; - -/*! -@interface -@discussion A JSValue is a reference to a value within the JavaScript object space of a - JSVirtualMachine. All instances of JSValue originate from a JSContext and - hold a strong reference to this JSContext. As long as any value associated with - a particular JSContext is retained, that JSContext will remain alive. - Where an instance method is invoked upon a JSValue, and this returns another - JSValue, the returned JSValue will originate from the same JSContext as the - JSValue on which the method was invoked. - - All JavaScript values are associated with a particular JSVirtualMachine - (the associated JSVirtualMachine is available indirectly via the context - property). An instance of JSValue may only be passed as an argument to - methods on instances of JSValue and JSContext that belong to the same - JSVirtualMachine - passing a JSValue to a method on an object originating - from a different JSVirtualMachine will result in an Objective-C exception - being raised. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSValue : NSObject - -/*! -@property -@abstract The JSContext that this value originates from. -*/ -@property (readonly, strong) JSContext *context; - -/*! -@methodgroup Creating JavaScript Values -*/ -/*! -@method -@abstract Create a JSValue by converting an Objective-C object. -@discussion The resulting JSValue retains the provided Objective-C object. -@param value The Objective-C object to be converted. -@result The new JSValue. -*/ -+ (JSValue *)valueWithObject:(id)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from a BOOL primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithBool:(BOOL)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from a double primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithDouble:(double)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from an int32_t primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithInt32:(int32_t)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from a uint32_t primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithUInt32:(uint32_t)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a new, empty JavaScript object. -@param context The JSContext in which the resulting object will be created. -@result The new JavaScript object. -*/ -+ (JSValue *)valueWithNewObjectInContext:(JSContext *)context; - -/*! -@method -@abstract Create a new, empty JavaScript array. -@param context The JSContext in which the resulting array will be created. -@result The new JavaScript array. -*/ -+ (JSValue *)valueWithNewArrayInContext:(JSContext *)context; - -/*! -@method -@abstract Create a new JavaScript regular expression object. -@param pattern The regular expression pattern. -@param flags The regular expression flags. -@param context The JSContext in which the resulting regular expression object will be created. -@result The new JavaScript regular expression object. -*/ -+ (JSValue *)valueWithNewRegularExpressionFromPattern:(NSString *)pattern flags:(NSString *)flags inContext:(JSContext *)context; - -/*! -@method -@abstract Create a new JavaScript error object. -@param message The error message. -@param context The JSContext in which the resulting error object will be created. -@result The new JavaScript error object. -*/ -+ (JSValue *)valueWithNewErrorFromMessage:(NSString *)message inContext:(JSContext *)context; - -/*! -@method -@abstract Create the JavaScript value null. -@param context The JSContext to which the resulting JSValue belongs. -@result The JSValue representing the JavaScript value null. -*/ -+ (JSValue *)valueWithNullInContext:(JSContext *)context; - -/*! -@method -@abstract Create the JavaScript value undefined. -@param context The JSContext to which the resulting JSValue belongs. -@result The JSValue representing the JavaScript value undefined. -*/ -+ (JSValue *)valueWithUndefinedInContext:(JSContext *)context; - -/*! -@methodgroup Converting to Objective-C Types -@discussion When converting between JavaScript values and Objective-C objects a copy is - performed. Values of types listed below are copied to the corresponding - types on conversion in each direction. For NSDictionaries, entries in the - dictionary that are keyed by strings are copied onto a JavaScript object. - For dictionaries and arrays, conversion is recursive, with the same object - conversion being applied to all entries in the collection. - -
-@textblock
-   Objective-C type  |   JavaScript type
- --------------------+---------------------
-         nil         |     undefined
-        NSNull       |        null
-       NSString      |       string
-       NSNumber      |   number, boolean
-     NSDictionary    |   Object object
-       NSArray       |    Array object
-        NSDate       |     Date object
-       NSBlock (1)   |   Function object (1)
-          id (2)     |   Wrapper object (2)
-        Class (3)    | Constructor object (3)
-@/textblock
-
- - (1) Instances of NSBlock with supported arguments types will be presented to - JavaScript as a callable Function object. For more information on supported - argument types see JSExport.h. If a JavaScript Function originating from an - Objective-C block is converted back to an Objective-C object the block will - be returned. All other JavaScript functions will be converted in the same - manner as a JavaScript object of type Object. - - (2) For Objective-C instances that do not derive from the set of types listed - above, a wrapper object to provide a retaining handle to the Objective-C - instance from JavaScript. For more information on these wrapper objects, see - JSExport.h. When a JavaScript wrapper object is converted back to Objective-C - the Objective-C instance being retained by the wrapper is returned. - - (3) For Objective-C Class objects a constructor object containing exported - class methods will be returned. See JSExport.h for more information on - constructor objects. - - For all methods taking arguments of type id, arguments will be converted - into a JavaScript value according to the above conversion. -*/ -/*! -@method -@abstract Convert this JSValue to an Objective-C object. -@discussion The JSValue is converted to an Objective-C object according - to the conversion rules specified above. -@result The Objective-C representation of this JSValue. -*/ -- (id)toObject; - -/*! -@method -@abstract Convert a JSValue to an Objective-C object of a specific class. -@discussion The JSValue is converted to an Objective-C object of the specified Class. - If the result is not of the specified Class then nil will be returned. -@result An Objective-C object of the specified Class or nil. -*/ -- (id)toObjectOfClass:(Class)expectedClass; - -/*! -@method -@abstract Convert a JSValue to a boolean. -@discussion The JSValue is converted to a boolean according to the rules specified - by the JavaScript language. -@result The boolean result of the conversion. -*/ -- (BOOL)toBool; - -/*! -@method -@abstract Convert a JSValue to a double. -@discussion The JSValue is converted to a number according to the rules specified - by the JavaScript language. -@result The double result of the conversion. -*/ -- (double)toDouble; - -/*! -@method -@abstract Convert a JSValue to an int32_t. -@discussion The JSValue is converted to an integer according to the rules specified - by the JavaScript language. -@result The int32_t result of the conversion. -*/ -- (int32_t)toInt32; - -/*! -@method -@abstract Convert a JSValue to a uint32_t. -@discussion The JSValue is converted to an integer according to the rules specified - by the JavaScript language. -@result The uint32_t result of the conversion. -*/ -- (uint32_t)toUInt32; - -/*! -@method -@abstract Convert a JSValue to a NSNumber. -@discussion If the JSValue represents a boolean, a NSNumber value of YES or NO - will be returned. For all other types the value will be converted to a number according - to the rules specified by the JavaScript language. -@result The NSNumber result of the conversion. -*/ -- (NSNumber *)toNumber; - -/*! -@method -@abstract Convert a JSValue to a NSString. -@discussion The JSValue is converted to a string according to the rules specified - by the JavaScript language. -@result The NSString containing the result of the conversion. -*/ -- (NSString *)toString; - -/*! -@method -@abstract Convert a JSValue to a NSDate. -@discussion The value is converted to a number representing a time interval - since 1970 which is then used to create a new NSDate instance. -@result The NSDate created using the converted time interval. -*/ -- (NSDate *)toDate; - -/*! -@method -@abstract Convert a JSValue to a NSArray. -@discussion If the value is null or undefined then nil is returned. - If the value is not an object then a JavaScript TypeError will be thrown. - The property length is read from the object, converted to an unsigned - integer, and an NSArray of this size is allocated. Properties corresponding - to indicies within the array bounds will be copied to the array, with - JSValues converted to equivalent Objective-C objects as specified. -@result The NSArray containing the recursively converted contents of the - converted JavaScript array. -*/ -- (NSArray *)toArray; - -/*! -@method -@abstract Convert a JSValue to a NSDictionary. -@discussion If the value is null or undefined then nil is returned. - If the value is not an object then a JavaScript TypeError will be thrown. - All enumerable properties of the object are copied to the dictionary, with - JSValues converted to equivalent Objective-C objects as specified. -@result The NSDictionary containing the recursively converted contents of - the converted JavaScript object. -*/ -- (NSDictionary *)toDictionary; - -/*! -@methodgroup Accessing Properties -*/ -/*! -@method -@abstract Access a property of a JSValue. -@result The JSValue for the requested property or the JSValue undefined - if the property does not exist. -*/ -- (JSValue *)valueForProperty:(NSString *)property; - -/*! -@method -@abstract Set a property on a JSValue. -*/ -- (void)setValue:(id)value forProperty:(NSString *)property; - -/*! -@method -@abstract Delete a property from a JSValue. -@result YES if deletion is successful, NO otherwise. -*/ -- (BOOL)deleteProperty:(NSString *)property; - -/*! -@method -@abstract Check if a JSValue has a property. -@discussion This method has the same function as the JavaScript operator in. -@result Returns YES if property is present on the value. -*/ -- (BOOL)hasProperty:(NSString *)property; - -/*! -@method -@abstract Define properties with custom descriptors on JSValues. -@discussion This method may be used to create a data or accessor property on an object. - This method operates in accordance with the Object.defineProperty method in the - JavaScript language. -*/ -- (void)defineProperty:(NSString *)property descriptor:(id)descriptor; - -/*! -@method -@abstract Access an indexed (numerical) property on a JSValue. -@result The JSValue for the property at the specified index. - Returns the JavaScript value undefined if no property exists at that index. -*/ -- (JSValue *)valueAtIndex:(NSUInteger)index; - -/*! -@method -@abstract Set an indexed (numerical) property on a JSValue. -@discussion For JSValues that are JavaScript arrays, indices greater than - UINT_MAX - 1 will not affect the length of the array. -*/ -- (void)setValue:(id)value atIndex:(NSUInteger)index; - -/*! -@methodgroup Checking JavaScript Types -*/ -/*! -@method -@abstract Check if a JSValue corresponds to the JavaScript value undefined. -*/ -- (BOOL)isUndefined; - -/*! -@method -@abstract Check if a JSValue corresponds to the JavaScript value null. -*/ -- (BOOL)isNull; - -/*! -@method -@abstract Check if a JSValue is a boolean. -*/ -- (BOOL)isBoolean; - -/*! -@method -@abstract Check if a JSValue is a number. -@discussion In JavaScript, there is no differentiation between types of numbers. - Semantically all numbers behave like doubles except in special cases like bit - operations. -*/ -- (BOOL)isNumber; - -/*! -@method -@abstract Check if a JSValue is a string. -*/ -- (BOOL)isString; - -/*! -@method -@abstract Check if a JSValue is an object. -*/ -- (BOOL)isObject; - -/*! -@method -@abstract Compare two JSValues using JavaScript's === operator. -*/ -- (BOOL)isEqualToObject:(id)value; - -/*! -@method -@abstract Compare two JSValues using JavaScript's == operator. -*/ -- (BOOL)isEqualWithTypeCoercionToObject:(id)value; - -/*! -@method -@abstract Check if a JSValue is an instance of another object. -@discussion This method has the same function as the JavaScript operator instanceof. - If an object other than a JSValue is passed, it will first be converted according to - the aforementioned rules. -*/ -- (BOOL)isInstanceOf:(id)value; - -/*! -@methodgroup Calling Functions and Constructors -*/ -/*! -@method -@abstract Invoke a JSValue as a function. -@discussion In JavaScript, if a function doesn't explicitly return a value then it - implicitly returns the JavaScript value undefined. -@param arguments The arguments to pass to the function. -@result The return value of the function call. -*/ -- (JSValue *)callWithArguments:(NSArray *)arguments; - -/*! -@method -@abstract Invoke a JSValue as a constructor. -@discussion This is equivalent to using the new syntax in JavaScript. -@param arguments The arguments to pass to the constructor. -@result The return value of the constructor call. -*/ -- (JSValue *)constructWithArguments:(NSArray *)arguments; - -/*! -@method -@abstract Invoke a method on a JSValue. -@discussion Accesses the property named method from this value and - calls the resulting value as a function, passing this JSValue as the this - value along with the specified arguments. -@param method The name of the method to be invoked. -@param arguments The arguments to pass to the method. -@result The return value of the method call. -*/ -- (JSValue *)invokeMethod:(NSString *)method withArguments:(NSArray *)arguments; - -@end - -/*! -@category -@discussion Objective-C methods exported to JavaScript may have argument and/or return - values of struct types, provided that conversion to and from the struct is - supported by JSValue. Support is provided for any types where JSValue - contains both a class method valueWith:inContext:, and and instance - method to- where the string in these selector names match, - with the first argument to the former being of the same struct type as the - return type of the latter. - Support is provided for structs of type CGPoint, NSRange, CGRect and CGSize. -*/ -@interface JSValue (StructSupport) - -/*! -@method -@abstract Create a JSValue from a CGPoint. -@result A newly allocated JavaScript object containing properties - named x and y, with values from the CGPoint. -*/ -+ (JSValue *)valueWithPoint:(CGPoint)point inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JSValue from a NSRange. -@result A newly allocated JavaScript object containing properties - named location and length, with values from the NSRange. -*/ -+ (JSValue *)valueWithRange:(NSRange)range inContext:(JSContext *)context; - -/*! -@method -@abstract -Create a JSValue from a CGRect. -@result A newly allocated JavaScript object containing properties - named x, y, width, and height, with values from the CGRect. -*/ -+ (JSValue *)valueWithRect:(CGRect)rect inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JSValue from a CGSize. -@result A newly allocated JavaScript object containing properties - named width and height, with values from the CGSize. -*/ -+ (JSValue *)valueWithSize:(CGSize)size inContext:(JSContext *)context; - -/*! -@method -@abstract Convert a JSValue to a CGPoint. -@discussion Reads the properties named x and y from - this JSValue, and converts the results to double. -@result The new CGPoint. -*/ -- (CGPoint)toPoint; - -/*! -@method -@abstract Convert a JSValue to an NSRange. -@discussion Reads the properties named location and - length from this JSValue and converts the results to double. -@result The new NSRange. -*/ -- (NSRange)toRange; - -/*! -@method -@abstract Convert a JSValue to a CGRect. -@discussion Reads the properties named x, y, - width, and height from this JSValue and converts the results to double. -@result The new CGRect. -*/ -- (CGRect)toRect; - -/*! -@method -@abstract Convert a JSValue to a CGSize. -@discussion Reads the properties named width and - height from this JSValue and converts the results to double. -@result The new CGSize. -*/ -- (CGSize)toSize; - -@end - -/*! -@category -@discussion Instances of JSValue implement the following methods in order to enable - support for subscript access by key and index, for example: - -@textblock - JSValue *objectA, *objectB; - JSValue *v1 = object[@"X"]; // Get value for property "X" from 'object'. - JSValue *v2 = object[42]; // Get value for index 42 from 'object'. - object[@"Y"] = v1; // Assign 'v1' to property "Y" of 'object'. - object[101] = v2; // Assign 'v2' to index 101 of 'object'. -@/textblock - - An object key passed as a subscript will be converted to a JavaScript value, - and then the value converted to a string used as a property name. -*/ -@interface JSValue (SubscriptSupport) - -- (JSValue *)objectForKeyedSubscript:(id)key; -- (JSValue *)objectAtIndexedSubscript:(NSUInteger)index; -- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key; -- (void)setObject:(id)object atIndexedSubscript:(NSUInteger)index; - -@end - -/*! -@category -@discussion These functions are for bridging between the C API and the Objective-C API. -*/ -@interface JSValue (JSValueRefSupport) - -/*! -@method -@abstract Creates a JSValue, wrapping its C API counterpart. -@param value -@param context -@result The Objective-C API equivalent of the specified JSValueRef. -*/ -+ (JSValue *)valueWithJSValueRef:(JSValueRef)value inContext:(JSContext *)context; - -/*! -@property -@abstract Returns the C API counterpart wrapped by a JSContext. -@result The C API equivalent of this JSValue. -*/ -@property (readonly) JSValueRef JSValueRef; -@end - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@group Property Descriptor Constants -@discussion These keys may assist in creating a property descriptor for use with the - defineProperty method on JSValue. - Property descriptors must fit one of three descriptions: - - Data Descriptor: - - A descriptor containing one or both of the keys value and writable, - and optionally containing one or both of the keys enumerable and - configurable. A data descriptor may not contain either the get or - set key. - A data descriptor may be used to create or modify the attributes of a - data property on an object (replacing any existing accessor property). - - Accessor Descriptor: - - A descriptor containing one or both of the keys get and set, and - optionally containing one or both of the keys enumerable and - configurable. An accessor descriptor may not contain either the value - or writable key. - An accessor descriptor may be used to create or modify the attributes of - an accessor property on an object (replacing any existing data property). - - Generic Descriptor: - - A descriptor containing one or both of the keys enumerable and - configurable. A generic descriptor may not contain any of the keys - value, writable, get, or set. - A generic descriptor may be used to modify the attributes of an existing - data or accessor property, or to create a new data property. -*/ -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorWritableKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorEnumerableKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorConfigurableKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorValueKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorGetKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorSetKey; - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif - -#endif // JSValue_h diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSValueRef.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSValueRef.h deleted file mode 100644 index 97385c01..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSValueRef.h +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSValueRef_h -#define JSValueRef_h - -#include -#include - -#ifndef __cplusplus -#include -#endif - -/*! -@enum JSType -@abstract A constant identifying the type of a JSValue. -@constant kJSTypeUndefined The unique undefined value. -@constant kJSTypeNull The unique null value. -@constant kJSTypeBoolean A primitive boolean value, one of true or false. -@constant kJSTypeNumber A primitive number value. -@constant kJSTypeString A primitive string value. -@constant kJSTypeObject An object value (meaning that this JSValueRef is a JSObjectRef). -*/ -typedef enum { - kJSTypeUndefined, - kJSTypeNull, - kJSTypeBoolean, - kJSTypeNumber, - kJSTypeString, - kJSTypeObject -} JSType; - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@function -@abstract Returns a JavaScript value's type. -@param ctx The execution context to use. -@param value The JSValue whose type you want to obtain. -@result A value of type JSType that identifies value's type. -*/ -JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the undefined type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the undefined type, otherwise false. -*/ -JS_EXPORT bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the null type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the null type, otherwise false. -*/ -JS_EXPORT bool JSValueIsNull(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the boolean type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the boolean type, otherwise false. -*/ -JS_EXPORT bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the number type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the number type, otherwise false. -*/ -JS_EXPORT bool JSValueIsNumber(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the string type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the string type, otherwise false. -*/ -JS_EXPORT bool JSValueIsString(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the object type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the object type, otherwise false. -*/ -JS_EXPORT bool JSValueIsObject(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value is an object with a given class in its class chain. -@param ctx The execution context to use. -@param value The JSValue to test. -@param jsClass The JSClass to test against. -@result true if value is an object and has jsClass in its class chain, otherwise false. -*/ -JS_EXPORT bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass); - -/* Comparing values */ - -/*! -@function -@abstract Tests whether two JavaScript values are equal, as compared by the JS == operator. -@param ctx The execution context to use. -@param a The first value to test. -@param b The second value to test. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result true if the two values are equal, false if they are not equal or an exception is thrown. -*/ -JS_EXPORT bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception); - -/*! -@function -@abstract Tests whether two JavaScript values are strict equal, as compared by the JS === operator. -@param ctx The execution context to use. -@param a The first value to test. -@param b The second value to test. -@result true if the two values are strict equal, otherwise false. -*/ -JS_EXPORT bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b); - -/*! -@function -@abstract Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator. -@param ctx The execution context to use. -@param value The JSValue to test. -@param constructor The constructor to test against. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false. -*/ -JS_EXPORT bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception); - -/* Creating values */ - -/*! -@function -@abstract Creates a JavaScript value of the undefined type. -@param ctx The execution context to use. -@result The unique undefined value. -*/ -JS_EXPORT JSValueRef JSValueMakeUndefined(JSContextRef ctx); - -/*! -@function -@abstract Creates a JavaScript value of the null type. -@param ctx The execution context to use. -@result The unique null value. -*/ -JS_EXPORT JSValueRef JSValueMakeNull(JSContextRef ctx); - -/*! -@function -@abstract Creates a JavaScript value of the boolean type. -@param ctx The execution context to use. -@param boolean The bool to assign to the newly created JSValue. -@result A JSValue of the boolean type, representing the value of boolean. -*/ -JS_EXPORT JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean); - -/*! -@function -@abstract Creates a JavaScript value of the number type. -@param ctx The execution context to use. -@param number The double to assign to the newly created JSValue. -@result A JSValue of the number type, representing the value of number. -*/ -JS_EXPORT JSValueRef JSValueMakeNumber(JSContextRef ctx, double number); - -/*! -@function -@abstract Creates a JavaScript value of the string type. -@param ctx The execution context to use. -@param string The JSString to assign to the newly created JSValue. The - newly created JSValue retains string, and releases it upon garbage collection. -@result A JSValue of the string type, representing the value of string. -*/ -JS_EXPORT JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string); - -/* Converting to and from JSON formatted strings */ - -/*! - @function - @abstract Creates a JavaScript value from a JSON formatted string. - @param ctx The execution context to use. - @param string The JSString containing the JSON string to be parsed. - @result A JSValue containing the parsed value, or NULL if the input is invalid. - */ -JS_EXPORT JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) CF_AVAILABLE(10_7, 7_0); - -/*! - @function - @abstract Creates a JavaScript string containing the JSON serialized representation of a JS value. - @param ctx The execution context to use. - @param value The value to serialize. - @param indent The number of spaces to indent when nesting. If 0, the resulting JSON will not contains newlines. The size of the indent is clamped to 10 spaces. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSString with the result of serialization, or NULL if an exception is thrown. - */ -JS_EXPORT JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef value, unsigned indent, JSValueRef* exception) CF_AVAILABLE(10_7, 7_0); - -/* Converting to primitive values */ - -/*! -@function -@abstract Converts a JavaScript value to boolean and returns the resulting boolean. -@param ctx The execution context to use. -@param value The JSValue to convert. -@result The boolean result of conversion. -*/ -JS_EXPORT bool JSValueToBoolean(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Converts a JavaScript value to number and returns the resulting number. -@param ctx The execution context to use. -@param value The JSValue to convert. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The numeric result of conversion, or NaN if an exception is thrown. -*/ -JS_EXPORT double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception); - -/*! -@function -@abstract Converts a JavaScript value to string and copies the result into a JavaScript string. -@param ctx The execution context to use. -@param value The JSValue to convert. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception); - -/*! -@function -@abstract Converts a JavaScript value to object and returns the resulting object. -@param ctx The execution context to use. -@param value The JSValue to convert. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSObject result of conversion, or NULL if an exception is thrown. -*/ -JS_EXPORT JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception); - -/* Garbage collection */ -/*! -@function -@abstract Protects a JavaScript value from garbage collection. -@param ctx The execution context to use. -@param value The JSValue to protect. -@discussion Use this method when you want to store a JSValue in a global or on the heap, where the garbage collector will not be able to discover your reference to it. - -A value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection. -*/ -JS_EXPORT void JSValueProtect(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Unprotects a JavaScript value from garbage collection. -@param ctx The execution context to use. -@param value The JSValue to unprotect. -@discussion A value may be protected multiple times and must be unprotected an - equal number of times before becoming eligible for garbage collection. -*/ -JS_EXPORT void JSValueUnprotect(JSContextRef ctx, JSValueRef value); - -#ifdef __cplusplus -} -#endif - -#endif /* JSValueRef_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSVirtualMachine.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSVirtualMachine.h deleted file mode 100644 index ccf9264d..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JSVirtualMachine.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -#if JSC_OBJC_API_ENABLED - -/*! -@interface -@discussion An instance of JSVirtualMachine represents a single JavaScript "object space" - or set of execution resources. Thread safety is supported by locking the - virtual machine, with concurrent JavaScript execution supported by allocating - separate instances of JSVirtualMachine. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSVirtualMachine : NSObject - -/*! -@methodgroup Creating New Virtual Machines -*/ -/*! -@method -@abstract Create a new JSVirtualMachine. -*/ -- (instancetype)init; - -/*! -@methodgroup Memory Management -*/ -/*! -@method -@abstract Notify the JSVirtualMachine of an external object relationship. -@discussion Allows clients of JSVirtualMachine to make the JavaScript runtime aware of - arbitrary external Objective-C object graphs. The runtime can then use - this information to retain any JavaScript values that are referenced - from somewhere in said object graph. - - For correct behavior clients must make their external object graphs - reachable from within the JavaScript runtime. If an Objective-C object is - reachable from within the JavaScript runtime, all managed references - transitively reachable from it as recorded using - -addManagedReference:withOwner: will be scanned by the garbage collector. -@param object The object that the owner points to. -@param owner The object that owns the pointed to object. -*/ -- (void)addManagedReference:(id)object withOwner:(id)owner; - -/*! -@method -@abstract Notify the JSVirtualMachine that a previous object relationship no longer exists. -@discussion The JavaScript runtime will continue to scan any references that were - reported to it by -addManagedReference:withOwner: until those references are removed. -@param object The object that was formerly owned. -@param owner The former owner. -*/ -- (void)removeManagedReference:(id)object withOwner:(id)owner; - -@end - -#endif diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JavaScript.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JavaScript.h deleted file mode 100644 index f8d92d8f..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JavaScript.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2006 Apple Inc. All rights reserved. - * Copyright (C) 2008 Alp Toker - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JavaScript_h -#define JavaScript_h - -#include -#include -#include -#include -#include - -#endif /* JavaScript_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JavaScriptCore.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JavaScriptCore.h deleted file mode 100644 index 40bea9c3..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/JavaScriptCore.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JavaScriptCore_h -#define JavaScriptCore_h - -#include -#include - -#if defined(__OBJC__) && JSC_OBJC_API_ENABLED - -#import "JSContext.h" -#import "JSValue.h" -#import "JSManagedValue.h" -#import "JSVirtualMachine.h" -#import "JSExport.h" - -#endif - -#endif /* JavaScriptCore_h */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/WebKitAvailability.h b/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/WebKitAvailability.h deleted file mode 100644 index ebb33bce..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/A/Headers/WebKitAvailability.h +++ /dev/null @@ -1,925 +0,0 @@ -/* - * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __WebKitAvailability__ -#define __WebKitAvailability__ - -/* The structure of this header is based on AvailabilityMacros.h. The major difference is that the availability - macros are defined in terms of WebKit version numbers rather than Mac OS X system version numbers, as WebKit - releases span multiple versions of Mac OS X. -*/ - -#define WEBKIT_VERSION_1_0 0x0100 -#define WEBKIT_VERSION_1_1 0x0110 -#define WEBKIT_VERSION_1_2 0x0120 -#define WEBKIT_VERSION_1_3 0x0130 -#define WEBKIT_VERSION_2_0 0x0200 -#define WEBKIT_VERSION_3_0 0x0300 -#define WEBKIT_VERSION_3_1 0x0310 -#define WEBKIT_VERSION_4_0 0x0400 -#define WEBKIT_VERSION_LATEST 0x9999 - -#ifdef __APPLE__ -#include -#include -#else -#define CF_AVAILABLE(_mac, _ios) -/* - * For non-Mac platforms, require the newest version. - */ -#define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST -/* - * only certain compilers support __attribute__((deprecated)) - */ -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) - #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#else - #define DEPRECATED_ATTRIBUTE -#endif -#endif - -/* The versions of GCC that shipped with Xcode prior to 3.0 (GCC build number < 5400) did not support attributes on methods. - If we are building with one of these versions, we need to omit the attribute. We achieve this by wrapping the annotation - in WEBKIT_OBJC_METHOD_ANNOTATION, which will remove the annotation when an old version of GCC is in use and will otherwise - expand to the annotation. The same is needed for protocol methods. -*/ -#if defined(__APPLE_CC__) && __APPLE_CC__ < 5400 - #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) -#else - #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION -#endif - - -/* If minimum WebKit version is not specified, assume the version that shipped with the target Mac OS X version */ -#ifndef WEBKIT_VERSION_MIN_REQUIRED - #if !defined(MAC_OS_X_VERSION_10_2) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 - #error WebKit was not available prior to Mac OS X 10.2 - #elif !defined(MAC_OS_X_VERSION_10_3) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 - /* WebKit 1.0 is the only version available on Mac OS X 10.2. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_0 - #elif !defined(MAC_OS_X_VERSION_10_4) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 - /* WebKit 1.1 is the version that shipped on Mac OS X 10.3. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_1 - #elif !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - /* WebKit 2.0 is the version that shipped on Mac OS X 10.4. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_2_0 - #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 - /* WebKit 3.0 is the version that shipped on Mac OS X 10.5. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_3_0 - #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 - /* WebKit 4.0 is the version that shipped on Mac OS X 10.6. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_4_0 - #else - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST - #endif -#endif - - -/* If maximum WebKit version is not specified, assume largerof(latest, minimum) */ -#ifndef WEBKIT_VERSION_MAX_ALLOWED - #if WEBKIT_VERSION_MIN_REQUIRED > WEBKIT_VERSION_LATEST - #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_MIN_REQUIRED - #else - #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_LATEST - #endif -#endif - - -/* Sanity check the configured values */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_MIN_REQUIRED - #error WEBKIT_VERSION_MAX_ALLOWED must be >= WEBKIT_VERSION_MIN_REQUIRED -#endif -#if WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_0 - #error WEBKIT_VERSION_MIN_REQUIRED must be >= WEBKIT_VERSION_1_0 -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER - * - * Used on functions introduced in WebKit 1.0 - */ -#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED - * - * Used on functions introduced in WebKit 1.0, - * and deprecated in WebKit 1.0 - */ -#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER - * - * Used on types deprecated in WebKit 1.0 - */ -#define DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER DEPRECATED_ATTRIBUTE - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER - * - * Used on declarations introduced in WebKit 1.1 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 1.1, - * and deprecated in WebKit 1.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 1.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER - * - * Used on types deprecated in WebKit 1.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 - #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER - * - * Used on declarations introduced in WebKit 1.2 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 1.2, - * and deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER - * - * Used on types deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER - * - * Used on declarations introduced in WebKit 1.3 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 1.3, - * and deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER - * - * Used on types deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER - * - * Used on declarations introduced in WebKit 2.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 2.0, - * and deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER - * - * Used on types deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER - * - * Used on declarations introduced in WebKit 3.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 3.0, - * and deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER - * - * Used on types deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER - * - * Used on declarations introduced in WebKit 3.1 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 3.1, - * and deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 3.0, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER - * - * Used on types deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 4.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_4_0 - #define AVAILABLE_IN_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_4_0 - #define AVAILABLE_IN_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_IN_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 4.0, - * and deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_IN_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.0, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.1, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on types deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_4_0 -#endif - - - - - - -/* - * AVAILABLE_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced after WebKit 4.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_LATEST - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_LATEST - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED - * - * Used on declarations introduced after WebKit 4.0, - * and deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_AFTER_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.0, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.1, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 4.0 - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER -#endif - -/* - * DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on types deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_AFTER_WEBKIT_VERSION_4_0 -#endif - - - - - - -/* - * AVAILABLE_AFTER_WEBKIT_VERSION_5_1 - * - * Used on functions introduced after WebKit 5.1 - */ -#define AVAILABLE_AFTER_WEBKIT_VERSION_5_1 - -/* AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_5_1 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated after WebKit 5.1 - */ -#define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_5_1 - - -#endif /* __WebKitAvailability__ */ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/A/JavaScriptCore b/Source/lib/ios/JavaScriptCore.framework/Versions/A/JavaScriptCore deleted file mode 100644 index f1696ffc..00000000 Binary files a/Source/lib/ios/JavaScriptCore.framework/Versions/A/JavaScriptCore and /dev/null differ diff --git a/Source/lib/ios/JavaScriptCore.framework/Versions/Current b/Source/lib/ios/JavaScriptCore.framework/Versions/Current deleted file mode 120000 index 8c7e5a66..00000000 --- a/Source/lib/ios/JavaScriptCore.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/Source/lib/tvos/JavaScriptCore.framework/Headers b/Source/lib/tvos/JavaScriptCore.framework/Headers deleted file mode 120000 index a177d2a6..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/Source/lib/tvos/JavaScriptCore.framework/JavaScriptCore b/Source/lib/tvos/JavaScriptCore.framework/JavaScriptCore deleted file mode 120000 index c9c4e601..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/JavaScriptCore +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/JavaScriptCore \ No newline at end of file diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSBase.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSBase.h deleted file mode 100644 index 6b4dc155..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSBase.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSBase_h -#define JSBase_h - -#ifndef __cplusplus -#include -#endif - -#ifdef __OBJC__ -#import -#endif - -/* JavaScript engine interface */ - -/*! @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. */ -typedef const struct OpaqueJSContextGroup* JSContextGroupRef; - -/*! @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state. */ -typedef const struct OpaqueJSContext* JSContextRef; - -/*! @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext. */ -typedef struct OpaqueJSContext* JSGlobalContextRef; - -/*! @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript. */ -typedef struct OpaqueJSString* JSStringRef; - -/*! @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior. */ -typedef struct OpaqueJSClass* JSClassRef; - -/*! @typedef JSPropertyNameArrayRef An array of JavaScript property names. */ -typedef struct OpaqueJSPropertyNameArray* JSPropertyNameArrayRef; - -/*! @typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object's properties. */ -typedef struct OpaqueJSPropertyNameAccumulator* JSPropertyNameAccumulatorRef; - - -/* JavaScript data types */ - -/*! @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them. */ -typedef const struct OpaqueJSValue* JSValueRef; - -/*! @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue. */ -typedef struct OpaqueJSValue* JSObjectRef; - -/* JavaScript symbol exports */ -/* These rules should stay the same as in WebKit2/Shared/API/c/WKBase.h */ - -#undef JS_EXPORT -#if defined(JS_NO_EXPORT) -#define JS_EXPORT -#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) -#define JS_EXPORT __attribute__((visibility("default"))) -#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) || defined(__CC_ARM) || defined(__ARMCC__) -#if defined(BUILDING_JavaScriptCore) || defined(STATICALLY_LINKED_WITH_JavaScriptCore) -#define JS_EXPORT __declspec(dllexport) -#else -#define JS_EXPORT __declspec(dllimport) -#endif -#else /* !defined(JS_NO_EXPORT) */ -#define JS_EXPORT -#endif /* defined(JS_NO_EXPORT) */ - -/* JS tests uses WTF but has no config.h, so we need to set the export defines here. */ -#ifndef WTF_EXPORT_PRIVATE -#define WTF_EXPORT_PRIVATE JS_EXPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Script Evaluation */ - -/*! -@function JSEvaluateScript -@abstract Evaluates a string of JavaScript. -@param ctx The execution context to use. -@param script A JSString containing the script to evaluate. -@param thisObject The object to use as "this," or NULL to use the global object as "this." -@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. -@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSValue that results from evaluating script, or NULL if an exception is thrown. -*/ -JS_EXPORT JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); - -/*! -@function JSCheckScriptSyntax -@abstract Checks for syntax errors in a string of JavaScript. -@param ctx The execution context to use. -@param script A JSString containing the script to check for syntax errors. -@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. -@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. -@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. -@result true if the script is syntactically correct, otherwise false. -*/ -JS_EXPORT bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); - -/*! -@function JSGarbageCollect -@abstract Performs a JavaScript garbage collection. -@param ctx The execution context to use. -@discussion JavaScript values that are on the machine stack, in a register, - protected by JSValueProtect, set as the global object of an execution context, - or reachable from any such value will not be collected. - - During JavaScript execution, you are not required to call this function; the - JavaScript engine will garbage collect as needed. JavaScript values created - within a context group are automatically destroyed when the last reference - to the context group is released. -*/ -JS_EXPORT void JSGarbageCollect(JSContextRef ctx); - -#ifdef __cplusplus -} -#endif - -/* Enable the Objective-C API for platforms with a modern runtime. */ -#if !defined(JSC_OBJC_API_ENABLED) -#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE))) -#endif - -#endif /* JSBase_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSContext.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSContext.h deleted file mode 100644 index e37113ca..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSContext.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSContext_h -#define JSContext_h - -#include - -#if JSC_OBJC_API_ENABLED - -@class JSVirtualMachine, JSValue; - -/*! -@interface -@discussion An instance of JSContext represents a JavaScript execution environment. All - JavaScript execution takes place within a context. - JSContext is also used to manage the life-cycle of objects within the - JavaScript virtual machine. Every instance of JSValue is associated with a - JSContext via a strong reference. The JSValue will keep the JSContext it - references alive so long as the JSValue remains alive. When all of the JSValues - that reference a particular JSContext have been deallocated the JSContext - will be deallocated unless it has been previously retained. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSContext : NSObject - -/*! -@methodgroup Creating New JSContexts -*/ -/*! -@method -@abstract Create a JSContext. -@result The new context. -*/ -- (instancetype)init; - -/*! -@method -@abstract Create a JSContext in the specified virtual machine. -@param virtualMachine The JSVirtualMachine in which the context will be created. -@result The new context. -*/ -- (instancetype)initWithVirtualMachine:(JSVirtualMachine *)virtualMachine; - -/*! -@methodgroup Evaluating Scripts -*/ -/*! -@method -@abstract Evaluate a string of JavaScript code. -@param script A string containing the JavaScript code to evaluate. -@result The last value generated by the script. -*/ -- (JSValue *)evaluateScript:(NSString *)script; - -/*! -@methodgroup Callback Accessors -*/ -/*! -@method -@abstract Get the JSContext that is currently executing. -@discussion This method may be called from within an Objective-C block or method invoked - as a callback from JavaScript to retrieve the callback's context. Outside of - a callback from JavaScript this method will return nil. -@result The currently executing JSContext or nil if there isn't one. -*/ -+ (JSContext *)currentContext; - -/*! -@method -@abstract Get the this value of the currently executing method. -@discussion This method may be called from within an Objective-C block or method invoked - as a callback from JavaScript to retrieve the callback's this value. Outside - of a callback from JavaScript this method will return nil. -@result The current this value or nil if there isn't one. -*/ -+ (JSValue *)currentThis; - -/*! -@method -@abstract Get the arguments to the current callback. -@discussion This method may be called from within an Objective-C block or method invoked - as a callback from JavaScript to retrieve the callback's arguments, objects - in the returned array are instances of JSValue. Outside of a callback from - JavaScript this method will return nil. -@result An NSArray of the arguments nil if there is no current callback. -*/ -+ (NSArray *)currentArguments; - -/*! -@methodgroup Global Properties -*/ -/*! -@property -@abstract Get the global object of the context. -@discussion This method retrieves the global object of the JavaScript execution context. - Instances of JSContext originating from WebKit will return a reference to the - WindowProxy object. -@result The global object. -*/ -@property (readonly, strong) JSValue *globalObject; - -/*! -@property -@discussion The exception property may be used to throw an exception to JavaScript. - - Before a callback is made from JavaScript to an Objective-C block or method, - the prior value of the exception property will be preserved and the property - will be set to nil. After the callback has completed the new value of the - exception property will be read, and prior value restored. If the new value - of exception is not nil, the callback will result in that value being thrown. - - This property may also be used to check for uncaught exceptions arising from - API function calls (since the default behaviour of exceptionHandler is to - assign an uncaught exception to this property). - - If a JSValue originating from a different JSVirtualMachine than this context - is assigned to this property, an Objective-C exception will be raised. -*/ -@property (strong) JSValue *exception; - -/*! -@property -@discussion If a call to an API function results in an uncaught JavaScript exception, the - exceptionHandler block will be invoked. The default implementation for the - exception handler will store the exception to the exception property on - context. As a consequence the default behaviour is for unhandled exceptions - occurring within a callback from JavaScript to be rethrown upon return. - Setting this value to nil will result in all uncaught exceptions thrown from - the API being silently consumed. -*/ -@property (copy) void(^exceptionHandler)(JSContext *context, JSValue *exception); - -/*! -@property -@discussion All instances of JSContext are associated with a single JSVirtualMachine. The - virtual machine provides an "object space" or set of execution resources. -*/ -@property (readonly, strong) JSVirtualMachine *virtualMachine; - -/*! -@property -@discussion Name of the JSContext. Exposed when remote debugging the context. -*/ -@property (copy) NSString *name; - -@end - -/*! -@category -@discussion Instances of JSContext implement the following methods in order to enable - support for subscript access by key and index, for example: - -@textblock - JSContext *context; - JSValue *v = context[@"X"]; // Get value for "X" from the global object. - context[@"Y"] = v; // Assign 'v' to "Y" on the global object. -@/textblock - - An object key passed as a subscript will be converted to a JavaScript value, - and then the value converted to a string used to resolve a property of the - global object. -*/ -@interface JSContext (SubscriptSupport) - -/*! -method -@abstract Get a particular property on the global object. -@param key -@result The JSValue for the global object's property. -*/ -- (JSValue *)objectForKeyedSubscript:(id)key; - -/*! -method -@abstract Set a particular property on the global object. -@param object -@param key -*/ -- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key; - -@end - -/*! -@category -@discussion These functions are for bridging between the C API and the Objective-C API. -*/ -@interface JSContext (JSContextRefSupport) - -/*! -@method -@abstract Create a JSContext, wrapping its C API counterpart. -@param jsGlobalContextRef -@result The JSContext equivalent of the provided JSGlobalContextRef. -*/ -+ (JSContext *)contextWithJSGlobalContextRef:(JSGlobalContextRef)jsGlobalContextRef; - -/*! -@property -@abstract Get the C API counterpart wrapped by a JSContext. -@result The C API equivalent of this JSContext. -*/ -@property (readonly) JSGlobalContextRef JSGlobalContextRef; -@end - -#endif - -#endif // JSContext_h diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSContextRef.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSContextRef.h deleted file mode 100644 index c8db1e56..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSContextRef.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSContextRef_h -#define JSContextRef_h - -#include -#include -#include - -#ifndef __cplusplus -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@function -@abstract Creates a JavaScript context group. -@discussion A JSContextGroup associates JavaScript contexts with one another. - Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging - JavaScript objects between contexts in different groups will produce undefined behavior. - When objects from the same context group are used in multiple threads, explicit - synchronization is required. -@result The created JSContextGroup. -*/ -JS_EXPORT JSContextGroupRef JSContextGroupCreate() CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Retains a JavaScript context group. -@param group The JSContextGroup to retain. -@result A JSContextGroup that is the same as group. -*/ -JS_EXPORT JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Releases a JavaScript context group. -@param group The JSContextGroup to release. -*/ -JS_EXPORT void JSContextGroupRelease(JSContextGroupRef group) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Creates a global JavaScript execution context. -@discussion JSGlobalContextCreate allocates a global object and populates it with all the - built-in JavaScript objects, such as Object, Function, String, and Array. - - In WebKit version 4.0 and later, the context is created in a unique context group. - Therefore, scripts may execute in it concurrently with scripts executing in other contexts. - However, you may not use values created in the context in other contexts. -@param globalObjectClass The class to use when creating the global object. Pass - NULL to use the default object class. -@result A JSGlobalContext with a global object of class globalObjectClass. -*/ -JS_EXPORT JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) CF_AVAILABLE(10_5, 7_0); - -/*! -@function -@abstract Creates a global JavaScript execution context in the context group provided. -@discussion JSGlobalContextCreateInGroup allocates a global object and populates it with - all the built-in JavaScript objects, such as Object, Function, String, and Array. -@param globalObjectClass The class to use when creating the global object. Pass - NULL to use the default object class. -@param group The context group to use. The created global context retains the group. - Pass NULL to create a unique group for the context. -@result A JSGlobalContext with a global object of class globalObjectClass and a context - group equal to group. -*/ -JS_EXPORT JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Retains a global JavaScript execution context. -@param ctx The JSGlobalContext to retain. -@result A JSGlobalContext that is the same as ctx. -*/ -JS_EXPORT JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx); - -/*! -@function -@abstract Releases a global JavaScript execution context. -@param ctx The JSGlobalContext to release. -*/ -JS_EXPORT void JSGlobalContextRelease(JSGlobalContextRef ctx); - -/*! -@function -@abstract Gets the global object of a JavaScript execution context. -@param ctx The JSContext whose global object you want to get. -@result ctx's global object. -*/ -JS_EXPORT JSObjectRef JSContextGetGlobalObject(JSContextRef ctx); - -/*! -@function -@abstract Gets the context group to which a JavaScript execution context belongs. -@param ctx The JSContext whose group you want to get. -@result ctx's group. -*/ -JS_EXPORT JSContextGroupRef JSContextGetGroup(JSContextRef ctx) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Gets the global context of a JavaScript execution context. -@param ctx The JSContext whose global context you want to get. -@result ctx's global context. -*/ -JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) CF_AVAILABLE(10_7, 7_0); - -/*! -@function -@abstract Gets a copy of the name of a context. -@param ctx The JSGlobalContext whose name you want to get. -@result The name for ctx. -@discussion A JSGlobalContext's name is exposed for remote debugging to make it -easier to identify the context you would like to attach to. -*/ -JS_EXPORT JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx); - -/*! -@function -@abstract Sets the remote debugging name for a context. -@param ctx The JSGlobalContext that you want to name. -@param name The remote debugging name to set on ctx. -*/ -JS_EXPORT void JSGlobalContextSetName(JSGlobalContextRef ctx, JSStringRef name); - -#ifdef __cplusplus -} -#endif - -#endif /* JSContextRef_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSExport.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSExport.h deleted file mode 100644 index 2d78dcc7..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSExport.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -#if JSC_OBJC_API_ENABLED - -/*! -@protocol -@abstract JSExport provides a declarative way to export Objective-C instance methods, - class methods, and properties to JavaScript code. - -@discussion When a JavaScript value is created from an instance of an Objective-C class - for which no copying conversion is specified a JavaScript wrapper object will - be created. - - In JavaScript, inheritance is supported via a chain of prototype objects, and - for each Objective-C class (and per JSContext) an object appropriate for use - as a prototype will be provided. For the class NSObject the prototype object - will be the JavaScript context's Object Prototype. For all other Objective-C - classes a Prototype object will be created. The Prototype object for a given - Objective-C class will have its internal [Prototype] property set to point to - the Prototype object of the Objective-C class's superclass. As such the - prototype chain for a JavaScript wrapper object will reflect the wrapped - Objective-C type's inheritance hierarchy. - - In addition to the Prototype object a JavaScript Constructor object will also - be produced for each Objective-C class. The Constructor object has a property - named 'prototype' that references the Prototype object, and the Prototype - object has a property named 'constructor' that references the Constructor. - The Constructor object is not callable. - - By default no methods or properties of the Objective-C class will be exposed - to JavaScript; however methods and properties may explicitly be exported. - For each protocol that a class conforms to, if the protocol incorporates the - protocol JSExport, then the protocol will be interpreted as a list of methods - and properties to be exported to JavaScript. - - For each instance method being exported a corresponding JavaScript function - will be assigned as a property of the Prototype object. For each Objective-C - property being exported a JavaScript accessor property will be created on the - Prototype. For each class method exported a JavaScript function will be - created on the Constructor object. For example: - -
-@textblock
-    @protocol MyClassJavaScriptMethods 
-    - (void)foo;
-    @end
-
-    @interface MyClass : NSObject 
-    - (void)foo;
-    - (void)bar;
-    @end
-@/textblock
-
- - Data properties that are created on the prototype or constructor objects have - the attributes: writable:true, enumerable:false, configurable:true. - Accessor properties have the attributes: enumerable:false and configurable:true. - - If an instance of MyClass is converted to a JavaScript value, the resulting - wrapper object will (via its prototype) export the method foo to JavaScript, - since the class conforms to the MyClassJavaScriptMethods protocol, and this - protocol incorporates JSExport. bar will not be exported. - - Properties, arguments, and return values of the following types are - supported: - - Primitive numbers: signed values of up to 32-bits are converted in a manner - consistent with valueWithInt32/toInt32, unsigned values of up to 32-bits - are converted in a manner consistent with valueWithUInt32/toUInt32, all - other numeric values are converted consistently with valueWithDouble/ - toDouble. - - BOOL: values are converted consistently with valueWithBool/toBool. - - id: values are converted consistently with valueWithObject/toObject. - - Objective-C Class: - where the type is a pointer to a specified Objective-C - class, conversion is consistent with valueWithObjectOfClass/toObject. - - struct types: C struct types are supported, where JSValue provides support - for the given type. Support is built in for CGPoint, NSRange, CGRect, and - CGSize. - - block types: Blocks can only be passed if they had been converted - successfully by valueWithObject/toObject previously. - - For any interface that conforms to JSExport the normal copying conversion for - built in types will be inhibited - so, for example, if an instance that - derives from NSString but conforms to JSExport is passed to valueWithObject: - then a wrapper object for the Objective-C object will be returned rather than - a JavaScript string primitive. -*/ -@protocol JSExport -@end - -/*! -@define -@abstract Rename a selector when it's exported to JavaScript. -@discussion When a selector that takes one or more arguments is converted to a JavaScript - property name, by default a property name will be generated by performing the - following conversion: - - - All colons are removed from the selector - - - Any lowercase letter that had followed a colon will be capitalized. - - Under the default conversion a selector doFoo:withBar: will be exported as - doFooWithBar. The default conversion may be overriden using the JSExportAs - macro, for example to export a method doFoo:withBar: as doFoo: - -
-@textblock
-    @protocol MyClassJavaScriptMethods 
-    JSExportAs(doFoo,
-    - (void)doFoo:(id)foo withBar:(id)bar
-    );
-    @end
-@/textblock
-
- - Note that the JSExport macro may only be applied to a selector that takes one - or more argument. -*/ -#define JSExportAs(PropertyName, Selector) \ - @optional Selector __JS_EXPORT_AS__##PropertyName:(id)argument; @required Selector - -#endif diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSManagedValue.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSManagedValue.h deleted file mode 100644 index b78658b6..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSManagedValue.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSManagedValue_h -#define JSManagedValue_h - -#import - -#if JSC_OBJC_API_ENABLED - -@class JSValue; -@class JSContext; - -/*! -@interface -@discussion JSManagedValue represents a "conditionally retained" JSValue. - "Conditionally retained" means that as long as either the JSManagedValue's - JavaScript value is reachable through the JavaScript object graph - or the JSManagedValue object is reachable through the external Objective-C - object graph as reported to the JSVirtualMachine using - addManagedReference:withOwner:, the corresponding JavaScript value will - be retained. However, if neither of these conditions are true, the - corresponding JSValue will be released and set to nil. - - The primary use case for JSManagedValue is for safely referencing JSValues - from the Objective-C heap. It is incorrect to store a JSValue into an - Objective-C heap object, as this can very easily create a reference cycle, - keeping the entire JSContext alive. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSManagedValue : NSObject - -/*! -@method -@abstract Create a JSManagedValue from a JSValue. -@param value -@result The new JSManagedValue. -*/ -+ (JSManagedValue *)managedValueWithValue:(JSValue *)value; - -/*! -@method -@abstract Create a JSManagedValue. -@param value -@result The new JSManagedValue. -*/ -- (instancetype)initWithValue:(JSValue *)value; - -/*! -@property -@abstract Get the JSValue from the JSManagedValue. -@result The corresponding JSValue for this JSManagedValue or - nil if the JSValue has been collected. -*/ -@property (readonly, strong) JSValue *value; - -@end - -#endif // JSC_OBJC_API_ENABLED - -#endif // JSManagedValue_h diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSObjectRef.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSObjectRef.h deleted file mode 100644 index 6aa84358..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSObjectRef.h +++ /dev/null @@ -1,694 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. - * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSObjectRef_h -#define JSObjectRef_h - -#include -#include -#include - -#ifndef __cplusplus -#include -#endif -#include /* for size_t */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@enum JSPropertyAttribute -@constant kJSPropertyAttributeNone Specifies that a property has no special attributes. -@constant kJSPropertyAttributeReadOnly Specifies that a property is read-only. -@constant kJSPropertyAttributeDontEnum Specifies that a property should not be enumerated by JSPropertyEnumerators and JavaScript for...in loops. -@constant kJSPropertyAttributeDontDelete Specifies that the delete operation should fail on a property. -*/ -enum { - kJSPropertyAttributeNone = 0, - kJSPropertyAttributeReadOnly = 1 << 1, - kJSPropertyAttributeDontEnum = 1 << 2, - kJSPropertyAttributeDontDelete = 1 << 3 -}; - -/*! -@typedef JSPropertyAttributes -@abstract A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together. -*/ -typedef unsigned JSPropertyAttributes; - -/*! -@enum JSClassAttribute -@constant kJSClassAttributeNone Specifies that a class has no special attributes. -@constant kJSClassAttributeNoAutomaticPrototype Specifies that a class should not automatically generate a shared prototype for its instance objects. Use kJSClassAttributeNoAutomaticPrototype in combination with JSObjectSetPrototype to manage prototypes manually. -*/ -enum { - kJSClassAttributeNone = 0, - kJSClassAttributeNoAutomaticPrototype = 1 << 1 -}; - -/*! -@typedef JSClassAttributes -@abstract A set of JSClassAttributes. Combine multiple attributes by logically ORing them together. -*/ -typedef unsigned JSClassAttributes; - -/*! -@typedef JSObjectInitializeCallback -@abstract The callback invoked when an object is first created. -@param ctx The execution context to use. -@param object The JSObject being created. -@discussion If you named your function Initialize, you would declare it like this: - -void Initialize(JSContextRef ctx, JSObjectRef object); - -Unlike the other object callbacks, the initialize callback is called on the least -derived class (the parent class) first, and the most derived class last. -*/ -typedef void -(*JSObjectInitializeCallback) (JSContextRef ctx, JSObjectRef object); - -/*! -@typedef JSObjectFinalizeCallback -@abstract The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread. -@param object The JSObject being finalized. -@discussion If you named your function Finalize, you would declare it like this: - -void Finalize(JSObjectRef object); - -The finalize callback is called on the most derived class first, and the least -derived class (the parent class) last. - -You must not call any function that may cause a garbage collection or an allocation -of a garbage collected object from within a JSObjectFinalizeCallback. This includes -all functions that have a JSContextRef parameter. -*/ -typedef void -(*JSObjectFinalizeCallback) (JSObjectRef object); - -/*! -@typedef JSObjectHasPropertyCallback -@abstract The callback invoked when determining whether an object has a property. -@param ctx The execution context to use. -@param object The JSObject to search for the property. -@param propertyName A JSString containing the name of the property look up. -@result true if object has the property, otherwise false. -@discussion If you named your function HasProperty, you would declare it like this: - -bool HasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - -If this function returns false, the hasProperty request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain. - -This callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value would be expensive. - -If this callback is NULL, the getProperty callback will be used to service hasProperty requests. -*/ -typedef bool -(*JSObjectHasPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - -/*! -@typedef JSObjectGetPropertyCallback -@abstract The callback invoked when getting a property's value. -@param ctx The execution context to use. -@param object The JSObject to search for the property. -@param propertyName A JSString containing the name of the property to get. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result The property's value if object has the property, otherwise NULL. -@discussion If you named your function GetProperty, you would declare it like this: - -JSValueRef GetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -If this function returns NULL, the get request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain. -*/ -typedef JSValueRef -(*JSObjectGetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@typedef JSObjectSetPropertyCallback -@abstract The callback invoked when setting a property's value. -@param ctx The execution context to use. -@param object The JSObject on which to set the property's value. -@param propertyName A JSString containing the name of the property to set. -@param value A JSValue to use as the property's value. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result true if the property was set, otherwise false. -@discussion If you named your function SetProperty, you would declare it like this: - -bool SetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - -If this function returns false, the set request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). -*/ -typedef bool -(*JSObjectSetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); - -/*! -@typedef JSObjectDeletePropertyCallback -@abstract The callback invoked when deleting a property. -@param ctx The execution context to use. -@param object The JSObject in which to delete the property. -@param propertyName A JSString containing the name of the property to delete. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result true if propertyName was successfully deleted, otherwise false. -@discussion If you named your function DeleteProperty, you would declare it like this: - -bool DeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -If this function returns false, the delete request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). -*/ -typedef bool -(*JSObjectDeletePropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@typedef JSObjectGetPropertyNamesCallback -@abstract The callback invoked when collecting the names of an object's properties. -@param ctx The execution context to use. -@param object The JSObject whose property names are being collected. -@param accumulator A JavaScript property name accumulator in which to accumulate the names of object's properties. -@discussion If you named your function GetPropertyNames, you would declare it like this: - -void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); - -Property name accumulators are used by JSObjectCopyPropertyNames and JavaScript for...in loops. - -Use JSPropertyNameAccumulatorAddName to add property names to accumulator. A class's getPropertyNames callback only needs to provide the names of properties that the class vends through a custom getProperty or setProperty callback. Other properties, including statically declared properties, properties vended by other classes, and properties belonging to object's prototype, are added independently. -*/ -typedef void -(*JSObjectGetPropertyNamesCallback) (JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); - -/*! -@typedef JSObjectCallAsFunctionCallback -@abstract The callback invoked when an object is called as a function. -@param ctx The execution context to use. -@param function A JSObject that is the function being called. -@param thisObject A JSObject that is the 'this' variable in the function's scope. -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of the arguments passed to the function. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result A JSValue that is the function's return value. -@discussion If you named your function CallAsFunction, you would declare it like this: - -JSValueRef CallAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -If your callback were invoked by the JavaScript expression 'myObject.myFunction()', function would be set to myFunction, and thisObject would be set to myObject. - -If this callback is NULL, calling your object as a function will throw an exception. -*/ -typedef JSValueRef -(*JSObjectCallAsFunctionCallback) (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@typedef JSObjectCallAsConstructorCallback -@abstract The callback invoked when an object is used as a constructor in a 'new' expression. -@param ctx The execution context to use. -@param constructor A JSObject that is the constructor being called. -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of the arguments passed to the function. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result A JSObject that is the constructor's return value. -@discussion If you named your function CallAsConstructor, you would declare it like this: - -JSObjectRef CallAsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -If your callback were invoked by the JavaScript expression 'new myConstructor()', constructor would be set to myConstructor. - -If this callback is NULL, using your object as a constructor in a 'new' expression will throw an exception. -*/ -typedef JSObjectRef -(*JSObjectCallAsConstructorCallback) (JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@typedef JSObjectHasInstanceCallback -@abstract hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. -@param ctx The execution context to use. -@param constructor The JSObject that is the target of the 'instanceof' expression. -@param possibleInstance The JSValue being tested to determine if it is an instance of constructor. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result true if possibleInstance is an instance of constructor, otherwise false. -@discussion If you named your function HasInstance, you would declare it like this: - -bool HasInstance(JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception); - -If your callback were invoked by the JavaScript expression 'someValue instanceof myObject', constructor would be set to myObject and possibleInstance would be set to someValue. - -If this callback is NULL, 'instanceof' expressions that target your object will return false. - -Standard JavaScript practice calls for objects that implement the callAsConstructor callback to implement the hasInstance callback as well. -*/ -typedef bool -(*JSObjectHasInstanceCallback) (JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception); - -/*! -@typedef JSObjectConvertToTypeCallback -@abstract The callback invoked when converting an object to a particular JavaScript type. -@param ctx The execution context to use. -@param object The JSObject to convert. -@param type A JSType specifying the JavaScript type to convert to. -@param exception A pointer to a JSValueRef in which to return an exception, if any. -@result The objects's converted value, or NULL if the object was not converted. -@discussion If you named your function ConvertToType, you would declare it like this: - -JSValueRef ConvertToType(JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception); - -If this function returns false, the conversion request forwards to object's parent class chain (which includes the default object class). - -This function is only invoked when converting an object to number or string. An object converted to boolean is 'true.' An object converted to object is itself. -*/ -typedef JSValueRef -(*JSObjectConvertToTypeCallback) (JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception); - -/*! -@struct JSStaticValue -@abstract This structure describes a statically declared value property. -@field name A null-terminated UTF8 string containing the property's name. -@field getProperty A JSObjectGetPropertyCallback to invoke when getting the property's value. -@field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value. May be NULL if the ReadOnly attribute is set. -@field attributes A logically ORed set of JSPropertyAttributes to give to the property. -*/ -typedef struct { - const char* name; - JSObjectGetPropertyCallback getProperty; - JSObjectSetPropertyCallback setProperty; - JSPropertyAttributes attributes; -} JSStaticValue; - -/*! -@struct JSStaticFunction -@abstract This structure describes a statically declared function property. -@field name A null-terminated UTF8 string containing the property's name. -@field callAsFunction A JSObjectCallAsFunctionCallback to invoke when the property is called as a function. -@field attributes A logically ORed set of JSPropertyAttributes to give to the property. -*/ -typedef struct { - const char* name; - JSObjectCallAsFunctionCallback callAsFunction; - JSPropertyAttributes attributes; -} JSStaticFunction; - -/*! -@struct JSClassDefinition -@abstract This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL. -@field version The version number of this structure. The current version is 0. -@field attributes A logically ORed set of JSClassAttributes to give to the class. -@field className A null-terminated UTF8 string containing the class's name. -@field parentClass A JSClass to set as the class's parent class. Pass NULL use the default object class. -@field staticValues A JSStaticValue array containing the class's statically declared value properties. Pass NULL to specify no statically declared value properties. The array must be terminated by a JSStaticValue whose name field is NULL. -@field staticFunctions A JSStaticFunction array containing the class's statically declared function properties. Pass NULL to specify no statically declared function properties. The array must be terminated by a JSStaticFunction whose name field is NULL. -@field initialize The callback invoked when an object is first created. Use this callback to initialize the object. -@field finalize The callback invoked when an object is finalized (prepared for garbage collection). Use this callback to release resources allocated for the object, and perform other cleanup. -@field hasProperty The callback invoked when determining whether an object has a property. If this field is NULL, getProperty is called instead. The hasProperty callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value is expensive. -@field getProperty The callback invoked when getting a property's value. -@field setProperty The callback invoked when setting a property's value. -@field deleteProperty The callback invoked when deleting a property. -@field getPropertyNames The callback invoked when collecting the names of an object's properties. -@field callAsFunction The callback invoked when an object is called as a function. -@field hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. -@field callAsConstructor The callback invoked when an object is used as a constructor in a 'new' expression. -@field convertToType The callback invoked when converting an object to a particular JavaScript type. -@discussion The staticValues and staticFunctions arrays are the simplest and most efficient means for vending custom properties. Statically declared properties autmatically service requests like getProperty, setProperty, and getPropertyNames. Property access callbacks are required only to implement unusual properties, like array indexes, whose names are not known at compile-time. - -If you named your getter function "GetX" and your setter function "SetX", you would declare a JSStaticValue array containing "X" like this: - -JSStaticValue StaticValueArray[] = { - { "X", GetX, SetX, kJSPropertyAttributeNone }, - { 0, 0, 0, 0 } -}; - -Standard JavaScript practice calls for storing function objects in prototypes, so they can be shared. The default JSClass created by JSClassCreate follows this idiom, instantiating objects with a shared, automatically generating prototype containing the class's function objects. The kJSClassAttributeNoAutomaticPrototype attribute specifies that a JSClass should not automatically generate such a prototype. The resulting JSClass instantiates objects with the default object prototype, and gives each instance object its own copy of the class's function objects. - -A NULL callback specifies that the default object callback should substitute, except in the case of hasProperty, where it specifies that getProperty should substitute. -*/ -typedef struct { - int version; /* current (and only) version is 0 */ - JSClassAttributes attributes; - - const char* className; - JSClassRef parentClass; - - const JSStaticValue* staticValues; - const JSStaticFunction* staticFunctions; - - JSObjectInitializeCallback initialize; - JSObjectFinalizeCallback finalize; - JSObjectHasPropertyCallback hasProperty; - JSObjectGetPropertyCallback getProperty; - JSObjectSetPropertyCallback setProperty; - JSObjectDeletePropertyCallback deleteProperty; - JSObjectGetPropertyNamesCallback getPropertyNames; - JSObjectCallAsFunctionCallback callAsFunction; - JSObjectCallAsConstructorCallback callAsConstructor; - JSObjectHasInstanceCallback hasInstance; - JSObjectConvertToTypeCallback convertToType; -} JSClassDefinition; - -/*! -@const kJSClassDefinitionEmpty -@abstract A JSClassDefinition structure of the current version, filled with NULL pointers and having no attributes. -@discussion Use this constant as a convenience when creating class definitions. For example, to create a class definition with only a finalize method: - -JSClassDefinition definition = kJSClassDefinitionEmpty; -definition.finalize = Finalize; -*/ -JS_EXPORT extern const JSClassDefinition kJSClassDefinitionEmpty; - -/*! -@function -@abstract Creates a JavaScript class suitable for use with JSObjectMake. -@param definition A JSClassDefinition that defines the class. -@result A JSClass with the given definition. Ownership follows the Create Rule. -*/ -JS_EXPORT JSClassRef JSClassCreate(const JSClassDefinition* definition); - -/*! -@function -@abstract Retains a JavaScript class. -@param jsClass The JSClass to retain. -@result A JSClass that is the same as jsClass. -*/ -JS_EXPORT JSClassRef JSClassRetain(JSClassRef jsClass); - -/*! -@function -@abstract Releases a JavaScript class. -@param jsClass The JSClass to release. -*/ -JS_EXPORT void JSClassRelease(JSClassRef jsClass); - -/*! -@function -@abstract Creates a JavaScript object. -@param ctx The execution context to use. -@param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. -@param data A void* to set as the object's private data. Pass NULL to specify no private data. -@result A JSObject with the given class and private data. -@discussion The default object class does not allocate storage for private data, so you must provide a non-NULL jsClass to JSObjectMake if you want your object to be able to store private data. - -data is set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate. -*/ -JS_EXPORT JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data); - -/*! -@function -@abstract Convenience method for creating a JavaScript function with a given callback as its implementation. -@param ctx The execution context to use. -@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. -@param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called. -@result A JSObject that is a function. The object's prototype will be the default function prototype. -*/ -JS_EXPORT JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction); - -/*! -@function -@abstract Convenience method for creating a JavaScript constructor. -@param ctx The execution context to use. -@param jsClass A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor's .prototype property, and to evaluate 'instanceof' expressions. Pass NULL to use the default object class. -@param callAsConstructor A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a 'new' expression. Pass NULL to use the default object constructor. -@result A JSObject that is a constructor. The object's prototype will be the default object prototype. -@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data. -*/ -JS_EXPORT JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor); - -/*! - @function - @abstract Creates a JavaScript Array object. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is an Array. - @discussion The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument - is supplied, this function returns an array with one element. - */ -JS_EXPORT JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! - @function - @abstract Creates a JavaScript Date object, as if by invoking the built-in Date constructor. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is a Date. - */ -JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! - @function - @abstract Creates a JavaScript Error object, as if by invoking the built-in Error constructor. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is a Error. - */ -JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! - @function - @abstract Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor. - @param ctx The execution context to use. - @param argumentCount An integer count of the number of arguments in arguments. - @param arguments A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSObject that is a RegExp. - */ -JS_EXPORT JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) CF_AVAILABLE(10_6, 7_0); - -/*! -@function -@abstract Creates a function with a given script as its body. -@param ctx The execution context to use. -@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. -@param parameterCount An integer count of the number of parameter names in parameterNames. -@param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0. -@param body A JSString containing the script to use as the function's body. -@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. -@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. -@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. -@result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype. -@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution. -*/ -JS_EXPORT JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); - -/*! -@function -@abstract Gets an object's prototype. -@param ctx The execution context to use. -@param object A JSObject whose prototype you want to get. -@result A JSValue that is the object's prototype. -*/ -JS_EXPORT JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Sets an object's prototype. -@param ctx The execution context to use. -@param object The JSObject whose prototype you want to set. -@param value A JSValue to set as the object's prototype. -*/ -JS_EXPORT void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value); - -/*! -@function -@abstract Tests whether an object has a given property. -@param object The JSObject to test. -@param propertyName A JSString containing the property's name. -@result true if the object has a property whose name matches propertyName, otherwise false. -*/ -JS_EXPORT bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); - -/*! -@function -@abstract Gets a property from an object. -@param ctx The execution context to use. -@param object The JSObject whose property you want to get. -@param propertyName A JSString containing the property's name. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The property's value if object has the property, otherwise the undefined value. -*/ -JS_EXPORT JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@function -@abstract Sets a property on an object. -@param ctx The execution context to use. -@param object The JSObject whose property you want to set. -@param propertyName A JSString containing the property's name. -@param value A JSValue to use as the property's value. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@param attributes A logically ORed set of JSPropertyAttributes to give to the property. -*/ -JS_EXPORT void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception); - -/*! -@function -@abstract Deletes a property from an object. -@param ctx The execution context to use. -@param object The JSObject whose property you want to delete. -@param propertyName A JSString containing the property's name. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set). -*/ -JS_EXPORT bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); - -/*! -@function -@abstract Gets a property from an object by numeric index. -@param ctx The execution context to use. -@param object The JSObject whose property you want to get. -@param propertyIndex An integer value that is the property's name. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The property's value if object has the property, otherwise the undefined value. -@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties. -*/ -JS_EXPORT JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception); - -/*! -@function -@abstract Sets a property on an object by numeric index. -@param ctx The execution context to use. -@param object The JSObject whose property you want to set. -@param propertyIndex The property's name as a number. -@param value A JSValue to use as the property's value. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties. -*/ -JS_EXPORT void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception); - -/*! -@function -@abstract Gets an object's private data. -@param object A JSObject whose private data you want to get. -@result A void* that is the object's private data, if the object has private data, otherwise NULL. -*/ -JS_EXPORT void* JSObjectGetPrivate(JSObjectRef object); - -/*! -@function -@abstract Sets a pointer to private data on an object. -@param object The JSObject whose private data you want to set. -@param data A void* to set as the object's private data. -@result true if object can store private data, otherwise false. -@discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data. -*/ -JS_EXPORT bool JSObjectSetPrivate(JSObjectRef object, void* data); - -/*! -@function -@abstract Tests whether an object can be called as a function. -@param ctx The execution context to use. -@param object The JSObject to test. -@result true if the object can be called as a function, otherwise false. -*/ -JS_EXPORT bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Calls an object as a function. -@param ctx The execution context to use. -@param object The JSObject to call as a function. -@param thisObject The object to use as "this," or NULL to use the global object as "this." -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function. -*/ -JS_EXPORT JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@function -@abstract Tests whether an object can be called as a constructor. -@param ctx The execution context to use. -@param object The JSObject to test. -@result true if the object can be called as a constructor, otherwise false. -*/ -JS_EXPORT bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Calls an object as a constructor. -@param ctx The execution context to use. -@param object The JSObject to call as a constructor. -@param argumentCount An integer count of the number of arguments in arguments. -@param arguments A JSValue array of arguments to pass to the constructor. Pass NULL if argumentCount is 0. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor. -*/ -JS_EXPORT JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); - -/*! -@function -@abstract Gets the names of an object's enumerable properties. -@param ctx The execution context to use. -@param object The object whose property names you want to get. -@result A JSPropertyNameArray containing the names object's enumerable properties. Ownership follows the Create Rule. -*/ -JS_EXPORT JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Retains a JavaScript property name array. -@param array The JSPropertyNameArray to retain. -@result A JSPropertyNameArray that is the same as array. -*/ -JS_EXPORT JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array); - -/*! -@function -@abstract Releases a JavaScript property name array. -@param array The JSPropetyNameArray to release. -*/ -JS_EXPORT void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array); - -/*! -@function -@abstract Gets a count of the number of items in a JavaScript property name array. -@param array The array from which to retrieve the count. -@result An integer count of the number of names in array. -*/ -JS_EXPORT size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array); - -/*! -@function -@abstract Gets a property name at a given index in a JavaScript property name array. -@param array The array from which to retrieve the property name. -@param index The index of the property name to retrieve. -@result A JSStringRef containing the property name. -*/ -JS_EXPORT JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index); - -/*! -@function -@abstract Adds a property name to a JavaScript property name accumulator. -@param accumulator The accumulator object to which to add the property name. -@param propertyName The property name to add. -*/ -JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName); - -#ifdef __cplusplus -} -#endif - -#endif /* JSObjectRef_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSStringRef.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSStringRef.h deleted file mode 100644 index 75d73c91..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSStringRef.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSStringRef_h -#define JSStringRef_h - -#include - -#ifndef __cplusplus -#include -#endif -#include /* for size_t */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(WIN32) && !defined(_WIN32) \ - && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */ -/*! -@typedef JSChar -@abstract A Unicode character. -*/ - typedef unsigned short JSChar; -#else - typedef wchar_t JSChar; -#endif - -/*! -@function -@abstract Creates a JavaScript string from a buffer of Unicode characters. -@param chars The buffer of Unicode characters to copy into the new JSString. -@param numChars The number of characters to copy from the buffer pointed to by chars. -@result A JSString containing chars. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars); -/*! -@function -@abstract Creates a JavaScript string from a null-terminated UTF8 string. -@param string The null-terminated UTF8 string to copy into the new JSString. -@result A JSString containing string. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSStringCreateWithUTF8CString(const char* string); - -/*! -@function -@abstract Retains a JavaScript string. -@param string The JSString to retain. -@result A JSString that is the same as string. -*/ -JS_EXPORT JSStringRef JSStringRetain(JSStringRef string); -/*! -@function -@abstract Releases a JavaScript string. -@param string The JSString to release. -*/ -JS_EXPORT void JSStringRelease(JSStringRef string); - -/*! -@function -@abstract Returns the number of Unicode characters in a JavaScript string. -@param string The JSString whose length (in Unicode characters) you want to know. -@result The number of Unicode characters stored in string. -*/ -JS_EXPORT size_t JSStringGetLength(JSStringRef string); -/*! -@function -@abstract Returns a pointer to the Unicode character buffer that - serves as the backing store for a JavaScript string. -@param string The JSString whose backing store you want to access. -@result A pointer to the Unicode character buffer that serves as string's - backing store, which will be deallocated when string is deallocated. -*/ -JS_EXPORT const JSChar* JSStringGetCharactersPtr(JSStringRef string); - -/*! -@function -@abstract Returns the maximum number of bytes a JavaScript string will - take up if converted into a null-terminated UTF8 string. -@param string The JSString whose maximum converted size (in bytes) you - want to know. -@result The maximum number of bytes that could be required to convert string into a - null-terminated UTF8 string. The number of bytes that the conversion actually ends - up requiring could be less than this, but never more. -*/ -JS_EXPORT size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string); -/*! -@function -@abstract Converts a JavaScript string into a null-terminated UTF8 string, - and copies the result into an external byte buffer. -@param string The source JSString. -@param buffer The destination byte buffer into which to copy a null-terminated - UTF8 representation of string. On return, buffer contains a UTF8 string - representation of string. If bufferSize is too small, buffer will contain only - partial results. If buffer is not at least bufferSize bytes in size, - behavior is undefined. -@param bufferSize The size of the external buffer in bytes. -@result The number of bytes written into buffer (including the null-terminator byte). -*/ -JS_EXPORT size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize); - -/*! -@function -@abstract Tests whether two JavaScript strings match. -@param a The first JSString to test. -@param b The second JSString to test. -@result true if the two strings match, otherwise false. -*/ -JS_EXPORT bool JSStringIsEqual(JSStringRef a, JSStringRef b); -/*! -@function -@abstract Tests whether a JavaScript string matches a null-terminated UTF8 string. -@param a The JSString to test. -@param b The null-terminated UTF8 string to test. -@result true if the two strings match, otherwise false. -*/ -JS_EXPORT bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b); - -#ifdef __cplusplus -} -#endif - -#endif /* JSStringRef_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSStringRefCF.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSStringRefCF.h deleted file mode 100644 index a7555f96..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSStringRefCF.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSStringRefCF_h -#define JSStringRefCF_h - -#include "JSBase.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* CFString convenience methods */ - -/*! -@function -@abstract Creates a JavaScript string from a CFString. -@discussion This function is optimized to take advantage of cases when - CFStringGetCharactersPtr returns a valid pointer. -@param string The CFString to copy into the new JSString. -@result A JSString containing string. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSStringCreateWithCFString(CFStringRef string); -/*! -@function -@abstract Creates a CFString from a JavaScript string. -@param alloc The alloc parameter to pass to CFStringCreate. -@param string The JSString to copy into the new CFString. -@result A CFString containing string. Ownership follows the Create Rule. -*/ -JS_EXPORT CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string) CF_RETURNS_RETAINED; - -#ifdef __cplusplus -} -#endif - -#endif /* JSStringRefCF_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSTypedArray.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSTypedArray.h deleted file mode 100644 index b7c827b6..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSTypedArray.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef JSTypedArray_h -#define JSTypedArray_h - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@enum JSType -@abstract A constant identifying the Typed Array type of a JSValue. -@constant kJSTypedArrayTypeNone Not a Typed Array. -@constant kJSTypedArrayTypeInt8Array Int8Array -@constant kJSTypedArrayTypeInt16Array Int16Array -@constant kJSTypedArrayTypeInt32Array Int32Array -@constant kJSTypedArrayTypeUint8Array Int8Array -@constant kJSTypedArrayTypeUint8ClampedArray Int8ClampedArray -@constant kJSTypedArrayTypeUint16Array Uint16Array -@constant kJSTypedArrayTypeUint32Array Uint32Array -@constant kJSTypedArrayTypeFloat32Array Float32Array -@constant kJSTypedArrayTypeFloat64Array Float64Array -@constant kJSTypedArrayTypeArrayBuffer ArrayBuffer -*/ -typedef enum { - kJSTypedArrayTypeNone, - kJSTypedArrayTypeInt8Array, - kJSTypedArrayTypeInt16Array, - kJSTypedArrayTypeInt32Array, - kJSTypedArrayTypeUint8Array, - kJSTypedArrayTypeUint8ClampedArray, - kJSTypedArrayTypeUint16Array, - kJSTypedArrayTypeUint32Array, - kJSTypedArrayTypeFloat32Array, - kJSTypedArrayTypeFloat64Array, - kJSTypedArrayTypeArrayBuffer -} JSTypedArrayType; - -/*! -@function -@abstract Returns a JavaScript value's Typed Array type -@param ctx The execution context to use. -@param value The JSValue whose Typed Array type you want to obtain. -@result A value of type JSTypedArrayType that identifies value's Typed Array type. -*/ -JS_EXPORT JSTypedArrayType JSObjectGetTypedArrayType(JSContextRef ctx, JSObjectRef object); - -/*! -@function -@abstract Creates a JavaScript Typed Array with the given number of elements -@param ctx The execution context to use. -@param arrayType A value of type JSTypedArrayType identifying the type of array you want to create -@param numElements The number of elements for the array. -@result A JSObjectRef that is a Typed Array or NULL if there was an error -*/ -JS_EXPORT JSObjectRef JSObjectMakeTypedArray(JSContextRef ctx, JSTypedArrayType arrayType, size_t numElements); - -/*! -@function -@abstract Returns a pointer to a Typed Array's data in memory -@param ctx The execution context to use. -@param value The JSValue whose Typed Array type data pointer you want to obtain. -@param byteLength A pointer to a size_t in which to store the byte length of the Typed Array -@result A pointer to the Typed Array's data or NULL if the JSValue is not a Typed Array. -*/ -JS_EXPORT void * JSObjectGetTypedArrayDataPtr(JSContextRef ctx, JSObjectRef object, size_t* byteLength); - - -#ifdef __cplusplus -} -#endif - -#endif /* JSTypedArray_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSValue.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSValue.h deleted file mode 100644 index 4fb4bf45..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSValue.h +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSValue_h -#define JSValue_h - -#if JSC_OBJC_API_ENABLED - -#import - -@class JSContext; - -/*! -@interface -@discussion A JSValue is a reference to a value within the JavaScript object space of a - JSVirtualMachine. All instances of JSValue originate from a JSContext and - hold a strong reference to this JSContext. As long as any value associated with - a particular JSContext is retained, that JSContext will remain alive. - Where an instance method is invoked upon a JSValue, and this returns another - JSValue, the returned JSValue will originate from the same JSContext as the - JSValue on which the method was invoked. - - All JavaScript values are associated with a particular JSVirtualMachine - (the associated JSVirtualMachine is available indirectly via the context - property). An instance of JSValue may only be passed as an argument to - methods on instances of JSValue and JSContext that belong to the same - JSVirtualMachine - passing a JSValue to a method on an object originating - from a different JSVirtualMachine will result in an Objective-C exception - being raised. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSValue : NSObject - -/*! -@property -@abstract The JSContext that this value originates from. -*/ -@property (readonly, strong) JSContext *context; - -/*! -@methodgroup Creating JavaScript Values -*/ -/*! -@method -@abstract Create a JSValue by converting an Objective-C object. -@discussion The resulting JSValue retains the provided Objective-C object. -@param value The Objective-C object to be converted. -@result The new JSValue. -*/ -+ (JSValue *)valueWithObject:(id)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from a BOOL primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithBool:(BOOL)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from a double primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithDouble:(double)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from an int32_t primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithInt32:(int32_t)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JavaScript value from a uint32_t primitive. -@param value -@param context The JSContext in which the resulting JSValue will be created. -@result The new JSValue representing the equivalent boolean value. -*/ -+ (JSValue *)valueWithUInt32:(uint32_t)value inContext:(JSContext *)context; - -/*! -@method -@abstract Create a new, empty JavaScript object. -@param context The JSContext in which the resulting object will be created. -@result The new JavaScript object. -*/ -+ (JSValue *)valueWithNewObjectInContext:(JSContext *)context; - -/*! -@method -@abstract Create a new, empty JavaScript array. -@param context The JSContext in which the resulting array will be created. -@result The new JavaScript array. -*/ -+ (JSValue *)valueWithNewArrayInContext:(JSContext *)context; - -/*! -@method -@abstract Create a new JavaScript regular expression object. -@param pattern The regular expression pattern. -@param flags The regular expression flags. -@param context The JSContext in which the resulting regular expression object will be created. -@result The new JavaScript regular expression object. -*/ -+ (JSValue *)valueWithNewRegularExpressionFromPattern:(NSString *)pattern flags:(NSString *)flags inContext:(JSContext *)context; - -/*! -@method -@abstract Create a new JavaScript error object. -@param message The error message. -@param context The JSContext in which the resulting error object will be created. -@result The new JavaScript error object. -*/ -+ (JSValue *)valueWithNewErrorFromMessage:(NSString *)message inContext:(JSContext *)context; - -/*! -@method -@abstract Create the JavaScript value null. -@param context The JSContext to which the resulting JSValue belongs. -@result The JSValue representing the JavaScript value null. -*/ -+ (JSValue *)valueWithNullInContext:(JSContext *)context; - -/*! -@method -@abstract Create the JavaScript value undefined. -@param context The JSContext to which the resulting JSValue belongs. -@result The JSValue representing the JavaScript value undefined. -*/ -+ (JSValue *)valueWithUndefinedInContext:(JSContext *)context; - -/*! -@methodgroup Converting to Objective-C Types -@discussion When converting between JavaScript values and Objective-C objects a copy is - performed. Values of types listed below are copied to the corresponding - types on conversion in each direction. For NSDictionaries, entries in the - dictionary that are keyed by strings are copied onto a JavaScript object. - For dictionaries and arrays, conversion is recursive, with the same object - conversion being applied to all entries in the collection. - -
-@textblock
-   Objective-C type  |   JavaScript type
- --------------------+---------------------
-         nil         |     undefined
-        NSNull       |        null
-       NSString      |       string
-       NSNumber      |   number, boolean
-     NSDictionary    |   Object object
-       NSArray       |    Array object
-        NSDate       |     Date object
-       NSBlock (1)   |   Function object (1)
-          id (2)     |   Wrapper object (2)
-        Class (3)    | Constructor object (3)
-@/textblock
-
- - (1) Instances of NSBlock with supported arguments types will be presented to - JavaScript as a callable Function object. For more information on supported - argument types see JSExport.h. If a JavaScript Function originating from an - Objective-C block is converted back to an Objective-C object the block will - be returned. All other JavaScript functions will be converted in the same - manner as a JavaScript object of type Object. - - (2) For Objective-C instances that do not derive from the set of types listed - above, a wrapper object to provide a retaining handle to the Objective-C - instance from JavaScript. For more information on these wrapper objects, see - JSExport.h. When a JavaScript wrapper object is converted back to Objective-C - the Objective-C instance being retained by the wrapper is returned. - - (3) For Objective-C Class objects a constructor object containing exported - class methods will be returned. See JSExport.h for more information on - constructor objects. - - For all methods taking arguments of type id, arguments will be converted - into a JavaScript value according to the above conversion. -*/ -/*! -@method -@abstract Convert this JSValue to an Objective-C object. -@discussion The JSValue is converted to an Objective-C object according - to the conversion rules specified above. -@result The Objective-C representation of this JSValue. -*/ -- (id)toObject; - -/*! -@method -@abstract Convert a JSValue to an Objective-C object of a specific class. -@discussion The JSValue is converted to an Objective-C object of the specified Class. - If the result is not of the specified Class then nil will be returned. -@result An Objective-C object of the specified Class or nil. -*/ -- (id)toObjectOfClass:(Class)expectedClass; - -/*! -@method -@abstract Convert a JSValue to a boolean. -@discussion The JSValue is converted to a boolean according to the rules specified - by the JavaScript language. -@result The boolean result of the conversion. -*/ -- (BOOL)toBool; - -/*! -@method -@abstract Convert a JSValue to a double. -@discussion The JSValue is converted to a number according to the rules specified - by the JavaScript language. -@result The double result of the conversion. -*/ -- (double)toDouble; - -/*! -@method -@abstract Convert a JSValue to an int32_t. -@discussion The JSValue is converted to an integer according to the rules specified - by the JavaScript language. -@result The int32_t result of the conversion. -*/ -- (int32_t)toInt32; - -/*! -@method -@abstract Convert a JSValue to a uint32_t. -@discussion The JSValue is converted to an integer according to the rules specified - by the JavaScript language. -@result The uint32_t result of the conversion. -*/ -- (uint32_t)toUInt32; - -/*! -@method -@abstract Convert a JSValue to a NSNumber. -@discussion If the JSValue represents a boolean, a NSNumber value of YES or NO - will be returned. For all other types the value will be converted to a number according - to the rules specified by the JavaScript language. -@result The NSNumber result of the conversion. -*/ -- (NSNumber *)toNumber; - -/*! -@method -@abstract Convert a JSValue to a NSString. -@discussion The JSValue is converted to a string according to the rules specified - by the JavaScript language. -@result The NSString containing the result of the conversion. -*/ -- (NSString *)toString; - -/*! -@method -@abstract Convert a JSValue to a NSDate. -@discussion The value is converted to a number representing a time interval - since 1970 which is then used to create a new NSDate instance. -@result The NSDate created using the converted time interval. -*/ -- (NSDate *)toDate; - -/*! -@method -@abstract Convert a JSValue to a NSArray. -@discussion If the value is null or undefined then nil is returned. - If the value is not an object then a JavaScript TypeError will be thrown. - The property length is read from the object, converted to an unsigned - integer, and an NSArray of this size is allocated. Properties corresponding - to indicies within the array bounds will be copied to the array, with - JSValues converted to equivalent Objective-C objects as specified. -@result The NSArray containing the recursively converted contents of the - converted JavaScript array. -*/ -- (NSArray *)toArray; - -/*! -@method -@abstract Convert a JSValue to a NSDictionary. -@discussion If the value is null or undefined then nil is returned. - If the value is not an object then a JavaScript TypeError will be thrown. - All enumerable properties of the object are copied to the dictionary, with - JSValues converted to equivalent Objective-C objects as specified. -@result The NSDictionary containing the recursively converted contents of - the converted JavaScript object. -*/ -- (NSDictionary *)toDictionary; - -/*! -@methodgroup Accessing Properties -*/ -/*! -@method -@abstract Access a property of a JSValue. -@result The JSValue for the requested property or the JSValue undefined - if the property does not exist. -*/ -- (JSValue *)valueForProperty:(NSString *)property; - -/*! -@method -@abstract Set a property on a JSValue. -*/ -- (void)setValue:(id)value forProperty:(NSString *)property; - -/*! -@method -@abstract Delete a property from a JSValue. -@result YES if deletion is successful, NO otherwise. -*/ -- (BOOL)deleteProperty:(NSString *)property; - -/*! -@method -@abstract Check if a JSValue has a property. -@discussion This method has the same function as the JavaScript operator in. -@result Returns YES if property is present on the value. -*/ -- (BOOL)hasProperty:(NSString *)property; - -/*! -@method -@abstract Define properties with custom descriptors on JSValues. -@discussion This method may be used to create a data or accessor property on an object. - This method operates in accordance with the Object.defineProperty method in the - JavaScript language. -*/ -- (void)defineProperty:(NSString *)property descriptor:(id)descriptor; - -/*! -@method -@abstract Access an indexed (numerical) property on a JSValue. -@result The JSValue for the property at the specified index. - Returns the JavaScript value undefined if no property exists at that index. -*/ -- (JSValue *)valueAtIndex:(NSUInteger)index; - -/*! -@method -@abstract Set an indexed (numerical) property on a JSValue. -@discussion For JSValues that are JavaScript arrays, indices greater than - UINT_MAX - 1 will not affect the length of the array. -*/ -- (void)setValue:(id)value atIndex:(NSUInteger)index; - -/*! -@methodgroup Checking JavaScript Types -*/ -/*! -@method -@abstract Check if a JSValue corresponds to the JavaScript value undefined. -*/ -- (BOOL)isUndefined; - -/*! -@method -@abstract Check if a JSValue corresponds to the JavaScript value null. -*/ -- (BOOL)isNull; - -/*! -@method -@abstract Check if a JSValue is a boolean. -*/ -- (BOOL)isBoolean; - -/*! -@method -@abstract Check if a JSValue is a number. -@discussion In JavaScript, there is no differentiation between types of numbers. - Semantically all numbers behave like doubles except in special cases like bit - operations. -*/ -- (BOOL)isNumber; - -/*! -@method -@abstract Check if a JSValue is a string. -*/ -- (BOOL)isString; - -/*! -@method -@abstract Check if a JSValue is an object. -*/ -- (BOOL)isObject; - -/*! -@method -@abstract Compare two JSValues using JavaScript's === operator. -*/ -- (BOOL)isEqualToObject:(id)value; - -/*! -@method -@abstract Compare two JSValues using JavaScript's == operator. -*/ -- (BOOL)isEqualWithTypeCoercionToObject:(id)value; - -/*! -@method -@abstract Check if a JSValue is an instance of another object. -@discussion This method has the same function as the JavaScript operator instanceof. - If an object other than a JSValue is passed, it will first be converted according to - the aforementioned rules. -*/ -- (BOOL)isInstanceOf:(id)value; - -/*! -@methodgroup Calling Functions and Constructors -*/ -/*! -@method -@abstract Invoke a JSValue as a function. -@discussion In JavaScript, if a function doesn't explicitly return a value then it - implicitly returns the JavaScript value undefined. -@param arguments The arguments to pass to the function. -@result The return value of the function call. -*/ -- (JSValue *)callWithArguments:(NSArray *)arguments; - -/*! -@method -@abstract Invoke a JSValue as a constructor. -@discussion This is equivalent to using the new syntax in JavaScript. -@param arguments The arguments to pass to the constructor. -@result The return value of the constructor call. -*/ -- (JSValue *)constructWithArguments:(NSArray *)arguments; - -/*! -@method -@abstract Invoke a method on a JSValue. -@discussion Accesses the property named method from this value and - calls the resulting value as a function, passing this JSValue as the this - value along with the specified arguments. -@param method The name of the method to be invoked. -@param arguments The arguments to pass to the method. -@result The return value of the method call. -*/ -- (JSValue *)invokeMethod:(NSString *)method withArguments:(NSArray *)arguments; - -@end - -/*! -@category -@discussion Objective-C methods exported to JavaScript may have argument and/or return - values of struct types, provided that conversion to and from the struct is - supported by JSValue. Support is provided for any types where JSValue - contains both a class method valueWith:inContext:, and and instance - method to- where the string in these selector names match, - with the first argument to the former being of the same struct type as the - return type of the latter. - Support is provided for structs of type CGPoint, NSRange, CGRect and CGSize. -*/ -@interface JSValue (StructSupport) - -/*! -@method -@abstract Create a JSValue from a CGPoint. -@result A newly allocated JavaScript object containing properties - named x and y, with values from the CGPoint. -*/ -+ (JSValue *)valueWithPoint:(CGPoint)point inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JSValue from a NSRange. -@result A newly allocated JavaScript object containing properties - named location and length, with values from the NSRange. -*/ -+ (JSValue *)valueWithRange:(NSRange)range inContext:(JSContext *)context; - -/*! -@method -@abstract -Create a JSValue from a CGRect. -@result A newly allocated JavaScript object containing properties - named x, y, width, and height, with values from the CGRect. -*/ -+ (JSValue *)valueWithRect:(CGRect)rect inContext:(JSContext *)context; - -/*! -@method -@abstract Create a JSValue from a CGSize. -@result A newly allocated JavaScript object containing properties - named width and height, with values from the CGSize. -*/ -+ (JSValue *)valueWithSize:(CGSize)size inContext:(JSContext *)context; - -/*! -@method -@abstract Convert a JSValue to a CGPoint. -@discussion Reads the properties named x and y from - this JSValue, and converts the results to double. -@result The new CGPoint. -*/ -- (CGPoint)toPoint; - -/*! -@method -@abstract Convert a JSValue to an NSRange. -@discussion Reads the properties named location and - length from this JSValue and converts the results to double. -@result The new NSRange. -*/ -- (NSRange)toRange; - -/*! -@method -@abstract Convert a JSValue to a CGRect. -@discussion Reads the properties named x, y, - width, and height from this JSValue and converts the results to double. -@result The new CGRect. -*/ -- (CGRect)toRect; - -/*! -@method -@abstract Convert a JSValue to a CGSize. -@discussion Reads the properties named width and - height from this JSValue and converts the results to double. -@result The new CGSize. -*/ -- (CGSize)toSize; - -@end - -/*! -@category -@discussion Instances of JSValue implement the following methods in order to enable - support for subscript access by key and index, for example: - -@textblock - JSValue *objectA, *objectB; - JSValue *v1 = object[@"X"]; // Get value for property "X" from 'object'. - JSValue *v2 = object[42]; // Get value for index 42 from 'object'. - object[@"Y"] = v1; // Assign 'v1' to property "Y" of 'object'. - object[101] = v2; // Assign 'v2' to index 101 of 'object'. -@/textblock - - An object key passed as a subscript will be converted to a JavaScript value, - and then the value converted to a string used as a property name. -*/ -@interface JSValue (SubscriptSupport) - -- (JSValue *)objectForKeyedSubscript:(id)key; -- (JSValue *)objectAtIndexedSubscript:(NSUInteger)index; -- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key; -- (void)setObject:(id)object atIndexedSubscript:(NSUInteger)index; - -@end - -/*! -@category -@discussion These functions are for bridging between the C API and the Objective-C API. -*/ -@interface JSValue (JSValueRefSupport) - -/*! -@method -@abstract Creates a JSValue, wrapping its C API counterpart. -@param value -@param context -@result The Objective-C API equivalent of the specified JSValueRef. -*/ -+ (JSValue *)valueWithJSValueRef:(JSValueRef)value inContext:(JSContext *)context; - -/*! -@property -@abstract Returns the C API counterpart wrapped by a JSContext. -@result The C API equivalent of this JSValue. -*/ -@property (readonly) JSValueRef JSValueRef; -@end - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@group Property Descriptor Constants -@discussion These keys may assist in creating a property descriptor for use with the - defineProperty method on JSValue. - Property descriptors must fit one of three descriptions: - - Data Descriptor: - - A descriptor containing one or both of the keys value and writable, - and optionally containing one or both of the keys enumerable and - configurable. A data descriptor may not contain either the get or - set key. - A data descriptor may be used to create or modify the attributes of a - data property on an object (replacing any existing accessor property). - - Accessor Descriptor: - - A descriptor containing one or both of the keys get and set, and - optionally containing one or both of the keys enumerable and - configurable. An accessor descriptor may not contain either the value - or writable key. - An accessor descriptor may be used to create or modify the attributes of - an accessor property on an object (replacing any existing data property). - - Generic Descriptor: - - A descriptor containing one or both of the keys enumerable and - configurable. A generic descriptor may not contain any of the keys - value, writable, get, or set. - A generic descriptor may be used to modify the attributes of an existing - data or accessor property, or to create a new data property. -*/ -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorWritableKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorEnumerableKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorConfigurableKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorValueKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorGetKey; -/*! -@const -*/ -JS_EXPORT extern NSString * const JSPropertyDescriptorSetKey; - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif - -#endif // JSValue_h diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSValueRef.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSValueRef.h deleted file mode 100644 index 97385c01..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSValueRef.h +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSValueRef_h -#define JSValueRef_h - -#include -#include - -#ifndef __cplusplus -#include -#endif - -/*! -@enum JSType -@abstract A constant identifying the type of a JSValue. -@constant kJSTypeUndefined The unique undefined value. -@constant kJSTypeNull The unique null value. -@constant kJSTypeBoolean A primitive boolean value, one of true or false. -@constant kJSTypeNumber A primitive number value. -@constant kJSTypeString A primitive string value. -@constant kJSTypeObject An object value (meaning that this JSValueRef is a JSObjectRef). -*/ -typedef enum { - kJSTypeUndefined, - kJSTypeNull, - kJSTypeBoolean, - kJSTypeNumber, - kJSTypeString, - kJSTypeObject -} JSType; - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -@function -@abstract Returns a JavaScript value's type. -@param ctx The execution context to use. -@param value The JSValue whose type you want to obtain. -@result A value of type JSType that identifies value's type. -*/ -JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the undefined type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the undefined type, otherwise false. -*/ -JS_EXPORT bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the null type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the null type, otherwise false. -*/ -JS_EXPORT bool JSValueIsNull(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the boolean type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the boolean type, otherwise false. -*/ -JS_EXPORT bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the number type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the number type, otherwise false. -*/ -JS_EXPORT bool JSValueIsNumber(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the string type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the string type, otherwise false. -*/ -JS_EXPORT bool JSValueIsString(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value's type is the object type. -@param ctx The execution context to use. -@param value The JSValue to test. -@result true if value's type is the object type, otherwise false. -*/ -JS_EXPORT bool JSValueIsObject(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Tests whether a JavaScript value is an object with a given class in its class chain. -@param ctx The execution context to use. -@param value The JSValue to test. -@param jsClass The JSClass to test against. -@result true if value is an object and has jsClass in its class chain, otherwise false. -*/ -JS_EXPORT bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass); - -/* Comparing values */ - -/*! -@function -@abstract Tests whether two JavaScript values are equal, as compared by the JS == operator. -@param ctx The execution context to use. -@param a The first value to test. -@param b The second value to test. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result true if the two values are equal, false if they are not equal or an exception is thrown. -*/ -JS_EXPORT bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception); - -/*! -@function -@abstract Tests whether two JavaScript values are strict equal, as compared by the JS === operator. -@param ctx The execution context to use. -@param a The first value to test. -@param b The second value to test. -@result true if the two values are strict equal, otherwise false. -*/ -JS_EXPORT bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b); - -/*! -@function -@abstract Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator. -@param ctx The execution context to use. -@param value The JSValue to test. -@param constructor The constructor to test against. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false. -*/ -JS_EXPORT bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception); - -/* Creating values */ - -/*! -@function -@abstract Creates a JavaScript value of the undefined type. -@param ctx The execution context to use. -@result The unique undefined value. -*/ -JS_EXPORT JSValueRef JSValueMakeUndefined(JSContextRef ctx); - -/*! -@function -@abstract Creates a JavaScript value of the null type. -@param ctx The execution context to use. -@result The unique null value. -*/ -JS_EXPORT JSValueRef JSValueMakeNull(JSContextRef ctx); - -/*! -@function -@abstract Creates a JavaScript value of the boolean type. -@param ctx The execution context to use. -@param boolean The bool to assign to the newly created JSValue. -@result A JSValue of the boolean type, representing the value of boolean. -*/ -JS_EXPORT JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean); - -/*! -@function -@abstract Creates a JavaScript value of the number type. -@param ctx The execution context to use. -@param number The double to assign to the newly created JSValue. -@result A JSValue of the number type, representing the value of number. -*/ -JS_EXPORT JSValueRef JSValueMakeNumber(JSContextRef ctx, double number); - -/*! -@function -@abstract Creates a JavaScript value of the string type. -@param ctx The execution context to use. -@param string The JSString to assign to the newly created JSValue. The - newly created JSValue retains string, and releases it upon garbage collection. -@result A JSValue of the string type, representing the value of string. -*/ -JS_EXPORT JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string); - -/* Converting to and from JSON formatted strings */ - -/*! - @function - @abstract Creates a JavaScript value from a JSON formatted string. - @param ctx The execution context to use. - @param string The JSString containing the JSON string to be parsed. - @result A JSValue containing the parsed value, or NULL if the input is invalid. - */ -JS_EXPORT JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) CF_AVAILABLE(10_7, 7_0); - -/*! - @function - @abstract Creates a JavaScript string containing the JSON serialized representation of a JS value. - @param ctx The execution context to use. - @param value The value to serialize. - @param indent The number of spaces to indent when nesting. If 0, the resulting JSON will not contains newlines. The size of the indent is clamped to 10 spaces. - @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. - @result A JSString with the result of serialization, or NULL if an exception is thrown. - */ -JS_EXPORT JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef value, unsigned indent, JSValueRef* exception) CF_AVAILABLE(10_7, 7_0); - -/* Converting to primitive values */ - -/*! -@function -@abstract Converts a JavaScript value to boolean and returns the resulting boolean. -@param ctx The execution context to use. -@param value The JSValue to convert. -@result The boolean result of conversion. -*/ -JS_EXPORT bool JSValueToBoolean(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Converts a JavaScript value to number and returns the resulting number. -@param ctx The execution context to use. -@param value The JSValue to convert. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The numeric result of conversion, or NaN if an exception is thrown. -*/ -JS_EXPORT double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception); - -/*! -@function -@abstract Converts a JavaScript value to string and copies the result into a JavaScript string. -@param ctx The execution context to use. -@param value The JSValue to convert. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule. -*/ -JS_EXPORT JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception); - -/*! -@function -@abstract Converts a JavaScript value to object and returns the resulting object. -@param ctx The execution context to use. -@param value The JSValue to convert. -@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. -@result The JSObject result of conversion, or NULL if an exception is thrown. -*/ -JS_EXPORT JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception); - -/* Garbage collection */ -/*! -@function -@abstract Protects a JavaScript value from garbage collection. -@param ctx The execution context to use. -@param value The JSValue to protect. -@discussion Use this method when you want to store a JSValue in a global or on the heap, where the garbage collector will not be able to discover your reference to it. - -A value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection. -*/ -JS_EXPORT void JSValueProtect(JSContextRef ctx, JSValueRef value); - -/*! -@function -@abstract Unprotects a JavaScript value from garbage collection. -@param ctx The execution context to use. -@param value The JSValue to unprotect. -@discussion A value may be protected multiple times and must be unprotected an - equal number of times before becoming eligible for garbage collection. -*/ -JS_EXPORT void JSValueUnprotect(JSContextRef ctx, JSValueRef value); - -#ifdef __cplusplus -} -#endif - -#endif /* JSValueRef_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSVirtualMachine.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSVirtualMachine.h deleted file mode 100644 index ccf9264d..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JSVirtualMachine.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2013 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -#if JSC_OBJC_API_ENABLED - -/*! -@interface -@discussion An instance of JSVirtualMachine represents a single JavaScript "object space" - or set of execution resources. Thread safety is supported by locking the - virtual machine, with concurrent JavaScript execution supported by allocating - separate instances of JSVirtualMachine. -*/ -NS_CLASS_AVAILABLE(10_9, 7_0) -@interface JSVirtualMachine : NSObject - -/*! -@methodgroup Creating New Virtual Machines -*/ -/*! -@method -@abstract Create a new JSVirtualMachine. -*/ -- (instancetype)init; - -/*! -@methodgroup Memory Management -*/ -/*! -@method -@abstract Notify the JSVirtualMachine of an external object relationship. -@discussion Allows clients of JSVirtualMachine to make the JavaScript runtime aware of - arbitrary external Objective-C object graphs. The runtime can then use - this information to retain any JavaScript values that are referenced - from somewhere in said object graph. - - For correct behavior clients must make their external object graphs - reachable from within the JavaScript runtime. If an Objective-C object is - reachable from within the JavaScript runtime, all managed references - transitively reachable from it as recorded using - -addManagedReference:withOwner: will be scanned by the garbage collector. -@param object The object that the owner points to. -@param owner The object that owns the pointed to object. -*/ -- (void)addManagedReference:(id)object withOwner:(id)owner; - -/*! -@method -@abstract Notify the JSVirtualMachine that a previous object relationship no longer exists. -@discussion The JavaScript runtime will continue to scan any references that were - reported to it by -addManagedReference:withOwner: until those references are removed. -@param object The object that was formerly owned. -@param owner The former owner. -*/ -- (void)removeManagedReference:(id)object withOwner:(id)owner; - -@end - -#endif diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JavaScript.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JavaScript.h deleted file mode 100644 index f8d92d8f..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JavaScript.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2006 Apple Inc. All rights reserved. - * Copyright (C) 2008 Alp Toker - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JavaScript_h -#define JavaScript_h - -#include -#include -#include -#include -#include - -#endif /* JavaScript_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JavaScriptCore.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JavaScriptCore.h deleted file mode 100644 index 40bea9c3..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/JavaScriptCore.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JavaScriptCore_h -#define JavaScriptCore_h - -#include -#include - -#if defined(__OBJC__) && JSC_OBJC_API_ENABLED - -#import "JSContext.h" -#import "JSValue.h" -#import "JSManagedValue.h" -#import "JSVirtualMachine.h" -#import "JSExport.h" - -#endif - -#endif /* JavaScriptCore_h */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/WebKitAvailability.h b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/WebKitAvailability.h deleted file mode 100644 index ebb33bce..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/Headers/WebKitAvailability.h +++ /dev/null @@ -1,925 +0,0 @@ -/* - * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __WebKitAvailability__ -#define __WebKitAvailability__ - -/* The structure of this header is based on AvailabilityMacros.h. The major difference is that the availability - macros are defined in terms of WebKit version numbers rather than Mac OS X system version numbers, as WebKit - releases span multiple versions of Mac OS X. -*/ - -#define WEBKIT_VERSION_1_0 0x0100 -#define WEBKIT_VERSION_1_1 0x0110 -#define WEBKIT_VERSION_1_2 0x0120 -#define WEBKIT_VERSION_1_3 0x0130 -#define WEBKIT_VERSION_2_0 0x0200 -#define WEBKIT_VERSION_3_0 0x0300 -#define WEBKIT_VERSION_3_1 0x0310 -#define WEBKIT_VERSION_4_0 0x0400 -#define WEBKIT_VERSION_LATEST 0x9999 - -#ifdef __APPLE__ -#include -#include -#else -#define CF_AVAILABLE(_mac, _ios) -/* - * For non-Mac platforms, require the newest version. - */ -#define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST -/* - * only certain compilers support __attribute__((deprecated)) - */ -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) - #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#else - #define DEPRECATED_ATTRIBUTE -#endif -#endif - -/* The versions of GCC that shipped with Xcode prior to 3.0 (GCC build number < 5400) did not support attributes on methods. - If we are building with one of these versions, we need to omit the attribute. We achieve this by wrapping the annotation - in WEBKIT_OBJC_METHOD_ANNOTATION, which will remove the annotation when an old version of GCC is in use and will otherwise - expand to the annotation. The same is needed for protocol methods. -*/ -#if defined(__APPLE_CC__) && __APPLE_CC__ < 5400 - #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) -#else - #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION -#endif - - -/* If minimum WebKit version is not specified, assume the version that shipped with the target Mac OS X version */ -#ifndef WEBKIT_VERSION_MIN_REQUIRED - #if !defined(MAC_OS_X_VERSION_10_2) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 - #error WebKit was not available prior to Mac OS X 10.2 - #elif !defined(MAC_OS_X_VERSION_10_3) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 - /* WebKit 1.0 is the only version available on Mac OS X 10.2. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_0 - #elif !defined(MAC_OS_X_VERSION_10_4) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 - /* WebKit 1.1 is the version that shipped on Mac OS X 10.3. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_1 - #elif !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - /* WebKit 2.0 is the version that shipped on Mac OS X 10.4. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_2_0 - #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 - /* WebKit 3.0 is the version that shipped on Mac OS X 10.5. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_3_0 - #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 - /* WebKit 4.0 is the version that shipped on Mac OS X 10.6. */ - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_4_0 - #else - #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST - #endif -#endif - - -/* If maximum WebKit version is not specified, assume largerof(latest, minimum) */ -#ifndef WEBKIT_VERSION_MAX_ALLOWED - #if WEBKIT_VERSION_MIN_REQUIRED > WEBKIT_VERSION_LATEST - #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_MIN_REQUIRED - #else - #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_LATEST - #endif -#endif - - -/* Sanity check the configured values */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_MIN_REQUIRED - #error WEBKIT_VERSION_MAX_ALLOWED must be >= WEBKIT_VERSION_MIN_REQUIRED -#endif -#if WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_0 - #error WEBKIT_VERSION_MIN_REQUIRED must be >= WEBKIT_VERSION_1_0 -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER - * - * Used on functions introduced in WebKit 1.0 - */ -#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED - * - * Used on functions introduced in WebKit 1.0, - * and deprecated in WebKit 1.0 - */ -#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER - * - * Used on types deprecated in WebKit 1.0 - */ -#define DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER DEPRECATED_ATTRIBUTE - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER - * - * Used on declarations introduced in WebKit 1.1 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 1.1, - * and deprecated in WebKit 1.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 1.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER - * - * Used on types deprecated in WebKit 1.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 - #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER - * - * Used on declarations introduced in WebKit 1.2 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 1.2, - * and deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER - * - * Used on types deprecated in WebKit 1.2 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 - #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER - * - * Used on declarations introduced in WebKit 1.3 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 1.3, - * and deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER - * - * Used on types deprecated in WebKit 1.3 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 - #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER - * - * Used on declarations introduced in WebKit 2.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 2.0, - * and deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER - * - * Used on types deprecated in WebKit 2.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 - #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER - * - * Used on declarations introduced in WebKit 3.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 3.0, - * and deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER - * - * Used on types deprecated in WebKit 3.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 - #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER - * - * Used on declarations introduced in WebKit 3.1 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 3.1, - * and deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 - * - * Used on declarations introduced in WebKit 3.0, - * but later deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER - * - * Used on types deprecated in WebKit 3.1 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 - #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 4.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_4_0 - #define AVAILABLE_IN_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_4_0 - #define AVAILABLE_IN_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_IN_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED - * - * Used on declarations introduced in WebKit 4.0, - * and deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_IN_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.0, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.1, - * but later deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * DEPRECATED_IN_WEBKIT_VERSION_4_0 - * - * Used on types deprecated in WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 - #define DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_IN_WEBKIT_VERSION_4_0 -#endif - - - - - - -/* - * AVAILABLE_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced after WebKit 4.0 - */ -#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_LATEST - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE -#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_LATEST - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE -#else - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED - * - * Used on declarations introduced after WebKit 4.0, - * and deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_AFTER_WEBKIT_VERSION_4_0 -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.0, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.1, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.2, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 2.0, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.0, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 3.1, - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER -#endif - -/* - * AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on declarations introduced in WebKit 4.0 - * but later deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER -#endif - -/* - * DEPRECATED_AFTER_WEBKIT_VERSION_4_0 - * - * Used on types deprecated after WebKit 4.0 - */ -#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST - #define DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE -#else - #define DEPRECATED_AFTER_WEBKIT_VERSION_4_0 -#endif - - - - - - -/* - * AVAILABLE_AFTER_WEBKIT_VERSION_5_1 - * - * Used on functions introduced after WebKit 5.1 - */ -#define AVAILABLE_AFTER_WEBKIT_VERSION_5_1 - -/* AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_5_1 - * - * Used on declarations introduced in WebKit 1.3, - * but later deprecated after WebKit 5.1 - */ -#define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_5_1 - - -#endif /* __WebKitAvailability__ */ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/JavaScriptCore b/Source/lib/tvos/JavaScriptCore.framework/Versions/A/JavaScriptCore deleted file mode 100644 index e86c7157..00000000 Binary files a/Source/lib/tvos/JavaScriptCore.framework/Versions/A/JavaScriptCore and /dev/null differ diff --git a/Source/lib/tvos/JavaScriptCore.framework/Versions/Current b/Source/lib/tvos/JavaScriptCore.framework/Versions/Current deleted file mode 120000 index 8c7e5a66..00000000 --- a/Source/lib/tvos/JavaScriptCore.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file