From b4d15d88ec5704c91a584f92db0270ae7edfe812 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:07:16 +0100 Subject: [PATCH 01/18] Add `webcodecs` IDL spec and generated code --- Sources/DOMKit/WebIDL/AlphaOption.swift | 22 +++++ Sources/DOMKit/WebIDL/AudioData.swift | 62 +++++++++++++ .../WebIDL/AudioDataCopyToOptions.swift | 35 ++++++++ Sources/DOMKit/WebIDL/AudioDataInit.swift | 45 ++++++++++ Sources/DOMKit/WebIDL/AudioDecoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/AudioDecoderConfig.swift | 35 ++++++++ Sources/DOMKit/WebIDL/AudioDecoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/AudioDecoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/AudioEncoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/AudioEncoderConfig.swift | 35 ++++++++ Sources/DOMKit/WebIDL/AudioEncoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/AudioEncoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/AudioSampleFormat.swift | 28 ++++++ Sources/DOMKit/WebIDL/CodecState.swift | 23 +++++ Sources/DOMKit/WebIDL/EncodedAudioChunk.swift | 39 ++++++++ .../DOMKit/WebIDL/EncodedAudioChunkInit.swift | 35 ++++++++ .../WebIDL/EncodedAudioChunkMetadata.swift | 20 +++++ .../DOMKit/WebIDL/EncodedAudioChunkType.swift | 22 +++++ Sources/DOMKit/WebIDL/EncodedVideoChunk.swift | 39 ++++++++ .../DOMKit/WebIDL/EncodedVideoChunkInit.swift | 35 ++++++++ .../WebIDL/EncodedVideoChunkMetadata.swift | 30 +++++++ .../DOMKit/WebIDL/EncodedVideoChunkType.swift | 22 +++++ .../DOMKit/WebIDL/HardwareAcceleration.swift | 23 +++++ Sources/DOMKit/WebIDL/ImageBufferSource.swift | 46 ++++++++++ .../DOMKit/WebIDL/ImageDecodeOptions.swift | 25 ++++++ Sources/DOMKit/WebIDL/ImageDecodeResult.swift | 25 ++++++ Sources/DOMKit/WebIDL/ImageDecoder.swift | 68 ++++++++++++++ Sources/DOMKit/WebIDL/ImageDecoderInit.swift | 50 +++++++++++ Sources/DOMKit/WebIDL/ImageTrack.swift | 32 +++++++ Sources/DOMKit/WebIDL/ImageTrackList.swift | 34 +++++++ Sources/DOMKit/WebIDL/LatencyMode.swift | 22 +++++ Sources/DOMKit/WebIDL/PlaneLayout.swift | 25 ++++++ Sources/DOMKit/WebIDL/SvcOutputMetadata.swift | 20 +++++ .../DOMKit/WebIDL/VideoColorPrimaries.swift | 23 +++++ Sources/DOMKit/WebIDL/VideoColorSpace.swift | 39 ++++++++ .../DOMKit/WebIDL/VideoColorSpaceInit.swift | 35 ++++++++ Sources/DOMKit/WebIDL/VideoDecoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/VideoDecoderConfig.swift | 60 +++++++++++++ Sources/DOMKit/WebIDL/VideoDecoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/VideoDecoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/VideoEncoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/VideoEncoderConfig.swift | 75 ++++++++++++++++ .../WebIDL/VideoEncoderEncodeOptions.swift | 20 +++++ Sources/DOMKit/WebIDL/VideoEncoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/VideoEncoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/VideoFrame.swift | 89 +++++++++++++++++++ .../DOMKit/WebIDL/VideoFrameBufferInit.swift | 65 ++++++++++++++ .../WebIDL/VideoFrameCopyToOptions.swift | 25 ++++++ Sources/DOMKit/WebIDL/VideoFrameInit.swift | 45 ++++++++++ .../WebIDL/VideoMatrixCoefficients.swift | 24 +++++ Sources/DOMKit/WebIDL/VideoPixelFormat.swift | 29 ++++++ .../WebIDL/VideoTransferCharacteristics.swift | 23 +++++ 52 files changed, 1929 insertions(+) create mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift create mode 100644 Sources/DOMKit/WebIDL/AudioData.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift create mode 100644 Sources/DOMKit/WebIDL/CodecState.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift create mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift create mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift create mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift create mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift create mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift create mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift diff --git a/Sources/DOMKit/WebIDL/AlphaOption.swift b/Sources/DOMKit/WebIDL/AlphaOption.swift new file mode 100644 index 00000000..f086fd3a --- /dev/null +++ b/Sources/DOMKit/WebIDL/AlphaOption.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum AlphaOption: JSString, JSValueCompatible { + case keep = "keep" + case discard = "discard" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/AudioData.swift b/Sources/DOMKit/WebIDL/AudioData.swift new file mode 100644 index 00000000..a0fc829f --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioData.swift @@ -0,0 +1,62 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioData: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) + _sampleRate = ReadonlyAttribute(jsObject: jsObject, name: Strings.sampleRate) + _numberOfFrames = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfFrames) + _numberOfChannels = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfChannels) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioDataInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var format: AudioSampleFormat? + + @ReadonlyAttribute + public var sampleRate: Float + + @ReadonlyAttribute + public var numberOfFrames: UInt32 + + @ReadonlyAttribute + public var numberOfChannels: UInt32 + + @ReadonlyAttribute + public var duration: UInt64 + + @ReadonlyAttribute + public var timestamp: Int64 + + @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! + } + + @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} diff --git a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift new file mode 100644 index 00000000..78daea46 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDataCopyToOptions: BridgedDictionary { + public convenience init(planeIndex: UInt32, frameOffset: UInt32, frameCount: UInt32, format: AudioSampleFormat) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.planeIndex] = planeIndex.jsValue + object[Strings.frameOffset] = frameOffset.jsValue + object[Strings.frameCount] = frameCount.jsValue + object[Strings.format] = format.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _planeIndex = ReadWriteAttribute(jsObject: object, name: Strings.planeIndex) + _frameOffset = ReadWriteAttribute(jsObject: object, name: Strings.frameOffset) + _frameCount = ReadWriteAttribute(jsObject: object, name: Strings.frameCount) + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var planeIndex: UInt32 + + @ReadWriteAttribute + public var frameOffset: UInt32 + + @ReadWriteAttribute + public var frameCount: UInt32 + + @ReadWriteAttribute + public var format: AudioSampleFormat +} diff --git a/Sources/DOMKit/WebIDL/AudioDataInit.swift b/Sources/DOMKit/WebIDL/AudioDataInit.swift new file mode 100644 index 00000000..d0395761 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDataInit.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDataInit: BridgedDictionary { + public convenience init(format: AudioSampleFormat, sampleRate: Float, numberOfFrames: UInt32, numberOfChannels: UInt32, timestamp: Int64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfFrames] = numberOfFrames.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfFrames = ReadWriteAttribute(jsObject: object, name: Strings.numberOfFrames) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: AudioSampleFormat + + @ReadWriteAttribute + public var sampleRate: Float + + @ReadWriteAttribute + public var numberOfFrames: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoder.swift b/Sources/DOMKit/WebIDL/AudioDecoder.swift new file mode 100644 index 00000000..d511e5ba --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var decodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func decode(chunk: EncodedAudioChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: AudioDecoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: AudioDecoderConfig) async throws -> AudioDecoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift new file mode 100644 index 00000000..55aa5a27 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderConfig: BridgedDictionary { + public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, description: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.description] = description.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _description = ReadWriteAttribute(jsObject: object, name: Strings.description) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var description: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift new file mode 100644 index 00000000..b98e0449 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderInit: BridgedDictionary { + public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1Void + public var output: AudioDataOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift new file mode 100644 index 00000000..8245e0da --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: AudioDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoder.swift b/Sources/DOMKit/WebIDL/AudioEncoder.swift new file mode 100644 index 00000000..7565bc23 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioEncoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func encode(data: AudioData) { + let this = jsObject + _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: AudioEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: AudioEncoderConfig) async throws -> AudioEncoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift new file mode 100644 index 00000000..0d8f8acf --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderConfig: BridgedDictionary { + public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, bitrate: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.bitrate] = bitrate.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift new file mode 100644 index 00000000..550e8415 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderInit: BridgedDictionary { + public convenience init(output: @escaping EncodedAudioChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute2Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute2Void + public var output: EncodedAudioChunkOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift new file mode 100644 index 00000000..bed3a52b --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioEncoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: AudioEncoderConfig +} diff --git a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift new file mode 100644 index 00000000..a629b0a5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift @@ -0,0 +1,28 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum AudioSampleFormat: JSString, JSValueCompatible { + case u8 = "u8" + case s16 = "s16" + case s32 = "s32" + case f32 = "f32" + case u8Planar = "u8-planar" + case s16Planar = "s16-planar" + case s32Planar = "s32-planar" + case f32Planar = "f32-planar" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/CodecState.swift b/Sources/DOMKit/WebIDL/CodecState.swift new file mode 100644 index 00000000..3495763f --- /dev/null +++ b/Sources/DOMKit/WebIDL/CodecState.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum CodecState: JSString, JSValueCompatible { + case unconfigured = "unconfigured" + case configured = "configured" + case closed = "closed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift new file mode 100644 index 00000000..010e2b06 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunk: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedAudioChunk].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: EncodedAudioChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: EncodedAudioChunkType + + @ReadonlyAttribute + public var timestamp: Int64 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift new file mode 100644 index 00000000..054201f8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunkInit: BridgedDictionary { + public convenience init(type: EncodedAudioChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: EncodedAudioChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift new file mode 100644 index 00000000..6f5f8314 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: AudioDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.decoderConfig] = decoderConfig.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var decoderConfig: AudioDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift new file mode 100644 index 00000000..9c35362e --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum EncodedAudioChunkType: JSString, JSValueCompatible { + case key = "key" + case delta = "delta" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift new file mode 100644 index 00000000..1da80666 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunk: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedVideoChunk].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: EncodedVideoChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: EncodedVideoChunkType + + @ReadonlyAttribute + public var timestamp: Int64 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift new file mode 100644 index 00000000..0c95c51f --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunkInit: BridgedDictionary { + public convenience init(type: EncodedVideoChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: EncodedVideoChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift new file mode 100644 index 00000000..6b3572e9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift @@ -0,0 +1,30 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: VideoDecoderConfig, svc: SvcOutputMetadata, alphaSideData: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.decoderConfig] = decoderConfig.jsValue + object[Strings.svc] = svc.jsValue + object[Strings.alphaSideData] = alphaSideData.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) + _svc = ReadWriteAttribute(jsObject: object, name: Strings.svc) + _alphaSideData = ReadWriteAttribute(jsObject: object, name: Strings.alphaSideData) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var decoderConfig: VideoDecoderConfig + + @ReadWriteAttribute + public var svc: SvcOutputMetadata + + @ReadWriteAttribute + public var alphaSideData: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift new file mode 100644 index 00000000..f59b9723 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum EncodedVideoChunkType: JSString, JSValueCompatible { + case key = "key" + case delta = "delta" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift new file mode 100644 index 00000000..9adb76b1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum HardwareAcceleration: JSString, JSValueCompatible { + case noPreference = "no-preference" + case preferHardware = "prefer-hardware" + case preferSoftware = "prefer-software" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ImageBufferSource.swift b/Sources/DOMKit/WebIDL/ImageBufferSource.swift new file mode 100644 index 00000000..0aa23282 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageBufferSource.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ImageBufferSource: ConvertibleToJSValue {} +extension BufferSource: Any_ImageBufferSource {} +extension ReadableStream: Any_ImageBufferSource {} + +public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { + case bufferSource(BufferSource) + case readableStream(ReadableStream) + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var readableStream: ReadableStream? { + switch self { + case let .readableStream(readableStream): return readableStream + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let readableStream: ReadableStream = value.fromJSValue() { + return .readableStream(readableStream) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .readableStream(readableStream): + return readableStream.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift new file mode 100644 index 00000000..89806708 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecodeOptions: BridgedDictionary { + public convenience init(frameIndex: UInt32, completeFramesOnly: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.frameIndex] = frameIndex.jsValue + object[Strings.completeFramesOnly] = completeFramesOnly.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _frameIndex = ReadWriteAttribute(jsObject: object, name: Strings.frameIndex) + _completeFramesOnly = ReadWriteAttribute(jsObject: object, name: Strings.completeFramesOnly) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var frameIndex: UInt32 + + @ReadWriteAttribute + public var completeFramesOnly: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift new file mode 100644 index 00000000..1a4cb939 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecodeResult: BridgedDictionary { + public convenience init(image: VideoFrame, complete: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.image] = image.jsValue + object[Strings.complete] = complete.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _image = ReadWriteAttribute(jsObject: object, name: Strings.image) + _complete = ReadWriteAttribute(jsObject: object, name: Strings.complete) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var image: VideoFrame + + @ReadWriteAttribute + public var complete: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageDecoder.swift b/Sources/DOMKit/WebIDL/ImageDecoder.swift new file mode 100644 index 00000000..6112d940 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecoder.swift @@ -0,0 +1,68 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) + _completed = ReadonlyAttribute(jsObject: jsObject, name: Strings.completed) + _tracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.tracks) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: ImageDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var complete: Bool + + @ReadonlyAttribute + public var completed: JSPromise + + @ReadonlyAttribute + public var tracks: ImageTrackList + + @inlinable public func decode(options: ImageDecodeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func decode(options: ImageDecodeOptions? = nil) async throws -> ImageDecodeResult { + let this = jsObject + let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isTypeSupported(type: String) -> JSPromise { + let this = constructor + return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isTypeSupported(type: String) async throws -> Bool { + let this = constructor + let _promise: JSPromise = this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift new file mode 100644 index 00000000..06179973 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift @@ -0,0 +1,50 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecoderInit: BridgedDictionary { + public convenience init(type: String, data: ImageBufferSource, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, desiredWidth: UInt32, desiredHeight: UInt32, preferAnimation: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.data] = data.jsValue + object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue + object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue + object[Strings.desiredWidth] = desiredWidth.jsValue + object[Strings.desiredHeight] = desiredHeight.jsValue + object[Strings.preferAnimation] = preferAnimation.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) + _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) + _desiredWidth = ReadWriteAttribute(jsObject: object, name: Strings.desiredWidth) + _desiredHeight = ReadWriteAttribute(jsObject: object, name: Strings.desiredHeight) + _preferAnimation = ReadWriteAttribute(jsObject: object, name: Strings.preferAnimation) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var data: ImageBufferSource + + @ReadWriteAttribute + public var premultiplyAlpha: PremultiplyAlpha + + @ReadWriteAttribute + public var colorSpaceConversion: ColorSpaceConversion + + @ReadWriteAttribute + public var desiredWidth: UInt32 + + @ReadWriteAttribute + public var desiredHeight: UInt32 + + @ReadWriteAttribute + public var preferAnimation: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageTrack.swift b/Sources/DOMKit/WebIDL/ImageTrack.swift new file mode 100644 index 00000000..b68c7a97 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageTrack.swift @@ -0,0 +1,32 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ImageTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _animated = ReadonlyAttribute(jsObject: jsObject, name: Strings.animated) + _frameCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameCount) + _repetitionCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.repetitionCount) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var animated: Bool + + @ReadonlyAttribute + public var frameCount: UInt32 + + @ReadonlyAttribute + public var repetitionCount: Float + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ReadWriteAttribute + public var selected: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageTrackList.swift b/Sources/DOMKit/WebIDL/ImageTrackList.swift new file mode 100644 index 00000000..10b44925 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageTrackList.swift @@ -0,0 +1,34 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageTrackList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageTrackList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _selectedTrack = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedTrack) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> ImageTrack { + jsObject[key].fromJSValue()! + } + + @ReadonlyAttribute + public var ready: JSPromise + + @ReadonlyAttribute + public var length: UInt32 + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ReadonlyAttribute + public var selectedTrack: ImageTrack? +} diff --git a/Sources/DOMKit/WebIDL/LatencyMode.swift b/Sources/DOMKit/WebIDL/LatencyMode.swift new file mode 100644 index 00000000..d4aa61af --- /dev/null +++ b/Sources/DOMKit/WebIDL/LatencyMode.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum LatencyMode: JSString, JSValueCompatible { + case quality = "quality" + case realtime = "realtime" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/PlaneLayout.swift b/Sources/DOMKit/WebIDL/PlaneLayout.swift new file mode 100644 index 00000000..a4de400e --- /dev/null +++ b/Sources/DOMKit/WebIDL/PlaneLayout.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class PlaneLayout: BridgedDictionary { + public convenience init(offset: UInt32, stride: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.stride] = stride.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _stride = ReadWriteAttribute(jsObject: object, name: Strings.stride) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: UInt32 + + @ReadWriteAttribute + public var stride: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift new file mode 100644 index 00000000..2487040f --- /dev/null +++ b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class SvcOutputMetadata: BridgedDictionary { + public convenience init(temporalLayerId: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.temporalLayerId] = temporalLayerId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _temporalLayerId = ReadWriteAttribute(jsObject: object, name: Strings.temporalLayerId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var temporalLayerId: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift new file mode 100644 index 00000000..364fa134 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoColorPrimaries: JSString, JSValueCompatible { + case bt709 = "bt709" + case bt470bg = "bt470bg" + case smpte170m = "smpte170m" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpace.swift b/Sources/DOMKit/WebIDL/VideoColorSpace.swift new file mode 100644 index 00000000..25b08860 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorSpace.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoColorSpace: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoColorSpace].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _primaries = ReadonlyAttribute(jsObject: jsObject, name: Strings.primaries) + _transfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.transfer) + _matrix = ReadonlyAttribute(jsObject: jsObject, name: Strings.matrix) + _fullRange = ReadonlyAttribute(jsObject: jsObject, name: Strings.fullRange) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var primaries: VideoColorPrimaries? + + @ReadonlyAttribute + public var transfer: VideoTransferCharacteristics? + + @ReadonlyAttribute + public var matrix: VideoMatrixCoefficients? + + @ReadonlyAttribute + public var fullRange: Bool? + + @inlinable public func toJSON() -> VideoColorSpaceInit { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift new file mode 100644 index 00000000..786cfccc --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoColorSpaceInit: BridgedDictionary { + public convenience init(primaries: VideoColorPrimaries, transfer: VideoTransferCharacteristics, matrix: VideoMatrixCoefficients, fullRange: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.primaries] = primaries.jsValue + object[Strings.transfer] = transfer.jsValue + object[Strings.matrix] = matrix.jsValue + object[Strings.fullRange] = fullRange.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _primaries = ReadWriteAttribute(jsObject: object, name: Strings.primaries) + _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) + _matrix = ReadWriteAttribute(jsObject: object, name: Strings.matrix) + _fullRange = ReadWriteAttribute(jsObject: object, name: Strings.fullRange) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var primaries: VideoColorPrimaries + + @ReadWriteAttribute + public var transfer: VideoTransferCharacteristics + + @ReadWriteAttribute + public var matrix: VideoMatrixCoefficients + + @ReadWriteAttribute + public var fullRange: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoder.swift b/Sources/DOMKit/WebIDL/VideoDecoder.swift new file mode 100644 index 00000000..8f8900c2 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var decodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func decode(chunk: EncodedVideoChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: VideoDecoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: VideoDecoderConfig) async throws -> VideoDecoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift new file mode 100644 index 00000000..3e431877 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderConfig: BridgedDictionary { + public convenience init(codec: String, description: BufferSource, codedWidth: UInt32, codedHeight: UInt32, displayAspectWidth: UInt32, displayAspectHeight: UInt32, colorSpace: VideoColorSpaceInit, hardwareAcceleration: HardwareAcceleration, optimizeForLatency: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.description] = description.jsValue + object[Strings.codedWidth] = codedWidth.jsValue + object[Strings.codedHeight] = codedHeight.jsValue + object[Strings.displayAspectWidth] = displayAspectWidth.jsValue + object[Strings.displayAspectHeight] = displayAspectHeight.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue + object[Strings.optimizeForLatency] = optimizeForLatency.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _description = ReadWriteAttribute(jsObject: object, name: Strings.description) + _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) + _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) + _displayAspectWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectWidth) + _displayAspectHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectHeight) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) + _optimizeForLatency = ReadWriteAttribute(jsObject: object, name: Strings.optimizeForLatency) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var description: BufferSource + + @ReadWriteAttribute + public var codedWidth: UInt32 + + @ReadWriteAttribute + public var codedHeight: UInt32 + + @ReadWriteAttribute + public var displayAspectWidth: UInt32 + + @ReadWriteAttribute + public var displayAspectHeight: UInt32 + + @ReadWriteAttribute + public var colorSpace: VideoColorSpaceInit + + @ReadWriteAttribute + public var hardwareAcceleration: HardwareAcceleration + + @ReadWriteAttribute + public var optimizeForLatency: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift new file mode 100644 index 00000000..0614f47e --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderInit: BridgedDictionary { + public convenience init(output: @escaping VideoFrameOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1Void + public var output: VideoFrameOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift new file mode 100644 index 00000000..4d41da3d --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: VideoDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoder.swift b/Sources/DOMKit/WebIDL/VideoEncoder.swift new file mode 100644 index 00000000..2349c057 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoEncoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { + let this = jsObject + _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) async throws -> VideoEncoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift new file mode 100644 index 00000000..c6fdfd98 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift @@ -0,0 +1,75 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderConfig: BridgedDictionary { + public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + object[Strings.bitrate] = bitrate.jsValue + object[Strings.framerate] = framerate.jsValue + object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.scalabilityMode] = scalabilityMode.jsValue + object[Strings.bitrateMode] = bitrateMode.jsValue + object[Strings.latencyMode] = latencyMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) + _framerate = ReadWriteAttribute(jsObject: object, name: Strings.framerate) + _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _scalabilityMode = ReadWriteAttribute(jsObject: object, name: Strings.scalabilityMode) + _bitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.bitrateMode) + _latencyMode = ReadWriteAttribute(jsObject: object, name: Strings.latencyMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 + + @ReadWriteAttribute + public var framerate: Double + + @ReadWriteAttribute + public var hardwareAcceleration: HardwareAcceleration + + @ReadWriteAttribute + public var alpha: AlphaOption + + @ReadWriteAttribute + public var scalabilityMode: String + + @ReadWriteAttribute + public var bitrateMode: BitrateMode + + @ReadWriteAttribute + public var latencyMode: LatencyMode +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift new file mode 100644 index 00000000..583d307c --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderEncodeOptions: BridgedDictionary { + public convenience init(keyFrame: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.keyFrame] = keyFrame.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var keyFrame: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift new file mode 100644 index 00000000..f9859e1b --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderInit: BridgedDictionary { + public convenience init(output: @escaping EncodedVideoChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute2Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute2Void + public var output: EncodedVideoChunkOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift new file mode 100644 index 00000000..f6419290 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoEncoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: VideoEncoderConfig +} diff --git a/Sources/DOMKit/WebIDL/VideoFrame.swift b/Sources/DOMKit/WebIDL/VideoFrame.swift new file mode 100644 index 00000000..9743b3fc --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrame.swift @@ -0,0 +1,89 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrame: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoFrame].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) + _codedWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedWidth) + _codedHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedHeight) + _codedRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedRect) + _visibleRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibleRect) + _displayWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayWidth) + _displayHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayHeight) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) + self.jsObject = jsObject + } + + @inlinable public convenience init(image: CanvasImageSource, init: VideoFrameInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [image.jsValue, `init`?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(data: BufferSource, init: VideoFrameBufferInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, `init`.jsValue])) + } + + @ReadonlyAttribute + public var format: VideoPixelFormat? + + @ReadonlyAttribute + public var codedWidth: UInt32 + + @ReadonlyAttribute + public var codedHeight: UInt32 + + @ReadonlyAttribute + public var codedRect: DOMRectReadOnly? + + @ReadonlyAttribute + public var visibleRect: DOMRectReadOnly? + + @ReadonlyAttribute + public var displayWidth: UInt32 + + @ReadonlyAttribute + public var displayHeight: UInt32 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var timestamp: Int64? + + @ReadonlyAttribute + public var colorSpace: VideoColorSpace + + @inlinable public func allocationSize(options: VideoFrameCopyToOptions? = nil) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) async throws -> [PlaneLayout] { + let this = jsObject + let _promise: JSPromise = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift new file mode 100644 index 00000000..0607012e --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift @@ -0,0 +1,65 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameBufferInit: BridgedDictionary { + public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.codedWidth] = codedWidth.jsValue + object[Strings.codedHeight] = codedHeight.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.layout] = layout.jsValue + object[Strings.visibleRect] = visibleRect.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) + _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: VideoPixelFormat + + @ReadWriteAttribute + public var codedWidth: UInt32 + + @ReadWriteAttribute + public var codedHeight: UInt32 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var layout: [PlaneLayout] + + @ReadWriteAttribute + public var visibleRect: DOMRectInit + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 + + @ReadWriteAttribute + public var colorSpace: VideoColorSpaceInit +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift new file mode 100644 index 00000000..a86c57dd --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameCopyToOptions: BridgedDictionary { + public convenience init(rect: DOMRectInit, layout: [PlaneLayout]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.rect] = rect.jsValue + object[Strings.layout] = layout.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _rect = ReadWriteAttribute(jsObject: object, name: Strings.rect) + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var rect: DOMRectInit + + @ReadWriteAttribute + public var layout: [PlaneLayout] +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameInit.swift b/Sources/DOMKit/WebIDL/VideoFrameInit.swift new file mode 100644 index 00000000..a70eaea1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameInit.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameInit: BridgedDictionary { + public convenience init(duration: UInt64, timestamp: Int64, alpha: AlphaOption, visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.duration] = duration.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.visibleRect] = visibleRect.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var alpha: AlphaOption + + @ReadWriteAttribute + public var visibleRect: DOMRectInit + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift new file mode 100644 index 00000000..58f11f73 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoMatrixCoefficients: JSString, JSValueCompatible { + case rgb = "rgb" + case bt709 = "bt709" + case bt470bg = "bt470bg" + case smpte170m = "smpte170m" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift new file mode 100644 index 00000000..1c8dea1f --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift @@ -0,0 +1,29 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoPixelFormat: JSString, JSValueCompatible { + case i420 = "I420" + case i420A = "I420A" + case i422 = "I422" + case i444 = "I444" + case nV12 = "NV12" + case rGBA = "RGBA" + case rGBX = "RGBX" + case bGRA = "BGRA" + case bGRX = "BGRX" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift new file mode 100644 index 00000000..e8407da6 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoTransferCharacteristics: JSString, JSValueCompatible { + case bt709 = "bt709" + case smpte170m = "smpte170m" + case iec6196621 = "iec61966-2-1" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} From ec617583d5b33bfca79c266c1cd16b3134d86b3c Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:11:45 +0100 Subject: [PATCH 02/18] Fix build issue with `BitrateMode` --- Sources/DOMKit/WebIDL/VideoEncoderConfig.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift index c6fdfd98..c4c3b885 100644 --- a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift +++ b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift @@ -4,6 +4,8 @@ import JavaScriptEventLoop import JavaScriptKit public class VideoEncoderConfig: BridgedDictionary { + public typealias BitrateMode = String + public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { let object = JSObject.global[Strings.Object].function!.new() object[Strings.codec] = codec.jsValue From b1801a7cd38978b89f21c9985d792c32ca0859b0 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:07:39 +0100 Subject: [PATCH 03/18] Resolve merge conflict --- Sources/DOMKit/WebIDL/AlphaOption.swift | 22 ----- Sources/DOMKit/WebIDL/AudioData.swift | 62 ------------- .../WebIDL/AudioDataCopyToOptions.swift | 35 -------- Sources/DOMKit/WebIDL/AudioDataInit.swift | 45 ---------- Sources/DOMKit/WebIDL/AudioDecoder.swift | 70 --------------- .../DOMKit/WebIDL/AudioDecoderConfig.swift | 35 -------- Sources/DOMKit/WebIDL/AudioDecoderInit.swift | 25 ------ .../DOMKit/WebIDL/AudioDecoderSupport.swift | 25 ------ Sources/DOMKit/WebIDL/AudioEncoder.swift | 70 --------------- .../DOMKit/WebIDL/AudioEncoderConfig.swift | 35 -------- Sources/DOMKit/WebIDL/AudioEncoderInit.swift | 25 ------ .../DOMKit/WebIDL/AudioEncoderSupport.swift | 25 ------ Sources/DOMKit/WebIDL/AudioSampleFormat.swift | 28 ------ Sources/DOMKit/WebIDL/CodecState.swift | 23 ----- Sources/DOMKit/WebIDL/EncodedAudioChunk.swift | 39 -------- .../DOMKit/WebIDL/EncodedAudioChunkInit.swift | 35 -------- .../WebIDL/EncodedAudioChunkMetadata.swift | 20 ----- .../DOMKit/WebIDL/EncodedAudioChunkType.swift | 22 ----- Sources/DOMKit/WebIDL/EncodedVideoChunk.swift | 39 -------- .../DOMKit/WebIDL/EncodedVideoChunkInit.swift | 35 -------- .../WebIDL/EncodedVideoChunkMetadata.swift | 30 ------- .../DOMKit/WebIDL/EncodedVideoChunkType.swift | 22 ----- .../DOMKit/WebIDL/HardwareAcceleration.swift | 23 ----- Sources/DOMKit/WebIDL/ImageBufferSource.swift | 46 ---------- .../DOMKit/WebIDL/ImageDecodeOptions.swift | 25 ------ Sources/DOMKit/WebIDL/ImageDecodeResult.swift | 25 ------ Sources/DOMKit/WebIDL/ImageDecoder.swift | 68 -------------- Sources/DOMKit/WebIDL/ImageDecoderInit.swift | 50 ----------- Sources/DOMKit/WebIDL/ImageTrack.swift | 32 ------- Sources/DOMKit/WebIDL/ImageTrackList.swift | 34 ------- Sources/DOMKit/WebIDL/LatencyMode.swift | 22 ----- Sources/DOMKit/WebIDL/PlaneLayout.swift | 25 ------ Sources/DOMKit/WebIDL/SvcOutputMetadata.swift | 20 ----- .../DOMKit/WebIDL/VideoColorPrimaries.swift | 23 ----- Sources/DOMKit/WebIDL/VideoColorSpace.swift | 39 -------- .../DOMKit/WebIDL/VideoColorSpaceInit.swift | 35 -------- Sources/DOMKit/WebIDL/VideoDecoder.swift | 70 --------------- .../DOMKit/WebIDL/VideoDecoderConfig.swift | 60 ------------- Sources/DOMKit/WebIDL/VideoDecoderInit.swift | 25 ------ .../DOMKit/WebIDL/VideoDecoderSupport.swift | 25 ------ Sources/DOMKit/WebIDL/VideoEncoder.swift | 70 --------------- .../DOMKit/WebIDL/VideoEncoderConfig.swift | 77 ---------------- .../WebIDL/VideoEncoderEncodeOptions.swift | 20 ----- Sources/DOMKit/WebIDL/VideoEncoderInit.swift | 25 ------ .../DOMKit/WebIDL/VideoEncoderSupport.swift | 25 ------ Sources/DOMKit/WebIDL/VideoFrame.swift | 89 ------------------- .../DOMKit/WebIDL/VideoFrameBufferInit.swift | 65 -------------- .../WebIDL/VideoFrameCopyToOptions.swift | 25 ------ Sources/DOMKit/WebIDL/VideoFrameInit.swift | 45 ---------- .../WebIDL/VideoMatrixCoefficients.swift | 24 ----- Sources/DOMKit/WebIDL/VideoPixelFormat.swift | 29 ------ .../WebIDL/VideoTransferCharacteristics.swift | 23 ----- 52 files changed, 1931 deletions(-) delete mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioData.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/CodecState.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift delete mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift delete mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift diff --git a/Sources/DOMKit/WebIDL/AlphaOption.swift b/Sources/DOMKit/WebIDL/AlphaOption.swift deleted file mode 100644 index f086fd3a..00000000 --- a/Sources/DOMKit/WebIDL/AlphaOption.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AlphaOption: JSString, JSValueCompatible { - case keep = "keep" - case discard = "discard" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/AudioData.swift b/Sources/DOMKit/WebIDL/AudioData.swift deleted file mode 100644 index a0fc829f..00000000 --- a/Sources/DOMKit/WebIDL/AudioData.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioData: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) - _sampleRate = ReadonlyAttribute(jsObject: jsObject, name: Strings.sampleRate) - _numberOfFrames = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfFrames) - _numberOfChannels = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfChannels) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioDataInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var format: AudioSampleFormat? - - @ReadonlyAttribute - public var sampleRate: Float - - @ReadonlyAttribute - public var numberOfFrames: UInt32 - - @ReadonlyAttribute - public var numberOfChannels: UInt32 - - @ReadonlyAttribute - public var duration: UInt64 - - @ReadonlyAttribute - public var timestamp: Int64 - - @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { - let this = jsObject - return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! - } - - @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift deleted file mode 100644 index 78daea46..00000000 --- a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDataCopyToOptions: BridgedDictionary { - public convenience init(planeIndex: UInt32, frameOffset: UInt32, frameCount: UInt32, format: AudioSampleFormat) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.planeIndex] = planeIndex.jsValue - object[Strings.frameOffset] = frameOffset.jsValue - object[Strings.frameCount] = frameCount.jsValue - object[Strings.format] = format.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _planeIndex = ReadWriteAttribute(jsObject: object, name: Strings.planeIndex) - _frameOffset = ReadWriteAttribute(jsObject: object, name: Strings.frameOffset) - _frameCount = ReadWriteAttribute(jsObject: object, name: Strings.frameCount) - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var planeIndex: UInt32 - - @ReadWriteAttribute - public var frameOffset: UInt32 - - @ReadWriteAttribute - public var frameCount: UInt32 - - @ReadWriteAttribute - public var format: AudioSampleFormat -} diff --git a/Sources/DOMKit/WebIDL/AudioDataInit.swift b/Sources/DOMKit/WebIDL/AudioDataInit.swift deleted file mode 100644 index d0395761..00000000 --- a/Sources/DOMKit/WebIDL/AudioDataInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDataInit: BridgedDictionary { - public convenience init(format: AudioSampleFormat, sampleRate: Float, numberOfFrames: UInt32, numberOfChannels: UInt32, timestamp: Int64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.format] = format.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfFrames] = numberOfFrames.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfFrames = ReadWriteAttribute(jsObject: object, name: Strings.numberOfFrames) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var format: AudioSampleFormat - - @ReadWriteAttribute - public var sampleRate: Float - - @ReadWriteAttribute - public var numberOfFrames: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoder.swift b/Sources/DOMKit/WebIDL/AudioDecoder.swift deleted file mode 100644 index d511e5ba..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var decodeQueueSize: UInt32 - - @inlinable public func configure(config: AudioDecoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func decode(chunk: EncodedAudioChunk) { - let this = jsObject - _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: AudioDecoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: AudioDecoderConfig) async throws -> AudioDecoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift deleted file mode 100644 index 55aa5a27..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderConfig: BridgedDictionary { - public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, description: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.description] = description.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _description = ReadWriteAttribute(jsObject: object, name: Strings.description) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var sampleRate: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var description: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift deleted file mode 100644 index b98e0449..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderInit: BridgedDictionary { - public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1Void - public var output: AudioDataOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift deleted file mode 100644 index 8245e0da..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: AudioDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: AudioDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoder.swift b/Sources/DOMKit/WebIDL/AudioEncoder.swift deleted file mode 100644 index 7565bc23..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioEncoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var encodeQueueSize: UInt32 - - @inlinable public func configure(config: AudioEncoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func encode(data: AudioData) { - let this = jsObject - _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: AudioEncoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: AudioEncoderConfig) async throws -> AudioEncoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift deleted file mode 100644 index 0d8f8acf..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderConfig: BridgedDictionary { - public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, bitrate: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.bitrate] = bitrate.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var sampleRate: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var bitrate: UInt64 -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift deleted file mode 100644 index 550e8415..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderInit: BridgedDictionary { - public convenience init(output: @escaping EncodedAudioChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute2Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute2Void - public var output: EncodedAudioChunkOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift deleted file mode 100644 index bed3a52b..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: AudioEncoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: AudioEncoderConfig -} diff --git a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift deleted file mode 100644 index a629b0a5..00000000 --- a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AudioSampleFormat: JSString, JSValueCompatible { - case u8 = "u8" - case s16 = "s16" - case s32 = "s32" - case f32 = "f32" - case u8Planar = "u8-planar" - case s16Planar = "s16-planar" - case s32Planar = "s32-planar" - case f32Planar = "f32-planar" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CodecState.swift b/Sources/DOMKit/WebIDL/CodecState.swift deleted file mode 100644 index 3495763f..00000000 --- a/Sources/DOMKit/WebIDL/CodecState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CodecState: JSString, JSValueCompatible { - case unconfigured = "unconfigured" - case configured = "configured" - case closed = "closed" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift deleted file mode 100644 index 010e2b06..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunk: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedAudioChunk].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: EncodedAudioChunkInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: EncodedAudioChunkType - - @ReadonlyAttribute - public var timestamp: Int64 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var byteLength: UInt32 - - @inlinable public func copyTo(destination: BufferSource) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift deleted file mode 100644 index 054201f8..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunkInit: BridgedDictionary { - public convenience init(type: EncodedAudioChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: EncodedAudioChunkType - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift deleted file mode 100644 index 6f5f8314..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunkMetadata: BridgedDictionary { - public convenience init(decoderConfig: AudioDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.decoderConfig] = decoderConfig.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var decoderConfig: AudioDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift deleted file mode 100644 index 9c35362e..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EncodedAudioChunkType: JSString, JSValueCompatible { - case key = "key" - case delta = "delta" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift deleted file mode 100644 index 1da80666..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunk: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedVideoChunk].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: EncodedVideoChunkInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: EncodedVideoChunkType - - @ReadonlyAttribute - public var timestamp: Int64 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var byteLength: UInt32 - - @inlinable public func copyTo(destination: BufferSource) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift deleted file mode 100644 index 0c95c51f..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunkInit: BridgedDictionary { - public convenience init(type: EncodedVideoChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: EncodedVideoChunkType - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift deleted file mode 100644 index 6b3572e9..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunkMetadata: BridgedDictionary { - public convenience init(decoderConfig: VideoDecoderConfig, svc: SvcOutputMetadata, alphaSideData: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.decoderConfig] = decoderConfig.jsValue - object[Strings.svc] = svc.jsValue - object[Strings.alphaSideData] = alphaSideData.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) - _svc = ReadWriteAttribute(jsObject: object, name: Strings.svc) - _alphaSideData = ReadWriteAttribute(jsObject: object, name: Strings.alphaSideData) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var decoderConfig: VideoDecoderConfig - - @ReadWriteAttribute - public var svc: SvcOutputMetadata - - @ReadWriteAttribute - public var alphaSideData: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift deleted file mode 100644 index f59b9723..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EncodedVideoChunkType: JSString, JSValueCompatible { - case key = "key" - case delta = "delta" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift deleted file mode 100644 index 9adb76b1..00000000 --- a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum HardwareAcceleration: JSString, JSValueCompatible { - case noPreference = "no-preference" - case preferHardware = "prefer-hardware" - case preferSoftware = "prefer-software" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ImageBufferSource.swift b/Sources/DOMKit/WebIDL/ImageBufferSource.swift deleted file mode 100644 index 0aa23282..00000000 --- a/Sources/DOMKit/WebIDL/ImageBufferSource.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ImageBufferSource: ConvertibleToJSValue {} -extension BufferSource: Any_ImageBufferSource {} -extension ReadableStream: Any_ImageBufferSource {} - -public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { - case bufferSource(BufferSource) - case readableStream(ReadableStream) - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var readableStream: ReadableStream? { - switch self { - case let .readableStream(readableStream): return readableStream - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let readableStream: ReadableStream = value.fromJSValue() { - return .readableStream(readableStream) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .readableStream(readableStream): - return readableStream.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift deleted file mode 100644 index 89806708..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecodeOptions: BridgedDictionary { - public convenience init(frameIndex: UInt32, completeFramesOnly: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.frameIndex] = frameIndex.jsValue - object[Strings.completeFramesOnly] = completeFramesOnly.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _frameIndex = ReadWriteAttribute(jsObject: object, name: Strings.frameIndex) - _completeFramesOnly = ReadWriteAttribute(jsObject: object, name: Strings.completeFramesOnly) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var frameIndex: UInt32 - - @ReadWriteAttribute - public var completeFramesOnly: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift deleted file mode 100644 index 1a4cb939..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecodeResult: BridgedDictionary { - public convenience init(image: VideoFrame, complete: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.image] = image.jsValue - object[Strings.complete] = complete.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _image = ReadWriteAttribute(jsObject: object, name: Strings.image) - _complete = ReadWriteAttribute(jsObject: object, name: Strings.complete) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var image: VideoFrame - - @ReadWriteAttribute - public var complete: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageDecoder.swift b/Sources/DOMKit/WebIDL/ImageDecoder.swift deleted file mode 100644 index 6112d940..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecoder.swift +++ /dev/null @@ -1,68 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) - _completed = ReadonlyAttribute(jsObject: jsObject, name: Strings.completed) - _tracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.tracks) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: ImageDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var complete: Bool - - @ReadonlyAttribute - public var completed: JSPromise - - @ReadonlyAttribute - public var tracks: ImageTrackList - - @inlinable public func decode(options: ImageDecodeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func decode(options: ImageDecodeOptions? = nil) async throws -> ImageDecodeResult { - let this = jsObject - let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isTypeSupported(type: String) -> JSPromise { - let this = constructor - return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isTypeSupported(type: String) async throws -> Bool { - let this = constructor - let _promise: JSPromise = this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift deleted file mode 100644 index 06179973..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecoderInit: BridgedDictionary { - public convenience init(type: String, data: ImageBufferSource, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, desiredWidth: UInt32, desiredHeight: UInt32, preferAnimation: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.data] = data.jsValue - object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue - object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue - object[Strings.desiredWidth] = desiredWidth.jsValue - object[Strings.desiredHeight] = desiredHeight.jsValue - object[Strings.preferAnimation] = preferAnimation.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) - _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) - _desiredWidth = ReadWriteAttribute(jsObject: object, name: Strings.desiredWidth) - _desiredHeight = ReadWriteAttribute(jsObject: object, name: Strings.desiredHeight) - _preferAnimation = ReadWriteAttribute(jsObject: object, name: Strings.preferAnimation) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var data: ImageBufferSource - - @ReadWriteAttribute - public var premultiplyAlpha: PremultiplyAlpha - - @ReadWriteAttribute - public var colorSpaceConversion: ColorSpaceConversion - - @ReadWriteAttribute - public var desiredWidth: UInt32 - - @ReadWriteAttribute - public var desiredHeight: UInt32 - - @ReadWriteAttribute - public var preferAnimation: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageTrack.swift b/Sources/DOMKit/WebIDL/ImageTrack.swift deleted file mode 100644 index b68c7a97..00000000 --- a/Sources/DOMKit/WebIDL/ImageTrack.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ImageTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _animated = ReadonlyAttribute(jsObject: jsObject, name: Strings.animated) - _frameCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameCount) - _repetitionCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.repetitionCount) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var animated: Bool - - @ReadonlyAttribute - public var frameCount: UInt32 - - @ReadonlyAttribute - public var repetitionCount: Float - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ReadWriteAttribute - public var selected: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageTrackList.swift b/Sources/DOMKit/WebIDL/ImageTrackList.swift deleted file mode 100644 index 10b44925..00000000 --- a/Sources/DOMKit/WebIDL/ImageTrackList.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageTrackList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageTrackList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _selectedTrack = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedTrack) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> ImageTrack { - jsObject[key].fromJSValue()! - } - - @ReadonlyAttribute - public var ready: JSPromise - - @ReadonlyAttribute - public var length: UInt32 - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ReadonlyAttribute - public var selectedTrack: ImageTrack? -} diff --git a/Sources/DOMKit/WebIDL/LatencyMode.swift b/Sources/DOMKit/WebIDL/LatencyMode.swift deleted file mode 100644 index d4aa61af..00000000 --- a/Sources/DOMKit/WebIDL/LatencyMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum LatencyMode: JSString, JSValueCompatible { - case quality = "quality" - case realtime = "realtime" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/PlaneLayout.swift b/Sources/DOMKit/WebIDL/PlaneLayout.swift deleted file mode 100644 index a4de400e..00000000 --- a/Sources/DOMKit/WebIDL/PlaneLayout.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PlaneLayout: BridgedDictionary { - public convenience init(offset: UInt32, stride: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.stride] = stride.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _stride = ReadWriteAttribute(jsObject: object, name: Strings.stride) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: UInt32 - - @ReadWriteAttribute - public var stride: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift deleted file mode 100644 index 2487040f..00000000 --- a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class SvcOutputMetadata: BridgedDictionary { - public convenience init(temporalLayerId: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.temporalLayerId] = temporalLayerId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _temporalLayerId = ReadWriteAttribute(jsObject: object, name: Strings.temporalLayerId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var temporalLayerId: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift deleted file mode 100644 index 364fa134..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoColorPrimaries: JSString, JSValueCompatible { - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpace.swift b/Sources/DOMKit/WebIDL/VideoColorSpace.swift deleted file mode 100644 index 25b08860..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorSpace.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoColorSpace: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoColorSpace].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _primaries = ReadonlyAttribute(jsObject: jsObject, name: Strings.primaries) - _transfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.transfer) - _matrix = ReadonlyAttribute(jsObject: jsObject, name: Strings.matrix) - _fullRange = ReadonlyAttribute(jsObject: jsObject, name: Strings.fullRange) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var primaries: VideoColorPrimaries? - - @ReadonlyAttribute - public var transfer: VideoTransferCharacteristics? - - @ReadonlyAttribute - public var matrix: VideoMatrixCoefficients? - - @ReadonlyAttribute - public var fullRange: Bool? - - @inlinable public func toJSON() -> VideoColorSpaceInit { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift deleted file mode 100644 index 786cfccc..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoColorSpaceInit: BridgedDictionary { - public convenience init(primaries: VideoColorPrimaries, transfer: VideoTransferCharacteristics, matrix: VideoMatrixCoefficients, fullRange: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.primaries] = primaries.jsValue - object[Strings.transfer] = transfer.jsValue - object[Strings.matrix] = matrix.jsValue - object[Strings.fullRange] = fullRange.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _primaries = ReadWriteAttribute(jsObject: object, name: Strings.primaries) - _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) - _matrix = ReadWriteAttribute(jsObject: object, name: Strings.matrix) - _fullRange = ReadWriteAttribute(jsObject: object, name: Strings.fullRange) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var primaries: VideoColorPrimaries - - @ReadWriteAttribute - public var transfer: VideoTransferCharacteristics - - @ReadWriteAttribute - public var matrix: VideoMatrixCoefficients - - @ReadWriteAttribute - public var fullRange: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoder.swift b/Sources/DOMKit/WebIDL/VideoDecoder.swift deleted file mode 100644 index 8f8900c2..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var decodeQueueSize: UInt32 - - @inlinable public func configure(config: VideoDecoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func decode(chunk: EncodedVideoChunk) { - let this = jsObject - _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: VideoDecoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: VideoDecoderConfig) async throws -> VideoDecoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift deleted file mode 100644 index 3e431877..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderConfig: BridgedDictionary { - public convenience init(codec: String, description: BufferSource, codedWidth: UInt32, codedHeight: UInt32, displayAspectWidth: UInt32, displayAspectHeight: UInt32, colorSpace: VideoColorSpaceInit, hardwareAcceleration: HardwareAcceleration, optimizeForLatency: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.description] = description.jsValue - object[Strings.codedWidth] = codedWidth.jsValue - object[Strings.codedHeight] = codedHeight.jsValue - object[Strings.displayAspectWidth] = displayAspectWidth.jsValue - object[Strings.displayAspectHeight] = displayAspectHeight.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue - object[Strings.optimizeForLatency] = optimizeForLatency.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _description = ReadWriteAttribute(jsObject: object, name: Strings.description) - _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) - _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) - _displayAspectWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectWidth) - _displayAspectHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectHeight) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) - _optimizeForLatency = ReadWriteAttribute(jsObject: object, name: Strings.optimizeForLatency) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var description: BufferSource - - @ReadWriteAttribute - public var codedWidth: UInt32 - - @ReadWriteAttribute - public var codedHeight: UInt32 - - @ReadWriteAttribute - public var displayAspectWidth: UInt32 - - @ReadWriteAttribute - public var displayAspectHeight: UInt32 - - @ReadWriteAttribute - public var colorSpace: VideoColorSpaceInit - - @ReadWriteAttribute - public var hardwareAcceleration: HardwareAcceleration - - @ReadWriteAttribute - public var optimizeForLatency: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift deleted file mode 100644 index 0614f47e..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderInit: BridgedDictionary { - public convenience init(output: @escaping VideoFrameOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1Void - public var output: VideoFrameOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift deleted file mode 100644 index 4d41da3d..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: VideoDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: VideoDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoder.swift b/Sources/DOMKit/WebIDL/VideoEncoder.swift deleted file mode 100644 index 2349c057..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoEncoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoEncoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var encodeQueueSize: UInt32 - - @inlinable public func configure(config: VideoEncoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { - let this = jsObject - _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: VideoEncoderConfig) async throws -> VideoEncoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift deleted file mode 100644 index c4c3b885..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift +++ /dev/null @@ -1,77 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderConfig: BridgedDictionary { - public typealias BitrateMode = String - - public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - object[Strings.bitrate] = bitrate.jsValue - object[Strings.framerate] = framerate.jsValue - object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue - object[Strings.alpha] = alpha.jsValue - object[Strings.scalabilityMode] = scalabilityMode.jsValue - object[Strings.bitrateMode] = bitrateMode.jsValue - object[Strings.latencyMode] = latencyMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) - _framerate = ReadWriteAttribute(jsObject: object, name: Strings.framerate) - _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _scalabilityMode = ReadWriteAttribute(jsObject: object, name: Strings.scalabilityMode) - _bitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.bitrateMode) - _latencyMode = ReadWriteAttribute(jsObject: object, name: Strings.latencyMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 - - @ReadWriteAttribute - public var bitrate: UInt64 - - @ReadWriteAttribute - public var framerate: Double - - @ReadWriteAttribute - public var hardwareAcceleration: HardwareAcceleration - - @ReadWriteAttribute - public var alpha: AlphaOption - - @ReadWriteAttribute - public var scalabilityMode: String - - @ReadWriteAttribute - public var bitrateMode: BitrateMode - - @ReadWriteAttribute - public var latencyMode: LatencyMode -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift deleted file mode 100644 index 583d307c..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderEncodeOptions: BridgedDictionary { - public convenience init(keyFrame: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.keyFrame] = keyFrame.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var keyFrame: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift deleted file mode 100644 index f9859e1b..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderInit: BridgedDictionary { - public convenience init(output: @escaping EncodedVideoChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute2Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute2Void - public var output: EncodedVideoChunkOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift deleted file mode 100644 index f6419290..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: VideoEncoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: VideoEncoderConfig -} diff --git a/Sources/DOMKit/WebIDL/VideoFrame.swift b/Sources/DOMKit/WebIDL/VideoFrame.swift deleted file mode 100644 index 9743b3fc..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrame.swift +++ /dev/null @@ -1,89 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrame: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoFrame].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) - _codedWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedWidth) - _codedHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedHeight) - _codedRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedRect) - _visibleRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibleRect) - _displayWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayWidth) - _displayHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayHeight) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) - self.jsObject = jsObject - } - - @inlinable public convenience init(image: CanvasImageSource, init: VideoFrameInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [image.jsValue, `init`?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(data: BufferSource, init: VideoFrameBufferInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, `init`.jsValue])) - } - - @ReadonlyAttribute - public var format: VideoPixelFormat? - - @ReadonlyAttribute - public var codedWidth: UInt32 - - @ReadonlyAttribute - public var codedHeight: UInt32 - - @ReadonlyAttribute - public var codedRect: DOMRectReadOnly? - - @ReadonlyAttribute - public var visibleRect: DOMRectReadOnly? - - @ReadonlyAttribute - public var displayWidth: UInt32 - - @ReadonlyAttribute - public var displayHeight: UInt32 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var timestamp: Int64? - - @ReadonlyAttribute - public var colorSpace: VideoColorSpace - - @inlinable public func allocationSize(options: VideoFrameCopyToOptions? = nil) -> UInt32 { - let this = jsObject - return this[Strings.allocationSize].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) async throws -> [PlaneLayout] { - let this = jsObject - let _promise: JSPromise = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift deleted file mode 100644 index 0607012e..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift +++ /dev/null @@ -1,65 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameBufferInit: BridgedDictionary { - public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.format] = format.jsValue - object[Strings.codedWidth] = codedWidth.jsValue - object[Strings.codedHeight] = codedHeight.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.layout] = layout.jsValue - object[Strings.visibleRect] = visibleRect.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) - _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) - _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var format: VideoPixelFormat - - @ReadWriteAttribute - public var codedWidth: UInt32 - - @ReadWriteAttribute - public var codedHeight: UInt32 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var layout: [PlaneLayout] - - @ReadWriteAttribute - public var visibleRect: DOMRectInit - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 - - @ReadWriteAttribute - public var colorSpace: VideoColorSpaceInit -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift deleted file mode 100644 index a86c57dd..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameCopyToOptions: BridgedDictionary { - public convenience init(rect: DOMRectInit, layout: [PlaneLayout]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.rect] = rect.jsValue - object[Strings.layout] = layout.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _rect = ReadWriteAttribute(jsObject: object, name: Strings.rect) - _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var rect: DOMRectInit - - @ReadWriteAttribute - public var layout: [PlaneLayout] -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameInit.swift b/Sources/DOMKit/WebIDL/VideoFrameInit.swift deleted file mode 100644 index a70eaea1..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameInit: BridgedDictionary { - public convenience init(duration: UInt64, timestamp: Int64, alpha: AlphaOption, visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.duration] = duration.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.alpha] = alpha.jsValue - object[Strings.visibleRect] = visibleRect.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var alpha: AlphaOption - - @ReadWriteAttribute - public var visibleRect: DOMRectInit - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift deleted file mode 100644 index 58f11f73..00000000 --- a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoMatrixCoefficients: JSString, JSValueCompatible { - case rgb = "rgb" - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift deleted file mode 100644 index 1c8dea1f..00000000 --- a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoPixelFormat: JSString, JSValueCompatible { - case i420 = "I420" - case i420A = "I420A" - case i422 = "I422" - case i444 = "I444" - case nV12 = "NV12" - case rGBA = "RGBA" - case rGBX = "RGBX" - case bGRA = "BGRA" - case bGRX = "BGRX" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift deleted file mode 100644 index e8407da6..00000000 --- a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoTransferCharacteristics: JSString, JSValueCompatible { - case bt709 = "bt709" - case smpte170m = "smpte170m" - case iec6196621 = "iec61966-2-1" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} From 4920dc0294db01b309a492d7bdf295a8ef407dcc Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:15:27 +0100 Subject: [PATCH 04/18] Add `webgl1` IDL spec and generated code --- Sources/DOMKit/WebIDL/Float32List.swift | 46 + Sources/DOMKit/WebIDL/Int32List.swift | 46 + Sources/DOMKit/WebIDL/TexImageSource.swift | 116 ++ Sources/DOMKit/WebIDL/WebGLActiveInfo.swift | 26 + Sources/DOMKit/WebIDL/WebGLBuffer.swift | 12 + .../WebIDL/WebGLContextAttributes.swift | 60 + Sources/DOMKit/WebIDL/WebGLContextEvent.swift | 20 + .../DOMKit/WebIDL/WebGLContextEventInit.swift | 20 + Sources/DOMKit/WebIDL/WebGLFramebuffer.swift | 12 + Sources/DOMKit/WebIDL/WebGLObject.swift | 14 + .../DOMKit/WebIDL/WebGLPowerPreference.swift | 23 + Sources/DOMKit/WebIDL/WebGLProgram.swift | 12 + Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift | 12 + .../DOMKit/WebIDL/WebGLRenderingContext.swift | 14 + .../WebIDL/WebGLRenderingContextBase.swift | 1217 +++++++++++++++++ .../WebGLRenderingContextOverloads.swift | 165 +++ Sources/DOMKit/WebIDL/WebGLShader.swift | 12 + .../WebIDL/WebGLShaderPrecisionFormat.swift | 26 + Sources/DOMKit/WebIDL/WebGLTexture.swift | 12 + .../DOMKit/WebIDL/WebGLUniformLocation.swift | 14 + 20 files changed, 1879 insertions(+) create mode 100644 Sources/DOMKit/WebIDL/Float32List.swift create mode 100644 Sources/DOMKit/WebIDL/Int32List.swift create mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift diff --git a/Sources/DOMKit/WebIDL/Float32List.swift b/Sources/DOMKit/WebIDL/Float32List.swift new file mode 100644 index 00000000..1f1e5bdb --- /dev/null +++ b/Sources/DOMKit/WebIDL/Float32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Float32List: ConvertibleToJSValue {} +extension Float32Array: Any_Float32List {} +extension Array: Any_Float32List where Element == GLfloat {} + +public enum Float32List: JSValueCompatible, Any_Float32List { + case float32Array(Float32Array) + case seq_of_GLfloat([GLfloat]) + + var float32Array: Float32Array? { + switch self { + case let .float32Array(float32Array): return float32Array + default: return nil + } + } + + var seq_of_GLfloat: [GLfloat]? { + switch self { + case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let float32Array: Float32Array = value.fromJSValue() { + return .float32Array(float32Array) + } + if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { + return .seq_of_GLfloat(seq_of_GLfloat) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .float32Array(float32Array): + return float32Array.jsValue + case let .seq_of_GLfloat(seq_of_GLfloat): + return seq_of_GLfloat.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/Int32List.swift b/Sources/DOMKit/WebIDL/Int32List.swift new file mode 100644 index 00000000..ce876a5b --- /dev/null +++ b/Sources/DOMKit/WebIDL/Int32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Int32List: ConvertibleToJSValue {} +extension Int32Array: Any_Int32List {} +extension Array: Any_Int32List where Element == GLint {} + +public enum Int32List: JSValueCompatible, Any_Int32List { + case int32Array(Int32Array) + case seq_of_GLint([GLint]) + + var int32Array: Int32Array? { + switch self { + case let .int32Array(int32Array): return int32Array + default: return nil + } + } + + var seq_of_GLint: [GLint]? { + switch self { + case let .seq_of_GLint(seq_of_GLint): return seq_of_GLint + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let int32Array: Int32Array = value.fromJSValue() { + return .int32Array(int32Array) + } + if let seq_of_GLint: [GLint] = value.fromJSValue() { + return .seq_of_GLint(seq_of_GLint) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .int32Array(int32Array): + return int32Array.jsValue + case let .seq_of_GLint(seq_of_GLint): + return seq_of_GLint.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/TexImageSource.swift b/Sources/DOMKit/WebIDL/TexImageSource.swift new file mode 100644 index 00000000..d5750fff --- /dev/null +++ b/Sources/DOMKit/WebIDL/TexImageSource.swift @@ -0,0 +1,116 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_TexImageSource: ConvertibleToJSValue {} +extension HTMLCanvasElement: Any_TexImageSource {} +extension HTMLImageElement: Any_TexImageSource {} +extension HTMLVideoElement: Any_TexImageSource {} +extension ImageBitmap: Any_TexImageSource {} +extension ImageData: Any_TexImageSource {} +extension OffscreenCanvas: Any_TexImageSource {} +extension VideoFrame: Any_TexImageSource {} + +public enum TexImageSource: JSValueCompatible, Any_TexImageSource { + case htmlCanvasElement(HTMLCanvasElement) + case htmlImageElement(HTMLImageElement) + case htmlVideoElement(HTMLVideoElement) + case imageBitmap(ImageBitmap) + case imageData(ImageData) + case offscreenCanvas(OffscreenCanvas) + case videoFrame(VideoFrame) + + var htmlCanvasElement: HTMLCanvasElement? { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement + default: return nil + } + } + + var htmlImageElement: HTMLImageElement? { + switch self { + case let .htmlImageElement(htmlImageElement): return htmlImageElement + default: return nil + } + } + + var htmlVideoElement: HTMLVideoElement? { + switch self { + case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement + default: return nil + } + } + + var imageBitmap: ImageBitmap? { + switch self { + case let .imageBitmap(imageBitmap): return imageBitmap + default: return nil + } + } + + var imageData: ImageData? { + switch self { + case let .imageData(imageData): return imageData + default: return nil + } + } + + var offscreenCanvas: OffscreenCanvas? { + switch self { + case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas + default: return nil + } + } + + var videoFrame: VideoFrame? { + switch self { + case let .videoFrame(videoFrame): return videoFrame + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { + return .htmlCanvasElement(htmlCanvasElement) + } + if let htmlImageElement: HTMLImageElement = value.fromJSValue() { + return .htmlImageElement(htmlImageElement) + } + if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { + return .htmlVideoElement(htmlVideoElement) + } + if let imageBitmap: ImageBitmap = value.fromJSValue() { + return .imageBitmap(imageBitmap) + } + if let imageData: ImageData = value.fromJSValue() { + return .imageData(imageData) + } + if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { + return .offscreenCanvas(offscreenCanvas) + } + if let videoFrame: VideoFrame = value.fromJSValue() { + return .videoFrame(videoFrame) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): + return htmlCanvasElement.jsValue + case let .htmlImageElement(htmlImageElement): + return htmlImageElement.jsValue + case let .htmlVideoElement(htmlVideoElement): + return htmlVideoElement.jsValue + case let .imageBitmap(imageBitmap): + return imageBitmap.jsValue + case let .imageData(imageData): + return imageData.jsValue + case let .offscreenCanvas(offscreenCanvas): + return offscreenCanvas.jsValue + case let .videoFrame(videoFrame): + return videoFrame.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift new file mode 100644 index 00000000..38991452 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift @@ -0,0 +1,26 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLActiveInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLActiveInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var size: GLint + + @ReadonlyAttribute + public var type: GLenum + + @ReadonlyAttribute + public var name: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLBuffer.swift b/Sources/DOMKit/WebIDL/WebGLBuffer.swift new file mode 100644 index 00000000..c5217eb0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLBuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLBuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLBuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift new file mode 100644 index 00000000..28853501 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextAttributes: BridgedDictionary { + public convenience init(alpha: Bool, depth: Bool, stencil: Bool, antialias: Bool, premultipliedAlpha: Bool, preserveDrawingBuffer: Bool, powerPreference: WebGLPowerPreference, failIfMajorPerformanceCaveat: Bool, desynchronized: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + object[Strings.depth] = depth.jsValue + object[Strings.stencil] = stencil.jsValue + object[Strings.antialias] = antialias.jsValue + object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue + object[Strings.preserveDrawingBuffer] = preserveDrawingBuffer.jsValue + object[Strings.powerPreference] = powerPreference.jsValue + object[Strings.failIfMajorPerformanceCaveat] = failIfMajorPerformanceCaveat.jsValue + object[Strings.desynchronized] = desynchronized.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _depth = ReadWriteAttribute(jsObject: object, name: Strings.depth) + _stencil = ReadWriteAttribute(jsObject: object, name: Strings.stencil) + _antialias = ReadWriteAttribute(jsObject: object, name: Strings.antialias) + _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) + _preserveDrawingBuffer = ReadWriteAttribute(jsObject: object, name: Strings.preserveDrawingBuffer) + _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) + _failIfMajorPerformanceCaveat = ReadWriteAttribute(jsObject: object, name: Strings.failIfMajorPerformanceCaveat) + _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool + + @ReadWriteAttribute + public var depth: Bool + + @ReadWriteAttribute + public var stencil: Bool + + @ReadWriteAttribute + public var antialias: Bool + + @ReadWriteAttribute + public var premultipliedAlpha: Bool + + @ReadWriteAttribute + public var preserveDrawingBuffer: Bool + + @ReadWriteAttribute + public var powerPreference: WebGLPowerPreference + + @ReadWriteAttribute + public var failIfMajorPerformanceCaveat: Bool + + @ReadWriteAttribute + public var desynchronized: Bool +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift new file mode 100644 index 00000000..20837070 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLContextEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _statusMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusMessage) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInit: WebGLContextEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInit?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var statusMessage: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift new file mode 100644 index 00000000..20c0c668 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextEventInit: BridgedDictionary { + public convenience init(statusMessage: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.statusMessage] = statusMessage.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _statusMessage = ReadWriteAttribute(jsObject: object, name: Strings.statusMessage) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var statusMessage: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift new file mode 100644 index 00000000..83d1af39 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLFramebuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLFramebuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLObject.swift b/Sources/DOMKit/WebIDL/WebGLObject.swift new file mode 100644 index 00000000..c50d37fc --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLObject.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLObject: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLObject].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift new file mode 100644 index 00000000..ce6b23f8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum WebGLPowerPreference: JSString, JSValueCompatible { + case `default` = "default" + case lowPower = "low-power" + case highPerformance = "high-performance" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/WebGLProgram.swift b/Sources/DOMKit/WebIDL/WebGLProgram.swift new file mode 100644 index 00000000..e38d4a93 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLProgram.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLProgram: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLProgram].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift new file mode 100644 index 00000000..3b364894 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLRenderbuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift new file mode 100644 index 00000000..f9919cbe --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLRenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGLRenderingContextOverloads { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift new file mode 100644 index 00000000..c0baf5db --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift @@ -0,0 +1,1217 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGLRenderingContextBase: JSBridgedClass {} +public extension WebGLRenderingContextBase { + @inlinable static var DEPTH_BUFFER_BIT: GLenum { 0x0000_0100 } + + @inlinable static var STENCIL_BUFFER_BIT: GLenum { 0x0000_0400 } + + @inlinable static var COLOR_BUFFER_BIT: GLenum { 0x0000_4000 } + + @inlinable static var POINTS: GLenum { 0x0000 } + + @inlinable static var LINES: GLenum { 0x0001 } + + @inlinable static var LINE_LOOP: GLenum { 0x0002 } + + @inlinable static var LINE_STRIP: GLenum { 0x0003 } + + @inlinable static var TRIANGLES: GLenum { 0x0004 } + + @inlinable static var TRIANGLE_STRIP: GLenum { 0x0005 } + + @inlinable static var TRIANGLE_FAN: GLenum { 0x0006 } + + @inlinable static var ZERO: GLenum { 0 } + + @inlinable static var ONE: GLenum { 1 } + + @inlinable static var SRC_COLOR: GLenum { 0x0300 } + + @inlinable static var ONE_MINUS_SRC_COLOR: GLenum { 0x0301 } + + @inlinable static var SRC_ALPHA: GLenum { 0x0302 } + + @inlinable static var ONE_MINUS_SRC_ALPHA: GLenum { 0x0303 } + + @inlinable static var DST_ALPHA: GLenum { 0x0304 } + + @inlinable static var ONE_MINUS_DST_ALPHA: GLenum { 0x0305 } + + @inlinable static var DST_COLOR: GLenum { 0x0306 } + + @inlinable static var ONE_MINUS_DST_COLOR: GLenum { 0x0307 } + + @inlinable static var SRC_ALPHA_SATURATE: GLenum { 0x0308 } + + @inlinable static var FUNC_ADD: GLenum { 0x8006 } + + @inlinable static var BLEND_EQUATION: GLenum { 0x8009 } + + @inlinable static var BLEND_EQUATION_RGB: GLenum { 0x8009 } + + @inlinable static var BLEND_EQUATION_ALPHA: GLenum { 0x883D } + + @inlinable static var FUNC_SUBTRACT: GLenum { 0x800A } + + @inlinable static var FUNC_REVERSE_SUBTRACT: GLenum { 0x800B } + + @inlinable static var BLEND_DST_RGB: GLenum { 0x80C8 } + + @inlinable static var BLEND_SRC_RGB: GLenum { 0x80C9 } + + @inlinable static var BLEND_DST_ALPHA: GLenum { 0x80CA } + + @inlinable static var BLEND_SRC_ALPHA: GLenum { 0x80CB } + + @inlinable static var CONSTANT_COLOR: GLenum { 0x8001 } + + @inlinable static var ONE_MINUS_CONSTANT_COLOR: GLenum { 0x8002 } + + @inlinable static var CONSTANT_ALPHA: GLenum { 0x8003 } + + @inlinable static var ONE_MINUS_CONSTANT_ALPHA: GLenum { 0x8004 } + + @inlinable static var BLEND_COLOR: GLenum { 0x8005 } + + @inlinable static var ARRAY_BUFFER: GLenum { 0x8892 } + + @inlinable static var ELEMENT_ARRAY_BUFFER: GLenum { 0x8893 } + + @inlinable static var ARRAY_BUFFER_BINDING: GLenum { 0x8894 } + + @inlinable static var ELEMENT_ARRAY_BUFFER_BINDING: GLenum { 0x8895 } + + @inlinable static var STREAM_DRAW: GLenum { 0x88E0 } + + @inlinable static var STATIC_DRAW: GLenum { 0x88E4 } + + @inlinable static var DYNAMIC_DRAW: GLenum { 0x88E8 } + + @inlinable static var BUFFER_SIZE: GLenum { 0x8764 } + + @inlinable static var BUFFER_USAGE: GLenum { 0x8765 } + + @inlinable static var CURRENT_VERTEX_ATTRIB: GLenum { 0x8626 } + + @inlinable static var FRONT: GLenum { 0x0404 } + + @inlinable static var BACK: GLenum { 0x0405 } + + @inlinable static var FRONT_AND_BACK: GLenum { 0x0408 } + + @inlinable static var CULL_FACE: GLenum { 0x0B44 } + + @inlinable static var BLEND: GLenum { 0x0BE2 } + + @inlinable static var DITHER: GLenum { 0x0BD0 } + + @inlinable static var STENCIL_TEST: GLenum { 0x0B90 } + + @inlinable static var DEPTH_TEST: GLenum { 0x0B71 } + + @inlinable static var SCISSOR_TEST: GLenum { 0x0C11 } + + @inlinable static var POLYGON_OFFSET_FILL: GLenum { 0x8037 } + + @inlinable static var SAMPLE_ALPHA_TO_COVERAGE: GLenum { 0x809E } + + @inlinable static var SAMPLE_COVERAGE: GLenum { 0x80A0 } + + @inlinable static var NO_ERROR: GLenum { 0 } + + @inlinable static var INVALID_ENUM: GLenum { 0x0500 } + + @inlinable static var INVALID_VALUE: GLenum { 0x0501 } + + @inlinable static var INVALID_OPERATION: GLenum { 0x0502 } + + @inlinable static var OUT_OF_MEMORY: GLenum { 0x0505 } + + @inlinable static var CW: GLenum { 0x0900 } + + @inlinable static var CCW: GLenum { 0x0901 } + + @inlinable static var LINE_WIDTH: GLenum { 0x0B21 } + + @inlinable static var ALIASED_POINT_SIZE_RANGE: GLenum { 0x846D } + + @inlinable static var ALIASED_LINE_WIDTH_RANGE: GLenum { 0x846E } + + @inlinable static var CULL_FACE_MODE: GLenum { 0x0B45 } + + @inlinable static var FRONT_FACE: GLenum { 0x0B46 } + + @inlinable static var DEPTH_RANGE: GLenum { 0x0B70 } + + @inlinable static var DEPTH_WRITEMASK: GLenum { 0x0B72 } + + @inlinable static var DEPTH_CLEAR_VALUE: GLenum { 0x0B73 } + + @inlinable static var DEPTH_FUNC: GLenum { 0x0B74 } + + @inlinable static var STENCIL_CLEAR_VALUE: GLenum { 0x0B91 } + + @inlinable static var STENCIL_FUNC: GLenum { 0x0B92 } + + @inlinable static var STENCIL_FAIL: GLenum { 0x0B94 } + + @inlinable static var STENCIL_PASS_DEPTH_FAIL: GLenum { 0x0B95 } + + @inlinable static var STENCIL_PASS_DEPTH_PASS: GLenum { 0x0B96 } + + @inlinable static var STENCIL_REF: GLenum { 0x0B97 } + + @inlinable static var STENCIL_VALUE_MASK: GLenum { 0x0B93 } + + @inlinable static var STENCIL_WRITEMASK: GLenum { 0x0B98 } + + @inlinable static var STENCIL_BACK_FUNC: GLenum { 0x8800 } + + @inlinable static var STENCIL_BACK_FAIL: GLenum { 0x8801 } + + @inlinable static var STENCIL_BACK_PASS_DEPTH_FAIL: GLenum { 0x8802 } + + @inlinable static var STENCIL_BACK_PASS_DEPTH_PASS: GLenum { 0x8803 } + + @inlinable static var STENCIL_BACK_REF: GLenum { 0x8CA3 } + + @inlinable static var STENCIL_BACK_VALUE_MASK: GLenum { 0x8CA4 } + + @inlinable static var STENCIL_BACK_WRITEMASK: GLenum { 0x8CA5 } + + @inlinable static var VIEWPORT: GLenum { 0x0BA2 } + + @inlinable static var SCISSOR_BOX: GLenum { 0x0C10 } + + @inlinable static var COLOR_CLEAR_VALUE: GLenum { 0x0C22 } + + @inlinable static var COLOR_WRITEMASK: GLenum { 0x0C23 } + + @inlinable static var UNPACK_ALIGNMENT: GLenum { 0x0CF5 } + + @inlinable static var PACK_ALIGNMENT: GLenum { 0x0D05 } + + @inlinable static var MAX_TEXTURE_SIZE: GLenum { 0x0D33 } + + @inlinable static var MAX_VIEWPORT_DIMS: GLenum { 0x0D3A } + + @inlinable static var SUBPIXEL_BITS: GLenum { 0x0D50 } + + @inlinable static var RED_BITS: GLenum { 0x0D52 } + + @inlinable static var GREEN_BITS: GLenum { 0x0D53 } + + @inlinable static var BLUE_BITS: GLenum { 0x0D54 } + + @inlinable static var ALPHA_BITS: GLenum { 0x0D55 } + + @inlinable static var DEPTH_BITS: GLenum { 0x0D56 } + + @inlinable static var STENCIL_BITS: GLenum { 0x0D57 } + + @inlinable static var POLYGON_OFFSET_UNITS: GLenum { 0x2A00 } + + @inlinable static var POLYGON_OFFSET_FACTOR: GLenum { 0x8038 } + + @inlinable static var TEXTURE_BINDING_2D: GLenum { 0x8069 } + + @inlinable static var SAMPLE_BUFFERS: GLenum { 0x80A8 } + + @inlinable static var SAMPLES: GLenum { 0x80A9 } + + @inlinable static var SAMPLE_COVERAGE_VALUE: GLenum { 0x80AA } + + @inlinable static var SAMPLE_COVERAGE_INVERT: GLenum { 0x80AB } + + @inlinable static var COMPRESSED_TEXTURE_FORMATS: GLenum { 0x86A3 } + + @inlinable static var DONT_CARE: GLenum { 0x1100 } + + @inlinable static var FASTEST: GLenum { 0x1101 } + + @inlinable static var NICEST: GLenum { 0x1102 } + + @inlinable static var GENERATE_MIPMAP_HINT: GLenum { 0x8192 } + + @inlinable static var BYTE: GLenum { 0x1400 } + + @inlinable static var UNSIGNED_BYTE: GLenum { 0x1401 } + + @inlinable static var SHORT: GLenum { 0x1402 } + + @inlinable static var UNSIGNED_SHORT: GLenum { 0x1403 } + + @inlinable static var INT: GLenum { 0x1404 } + + @inlinable static var UNSIGNED_INT: GLenum { 0x1405 } + + @inlinable static var FLOAT: GLenum { 0x1406 } + + @inlinable static var DEPTH_COMPONENT: GLenum { 0x1902 } + + @inlinable static var ALPHA: GLenum { 0x1906 } + + @inlinable static var RGB: GLenum { 0x1907 } + + @inlinable static var RGBA: GLenum { 0x1908 } + + @inlinable static var LUMINANCE: GLenum { 0x1909 } + + @inlinable static var LUMINANCE_ALPHA: GLenum { 0x190A } + + @inlinable static var UNSIGNED_SHORT_4_4_4_4: GLenum { 0x8033 } + + @inlinable static var UNSIGNED_SHORT_5_5_5_1: GLenum { 0x8034 } + + @inlinable static var UNSIGNED_SHORT_5_6_5: GLenum { 0x8363 } + + @inlinable static var FRAGMENT_SHADER: GLenum { 0x8B30 } + + @inlinable static var VERTEX_SHADER: GLenum { 0x8B31 } + + @inlinable static var MAX_VERTEX_ATTRIBS: GLenum { 0x8869 } + + @inlinable static var MAX_VERTEX_UNIFORM_VECTORS: GLenum { 0x8DFB } + + @inlinable static var MAX_VARYING_VECTORS: GLenum { 0x8DFC } + + @inlinable static var MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4D } + + @inlinable static var MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4C } + + @inlinable static var MAX_TEXTURE_IMAGE_UNITS: GLenum { 0x8872 } + + @inlinable static var MAX_FRAGMENT_UNIFORM_VECTORS: GLenum { 0x8DFD } + + @inlinable static var SHADER_TYPE: GLenum { 0x8B4F } + + @inlinable static var DELETE_STATUS: GLenum { 0x8B80 } + + @inlinable static var LINK_STATUS: GLenum { 0x8B82 } + + @inlinable static var VALIDATE_STATUS: GLenum { 0x8B83 } + + @inlinable static var ATTACHED_SHADERS: GLenum { 0x8B85 } + + @inlinable static var ACTIVE_UNIFORMS: GLenum { 0x8B86 } + + @inlinable static var ACTIVE_ATTRIBUTES: GLenum { 0x8B89 } + + @inlinable static var SHADING_LANGUAGE_VERSION: GLenum { 0x8B8C } + + @inlinable static var CURRENT_PROGRAM: GLenum { 0x8B8D } + + @inlinable static var NEVER: GLenum { 0x0200 } + + @inlinable static var LESS: GLenum { 0x0201 } + + @inlinable static var EQUAL: GLenum { 0x0202 } + + @inlinable static var LEQUAL: GLenum { 0x0203 } + + @inlinable static var GREATER: GLenum { 0x0204 } + + @inlinable static var NOTEQUAL: GLenum { 0x0205 } + + @inlinable static var GEQUAL: GLenum { 0x0206 } + + @inlinable static var ALWAYS: GLenum { 0x0207 } + + @inlinable static var KEEP: GLenum { 0x1E00 } + + @inlinable static var REPLACE: GLenum { 0x1E01 } + + @inlinable static var INCR: GLenum { 0x1E02 } + + @inlinable static var DECR: GLenum { 0x1E03 } + + @inlinable static var INVERT: GLenum { 0x150A } + + @inlinable static var INCR_WRAP: GLenum { 0x8507 } + + @inlinable static var DECR_WRAP: GLenum { 0x8508 } + + @inlinable static var VENDOR: GLenum { 0x1F00 } + + @inlinable static var RENDERER: GLenum { 0x1F01 } + + @inlinable static var VERSION: GLenum { 0x1F02 } + + @inlinable static var NEAREST: GLenum { 0x2600 } + + @inlinable static var LINEAR: GLenum { 0x2601 } + + @inlinable static var NEAREST_MIPMAP_NEAREST: GLenum { 0x2700 } + + @inlinable static var LINEAR_MIPMAP_NEAREST: GLenum { 0x2701 } + + @inlinable static var NEAREST_MIPMAP_LINEAR: GLenum { 0x2702 } + + @inlinable static var LINEAR_MIPMAP_LINEAR: GLenum { 0x2703 } + + @inlinable static var TEXTURE_MAG_FILTER: GLenum { 0x2800 } + + @inlinable static var TEXTURE_MIN_FILTER: GLenum { 0x2801 } + + @inlinable static var TEXTURE_WRAP_S: GLenum { 0x2802 } + + @inlinable static var TEXTURE_WRAP_T: GLenum { 0x2803 } + + @inlinable static var TEXTURE_2D: GLenum { 0x0DE1 } + + @inlinable static var TEXTURE: GLenum { 0x1702 } + + @inlinable static var TEXTURE_CUBE_MAP: GLenum { 0x8513 } + + @inlinable static var TEXTURE_BINDING_CUBE_MAP: GLenum { 0x8514 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_X: GLenum { 0x8515 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum { 0x8516 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum { 0x8517 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum { 0x8518 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum { 0x8519 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum { 0x851A } + + @inlinable static var MAX_CUBE_MAP_TEXTURE_SIZE: GLenum { 0x851C } + + @inlinable static var TEXTURE0: GLenum { 0x84C0 } + + @inlinable static var TEXTURE1: GLenum { 0x84C1 } + + @inlinable static var TEXTURE2: GLenum { 0x84C2 } + + @inlinable static var TEXTURE3: GLenum { 0x84C3 } + + @inlinable static var TEXTURE4: GLenum { 0x84C4 } + + @inlinable static var TEXTURE5: GLenum { 0x84C5 } + + @inlinable static var TEXTURE6: GLenum { 0x84C6 } + + @inlinable static var TEXTURE7: GLenum { 0x84C7 } + + @inlinable static var TEXTURE8: GLenum { 0x84C8 } + + @inlinable static var TEXTURE9: GLenum { 0x84C9 } + + @inlinable static var TEXTURE10: GLenum { 0x84CA } + + @inlinable static var TEXTURE11: GLenum { 0x84CB } + + @inlinable static var TEXTURE12: GLenum { 0x84CC } + + @inlinable static var TEXTURE13: GLenum { 0x84CD } + + @inlinable static var TEXTURE14: GLenum { 0x84CE } + + @inlinable static var TEXTURE15: GLenum { 0x84CF } + + @inlinable static var TEXTURE16: GLenum { 0x84D0 } + + @inlinable static var TEXTURE17: GLenum { 0x84D1 } + + @inlinable static var TEXTURE18: GLenum { 0x84D2 } + + @inlinable static var TEXTURE19: GLenum { 0x84D3 } + + @inlinable static var TEXTURE20: GLenum { 0x84D4 } + + @inlinable static var TEXTURE21: GLenum { 0x84D5 } + + @inlinable static var TEXTURE22: GLenum { 0x84D6 } + + @inlinable static var TEXTURE23: GLenum { 0x84D7 } + + @inlinable static var TEXTURE24: GLenum { 0x84D8 } + + @inlinable static var TEXTURE25: GLenum { 0x84D9 } + + @inlinable static var TEXTURE26: GLenum { 0x84DA } + + @inlinable static var TEXTURE27: GLenum { 0x84DB } + + @inlinable static var TEXTURE28: GLenum { 0x84DC } + + @inlinable static var TEXTURE29: GLenum { 0x84DD } + + @inlinable static var TEXTURE30: GLenum { 0x84DE } + + @inlinable static var TEXTURE31: GLenum { 0x84DF } + + @inlinable static var ACTIVE_TEXTURE: GLenum { 0x84E0 } + + @inlinable static var REPEAT: GLenum { 0x2901 } + + @inlinable static var CLAMP_TO_EDGE: GLenum { 0x812F } + + @inlinable static var MIRRORED_REPEAT: GLenum { 0x8370 } + + @inlinable static var FLOAT_VEC2: GLenum { 0x8B50 } + + @inlinable static var FLOAT_VEC3: GLenum { 0x8B51 } + + @inlinable static var FLOAT_VEC4: GLenum { 0x8B52 } + + @inlinable static var INT_VEC2: GLenum { 0x8B53 } + + @inlinable static var INT_VEC3: GLenum { 0x8B54 } + + @inlinable static var INT_VEC4: GLenum { 0x8B55 } + + @inlinable static var BOOL: GLenum { 0x8B56 } + + @inlinable static var BOOL_VEC2: GLenum { 0x8B57 } + + @inlinable static var BOOL_VEC3: GLenum { 0x8B58 } + + @inlinable static var BOOL_VEC4: GLenum { 0x8B59 } + + @inlinable static var FLOAT_MAT2: GLenum { 0x8B5A } + + @inlinable static var FLOAT_MAT3: GLenum { 0x8B5B } + + @inlinable static var FLOAT_MAT4: GLenum { 0x8B5C } + + @inlinable static var SAMPLER_2D: GLenum { 0x8B5E } + + @inlinable static var SAMPLER_CUBE: GLenum { 0x8B60 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_ENABLED: GLenum { 0x8622 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_SIZE: GLenum { 0x8623 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_STRIDE: GLenum { 0x8624 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_TYPE: GLenum { 0x8625 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum { 0x886A } + + @inlinable static var VERTEX_ATTRIB_ARRAY_POINTER: GLenum { 0x8645 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum { 0x889F } + + @inlinable static var IMPLEMENTATION_COLOR_READ_TYPE: GLenum { 0x8B9A } + + @inlinable static var IMPLEMENTATION_COLOR_READ_FORMAT: GLenum { 0x8B9B } + + @inlinable static var COMPILE_STATUS: GLenum { 0x8B81 } + + @inlinable static var LOW_FLOAT: GLenum { 0x8DF0 } + + @inlinable static var MEDIUM_FLOAT: GLenum { 0x8DF1 } + + @inlinable static var HIGH_FLOAT: GLenum { 0x8DF2 } + + @inlinable static var LOW_INT: GLenum { 0x8DF3 } + + @inlinable static var MEDIUM_INT: GLenum { 0x8DF4 } + + @inlinable static var HIGH_INT: GLenum { 0x8DF5 } + + @inlinable static var FRAMEBUFFER: GLenum { 0x8D40 } + + @inlinable static var RENDERBUFFER: GLenum { 0x8D41 } + + @inlinable static var RGBA4: GLenum { 0x8056 } + + @inlinable static var RGB5_A1: GLenum { 0x8057 } + + @inlinable static var RGB565: GLenum { 0x8D62 } + + @inlinable static var DEPTH_COMPONENT16: GLenum { 0x81A5 } + + @inlinable static var STENCIL_INDEX8: GLenum { 0x8D48 } + + @inlinable static var DEPTH_STENCIL: GLenum { 0x84F9 } + + @inlinable static var RENDERBUFFER_WIDTH: GLenum { 0x8D42 } + + @inlinable static var RENDERBUFFER_HEIGHT: GLenum { 0x8D43 } + + @inlinable static var RENDERBUFFER_INTERNAL_FORMAT: GLenum { 0x8D44 } + + @inlinable static var RENDERBUFFER_RED_SIZE: GLenum { 0x8D50 } + + @inlinable static var RENDERBUFFER_GREEN_SIZE: GLenum { 0x8D51 } + + @inlinable static var RENDERBUFFER_BLUE_SIZE: GLenum { 0x8D52 } + + @inlinable static var RENDERBUFFER_ALPHA_SIZE: GLenum { 0x8D53 } + + @inlinable static var RENDERBUFFER_DEPTH_SIZE: GLenum { 0x8D54 } + + @inlinable static var RENDERBUFFER_STENCIL_SIZE: GLenum { 0x8D55 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum { 0x8CD0 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum { 0x8CD1 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum { 0x8CD2 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum { 0x8CD3 } + + @inlinable static var COLOR_ATTACHMENT0: GLenum { 0x8CE0 } + + @inlinable static var DEPTH_ATTACHMENT: GLenum { 0x8D00 } + + @inlinable static var STENCIL_ATTACHMENT: GLenum { 0x8D20 } + + @inlinable static var DEPTH_STENCIL_ATTACHMENT: GLenum { 0x821A } + + @inlinable static var NONE: GLenum { 0 } + + @inlinable static var FRAMEBUFFER_COMPLETE: GLenum { 0x8CD5 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum { 0x8CD6 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum { 0x8CD7 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum { 0x8CD9 } + + @inlinable static var FRAMEBUFFER_UNSUPPORTED: GLenum { 0x8CDD } + + @inlinable static var FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } + + @inlinable static var RENDERBUFFER_BINDING: GLenum { 0x8CA7 } + + @inlinable static var MAX_RENDERBUFFER_SIZE: GLenum { 0x84E8 } + + @inlinable static var INVALID_FRAMEBUFFER_OPERATION: GLenum { 0x0506 } + + @inlinable static var UNPACK_FLIP_Y_WEBGL: GLenum { 0x9240 } + + @inlinable static var UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum { 0x9241 } + + @inlinable static var CONTEXT_LOST_WEBGL: GLenum { 0x9242 } + + @inlinable static var UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum { 0x9243 } + + @inlinable static var BROWSER_DEFAULT_WEBGL: GLenum { 0x9244 } + + @inlinable var canvas: HTMLCanvasElement_or_OffscreenCanvas { ReadonlyAttribute[Strings.canvas, in: jsObject] } + + @inlinable var drawingBufferWidth: GLsizei { ReadonlyAttribute[Strings.drawingBufferWidth, in: jsObject] } + + @inlinable var drawingBufferHeight: GLsizei { ReadonlyAttribute[Strings.drawingBufferHeight, in: jsObject] } + + @inlinable func getContextAttributes() -> WebGLContextAttributes? { + let this = jsObject + return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func isContextLost() -> Bool { + let this = jsObject + return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getSupportedExtensions() -> [String]? { + let this = jsObject + return this[Strings.getSupportedExtensions].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getExtension(name: String) -> JSObject? { + let this = jsObject + return this[Strings.getExtension].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable func activeTexture(texture: GLenum) { + let this = jsObject + _ = this[Strings.activeTexture].function!(this: this, arguments: [texture.jsValue]) + } + + @inlinable func attachShader(program: WebGLProgram, shader: WebGLShader) { + let this = jsObject + _ = this[Strings.attachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) + } + + @inlinable func bindAttribLocation(program: WebGLProgram, index: GLuint, name: String) { + let this = jsObject + _ = this[Strings.bindAttribLocation].function!(this: this, arguments: [program.jsValue, index.jsValue, name.jsValue]) + } + + @inlinable func bindBuffer(target: GLenum, buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.bindBuffer].function!(this: this, arguments: [target.jsValue, buffer.jsValue]) + } + + @inlinable func bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer?) { + let this = jsObject + _ = this[Strings.bindFramebuffer].function!(this: this, arguments: [target.jsValue, framebuffer.jsValue]) + } + + @inlinable func bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.bindRenderbuffer].function!(this: this, arguments: [target.jsValue, renderbuffer.jsValue]) + } + + @inlinable func bindTexture(target: GLenum, texture: WebGLTexture?) { + let this = jsObject + _ = this[Strings.bindTexture].function!(this: this, arguments: [target.jsValue, texture.jsValue]) + } + + @inlinable func blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { + let this = jsObject + _ = this[Strings.blendColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func blendEquation(mode: GLenum) { + let this = jsObject + _ = this[Strings.blendEquation].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) { + let this = jsObject + _ = this[Strings.blendEquationSeparate].function!(this: this, arguments: [modeRGB.jsValue, modeAlpha.jsValue]) + } + + @inlinable func blendFunc(sfactor: GLenum, dfactor: GLenum) { + let this = jsObject + _ = this[Strings.blendFunc].function!(this: this, arguments: [sfactor.jsValue, dfactor.jsValue]) + } + + @inlinable func blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) { + let this = jsObject + _ = this[Strings.blendFuncSeparate].function!(this: this, arguments: [srcRGB.jsValue, dstRGB.jsValue, srcAlpha.jsValue, dstAlpha.jsValue]) + } + + @inlinable func checkFramebufferStatus(target: GLenum) -> GLenum { + let this = jsObject + return this[Strings.checkFramebufferStatus].function!(this: this, arguments: [target.jsValue]).fromJSValue()! + } + + @inlinable func clear(mask: GLbitfield) { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: [mask.jsValue]) + } + + @inlinable func clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { + let this = jsObject + _ = this[Strings.clearColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func clearDepth(depth: GLclampf) { + let this = jsObject + _ = this[Strings.clearDepth].function!(this: this, arguments: [depth.jsValue]) + } + + @inlinable func clearStencil(s: GLint) { + let this = jsObject + _ = this[Strings.clearStencil].function!(this: this, arguments: [s.jsValue]) + } + + @inlinable func colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) { + let this = jsObject + _ = this[Strings.colorMask].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func compileShader(shader: WebGLShader) { + let this = jsObject + _ = this[Strings.compileShader].function!(this: this, arguments: [shader.jsValue]) + } + + @inlinable func copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = x.jsValue + let _arg4 = y.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = border.jsValue + let this = jsObject + _ = this[Strings.copyTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let _arg6 = width.jsValue + let _arg7 = height.jsValue + let this = jsObject + _ = this[Strings.copyTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func createBuffer() -> WebGLBuffer? { + let this = jsObject + return this[Strings.createBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createFramebuffer() -> WebGLFramebuffer? { + let this = jsObject + return this[Strings.createFramebuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createProgram() -> WebGLProgram? { + let this = jsObject + return this[Strings.createProgram].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createRenderbuffer() -> WebGLRenderbuffer? { + let this = jsObject + return this[Strings.createRenderbuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createShader(type: GLenum) -> WebGLShader? { + let this = jsObject + return this[Strings.createShader].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @inlinable func createTexture() -> WebGLTexture? { + let this = jsObject + return this[Strings.createTexture].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func cullFace(mode: GLenum) { + let this = jsObject + _ = this[Strings.cullFace].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func deleteBuffer(buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.deleteBuffer].function!(this: this, arguments: [buffer.jsValue]) + } + + @inlinable func deleteFramebuffer(framebuffer: WebGLFramebuffer?) { + let this = jsObject + _ = this[Strings.deleteFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]) + } + + @inlinable func deleteProgram(program: WebGLProgram?) { + let this = jsObject + _ = this[Strings.deleteProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.deleteRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]) + } + + @inlinable func deleteShader(shader: WebGLShader?) { + let this = jsObject + _ = this[Strings.deleteShader].function!(this: this, arguments: [shader.jsValue]) + } + + @inlinable func deleteTexture(texture: WebGLTexture?) { + let this = jsObject + _ = this[Strings.deleteTexture].function!(this: this, arguments: [texture.jsValue]) + } + + @inlinable func depthFunc(func: GLenum) { + let this = jsObject + _ = this[Strings.depthFunc].function!(this: this, arguments: [`func`.jsValue]) + } + + @inlinable func depthMask(flag: GLboolean) { + let this = jsObject + _ = this[Strings.depthMask].function!(this: this, arguments: [flag.jsValue]) + } + + @inlinable func depthRange(zNear: GLclampf, zFar: GLclampf) { + let this = jsObject + _ = this[Strings.depthRange].function!(this: this, arguments: [zNear.jsValue, zFar.jsValue]) + } + + @inlinable func detachShader(program: WebGLProgram, shader: WebGLShader) { + let this = jsObject + _ = this[Strings.detachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) + } + + @inlinable func disable(cap: GLenum) { + let this = jsObject + _ = this[Strings.disable].function!(this: this, arguments: [cap.jsValue]) + } + + @inlinable func disableVertexAttribArray(index: GLuint) { + let this = jsObject + _ = this[Strings.disableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable func drawArrays(mode: GLenum, first: GLint, count: GLsizei) { + let this = jsObject + _ = this[Strings.drawArrays].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue]) + } + + @inlinable func drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) { + let this = jsObject + _ = this[Strings.drawElements].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue]) + } + + @inlinable func enable(cap: GLenum) { + let this = jsObject + _ = this[Strings.enable].function!(this: this, arguments: [cap.jsValue]) + } + + @inlinable func enableVertexAttribArray(index: GLuint) { + let this = jsObject + _ = this[Strings.enableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable func finish() { + let this = jsObject + _ = this[Strings.finish].function!(this: this, arguments: []) + } + + @inlinable func flush() { + let this = jsObject + _ = this[Strings.flush].function!(this: this, arguments: []) + } + + @inlinable func framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.framebufferRenderbuffer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, renderbuffertarget.jsValue, renderbuffer.jsValue]) + } + + @inlinable func framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture?, level: GLint) { + let this = jsObject + _ = this[Strings.framebufferTexture2D].function!(this: this, arguments: [target.jsValue, attachment.jsValue, textarget.jsValue, texture.jsValue, level.jsValue]) + } + + @inlinable func frontFace(mode: GLenum) { + let this = jsObject + _ = this[Strings.frontFace].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func generateMipmap(target: GLenum) { + let this = jsObject + _ = this[Strings.generateMipmap].function!(this: this, arguments: [target.jsValue]) + } + + @inlinable func getActiveAttrib(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getActiveAttrib].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniform(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getActiveUniform].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getAttachedShaders(program: WebGLProgram) -> [WebGLShader]? { + let this = jsObject + return this[Strings.getAttachedShaders].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func getAttribLocation(program: WebGLProgram, name: String) -> GLint { + let this = jsObject + return this[Strings.getAttribLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func getBufferParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getBufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getParameter(pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getParameter].function!(this: this, arguments: [pname.jsValue]).fromJSValue()! + } + + @inlinable func getError() -> GLenum { + let this = jsObject + return this[Strings.getError].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getFramebufferAttachmentParameter].function!(this: this, arguments: [target.jsValue, attachment.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getProgramParameter(program: WebGLProgram, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getProgramParameter].function!(this: this, arguments: [program.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getProgramInfoLog(program: WebGLProgram) -> String? { + let this = jsObject + return this[Strings.getProgramInfoLog].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func getRenderbufferParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getRenderbufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getShaderParameter(shader: WebGLShader, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getShaderParameter].function!(this: this, arguments: [shader.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) -> WebGLShaderPrecisionFormat? { + let this = jsObject + return this[Strings.getShaderPrecisionFormat].function!(this: this, arguments: [shadertype.jsValue, precisiontype.jsValue]).fromJSValue()! + } + + @inlinable func getShaderInfoLog(shader: WebGLShader) -> String? { + let this = jsObject + return this[Strings.getShaderInfoLog].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func getShaderSource(shader: WebGLShader) -> String? { + let this = jsObject + return this[Strings.getShaderSource].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func getTexParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getTexParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getUniform(program: WebGLProgram, location: WebGLUniformLocation) -> JSValue { + let this = jsObject + return this[Strings.getUniform].function!(this: this, arguments: [program.jsValue, location.jsValue]).fromJSValue()! + } + + @inlinable func getUniformLocation(program: WebGLProgram, name: String) -> WebGLUniformLocation? { + let this = jsObject + return this[Strings.getUniformLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func getVertexAttrib(index: GLuint, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getVertexAttrib].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getVertexAttribOffset(index: GLuint, pname: GLenum) -> GLintptr { + let this = jsObject + return this[Strings.getVertexAttribOffset].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func hint(target: GLenum, mode: GLenum) { + let this = jsObject + _ = this[Strings.hint].function!(this: this, arguments: [target.jsValue, mode.jsValue]) + } + + @inlinable func isBuffer(buffer: WebGLBuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isBuffer].function!(this: this, arguments: [buffer.jsValue]).fromJSValue()! + } + + @inlinable func isEnabled(cap: GLenum) -> GLboolean { + let this = jsObject + return this[Strings.isEnabled].function!(this: this, arguments: [cap.jsValue]).fromJSValue()! + } + + @inlinable func isFramebuffer(framebuffer: WebGLFramebuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]).fromJSValue()! + } + + @inlinable func isProgram(program: WebGLProgram?) -> GLboolean { + let this = jsObject + return this[Strings.isProgram].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func isRenderbuffer(renderbuffer: WebGLRenderbuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]).fromJSValue()! + } + + @inlinable func isShader(shader: WebGLShader?) -> GLboolean { + let this = jsObject + return this[Strings.isShader].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func isTexture(texture: WebGLTexture?) -> GLboolean { + let this = jsObject + return this[Strings.isTexture].function!(this: this, arguments: [texture.jsValue]).fromJSValue()! + } + + @inlinable func lineWidth(width: GLfloat) { + let this = jsObject + _ = this[Strings.lineWidth].function!(this: this, arguments: [width.jsValue]) + } + + @inlinable func linkProgram(program: WebGLProgram) { + let this = jsObject + _ = this[Strings.linkProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func pixelStorei(pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.pixelStorei].function!(this: this, arguments: [pname.jsValue, param.jsValue]) + } + + @inlinable func polygonOffset(factor: GLfloat, units: GLfloat) { + let this = jsObject + _ = this[Strings.polygonOffset].function!(this: this, arguments: [factor.jsValue, units.jsValue]) + } + + @inlinable func renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.renderbufferStorage].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func sampleCoverage(value: GLclampf, invert: GLboolean) { + let this = jsObject + _ = this[Strings.sampleCoverage].function!(this: this, arguments: [value.jsValue, invert.jsValue]) + } + + @inlinable func scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.scissor].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func shaderSource(shader: WebGLShader, source: String) { + let this = jsObject + _ = this[Strings.shaderSource].function!(this: this, arguments: [shader.jsValue, source.jsValue]) + } + + @inlinable func stencilFunc(func: GLenum, ref: GLint, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilFunc].function!(this: this, arguments: [`func`.jsValue, ref.jsValue, mask.jsValue]) + } + + @inlinable func stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilFuncSeparate].function!(this: this, arguments: [face.jsValue, `func`.jsValue, ref.jsValue, mask.jsValue]) + } + + @inlinable func stencilMask(mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilMask].function!(this: this, arguments: [mask.jsValue]) + } + + @inlinable func stencilMaskSeparate(face: GLenum, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilMaskSeparate].function!(this: this, arguments: [face.jsValue, mask.jsValue]) + } + + @inlinable func stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) { + let this = jsObject + _ = this[Strings.stencilOp].function!(this: this, arguments: [fail.jsValue, zfail.jsValue, zpass.jsValue]) + } + + @inlinable func stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) { + let this = jsObject + _ = this[Strings.stencilOpSeparate].function!(this: this, arguments: [face.jsValue, fail.jsValue, zfail.jsValue, zpass.jsValue]) + } + + @inlinable func texParameterf(target: GLenum, pname: GLenum, param: GLfloat) { + let this = jsObject + _ = this[Strings.texParameterf].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func texParameteri(target: GLenum, pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.texParameteri].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func uniform1f(location: WebGLUniformLocation?, x: GLfloat) { + let this = jsObject + _ = this[Strings.uniform1f].function!(this: this, arguments: [location.jsValue, x.jsValue]) + } + + @inlinable func uniform2f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat) { + let this = jsObject + _ = this[Strings.uniform2f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func uniform3f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat) { + let this = jsObject + _ = this[Strings.uniform3f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func uniform4f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { + let this = jsObject + _ = this[Strings.uniform4f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func uniform1i(location: WebGLUniformLocation?, x: GLint) { + let this = jsObject + _ = this[Strings.uniform1i].function!(this: this, arguments: [location.jsValue, x.jsValue]) + } + + @inlinable func uniform2i(location: WebGLUniformLocation?, x: GLint, y: GLint) { + let this = jsObject + _ = this[Strings.uniform2i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func uniform3i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint) { + let this = jsObject + _ = this[Strings.uniform3i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func uniform4i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint, w: GLint) { + let this = jsObject + _ = this[Strings.uniform4i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func useProgram(program: WebGLProgram?) { + let this = jsObject + _ = this[Strings.useProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func validateProgram(program: WebGLProgram) { + let this = jsObject + _ = this[Strings.validateProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func vertexAttrib1f(index: GLuint, x: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib1f].function!(this: this, arguments: [index.jsValue, x.jsValue]) + } + + @inlinable func vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib2f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib3f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib4f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttrib1fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib1fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib2fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib2fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib3fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib3fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib4fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib4fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) { + let _arg0 = index.jsValue + let _arg1 = size.jsValue + let _arg2 = type.jsValue + let _arg3 = normalized.jsValue + let _arg4 = stride.jsValue + let _arg5 = offset.jsValue + let this = jsObject + _ = this[Strings.vertexAttribPointer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.viewport].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift new file mode 100644 index 00000000..fe1977ac --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift @@ -0,0 +1,165 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGLRenderingContextOverloads: JSBridgedClass {} +public extension WebGLRenderingContextOverloads { + @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) + } + + @inlinable func bufferData(target: GLenum, data: BufferSource?, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, data.jsValue, usage.jsValue]) + } + + @inlinable func bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, offset.jsValue, data.jsValue]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = data.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = data.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = pixels.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = format.jsValue + let _arg4 = type.jsValue + let _arg5 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } + + @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } + + @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLShader.swift b/Sources/DOMKit/WebIDL/WebGLShader.swift new file mode 100644 index 00000000..97f2b719 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLShader.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLShader: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift new file mode 100644 index 00000000..67725e58 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift @@ -0,0 +1,26 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLShaderPrecisionFormat: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLShaderPrecisionFormat].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _rangeMin = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMin) + _rangeMax = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMax) + _precision = ReadonlyAttribute(jsObject: jsObject, name: Strings.precision) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var rangeMin: GLint + + @ReadonlyAttribute + public var rangeMax: GLint + + @ReadonlyAttribute + public var precision: GLint +} diff --git a/Sources/DOMKit/WebIDL/WebGLTexture.swift b/Sources/DOMKit/WebIDL/WebGLTexture.swift new file mode 100644 index 00000000..ee7ad6c9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLTexture.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLTexture: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift new file mode 100644 index 00000000..cf833a95 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLUniformLocation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} From b00141cb02a8ffcb6af125235372e5f328189902 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:11:23 +0100 Subject: [PATCH 05/18] Fix merge conflict --- Sources/DOMKit/WebIDL/Float32List.swift | 46 - Sources/DOMKit/WebIDL/Int32List.swift | 46 - Sources/DOMKit/WebIDL/TexImageSource.swift | 116 -- Sources/DOMKit/WebIDL/WebGLActiveInfo.swift | 26 - Sources/DOMKit/WebIDL/WebGLBuffer.swift | 12 - .../WebIDL/WebGLContextAttributes.swift | 60 - Sources/DOMKit/WebIDL/WebGLContextEvent.swift | 20 - .../DOMKit/WebIDL/WebGLContextEventInit.swift | 20 - Sources/DOMKit/WebIDL/WebGLFramebuffer.swift | 12 - Sources/DOMKit/WebIDL/WebGLObject.swift | 14 - .../DOMKit/WebIDL/WebGLPowerPreference.swift | 23 - Sources/DOMKit/WebIDL/WebGLProgram.swift | 12 - Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift | 12 - .../DOMKit/WebIDL/WebGLRenderingContext.swift | 14 - .../WebIDL/WebGLRenderingContextBase.swift | 1217 ----------------- .../WebGLRenderingContextOverloads.swift | 165 --- Sources/DOMKit/WebIDL/WebGLShader.swift | 12 - .../WebIDL/WebGLShaderPrecisionFormat.swift | 26 - Sources/DOMKit/WebIDL/WebGLTexture.swift | 12 - .../DOMKit/WebIDL/WebGLUniformLocation.swift | 14 - 20 files changed, 1879 deletions(-) delete mode 100644 Sources/DOMKit/WebIDL/Float32List.swift delete mode 100644 Sources/DOMKit/WebIDL/Int32List.swift delete mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift diff --git a/Sources/DOMKit/WebIDL/Float32List.swift b/Sources/DOMKit/WebIDL/Float32List.swift deleted file mode 100644 index 1f1e5bdb..00000000 --- a/Sources/DOMKit/WebIDL/Float32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Float32List: ConvertibleToJSValue {} -extension Float32Array: Any_Float32List {} -extension Array: Any_Float32List where Element == GLfloat {} - -public enum Float32List: JSValueCompatible, Any_Float32List { - case float32Array(Float32Array) - case seq_of_GLfloat([GLfloat]) - - var float32Array: Float32Array? { - switch self { - case let .float32Array(float32Array): return float32Array - default: return nil - } - } - - var seq_of_GLfloat: [GLfloat]? { - switch self { - case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let float32Array: Float32Array = value.fromJSValue() { - return .float32Array(float32Array) - } - if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { - return .seq_of_GLfloat(seq_of_GLfloat) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .float32Array(float32Array): - return float32Array.jsValue - case let .seq_of_GLfloat(seq_of_GLfloat): - return seq_of_GLfloat.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Int32List.swift b/Sources/DOMKit/WebIDL/Int32List.swift deleted file mode 100644 index ce876a5b..00000000 --- a/Sources/DOMKit/WebIDL/Int32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Int32List: ConvertibleToJSValue {} -extension Int32Array: Any_Int32List {} -extension Array: Any_Int32List where Element == GLint {} - -public enum Int32List: JSValueCompatible, Any_Int32List { - case int32Array(Int32Array) - case seq_of_GLint([GLint]) - - var int32Array: Int32Array? { - switch self { - case let .int32Array(int32Array): return int32Array - default: return nil - } - } - - var seq_of_GLint: [GLint]? { - switch self { - case let .seq_of_GLint(seq_of_GLint): return seq_of_GLint - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let int32Array: Int32Array = value.fromJSValue() { - return .int32Array(int32Array) - } - if let seq_of_GLint: [GLint] = value.fromJSValue() { - return .seq_of_GLint(seq_of_GLint) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .int32Array(int32Array): - return int32Array.jsValue - case let .seq_of_GLint(seq_of_GLint): - return seq_of_GLint.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/TexImageSource.swift b/Sources/DOMKit/WebIDL/TexImageSource.swift deleted file mode 100644 index d5750fff..00000000 --- a/Sources/DOMKit/WebIDL/TexImageSource.swift +++ /dev/null @@ -1,116 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_TexImageSource: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_TexImageSource {} -extension HTMLImageElement: Any_TexImageSource {} -extension HTMLVideoElement: Any_TexImageSource {} -extension ImageBitmap: Any_TexImageSource {} -extension ImageData: Any_TexImageSource {} -extension OffscreenCanvas: Any_TexImageSource {} -extension VideoFrame: Any_TexImageSource {} - -public enum TexImageSource: JSValueCompatible, Any_TexImageSource { - case htmlCanvasElement(HTMLCanvasElement) - case htmlImageElement(HTMLImageElement) - case htmlVideoElement(HTMLVideoElement) - case imageBitmap(ImageBitmap) - case imageData(ImageData) - case offscreenCanvas(OffscreenCanvas) - case videoFrame(VideoFrame) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var htmlImageElement: HTMLImageElement? { - switch self { - case let .htmlImageElement(htmlImageElement): return htmlImageElement - default: return nil - } - } - - var htmlVideoElement: HTMLVideoElement? { - switch self { - case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement - default: return nil - } - } - - var imageBitmap: ImageBitmap? { - switch self { - case let .imageBitmap(imageBitmap): return imageBitmap - default: return nil - } - } - - var imageData: ImageData? { - switch self { - case let .imageData(imageData): return imageData - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - - var videoFrame: VideoFrame? { - switch self { - case let .videoFrame(videoFrame): return videoFrame - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let htmlImageElement: HTMLImageElement = value.fromJSValue() { - return .htmlImageElement(htmlImageElement) - } - if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { - return .htmlVideoElement(htmlVideoElement) - } - if let imageBitmap: ImageBitmap = value.fromJSValue() { - return .imageBitmap(imageBitmap) - } - if let imageData: ImageData = value.fromJSValue() { - return .imageData(imageData) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } - if let videoFrame: VideoFrame = value.fromJSValue() { - return .videoFrame(videoFrame) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .htmlImageElement(htmlImageElement): - return htmlImageElement.jsValue - case let .htmlVideoElement(htmlVideoElement): - return htmlVideoElement.jsValue - case let .imageBitmap(imageBitmap): - return imageBitmap.jsValue - case let .imageData(imageData): - return imageData.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue - case let .videoFrame(videoFrame): - return videoFrame.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift deleted file mode 100644 index 38991452..00000000 --- a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLActiveInfo: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLActiveInfo].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var size: GLint - - @ReadonlyAttribute - public var type: GLenum - - @ReadonlyAttribute - public var name: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLBuffer.swift b/Sources/DOMKit/WebIDL/WebGLBuffer.swift deleted file mode 100644 index c5217eb0..00000000 --- a/Sources/DOMKit/WebIDL/WebGLBuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLBuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLBuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift deleted file mode 100644 index 28853501..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextAttributes: BridgedDictionary { - public convenience init(alpha: Bool, depth: Bool, stencil: Bool, antialias: Bool, premultipliedAlpha: Bool, preserveDrawingBuffer: Bool, powerPreference: WebGLPowerPreference, failIfMajorPerformanceCaveat: Bool, desynchronized: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - object[Strings.depth] = depth.jsValue - object[Strings.stencil] = stencil.jsValue - object[Strings.antialias] = antialias.jsValue - object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue - object[Strings.preserveDrawingBuffer] = preserveDrawingBuffer.jsValue - object[Strings.powerPreference] = powerPreference.jsValue - object[Strings.failIfMajorPerformanceCaveat] = failIfMajorPerformanceCaveat.jsValue - object[Strings.desynchronized] = desynchronized.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _depth = ReadWriteAttribute(jsObject: object, name: Strings.depth) - _stencil = ReadWriteAttribute(jsObject: object, name: Strings.stencil) - _antialias = ReadWriteAttribute(jsObject: object, name: Strings.antialias) - _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) - _preserveDrawingBuffer = ReadWriteAttribute(jsObject: object, name: Strings.preserveDrawingBuffer) - _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) - _failIfMajorPerformanceCaveat = ReadWriteAttribute(jsObject: object, name: Strings.failIfMajorPerformanceCaveat) - _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool - - @ReadWriteAttribute - public var depth: Bool - - @ReadWriteAttribute - public var stencil: Bool - - @ReadWriteAttribute - public var antialias: Bool - - @ReadWriteAttribute - public var premultipliedAlpha: Bool - - @ReadWriteAttribute - public var preserveDrawingBuffer: Bool - - @ReadWriteAttribute - public var powerPreference: WebGLPowerPreference - - @ReadWriteAttribute - public var failIfMajorPerformanceCaveat: Bool - - @ReadWriteAttribute - public var desynchronized: Bool -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift deleted file mode 100644 index 20837070..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLContextEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _statusMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusMessage) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInit: WebGLContextEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInit?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var statusMessage: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift deleted file mode 100644 index 20c0c668..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextEventInit: BridgedDictionary { - public convenience init(statusMessage: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.statusMessage] = statusMessage.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _statusMessage = ReadWriteAttribute(jsObject: object, name: Strings.statusMessage) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var statusMessage: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift deleted file mode 100644 index 83d1af39..00000000 --- a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLFramebuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLFramebuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLObject.swift b/Sources/DOMKit/WebIDL/WebGLObject.swift deleted file mode 100644 index c50d37fc..00000000 --- a/Sources/DOMKit/WebIDL/WebGLObject.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLObject: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLObject].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift deleted file mode 100644 index ce6b23f8..00000000 --- a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum WebGLPowerPreference: JSString, JSValueCompatible { - case `default` = "default" - case lowPower = "low-power" - case highPerformance = "high-performance" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/WebGLProgram.swift b/Sources/DOMKit/WebIDL/WebGLProgram.swift deleted file mode 100644 index e38d4a93..00000000 --- a/Sources/DOMKit/WebIDL/WebGLProgram.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLProgram: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLProgram].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift deleted file mode 100644 index 3b364894..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLRenderbuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift deleted file mode 100644 index f9919cbe..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLRenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGLRenderingContextOverloads { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift deleted file mode 100644 index c0baf5db..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift +++ /dev/null @@ -1,1217 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGLRenderingContextBase: JSBridgedClass {} -public extension WebGLRenderingContextBase { - @inlinable static var DEPTH_BUFFER_BIT: GLenum { 0x0000_0100 } - - @inlinable static var STENCIL_BUFFER_BIT: GLenum { 0x0000_0400 } - - @inlinable static var COLOR_BUFFER_BIT: GLenum { 0x0000_4000 } - - @inlinable static var POINTS: GLenum { 0x0000 } - - @inlinable static var LINES: GLenum { 0x0001 } - - @inlinable static var LINE_LOOP: GLenum { 0x0002 } - - @inlinable static var LINE_STRIP: GLenum { 0x0003 } - - @inlinable static var TRIANGLES: GLenum { 0x0004 } - - @inlinable static var TRIANGLE_STRIP: GLenum { 0x0005 } - - @inlinable static var TRIANGLE_FAN: GLenum { 0x0006 } - - @inlinable static var ZERO: GLenum { 0 } - - @inlinable static var ONE: GLenum { 1 } - - @inlinable static var SRC_COLOR: GLenum { 0x0300 } - - @inlinable static var ONE_MINUS_SRC_COLOR: GLenum { 0x0301 } - - @inlinable static var SRC_ALPHA: GLenum { 0x0302 } - - @inlinable static var ONE_MINUS_SRC_ALPHA: GLenum { 0x0303 } - - @inlinable static var DST_ALPHA: GLenum { 0x0304 } - - @inlinable static var ONE_MINUS_DST_ALPHA: GLenum { 0x0305 } - - @inlinable static var DST_COLOR: GLenum { 0x0306 } - - @inlinable static var ONE_MINUS_DST_COLOR: GLenum { 0x0307 } - - @inlinable static var SRC_ALPHA_SATURATE: GLenum { 0x0308 } - - @inlinable static var FUNC_ADD: GLenum { 0x8006 } - - @inlinable static var BLEND_EQUATION: GLenum { 0x8009 } - - @inlinable static var BLEND_EQUATION_RGB: GLenum { 0x8009 } - - @inlinable static var BLEND_EQUATION_ALPHA: GLenum { 0x883D } - - @inlinable static var FUNC_SUBTRACT: GLenum { 0x800A } - - @inlinable static var FUNC_REVERSE_SUBTRACT: GLenum { 0x800B } - - @inlinable static var BLEND_DST_RGB: GLenum { 0x80C8 } - - @inlinable static var BLEND_SRC_RGB: GLenum { 0x80C9 } - - @inlinable static var BLEND_DST_ALPHA: GLenum { 0x80CA } - - @inlinable static var BLEND_SRC_ALPHA: GLenum { 0x80CB } - - @inlinable static var CONSTANT_COLOR: GLenum { 0x8001 } - - @inlinable static var ONE_MINUS_CONSTANT_COLOR: GLenum { 0x8002 } - - @inlinable static var CONSTANT_ALPHA: GLenum { 0x8003 } - - @inlinable static var ONE_MINUS_CONSTANT_ALPHA: GLenum { 0x8004 } - - @inlinable static var BLEND_COLOR: GLenum { 0x8005 } - - @inlinable static var ARRAY_BUFFER: GLenum { 0x8892 } - - @inlinable static var ELEMENT_ARRAY_BUFFER: GLenum { 0x8893 } - - @inlinable static var ARRAY_BUFFER_BINDING: GLenum { 0x8894 } - - @inlinable static var ELEMENT_ARRAY_BUFFER_BINDING: GLenum { 0x8895 } - - @inlinable static var STREAM_DRAW: GLenum { 0x88E0 } - - @inlinable static var STATIC_DRAW: GLenum { 0x88E4 } - - @inlinable static var DYNAMIC_DRAW: GLenum { 0x88E8 } - - @inlinable static var BUFFER_SIZE: GLenum { 0x8764 } - - @inlinable static var BUFFER_USAGE: GLenum { 0x8765 } - - @inlinable static var CURRENT_VERTEX_ATTRIB: GLenum { 0x8626 } - - @inlinable static var FRONT: GLenum { 0x0404 } - - @inlinable static var BACK: GLenum { 0x0405 } - - @inlinable static var FRONT_AND_BACK: GLenum { 0x0408 } - - @inlinable static var CULL_FACE: GLenum { 0x0B44 } - - @inlinable static var BLEND: GLenum { 0x0BE2 } - - @inlinable static var DITHER: GLenum { 0x0BD0 } - - @inlinable static var STENCIL_TEST: GLenum { 0x0B90 } - - @inlinable static var DEPTH_TEST: GLenum { 0x0B71 } - - @inlinable static var SCISSOR_TEST: GLenum { 0x0C11 } - - @inlinable static var POLYGON_OFFSET_FILL: GLenum { 0x8037 } - - @inlinable static var SAMPLE_ALPHA_TO_COVERAGE: GLenum { 0x809E } - - @inlinable static var SAMPLE_COVERAGE: GLenum { 0x80A0 } - - @inlinable static var NO_ERROR: GLenum { 0 } - - @inlinable static var INVALID_ENUM: GLenum { 0x0500 } - - @inlinable static var INVALID_VALUE: GLenum { 0x0501 } - - @inlinable static var INVALID_OPERATION: GLenum { 0x0502 } - - @inlinable static var OUT_OF_MEMORY: GLenum { 0x0505 } - - @inlinable static var CW: GLenum { 0x0900 } - - @inlinable static var CCW: GLenum { 0x0901 } - - @inlinable static var LINE_WIDTH: GLenum { 0x0B21 } - - @inlinable static var ALIASED_POINT_SIZE_RANGE: GLenum { 0x846D } - - @inlinable static var ALIASED_LINE_WIDTH_RANGE: GLenum { 0x846E } - - @inlinable static var CULL_FACE_MODE: GLenum { 0x0B45 } - - @inlinable static var FRONT_FACE: GLenum { 0x0B46 } - - @inlinable static var DEPTH_RANGE: GLenum { 0x0B70 } - - @inlinable static var DEPTH_WRITEMASK: GLenum { 0x0B72 } - - @inlinable static var DEPTH_CLEAR_VALUE: GLenum { 0x0B73 } - - @inlinable static var DEPTH_FUNC: GLenum { 0x0B74 } - - @inlinable static var STENCIL_CLEAR_VALUE: GLenum { 0x0B91 } - - @inlinable static var STENCIL_FUNC: GLenum { 0x0B92 } - - @inlinable static var STENCIL_FAIL: GLenum { 0x0B94 } - - @inlinable static var STENCIL_PASS_DEPTH_FAIL: GLenum { 0x0B95 } - - @inlinable static var STENCIL_PASS_DEPTH_PASS: GLenum { 0x0B96 } - - @inlinable static var STENCIL_REF: GLenum { 0x0B97 } - - @inlinable static var STENCIL_VALUE_MASK: GLenum { 0x0B93 } - - @inlinable static var STENCIL_WRITEMASK: GLenum { 0x0B98 } - - @inlinable static var STENCIL_BACK_FUNC: GLenum { 0x8800 } - - @inlinable static var STENCIL_BACK_FAIL: GLenum { 0x8801 } - - @inlinable static var STENCIL_BACK_PASS_DEPTH_FAIL: GLenum { 0x8802 } - - @inlinable static var STENCIL_BACK_PASS_DEPTH_PASS: GLenum { 0x8803 } - - @inlinable static var STENCIL_BACK_REF: GLenum { 0x8CA3 } - - @inlinable static var STENCIL_BACK_VALUE_MASK: GLenum { 0x8CA4 } - - @inlinable static var STENCIL_BACK_WRITEMASK: GLenum { 0x8CA5 } - - @inlinable static var VIEWPORT: GLenum { 0x0BA2 } - - @inlinable static var SCISSOR_BOX: GLenum { 0x0C10 } - - @inlinable static var COLOR_CLEAR_VALUE: GLenum { 0x0C22 } - - @inlinable static var COLOR_WRITEMASK: GLenum { 0x0C23 } - - @inlinable static var UNPACK_ALIGNMENT: GLenum { 0x0CF5 } - - @inlinable static var PACK_ALIGNMENT: GLenum { 0x0D05 } - - @inlinable static var MAX_TEXTURE_SIZE: GLenum { 0x0D33 } - - @inlinable static var MAX_VIEWPORT_DIMS: GLenum { 0x0D3A } - - @inlinable static var SUBPIXEL_BITS: GLenum { 0x0D50 } - - @inlinable static var RED_BITS: GLenum { 0x0D52 } - - @inlinable static var GREEN_BITS: GLenum { 0x0D53 } - - @inlinable static var BLUE_BITS: GLenum { 0x0D54 } - - @inlinable static var ALPHA_BITS: GLenum { 0x0D55 } - - @inlinable static var DEPTH_BITS: GLenum { 0x0D56 } - - @inlinable static var STENCIL_BITS: GLenum { 0x0D57 } - - @inlinable static var POLYGON_OFFSET_UNITS: GLenum { 0x2A00 } - - @inlinable static var POLYGON_OFFSET_FACTOR: GLenum { 0x8038 } - - @inlinable static var TEXTURE_BINDING_2D: GLenum { 0x8069 } - - @inlinable static var SAMPLE_BUFFERS: GLenum { 0x80A8 } - - @inlinable static var SAMPLES: GLenum { 0x80A9 } - - @inlinable static var SAMPLE_COVERAGE_VALUE: GLenum { 0x80AA } - - @inlinable static var SAMPLE_COVERAGE_INVERT: GLenum { 0x80AB } - - @inlinable static var COMPRESSED_TEXTURE_FORMATS: GLenum { 0x86A3 } - - @inlinable static var DONT_CARE: GLenum { 0x1100 } - - @inlinable static var FASTEST: GLenum { 0x1101 } - - @inlinable static var NICEST: GLenum { 0x1102 } - - @inlinable static var GENERATE_MIPMAP_HINT: GLenum { 0x8192 } - - @inlinable static var BYTE: GLenum { 0x1400 } - - @inlinable static var UNSIGNED_BYTE: GLenum { 0x1401 } - - @inlinable static var SHORT: GLenum { 0x1402 } - - @inlinable static var UNSIGNED_SHORT: GLenum { 0x1403 } - - @inlinable static var INT: GLenum { 0x1404 } - - @inlinable static var UNSIGNED_INT: GLenum { 0x1405 } - - @inlinable static var FLOAT: GLenum { 0x1406 } - - @inlinable static var DEPTH_COMPONENT: GLenum { 0x1902 } - - @inlinable static var ALPHA: GLenum { 0x1906 } - - @inlinable static var RGB: GLenum { 0x1907 } - - @inlinable static var RGBA: GLenum { 0x1908 } - - @inlinable static var LUMINANCE: GLenum { 0x1909 } - - @inlinable static var LUMINANCE_ALPHA: GLenum { 0x190A } - - @inlinable static var UNSIGNED_SHORT_4_4_4_4: GLenum { 0x8033 } - - @inlinable static var UNSIGNED_SHORT_5_5_5_1: GLenum { 0x8034 } - - @inlinable static var UNSIGNED_SHORT_5_6_5: GLenum { 0x8363 } - - @inlinable static var FRAGMENT_SHADER: GLenum { 0x8B30 } - - @inlinable static var VERTEX_SHADER: GLenum { 0x8B31 } - - @inlinable static var MAX_VERTEX_ATTRIBS: GLenum { 0x8869 } - - @inlinable static var MAX_VERTEX_UNIFORM_VECTORS: GLenum { 0x8DFB } - - @inlinable static var MAX_VARYING_VECTORS: GLenum { 0x8DFC } - - @inlinable static var MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4D } - - @inlinable static var MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4C } - - @inlinable static var MAX_TEXTURE_IMAGE_UNITS: GLenum { 0x8872 } - - @inlinable static var MAX_FRAGMENT_UNIFORM_VECTORS: GLenum { 0x8DFD } - - @inlinable static var SHADER_TYPE: GLenum { 0x8B4F } - - @inlinable static var DELETE_STATUS: GLenum { 0x8B80 } - - @inlinable static var LINK_STATUS: GLenum { 0x8B82 } - - @inlinable static var VALIDATE_STATUS: GLenum { 0x8B83 } - - @inlinable static var ATTACHED_SHADERS: GLenum { 0x8B85 } - - @inlinable static var ACTIVE_UNIFORMS: GLenum { 0x8B86 } - - @inlinable static var ACTIVE_ATTRIBUTES: GLenum { 0x8B89 } - - @inlinable static var SHADING_LANGUAGE_VERSION: GLenum { 0x8B8C } - - @inlinable static var CURRENT_PROGRAM: GLenum { 0x8B8D } - - @inlinable static var NEVER: GLenum { 0x0200 } - - @inlinable static var LESS: GLenum { 0x0201 } - - @inlinable static var EQUAL: GLenum { 0x0202 } - - @inlinable static var LEQUAL: GLenum { 0x0203 } - - @inlinable static var GREATER: GLenum { 0x0204 } - - @inlinable static var NOTEQUAL: GLenum { 0x0205 } - - @inlinable static var GEQUAL: GLenum { 0x0206 } - - @inlinable static var ALWAYS: GLenum { 0x0207 } - - @inlinable static var KEEP: GLenum { 0x1E00 } - - @inlinable static var REPLACE: GLenum { 0x1E01 } - - @inlinable static var INCR: GLenum { 0x1E02 } - - @inlinable static var DECR: GLenum { 0x1E03 } - - @inlinable static var INVERT: GLenum { 0x150A } - - @inlinable static var INCR_WRAP: GLenum { 0x8507 } - - @inlinable static var DECR_WRAP: GLenum { 0x8508 } - - @inlinable static var VENDOR: GLenum { 0x1F00 } - - @inlinable static var RENDERER: GLenum { 0x1F01 } - - @inlinable static var VERSION: GLenum { 0x1F02 } - - @inlinable static var NEAREST: GLenum { 0x2600 } - - @inlinable static var LINEAR: GLenum { 0x2601 } - - @inlinable static var NEAREST_MIPMAP_NEAREST: GLenum { 0x2700 } - - @inlinable static var LINEAR_MIPMAP_NEAREST: GLenum { 0x2701 } - - @inlinable static var NEAREST_MIPMAP_LINEAR: GLenum { 0x2702 } - - @inlinable static var LINEAR_MIPMAP_LINEAR: GLenum { 0x2703 } - - @inlinable static var TEXTURE_MAG_FILTER: GLenum { 0x2800 } - - @inlinable static var TEXTURE_MIN_FILTER: GLenum { 0x2801 } - - @inlinable static var TEXTURE_WRAP_S: GLenum { 0x2802 } - - @inlinable static var TEXTURE_WRAP_T: GLenum { 0x2803 } - - @inlinable static var TEXTURE_2D: GLenum { 0x0DE1 } - - @inlinable static var TEXTURE: GLenum { 0x1702 } - - @inlinable static var TEXTURE_CUBE_MAP: GLenum { 0x8513 } - - @inlinable static var TEXTURE_BINDING_CUBE_MAP: GLenum { 0x8514 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_X: GLenum { 0x8515 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum { 0x8516 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum { 0x8517 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum { 0x8518 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum { 0x8519 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum { 0x851A } - - @inlinable static var MAX_CUBE_MAP_TEXTURE_SIZE: GLenum { 0x851C } - - @inlinable static var TEXTURE0: GLenum { 0x84C0 } - - @inlinable static var TEXTURE1: GLenum { 0x84C1 } - - @inlinable static var TEXTURE2: GLenum { 0x84C2 } - - @inlinable static var TEXTURE3: GLenum { 0x84C3 } - - @inlinable static var TEXTURE4: GLenum { 0x84C4 } - - @inlinable static var TEXTURE5: GLenum { 0x84C5 } - - @inlinable static var TEXTURE6: GLenum { 0x84C6 } - - @inlinable static var TEXTURE7: GLenum { 0x84C7 } - - @inlinable static var TEXTURE8: GLenum { 0x84C8 } - - @inlinable static var TEXTURE9: GLenum { 0x84C9 } - - @inlinable static var TEXTURE10: GLenum { 0x84CA } - - @inlinable static var TEXTURE11: GLenum { 0x84CB } - - @inlinable static var TEXTURE12: GLenum { 0x84CC } - - @inlinable static var TEXTURE13: GLenum { 0x84CD } - - @inlinable static var TEXTURE14: GLenum { 0x84CE } - - @inlinable static var TEXTURE15: GLenum { 0x84CF } - - @inlinable static var TEXTURE16: GLenum { 0x84D0 } - - @inlinable static var TEXTURE17: GLenum { 0x84D1 } - - @inlinable static var TEXTURE18: GLenum { 0x84D2 } - - @inlinable static var TEXTURE19: GLenum { 0x84D3 } - - @inlinable static var TEXTURE20: GLenum { 0x84D4 } - - @inlinable static var TEXTURE21: GLenum { 0x84D5 } - - @inlinable static var TEXTURE22: GLenum { 0x84D6 } - - @inlinable static var TEXTURE23: GLenum { 0x84D7 } - - @inlinable static var TEXTURE24: GLenum { 0x84D8 } - - @inlinable static var TEXTURE25: GLenum { 0x84D9 } - - @inlinable static var TEXTURE26: GLenum { 0x84DA } - - @inlinable static var TEXTURE27: GLenum { 0x84DB } - - @inlinable static var TEXTURE28: GLenum { 0x84DC } - - @inlinable static var TEXTURE29: GLenum { 0x84DD } - - @inlinable static var TEXTURE30: GLenum { 0x84DE } - - @inlinable static var TEXTURE31: GLenum { 0x84DF } - - @inlinable static var ACTIVE_TEXTURE: GLenum { 0x84E0 } - - @inlinable static var REPEAT: GLenum { 0x2901 } - - @inlinable static var CLAMP_TO_EDGE: GLenum { 0x812F } - - @inlinable static var MIRRORED_REPEAT: GLenum { 0x8370 } - - @inlinable static var FLOAT_VEC2: GLenum { 0x8B50 } - - @inlinable static var FLOAT_VEC3: GLenum { 0x8B51 } - - @inlinable static var FLOAT_VEC4: GLenum { 0x8B52 } - - @inlinable static var INT_VEC2: GLenum { 0x8B53 } - - @inlinable static var INT_VEC3: GLenum { 0x8B54 } - - @inlinable static var INT_VEC4: GLenum { 0x8B55 } - - @inlinable static var BOOL: GLenum { 0x8B56 } - - @inlinable static var BOOL_VEC2: GLenum { 0x8B57 } - - @inlinable static var BOOL_VEC3: GLenum { 0x8B58 } - - @inlinable static var BOOL_VEC4: GLenum { 0x8B59 } - - @inlinable static var FLOAT_MAT2: GLenum { 0x8B5A } - - @inlinable static var FLOAT_MAT3: GLenum { 0x8B5B } - - @inlinable static var FLOAT_MAT4: GLenum { 0x8B5C } - - @inlinable static var SAMPLER_2D: GLenum { 0x8B5E } - - @inlinable static var SAMPLER_CUBE: GLenum { 0x8B60 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_ENABLED: GLenum { 0x8622 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_SIZE: GLenum { 0x8623 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_STRIDE: GLenum { 0x8624 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_TYPE: GLenum { 0x8625 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum { 0x886A } - - @inlinable static var VERTEX_ATTRIB_ARRAY_POINTER: GLenum { 0x8645 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum { 0x889F } - - @inlinable static var IMPLEMENTATION_COLOR_READ_TYPE: GLenum { 0x8B9A } - - @inlinable static var IMPLEMENTATION_COLOR_READ_FORMAT: GLenum { 0x8B9B } - - @inlinable static var COMPILE_STATUS: GLenum { 0x8B81 } - - @inlinable static var LOW_FLOAT: GLenum { 0x8DF0 } - - @inlinable static var MEDIUM_FLOAT: GLenum { 0x8DF1 } - - @inlinable static var HIGH_FLOAT: GLenum { 0x8DF2 } - - @inlinable static var LOW_INT: GLenum { 0x8DF3 } - - @inlinable static var MEDIUM_INT: GLenum { 0x8DF4 } - - @inlinable static var HIGH_INT: GLenum { 0x8DF5 } - - @inlinable static var FRAMEBUFFER: GLenum { 0x8D40 } - - @inlinable static var RENDERBUFFER: GLenum { 0x8D41 } - - @inlinable static var RGBA4: GLenum { 0x8056 } - - @inlinable static var RGB5_A1: GLenum { 0x8057 } - - @inlinable static var RGB565: GLenum { 0x8D62 } - - @inlinable static var DEPTH_COMPONENT16: GLenum { 0x81A5 } - - @inlinable static var STENCIL_INDEX8: GLenum { 0x8D48 } - - @inlinable static var DEPTH_STENCIL: GLenum { 0x84F9 } - - @inlinable static var RENDERBUFFER_WIDTH: GLenum { 0x8D42 } - - @inlinable static var RENDERBUFFER_HEIGHT: GLenum { 0x8D43 } - - @inlinable static var RENDERBUFFER_INTERNAL_FORMAT: GLenum { 0x8D44 } - - @inlinable static var RENDERBUFFER_RED_SIZE: GLenum { 0x8D50 } - - @inlinable static var RENDERBUFFER_GREEN_SIZE: GLenum { 0x8D51 } - - @inlinable static var RENDERBUFFER_BLUE_SIZE: GLenum { 0x8D52 } - - @inlinable static var RENDERBUFFER_ALPHA_SIZE: GLenum { 0x8D53 } - - @inlinable static var RENDERBUFFER_DEPTH_SIZE: GLenum { 0x8D54 } - - @inlinable static var RENDERBUFFER_STENCIL_SIZE: GLenum { 0x8D55 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum { 0x8CD0 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum { 0x8CD1 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum { 0x8CD2 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum { 0x8CD3 } - - @inlinable static var COLOR_ATTACHMENT0: GLenum { 0x8CE0 } - - @inlinable static var DEPTH_ATTACHMENT: GLenum { 0x8D00 } - - @inlinable static var STENCIL_ATTACHMENT: GLenum { 0x8D20 } - - @inlinable static var DEPTH_STENCIL_ATTACHMENT: GLenum { 0x821A } - - @inlinable static var NONE: GLenum { 0 } - - @inlinable static var FRAMEBUFFER_COMPLETE: GLenum { 0x8CD5 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum { 0x8CD6 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum { 0x8CD7 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum { 0x8CD9 } - - @inlinable static var FRAMEBUFFER_UNSUPPORTED: GLenum { 0x8CDD } - - @inlinable static var FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } - - @inlinable static var RENDERBUFFER_BINDING: GLenum { 0x8CA7 } - - @inlinable static var MAX_RENDERBUFFER_SIZE: GLenum { 0x84E8 } - - @inlinable static var INVALID_FRAMEBUFFER_OPERATION: GLenum { 0x0506 } - - @inlinable static var UNPACK_FLIP_Y_WEBGL: GLenum { 0x9240 } - - @inlinable static var UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum { 0x9241 } - - @inlinable static var CONTEXT_LOST_WEBGL: GLenum { 0x9242 } - - @inlinable static var UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum { 0x9243 } - - @inlinable static var BROWSER_DEFAULT_WEBGL: GLenum { 0x9244 } - - @inlinable var canvas: HTMLCanvasElement_or_OffscreenCanvas { ReadonlyAttribute[Strings.canvas, in: jsObject] } - - @inlinable var drawingBufferWidth: GLsizei { ReadonlyAttribute[Strings.drawingBufferWidth, in: jsObject] } - - @inlinable var drawingBufferHeight: GLsizei { ReadonlyAttribute[Strings.drawingBufferHeight, in: jsObject] } - - @inlinable func getContextAttributes() -> WebGLContextAttributes? { - let this = jsObject - return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func isContextLost() -> Bool { - let this = jsObject - return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getSupportedExtensions() -> [String]? { - let this = jsObject - return this[Strings.getSupportedExtensions].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getExtension(name: String) -> JSObject? { - let this = jsObject - return this[Strings.getExtension].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable func activeTexture(texture: GLenum) { - let this = jsObject - _ = this[Strings.activeTexture].function!(this: this, arguments: [texture.jsValue]) - } - - @inlinable func attachShader(program: WebGLProgram, shader: WebGLShader) { - let this = jsObject - _ = this[Strings.attachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) - } - - @inlinable func bindAttribLocation(program: WebGLProgram, index: GLuint, name: String) { - let this = jsObject - _ = this[Strings.bindAttribLocation].function!(this: this, arguments: [program.jsValue, index.jsValue, name.jsValue]) - } - - @inlinable func bindBuffer(target: GLenum, buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.bindBuffer].function!(this: this, arguments: [target.jsValue, buffer.jsValue]) - } - - @inlinable func bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer?) { - let this = jsObject - _ = this[Strings.bindFramebuffer].function!(this: this, arguments: [target.jsValue, framebuffer.jsValue]) - } - - @inlinable func bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.bindRenderbuffer].function!(this: this, arguments: [target.jsValue, renderbuffer.jsValue]) - } - - @inlinable func bindTexture(target: GLenum, texture: WebGLTexture?) { - let this = jsObject - _ = this[Strings.bindTexture].function!(this: this, arguments: [target.jsValue, texture.jsValue]) - } - - @inlinable func blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { - let this = jsObject - _ = this[Strings.blendColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func blendEquation(mode: GLenum) { - let this = jsObject - _ = this[Strings.blendEquation].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) { - let this = jsObject - _ = this[Strings.blendEquationSeparate].function!(this: this, arguments: [modeRGB.jsValue, modeAlpha.jsValue]) - } - - @inlinable func blendFunc(sfactor: GLenum, dfactor: GLenum) { - let this = jsObject - _ = this[Strings.blendFunc].function!(this: this, arguments: [sfactor.jsValue, dfactor.jsValue]) - } - - @inlinable func blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) { - let this = jsObject - _ = this[Strings.blendFuncSeparate].function!(this: this, arguments: [srcRGB.jsValue, dstRGB.jsValue, srcAlpha.jsValue, dstAlpha.jsValue]) - } - - @inlinable func checkFramebufferStatus(target: GLenum) -> GLenum { - let this = jsObject - return this[Strings.checkFramebufferStatus].function!(this: this, arguments: [target.jsValue]).fromJSValue()! - } - - @inlinable func clear(mask: GLbitfield) { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: [mask.jsValue]) - } - - @inlinable func clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { - let this = jsObject - _ = this[Strings.clearColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func clearDepth(depth: GLclampf) { - let this = jsObject - _ = this[Strings.clearDepth].function!(this: this, arguments: [depth.jsValue]) - } - - @inlinable func clearStencil(s: GLint) { - let this = jsObject - _ = this[Strings.clearStencil].function!(this: this, arguments: [s.jsValue]) - } - - @inlinable func colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) { - let this = jsObject - _ = this[Strings.colorMask].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func compileShader(shader: WebGLShader) { - let this = jsObject - _ = this[Strings.compileShader].function!(this: this, arguments: [shader.jsValue]) - } - - @inlinable func copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = x.jsValue - let _arg4 = y.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = border.jsValue - let this = jsObject - _ = this[Strings.copyTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue - let _arg6 = width.jsValue - let _arg7 = height.jsValue - let this = jsObject - _ = this[Strings.copyTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func createBuffer() -> WebGLBuffer? { - let this = jsObject - return this[Strings.createBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createFramebuffer() -> WebGLFramebuffer? { - let this = jsObject - return this[Strings.createFramebuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createProgram() -> WebGLProgram? { - let this = jsObject - return this[Strings.createProgram].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createRenderbuffer() -> WebGLRenderbuffer? { - let this = jsObject - return this[Strings.createRenderbuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createShader(type: GLenum) -> WebGLShader? { - let this = jsObject - return this[Strings.createShader].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @inlinable func createTexture() -> WebGLTexture? { - let this = jsObject - return this[Strings.createTexture].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func cullFace(mode: GLenum) { - let this = jsObject - _ = this[Strings.cullFace].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func deleteBuffer(buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.deleteBuffer].function!(this: this, arguments: [buffer.jsValue]) - } - - @inlinable func deleteFramebuffer(framebuffer: WebGLFramebuffer?) { - let this = jsObject - _ = this[Strings.deleteFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]) - } - - @inlinable func deleteProgram(program: WebGLProgram?) { - let this = jsObject - _ = this[Strings.deleteProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.deleteRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]) - } - - @inlinable func deleteShader(shader: WebGLShader?) { - let this = jsObject - _ = this[Strings.deleteShader].function!(this: this, arguments: [shader.jsValue]) - } - - @inlinable func deleteTexture(texture: WebGLTexture?) { - let this = jsObject - _ = this[Strings.deleteTexture].function!(this: this, arguments: [texture.jsValue]) - } - - @inlinable func depthFunc(func: GLenum) { - let this = jsObject - _ = this[Strings.depthFunc].function!(this: this, arguments: [`func`.jsValue]) - } - - @inlinable func depthMask(flag: GLboolean) { - let this = jsObject - _ = this[Strings.depthMask].function!(this: this, arguments: [flag.jsValue]) - } - - @inlinable func depthRange(zNear: GLclampf, zFar: GLclampf) { - let this = jsObject - _ = this[Strings.depthRange].function!(this: this, arguments: [zNear.jsValue, zFar.jsValue]) - } - - @inlinable func detachShader(program: WebGLProgram, shader: WebGLShader) { - let this = jsObject - _ = this[Strings.detachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) - } - - @inlinable func disable(cap: GLenum) { - let this = jsObject - _ = this[Strings.disable].function!(this: this, arguments: [cap.jsValue]) - } - - @inlinable func disableVertexAttribArray(index: GLuint) { - let this = jsObject - _ = this[Strings.disableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable func drawArrays(mode: GLenum, first: GLint, count: GLsizei) { - let this = jsObject - _ = this[Strings.drawArrays].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue]) - } - - @inlinable func drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) { - let this = jsObject - _ = this[Strings.drawElements].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue]) - } - - @inlinable func enable(cap: GLenum) { - let this = jsObject - _ = this[Strings.enable].function!(this: this, arguments: [cap.jsValue]) - } - - @inlinable func enableVertexAttribArray(index: GLuint) { - let this = jsObject - _ = this[Strings.enableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable func finish() { - let this = jsObject - _ = this[Strings.finish].function!(this: this, arguments: []) - } - - @inlinable func flush() { - let this = jsObject - _ = this[Strings.flush].function!(this: this, arguments: []) - } - - @inlinable func framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.framebufferRenderbuffer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, renderbuffertarget.jsValue, renderbuffer.jsValue]) - } - - @inlinable func framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture?, level: GLint) { - let this = jsObject - _ = this[Strings.framebufferTexture2D].function!(this: this, arguments: [target.jsValue, attachment.jsValue, textarget.jsValue, texture.jsValue, level.jsValue]) - } - - @inlinable func frontFace(mode: GLenum) { - let this = jsObject - _ = this[Strings.frontFace].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func generateMipmap(target: GLenum) { - let this = jsObject - _ = this[Strings.generateMipmap].function!(this: this, arguments: [target.jsValue]) - } - - @inlinable func getActiveAttrib(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getActiveAttrib].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniform(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getActiveUniform].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getAttachedShaders(program: WebGLProgram) -> [WebGLShader]? { - let this = jsObject - return this[Strings.getAttachedShaders].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func getAttribLocation(program: WebGLProgram, name: String) -> GLint { - let this = jsObject - return this[Strings.getAttribLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func getBufferParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getBufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getParameter(pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getParameter].function!(this: this, arguments: [pname.jsValue]).fromJSValue()! - } - - @inlinable func getError() -> GLenum { - let this = jsObject - return this[Strings.getError].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getFramebufferAttachmentParameter].function!(this: this, arguments: [target.jsValue, attachment.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getProgramParameter(program: WebGLProgram, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getProgramParameter].function!(this: this, arguments: [program.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getProgramInfoLog(program: WebGLProgram) -> String? { - let this = jsObject - return this[Strings.getProgramInfoLog].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func getRenderbufferParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getRenderbufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getShaderParameter(shader: WebGLShader, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getShaderParameter].function!(this: this, arguments: [shader.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) -> WebGLShaderPrecisionFormat? { - let this = jsObject - return this[Strings.getShaderPrecisionFormat].function!(this: this, arguments: [shadertype.jsValue, precisiontype.jsValue]).fromJSValue()! - } - - @inlinable func getShaderInfoLog(shader: WebGLShader) -> String? { - let this = jsObject - return this[Strings.getShaderInfoLog].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func getShaderSource(shader: WebGLShader) -> String? { - let this = jsObject - return this[Strings.getShaderSource].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func getTexParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getTexParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getUniform(program: WebGLProgram, location: WebGLUniformLocation) -> JSValue { - let this = jsObject - return this[Strings.getUniform].function!(this: this, arguments: [program.jsValue, location.jsValue]).fromJSValue()! - } - - @inlinable func getUniformLocation(program: WebGLProgram, name: String) -> WebGLUniformLocation? { - let this = jsObject - return this[Strings.getUniformLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func getVertexAttrib(index: GLuint, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getVertexAttrib].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getVertexAttribOffset(index: GLuint, pname: GLenum) -> GLintptr { - let this = jsObject - return this[Strings.getVertexAttribOffset].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func hint(target: GLenum, mode: GLenum) { - let this = jsObject - _ = this[Strings.hint].function!(this: this, arguments: [target.jsValue, mode.jsValue]) - } - - @inlinable func isBuffer(buffer: WebGLBuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isBuffer].function!(this: this, arguments: [buffer.jsValue]).fromJSValue()! - } - - @inlinable func isEnabled(cap: GLenum) -> GLboolean { - let this = jsObject - return this[Strings.isEnabled].function!(this: this, arguments: [cap.jsValue]).fromJSValue()! - } - - @inlinable func isFramebuffer(framebuffer: WebGLFramebuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]).fromJSValue()! - } - - @inlinable func isProgram(program: WebGLProgram?) -> GLboolean { - let this = jsObject - return this[Strings.isProgram].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func isRenderbuffer(renderbuffer: WebGLRenderbuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]).fromJSValue()! - } - - @inlinable func isShader(shader: WebGLShader?) -> GLboolean { - let this = jsObject - return this[Strings.isShader].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func isTexture(texture: WebGLTexture?) -> GLboolean { - let this = jsObject - return this[Strings.isTexture].function!(this: this, arguments: [texture.jsValue]).fromJSValue()! - } - - @inlinable func lineWidth(width: GLfloat) { - let this = jsObject - _ = this[Strings.lineWidth].function!(this: this, arguments: [width.jsValue]) - } - - @inlinable func linkProgram(program: WebGLProgram) { - let this = jsObject - _ = this[Strings.linkProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func pixelStorei(pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.pixelStorei].function!(this: this, arguments: [pname.jsValue, param.jsValue]) - } - - @inlinable func polygonOffset(factor: GLfloat, units: GLfloat) { - let this = jsObject - _ = this[Strings.polygonOffset].function!(this: this, arguments: [factor.jsValue, units.jsValue]) - } - - @inlinable func renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.renderbufferStorage].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func sampleCoverage(value: GLclampf, invert: GLboolean) { - let this = jsObject - _ = this[Strings.sampleCoverage].function!(this: this, arguments: [value.jsValue, invert.jsValue]) - } - - @inlinable func scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.scissor].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func shaderSource(shader: WebGLShader, source: String) { - let this = jsObject - _ = this[Strings.shaderSource].function!(this: this, arguments: [shader.jsValue, source.jsValue]) - } - - @inlinable func stencilFunc(func: GLenum, ref: GLint, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilFunc].function!(this: this, arguments: [`func`.jsValue, ref.jsValue, mask.jsValue]) - } - - @inlinable func stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilFuncSeparate].function!(this: this, arguments: [face.jsValue, `func`.jsValue, ref.jsValue, mask.jsValue]) - } - - @inlinable func stencilMask(mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilMask].function!(this: this, arguments: [mask.jsValue]) - } - - @inlinable func stencilMaskSeparate(face: GLenum, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilMaskSeparate].function!(this: this, arguments: [face.jsValue, mask.jsValue]) - } - - @inlinable func stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) { - let this = jsObject - _ = this[Strings.stencilOp].function!(this: this, arguments: [fail.jsValue, zfail.jsValue, zpass.jsValue]) - } - - @inlinable func stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) { - let this = jsObject - _ = this[Strings.stencilOpSeparate].function!(this: this, arguments: [face.jsValue, fail.jsValue, zfail.jsValue, zpass.jsValue]) - } - - @inlinable func texParameterf(target: GLenum, pname: GLenum, param: GLfloat) { - let this = jsObject - _ = this[Strings.texParameterf].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func texParameteri(target: GLenum, pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.texParameteri].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func uniform1f(location: WebGLUniformLocation?, x: GLfloat) { - let this = jsObject - _ = this[Strings.uniform1f].function!(this: this, arguments: [location.jsValue, x.jsValue]) - } - - @inlinable func uniform2f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat) { - let this = jsObject - _ = this[Strings.uniform2f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func uniform3f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat) { - let this = jsObject - _ = this[Strings.uniform3f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func uniform4f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { - let this = jsObject - _ = this[Strings.uniform4f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func uniform1i(location: WebGLUniformLocation?, x: GLint) { - let this = jsObject - _ = this[Strings.uniform1i].function!(this: this, arguments: [location.jsValue, x.jsValue]) - } - - @inlinable func uniform2i(location: WebGLUniformLocation?, x: GLint, y: GLint) { - let this = jsObject - _ = this[Strings.uniform2i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func uniform3i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint) { - let this = jsObject - _ = this[Strings.uniform3i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func uniform4i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint, w: GLint) { - let this = jsObject - _ = this[Strings.uniform4i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func useProgram(program: WebGLProgram?) { - let this = jsObject - _ = this[Strings.useProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func validateProgram(program: WebGLProgram) { - let this = jsObject - _ = this[Strings.validateProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func vertexAttrib1f(index: GLuint, x: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib1f].function!(this: this, arguments: [index.jsValue, x.jsValue]) - } - - @inlinable func vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib2f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib3f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib4f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttrib1fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib1fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib2fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib2fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib3fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib3fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib4fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib4fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) { - let _arg0 = index.jsValue - let _arg1 = size.jsValue - let _arg2 = type.jsValue - let _arg3 = normalized.jsValue - let _arg4 = stride.jsValue - let _arg5 = offset.jsValue - let this = jsObject - _ = this[Strings.vertexAttribPointer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.viewport].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift deleted file mode 100644 index fe1977ac..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift +++ /dev/null @@ -1,165 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGLRenderingContextOverloads: JSBridgedClass {} -public extension WebGLRenderingContextOverloads { - @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) - } - - @inlinable func bufferData(target: GLenum, data: BufferSource?, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, data.jsValue, usage.jsValue]) - } - - @inlinable func bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, offset.jsValue, data.jsValue]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = data.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = data.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = pixels.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = format.jsValue - let _arg4 = type.jsValue - let _arg5 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } - - @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } - - @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLShader.swift b/Sources/DOMKit/WebIDL/WebGLShader.swift deleted file mode 100644 index 97f2b719..00000000 --- a/Sources/DOMKit/WebIDL/WebGLShader.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLShader: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift deleted file mode 100644 index 67725e58..00000000 --- a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLShaderPrecisionFormat: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLShaderPrecisionFormat].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _rangeMin = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMin) - _rangeMax = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMax) - _precision = ReadonlyAttribute(jsObject: jsObject, name: Strings.precision) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var rangeMin: GLint - - @ReadonlyAttribute - public var rangeMax: GLint - - @ReadonlyAttribute - public var precision: GLint -} diff --git a/Sources/DOMKit/WebIDL/WebGLTexture.swift b/Sources/DOMKit/WebIDL/WebGLTexture.swift deleted file mode 100644 index ee7ad6c9..00000000 --- a/Sources/DOMKit/WebIDL/WebGLTexture.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLTexture: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift deleted file mode 100644 index cf833a95..00000000 --- a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLUniformLocation: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} From 9b2a019e4b7a07cd39660dfb2d32e221e891e14a Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 18:05:58 +0100 Subject: [PATCH 06/18] Add `console`, fix `DOMKitDemo` build --- Sources/DOMKit/WebIDL/console.swift | 105 ++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Sources/DOMKit/WebIDL/console.swift diff --git a/Sources/DOMKit/WebIDL/console.swift b/Sources/DOMKit/WebIDL/console.swift new file mode 100644 index 00000000..d61e67e0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/console.swift @@ -0,0 +1,105 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum console { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.console].object! + } + + @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func clear() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public static func debug(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func error(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func info(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func log(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) + } + + @inlinable public static func trace(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func warn(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) + } + + @inlinable public static func dirxml(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func count(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func countReset(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func group(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupCollapsed(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupEnd() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupEnd].function!(this: this, arguments: []) + } + + @inlinable public static func time(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func timeEnd(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } +} From 40748d44b359fe3f4d17479362168b1735e4f4a6 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:07:16 +0100 Subject: [PATCH 07/18] Add `webcodecs` IDL spec and generated code --- Sources/DOMKit/WebIDL/AlphaOption.swift | 22 +++++ Sources/DOMKit/WebIDL/AudioData.swift | 62 +++++++++++++ .../WebIDL/AudioDataCopyToOptions.swift | 35 ++++++++ Sources/DOMKit/WebIDL/AudioDataInit.swift | 45 ++++++++++ Sources/DOMKit/WebIDL/AudioDecoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/AudioDecoderConfig.swift | 35 ++++++++ Sources/DOMKit/WebIDL/AudioDecoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/AudioDecoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/AudioEncoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/AudioEncoderConfig.swift | 35 ++++++++ Sources/DOMKit/WebIDL/AudioEncoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/AudioEncoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/AudioSampleFormat.swift | 28 ++++++ Sources/DOMKit/WebIDL/CodecState.swift | 23 +++++ Sources/DOMKit/WebIDL/EncodedAudioChunk.swift | 39 ++++++++ .../DOMKit/WebIDL/EncodedAudioChunkInit.swift | 35 ++++++++ .../WebIDL/EncodedAudioChunkMetadata.swift | 20 +++++ .../DOMKit/WebIDL/EncodedAudioChunkType.swift | 22 +++++ Sources/DOMKit/WebIDL/EncodedVideoChunk.swift | 39 ++++++++ .../DOMKit/WebIDL/EncodedVideoChunkInit.swift | 35 ++++++++ .../WebIDL/EncodedVideoChunkMetadata.swift | 30 +++++++ .../DOMKit/WebIDL/EncodedVideoChunkType.swift | 22 +++++ .../DOMKit/WebIDL/HardwareAcceleration.swift | 23 +++++ Sources/DOMKit/WebIDL/ImageBufferSource.swift | 46 ++++++++++ .../DOMKit/WebIDL/ImageDecodeOptions.swift | 25 ++++++ Sources/DOMKit/WebIDL/ImageDecodeResult.swift | 25 ++++++ Sources/DOMKit/WebIDL/ImageDecoder.swift | 68 ++++++++++++++ Sources/DOMKit/WebIDL/ImageDecoderInit.swift | 50 +++++++++++ Sources/DOMKit/WebIDL/ImageTrack.swift | 32 +++++++ Sources/DOMKit/WebIDL/ImageTrackList.swift | 34 +++++++ Sources/DOMKit/WebIDL/LatencyMode.swift | 22 +++++ Sources/DOMKit/WebIDL/PlaneLayout.swift | 25 ++++++ Sources/DOMKit/WebIDL/SvcOutputMetadata.swift | 20 +++++ .../DOMKit/WebIDL/VideoColorPrimaries.swift | 23 +++++ Sources/DOMKit/WebIDL/VideoColorSpace.swift | 39 ++++++++ .../DOMKit/WebIDL/VideoColorSpaceInit.swift | 35 ++++++++ Sources/DOMKit/WebIDL/VideoDecoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/VideoDecoderConfig.swift | 60 +++++++++++++ Sources/DOMKit/WebIDL/VideoDecoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/VideoDecoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/VideoEncoder.swift | 70 +++++++++++++++ .../DOMKit/WebIDL/VideoEncoderConfig.swift | 75 ++++++++++++++++ .../WebIDL/VideoEncoderEncodeOptions.swift | 20 +++++ Sources/DOMKit/WebIDL/VideoEncoderInit.swift | 25 ++++++ .../DOMKit/WebIDL/VideoEncoderSupport.swift | 25 ++++++ Sources/DOMKit/WebIDL/VideoFrame.swift | 89 +++++++++++++++++++ .../DOMKit/WebIDL/VideoFrameBufferInit.swift | 65 ++++++++++++++ .../WebIDL/VideoFrameCopyToOptions.swift | 25 ++++++ Sources/DOMKit/WebIDL/VideoFrameInit.swift | 45 ++++++++++ .../WebIDL/VideoMatrixCoefficients.swift | 24 +++++ Sources/DOMKit/WebIDL/VideoPixelFormat.swift | 29 ++++++ .../WebIDL/VideoTransferCharacteristics.swift | 23 +++++ 52 files changed, 1929 insertions(+) create mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift create mode 100644 Sources/DOMKit/WebIDL/AudioData.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift create mode 100644 Sources/DOMKit/WebIDL/CodecState.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift create mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift create mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift create mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift create mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift create mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift create mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift diff --git a/Sources/DOMKit/WebIDL/AlphaOption.swift b/Sources/DOMKit/WebIDL/AlphaOption.swift new file mode 100644 index 00000000..f086fd3a --- /dev/null +++ b/Sources/DOMKit/WebIDL/AlphaOption.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum AlphaOption: JSString, JSValueCompatible { + case keep = "keep" + case discard = "discard" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/AudioData.swift b/Sources/DOMKit/WebIDL/AudioData.swift new file mode 100644 index 00000000..a0fc829f --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioData.swift @@ -0,0 +1,62 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioData: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) + _sampleRate = ReadonlyAttribute(jsObject: jsObject, name: Strings.sampleRate) + _numberOfFrames = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfFrames) + _numberOfChannels = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfChannels) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioDataInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var format: AudioSampleFormat? + + @ReadonlyAttribute + public var sampleRate: Float + + @ReadonlyAttribute + public var numberOfFrames: UInt32 + + @ReadonlyAttribute + public var numberOfChannels: UInt32 + + @ReadonlyAttribute + public var duration: UInt64 + + @ReadonlyAttribute + public var timestamp: Int64 + + @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! + } + + @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} diff --git a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift new file mode 100644 index 00000000..78daea46 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDataCopyToOptions: BridgedDictionary { + public convenience init(planeIndex: UInt32, frameOffset: UInt32, frameCount: UInt32, format: AudioSampleFormat) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.planeIndex] = planeIndex.jsValue + object[Strings.frameOffset] = frameOffset.jsValue + object[Strings.frameCount] = frameCount.jsValue + object[Strings.format] = format.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _planeIndex = ReadWriteAttribute(jsObject: object, name: Strings.planeIndex) + _frameOffset = ReadWriteAttribute(jsObject: object, name: Strings.frameOffset) + _frameCount = ReadWriteAttribute(jsObject: object, name: Strings.frameCount) + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var planeIndex: UInt32 + + @ReadWriteAttribute + public var frameOffset: UInt32 + + @ReadWriteAttribute + public var frameCount: UInt32 + + @ReadWriteAttribute + public var format: AudioSampleFormat +} diff --git a/Sources/DOMKit/WebIDL/AudioDataInit.swift b/Sources/DOMKit/WebIDL/AudioDataInit.swift new file mode 100644 index 00000000..d0395761 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDataInit.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDataInit: BridgedDictionary { + public convenience init(format: AudioSampleFormat, sampleRate: Float, numberOfFrames: UInt32, numberOfChannels: UInt32, timestamp: Int64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfFrames] = numberOfFrames.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfFrames = ReadWriteAttribute(jsObject: object, name: Strings.numberOfFrames) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: AudioSampleFormat + + @ReadWriteAttribute + public var sampleRate: Float + + @ReadWriteAttribute + public var numberOfFrames: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoder.swift b/Sources/DOMKit/WebIDL/AudioDecoder.swift new file mode 100644 index 00000000..d511e5ba --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var decodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func decode(chunk: EncodedAudioChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: AudioDecoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: AudioDecoderConfig) async throws -> AudioDecoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift new file mode 100644 index 00000000..55aa5a27 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderConfig: BridgedDictionary { + public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, description: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.description] = description.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _description = ReadWriteAttribute(jsObject: object, name: Strings.description) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var description: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift new file mode 100644 index 00000000..b98e0449 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderInit: BridgedDictionary { + public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1Void + public var output: AudioDataOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift new file mode 100644 index 00000000..8245e0da --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: AudioDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoder.swift b/Sources/DOMKit/WebIDL/AudioEncoder.swift new file mode 100644 index 00000000..7565bc23 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioEncoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func encode(data: AudioData) { + let this = jsObject + _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: AudioEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: AudioEncoderConfig) async throws -> AudioEncoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift new file mode 100644 index 00000000..0d8f8acf --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderConfig: BridgedDictionary { + public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, bitrate: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.bitrate] = bitrate.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift new file mode 100644 index 00000000..550e8415 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderInit: BridgedDictionary { + public convenience init(output: @escaping EncodedAudioChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute2Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute2Void + public var output: EncodedAudioChunkOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift new file mode 100644 index 00000000..bed3a52b --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioEncoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: AudioEncoderConfig +} diff --git a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift new file mode 100644 index 00000000..a629b0a5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift @@ -0,0 +1,28 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum AudioSampleFormat: JSString, JSValueCompatible { + case u8 = "u8" + case s16 = "s16" + case s32 = "s32" + case f32 = "f32" + case u8Planar = "u8-planar" + case s16Planar = "s16-planar" + case s32Planar = "s32-planar" + case f32Planar = "f32-planar" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/CodecState.swift b/Sources/DOMKit/WebIDL/CodecState.swift new file mode 100644 index 00000000..3495763f --- /dev/null +++ b/Sources/DOMKit/WebIDL/CodecState.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum CodecState: JSString, JSValueCompatible { + case unconfigured = "unconfigured" + case configured = "configured" + case closed = "closed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift new file mode 100644 index 00000000..010e2b06 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunk: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedAudioChunk].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: EncodedAudioChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: EncodedAudioChunkType + + @ReadonlyAttribute + public var timestamp: Int64 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift new file mode 100644 index 00000000..054201f8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunkInit: BridgedDictionary { + public convenience init(type: EncodedAudioChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: EncodedAudioChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift new file mode 100644 index 00000000..6f5f8314 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: AudioDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.decoderConfig] = decoderConfig.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var decoderConfig: AudioDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift new file mode 100644 index 00000000..9c35362e --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum EncodedAudioChunkType: JSString, JSValueCompatible { + case key = "key" + case delta = "delta" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift new file mode 100644 index 00000000..1da80666 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunk: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedVideoChunk].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: EncodedVideoChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: EncodedVideoChunkType + + @ReadonlyAttribute + public var timestamp: Int64 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift new file mode 100644 index 00000000..0c95c51f --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunkInit: BridgedDictionary { + public convenience init(type: EncodedVideoChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: EncodedVideoChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift new file mode 100644 index 00000000..6b3572e9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift @@ -0,0 +1,30 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: VideoDecoderConfig, svc: SvcOutputMetadata, alphaSideData: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.decoderConfig] = decoderConfig.jsValue + object[Strings.svc] = svc.jsValue + object[Strings.alphaSideData] = alphaSideData.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) + _svc = ReadWriteAttribute(jsObject: object, name: Strings.svc) + _alphaSideData = ReadWriteAttribute(jsObject: object, name: Strings.alphaSideData) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var decoderConfig: VideoDecoderConfig + + @ReadWriteAttribute + public var svc: SvcOutputMetadata + + @ReadWriteAttribute + public var alphaSideData: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift new file mode 100644 index 00000000..f59b9723 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum EncodedVideoChunkType: JSString, JSValueCompatible { + case key = "key" + case delta = "delta" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift new file mode 100644 index 00000000..9adb76b1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum HardwareAcceleration: JSString, JSValueCompatible { + case noPreference = "no-preference" + case preferHardware = "prefer-hardware" + case preferSoftware = "prefer-software" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ImageBufferSource.swift b/Sources/DOMKit/WebIDL/ImageBufferSource.swift new file mode 100644 index 00000000..0aa23282 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageBufferSource.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ImageBufferSource: ConvertibleToJSValue {} +extension BufferSource: Any_ImageBufferSource {} +extension ReadableStream: Any_ImageBufferSource {} + +public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { + case bufferSource(BufferSource) + case readableStream(ReadableStream) + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var readableStream: ReadableStream? { + switch self { + case let .readableStream(readableStream): return readableStream + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let readableStream: ReadableStream = value.fromJSValue() { + return .readableStream(readableStream) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .readableStream(readableStream): + return readableStream.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift new file mode 100644 index 00000000..89806708 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecodeOptions: BridgedDictionary { + public convenience init(frameIndex: UInt32, completeFramesOnly: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.frameIndex] = frameIndex.jsValue + object[Strings.completeFramesOnly] = completeFramesOnly.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _frameIndex = ReadWriteAttribute(jsObject: object, name: Strings.frameIndex) + _completeFramesOnly = ReadWriteAttribute(jsObject: object, name: Strings.completeFramesOnly) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var frameIndex: UInt32 + + @ReadWriteAttribute + public var completeFramesOnly: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift new file mode 100644 index 00000000..1a4cb939 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecodeResult: BridgedDictionary { + public convenience init(image: VideoFrame, complete: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.image] = image.jsValue + object[Strings.complete] = complete.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _image = ReadWriteAttribute(jsObject: object, name: Strings.image) + _complete = ReadWriteAttribute(jsObject: object, name: Strings.complete) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var image: VideoFrame + + @ReadWriteAttribute + public var complete: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageDecoder.swift b/Sources/DOMKit/WebIDL/ImageDecoder.swift new file mode 100644 index 00000000..6112d940 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecoder.swift @@ -0,0 +1,68 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) + _completed = ReadonlyAttribute(jsObject: jsObject, name: Strings.completed) + _tracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.tracks) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: ImageDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var complete: Bool + + @ReadonlyAttribute + public var completed: JSPromise + + @ReadonlyAttribute + public var tracks: ImageTrackList + + @inlinable public func decode(options: ImageDecodeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func decode(options: ImageDecodeOptions? = nil) async throws -> ImageDecodeResult { + let this = jsObject + let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isTypeSupported(type: String) -> JSPromise { + let this = constructor + return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isTypeSupported(type: String) async throws -> Bool { + let this = constructor + let _promise: JSPromise = this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift new file mode 100644 index 00000000..06179973 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift @@ -0,0 +1,50 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecoderInit: BridgedDictionary { + public convenience init(type: String, data: ImageBufferSource, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, desiredWidth: UInt32, desiredHeight: UInt32, preferAnimation: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.data] = data.jsValue + object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue + object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue + object[Strings.desiredWidth] = desiredWidth.jsValue + object[Strings.desiredHeight] = desiredHeight.jsValue + object[Strings.preferAnimation] = preferAnimation.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) + _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) + _desiredWidth = ReadWriteAttribute(jsObject: object, name: Strings.desiredWidth) + _desiredHeight = ReadWriteAttribute(jsObject: object, name: Strings.desiredHeight) + _preferAnimation = ReadWriteAttribute(jsObject: object, name: Strings.preferAnimation) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var data: ImageBufferSource + + @ReadWriteAttribute + public var premultiplyAlpha: PremultiplyAlpha + + @ReadWriteAttribute + public var colorSpaceConversion: ColorSpaceConversion + + @ReadWriteAttribute + public var desiredWidth: UInt32 + + @ReadWriteAttribute + public var desiredHeight: UInt32 + + @ReadWriteAttribute + public var preferAnimation: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageTrack.swift b/Sources/DOMKit/WebIDL/ImageTrack.swift new file mode 100644 index 00000000..b68c7a97 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageTrack.swift @@ -0,0 +1,32 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ImageTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _animated = ReadonlyAttribute(jsObject: jsObject, name: Strings.animated) + _frameCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameCount) + _repetitionCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.repetitionCount) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var animated: Bool + + @ReadonlyAttribute + public var frameCount: UInt32 + + @ReadonlyAttribute + public var repetitionCount: Float + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ReadWriteAttribute + public var selected: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageTrackList.swift b/Sources/DOMKit/WebIDL/ImageTrackList.swift new file mode 100644 index 00000000..10b44925 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageTrackList.swift @@ -0,0 +1,34 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageTrackList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageTrackList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _selectedTrack = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedTrack) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> ImageTrack { + jsObject[key].fromJSValue()! + } + + @ReadonlyAttribute + public var ready: JSPromise + + @ReadonlyAttribute + public var length: UInt32 + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ReadonlyAttribute + public var selectedTrack: ImageTrack? +} diff --git a/Sources/DOMKit/WebIDL/LatencyMode.swift b/Sources/DOMKit/WebIDL/LatencyMode.swift new file mode 100644 index 00000000..d4aa61af --- /dev/null +++ b/Sources/DOMKit/WebIDL/LatencyMode.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum LatencyMode: JSString, JSValueCompatible { + case quality = "quality" + case realtime = "realtime" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/PlaneLayout.swift b/Sources/DOMKit/WebIDL/PlaneLayout.swift new file mode 100644 index 00000000..a4de400e --- /dev/null +++ b/Sources/DOMKit/WebIDL/PlaneLayout.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class PlaneLayout: BridgedDictionary { + public convenience init(offset: UInt32, stride: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.stride] = stride.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _stride = ReadWriteAttribute(jsObject: object, name: Strings.stride) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: UInt32 + + @ReadWriteAttribute + public var stride: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift new file mode 100644 index 00000000..2487040f --- /dev/null +++ b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class SvcOutputMetadata: BridgedDictionary { + public convenience init(temporalLayerId: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.temporalLayerId] = temporalLayerId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _temporalLayerId = ReadWriteAttribute(jsObject: object, name: Strings.temporalLayerId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var temporalLayerId: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift new file mode 100644 index 00000000..364fa134 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoColorPrimaries: JSString, JSValueCompatible { + case bt709 = "bt709" + case bt470bg = "bt470bg" + case smpte170m = "smpte170m" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpace.swift b/Sources/DOMKit/WebIDL/VideoColorSpace.swift new file mode 100644 index 00000000..25b08860 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorSpace.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoColorSpace: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoColorSpace].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _primaries = ReadonlyAttribute(jsObject: jsObject, name: Strings.primaries) + _transfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.transfer) + _matrix = ReadonlyAttribute(jsObject: jsObject, name: Strings.matrix) + _fullRange = ReadonlyAttribute(jsObject: jsObject, name: Strings.fullRange) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var primaries: VideoColorPrimaries? + + @ReadonlyAttribute + public var transfer: VideoTransferCharacteristics? + + @ReadonlyAttribute + public var matrix: VideoMatrixCoefficients? + + @ReadonlyAttribute + public var fullRange: Bool? + + @inlinable public func toJSON() -> VideoColorSpaceInit { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift new file mode 100644 index 00000000..786cfccc --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoColorSpaceInit: BridgedDictionary { + public convenience init(primaries: VideoColorPrimaries, transfer: VideoTransferCharacteristics, matrix: VideoMatrixCoefficients, fullRange: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.primaries] = primaries.jsValue + object[Strings.transfer] = transfer.jsValue + object[Strings.matrix] = matrix.jsValue + object[Strings.fullRange] = fullRange.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _primaries = ReadWriteAttribute(jsObject: object, name: Strings.primaries) + _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) + _matrix = ReadWriteAttribute(jsObject: object, name: Strings.matrix) + _fullRange = ReadWriteAttribute(jsObject: object, name: Strings.fullRange) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var primaries: VideoColorPrimaries + + @ReadWriteAttribute + public var transfer: VideoTransferCharacteristics + + @ReadWriteAttribute + public var matrix: VideoMatrixCoefficients + + @ReadWriteAttribute + public var fullRange: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoder.swift b/Sources/DOMKit/WebIDL/VideoDecoder.swift new file mode 100644 index 00000000..8f8900c2 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var decodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func decode(chunk: EncodedVideoChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: VideoDecoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: VideoDecoderConfig) async throws -> VideoDecoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift new file mode 100644 index 00000000..3e431877 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderConfig: BridgedDictionary { + public convenience init(codec: String, description: BufferSource, codedWidth: UInt32, codedHeight: UInt32, displayAspectWidth: UInt32, displayAspectHeight: UInt32, colorSpace: VideoColorSpaceInit, hardwareAcceleration: HardwareAcceleration, optimizeForLatency: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.description] = description.jsValue + object[Strings.codedWidth] = codedWidth.jsValue + object[Strings.codedHeight] = codedHeight.jsValue + object[Strings.displayAspectWidth] = displayAspectWidth.jsValue + object[Strings.displayAspectHeight] = displayAspectHeight.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue + object[Strings.optimizeForLatency] = optimizeForLatency.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _description = ReadWriteAttribute(jsObject: object, name: Strings.description) + _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) + _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) + _displayAspectWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectWidth) + _displayAspectHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectHeight) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) + _optimizeForLatency = ReadWriteAttribute(jsObject: object, name: Strings.optimizeForLatency) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var description: BufferSource + + @ReadWriteAttribute + public var codedWidth: UInt32 + + @ReadWriteAttribute + public var codedHeight: UInt32 + + @ReadWriteAttribute + public var displayAspectWidth: UInt32 + + @ReadWriteAttribute + public var displayAspectHeight: UInt32 + + @ReadWriteAttribute + public var colorSpace: VideoColorSpaceInit + + @ReadWriteAttribute + public var hardwareAcceleration: HardwareAcceleration + + @ReadWriteAttribute + public var optimizeForLatency: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift new file mode 100644 index 00000000..0614f47e --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderInit: BridgedDictionary { + public convenience init(output: @escaping VideoFrameOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1Void + public var output: VideoFrameOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift new file mode 100644 index 00000000..4d41da3d --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: VideoDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoder.swift b/Sources/DOMKit/WebIDL/VideoEncoder.swift new file mode 100644 index 00000000..2349c057 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoEncoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { + let this = jsObject + _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) async throws -> VideoEncoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift new file mode 100644 index 00000000..c6fdfd98 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift @@ -0,0 +1,75 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderConfig: BridgedDictionary { + public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + object[Strings.bitrate] = bitrate.jsValue + object[Strings.framerate] = framerate.jsValue + object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.scalabilityMode] = scalabilityMode.jsValue + object[Strings.bitrateMode] = bitrateMode.jsValue + object[Strings.latencyMode] = latencyMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) + _framerate = ReadWriteAttribute(jsObject: object, name: Strings.framerate) + _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _scalabilityMode = ReadWriteAttribute(jsObject: object, name: Strings.scalabilityMode) + _bitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.bitrateMode) + _latencyMode = ReadWriteAttribute(jsObject: object, name: Strings.latencyMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 + + @ReadWriteAttribute + public var framerate: Double + + @ReadWriteAttribute + public var hardwareAcceleration: HardwareAcceleration + + @ReadWriteAttribute + public var alpha: AlphaOption + + @ReadWriteAttribute + public var scalabilityMode: String + + @ReadWriteAttribute + public var bitrateMode: BitrateMode + + @ReadWriteAttribute + public var latencyMode: LatencyMode +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift new file mode 100644 index 00000000..583d307c --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderEncodeOptions: BridgedDictionary { + public convenience init(keyFrame: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.keyFrame] = keyFrame.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var keyFrame: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift new file mode 100644 index 00000000..f9859e1b --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderInit: BridgedDictionary { + public convenience init(output: @escaping EncodedVideoChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute2Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute2Void + public var output: EncodedVideoChunkOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift new file mode 100644 index 00000000..f6419290 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoEncoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: VideoEncoderConfig +} diff --git a/Sources/DOMKit/WebIDL/VideoFrame.swift b/Sources/DOMKit/WebIDL/VideoFrame.swift new file mode 100644 index 00000000..9743b3fc --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrame.swift @@ -0,0 +1,89 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrame: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoFrame].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) + _codedWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedWidth) + _codedHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedHeight) + _codedRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedRect) + _visibleRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibleRect) + _displayWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayWidth) + _displayHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayHeight) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) + self.jsObject = jsObject + } + + @inlinable public convenience init(image: CanvasImageSource, init: VideoFrameInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [image.jsValue, `init`?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(data: BufferSource, init: VideoFrameBufferInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, `init`.jsValue])) + } + + @ReadonlyAttribute + public var format: VideoPixelFormat? + + @ReadonlyAttribute + public var codedWidth: UInt32 + + @ReadonlyAttribute + public var codedHeight: UInt32 + + @ReadonlyAttribute + public var codedRect: DOMRectReadOnly? + + @ReadonlyAttribute + public var visibleRect: DOMRectReadOnly? + + @ReadonlyAttribute + public var displayWidth: UInt32 + + @ReadonlyAttribute + public var displayHeight: UInt32 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var timestamp: Int64? + + @ReadonlyAttribute + public var colorSpace: VideoColorSpace + + @inlinable public func allocationSize(options: VideoFrameCopyToOptions? = nil) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) async throws -> [PlaneLayout] { + let this = jsObject + let _promise: JSPromise = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift new file mode 100644 index 00000000..0607012e --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift @@ -0,0 +1,65 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameBufferInit: BridgedDictionary { + public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.codedWidth] = codedWidth.jsValue + object[Strings.codedHeight] = codedHeight.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.layout] = layout.jsValue + object[Strings.visibleRect] = visibleRect.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) + _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: VideoPixelFormat + + @ReadWriteAttribute + public var codedWidth: UInt32 + + @ReadWriteAttribute + public var codedHeight: UInt32 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var layout: [PlaneLayout] + + @ReadWriteAttribute + public var visibleRect: DOMRectInit + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 + + @ReadWriteAttribute + public var colorSpace: VideoColorSpaceInit +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift new file mode 100644 index 00000000..a86c57dd --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameCopyToOptions: BridgedDictionary { + public convenience init(rect: DOMRectInit, layout: [PlaneLayout]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.rect] = rect.jsValue + object[Strings.layout] = layout.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _rect = ReadWriteAttribute(jsObject: object, name: Strings.rect) + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var rect: DOMRectInit + + @ReadWriteAttribute + public var layout: [PlaneLayout] +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameInit.swift b/Sources/DOMKit/WebIDL/VideoFrameInit.swift new file mode 100644 index 00000000..a70eaea1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameInit.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameInit: BridgedDictionary { + public convenience init(duration: UInt64, timestamp: Int64, alpha: AlphaOption, visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.duration] = duration.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.visibleRect] = visibleRect.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var alpha: AlphaOption + + @ReadWriteAttribute + public var visibleRect: DOMRectInit + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift new file mode 100644 index 00000000..58f11f73 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoMatrixCoefficients: JSString, JSValueCompatible { + case rgb = "rgb" + case bt709 = "bt709" + case bt470bg = "bt470bg" + case smpte170m = "smpte170m" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift new file mode 100644 index 00000000..1c8dea1f --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift @@ -0,0 +1,29 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoPixelFormat: JSString, JSValueCompatible { + case i420 = "I420" + case i420A = "I420A" + case i422 = "I422" + case i444 = "I444" + case nV12 = "NV12" + case rGBA = "RGBA" + case rGBX = "RGBX" + case bGRA = "BGRA" + case bGRX = "BGRX" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift new file mode 100644 index 00000000..e8407da6 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoTransferCharacteristics: JSString, JSValueCompatible { + case bt709 = "bt709" + case smpte170m = "smpte170m" + case iec6196621 = "iec61966-2-1" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} From 1d9d102d69c0174a850f2b75b59b058941f6dd07 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:15:27 +0100 Subject: [PATCH 08/18] Add `webgl1` IDL spec and generated code --- Sources/DOMKit/WebIDL/Float32List.swift | 46 + Sources/DOMKit/WebIDL/Int32List.swift | 46 + Sources/DOMKit/WebIDL/TexImageSource.swift | 116 ++ Sources/DOMKit/WebIDL/WebGLActiveInfo.swift | 26 + Sources/DOMKit/WebIDL/WebGLBuffer.swift | 12 + .../WebIDL/WebGLContextAttributes.swift | 60 + Sources/DOMKit/WebIDL/WebGLContextEvent.swift | 20 + .../DOMKit/WebIDL/WebGLContextEventInit.swift | 20 + Sources/DOMKit/WebIDL/WebGLFramebuffer.swift | 12 + Sources/DOMKit/WebIDL/WebGLObject.swift | 14 + .../DOMKit/WebIDL/WebGLPowerPreference.swift | 23 + Sources/DOMKit/WebIDL/WebGLProgram.swift | 12 + Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift | 12 + .../DOMKit/WebIDL/WebGLRenderingContext.swift | 14 + .../WebIDL/WebGLRenderingContextBase.swift | 1217 +++++++++++++++++ .../WebGLRenderingContextOverloads.swift | 165 +++ Sources/DOMKit/WebIDL/WebGLShader.swift | 12 + .../WebIDL/WebGLShaderPrecisionFormat.swift | 26 + Sources/DOMKit/WebIDL/WebGLTexture.swift | 12 + .../DOMKit/WebIDL/WebGLUniformLocation.swift | 14 + 20 files changed, 1879 insertions(+) create mode 100644 Sources/DOMKit/WebIDL/Float32List.swift create mode 100644 Sources/DOMKit/WebIDL/Int32List.swift create mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift diff --git a/Sources/DOMKit/WebIDL/Float32List.swift b/Sources/DOMKit/WebIDL/Float32List.swift new file mode 100644 index 00000000..1f1e5bdb --- /dev/null +++ b/Sources/DOMKit/WebIDL/Float32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Float32List: ConvertibleToJSValue {} +extension Float32Array: Any_Float32List {} +extension Array: Any_Float32List where Element == GLfloat {} + +public enum Float32List: JSValueCompatible, Any_Float32List { + case float32Array(Float32Array) + case seq_of_GLfloat([GLfloat]) + + var float32Array: Float32Array? { + switch self { + case let .float32Array(float32Array): return float32Array + default: return nil + } + } + + var seq_of_GLfloat: [GLfloat]? { + switch self { + case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let float32Array: Float32Array = value.fromJSValue() { + return .float32Array(float32Array) + } + if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { + return .seq_of_GLfloat(seq_of_GLfloat) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .float32Array(float32Array): + return float32Array.jsValue + case let .seq_of_GLfloat(seq_of_GLfloat): + return seq_of_GLfloat.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/Int32List.swift b/Sources/DOMKit/WebIDL/Int32List.swift new file mode 100644 index 00000000..ce876a5b --- /dev/null +++ b/Sources/DOMKit/WebIDL/Int32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Int32List: ConvertibleToJSValue {} +extension Int32Array: Any_Int32List {} +extension Array: Any_Int32List where Element == GLint {} + +public enum Int32List: JSValueCompatible, Any_Int32List { + case int32Array(Int32Array) + case seq_of_GLint([GLint]) + + var int32Array: Int32Array? { + switch self { + case let .int32Array(int32Array): return int32Array + default: return nil + } + } + + var seq_of_GLint: [GLint]? { + switch self { + case let .seq_of_GLint(seq_of_GLint): return seq_of_GLint + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let int32Array: Int32Array = value.fromJSValue() { + return .int32Array(int32Array) + } + if let seq_of_GLint: [GLint] = value.fromJSValue() { + return .seq_of_GLint(seq_of_GLint) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .int32Array(int32Array): + return int32Array.jsValue + case let .seq_of_GLint(seq_of_GLint): + return seq_of_GLint.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/TexImageSource.swift b/Sources/DOMKit/WebIDL/TexImageSource.swift new file mode 100644 index 00000000..d5750fff --- /dev/null +++ b/Sources/DOMKit/WebIDL/TexImageSource.swift @@ -0,0 +1,116 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_TexImageSource: ConvertibleToJSValue {} +extension HTMLCanvasElement: Any_TexImageSource {} +extension HTMLImageElement: Any_TexImageSource {} +extension HTMLVideoElement: Any_TexImageSource {} +extension ImageBitmap: Any_TexImageSource {} +extension ImageData: Any_TexImageSource {} +extension OffscreenCanvas: Any_TexImageSource {} +extension VideoFrame: Any_TexImageSource {} + +public enum TexImageSource: JSValueCompatible, Any_TexImageSource { + case htmlCanvasElement(HTMLCanvasElement) + case htmlImageElement(HTMLImageElement) + case htmlVideoElement(HTMLVideoElement) + case imageBitmap(ImageBitmap) + case imageData(ImageData) + case offscreenCanvas(OffscreenCanvas) + case videoFrame(VideoFrame) + + var htmlCanvasElement: HTMLCanvasElement? { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement + default: return nil + } + } + + var htmlImageElement: HTMLImageElement? { + switch self { + case let .htmlImageElement(htmlImageElement): return htmlImageElement + default: return nil + } + } + + var htmlVideoElement: HTMLVideoElement? { + switch self { + case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement + default: return nil + } + } + + var imageBitmap: ImageBitmap? { + switch self { + case let .imageBitmap(imageBitmap): return imageBitmap + default: return nil + } + } + + var imageData: ImageData? { + switch self { + case let .imageData(imageData): return imageData + default: return nil + } + } + + var offscreenCanvas: OffscreenCanvas? { + switch self { + case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas + default: return nil + } + } + + var videoFrame: VideoFrame? { + switch self { + case let .videoFrame(videoFrame): return videoFrame + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { + return .htmlCanvasElement(htmlCanvasElement) + } + if let htmlImageElement: HTMLImageElement = value.fromJSValue() { + return .htmlImageElement(htmlImageElement) + } + if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { + return .htmlVideoElement(htmlVideoElement) + } + if let imageBitmap: ImageBitmap = value.fromJSValue() { + return .imageBitmap(imageBitmap) + } + if let imageData: ImageData = value.fromJSValue() { + return .imageData(imageData) + } + if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { + return .offscreenCanvas(offscreenCanvas) + } + if let videoFrame: VideoFrame = value.fromJSValue() { + return .videoFrame(videoFrame) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): + return htmlCanvasElement.jsValue + case let .htmlImageElement(htmlImageElement): + return htmlImageElement.jsValue + case let .htmlVideoElement(htmlVideoElement): + return htmlVideoElement.jsValue + case let .imageBitmap(imageBitmap): + return imageBitmap.jsValue + case let .imageData(imageData): + return imageData.jsValue + case let .offscreenCanvas(offscreenCanvas): + return offscreenCanvas.jsValue + case let .videoFrame(videoFrame): + return videoFrame.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift new file mode 100644 index 00000000..38991452 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift @@ -0,0 +1,26 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLActiveInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLActiveInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var size: GLint + + @ReadonlyAttribute + public var type: GLenum + + @ReadonlyAttribute + public var name: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLBuffer.swift b/Sources/DOMKit/WebIDL/WebGLBuffer.swift new file mode 100644 index 00000000..c5217eb0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLBuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLBuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLBuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift new file mode 100644 index 00000000..28853501 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextAttributes: BridgedDictionary { + public convenience init(alpha: Bool, depth: Bool, stencil: Bool, antialias: Bool, premultipliedAlpha: Bool, preserveDrawingBuffer: Bool, powerPreference: WebGLPowerPreference, failIfMajorPerformanceCaveat: Bool, desynchronized: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + object[Strings.depth] = depth.jsValue + object[Strings.stencil] = stencil.jsValue + object[Strings.antialias] = antialias.jsValue + object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue + object[Strings.preserveDrawingBuffer] = preserveDrawingBuffer.jsValue + object[Strings.powerPreference] = powerPreference.jsValue + object[Strings.failIfMajorPerformanceCaveat] = failIfMajorPerformanceCaveat.jsValue + object[Strings.desynchronized] = desynchronized.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _depth = ReadWriteAttribute(jsObject: object, name: Strings.depth) + _stencil = ReadWriteAttribute(jsObject: object, name: Strings.stencil) + _antialias = ReadWriteAttribute(jsObject: object, name: Strings.antialias) + _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) + _preserveDrawingBuffer = ReadWriteAttribute(jsObject: object, name: Strings.preserveDrawingBuffer) + _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) + _failIfMajorPerformanceCaveat = ReadWriteAttribute(jsObject: object, name: Strings.failIfMajorPerformanceCaveat) + _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool + + @ReadWriteAttribute + public var depth: Bool + + @ReadWriteAttribute + public var stencil: Bool + + @ReadWriteAttribute + public var antialias: Bool + + @ReadWriteAttribute + public var premultipliedAlpha: Bool + + @ReadWriteAttribute + public var preserveDrawingBuffer: Bool + + @ReadWriteAttribute + public var powerPreference: WebGLPowerPreference + + @ReadWriteAttribute + public var failIfMajorPerformanceCaveat: Bool + + @ReadWriteAttribute + public var desynchronized: Bool +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift new file mode 100644 index 00000000..20837070 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLContextEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _statusMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusMessage) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInit: WebGLContextEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInit?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var statusMessage: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift new file mode 100644 index 00000000..20c0c668 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextEventInit: BridgedDictionary { + public convenience init(statusMessage: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.statusMessage] = statusMessage.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _statusMessage = ReadWriteAttribute(jsObject: object, name: Strings.statusMessage) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var statusMessage: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift new file mode 100644 index 00000000..83d1af39 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLFramebuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLFramebuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLObject.swift b/Sources/DOMKit/WebIDL/WebGLObject.swift new file mode 100644 index 00000000..c50d37fc --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLObject.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLObject: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLObject].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift new file mode 100644 index 00000000..ce6b23f8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum WebGLPowerPreference: JSString, JSValueCompatible { + case `default` = "default" + case lowPower = "low-power" + case highPerformance = "high-performance" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/WebGLProgram.swift b/Sources/DOMKit/WebIDL/WebGLProgram.swift new file mode 100644 index 00000000..e38d4a93 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLProgram.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLProgram: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLProgram].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift new file mode 100644 index 00000000..3b364894 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLRenderbuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift new file mode 100644 index 00000000..f9919cbe --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLRenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGLRenderingContextOverloads { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift new file mode 100644 index 00000000..c0baf5db --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift @@ -0,0 +1,1217 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGLRenderingContextBase: JSBridgedClass {} +public extension WebGLRenderingContextBase { + @inlinable static var DEPTH_BUFFER_BIT: GLenum { 0x0000_0100 } + + @inlinable static var STENCIL_BUFFER_BIT: GLenum { 0x0000_0400 } + + @inlinable static var COLOR_BUFFER_BIT: GLenum { 0x0000_4000 } + + @inlinable static var POINTS: GLenum { 0x0000 } + + @inlinable static var LINES: GLenum { 0x0001 } + + @inlinable static var LINE_LOOP: GLenum { 0x0002 } + + @inlinable static var LINE_STRIP: GLenum { 0x0003 } + + @inlinable static var TRIANGLES: GLenum { 0x0004 } + + @inlinable static var TRIANGLE_STRIP: GLenum { 0x0005 } + + @inlinable static var TRIANGLE_FAN: GLenum { 0x0006 } + + @inlinable static var ZERO: GLenum { 0 } + + @inlinable static var ONE: GLenum { 1 } + + @inlinable static var SRC_COLOR: GLenum { 0x0300 } + + @inlinable static var ONE_MINUS_SRC_COLOR: GLenum { 0x0301 } + + @inlinable static var SRC_ALPHA: GLenum { 0x0302 } + + @inlinable static var ONE_MINUS_SRC_ALPHA: GLenum { 0x0303 } + + @inlinable static var DST_ALPHA: GLenum { 0x0304 } + + @inlinable static var ONE_MINUS_DST_ALPHA: GLenum { 0x0305 } + + @inlinable static var DST_COLOR: GLenum { 0x0306 } + + @inlinable static var ONE_MINUS_DST_COLOR: GLenum { 0x0307 } + + @inlinable static var SRC_ALPHA_SATURATE: GLenum { 0x0308 } + + @inlinable static var FUNC_ADD: GLenum { 0x8006 } + + @inlinable static var BLEND_EQUATION: GLenum { 0x8009 } + + @inlinable static var BLEND_EQUATION_RGB: GLenum { 0x8009 } + + @inlinable static var BLEND_EQUATION_ALPHA: GLenum { 0x883D } + + @inlinable static var FUNC_SUBTRACT: GLenum { 0x800A } + + @inlinable static var FUNC_REVERSE_SUBTRACT: GLenum { 0x800B } + + @inlinable static var BLEND_DST_RGB: GLenum { 0x80C8 } + + @inlinable static var BLEND_SRC_RGB: GLenum { 0x80C9 } + + @inlinable static var BLEND_DST_ALPHA: GLenum { 0x80CA } + + @inlinable static var BLEND_SRC_ALPHA: GLenum { 0x80CB } + + @inlinable static var CONSTANT_COLOR: GLenum { 0x8001 } + + @inlinable static var ONE_MINUS_CONSTANT_COLOR: GLenum { 0x8002 } + + @inlinable static var CONSTANT_ALPHA: GLenum { 0x8003 } + + @inlinable static var ONE_MINUS_CONSTANT_ALPHA: GLenum { 0x8004 } + + @inlinable static var BLEND_COLOR: GLenum { 0x8005 } + + @inlinable static var ARRAY_BUFFER: GLenum { 0x8892 } + + @inlinable static var ELEMENT_ARRAY_BUFFER: GLenum { 0x8893 } + + @inlinable static var ARRAY_BUFFER_BINDING: GLenum { 0x8894 } + + @inlinable static var ELEMENT_ARRAY_BUFFER_BINDING: GLenum { 0x8895 } + + @inlinable static var STREAM_DRAW: GLenum { 0x88E0 } + + @inlinable static var STATIC_DRAW: GLenum { 0x88E4 } + + @inlinable static var DYNAMIC_DRAW: GLenum { 0x88E8 } + + @inlinable static var BUFFER_SIZE: GLenum { 0x8764 } + + @inlinable static var BUFFER_USAGE: GLenum { 0x8765 } + + @inlinable static var CURRENT_VERTEX_ATTRIB: GLenum { 0x8626 } + + @inlinable static var FRONT: GLenum { 0x0404 } + + @inlinable static var BACK: GLenum { 0x0405 } + + @inlinable static var FRONT_AND_BACK: GLenum { 0x0408 } + + @inlinable static var CULL_FACE: GLenum { 0x0B44 } + + @inlinable static var BLEND: GLenum { 0x0BE2 } + + @inlinable static var DITHER: GLenum { 0x0BD0 } + + @inlinable static var STENCIL_TEST: GLenum { 0x0B90 } + + @inlinable static var DEPTH_TEST: GLenum { 0x0B71 } + + @inlinable static var SCISSOR_TEST: GLenum { 0x0C11 } + + @inlinable static var POLYGON_OFFSET_FILL: GLenum { 0x8037 } + + @inlinable static var SAMPLE_ALPHA_TO_COVERAGE: GLenum { 0x809E } + + @inlinable static var SAMPLE_COVERAGE: GLenum { 0x80A0 } + + @inlinable static var NO_ERROR: GLenum { 0 } + + @inlinable static var INVALID_ENUM: GLenum { 0x0500 } + + @inlinable static var INVALID_VALUE: GLenum { 0x0501 } + + @inlinable static var INVALID_OPERATION: GLenum { 0x0502 } + + @inlinable static var OUT_OF_MEMORY: GLenum { 0x0505 } + + @inlinable static var CW: GLenum { 0x0900 } + + @inlinable static var CCW: GLenum { 0x0901 } + + @inlinable static var LINE_WIDTH: GLenum { 0x0B21 } + + @inlinable static var ALIASED_POINT_SIZE_RANGE: GLenum { 0x846D } + + @inlinable static var ALIASED_LINE_WIDTH_RANGE: GLenum { 0x846E } + + @inlinable static var CULL_FACE_MODE: GLenum { 0x0B45 } + + @inlinable static var FRONT_FACE: GLenum { 0x0B46 } + + @inlinable static var DEPTH_RANGE: GLenum { 0x0B70 } + + @inlinable static var DEPTH_WRITEMASK: GLenum { 0x0B72 } + + @inlinable static var DEPTH_CLEAR_VALUE: GLenum { 0x0B73 } + + @inlinable static var DEPTH_FUNC: GLenum { 0x0B74 } + + @inlinable static var STENCIL_CLEAR_VALUE: GLenum { 0x0B91 } + + @inlinable static var STENCIL_FUNC: GLenum { 0x0B92 } + + @inlinable static var STENCIL_FAIL: GLenum { 0x0B94 } + + @inlinable static var STENCIL_PASS_DEPTH_FAIL: GLenum { 0x0B95 } + + @inlinable static var STENCIL_PASS_DEPTH_PASS: GLenum { 0x0B96 } + + @inlinable static var STENCIL_REF: GLenum { 0x0B97 } + + @inlinable static var STENCIL_VALUE_MASK: GLenum { 0x0B93 } + + @inlinable static var STENCIL_WRITEMASK: GLenum { 0x0B98 } + + @inlinable static var STENCIL_BACK_FUNC: GLenum { 0x8800 } + + @inlinable static var STENCIL_BACK_FAIL: GLenum { 0x8801 } + + @inlinable static var STENCIL_BACK_PASS_DEPTH_FAIL: GLenum { 0x8802 } + + @inlinable static var STENCIL_BACK_PASS_DEPTH_PASS: GLenum { 0x8803 } + + @inlinable static var STENCIL_BACK_REF: GLenum { 0x8CA3 } + + @inlinable static var STENCIL_BACK_VALUE_MASK: GLenum { 0x8CA4 } + + @inlinable static var STENCIL_BACK_WRITEMASK: GLenum { 0x8CA5 } + + @inlinable static var VIEWPORT: GLenum { 0x0BA2 } + + @inlinable static var SCISSOR_BOX: GLenum { 0x0C10 } + + @inlinable static var COLOR_CLEAR_VALUE: GLenum { 0x0C22 } + + @inlinable static var COLOR_WRITEMASK: GLenum { 0x0C23 } + + @inlinable static var UNPACK_ALIGNMENT: GLenum { 0x0CF5 } + + @inlinable static var PACK_ALIGNMENT: GLenum { 0x0D05 } + + @inlinable static var MAX_TEXTURE_SIZE: GLenum { 0x0D33 } + + @inlinable static var MAX_VIEWPORT_DIMS: GLenum { 0x0D3A } + + @inlinable static var SUBPIXEL_BITS: GLenum { 0x0D50 } + + @inlinable static var RED_BITS: GLenum { 0x0D52 } + + @inlinable static var GREEN_BITS: GLenum { 0x0D53 } + + @inlinable static var BLUE_BITS: GLenum { 0x0D54 } + + @inlinable static var ALPHA_BITS: GLenum { 0x0D55 } + + @inlinable static var DEPTH_BITS: GLenum { 0x0D56 } + + @inlinable static var STENCIL_BITS: GLenum { 0x0D57 } + + @inlinable static var POLYGON_OFFSET_UNITS: GLenum { 0x2A00 } + + @inlinable static var POLYGON_OFFSET_FACTOR: GLenum { 0x8038 } + + @inlinable static var TEXTURE_BINDING_2D: GLenum { 0x8069 } + + @inlinable static var SAMPLE_BUFFERS: GLenum { 0x80A8 } + + @inlinable static var SAMPLES: GLenum { 0x80A9 } + + @inlinable static var SAMPLE_COVERAGE_VALUE: GLenum { 0x80AA } + + @inlinable static var SAMPLE_COVERAGE_INVERT: GLenum { 0x80AB } + + @inlinable static var COMPRESSED_TEXTURE_FORMATS: GLenum { 0x86A3 } + + @inlinable static var DONT_CARE: GLenum { 0x1100 } + + @inlinable static var FASTEST: GLenum { 0x1101 } + + @inlinable static var NICEST: GLenum { 0x1102 } + + @inlinable static var GENERATE_MIPMAP_HINT: GLenum { 0x8192 } + + @inlinable static var BYTE: GLenum { 0x1400 } + + @inlinable static var UNSIGNED_BYTE: GLenum { 0x1401 } + + @inlinable static var SHORT: GLenum { 0x1402 } + + @inlinable static var UNSIGNED_SHORT: GLenum { 0x1403 } + + @inlinable static var INT: GLenum { 0x1404 } + + @inlinable static var UNSIGNED_INT: GLenum { 0x1405 } + + @inlinable static var FLOAT: GLenum { 0x1406 } + + @inlinable static var DEPTH_COMPONENT: GLenum { 0x1902 } + + @inlinable static var ALPHA: GLenum { 0x1906 } + + @inlinable static var RGB: GLenum { 0x1907 } + + @inlinable static var RGBA: GLenum { 0x1908 } + + @inlinable static var LUMINANCE: GLenum { 0x1909 } + + @inlinable static var LUMINANCE_ALPHA: GLenum { 0x190A } + + @inlinable static var UNSIGNED_SHORT_4_4_4_4: GLenum { 0x8033 } + + @inlinable static var UNSIGNED_SHORT_5_5_5_1: GLenum { 0x8034 } + + @inlinable static var UNSIGNED_SHORT_5_6_5: GLenum { 0x8363 } + + @inlinable static var FRAGMENT_SHADER: GLenum { 0x8B30 } + + @inlinable static var VERTEX_SHADER: GLenum { 0x8B31 } + + @inlinable static var MAX_VERTEX_ATTRIBS: GLenum { 0x8869 } + + @inlinable static var MAX_VERTEX_UNIFORM_VECTORS: GLenum { 0x8DFB } + + @inlinable static var MAX_VARYING_VECTORS: GLenum { 0x8DFC } + + @inlinable static var MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4D } + + @inlinable static var MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4C } + + @inlinable static var MAX_TEXTURE_IMAGE_UNITS: GLenum { 0x8872 } + + @inlinable static var MAX_FRAGMENT_UNIFORM_VECTORS: GLenum { 0x8DFD } + + @inlinable static var SHADER_TYPE: GLenum { 0x8B4F } + + @inlinable static var DELETE_STATUS: GLenum { 0x8B80 } + + @inlinable static var LINK_STATUS: GLenum { 0x8B82 } + + @inlinable static var VALIDATE_STATUS: GLenum { 0x8B83 } + + @inlinable static var ATTACHED_SHADERS: GLenum { 0x8B85 } + + @inlinable static var ACTIVE_UNIFORMS: GLenum { 0x8B86 } + + @inlinable static var ACTIVE_ATTRIBUTES: GLenum { 0x8B89 } + + @inlinable static var SHADING_LANGUAGE_VERSION: GLenum { 0x8B8C } + + @inlinable static var CURRENT_PROGRAM: GLenum { 0x8B8D } + + @inlinable static var NEVER: GLenum { 0x0200 } + + @inlinable static var LESS: GLenum { 0x0201 } + + @inlinable static var EQUAL: GLenum { 0x0202 } + + @inlinable static var LEQUAL: GLenum { 0x0203 } + + @inlinable static var GREATER: GLenum { 0x0204 } + + @inlinable static var NOTEQUAL: GLenum { 0x0205 } + + @inlinable static var GEQUAL: GLenum { 0x0206 } + + @inlinable static var ALWAYS: GLenum { 0x0207 } + + @inlinable static var KEEP: GLenum { 0x1E00 } + + @inlinable static var REPLACE: GLenum { 0x1E01 } + + @inlinable static var INCR: GLenum { 0x1E02 } + + @inlinable static var DECR: GLenum { 0x1E03 } + + @inlinable static var INVERT: GLenum { 0x150A } + + @inlinable static var INCR_WRAP: GLenum { 0x8507 } + + @inlinable static var DECR_WRAP: GLenum { 0x8508 } + + @inlinable static var VENDOR: GLenum { 0x1F00 } + + @inlinable static var RENDERER: GLenum { 0x1F01 } + + @inlinable static var VERSION: GLenum { 0x1F02 } + + @inlinable static var NEAREST: GLenum { 0x2600 } + + @inlinable static var LINEAR: GLenum { 0x2601 } + + @inlinable static var NEAREST_MIPMAP_NEAREST: GLenum { 0x2700 } + + @inlinable static var LINEAR_MIPMAP_NEAREST: GLenum { 0x2701 } + + @inlinable static var NEAREST_MIPMAP_LINEAR: GLenum { 0x2702 } + + @inlinable static var LINEAR_MIPMAP_LINEAR: GLenum { 0x2703 } + + @inlinable static var TEXTURE_MAG_FILTER: GLenum { 0x2800 } + + @inlinable static var TEXTURE_MIN_FILTER: GLenum { 0x2801 } + + @inlinable static var TEXTURE_WRAP_S: GLenum { 0x2802 } + + @inlinable static var TEXTURE_WRAP_T: GLenum { 0x2803 } + + @inlinable static var TEXTURE_2D: GLenum { 0x0DE1 } + + @inlinable static var TEXTURE: GLenum { 0x1702 } + + @inlinable static var TEXTURE_CUBE_MAP: GLenum { 0x8513 } + + @inlinable static var TEXTURE_BINDING_CUBE_MAP: GLenum { 0x8514 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_X: GLenum { 0x8515 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum { 0x8516 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum { 0x8517 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum { 0x8518 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum { 0x8519 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum { 0x851A } + + @inlinable static var MAX_CUBE_MAP_TEXTURE_SIZE: GLenum { 0x851C } + + @inlinable static var TEXTURE0: GLenum { 0x84C0 } + + @inlinable static var TEXTURE1: GLenum { 0x84C1 } + + @inlinable static var TEXTURE2: GLenum { 0x84C2 } + + @inlinable static var TEXTURE3: GLenum { 0x84C3 } + + @inlinable static var TEXTURE4: GLenum { 0x84C4 } + + @inlinable static var TEXTURE5: GLenum { 0x84C5 } + + @inlinable static var TEXTURE6: GLenum { 0x84C6 } + + @inlinable static var TEXTURE7: GLenum { 0x84C7 } + + @inlinable static var TEXTURE8: GLenum { 0x84C8 } + + @inlinable static var TEXTURE9: GLenum { 0x84C9 } + + @inlinable static var TEXTURE10: GLenum { 0x84CA } + + @inlinable static var TEXTURE11: GLenum { 0x84CB } + + @inlinable static var TEXTURE12: GLenum { 0x84CC } + + @inlinable static var TEXTURE13: GLenum { 0x84CD } + + @inlinable static var TEXTURE14: GLenum { 0x84CE } + + @inlinable static var TEXTURE15: GLenum { 0x84CF } + + @inlinable static var TEXTURE16: GLenum { 0x84D0 } + + @inlinable static var TEXTURE17: GLenum { 0x84D1 } + + @inlinable static var TEXTURE18: GLenum { 0x84D2 } + + @inlinable static var TEXTURE19: GLenum { 0x84D3 } + + @inlinable static var TEXTURE20: GLenum { 0x84D4 } + + @inlinable static var TEXTURE21: GLenum { 0x84D5 } + + @inlinable static var TEXTURE22: GLenum { 0x84D6 } + + @inlinable static var TEXTURE23: GLenum { 0x84D7 } + + @inlinable static var TEXTURE24: GLenum { 0x84D8 } + + @inlinable static var TEXTURE25: GLenum { 0x84D9 } + + @inlinable static var TEXTURE26: GLenum { 0x84DA } + + @inlinable static var TEXTURE27: GLenum { 0x84DB } + + @inlinable static var TEXTURE28: GLenum { 0x84DC } + + @inlinable static var TEXTURE29: GLenum { 0x84DD } + + @inlinable static var TEXTURE30: GLenum { 0x84DE } + + @inlinable static var TEXTURE31: GLenum { 0x84DF } + + @inlinable static var ACTIVE_TEXTURE: GLenum { 0x84E0 } + + @inlinable static var REPEAT: GLenum { 0x2901 } + + @inlinable static var CLAMP_TO_EDGE: GLenum { 0x812F } + + @inlinable static var MIRRORED_REPEAT: GLenum { 0x8370 } + + @inlinable static var FLOAT_VEC2: GLenum { 0x8B50 } + + @inlinable static var FLOAT_VEC3: GLenum { 0x8B51 } + + @inlinable static var FLOAT_VEC4: GLenum { 0x8B52 } + + @inlinable static var INT_VEC2: GLenum { 0x8B53 } + + @inlinable static var INT_VEC3: GLenum { 0x8B54 } + + @inlinable static var INT_VEC4: GLenum { 0x8B55 } + + @inlinable static var BOOL: GLenum { 0x8B56 } + + @inlinable static var BOOL_VEC2: GLenum { 0x8B57 } + + @inlinable static var BOOL_VEC3: GLenum { 0x8B58 } + + @inlinable static var BOOL_VEC4: GLenum { 0x8B59 } + + @inlinable static var FLOAT_MAT2: GLenum { 0x8B5A } + + @inlinable static var FLOAT_MAT3: GLenum { 0x8B5B } + + @inlinable static var FLOAT_MAT4: GLenum { 0x8B5C } + + @inlinable static var SAMPLER_2D: GLenum { 0x8B5E } + + @inlinable static var SAMPLER_CUBE: GLenum { 0x8B60 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_ENABLED: GLenum { 0x8622 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_SIZE: GLenum { 0x8623 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_STRIDE: GLenum { 0x8624 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_TYPE: GLenum { 0x8625 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum { 0x886A } + + @inlinable static var VERTEX_ATTRIB_ARRAY_POINTER: GLenum { 0x8645 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum { 0x889F } + + @inlinable static var IMPLEMENTATION_COLOR_READ_TYPE: GLenum { 0x8B9A } + + @inlinable static var IMPLEMENTATION_COLOR_READ_FORMAT: GLenum { 0x8B9B } + + @inlinable static var COMPILE_STATUS: GLenum { 0x8B81 } + + @inlinable static var LOW_FLOAT: GLenum { 0x8DF0 } + + @inlinable static var MEDIUM_FLOAT: GLenum { 0x8DF1 } + + @inlinable static var HIGH_FLOAT: GLenum { 0x8DF2 } + + @inlinable static var LOW_INT: GLenum { 0x8DF3 } + + @inlinable static var MEDIUM_INT: GLenum { 0x8DF4 } + + @inlinable static var HIGH_INT: GLenum { 0x8DF5 } + + @inlinable static var FRAMEBUFFER: GLenum { 0x8D40 } + + @inlinable static var RENDERBUFFER: GLenum { 0x8D41 } + + @inlinable static var RGBA4: GLenum { 0x8056 } + + @inlinable static var RGB5_A1: GLenum { 0x8057 } + + @inlinable static var RGB565: GLenum { 0x8D62 } + + @inlinable static var DEPTH_COMPONENT16: GLenum { 0x81A5 } + + @inlinable static var STENCIL_INDEX8: GLenum { 0x8D48 } + + @inlinable static var DEPTH_STENCIL: GLenum { 0x84F9 } + + @inlinable static var RENDERBUFFER_WIDTH: GLenum { 0x8D42 } + + @inlinable static var RENDERBUFFER_HEIGHT: GLenum { 0x8D43 } + + @inlinable static var RENDERBUFFER_INTERNAL_FORMAT: GLenum { 0x8D44 } + + @inlinable static var RENDERBUFFER_RED_SIZE: GLenum { 0x8D50 } + + @inlinable static var RENDERBUFFER_GREEN_SIZE: GLenum { 0x8D51 } + + @inlinable static var RENDERBUFFER_BLUE_SIZE: GLenum { 0x8D52 } + + @inlinable static var RENDERBUFFER_ALPHA_SIZE: GLenum { 0x8D53 } + + @inlinable static var RENDERBUFFER_DEPTH_SIZE: GLenum { 0x8D54 } + + @inlinable static var RENDERBUFFER_STENCIL_SIZE: GLenum { 0x8D55 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum { 0x8CD0 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum { 0x8CD1 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum { 0x8CD2 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum { 0x8CD3 } + + @inlinable static var COLOR_ATTACHMENT0: GLenum { 0x8CE0 } + + @inlinable static var DEPTH_ATTACHMENT: GLenum { 0x8D00 } + + @inlinable static var STENCIL_ATTACHMENT: GLenum { 0x8D20 } + + @inlinable static var DEPTH_STENCIL_ATTACHMENT: GLenum { 0x821A } + + @inlinable static var NONE: GLenum { 0 } + + @inlinable static var FRAMEBUFFER_COMPLETE: GLenum { 0x8CD5 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum { 0x8CD6 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum { 0x8CD7 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum { 0x8CD9 } + + @inlinable static var FRAMEBUFFER_UNSUPPORTED: GLenum { 0x8CDD } + + @inlinable static var FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } + + @inlinable static var RENDERBUFFER_BINDING: GLenum { 0x8CA7 } + + @inlinable static var MAX_RENDERBUFFER_SIZE: GLenum { 0x84E8 } + + @inlinable static var INVALID_FRAMEBUFFER_OPERATION: GLenum { 0x0506 } + + @inlinable static var UNPACK_FLIP_Y_WEBGL: GLenum { 0x9240 } + + @inlinable static var UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum { 0x9241 } + + @inlinable static var CONTEXT_LOST_WEBGL: GLenum { 0x9242 } + + @inlinable static var UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum { 0x9243 } + + @inlinable static var BROWSER_DEFAULT_WEBGL: GLenum { 0x9244 } + + @inlinable var canvas: HTMLCanvasElement_or_OffscreenCanvas { ReadonlyAttribute[Strings.canvas, in: jsObject] } + + @inlinable var drawingBufferWidth: GLsizei { ReadonlyAttribute[Strings.drawingBufferWidth, in: jsObject] } + + @inlinable var drawingBufferHeight: GLsizei { ReadonlyAttribute[Strings.drawingBufferHeight, in: jsObject] } + + @inlinable func getContextAttributes() -> WebGLContextAttributes? { + let this = jsObject + return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func isContextLost() -> Bool { + let this = jsObject + return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getSupportedExtensions() -> [String]? { + let this = jsObject + return this[Strings.getSupportedExtensions].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getExtension(name: String) -> JSObject? { + let this = jsObject + return this[Strings.getExtension].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable func activeTexture(texture: GLenum) { + let this = jsObject + _ = this[Strings.activeTexture].function!(this: this, arguments: [texture.jsValue]) + } + + @inlinable func attachShader(program: WebGLProgram, shader: WebGLShader) { + let this = jsObject + _ = this[Strings.attachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) + } + + @inlinable func bindAttribLocation(program: WebGLProgram, index: GLuint, name: String) { + let this = jsObject + _ = this[Strings.bindAttribLocation].function!(this: this, arguments: [program.jsValue, index.jsValue, name.jsValue]) + } + + @inlinable func bindBuffer(target: GLenum, buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.bindBuffer].function!(this: this, arguments: [target.jsValue, buffer.jsValue]) + } + + @inlinable func bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer?) { + let this = jsObject + _ = this[Strings.bindFramebuffer].function!(this: this, arguments: [target.jsValue, framebuffer.jsValue]) + } + + @inlinable func bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.bindRenderbuffer].function!(this: this, arguments: [target.jsValue, renderbuffer.jsValue]) + } + + @inlinable func bindTexture(target: GLenum, texture: WebGLTexture?) { + let this = jsObject + _ = this[Strings.bindTexture].function!(this: this, arguments: [target.jsValue, texture.jsValue]) + } + + @inlinable func blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { + let this = jsObject + _ = this[Strings.blendColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func blendEquation(mode: GLenum) { + let this = jsObject + _ = this[Strings.blendEquation].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) { + let this = jsObject + _ = this[Strings.blendEquationSeparate].function!(this: this, arguments: [modeRGB.jsValue, modeAlpha.jsValue]) + } + + @inlinable func blendFunc(sfactor: GLenum, dfactor: GLenum) { + let this = jsObject + _ = this[Strings.blendFunc].function!(this: this, arguments: [sfactor.jsValue, dfactor.jsValue]) + } + + @inlinable func blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) { + let this = jsObject + _ = this[Strings.blendFuncSeparate].function!(this: this, arguments: [srcRGB.jsValue, dstRGB.jsValue, srcAlpha.jsValue, dstAlpha.jsValue]) + } + + @inlinable func checkFramebufferStatus(target: GLenum) -> GLenum { + let this = jsObject + return this[Strings.checkFramebufferStatus].function!(this: this, arguments: [target.jsValue]).fromJSValue()! + } + + @inlinable func clear(mask: GLbitfield) { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: [mask.jsValue]) + } + + @inlinable func clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { + let this = jsObject + _ = this[Strings.clearColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func clearDepth(depth: GLclampf) { + let this = jsObject + _ = this[Strings.clearDepth].function!(this: this, arguments: [depth.jsValue]) + } + + @inlinable func clearStencil(s: GLint) { + let this = jsObject + _ = this[Strings.clearStencil].function!(this: this, arguments: [s.jsValue]) + } + + @inlinable func colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) { + let this = jsObject + _ = this[Strings.colorMask].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func compileShader(shader: WebGLShader) { + let this = jsObject + _ = this[Strings.compileShader].function!(this: this, arguments: [shader.jsValue]) + } + + @inlinable func copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = x.jsValue + let _arg4 = y.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = border.jsValue + let this = jsObject + _ = this[Strings.copyTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let _arg6 = width.jsValue + let _arg7 = height.jsValue + let this = jsObject + _ = this[Strings.copyTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func createBuffer() -> WebGLBuffer? { + let this = jsObject + return this[Strings.createBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createFramebuffer() -> WebGLFramebuffer? { + let this = jsObject + return this[Strings.createFramebuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createProgram() -> WebGLProgram? { + let this = jsObject + return this[Strings.createProgram].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createRenderbuffer() -> WebGLRenderbuffer? { + let this = jsObject + return this[Strings.createRenderbuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createShader(type: GLenum) -> WebGLShader? { + let this = jsObject + return this[Strings.createShader].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @inlinable func createTexture() -> WebGLTexture? { + let this = jsObject + return this[Strings.createTexture].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func cullFace(mode: GLenum) { + let this = jsObject + _ = this[Strings.cullFace].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func deleteBuffer(buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.deleteBuffer].function!(this: this, arguments: [buffer.jsValue]) + } + + @inlinable func deleteFramebuffer(framebuffer: WebGLFramebuffer?) { + let this = jsObject + _ = this[Strings.deleteFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]) + } + + @inlinable func deleteProgram(program: WebGLProgram?) { + let this = jsObject + _ = this[Strings.deleteProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.deleteRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]) + } + + @inlinable func deleteShader(shader: WebGLShader?) { + let this = jsObject + _ = this[Strings.deleteShader].function!(this: this, arguments: [shader.jsValue]) + } + + @inlinable func deleteTexture(texture: WebGLTexture?) { + let this = jsObject + _ = this[Strings.deleteTexture].function!(this: this, arguments: [texture.jsValue]) + } + + @inlinable func depthFunc(func: GLenum) { + let this = jsObject + _ = this[Strings.depthFunc].function!(this: this, arguments: [`func`.jsValue]) + } + + @inlinable func depthMask(flag: GLboolean) { + let this = jsObject + _ = this[Strings.depthMask].function!(this: this, arguments: [flag.jsValue]) + } + + @inlinable func depthRange(zNear: GLclampf, zFar: GLclampf) { + let this = jsObject + _ = this[Strings.depthRange].function!(this: this, arguments: [zNear.jsValue, zFar.jsValue]) + } + + @inlinable func detachShader(program: WebGLProgram, shader: WebGLShader) { + let this = jsObject + _ = this[Strings.detachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) + } + + @inlinable func disable(cap: GLenum) { + let this = jsObject + _ = this[Strings.disable].function!(this: this, arguments: [cap.jsValue]) + } + + @inlinable func disableVertexAttribArray(index: GLuint) { + let this = jsObject + _ = this[Strings.disableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable func drawArrays(mode: GLenum, first: GLint, count: GLsizei) { + let this = jsObject + _ = this[Strings.drawArrays].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue]) + } + + @inlinable func drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) { + let this = jsObject + _ = this[Strings.drawElements].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue]) + } + + @inlinable func enable(cap: GLenum) { + let this = jsObject + _ = this[Strings.enable].function!(this: this, arguments: [cap.jsValue]) + } + + @inlinable func enableVertexAttribArray(index: GLuint) { + let this = jsObject + _ = this[Strings.enableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable func finish() { + let this = jsObject + _ = this[Strings.finish].function!(this: this, arguments: []) + } + + @inlinable func flush() { + let this = jsObject + _ = this[Strings.flush].function!(this: this, arguments: []) + } + + @inlinable func framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.framebufferRenderbuffer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, renderbuffertarget.jsValue, renderbuffer.jsValue]) + } + + @inlinable func framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture?, level: GLint) { + let this = jsObject + _ = this[Strings.framebufferTexture2D].function!(this: this, arguments: [target.jsValue, attachment.jsValue, textarget.jsValue, texture.jsValue, level.jsValue]) + } + + @inlinable func frontFace(mode: GLenum) { + let this = jsObject + _ = this[Strings.frontFace].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func generateMipmap(target: GLenum) { + let this = jsObject + _ = this[Strings.generateMipmap].function!(this: this, arguments: [target.jsValue]) + } + + @inlinable func getActiveAttrib(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getActiveAttrib].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniform(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getActiveUniform].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getAttachedShaders(program: WebGLProgram) -> [WebGLShader]? { + let this = jsObject + return this[Strings.getAttachedShaders].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func getAttribLocation(program: WebGLProgram, name: String) -> GLint { + let this = jsObject + return this[Strings.getAttribLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func getBufferParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getBufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getParameter(pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getParameter].function!(this: this, arguments: [pname.jsValue]).fromJSValue()! + } + + @inlinable func getError() -> GLenum { + let this = jsObject + return this[Strings.getError].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getFramebufferAttachmentParameter].function!(this: this, arguments: [target.jsValue, attachment.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getProgramParameter(program: WebGLProgram, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getProgramParameter].function!(this: this, arguments: [program.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getProgramInfoLog(program: WebGLProgram) -> String? { + let this = jsObject + return this[Strings.getProgramInfoLog].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func getRenderbufferParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getRenderbufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getShaderParameter(shader: WebGLShader, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getShaderParameter].function!(this: this, arguments: [shader.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) -> WebGLShaderPrecisionFormat? { + let this = jsObject + return this[Strings.getShaderPrecisionFormat].function!(this: this, arguments: [shadertype.jsValue, precisiontype.jsValue]).fromJSValue()! + } + + @inlinable func getShaderInfoLog(shader: WebGLShader) -> String? { + let this = jsObject + return this[Strings.getShaderInfoLog].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func getShaderSource(shader: WebGLShader) -> String? { + let this = jsObject + return this[Strings.getShaderSource].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func getTexParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getTexParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getUniform(program: WebGLProgram, location: WebGLUniformLocation) -> JSValue { + let this = jsObject + return this[Strings.getUniform].function!(this: this, arguments: [program.jsValue, location.jsValue]).fromJSValue()! + } + + @inlinable func getUniformLocation(program: WebGLProgram, name: String) -> WebGLUniformLocation? { + let this = jsObject + return this[Strings.getUniformLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func getVertexAttrib(index: GLuint, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getVertexAttrib].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getVertexAttribOffset(index: GLuint, pname: GLenum) -> GLintptr { + let this = jsObject + return this[Strings.getVertexAttribOffset].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func hint(target: GLenum, mode: GLenum) { + let this = jsObject + _ = this[Strings.hint].function!(this: this, arguments: [target.jsValue, mode.jsValue]) + } + + @inlinable func isBuffer(buffer: WebGLBuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isBuffer].function!(this: this, arguments: [buffer.jsValue]).fromJSValue()! + } + + @inlinable func isEnabled(cap: GLenum) -> GLboolean { + let this = jsObject + return this[Strings.isEnabled].function!(this: this, arguments: [cap.jsValue]).fromJSValue()! + } + + @inlinable func isFramebuffer(framebuffer: WebGLFramebuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]).fromJSValue()! + } + + @inlinable func isProgram(program: WebGLProgram?) -> GLboolean { + let this = jsObject + return this[Strings.isProgram].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func isRenderbuffer(renderbuffer: WebGLRenderbuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]).fromJSValue()! + } + + @inlinable func isShader(shader: WebGLShader?) -> GLboolean { + let this = jsObject + return this[Strings.isShader].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func isTexture(texture: WebGLTexture?) -> GLboolean { + let this = jsObject + return this[Strings.isTexture].function!(this: this, arguments: [texture.jsValue]).fromJSValue()! + } + + @inlinable func lineWidth(width: GLfloat) { + let this = jsObject + _ = this[Strings.lineWidth].function!(this: this, arguments: [width.jsValue]) + } + + @inlinable func linkProgram(program: WebGLProgram) { + let this = jsObject + _ = this[Strings.linkProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func pixelStorei(pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.pixelStorei].function!(this: this, arguments: [pname.jsValue, param.jsValue]) + } + + @inlinable func polygonOffset(factor: GLfloat, units: GLfloat) { + let this = jsObject + _ = this[Strings.polygonOffset].function!(this: this, arguments: [factor.jsValue, units.jsValue]) + } + + @inlinable func renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.renderbufferStorage].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func sampleCoverage(value: GLclampf, invert: GLboolean) { + let this = jsObject + _ = this[Strings.sampleCoverage].function!(this: this, arguments: [value.jsValue, invert.jsValue]) + } + + @inlinable func scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.scissor].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func shaderSource(shader: WebGLShader, source: String) { + let this = jsObject + _ = this[Strings.shaderSource].function!(this: this, arguments: [shader.jsValue, source.jsValue]) + } + + @inlinable func stencilFunc(func: GLenum, ref: GLint, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilFunc].function!(this: this, arguments: [`func`.jsValue, ref.jsValue, mask.jsValue]) + } + + @inlinable func stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilFuncSeparate].function!(this: this, arguments: [face.jsValue, `func`.jsValue, ref.jsValue, mask.jsValue]) + } + + @inlinable func stencilMask(mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilMask].function!(this: this, arguments: [mask.jsValue]) + } + + @inlinable func stencilMaskSeparate(face: GLenum, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilMaskSeparate].function!(this: this, arguments: [face.jsValue, mask.jsValue]) + } + + @inlinable func stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) { + let this = jsObject + _ = this[Strings.stencilOp].function!(this: this, arguments: [fail.jsValue, zfail.jsValue, zpass.jsValue]) + } + + @inlinable func stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) { + let this = jsObject + _ = this[Strings.stencilOpSeparate].function!(this: this, arguments: [face.jsValue, fail.jsValue, zfail.jsValue, zpass.jsValue]) + } + + @inlinable func texParameterf(target: GLenum, pname: GLenum, param: GLfloat) { + let this = jsObject + _ = this[Strings.texParameterf].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func texParameteri(target: GLenum, pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.texParameteri].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func uniform1f(location: WebGLUniformLocation?, x: GLfloat) { + let this = jsObject + _ = this[Strings.uniform1f].function!(this: this, arguments: [location.jsValue, x.jsValue]) + } + + @inlinable func uniform2f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat) { + let this = jsObject + _ = this[Strings.uniform2f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func uniform3f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat) { + let this = jsObject + _ = this[Strings.uniform3f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func uniform4f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { + let this = jsObject + _ = this[Strings.uniform4f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func uniform1i(location: WebGLUniformLocation?, x: GLint) { + let this = jsObject + _ = this[Strings.uniform1i].function!(this: this, arguments: [location.jsValue, x.jsValue]) + } + + @inlinable func uniform2i(location: WebGLUniformLocation?, x: GLint, y: GLint) { + let this = jsObject + _ = this[Strings.uniform2i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func uniform3i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint) { + let this = jsObject + _ = this[Strings.uniform3i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func uniform4i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint, w: GLint) { + let this = jsObject + _ = this[Strings.uniform4i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func useProgram(program: WebGLProgram?) { + let this = jsObject + _ = this[Strings.useProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func validateProgram(program: WebGLProgram) { + let this = jsObject + _ = this[Strings.validateProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func vertexAttrib1f(index: GLuint, x: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib1f].function!(this: this, arguments: [index.jsValue, x.jsValue]) + } + + @inlinable func vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib2f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib3f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib4f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttrib1fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib1fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib2fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib2fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib3fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib3fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib4fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib4fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) { + let _arg0 = index.jsValue + let _arg1 = size.jsValue + let _arg2 = type.jsValue + let _arg3 = normalized.jsValue + let _arg4 = stride.jsValue + let _arg5 = offset.jsValue + let this = jsObject + _ = this[Strings.vertexAttribPointer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.viewport].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift new file mode 100644 index 00000000..fe1977ac --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift @@ -0,0 +1,165 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGLRenderingContextOverloads: JSBridgedClass {} +public extension WebGLRenderingContextOverloads { + @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) + } + + @inlinable func bufferData(target: GLenum, data: BufferSource?, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, data.jsValue, usage.jsValue]) + } + + @inlinable func bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, offset.jsValue, data.jsValue]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = data.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = data.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = pixels.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = format.jsValue + let _arg4 = type.jsValue + let _arg5 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } + + @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } + + @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLShader.swift b/Sources/DOMKit/WebIDL/WebGLShader.swift new file mode 100644 index 00000000..97f2b719 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLShader.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLShader: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift new file mode 100644 index 00000000..67725e58 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift @@ -0,0 +1,26 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLShaderPrecisionFormat: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLShaderPrecisionFormat].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _rangeMin = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMin) + _rangeMax = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMax) + _precision = ReadonlyAttribute(jsObject: jsObject, name: Strings.precision) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var rangeMin: GLint + + @ReadonlyAttribute + public var rangeMax: GLint + + @ReadonlyAttribute + public var precision: GLint +} diff --git a/Sources/DOMKit/WebIDL/WebGLTexture.swift b/Sources/DOMKit/WebIDL/WebGLTexture.swift new file mode 100644 index 00000000..ee7ad6c9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLTexture.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLTexture: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift new file mode 100644 index 00000000..cf833a95 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLUniformLocation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} From 798546b40a5423d0836f88a89157cc944f413744 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:19:04 +0100 Subject: [PATCH 09/18] Add `webgl2` IDL spec and generated code --- Sources/DOMKit/WebIDL/Uint32List.swift | 46 + .../WebIDL/WebGL2RenderingContext.swift | 14 + .../WebIDL/WebGL2RenderingContextBase.swift | 1162 +++++++++++++++++ .../WebGL2RenderingContextOverloads.swift | 317 +++++ Sources/DOMKit/WebIDL/WebGLQuery.swift | 12 + Sources/DOMKit/WebIDL/WebGLSampler.swift | 12 + Sources/DOMKit/WebIDL/WebGLSync.swift | 12 + .../WebIDL/WebGLTransformFeedback.swift | 12 + .../WebIDL/WebGLVertexArrayObject.swift | 12 + 9 files changed, 1599 insertions(+) create mode 100644 Sources/DOMKit/WebIDL/Uint32List.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLQuery.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLSampler.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLSync.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift diff --git a/Sources/DOMKit/WebIDL/Uint32List.swift b/Sources/DOMKit/WebIDL/Uint32List.swift new file mode 100644 index 00000000..e8a01699 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Uint32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Uint32List: ConvertibleToJSValue {} +extension Uint32Array: Any_Uint32List {} +extension Array: Any_Uint32List where Element == GLuint {} + +public enum Uint32List: JSValueCompatible, Any_Uint32List { + case uint32Array(Uint32Array) + case seq_of_GLuint([GLuint]) + + var uint32Array: Uint32Array? { + switch self { + case let .uint32Array(uint32Array): return uint32Array + default: return nil + } + } + + var seq_of_GLuint: [GLuint]? { + switch self { + case let .seq_of_GLuint(seq_of_GLuint): return seq_of_GLuint + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let uint32Array: Uint32Array = value.fromJSValue() { + return .uint32Array(uint32Array) + } + if let seq_of_GLuint: [GLuint] = value.fromJSValue() { + return .seq_of_GLuint(seq_of_GLuint) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .uint32Array(uint32Array): + return uint32Array.jsValue + case let .seq_of_GLuint(seq_of_GLuint): + return seq_of_GLuint.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift new file mode 100644 index 00000000..3ee19c40 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGL2RenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGL2RenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift new file mode 100644 index 00000000..2071c82e --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift @@ -0,0 +1,1162 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGL2RenderingContextBase: JSBridgedClass {} +public extension WebGL2RenderingContextBase { + @inlinable static var READ_BUFFER: GLenum { 0x0C02 } + + @inlinable static var UNPACK_ROW_LENGTH: GLenum { 0x0CF2 } + + @inlinable static var UNPACK_SKIP_ROWS: GLenum { 0x0CF3 } + + @inlinable static var UNPACK_SKIP_PIXELS: GLenum { 0x0CF4 } + + @inlinable static var PACK_ROW_LENGTH: GLenum { 0x0D02 } + + @inlinable static var PACK_SKIP_ROWS: GLenum { 0x0D03 } + + @inlinable static var PACK_SKIP_PIXELS: GLenum { 0x0D04 } + + @inlinable static var COLOR: GLenum { 0x1800 } + + @inlinable static var DEPTH: GLenum { 0x1801 } + + @inlinable static var STENCIL: GLenum { 0x1802 } + + @inlinable static var RED: GLenum { 0x1903 } + + @inlinable static var RGB8: GLenum { 0x8051 } + + @inlinable static var RGBA8: GLenum { 0x8058 } + + @inlinable static var RGB10_A2: GLenum { 0x8059 } + + @inlinable static var TEXTURE_BINDING_3D: GLenum { 0x806A } + + @inlinable static var UNPACK_SKIP_IMAGES: GLenum { 0x806D } + + @inlinable static var UNPACK_IMAGE_HEIGHT: GLenum { 0x806E } + + @inlinable static var TEXTURE_3D: GLenum { 0x806F } + + @inlinable static var TEXTURE_WRAP_R: GLenum { 0x8072 } + + @inlinable static var MAX_3D_TEXTURE_SIZE: GLenum { 0x8073 } + + @inlinable static var UNSIGNED_INT_2_10_10_10_REV: GLenum { 0x8368 } + + @inlinable static var MAX_ELEMENTS_VERTICES: GLenum { 0x80E8 } + + @inlinable static var MAX_ELEMENTS_INDICES: GLenum { 0x80E9 } + + @inlinable static var TEXTURE_MIN_LOD: GLenum { 0x813A } + + @inlinable static var TEXTURE_MAX_LOD: GLenum { 0x813B } + + @inlinable static var TEXTURE_BASE_LEVEL: GLenum { 0x813C } + + @inlinable static var TEXTURE_MAX_LEVEL: GLenum { 0x813D } + + @inlinable static var MIN: GLenum { 0x8007 } + + @inlinable static var MAX: GLenum { 0x8008 } + + @inlinable static var DEPTH_COMPONENT24: GLenum { 0x81A6 } + + @inlinable static var MAX_TEXTURE_LOD_BIAS: GLenum { 0x84FD } + + @inlinable static var TEXTURE_COMPARE_MODE: GLenum { 0x884C } + + @inlinable static var TEXTURE_COMPARE_FUNC: GLenum { 0x884D } + + @inlinable static var CURRENT_QUERY: GLenum { 0x8865 } + + @inlinable static var QUERY_RESULT: GLenum { 0x8866 } + + @inlinable static var QUERY_RESULT_AVAILABLE: GLenum { 0x8867 } + + @inlinable static var STREAM_READ: GLenum { 0x88E1 } + + @inlinable static var STREAM_COPY: GLenum { 0x88E2 } + + @inlinable static var STATIC_READ: GLenum { 0x88E5 } + + @inlinable static var STATIC_COPY: GLenum { 0x88E6 } + + @inlinable static var DYNAMIC_READ: GLenum { 0x88E9 } + + @inlinable static var DYNAMIC_COPY: GLenum { 0x88EA } + + @inlinable static var MAX_DRAW_BUFFERS: GLenum { 0x8824 } + + @inlinable static var DRAW_BUFFER0: GLenum { 0x8825 } + + @inlinable static var DRAW_BUFFER1: GLenum { 0x8826 } + + @inlinable static var DRAW_BUFFER2: GLenum { 0x8827 } + + @inlinable static var DRAW_BUFFER3: GLenum { 0x8828 } + + @inlinable static var DRAW_BUFFER4: GLenum { 0x8829 } + + @inlinable static var DRAW_BUFFER5: GLenum { 0x882A } + + @inlinable static var DRAW_BUFFER6: GLenum { 0x882B } + + @inlinable static var DRAW_BUFFER7: GLenum { 0x882C } + + @inlinable static var DRAW_BUFFER8: GLenum { 0x882D } + + @inlinable static var DRAW_BUFFER9: GLenum { 0x882E } + + @inlinable static var DRAW_BUFFER10: GLenum { 0x882F } + + @inlinable static var DRAW_BUFFER11: GLenum { 0x8830 } + + @inlinable static var DRAW_BUFFER12: GLenum { 0x8831 } + + @inlinable static var DRAW_BUFFER13: GLenum { 0x8832 } + + @inlinable static var DRAW_BUFFER14: GLenum { 0x8833 } + + @inlinable static var DRAW_BUFFER15: GLenum { 0x8834 } + + @inlinable static var MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8B49 } + + @inlinable static var MAX_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8B4A } + + @inlinable static var SAMPLER_3D: GLenum { 0x8B5F } + + @inlinable static var SAMPLER_2D_SHADOW: GLenum { 0x8B62 } + + @inlinable static var FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum { 0x8B8B } + + @inlinable static var PIXEL_PACK_BUFFER: GLenum { 0x88EB } + + @inlinable static var PIXEL_UNPACK_BUFFER: GLenum { 0x88EC } + + @inlinable static var PIXEL_PACK_BUFFER_BINDING: GLenum { 0x88ED } + + @inlinable static var PIXEL_UNPACK_BUFFER_BINDING: GLenum { 0x88EF } + + @inlinable static var FLOAT_MAT2x3: GLenum { 0x8B65 } + + @inlinable static var FLOAT_MAT2x4: GLenum { 0x8B66 } + + @inlinable static var FLOAT_MAT3x2: GLenum { 0x8B67 } + + @inlinable static var FLOAT_MAT3x4: GLenum { 0x8B68 } + + @inlinable static var FLOAT_MAT4x2: GLenum { 0x8B69 } + + @inlinable static var FLOAT_MAT4x3: GLenum { 0x8B6A } + + @inlinable static var SRGB: GLenum { 0x8C40 } + + @inlinable static var SRGB8: GLenum { 0x8C41 } + + @inlinable static var SRGB8_ALPHA8: GLenum { 0x8C43 } + + @inlinable static var COMPARE_REF_TO_TEXTURE: GLenum { 0x884E } + + @inlinable static var RGBA32F: GLenum { 0x8814 } + + @inlinable static var RGB32F: GLenum { 0x8815 } + + @inlinable static var RGBA16F: GLenum { 0x881A } + + @inlinable static var RGB16F: GLenum { 0x881B } + + @inlinable static var VERTEX_ATTRIB_ARRAY_INTEGER: GLenum { 0x88FD } + + @inlinable static var MAX_ARRAY_TEXTURE_LAYERS: GLenum { 0x88FF } + + @inlinable static var MIN_PROGRAM_TEXEL_OFFSET: GLenum { 0x8904 } + + @inlinable static var MAX_PROGRAM_TEXEL_OFFSET: GLenum { 0x8905 } + + @inlinable static var MAX_VARYING_COMPONENTS: GLenum { 0x8B4B } + + @inlinable static var TEXTURE_2D_ARRAY: GLenum { 0x8C1A } + + @inlinable static var TEXTURE_BINDING_2D_ARRAY: GLenum { 0x8C1D } + + @inlinable static var R11F_G11F_B10F: GLenum { 0x8C3A } + + @inlinable static var UNSIGNED_INT_10F_11F_11F_REV: GLenum { 0x8C3B } + + @inlinable static var RGB9_E5: GLenum { 0x8C3D } + + @inlinable static var UNSIGNED_INT_5_9_9_9_REV: GLenum { 0x8C3E } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum { 0x8C7F } + + @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum { 0x8C80 } + + @inlinable static var TRANSFORM_FEEDBACK_VARYINGS: GLenum { 0x8C83 } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_START: GLenum { 0x8C84 } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum { 0x8C85 } + + @inlinable static var TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum { 0x8C88 } + + @inlinable static var RASTERIZER_DISCARD: GLenum { 0x8C89 } + + @inlinable static var MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum { 0x8C8A } + + @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum { 0x8C8B } + + @inlinable static var INTERLEAVED_ATTRIBS: GLenum { 0x8C8C } + + @inlinable static var SEPARATE_ATTRIBS: GLenum { 0x8C8D } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER: GLenum { 0x8C8E } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum { 0x8C8F } + + @inlinable static var RGBA32UI: GLenum { 0x8D70 } + + @inlinable static var RGB32UI: GLenum { 0x8D71 } + + @inlinable static var RGBA16UI: GLenum { 0x8D76 } + + @inlinable static var RGB16UI: GLenum { 0x8D77 } + + @inlinable static var RGBA8UI: GLenum { 0x8D7C } + + @inlinable static var RGB8UI: GLenum { 0x8D7D } + + @inlinable static var RGBA32I: GLenum { 0x8D82 } + + @inlinable static var RGB32I: GLenum { 0x8D83 } + + @inlinable static var RGBA16I: GLenum { 0x8D88 } + + @inlinable static var RGB16I: GLenum { 0x8D89 } + + @inlinable static var RGBA8I: GLenum { 0x8D8E } + + @inlinable static var RGB8I: GLenum { 0x8D8F } + + @inlinable static var RED_INTEGER: GLenum { 0x8D94 } + + @inlinable static var RGB_INTEGER: GLenum { 0x8D98 } + + @inlinable static var RGBA_INTEGER: GLenum { 0x8D99 } + + @inlinable static var SAMPLER_2D_ARRAY: GLenum { 0x8DC1 } + + @inlinable static var SAMPLER_2D_ARRAY_SHADOW: GLenum { 0x8DC4 } + + @inlinable static var SAMPLER_CUBE_SHADOW: GLenum { 0x8DC5 } + + @inlinable static var UNSIGNED_INT_VEC2: GLenum { 0x8DC6 } + + @inlinable static var UNSIGNED_INT_VEC3: GLenum { 0x8DC7 } + + @inlinable static var UNSIGNED_INT_VEC4: GLenum { 0x8DC8 } + + @inlinable static var INT_SAMPLER_2D: GLenum { 0x8DCA } + + @inlinable static var INT_SAMPLER_3D: GLenum { 0x8DCB } + + @inlinable static var INT_SAMPLER_CUBE: GLenum { 0x8DCC } + + @inlinable static var INT_SAMPLER_2D_ARRAY: GLenum { 0x8DCF } + + @inlinable static var UNSIGNED_INT_SAMPLER_2D: GLenum { 0x8DD2 } + + @inlinable static var UNSIGNED_INT_SAMPLER_3D: GLenum { 0x8DD3 } + + @inlinable static var UNSIGNED_INT_SAMPLER_CUBE: GLenum { 0x8DD4 } + + @inlinable static var UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum { 0x8DD7 } + + @inlinable static var DEPTH_COMPONENT32F: GLenum { 0x8CAC } + + @inlinable static var DEPTH32F_STENCIL8: GLenum { 0x8CAD } + + @inlinable static var FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum { 0x8DAD } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum { 0x8210 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum { 0x8211 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum { 0x8212 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum { 0x8213 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum { 0x8214 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum { 0x8215 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum { 0x8216 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum { 0x8217 } + + @inlinable static var FRAMEBUFFER_DEFAULT: GLenum { 0x8218 } + + @inlinable static var UNSIGNED_INT_24_8: GLenum { 0x84FA } + + @inlinable static var DEPTH24_STENCIL8: GLenum { 0x88F0 } + + @inlinable static var UNSIGNED_NORMALIZED: GLenum { 0x8C17 } + + @inlinable static var DRAW_FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } + + @inlinable static var READ_FRAMEBUFFER: GLenum { 0x8CA8 } + + @inlinable static var DRAW_FRAMEBUFFER: GLenum { 0x8CA9 } + + @inlinable static var READ_FRAMEBUFFER_BINDING: GLenum { 0x8CAA } + + @inlinable static var RENDERBUFFER_SAMPLES: GLenum { 0x8CAB } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum { 0x8CD4 } + + @inlinable static var MAX_COLOR_ATTACHMENTS: GLenum { 0x8CDF } + + @inlinable static var COLOR_ATTACHMENT1: GLenum { 0x8CE1 } + + @inlinable static var COLOR_ATTACHMENT2: GLenum { 0x8CE2 } + + @inlinable static var COLOR_ATTACHMENT3: GLenum { 0x8CE3 } + + @inlinable static var COLOR_ATTACHMENT4: GLenum { 0x8CE4 } + + @inlinable static var COLOR_ATTACHMENT5: GLenum { 0x8CE5 } + + @inlinable static var COLOR_ATTACHMENT6: GLenum { 0x8CE6 } + + @inlinable static var COLOR_ATTACHMENT7: GLenum { 0x8CE7 } + + @inlinable static var COLOR_ATTACHMENT8: GLenum { 0x8CE8 } + + @inlinable static var COLOR_ATTACHMENT9: GLenum { 0x8CE9 } + + @inlinable static var COLOR_ATTACHMENT10: GLenum { 0x8CEA } + + @inlinable static var COLOR_ATTACHMENT11: GLenum { 0x8CEB } + + @inlinable static var COLOR_ATTACHMENT12: GLenum { 0x8CEC } + + @inlinable static var COLOR_ATTACHMENT13: GLenum { 0x8CED } + + @inlinable static var COLOR_ATTACHMENT14: GLenum { 0x8CEE } + + @inlinable static var COLOR_ATTACHMENT15: GLenum { 0x8CEF } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum { 0x8D56 } + + @inlinable static var MAX_SAMPLES: GLenum { 0x8D57 } + + @inlinable static var HALF_FLOAT: GLenum { 0x140B } + + @inlinable static var RG: GLenum { 0x8227 } + + @inlinable static var RG_INTEGER: GLenum { 0x8228 } + + @inlinable static var R8: GLenum { 0x8229 } + + @inlinable static var RG8: GLenum { 0x822B } + + @inlinable static var R16F: GLenum { 0x822D } + + @inlinable static var R32F: GLenum { 0x822E } + + @inlinable static var RG16F: GLenum { 0x822F } + + @inlinable static var RG32F: GLenum { 0x8230 } + + @inlinable static var R8I: GLenum { 0x8231 } + + @inlinable static var R8UI: GLenum { 0x8232 } + + @inlinable static var R16I: GLenum { 0x8233 } + + @inlinable static var R16UI: GLenum { 0x8234 } + + @inlinable static var R32I: GLenum { 0x8235 } + + @inlinable static var R32UI: GLenum { 0x8236 } + + @inlinable static var RG8I: GLenum { 0x8237 } + + @inlinable static var RG8UI: GLenum { 0x8238 } + + @inlinable static var RG16I: GLenum { 0x8239 } + + @inlinable static var RG16UI: GLenum { 0x823A } + + @inlinable static var RG32I: GLenum { 0x823B } + + @inlinable static var RG32UI: GLenum { 0x823C } + + @inlinable static var VERTEX_ARRAY_BINDING: GLenum { 0x85B5 } + + @inlinable static var R8_SNORM: GLenum { 0x8F94 } + + @inlinable static var RG8_SNORM: GLenum { 0x8F95 } + + @inlinable static var RGB8_SNORM: GLenum { 0x8F96 } + + @inlinable static var RGBA8_SNORM: GLenum { 0x8F97 } + + @inlinable static var SIGNED_NORMALIZED: GLenum { 0x8F9C } + + @inlinable static var COPY_READ_BUFFER: GLenum { 0x8F36 } + + @inlinable static var COPY_WRITE_BUFFER: GLenum { 0x8F37 } + + @inlinable static var COPY_READ_BUFFER_BINDING: GLenum { 0x8F36 } + + @inlinable static var COPY_WRITE_BUFFER_BINDING: GLenum { 0x8F37 } + + @inlinable static var UNIFORM_BUFFER: GLenum { 0x8A11 } + + @inlinable static var UNIFORM_BUFFER_BINDING: GLenum { 0x8A28 } + + @inlinable static var UNIFORM_BUFFER_START: GLenum { 0x8A29 } + + @inlinable static var UNIFORM_BUFFER_SIZE: GLenum { 0x8A2A } + + @inlinable static var MAX_VERTEX_UNIFORM_BLOCKS: GLenum { 0x8A2B } + + @inlinable static var MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum { 0x8A2D } + + @inlinable static var MAX_COMBINED_UNIFORM_BLOCKS: GLenum { 0x8A2E } + + @inlinable static var MAX_UNIFORM_BUFFER_BINDINGS: GLenum { 0x8A2F } + + @inlinable static var MAX_UNIFORM_BLOCK_SIZE: GLenum { 0x8A30 } + + @inlinable static var MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8A31 } + + @inlinable static var MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8A33 } + + @inlinable static var UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum { 0x8A34 } + + @inlinable static var ACTIVE_UNIFORM_BLOCKS: GLenum { 0x8A36 } + + @inlinable static var UNIFORM_TYPE: GLenum { 0x8A37 } + + @inlinable static var UNIFORM_SIZE: GLenum { 0x8A38 } + + @inlinable static var UNIFORM_BLOCK_INDEX: GLenum { 0x8A3A } + + @inlinable static var UNIFORM_OFFSET: GLenum { 0x8A3B } + + @inlinable static var UNIFORM_ARRAY_STRIDE: GLenum { 0x8A3C } + + @inlinable static var UNIFORM_MATRIX_STRIDE: GLenum { 0x8A3D } + + @inlinable static var UNIFORM_IS_ROW_MAJOR: GLenum { 0x8A3E } + + @inlinable static var UNIFORM_BLOCK_BINDING: GLenum { 0x8A3F } + + @inlinable static var UNIFORM_BLOCK_DATA_SIZE: GLenum { 0x8A40 } + + @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum { 0x8A42 } + + @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum { 0x8A43 } + + @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum { 0x8A44 } + + @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum { 0x8A46 } + + @inlinable static var INVALID_INDEX: GLenum { 0xFFFF_FFFF } + + @inlinable static var MAX_VERTEX_OUTPUT_COMPONENTS: GLenum { 0x9122 } + + @inlinable static var MAX_FRAGMENT_INPUT_COMPONENTS: GLenum { 0x9125 } + + @inlinable static var MAX_SERVER_WAIT_TIMEOUT: GLenum { 0x9111 } + + @inlinable static var OBJECT_TYPE: GLenum { 0x9112 } + + @inlinable static var SYNC_CONDITION: GLenum { 0x9113 } + + @inlinable static var SYNC_STATUS: GLenum { 0x9114 } + + @inlinable static var SYNC_FLAGS: GLenum { 0x9115 } + + @inlinable static var SYNC_FENCE: GLenum { 0x9116 } + + @inlinable static var SYNC_GPU_COMMANDS_COMPLETE: GLenum { 0x9117 } + + @inlinable static var UNSIGNALED: GLenum { 0x9118 } + + @inlinable static var SIGNALED: GLenum { 0x9119 } + + @inlinable static var ALREADY_SIGNALED: GLenum { 0x911A } + + @inlinable static var TIMEOUT_EXPIRED: GLenum { 0x911B } + + @inlinable static var CONDITION_SATISFIED: GLenum { 0x911C } + + @inlinable static var WAIT_FAILED: GLenum { 0x911D } + + @inlinable static var SYNC_FLUSH_COMMANDS_BIT: GLenum { 0x0000_0001 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum { 0x88FE } + + @inlinable static var ANY_SAMPLES_PASSED: GLenum { 0x8C2F } + + @inlinable static var ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum { 0x8D6A } + + @inlinable static var SAMPLER_BINDING: GLenum { 0x8919 } + + @inlinable static var RGB10_A2UI: GLenum { 0x906F } + + @inlinable static var INT_2_10_10_10_REV: GLenum { 0x8D9F } + + @inlinable static var TRANSFORM_FEEDBACK: GLenum { 0x8E22 } + + @inlinable static var TRANSFORM_FEEDBACK_PAUSED: GLenum { 0x8E23 } + + @inlinable static var TRANSFORM_FEEDBACK_ACTIVE: GLenum { 0x8E24 } + + @inlinable static var TRANSFORM_FEEDBACK_BINDING: GLenum { 0x8E25 } + + @inlinable static var TEXTURE_IMMUTABLE_FORMAT: GLenum { 0x912F } + + @inlinable static var MAX_ELEMENT_INDEX: GLenum { 0x8D6B } + + @inlinable static var TEXTURE_IMMUTABLE_LEVELS: GLenum { 0x82DF } + + @inlinable static var TIMEOUT_IGNORED: GLint64 { -1 } + + @inlinable static var MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum { 0x9247 } + + @inlinable func copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr) { + let this = jsObject + _ = this[Strings.copyBufferSubData].function!(this: this, arguments: [readTarget.jsValue, writeTarget.jsValue, readOffset.jsValue, writeOffset.jsValue, size.jsValue]) + } + + @inlinable func getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset: GLuint? = nil, length: GLuint? = nil) { + let this = jsObject + _ = this[Strings.getBufferSubData].function!(this: this, arguments: [target.jsValue, srcByteOffset.jsValue, dstBuffer.jsValue, dstOffset?.jsValue ?? .undefined, length?.jsValue ?? .undefined]) + } + + @inlinable func blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum) { + let _arg0 = srcX0.jsValue + let _arg1 = srcY0.jsValue + let _arg2 = srcX1.jsValue + let _arg3 = srcY1.jsValue + let _arg4 = dstX0.jsValue + let _arg5 = dstY0.jsValue + let _arg6 = dstX1.jsValue + let _arg7 = dstY1.jsValue + let _arg8 = mask.jsValue + let _arg9 = filter.jsValue + let this = jsObject + _ = this[Strings.blitFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture?, level: GLint, layer: GLint) { + let this = jsObject + _ = this[Strings.framebufferTextureLayer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, texture.jsValue, level.jsValue, layer.jsValue]) + } + + @inlinable func invalidateFramebuffer(target: GLenum, attachments: [GLenum]) { + let this = jsObject + _ = this[Strings.invalidateFramebuffer].function!(this: this, arguments: [target.jsValue, attachments.jsValue]) + } + + @inlinable func invalidateSubFramebuffer(target: GLenum, attachments: [GLenum], x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = attachments.jsValue + let _arg2 = x.jsValue + let _arg3 = y.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let this = jsObject + _ = this[Strings.invalidateSubFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func readBuffer(src: GLenum) { + let this = jsObject + _ = this[Strings.readBuffer].function!(this: this, arguments: [src.jsValue]) + } + + @inlinable func getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getInternalformatParameter].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.renderbufferStorageMultisample].function!(this: this, arguments: [target.jsValue, samples.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.texStorage2D].function!(this: this, arguments: [target.jsValue, levels.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = levels.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let this = jsObject + _ = this[Strings.texStorage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = source.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = srcData.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = srcData.jsValue + let _arg10 = srcOffset.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = type.jsValue + let _arg10 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = type.jsValue + let _arg10 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView?, srcOffset: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = type.jsValue + let _arg10 = srcData.jsValue + let _arg11 = srcOffset?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) + } + + @inlinable func copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = x.jsValue + let _arg6 = y.jsValue + let _arg7 = width.jsValue + let _arg8 = height.jsValue + let this = jsObject + _ = this[Strings.copyTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = imageSize.jsValue + let _arg8 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = srcData.jsValue + let _arg8 = srcOffset?.jsValue ?? .undefined + let _arg9 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = imageSize.jsValue + let _arg10 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = srcData.jsValue + let _arg10 = srcOffset?.jsValue ?? .undefined + let _arg11 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) + } + + @inlinable func getFragDataLocation(program: WebGLProgram, name: String) -> GLint { + let this = jsObject + return this[Strings.getFragDataLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func uniform1ui(location: WebGLUniformLocation?, v0: GLuint) { + let this = jsObject + _ = this[Strings.uniform1ui].function!(this: this, arguments: [location.jsValue, v0.jsValue]) + } + + @inlinable func uniform2ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint) { + let this = jsObject + _ = this[Strings.uniform2ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue]) + } + + @inlinable func uniform3ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint) { + let this = jsObject + _ = this[Strings.uniform3ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue]) + } + + @inlinable func uniform4ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint) { + let this = jsObject + _ = this[Strings.uniform4ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue, v3.jsValue]) + } + + @inlinable func uniform1uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform1uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform2uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform2uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform3uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform3uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform4uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform4uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix3x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix3x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix4x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix4x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix2x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix2x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix4x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix4x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix2x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix2x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix3x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix3x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint) { + let this = jsObject + _ = this[Strings.vertexAttribI4i].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttribI4iv(index: GLuint, values: Int32List) { + let this = jsObject + _ = this[Strings.vertexAttribI4iv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) { + let this = jsObject + _ = this[Strings.vertexAttribI4ui].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttribI4uiv(index: GLuint, values: Uint32List) { + let this = jsObject + _ = this[Strings.vertexAttribI4uiv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr) { + let this = jsObject + _ = this[Strings.vertexAttribIPointer].function!(this: this, arguments: [index.jsValue, size.jsValue, type.jsValue, stride.jsValue, offset.jsValue]) + } + + @inlinable func vertexAttribDivisor(index: GLuint, divisor: GLuint) { + let this = jsObject + _ = this[Strings.vertexAttribDivisor].function!(this: this, arguments: [index.jsValue, divisor.jsValue]) + } + + @inlinable func drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei) { + let this = jsObject + _ = this[Strings.drawArraysInstanced].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue, instanceCount.jsValue]) + } + + @inlinable func drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei) { + let this = jsObject + _ = this[Strings.drawElementsInstanced].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue, instanceCount.jsValue]) + } + + @inlinable func drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr) { + let _arg0 = mode.jsValue + let _arg1 = start.jsValue + let _arg2 = end.jsValue + let _arg3 = count.jsValue + let _arg4 = type.jsValue + let _arg5 = offset.jsValue + let this = jsObject + _ = this[Strings.drawRangeElements].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func drawBuffers(buffers: [GLenum]) { + let this = jsObject + _ = this[Strings.drawBuffers].function!(this: this, arguments: [buffers.jsValue]) + } + + @inlinable func clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset: GLuint? = nil) { + let this = jsObject + _ = this[Strings.clearBufferfv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) + } + + @inlinable func clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset: GLuint? = nil) { + let this = jsObject + _ = this[Strings.clearBufferiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) + } + + @inlinable func clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset: GLuint? = nil) { + let this = jsObject + _ = this[Strings.clearBufferuiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) + } + + @inlinable func clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint) { + let this = jsObject + _ = this[Strings.clearBufferfi].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, depth.jsValue, stencil.jsValue]) + } + + @inlinable func createQuery() -> WebGLQuery? { + let this = jsObject + return this[Strings.createQuery].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteQuery(query: WebGLQuery?) { + let this = jsObject + _ = this[Strings.deleteQuery].function!(this: this, arguments: [query.jsValue]) + } + + @inlinable func isQuery(query: WebGLQuery?) -> GLboolean { + let this = jsObject + return this[Strings.isQuery].function!(this: this, arguments: [query.jsValue]).fromJSValue()! + } + + @inlinable func beginQuery(target: GLenum, query: WebGLQuery) { + let this = jsObject + _ = this[Strings.beginQuery].function!(this: this, arguments: [target.jsValue, query.jsValue]) + } + + @inlinable func endQuery(target: GLenum) { + let this = jsObject + _ = this[Strings.endQuery].function!(this: this, arguments: [target.jsValue]) + } + + @inlinable func getQuery(target: GLenum, pname: GLenum) -> WebGLQuery? { + let this = jsObject + return this[Strings.getQuery].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getQueryParameter(query: WebGLQuery, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getQueryParameter].function!(this: this, arguments: [query.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func createSampler() -> WebGLSampler? { + let this = jsObject + return this[Strings.createSampler].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteSampler(sampler: WebGLSampler?) { + let this = jsObject + _ = this[Strings.deleteSampler].function!(this: this, arguments: [sampler.jsValue]) + } + + @inlinable func isSampler(sampler: WebGLSampler?) -> GLboolean { + let this = jsObject + return this[Strings.isSampler].function!(this: this, arguments: [sampler.jsValue]).fromJSValue()! + } + + @inlinable func bindSampler(unit: GLuint, sampler: WebGLSampler?) { + let this = jsObject + _ = this[Strings.bindSampler].function!(this: this, arguments: [unit.jsValue, sampler.jsValue]) + } + + @inlinable func samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.samplerParameteri].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat) { + let this = jsObject + _ = this[Strings.samplerParameterf].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func getSamplerParameter(sampler: WebGLSampler, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getSamplerParameter].function!(this: this, arguments: [sampler.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func fenceSync(condition: GLenum, flags: GLbitfield) -> WebGLSync? { + let this = jsObject + return this[Strings.fenceSync].function!(this: this, arguments: [condition.jsValue, flags.jsValue]).fromJSValue()! + } + + @inlinable func isSync(sync: WebGLSync?) -> GLboolean { + let this = jsObject + return this[Strings.isSync].function!(this: this, arguments: [sync.jsValue]).fromJSValue()! + } + + @inlinable func deleteSync(sync: WebGLSync?) { + let this = jsObject + _ = this[Strings.deleteSync].function!(this: this, arguments: [sync.jsValue]) + } + + @inlinable func clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64) -> GLenum { + let this = jsObject + return this[Strings.clientWaitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]).fromJSValue()! + } + + @inlinable func waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64) { + let this = jsObject + _ = this[Strings.waitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]) + } + + @inlinable func getSyncParameter(sync: WebGLSync, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getSyncParameter].function!(this: this, arguments: [sync.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func createTransformFeedback() -> WebGLTransformFeedback? { + let this = jsObject + return this[Strings.createTransformFeedback].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteTransformFeedback(tf: WebGLTransformFeedback?) { + let this = jsObject + _ = this[Strings.deleteTransformFeedback].function!(this: this, arguments: [tf.jsValue]) + } + + @inlinable func isTransformFeedback(tf: WebGLTransformFeedback?) -> GLboolean { + let this = jsObject + return this[Strings.isTransformFeedback].function!(this: this, arguments: [tf.jsValue]).fromJSValue()! + } + + @inlinable func bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback?) { + let this = jsObject + _ = this[Strings.bindTransformFeedback].function!(this: this, arguments: [target.jsValue, tf.jsValue]) + } + + @inlinable func beginTransformFeedback(primitiveMode: GLenum) { + let this = jsObject + _ = this[Strings.beginTransformFeedback].function!(this: this, arguments: [primitiveMode.jsValue]) + } + + @inlinable func endTransformFeedback() { + let this = jsObject + _ = this[Strings.endTransformFeedback].function!(this: this, arguments: []) + } + + @inlinable func transformFeedbackVaryings(program: WebGLProgram, varyings: [String], bufferMode: GLenum) { + let this = jsObject + _ = this[Strings.transformFeedbackVaryings].function!(this: this, arguments: [program.jsValue, varyings.jsValue, bufferMode.jsValue]) + } + + @inlinable func getTransformFeedbackVarying(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getTransformFeedbackVarying].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func pauseTransformFeedback() { + let this = jsObject + _ = this[Strings.pauseTransformFeedback].function!(this: this, arguments: []) + } + + @inlinable func resumeTransformFeedback() { + let this = jsObject + _ = this[Strings.resumeTransformFeedback].function!(this: this, arguments: []) + } + + @inlinable func bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.bindBufferBase].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue]) + } + + @inlinable func bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer?, offset: GLintptr, size: GLsizeiptr) { + let this = jsObject + _ = this[Strings.bindBufferRange].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue, offset.jsValue, size.jsValue]) + } + + @inlinable func getIndexedParameter(target: GLenum, index: GLuint) -> JSValue { + let this = jsObject + return this[Strings.getIndexedParameter].function!(this: this, arguments: [target.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getUniformIndices(program: WebGLProgram, uniformNames: [String]) -> [GLuint]? { + let this = jsObject + return this[Strings.getUniformIndices].function!(this: this, arguments: [program.jsValue, uniformNames.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniforms(program: WebGLProgram, uniformIndices: [GLuint], pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getActiveUniforms].function!(this: this, arguments: [program.jsValue, uniformIndices.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getUniformBlockIndex(program: WebGLProgram, uniformBlockName: String) -> GLuint { + let this = jsObject + return this[Strings.getUniformBlockIndex].function!(this: this, arguments: [program.jsValue, uniformBlockName.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getActiveUniformBlockParameter].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint) -> String? { + let this = jsObject + return this[Strings.getActiveUniformBlockName].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue]).fromJSValue()! + } + + @inlinable func uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint) { + let this = jsObject + _ = this[Strings.uniformBlockBinding].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, uniformBlockBinding.jsValue]) + } + + @inlinable func createVertexArray() -> WebGLVertexArrayObject? { + let this = jsObject + return this[Strings.createVertexArray].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteVertexArray(vertexArray: WebGLVertexArrayObject?) { + let this = jsObject + _ = this[Strings.deleteVertexArray].function!(this: this, arguments: [vertexArray.jsValue]) + } + + @inlinable func isVertexArray(vertexArray: WebGLVertexArrayObject?) -> GLboolean { + let this = jsObject + return this[Strings.isVertexArray].function!(this: this, arguments: [vertexArray.jsValue]).fromJSValue()! + } + + @inlinable func bindVertexArray(array: WebGLVertexArrayObject?) { + let this = jsObject + _ = this[Strings.bindVertexArray].function!(this: this, arguments: [array.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift new file mode 100644 index 00000000..659213d5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift @@ -0,0 +1,317 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGL2RenderingContextOverloads: JSBridgedClass {} +public extension WebGL2RenderingContextOverloads { + @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) + } + + @inlinable func bufferData(target: GLenum, srcData: BufferSource?, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue]) + } + + @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue]) + } + + @inlinable func bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length: GLuint? = nil) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) + } + + @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length: GLuint? = nil) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = format.jsValue + let _arg4 = type.jsValue + let _arg5 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = srcData.jsValue + let _arg9 = srcOffset.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = srcData.jsValue + let _arg9 = srcOffset.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = imageSize.jsValue + let _arg7 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = srcData.jsValue + let _arg7 = srcOffset?.jsValue ?? .undefined + let _arg8 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = imageSize.jsValue + let _arg8 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = srcData.jsValue + let _arg8 = srcOffset?.jsValue ?? .undefined + let _arg9 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func uniform1fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform2fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform3fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform4fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform1iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform2iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform3iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform4iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView?) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = dstData.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = offset.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = dstData.jsValue + let _arg7 = dstOffset.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLQuery.swift b/Sources/DOMKit/WebIDL/WebGLQuery.swift new file mode 100644 index 00000000..901356e4 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLQuery.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLQuery: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLQuery].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLSampler.swift b/Sources/DOMKit/WebIDL/WebGLSampler.swift new file mode 100644 index 00000000..1b6c94e3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLSampler.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLSampler: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSampler].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLSync.swift b/Sources/DOMKit/WebIDL/WebGLSync.swift new file mode 100644 index 00000000..38271eb1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLSync.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLSync: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSync].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift b/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift new file mode 100644 index 00000000..981c92d1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLTransformFeedback: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTransformFeedback].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift b/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift new file mode 100644 index 00000000..2ca909eb --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLVertexArrayObject: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLVertexArrayObject].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} From 6692ffbf2bf285f48314fa420b08668eb99633b1 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 19:35:13 +0100 Subject: [PATCH 10/18] Add WebGL demo to `DOMKitDemo` --- Sources/DOMKit/RenderingContext.swift | 4 +- Sources/DOMKit/WebIDL/BitrateMode.swift | 22 +++++ Sources/DOMKit/WebIDL/BlobEvent.swift | 24 +++++ Sources/DOMKit/WebIDL/BlobEventInit.swift | 25 +++++ .../Bool_or_MediaTrackConstraints.swift | 46 +++++++++ .../Bool_or_ScrollIntoViewOptions.swift | 46 +++++++++ Sources/DOMKit/WebIDL/BoxQuadOptions.swift | 25 +++++ Sources/DOMKit/WebIDL/CSSBoxType.swift | 24 +++++ Sources/DOMKit/WebIDL/CSSPseudoElement.swift | 29 ++++++ .../WebIDL/CSSPseudoElement_or_Element.swift | 46 +++++++++ .../CameraDevicePermissionDescriptor.swift | 20 ++++ Sources/DOMKit/WebIDL/CaretPosition.swift | 27 ++++++ Sources/DOMKit/WebIDL/ConstrainBoolean.swift | 46 +++++++++ .../WebIDL/ConstrainBooleanParameters.swift | 25 +++++ .../DOMKit/WebIDL/ConstrainDOMString.swift | 60 ++++++++++++ .../WebIDL/ConstrainDOMStringParameters.swift | 25 +++++ Sources/DOMKit/WebIDL/ConstrainDouble.swift | 46 +++++++++ .../DOMKit/WebIDL/ConstrainDoubleRange.swift | 25 +++++ Sources/DOMKit/WebIDL/ConstrainULong.swift | 46 +++++++++ .../DOMKit/WebIDL/ConstrainULongRange.swift | 25 +++++ .../WebIDL/ConvertCoordinateOptions.swift | 25 +++++ .../WebIDL/DevicePermissionDescriptor.swift | 20 ++++ Sources/DOMKit/WebIDL/DoubleRange.swift | 25 +++++ Sources/DOMKit/WebIDL/GeometryNode.swift | 74 +++++++++++++++ Sources/DOMKit/WebIDL/GeometryUtils.swift | 27 ++++++ Sources/DOMKit/WebIDL/InputDeviceInfo.swift | 17 ++++ Sources/DOMKit/WebIDL/IsVisibleOptions.swift | 16 ++++ Sources/DOMKit/WebIDL/MediaDeviceInfo.swift | 35 +++++++ Sources/DOMKit/WebIDL/MediaDeviceKind.swift | 23 +++++ Sources/DOMKit/WebIDL/MediaDevices.swift | 45 +++++++++ Sources/DOMKit/WebIDL/MediaQueryList.swift | 28 ++++++ .../DOMKit/WebIDL/MediaQueryListEvent.swift | 24 +++++ .../WebIDL/MediaQueryListEventInit.swift | 25 +++++ Sources/DOMKit/WebIDL/MediaRecorder.swift | 94 +++++++++++++++++++ .../WebIDL/MediaRecorderErrorEvent.swift | 20 ++++ .../WebIDL/MediaRecorderErrorEventInit.swift | 20 ++++ .../DOMKit/WebIDL/MediaRecorderOptions.swift | 40 ++++++++ Sources/DOMKit/WebIDL/MediaStream.swift | 75 +++++++++++++++ .../WebIDL/MediaStreamConstraints.swift | 25 +++++ Sources/DOMKit/WebIDL/MediaStreamTrack.swift | 85 +++++++++++++++++ .../DOMKit/WebIDL/MediaStreamTrackEvent.swift | 20 ++++ .../WebIDL/MediaStreamTrackEventInit.swift | 20 ++++ .../DOMKit/WebIDL/MediaStreamTrackState.swift | 22 +++++ .../WebIDL/MediaTrackCapabilities.swift | 90 ++++++++++++++++++ .../WebIDL/MediaTrackConstraintSet.swift | 90 ++++++++++++++++++ .../DOMKit/WebIDL/MediaTrackConstraints.swift | 20 ++++ .../DOMKit/WebIDL/MediaTrackSettings.swift | 90 ++++++++++++++++++ .../MediaTrackSupportedConstraints.swift | 90 ++++++++++++++++++ .../DOMKit/WebIDL/OverconstrainedError.swift | 20 ++++ Sources/DOMKit/WebIDL/RecordingState.swift | 23 +++++ Sources/DOMKit/WebIDL/Screen.swift | 38 ++++++++ Sources/DOMKit/WebIDL/ScrollBehavior.swift | 22 +++++ .../DOMKit/WebIDL/ScrollIntoViewOptions.swift | 25 +++++ .../DOMKit/WebIDL/ScrollLogicalPosition.swift | 24 +++++ Sources/DOMKit/WebIDL/ScrollOptions.swift | 20 ++++ Sources/DOMKit/WebIDL/ScrollToOptions.swift | 25 +++++ Sources/DOMKit/WebIDL/ULongRange.swift | 25 +++++ .../DOMKit/WebIDL/VideoFacingModeEnum.swift | 24 +++++ .../DOMKit/WebIDL/VideoResizeModeEnum.swift | 22 +++++ Sources/DOMKitDemo/WebGLDemo.swift | 2 +- parse-idl/parse-all.js | 2 + 61 files changed, 2090 insertions(+), 3 deletions(-) create mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift create mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift create mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift create mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift create mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift create mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift create mode 100644 Sources/DOMKit/WebIDL/Screen.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift create mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift diff --git a/Sources/DOMKit/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift index 6e493665..13ef65df 100644 --- a/Sources/DOMKit/RenderingContext.swift +++ b/Sources/DOMKit/RenderingContext.swift @@ -7,8 +7,8 @@ public protocol Any_RenderingContext: ConvertibleToJSValue {} extension CanvasRenderingContext2D: Any_RenderingContext {} // extension GPUCanvasContext: Any_RenderingContext {} extension ImageBitmapRenderingContext: Any_RenderingContext {} -extension WebGL2RenderingContext: Any_RenderingContext {} -extension WebGLRenderingContext: Any_RenderingContext {} +// extension WebGL2RenderingContext: Any_RenderingContext {} +// extension WebGLRenderingContext: Any_RenderingContext {} public enum RenderingContext: JSValueCompatible, Any_RenderingContext { case canvasRenderingContext2D(CanvasRenderingContext2D) diff --git a/Sources/DOMKit/WebIDL/BitrateMode.swift b/Sources/DOMKit/WebIDL/BitrateMode.swift new file mode 100644 index 00000000..b0001ae7 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BitrateMode.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum BitrateMode: JSString, JSValueCompatible { + case constant = "constant" + case variable = "variable" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/BlobEvent.swift b/Sources/DOMKit/WebIDL/BlobEvent.swift new file mode 100644 index 00000000..2f09f782 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BlobEvent.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class BlobEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BlobEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _timecode = ReadonlyAttribute(jsObject: jsObject, name: Strings.timecode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: BlobEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var data: Blob + + @ReadonlyAttribute + public var timecode: DOMHighResTimeStamp +} diff --git a/Sources/DOMKit/WebIDL/BlobEventInit.swift b/Sources/DOMKit/WebIDL/BlobEventInit.swift new file mode 100644 index 00000000..adb0fd32 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BlobEventInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class BlobEventInit: BridgedDictionary { + public convenience init(data: Blob, timecode: DOMHighResTimeStamp) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.timecode] = timecode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _timecode = ReadWriteAttribute(jsObject: object, name: Strings.timecode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: Blob + + @ReadWriteAttribute + public var timecode: DOMHighResTimeStamp +} diff --git a/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift new file mode 100644 index 00000000..1c9c71e0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Bool_or_MediaTrackConstraints: ConvertibleToJSValue {} +extension Bool: Any_Bool_or_MediaTrackConstraints {} +extension MediaTrackConstraints: Any_Bool_or_MediaTrackConstraints {} + +public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaTrackConstraints { + case bool(Bool) + case mediaTrackConstraints(MediaTrackConstraints) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var mediaTrackConstraints: MediaTrackConstraints? { + switch self { + case let .mediaTrackConstraints(mediaTrackConstraints): return mediaTrackConstraints + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let mediaTrackConstraints: MediaTrackConstraints = value.fromJSValue() { + return .mediaTrackConstraints(mediaTrackConstraints) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .mediaTrackConstraints(mediaTrackConstraints): + return mediaTrackConstraints.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift new file mode 100644 index 00000000..53fb3394 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Bool_or_ScrollIntoViewOptions: ConvertibleToJSValue {} +extension Bool: Any_Bool_or_ScrollIntoViewOptions {} +extension ScrollIntoViewOptions: Any_Bool_or_ScrollIntoViewOptions {} + +public enum Bool_or_ScrollIntoViewOptions: JSValueCompatible, Any_Bool_or_ScrollIntoViewOptions { + case bool(Bool) + case scrollIntoViewOptions(ScrollIntoViewOptions) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var scrollIntoViewOptions: ScrollIntoViewOptions? { + switch self { + case let .scrollIntoViewOptions(scrollIntoViewOptions): return scrollIntoViewOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let scrollIntoViewOptions: ScrollIntoViewOptions = value.fromJSValue() { + return .scrollIntoViewOptions(scrollIntoViewOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .scrollIntoViewOptions(scrollIntoViewOptions): + return scrollIntoViewOptions.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/BoxQuadOptions.swift b/Sources/DOMKit/WebIDL/BoxQuadOptions.swift new file mode 100644 index 00000000..9c68f521 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BoxQuadOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class BoxQuadOptions: BridgedDictionary { + public convenience init(box: CSSBoxType, relativeTo: GeometryNode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.box] = box.jsValue + object[Strings.relativeTo] = relativeTo.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _box = ReadWriteAttribute(jsObject: object, name: Strings.box) + _relativeTo = ReadWriteAttribute(jsObject: object, name: Strings.relativeTo) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var box: CSSBoxType + + @ReadWriteAttribute + public var relativeTo: GeometryNode +} diff --git a/Sources/DOMKit/WebIDL/CSSBoxType.swift b/Sources/DOMKit/WebIDL/CSSBoxType.swift new file mode 100644 index 00000000..55fb3a91 --- /dev/null +++ b/Sources/DOMKit/WebIDL/CSSBoxType.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum CSSBoxType: JSString, JSValueCompatible { + case margin = "margin" + case border = "border" + case padding = "padding" + case content = "content" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement.swift new file mode 100644 index 00000000..29314d8d --- /dev/null +++ b/Sources/DOMKit/WebIDL/CSSPseudoElement.swift @@ -0,0 +1,29 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class CSSPseudoElement: EventTarget, GeometryUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CSSPseudoElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _element = ReadonlyAttribute(jsObject: jsObject, name: Strings.element) + _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var element: Element + + @ReadonlyAttribute + public var parent: CSSPseudoElement_or_Element + + @inlinable public func pseudo(type: String) -> CSSPseudoElement? { + let this = jsObject + return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift new file mode 100644 index 00000000..3c06e5d5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_CSSPseudoElement_or_Element: ConvertibleToJSValue {} +extension CSSPseudoElement: Any_CSSPseudoElement_or_Element {} +extension Element: Any_CSSPseudoElement_or_Element {} + +public enum CSSPseudoElement_or_Element: JSValueCompatible, Any_CSSPseudoElement_or_Element { + case cssPseudoElement(CSSPseudoElement) + case element(Element) + + var cssPseudoElement: CSSPseudoElement? { + switch self { + case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement + default: return nil + } + } + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { + return .cssPseudoElement(cssPseudoElement) + } + if let element: Element = value.fromJSValue() { + return .element(element) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .cssPseudoElement(cssPseudoElement): + return cssPseudoElement.jsValue + case let .element(element): + return element.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift new file mode 100644 index 00000000..ee012fa8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class CameraDevicePermissionDescriptor: BridgedDictionary { + public convenience init(panTiltZoom: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.panTiltZoom] = panTiltZoom.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _panTiltZoom = ReadWriteAttribute(jsObject: object, name: Strings.panTiltZoom) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var panTiltZoom: Bool +} diff --git a/Sources/DOMKit/WebIDL/CaretPosition.swift b/Sources/DOMKit/WebIDL/CaretPosition.swift new file mode 100644 index 00000000..385d49ef --- /dev/null +++ b/Sources/DOMKit/WebIDL/CaretPosition.swift @@ -0,0 +1,27 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class CaretPosition: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CaretPosition].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _offsetNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetNode) + _offset = ReadonlyAttribute(jsObject: jsObject, name: Strings.offset) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var offsetNode: Node + + @ReadonlyAttribute + public var offset: UInt32 + + @inlinable public func getClientRect() -> DOMRect? { + let this = jsObject + return this[Strings.getClientRect].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainBoolean.swift b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift new file mode 100644 index 00000000..38559275 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainBoolean: ConvertibleToJSValue {} +extension Bool: Any_ConstrainBoolean {} +extension ConstrainBooleanParameters: Any_ConstrainBoolean {} + +public enum ConstrainBoolean: JSValueCompatible, Any_ConstrainBoolean { + case bool(Bool) + case constrainBooleanParameters(ConstrainBooleanParameters) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var constrainBooleanParameters: ConstrainBooleanParameters? { + switch self { + case let .constrainBooleanParameters(constrainBooleanParameters): return constrainBooleanParameters + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let constrainBooleanParameters: ConstrainBooleanParameters = value.fromJSValue() { + return .constrainBooleanParameters(constrainBooleanParameters) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .constrainBooleanParameters(constrainBooleanParameters): + return constrainBooleanParameters.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift new file mode 100644 index 00000000..aed2cd3b --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainBooleanParameters: BridgedDictionary { + public convenience init(exact: Bool, ideal: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: Bool + + @ReadWriteAttribute + public var ideal: Bool +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift new file mode 100644 index 00000000..5c2cb816 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainDOMString: ConvertibleToJSValue {} +extension ConstrainDOMStringParameters: Any_ConstrainDOMString {} +extension String: Any_ConstrainDOMString {} +extension Array: Any_ConstrainDOMString where Element == String {} + +public enum ConstrainDOMString: JSValueCompatible, Any_ConstrainDOMString { + case constrainDOMStringParameters(ConstrainDOMStringParameters) + case string(String) + case seq_of_String([String]) + + var constrainDOMStringParameters: ConstrainDOMStringParameters? { + switch self { + case let .constrainDOMStringParameters(constrainDOMStringParameters): return constrainDOMStringParameters + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var seq_of_String: [String]? { + switch self { + case let .seq_of_String(seq_of_String): return seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainDOMStringParameters: ConstrainDOMStringParameters = value.fromJSValue() { + return .constrainDOMStringParameters(constrainDOMStringParameters) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + if let seq_of_String: [String] = value.fromJSValue() { + return .seq_of_String(seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainDOMStringParameters(constrainDOMStringParameters): + return constrainDOMStringParameters.jsValue + case let .string(string): + return string.jsValue + case let .seq_of_String(seq_of_String): + return seq_of_String.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift new file mode 100644 index 00000000..8a51b973 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainDOMStringParameters: BridgedDictionary { + public convenience init(exact: String_or_seq_of_String, ideal: String_or_seq_of_String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: String_or_seq_of_String + + @ReadWriteAttribute + public var ideal: String_or_seq_of_String +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDouble.swift b/Sources/DOMKit/WebIDL/ConstrainDouble.swift new file mode 100644 index 00000000..41993e8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDouble.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainDouble: ConvertibleToJSValue {} +extension ConstrainDoubleRange: Any_ConstrainDouble {} +extension Double: Any_ConstrainDouble {} + +public enum ConstrainDouble: JSValueCompatible, Any_ConstrainDouble { + case constrainDoubleRange(ConstrainDoubleRange) + case double(Double) + + var constrainDoubleRange: ConstrainDoubleRange? { + switch self { + case let .constrainDoubleRange(constrainDoubleRange): return constrainDoubleRange + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainDoubleRange: ConstrainDoubleRange = value.fromJSValue() { + return .constrainDoubleRange(constrainDoubleRange) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainDoubleRange(constrainDoubleRange): + return constrainDoubleRange.jsValue + case let .double(double): + return double.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift new file mode 100644 index 00000000..9ee176e9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainDoubleRange: BridgedDictionary { + public convenience init(exact: Double, ideal: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: Double + + @ReadWriteAttribute + public var ideal: Double +} diff --git a/Sources/DOMKit/WebIDL/ConstrainULong.swift b/Sources/DOMKit/WebIDL/ConstrainULong.swift new file mode 100644 index 00000000..614cf30b --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainULong.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainULong: ConvertibleToJSValue {} +extension ConstrainULongRange: Any_ConstrainULong {} +extension UInt32: Any_ConstrainULong {} + +public enum ConstrainULong: JSValueCompatible, Any_ConstrainULong { + case constrainULongRange(ConstrainULongRange) + case uInt32(UInt32) + + var constrainULongRange: ConstrainULongRange? { + switch self { + case let .constrainULongRange(constrainULongRange): return constrainULongRange + default: return nil + } + } + + var uInt32: UInt32? { + switch self { + case let .uInt32(uInt32): return uInt32 + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainULongRange: ConstrainULongRange = value.fromJSValue() { + return .constrainULongRange(constrainULongRange) + } + if let uInt32: UInt32 = value.fromJSValue() { + return .uInt32(uInt32) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainULongRange(constrainULongRange): + return constrainULongRange.jsValue + case let .uInt32(uInt32): + return uInt32.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift new file mode 100644 index 00000000..5a87be30 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainULongRange: BridgedDictionary { + public convenience init(exact: UInt32, ideal: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: UInt32 + + @ReadWriteAttribute + public var ideal: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift new file mode 100644 index 00000000..e5671dbc --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConvertCoordinateOptions: BridgedDictionary { + public convenience init(fromBox: CSSBoxType, toBox: CSSBoxType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.fromBox] = fromBox.jsValue + object[Strings.toBox] = toBox.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _fromBox = ReadWriteAttribute(jsObject: object, name: Strings.fromBox) + _toBox = ReadWriteAttribute(jsObject: object, name: Strings.toBox) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var fromBox: CSSBoxType + + @ReadWriteAttribute + public var toBox: CSSBoxType +} diff --git a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift new file mode 100644 index 00000000..92ae09de --- /dev/null +++ b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class DevicePermissionDescriptor: BridgedDictionary { + public convenience init(deviceId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.deviceId] = deviceId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var deviceId: String +} diff --git a/Sources/DOMKit/WebIDL/DoubleRange.swift b/Sources/DOMKit/WebIDL/DoubleRange.swift new file mode 100644 index 00000000..b58107cf --- /dev/null +++ b/Sources/DOMKit/WebIDL/DoubleRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class DoubleRange: BridgedDictionary { + public convenience init(max: Double, min: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.max] = max.jsValue + object[Strings.min] = min.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _max = ReadWriteAttribute(jsObject: object, name: Strings.max) + _min = ReadWriteAttribute(jsObject: object, name: Strings.min) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var max: Double + + @ReadWriteAttribute + public var min: Double +} diff --git a/Sources/DOMKit/WebIDL/GeometryNode.swift b/Sources/DOMKit/WebIDL/GeometryNode.swift new file mode 100644 index 00000000..5554a102 --- /dev/null +++ b/Sources/DOMKit/WebIDL/GeometryNode.swift @@ -0,0 +1,74 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_GeometryNode: ConvertibleToJSValue {} +extension CSSPseudoElement: Any_GeometryNode {} +extension Document: Any_GeometryNode {} +extension Element: Any_GeometryNode {} +extension Text: Any_GeometryNode {} + +public enum GeometryNode: JSValueCompatible, Any_GeometryNode { + case cssPseudoElement(CSSPseudoElement) + case document(Document) + case element(Element) + case text(Text) + + var cssPseudoElement: CSSPseudoElement? { + switch self { + case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement + default: return nil + } + } + + var document: Document? { + switch self { + case let .document(document): return document + default: return nil + } + } + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var text: Text? { + switch self { + case let .text(text): return text + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { + return .cssPseudoElement(cssPseudoElement) + } + if let document: Document = value.fromJSValue() { + return .document(document) + } + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let text: Text = value.fromJSValue() { + return .text(text) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .cssPseudoElement(cssPseudoElement): + return cssPseudoElement.jsValue + case let .document(document): + return document.jsValue + case let .element(element): + return element.jsValue + case let .text(text): + return text.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/GeometryUtils.swift b/Sources/DOMKit/WebIDL/GeometryUtils.swift new file mode 100644 index 00000000..15114de3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/GeometryUtils.swift @@ -0,0 +1,27 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol GeometryUtils: JSBridgedClass {} +public extension GeometryUtils { + @inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] { + let this = jsObject + return this[Strings.getBoxQuads].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertQuadFromNode(quad: DOMQuadInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { + let this = jsObject + return this[Strings.convertQuadFromNode].function!(this: this, arguments: [quad.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { + let this = jsObject + return this[Strings.convertRectFromNode].function!(this: this, arguments: [rect.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.convertPointFromNode].function!(this: this, arguments: [point.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift new file mode 100644 index 00000000..d6170195 --- /dev/null +++ b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift @@ -0,0 +1,17 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class InputDeviceInfo: MediaDeviceInfo { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputDeviceInfo].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func getCapabilities() -> MediaTrackCapabilities { + let this = jsObject + return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift new file mode 100644 index 00000000..2cf015a8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift @@ -0,0 +1,16 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class IsVisibleOptions: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift new file mode 100644 index 00000000..1f063478 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaDeviceInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaDeviceInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _deviceId = ReadonlyAttribute(jsObject: jsObject, name: Strings.deviceId) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _groupId = ReadonlyAttribute(jsObject: jsObject, name: Strings.groupId) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var deviceId: String + + @ReadonlyAttribute + public var kind: MediaDeviceKind + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var groupId: String + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift new file mode 100644 index 00000000..a19daab0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum MediaDeviceKind: JSString, JSValueCompatible { + case audioinput = "audioinput" + case audiooutput = "audiooutput" + case videoinput = "videoinput" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaDevices.swift b/Sources/DOMKit/WebIDL/MediaDevices.swift new file mode 100644 index 00000000..a65b2d59 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDevices.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaDevices: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaDevices].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _ondevicechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondevicechange) + super.init(unsafelyWrapping: jsObject) + } + + @ClosureAttribute1Optional + public var ondevicechange: EventHandler + + @inlinable public func enumerateDevices() -> JSPromise { + let this = jsObject + return this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func enumerateDevices() async throws -> [MediaDeviceInfo] { + let this = jsObject + let _promise: JSPromise = this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getSupportedConstraints() -> MediaTrackSupportedConstraints { + let this = jsObject + return this[Strings.getSupportedConstraints].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) -> JSPromise { + let this = jsObject + return this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) async throws -> MediaStream { + let this = jsObject + let _promise: JSPromise = this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryList.swift b/Sources/DOMKit/WebIDL/MediaQueryList.swift new file mode 100644 index 00000000..e2f6e574 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryList.swift @@ -0,0 +1,28 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) + _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var media: String + + @ReadonlyAttribute + public var matches: Bool + + // XXX: member 'addListener' is ignored + + // XXX: member 'removeListener' is ignored + + @ClosureAttribute1Optional + public var onchange: EventHandler +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift new file mode 100644 index 00000000..e74e5c35 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryListEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryListEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) + _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaQueryListEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var media: String + + @ReadonlyAttribute + public var matches: Bool +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift new file mode 100644 index 00000000..0f6adc8b --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryListEventInit: BridgedDictionary { + public convenience init(media: String, matches: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.media] = media.jsValue + object[Strings.matches] = matches.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _media = ReadWriteAttribute(jsObject: object, name: Strings.media) + _matches = ReadWriteAttribute(jsObject: object, name: Strings.matches) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var matches: Bool +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorder.swift b/Sources/DOMKit/WebIDL/MediaRecorder.swift new file mode 100644 index 00000000..9336c57b --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorder.swift @@ -0,0 +1,94 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorder: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _stream = ReadonlyAttribute(jsObject: jsObject, name: Strings.stream) + _mimeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.mimeType) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _onstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstart) + _onstop = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstop) + _ondataavailable = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondataavailable) + _onpause = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onpause) + _onresume = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onresume) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _videoBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoBitsPerSecond) + _audioBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitsPerSecond) + _audioBitrateMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitrateMode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(stream: MediaStream, options: MediaRecorderOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var stream: MediaStream + + @ReadonlyAttribute + public var mimeType: String + + @ReadonlyAttribute + public var state: RecordingState + + @ClosureAttribute1Optional + public var onstart: EventHandler + + @ClosureAttribute1Optional + public var onstop: EventHandler + + @ClosureAttribute1Optional + public var ondataavailable: EventHandler + + @ClosureAttribute1Optional + public var onpause: EventHandler + + @ClosureAttribute1Optional + public var onresume: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ReadonlyAttribute + public var videoBitsPerSecond: UInt32 + + @ReadonlyAttribute + public var audioBitsPerSecond: UInt32 + + @ReadonlyAttribute + public var audioBitrateMode: BitrateMode + + @inlinable public func start(timeslice: UInt32? = nil) { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: [timeslice?.jsValue ?? .undefined]) + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @inlinable public func resume() { + let this = jsObject + _ = this[Strings.resume].function!(this: this, arguments: []) + } + + @inlinable public func requestData() { + let this = jsObject + _ = this[Strings.requestData].function!(this: this, arguments: []) + } + + @inlinable public static func isTypeSupported(type: String) -> Bool { + let this = constructor + return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift new file mode 100644 index 00000000..c4b4cc09 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorderErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaRecorderErrorEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var error: DOMException +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift new file mode 100644 index 00000000..4c773a67 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderErrorEventInit: BridgedDictionary { + public convenience init(error: DOMException) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _error = ReadWriteAttribute(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var error: DOMException +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift new file mode 100644 index 00000000..3a4300b0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift @@ -0,0 +1,40 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderOptions: BridgedDictionary { + public convenience init(mimeType: String, audioBitsPerSecond: UInt32, videoBitsPerSecond: UInt32, bitsPerSecond: UInt32, audioBitrateMode: BitrateMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mimeType] = mimeType.jsValue + object[Strings.audioBitsPerSecond] = audioBitsPerSecond.jsValue + object[Strings.videoBitsPerSecond] = videoBitsPerSecond.jsValue + object[Strings.bitsPerSecond] = bitsPerSecond.jsValue + object[Strings.audioBitrateMode] = audioBitrateMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mimeType = ReadWriteAttribute(jsObject: object, name: Strings.mimeType) + _audioBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.audioBitsPerSecond) + _videoBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.videoBitsPerSecond) + _bitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.bitsPerSecond) + _audioBitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.audioBitrateMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mimeType: String + + @ReadWriteAttribute + public var audioBitsPerSecond: UInt32 + + @ReadWriteAttribute + public var videoBitsPerSecond: UInt32 + + @ReadWriteAttribute + public var bitsPerSecond: UInt32 + + @ReadWriteAttribute + public var audioBitrateMode: BitrateMode +} diff --git a/Sources/DOMKit/WebIDL/MediaStream.swift b/Sources/DOMKit/WebIDL/MediaStream.swift new file mode 100644 index 00000000..819dac5a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStream.swift @@ -0,0 +1,75 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStream: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public convenience init(stream: MediaStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public convenience init(tracks: [MediaStreamTrack]) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [tracks.jsValue])) + } + + @ReadonlyAttribute + public var id: String + + @inlinable public func getAudioTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getAudioTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getVideoTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getVideoTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getTrackById(trackId: String) -> MediaStreamTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [trackId.jsValue]).fromJSValue()! + } + + @inlinable public func addTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.addTrack].function!(this: this, arguments: [track.jsValue]) + } + + @inlinable public func removeTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.removeTrack].function!(this: this, arguments: [track.jsValue]) + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var active: Bool + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift new file mode 100644 index 00000000..b2ee4cce --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamConstraints: BridgedDictionary { + public convenience init(video: Bool_or_MediaTrackConstraints, audio: Bool_or_MediaTrackConstraints) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.video] = video.jsValue + object[Strings.audio] = audio.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _video = ReadWriteAttribute(jsObject: object, name: Strings.video) + _audio = ReadWriteAttribute(jsObject: object, name: Strings.audio) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var video: Bool_or_MediaTrackConstraints + + @ReadWriteAttribute + public var audio: Bool_or_MediaTrackConstraints +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift new file mode 100644 index 00000000..450347d9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift @@ -0,0 +1,85 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) + _muted = ReadonlyAttribute(jsObject: jsObject, name: Strings.muted) + _onmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmute) + _onunmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onunmute) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _onended = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onended) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var label: String + + @ReadWriteAttribute + public var enabled: Bool + + @ReadonlyAttribute + public var muted: Bool + + @ClosureAttribute1Optional + public var onmute: EventHandler + + @ClosureAttribute1Optional + public var onunmute: EventHandler + + @ReadonlyAttribute + public var readyState: MediaStreamTrackState + + @ClosureAttribute1Optional + public var onended: EventHandler + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func getCapabilities() -> MediaTrackCapabilities { + let this = jsObject + return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getConstraints() -> MediaTrackConstraints { + let this = jsObject + return this[Strings.getConstraints].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getSettings() -> MediaTrackSettings { + let this = jsObject + return this[Strings.getSettings].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) -> JSPromise { + let this = jsObject + return this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift new file mode 100644 index 00000000..21d98e5a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrackEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaStreamTrackEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var track: MediaStreamTrack +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift new file mode 100644 index 00000000..2bab9838 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrackEventInit: BridgedDictionary { + public convenience init(track: MediaStreamTrack) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.track] = track.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _track = ReadWriteAttribute(jsObject: object, name: Strings.track) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var track: MediaStreamTrack +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift new file mode 100644 index 00000000..d08534a1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum MediaStreamTrackState: JSString, JSValueCompatible { + case live = "live" + case ended = "ended" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift new file mode 100644 index 00000000..41982ba3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackCapabilities: BridgedDictionary { + public convenience init(width: ULongRange, height: ULongRange, aspectRatio: DoubleRange, frameRate: DoubleRange, facingMode: [String], resizeMode: [String], sampleRate: ULongRange, sampleSize: ULongRange, echoCancellation: [Bool], autoGainControl: [Bool], noiseSuppression: [Bool], latency: DoubleRange, channelCount: ULongRange, deviceId: String, groupId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: ULongRange + + @ReadWriteAttribute + public var height: ULongRange + + @ReadWriteAttribute + public var aspectRatio: DoubleRange + + @ReadWriteAttribute + public var frameRate: DoubleRange + + @ReadWriteAttribute + public var facingMode: [String] + + @ReadWriteAttribute + public var resizeMode: [String] + + @ReadWriteAttribute + public var sampleRate: ULongRange + + @ReadWriteAttribute + public var sampleSize: ULongRange + + @ReadWriteAttribute + public var echoCancellation: [Bool] + + @ReadWriteAttribute + public var autoGainControl: [Bool] + + @ReadWriteAttribute + public var noiseSuppression: [Bool] + + @ReadWriteAttribute + public var latency: DoubleRange + + @ReadWriteAttribute + public var channelCount: ULongRange + + @ReadWriteAttribute + public var deviceId: String + + @ReadWriteAttribute + public var groupId: String +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift new file mode 100644 index 00000000..1489baaa --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackConstraintSet: BridgedDictionary { + public convenience init(width: ConstrainULong, height: ConstrainULong, aspectRatio: ConstrainDouble, frameRate: ConstrainDouble, facingMode: ConstrainDOMString, resizeMode: ConstrainDOMString, sampleRate: ConstrainULong, sampleSize: ConstrainULong, echoCancellation: ConstrainBoolean, autoGainControl: ConstrainBoolean, noiseSuppression: ConstrainBoolean, latency: ConstrainDouble, channelCount: ConstrainULong, deviceId: ConstrainDOMString, groupId: ConstrainDOMString) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: ConstrainULong + + @ReadWriteAttribute + public var height: ConstrainULong + + @ReadWriteAttribute + public var aspectRatio: ConstrainDouble + + @ReadWriteAttribute + public var frameRate: ConstrainDouble + + @ReadWriteAttribute + public var facingMode: ConstrainDOMString + + @ReadWriteAttribute + public var resizeMode: ConstrainDOMString + + @ReadWriteAttribute + public var sampleRate: ConstrainULong + + @ReadWriteAttribute + public var sampleSize: ConstrainULong + + @ReadWriteAttribute + public var echoCancellation: ConstrainBoolean + + @ReadWriteAttribute + public var autoGainControl: ConstrainBoolean + + @ReadWriteAttribute + public var noiseSuppression: ConstrainBoolean + + @ReadWriteAttribute + public var latency: ConstrainDouble + + @ReadWriteAttribute + public var channelCount: ConstrainULong + + @ReadWriteAttribute + public var deviceId: ConstrainDOMString + + @ReadWriteAttribute + public var groupId: ConstrainDOMString +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift new file mode 100644 index 00000000..5307db8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackConstraints: BridgedDictionary { + public convenience init(advanced: [MediaTrackConstraintSet]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.advanced] = advanced.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _advanced = ReadWriteAttribute(jsObject: object, name: Strings.advanced) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var advanced: [MediaTrackConstraintSet] +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift new file mode 100644 index 00000000..84d866a3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackSettings: BridgedDictionary { + public convenience init(width: Int32, height: Int32, aspectRatio: Double, frameRate: Double, facingMode: String, resizeMode: String, sampleRate: Int32, sampleSize: Int32, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Double, channelCount: Int32, deviceId: String, groupId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: Int32 + + @ReadWriteAttribute + public var height: Int32 + + @ReadWriteAttribute + public var aspectRatio: Double + + @ReadWriteAttribute + public var frameRate: Double + + @ReadWriteAttribute + public var facingMode: String + + @ReadWriteAttribute + public var resizeMode: String + + @ReadWriteAttribute + public var sampleRate: Int32 + + @ReadWriteAttribute + public var sampleSize: Int32 + + @ReadWriteAttribute + public var echoCancellation: Bool + + @ReadWriteAttribute + public var autoGainControl: Bool + + @ReadWriteAttribute + public var noiseSuppression: Bool + + @ReadWriteAttribute + public var latency: Double + + @ReadWriteAttribute + public var channelCount: Int32 + + @ReadWriteAttribute + public var deviceId: String + + @ReadWriteAttribute + public var groupId: String +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift new file mode 100644 index 00000000..bcbfd4ba --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackSupportedConstraints: BridgedDictionary { + public convenience init(width: Bool, height: Bool, aspectRatio: Bool, frameRate: Bool, facingMode: Bool, resizeMode: Bool, sampleRate: Bool, sampleSize: Bool, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Bool, channelCount: Bool, deviceId: Bool, groupId: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: Bool + + @ReadWriteAttribute + public var height: Bool + + @ReadWriteAttribute + public var aspectRatio: Bool + + @ReadWriteAttribute + public var frameRate: Bool + + @ReadWriteAttribute + public var facingMode: Bool + + @ReadWriteAttribute + public var resizeMode: Bool + + @ReadWriteAttribute + public var sampleRate: Bool + + @ReadWriteAttribute + public var sampleSize: Bool + + @ReadWriteAttribute + public var echoCancellation: Bool + + @ReadWriteAttribute + public var autoGainControl: Bool + + @ReadWriteAttribute + public var noiseSuppression: Bool + + @ReadWriteAttribute + public var latency: Bool + + @ReadWriteAttribute + public var channelCount: Bool + + @ReadWriteAttribute + public var deviceId: Bool + + @ReadWriteAttribute + public var groupId: Bool +} diff --git a/Sources/DOMKit/WebIDL/OverconstrainedError.swift b/Sources/DOMKit/WebIDL/OverconstrainedError.swift new file mode 100644 index 00000000..61499735 --- /dev/null +++ b/Sources/DOMKit/WebIDL/OverconstrainedError.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class OverconstrainedError: DOMException { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OverconstrainedError].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _constraint = ReadonlyAttribute(jsObject: jsObject, name: Strings.constraint) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(constraint: String, message: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [constraint.jsValue, message?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var constraint: String +} diff --git a/Sources/DOMKit/WebIDL/RecordingState.swift b/Sources/DOMKit/WebIDL/RecordingState.swift new file mode 100644 index 00000000..7e057605 --- /dev/null +++ b/Sources/DOMKit/WebIDL/RecordingState.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum RecordingState: JSString, JSValueCompatible { + case inactive = "inactive" + case recording = "recording" + case paused = "paused" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/Screen.swift b/Sources/DOMKit/WebIDL/Screen.swift new file mode 100644 index 00000000..a883fb2f --- /dev/null +++ b/Sources/DOMKit/WebIDL/Screen.swift @@ -0,0 +1,38 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class Screen: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _availWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.availWidth) + _availHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.availHeight) + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _colorDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorDepth) + _pixelDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.pixelDepth) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var availWidth: Int32 + + @ReadonlyAttribute + public var availHeight: Int32 + + @ReadonlyAttribute + public var width: Int32 + + @ReadonlyAttribute + public var height: Int32 + + @ReadonlyAttribute + public var colorDepth: UInt32 + + @ReadonlyAttribute + public var pixelDepth: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/ScrollBehavior.swift b/Sources/DOMKit/WebIDL/ScrollBehavior.swift new file mode 100644 index 00000000..a76ba1cb --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollBehavior.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum ScrollBehavior: JSString, JSValueCompatible { + case auto = "auto" + case smooth = "smooth" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift new file mode 100644 index 00000000..23f42432 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollIntoViewOptions: BridgedDictionary { + public convenience init(block: ScrollLogicalPosition, inline: ScrollLogicalPosition) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.block] = block.jsValue + object[Strings.inline] = inline.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _block = ReadWriteAttribute(jsObject: object, name: Strings.block) + _inline = ReadWriteAttribute(jsObject: object, name: Strings.inline) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var block: ScrollLogicalPosition + + @ReadWriteAttribute + public var inline: ScrollLogicalPosition +} diff --git a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift new file mode 100644 index 00000000..9f11f0bf --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum ScrollLogicalPosition: JSString, JSValueCompatible { + case start = "start" + case center = "center" + case end = "end" + case nearest = "nearest" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ScrollOptions.swift b/Sources/DOMKit/WebIDL/ScrollOptions.swift new file mode 100644 index 00000000..93ba5ad2 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollOptions.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollOptions: BridgedDictionary { + public convenience init(behavior: ScrollBehavior) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.behavior] = behavior.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _behavior = ReadWriteAttribute(jsObject: object, name: Strings.behavior) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var behavior: ScrollBehavior +} diff --git a/Sources/DOMKit/WebIDL/ScrollToOptions.swift b/Sources/DOMKit/WebIDL/ScrollToOptions.swift new file mode 100644 index 00000000..c48ba4d7 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollToOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollToOptions: BridgedDictionary { + public convenience init(left: Double, top: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.left] = left.jsValue + object[Strings.top] = top.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _left = ReadWriteAttribute(jsObject: object, name: Strings.left) + _top = ReadWriteAttribute(jsObject: object, name: Strings.top) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var left: Double + + @ReadWriteAttribute + public var top: Double +} diff --git a/Sources/DOMKit/WebIDL/ULongRange.swift b/Sources/DOMKit/WebIDL/ULongRange.swift new file mode 100644 index 00000000..cf578d6c --- /dev/null +++ b/Sources/DOMKit/WebIDL/ULongRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ULongRange: BridgedDictionary { + public convenience init(max: UInt32, min: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.max] = max.jsValue + object[Strings.min] = min.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _max = ReadWriteAttribute(jsObject: object, name: Strings.max) + _min = ReadWriteAttribute(jsObject: object, name: Strings.min) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var max: UInt32 + + @ReadWriteAttribute + public var min: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift new file mode 100644 index 00000000..9d325b8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoFacingModeEnum: JSString, JSValueCompatible { + case user = "user" + case environment = "environment" + case left = "left" + case right = "right" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift new file mode 100644 index 00000000..78582a71 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoResizeModeEnum: JSString, JSValueCompatible { + case none = "none" + case cropAndScale = "crop-and-scale" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/DOMKitDemo/WebGLDemo.swift index 290e1fc0..e58be1a2 100644 --- a/Sources/DOMKitDemo/WebGLDemo.swift +++ b/Sources/DOMKitDemo/WebGLDemo.swift @@ -1,4 +1,4 @@ -// Copyright 2021-2022, GFXFundamentals and DOMKit contributors. +// Copyright 2021, GFXFundamentals. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 93f1d45b..9e188430 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -29,6 +29,8 @@ console.log( "webaudio", "mediacapture-streams", "mediastream-recording", + "css-pseudo", + "cssom-view", "webcodecs", "webgl1", "webgl2", From 33dd386fd12384dd50bbaa8502d99429bdcb5cab Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 10:51:51 +0100 Subject: [PATCH 11/18] Update copyrights --- Sources/DOMKitDemo/WebGLDemo.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/DOMKitDemo/WebGLDemo.swift index e58be1a2..290e1fc0 100644 --- a/Sources/DOMKitDemo/WebGLDemo.swift +++ b/Sources/DOMKitDemo/WebGLDemo.swift @@ -1,4 +1,4 @@ -// Copyright 2021, GFXFundamentals. +// Copyright 2021-2022, GFXFundamentals and DOMKit contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without From bd6d979cbbb3f731939d42afcbbe1f489773f4b7 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 12:41:34 +0100 Subject: [PATCH 12/18] Bump JSKit, fix BigInt support --- Package.resolved | 2 +- Sources/DOMKit/WebIDL/AlphaOption.swift | 22 - Sources/DOMKit/WebIDL/AudioData.swift | 62 - .../WebIDL/AudioDataCopyToOptions.swift | 35 - Sources/DOMKit/WebIDL/AudioDataInit.swift | 45 - Sources/DOMKit/WebIDL/AudioDecoder.swift | 70 - .../DOMKit/WebIDL/AudioDecoderConfig.swift | 35 - Sources/DOMKit/WebIDL/AudioDecoderInit.swift | 25 - .../DOMKit/WebIDL/AudioDecoderSupport.swift | 25 - Sources/DOMKit/WebIDL/AudioEncoder.swift | 70 - .../DOMKit/WebIDL/AudioEncoderConfig.swift | 35 - Sources/DOMKit/WebIDL/AudioEncoderInit.swift | 25 - .../DOMKit/WebIDL/AudioEncoderSupport.swift | 25 - Sources/DOMKit/WebIDL/AudioSampleFormat.swift | 28 - Sources/DOMKit/WebIDL/BitrateMode.swift | 22 - Sources/DOMKit/WebIDL/BlobEvent.swift | 24 - Sources/DOMKit/WebIDL/BlobEventInit.swift | 25 - .../Bool_or_MediaTrackConstraints.swift | 46 - .../Bool_or_ScrollIntoViewOptions.swift | 46 - Sources/DOMKit/WebIDL/BoxQuadOptions.swift | 25 - Sources/DOMKit/WebIDL/CSSBoxType.swift | 24 - Sources/DOMKit/WebIDL/CSSPseudoElement.swift | 29 - .../WebIDL/CSSPseudoElement_or_Element.swift | 46 - .../CameraDevicePermissionDescriptor.swift | 20 - Sources/DOMKit/WebIDL/CaretPosition.swift | 27 - Sources/DOMKit/WebIDL/CodecState.swift | 23 - Sources/DOMKit/WebIDL/ConstrainBoolean.swift | 46 - .../WebIDL/ConstrainBooleanParameters.swift | 25 - .../DOMKit/WebIDL/ConstrainDOMString.swift | 60 - .../WebIDL/ConstrainDOMStringParameters.swift | 25 - Sources/DOMKit/WebIDL/ConstrainDouble.swift | 46 - .../DOMKit/WebIDL/ConstrainDoubleRange.swift | 25 - Sources/DOMKit/WebIDL/ConstrainULong.swift | 46 - .../DOMKit/WebIDL/ConstrainULongRange.swift | 25 - .../WebIDL/ConvertCoordinateOptions.swift | 25 - .../WebIDL/DevicePermissionDescriptor.swift | 20 - Sources/DOMKit/WebIDL/DoubleRange.swift | 25 - Sources/DOMKit/WebIDL/EncodedAudioChunk.swift | 39 - .../DOMKit/WebIDL/EncodedAudioChunkInit.swift | 35 - .../WebIDL/EncodedAudioChunkMetadata.swift | 20 - .../DOMKit/WebIDL/EncodedAudioChunkType.swift | 22 - Sources/DOMKit/WebIDL/EncodedVideoChunk.swift | 39 - .../DOMKit/WebIDL/EncodedVideoChunkInit.swift | 35 - .../WebIDL/EncodedVideoChunkMetadata.swift | 30 - .../DOMKit/WebIDL/EncodedVideoChunkType.swift | 22 - Sources/DOMKit/WebIDL/Float32List.swift | 46 - Sources/DOMKit/WebIDL/GeometryNode.swift | 74 - Sources/DOMKit/WebIDL/GeometryUtils.swift | 27 - .../DOMKit/WebIDL/HardwareAcceleration.swift | 23 - Sources/DOMKit/WebIDL/ImageBufferSource.swift | 46 - .../DOMKit/WebIDL/ImageDecodeOptions.swift | 25 - Sources/DOMKit/WebIDL/ImageDecodeResult.swift | 25 - Sources/DOMKit/WebIDL/ImageDecoder.swift | 68 - Sources/DOMKit/WebIDL/ImageDecoderInit.swift | 50 - Sources/DOMKit/WebIDL/ImageTrack.swift | 32 - Sources/DOMKit/WebIDL/ImageTrackList.swift | 34 - Sources/DOMKit/WebIDL/InputDeviceInfo.swift | 17 - Sources/DOMKit/WebIDL/Int32List.swift | 46 - Sources/DOMKit/WebIDL/IsVisibleOptions.swift | 16 - Sources/DOMKit/WebIDL/LatencyMode.swift | 22 - Sources/DOMKit/WebIDL/MediaDeviceInfo.swift | 35 - Sources/DOMKit/WebIDL/MediaDeviceKind.swift | 23 - Sources/DOMKit/WebIDL/MediaDevices.swift | 45 - Sources/DOMKit/WebIDL/MediaQueryList.swift | 28 - .../DOMKit/WebIDL/MediaQueryListEvent.swift | 24 - .../WebIDL/MediaQueryListEventInit.swift | 25 - Sources/DOMKit/WebIDL/MediaRecorder.swift | 94 -- .../WebIDL/MediaRecorderErrorEvent.swift | 20 - .../WebIDL/MediaRecorderErrorEventInit.swift | 20 - .../DOMKit/WebIDL/MediaRecorderOptions.swift | 40 - Sources/DOMKit/WebIDL/MediaStream.swift | 75 - .../WebIDL/MediaStreamConstraints.swift | 25 - Sources/DOMKit/WebIDL/MediaStreamTrack.swift | 85 -- .../DOMKit/WebIDL/MediaStreamTrackEvent.swift | 20 - .../WebIDL/MediaStreamTrackEventInit.swift | 20 - .../DOMKit/WebIDL/MediaStreamTrackState.swift | 22 - .../WebIDL/MediaTrackCapabilities.swift | 90 -- .../WebIDL/MediaTrackConstraintSet.swift | 90 -- .../DOMKit/WebIDL/MediaTrackConstraints.swift | 20 - .../DOMKit/WebIDL/MediaTrackSettings.swift | 90 -- .../MediaTrackSupportedConstraints.swift | 90 -- .../DOMKit/WebIDL/OverconstrainedError.swift | 20 - Sources/DOMKit/WebIDL/PlaneLayout.swift | 25 - Sources/DOMKit/WebIDL/RecordingState.swift | 23 - Sources/DOMKit/WebIDL/Screen.swift | 38 - Sources/DOMKit/WebIDL/ScrollBehavior.swift | 22 - .../DOMKit/WebIDL/ScrollIntoViewOptions.swift | 25 - .../DOMKit/WebIDL/ScrollLogicalPosition.swift | 24 - Sources/DOMKit/WebIDL/ScrollOptions.swift | 20 - Sources/DOMKit/WebIDL/ScrollToOptions.swift | 25 - Sources/DOMKit/WebIDL/SvcOutputMetadata.swift | 20 - Sources/DOMKit/WebIDL/TexImageSource.swift | 116 -- Sources/DOMKit/WebIDL/ULongRange.swift | 25 - Sources/DOMKit/WebIDL/Uint32List.swift | 46 - .../DOMKit/WebIDL/VideoColorPrimaries.swift | 23 - Sources/DOMKit/WebIDL/VideoColorSpace.swift | 39 - .../DOMKit/WebIDL/VideoColorSpaceInit.swift | 35 - Sources/DOMKit/WebIDL/VideoDecoder.swift | 70 - .../DOMKit/WebIDL/VideoDecoderConfig.swift | 60 - Sources/DOMKit/WebIDL/VideoDecoderInit.swift | 25 - .../DOMKit/WebIDL/VideoDecoderSupport.swift | 25 - Sources/DOMKit/WebIDL/VideoEncoder.swift | 70 - .../DOMKit/WebIDL/VideoEncoderConfig.swift | 75 - .../WebIDL/VideoEncoderEncodeOptions.swift | 20 - Sources/DOMKit/WebIDL/VideoEncoderInit.swift | 25 - .../DOMKit/WebIDL/VideoEncoderSupport.swift | 25 - .../DOMKit/WebIDL/VideoFacingModeEnum.swift | 24 - Sources/DOMKit/WebIDL/VideoFrame.swift | 89 -- .../DOMKit/WebIDL/VideoFrameBufferInit.swift | 65 - .../WebIDL/VideoFrameCopyToOptions.swift | 25 - Sources/DOMKit/WebIDL/VideoFrameInit.swift | 45 - .../WebIDL/VideoMatrixCoefficients.swift | 24 - Sources/DOMKit/WebIDL/VideoPixelFormat.swift | 29 - .../DOMKit/WebIDL/VideoResizeModeEnum.swift | 22 - .../WebIDL/VideoTransferCharacteristics.swift | 23 - .../WebIDL/WebGL2RenderingContext.swift | 14 - .../WebIDL/WebGL2RenderingContextBase.swift | 1162 ---------------- .../WebGL2RenderingContextOverloads.swift | 317 ----- Sources/DOMKit/WebIDL/WebGLActiveInfo.swift | 26 - Sources/DOMKit/WebIDL/WebGLBuffer.swift | 12 - .../WebIDL/WebGLContextAttributes.swift | 60 - Sources/DOMKit/WebIDL/WebGLContextEvent.swift | 20 - .../DOMKit/WebIDL/WebGLContextEventInit.swift | 20 - Sources/DOMKit/WebIDL/WebGLFramebuffer.swift | 12 - Sources/DOMKit/WebIDL/WebGLObject.swift | 14 - .../DOMKit/WebIDL/WebGLPowerPreference.swift | 23 - Sources/DOMKit/WebIDL/WebGLProgram.swift | 12 - Sources/DOMKit/WebIDL/WebGLQuery.swift | 12 - Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift | 12 - .../DOMKit/WebIDL/WebGLRenderingContext.swift | 14 - .../WebIDL/WebGLRenderingContextBase.swift | 1217 ----------------- .../WebGLRenderingContextOverloads.swift | 165 --- Sources/DOMKit/WebIDL/WebGLSampler.swift | 12 - Sources/DOMKit/WebIDL/WebGLShader.swift | 12 - .../WebIDL/WebGLShaderPrecisionFormat.swift | 26 - Sources/DOMKit/WebIDL/WebGLSync.swift | 12 - Sources/DOMKit/WebIDL/WebGLTexture.swift | 12 - .../WebIDL/WebGLTransformFeedback.swift | 12 - .../DOMKit/WebIDL/WebGLUniformLocation.swift | 14 - .../WebIDL/WebGLVertexArrayObject.swift | 12 - Sources/DOMKit/WebIDL/console.swift | 105 -- Sources/WebIDLToSwift/IDLBuilder.swift | 1 + 142 files changed, 2 insertions(+), 7598 deletions(-) delete mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioData.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift delete mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift delete mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift delete mode 100644 Sources/DOMKit/WebIDL/CodecState.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift delete mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift delete mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/Float32List.swift delete mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift delete mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift delete mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/Int32List.swift delete mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift delete mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift delete mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift delete mode 100644 Sources/DOMKit/WebIDL/Screen.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift delete mode 100644 Sources/DOMKit/WebIDL/Uint32List.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLQuery.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLSampler.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLSync.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift delete mode 100644 Sources/DOMKit/WebIDL/console.swift diff --git a/Package.resolved b/Package.resolved index 60906fdc..2c01643c 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/swiftwasm/JavaScriptKit.git", "state": { "branch": "main", - "revision": "95d0c4cd78b48ffc7e19c618d57c3244917be09a", + "revision": "384ef252c70bd0b9988e1cef95b416e6ed48d82f", "version": null } } diff --git a/Sources/DOMKit/WebIDL/AlphaOption.swift b/Sources/DOMKit/WebIDL/AlphaOption.swift deleted file mode 100644 index f086fd3a..00000000 --- a/Sources/DOMKit/WebIDL/AlphaOption.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AlphaOption: JSString, JSValueCompatible { - case keep = "keep" - case discard = "discard" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/AudioData.swift b/Sources/DOMKit/WebIDL/AudioData.swift deleted file mode 100644 index a0fc829f..00000000 --- a/Sources/DOMKit/WebIDL/AudioData.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioData: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) - _sampleRate = ReadonlyAttribute(jsObject: jsObject, name: Strings.sampleRate) - _numberOfFrames = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfFrames) - _numberOfChannels = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfChannels) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioDataInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var format: AudioSampleFormat? - - @ReadonlyAttribute - public var sampleRate: Float - - @ReadonlyAttribute - public var numberOfFrames: UInt32 - - @ReadonlyAttribute - public var numberOfChannels: UInt32 - - @ReadonlyAttribute - public var duration: UInt64 - - @ReadonlyAttribute - public var timestamp: Int64 - - @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { - let this = jsObject - return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! - } - - @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift deleted file mode 100644 index 78daea46..00000000 --- a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDataCopyToOptions: BridgedDictionary { - public convenience init(planeIndex: UInt32, frameOffset: UInt32, frameCount: UInt32, format: AudioSampleFormat) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.planeIndex] = planeIndex.jsValue - object[Strings.frameOffset] = frameOffset.jsValue - object[Strings.frameCount] = frameCount.jsValue - object[Strings.format] = format.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _planeIndex = ReadWriteAttribute(jsObject: object, name: Strings.planeIndex) - _frameOffset = ReadWriteAttribute(jsObject: object, name: Strings.frameOffset) - _frameCount = ReadWriteAttribute(jsObject: object, name: Strings.frameCount) - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var planeIndex: UInt32 - - @ReadWriteAttribute - public var frameOffset: UInt32 - - @ReadWriteAttribute - public var frameCount: UInt32 - - @ReadWriteAttribute - public var format: AudioSampleFormat -} diff --git a/Sources/DOMKit/WebIDL/AudioDataInit.swift b/Sources/DOMKit/WebIDL/AudioDataInit.swift deleted file mode 100644 index d0395761..00000000 --- a/Sources/DOMKit/WebIDL/AudioDataInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDataInit: BridgedDictionary { - public convenience init(format: AudioSampleFormat, sampleRate: Float, numberOfFrames: UInt32, numberOfChannels: UInt32, timestamp: Int64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.format] = format.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfFrames] = numberOfFrames.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfFrames = ReadWriteAttribute(jsObject: object, name: Strings.numberOfFrames) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var format: AudioSampleFormat - - @ReadWriteAttribute - public var sampleRate: Float - - @ReadWriteAttribute - public var numberOfFrames: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoder.swift b/Sources/DOMKit/WebIDL/AudioDecoder.swift deleted file mode 100644 index d511e5ba..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var decodeQueueSize: UInt32 - - @inlinable public func configure(config: AudioDecoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func decode(chunk: EncodedAudioChunk) { - let this = jsObject - _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: AudioDecoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: AudioDecoderConfig) async throws -> AudioDecoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift deleted file mode 100644 index 55aa5a27..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderConfig: BridgedDictionary { - public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, description: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.description] = description.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _description = ReadWriteAttribute(jsObject: object, name: Strings.description) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var sampleRate: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var description: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift deleted file mode 100644 index b98e0449..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderInit: BridgedDictionary { - public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1Void - public var output: AudioDataOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift deleted file mode 100644 index 8245e0da..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: AudioDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: AudioDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoder.swift b/Sources/DOMKit/WebIDL/AudioEncoder.swift deleted file mode 100644 index 7565bc23..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioEncoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var encodeQueueSize: UInt32 - - @inlinable public func configure(config: AudioEncoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func encode(data: AudioData) { - let this = jsObject - _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: AudioEncoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: AudioEncoderConfig) async throws -> AudioEncoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift deleted file mode 100644 index 0d8f8acf..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderConfig: BridgedDictionary { - public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, bitrate: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.bitrate] = bitrate.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var sampleRate: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var bitrate: UInt64 -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift deleted file mode 100644 index 550e8415..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderInit: BridgedDictionary { - public convenience init(output: @escaping EncodedAudioChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute2Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute2Void - public var output: EncodedAudioChunkOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift deleted file mode 100644 index bed3a52b..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: AudioEncoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: AudioEncoderConfig -} diff --git a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift deleted file mode 100644 index a629b0a5..00000000 --- a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AudioSampleFormat: JSString, JSValueCompatible { - case u8 = "u8" - case s16 = "s16" - case s32 = "s32" - case f32 = "f32" - case u8Planar = "u8-planar" - case s16Planar = "s16-planar" - case s32Planar = "s32-planar" - case f32Planar = "f32-planar" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/BitrateMode.swift b/Sources/DOMKit/WebIDL/BitrateMode.swift deleted file mode 100644 index b0001ae7..00000000 --- a/Sources/DOMKit/WebIDL/BitrateMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum BitrateMode: JSString, JSValueCompatible { - case constant = "constant" - case variable = "variable" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/BlobEvent.swift b/Sources/DOMKit/WebIDL/BlobEvent.swift deleted file mode 100644 index 2f09f782..00000000 --- a/Sources/DOMKit/WebIDL/BlobEvent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BlobEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BlobEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _timecode = ReadonlyAttribute(jsObject: jsObject, name: Strings.timecode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: BlobEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var data: Blob - - @ReadonlyAttribute - public var timecode: DOMHighResTimeStamp -} diff --git a/Sources/DOMKit/WebIDL/BlobEventInit.swift b/Sources/DOMKit/WebIDL/BlobEventInit.swift deleted file mode 100644 index adb0fd32..00000000 --- a/Sources/DOMKit/WebIDL/BlobEventInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BlobEventInit: BridgedDictionary { - public convenience init(data: Blob, timecode: DOMHighResTimeStamp) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.timecode] = timecode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _timecode = ReadWriteAttribute(jsObject: object, name: Strings.timecode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: Blob - - @ReadWriteAttribute - public var timecode: DOMHighResTimeStamp -} diff --git a/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift deleted file mode 100644 index 1c9c71e0..00000000 --- a/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Bool_or_MediaTrackConstraints: ConvertibleToJSValue {} -extension Bool: Any_Bool_or_MediaTrackConstraints {} -extension MediaTrackConstraints: Any_Bool_or_MediaTrackConstraints {} - -public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaTrackConstraints { - case bool(Bool) - case mediaTrackConstraints(MediaTrackConstraints) - - var bool: Bool? { - switch self { - case let .bool(bool): return bool - default: return nil - } - } - - var mediaTrackConstraints: MediaTrackConstraints? { - switch self { - case let .mediaTrackConstraints(mediaTrackConstraints): return mediaTrackConstraints - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bool: Bool = value.fromJSValue() { - return .bool(bool) - } - if let mediaTrackConstraints: MediaTrackConstraints = value.fromJSValue() { - return .mediaTrackConstraints(mediaTrackConstraints) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bool(bool): - return bool.jsValue - case let .mediaTrackConstraints(mediaTrackConstraints): - return mediaTrackConstraints.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift deleted file mode 100644 index 53fb3394..00000000 --- a/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Bool_or_ScrollIntoViewOptions: ConvertibleToJSValue {} -extension Bool: Any_Bool_or_ScrollIntoViewOptions {} -extension ScrollIntoViewOptions: Any_Bool_or_ScrollIntoViewOptions {} - -public enum Bool_or_ScrollIntoViewOptions: JSValueCompatible, Any_Bool_or_ScrollIntoViewOptions { - case bool(Bool) - case scrollIntoViewOptions(ScrollIntoViewOptions) - - var bool: Bool? { - switch self { - case let .bool(bool): return bool - default: return nil - } - } - - var scrollIntoViewOptions: ScrollIntoViewOptions? { - switch self { - case let .scrollIntoViewOptions(scrollIntoViewOptions): return scrollIntoViewOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bool: Bool = value.fromJSValue() { - return .bool(bool) - } - if let scrollIntoViewOptions: ScrollIntoViewOptions = value.fromJSValue() { - return .scrollIntoViewOptions(scrollIntoViewOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bool(bool): - return bool.jsValue - case let .scrollIntoViewOptions(scrollIntoViewOptions): - return scrollIntoViewOptions.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/BoxQuadOptions.swift b/Sources/DOMKit/WebIDL/BoxQuadOptions.swift deleted file mode 100644 index 9c68f521..00000000 --- a/Sources/DOMKit/WebIDL/BoxQuadOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BoxQuadOptions: BridgedDictionary { - public convenience init(box: CSSBoxType, relativeTo: GeometryNode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.box] = box.jsValue - object[Strings.relativeTo] = relativeTo.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _box = ReadWriteAttribute(jsObject: object, name: Strings.box) - _relativeTo = ReadWriteAttribute(jsObject: object, name: Strings.relativeTo) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var box: CSSBoxType - - @ReadWriteAttribute - public var relativeTo: GeometryNode -} diff --git a/Sources/DOMKit/WebIDL/CSSBoxType.swift b/Sources/DOMKit/WebIDL/CSSBoxType.swift deleted file mode 100644 index 55fb3a91..00000000 --- a/Sources/DOMKit/WebIDL/CSSBoxType.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CSSBoxType: JSString, JSValueCompatible { - case margin = "margin" - case border = "border" - case padding = "padding" - case content = "content" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement.swift deleted file mode 100644 index 29314d8d..00000000 --- a/Sources/DOMKit/WebIDL/CSSPseudoElement.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CSSPseudoElement: EventTarget, GeometryUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CSSPseudoElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _element = ReadonlyAttribute(jsObject: jsObject, name: Strings.element) - _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var element: Element - - @ReadonlyAttribute - public var parent: CSSPseudoElement_or_Element - - @inlinable public func pseudo(type: String) -> CSSPseudoElement? { - let this = jsObject - return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift deleted file mode 100644 index 3c06e5d5..00000000 --- a/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CSSPseudoElement_or_Element: ConvertibleToJSValue {} -extension CSSPseudoElement: Any_CSSPseudoElement_or_Element {} -extension Element: Any_CSSPseudoElement_or_Element {} - -public enum CSSPseudoElement_or_Element: JSValueCompatible, Any_CSSPseudoElement_or_Element { - case cssPseudoElement(CSSPseudoElement) - case element(Element) - - var cssPseudoElement: CSSPseudoElement? { - switch self { - case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement - default: return nil - } - } - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { - return .cssPseudoElement(cssPseudoElement) - } - if let element: Element = value.fromJSValue() { - return .element(element) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .cssPseudoElement(cssPseudoElement): - return cssPseudoElement.jsValue - case let .element(element): - return element.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift deleted file mode 100644 index ee012fa8..00000000 --- a/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CameraDevicePermissionDescriptor: BridgedDictionary { - public convenience init(panTiltZoom: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.panTiltZoom] = panTiltZoom.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _panTiltZoom = ReadWriteAttribute(jsObject: object, name: Strings.panTiltZoom) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var panTiltZoom: Bool -} diff --git a/Sources/DOMKit/WebIDL/CaretPosition.swift b/Sources/DOMKit/WebIDL/CaretPosition.swift deleted file mode 100644 index 385d49ef..00000000 --- a/Sources/DOMKit/WebIDL/CaretPosition.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CaretPosition: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CaretPosition].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _offsetNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetNode) - _offset = ReadonlyAttribute(jsObject: jsObject, name: Strings.offset) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var offsetNode: Node - - @ReadonlyAttribute - public var offset: UInt32 - - @inlinable public func getClientRect() -> DOMRect? { - let this = jsObject - return this[Strings.getClientRect].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CodecState.swift b/Sources/DOMKit/WebIDL/CodecState.swift deleted file mode 100644 index 3495763f..00000000 --- a/Sources/DOMKit/WebIDL/CodecState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CodecState: JSString, JSValueCompatible { - case unconfigured = "unconfigured" - case configured = "configured" - case closed = "closed" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainBoolean.swift b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift deleted file mode 100644 index 38559275..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainBoolean.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainBoolean: ConvertibleToJSValue {} -extension Bool: Any_ConstrainBoolean {} -extension ConstrainBooleanParameters: Any_ConstrainBoolean {} - -public enum ConstrainBoolean: JSValueCompatible, Any_ConstrainBoolean { - case bool(Bool) - case constrainBooleanParameters(ConstrainBooleanParameters) - - var bool: Bool? { - switch self { - case let .bool(bool): return bool - default: return nil - } - } - - var constrainBooleanParameters: ConstrainBooleanParameters? { - switch self { - case let .constrainBooleanParameters(constrainBooleanParameters): return constrainBooleanParameters - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bool: Bool = value.fromJSValue() { - return .bool(bool) - } - if let constrainBooleanParameters: ConstrainBooleanParameters = value.fromJSValue() { - return .constrainBooleanParameters(constrainBooleanParameters) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bool(bool): - return bool.jsValue - case let .constrainBooleanParameters(constrainBooleanParameters): - return constrainBooleanParameters.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift deleted file mode 100644 index aed2cd3b..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainBooleanParameters: BridgedDictionary { - public convenience init(exact: Bool, ideal: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: Bool - - @ReadWriteAttribute - public var ideal: Bool -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift deleted file mode 100644 index 5c2cb816..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainDOMString: ConvertibleToJSValue {} -extension ConstrainDOMStringParameters: Any_ConstrainDOMString {} -extension String: Any_ConstrainDOMString {} -extension Array: Any_ConstrainDOMString where Element == String {} - -public enum ConstrainDOMString: JSValueCompatible, Any_ConstrainDOMString { - case constrainDOMStringParameters(ConstrainDOMStringParameters) - case string(String) - case seq_of_String([String]) - - var constrainDOMStringParameters: ConstrainDOMStringParameters? { - switch self { - case let .constrainDOMStringParameters(constrainDOMStringParameters): return constrainDOMStringParameters - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var seq_of_String: [String]? { - switch self { - case let .seq_of_String(seq_of_String): return seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let constrainDOMStringParameters: ConstrainDOMStringParameters = value.fromJSValue() { - return .constrainDOMStringParameters(constrainDOMStringParameters) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - if let seq_of_String: [String] = value.fromJSValue() { - return .seq_of_String(seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .constrainDOMStringParameters(constrainDOMStringParameters): - return constrainDOMStringParameters.jsValue - case let .string(string): - return string.jsValue - case let .seq_of_String(seq_of_String): - return seq_of_String.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift deleted file mode 100644 index 8a51b973..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainDOMStringParameters: BridgedDictionary { - public convenience init(exact: String_or_seq_of_String, ideal: String_or_seq_of_String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: String_or_seq_of_String - - @ReadWriteAttribute - public var ideal: String_or_seq_of_String -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDouble.swift b/Sources/DOMKit/WebIDL/ConstrainDouble.swift deleted file mode 100644 index 41993e8a..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDouble.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainDouble: ConvertibleToJSValue {} -extension ConstrainDoubleRange: Any_ConstrainDouble {} -extension Double: Any_ConstrainDouble {} - -public enum ConstrainDouble: JSValueCompatible, Any_ConstrainDouble { - case constrainDoubleRange(ConstrainDoubleRange) - case double(Double) - - var constrainDoubleRange: ConstrainDoubleRange? { - switch self { - case let .constrainDoubleRange(constrainDoubleRange): return constrainDoubleRange - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let constrainDoubleRange: ConstrainDoubleRange = value.fromJSValue() { - return .constrainDoubleRange(constrainDoubleRange) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .constrainDoubleRange(constrainDoubleRange): - return constrainDoubleRange.jsValue - case let .double(double): - return double.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift deleted file mode 100644 index 9ee176e9..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainDoubleRange: BridgedDictionary { - public convenience init(exact: Double, ideal: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: Double - - @ReadWriteAttribute - public var ideal: Double -} diff --git a/Sources/DOMKit/WebIDL/ConstrainULong.swift b/Sources/DOMKit/WebIDL/ConstrainULong.swift deleted file mode 100644 index 614cf30b..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainULong.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainULong: ConvertibleToJSValue {} -extension ConstrainULongRange: Any_ConstrainULong {} -extension UInt32: Any_ConstrainULong {} - -public enum ConstrainULong: JSValueCompatible, Any_ConstrainULong { - case constrainULongRange(ConstrainULongRange) - case uInt32(UInt32) - - var constrainULongRange: ConstrainULongRange? { - switch self { - case let .constrainULongRange(constrainULongRange): return constrainULongRange - default: return nil - } - } - - var uInt32: UInt32? { - switch self { - case let .uInt32(uInt32): return uInt32 - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let constrainULongRange: ConstrainULongRange = value.fromJSValue() { - return .constrainULongRange(constrainULongRange) - } - if let uInt32: UInt32 = value.fromJSValue() { - return .uInt32(uInt32) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .constrainULongRange(constrainULongRange): - return constrainULongRange.jsValue - case let .uInt32(uInt32): - return uInt32.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift deleted file mode 100644 index 5a87be30..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainULongRange: BridgedDictionary { - public convenience init(exact: UInt32, ideal: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: UInt32 - - @ReadWriteAttribute - public var ideal: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift deleted file mode 100644 index e5671dbc..00000000 --- a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConvertCoordinateOptions: BridgedDictionary { - public convenience init(fromBox: CSSBoxType, toBox: CSSBoxType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.fromBox] = fromBox.jsValue - object[Strings.toBox] = toBox.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _fromBox = ReadWriteAttribute(jsObject: object, name: Strings.fromBox) - _toBox = ReadWriteAttribute(jsObject: object, name: Strings.toBox) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var fromBox: CSSBoxType - - @ReadWriteAttribute - public var toBox: CSSBoxType -} diff --git a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift deleted file mode 100644 index 92ae09de..00000000 --- a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DevicePermissionDescriptor: BridgedDictionary { - public convenience init(deviceId: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.deviceId] = deviceId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var deviceId: String -} diff --git a/Sources/DOMKit/WebIDL/DoubleRange.swift b/Sources/DOMKit/WebIDL/DoubleRange.swift deleted file mode 100644 index b58107cf..00000000 --- a/Sources/DOMKit/WebIDL/DoubleRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DoubleRange: BridgedDictionary { - public convenience init(max: Double, min: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.max] = max.jsValue - object[Strings.min] = min.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _max = ReadWriteAttribute(jsObject: object, name: Strings.max) - _min = ReadWriteAttribute(jsObject: object, name: Strings.min) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var max: Double - - @ReadWriteAttribute - public var min: Double -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift deleted file mode 100644 index 010e2b06..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunk: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedAudioChunk].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: EncodedAudioChunkInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: EncodedAudioChunkType - - @ReadonlyAttribute - public var timestamp: Int64 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var byteLength: UInt32 - - @inlinable public func copyTo(destination: BufferSource) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift deleted file mode 100644 index 054201f8..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunkInit: BridgedDictionary { - public convenience init(type: EncodedAudioChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: EncodedAudioChunkType - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift deleted file mode 100644 index 6f5f8314..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunkMetadata: BridgedDictionary { - public convenience init(decoderConfig: AudioDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.decoderConfig] = decoderConfig.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var decoderConfig: AudioDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift deleted file mode 100644 index 9c35362e..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EncodedAudioChunkType: JSString, JSValueCompatible { - case key = "key" - case delta = "delta" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift deleted file mode 100644 index 1da80666..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunk: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedVideoChunk].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: EncodedVideoChunkInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: EncodedVideoChunkType - - @ReadonlyAttribute - public var timestamp: Int64 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var byteLength: UInt32 - - @inlinable public func copyTo(destination: BufferSource) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift deleted file mode 100644 index 0c95c51f..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunkInit: BridgedDictionary { - public convenience init(type: EncodedVideoChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: EncodedVideoChunkType - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift deleted file mode 100644 index 6b3572e9..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunkMetadata: BridgedDictionary { - public convenience init(decoderConfig: VideoDecoderConfig, svc: SvcOutputMetadata, alphaSideData: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.decoderConfig] = decoderConfig.jsValue - object[Strings.svc] = svc.jsValue - object[Strings.alphaSideData] = alphaSideData.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) - _svc = ReadWriteAttribute(jsObject: object, name: Strings.svc) - _alphaSideData = ReadWriteAttribute(jsObject: object, name: Strings.alphaSideData) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var decoderConfig: VideoDecoderConfig - - @ReadWriteAttribute - public var svc: SvcOutputMetadata - - @ReadWriteAttribute - public var alphaSideData: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift deleted file mode 100644 index f59b9723..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EncodedVideoChunkType: JSString, JSValueCompatible { - case key = "key" - case delta = "delta" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Float32List.swift b/Sources/DOMKit/WebIDL/Float32List.swift deleted file mode 100644 index 1f1e5bdb..00000000 --- a/Sources/DOMKit/WebIDL/Float32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Float32List: ConvertibleToJSValue {} -extension Float32Array: Any_Float32List {} -extension Array: Any_Float32List where Element == GLfloat {} - -public enum Float32List: JSValueCompatible, Any_Float32List { - case float32Array(Float32Array) - case seq_of_GLfloat([GLfloat]) - - var float32Array: Float32Array? { - switch self { - case let .float32Array(float32Array): return float32Array - default: return nil - } - } - - var seq_of_GLfloat: [GLfloat]? { - switch self { - case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let float32Array: Float32Array = value.fromJSValue() { - return .float32Array(float32Array) - } - if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { - return .seq_of_GLfloat(seq_of_GLfloat) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .float32Array(float32Array): - return float32Array.jsValue - case let .seq_of_GLfloat(seq_of_GLfloat): - return seq_of_GLfloat.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/GeometryNode.swift b/Sources/DOMKit/WebIDL/GeometryNode.swift deleted file mode 100644 index 5554a102..00000000 --- a/Sources/DOMKit/WebIDL/GeometryNode.swift +++ /dev/null @@ -1,74 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_GeometryNode: ConvertibleToJSValue {} -extension CSSPseudoElement: Any_GeometryNode {} -extension Document: Any_GeometryNode {} -extension Element: Any_GeometryNode {} -extension Text: Any_GeometryNode {} - -public enum GeometryNode: JSValueCompatible, Any_GeometryNode { - case cssPseudoElement(CSSPseudoElement) - case document(Document) - case element(Element) - case text(Text) - - var cssPseudoElement: CSSPseudoElement? { - switch self { - case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement - default: return nil - } - } - - var document: Document? { - switch self { - case let .document(document): return document - default: return nil - } - } - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var text: Text? { - switch self { - case let .text(text): return text - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { - return .cssPseudoElement(cssPseudoElement) - } - if let document: Document = value.fromJSValue() { - return .document(document) - } - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let text: Text = value.fromJSValue() { - return .text(text) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .cssPseudoElement(cssPseudoElement): - return cssPseudoElement.jsValue - case let .document(document): - return document.jsValue - case let .element(element): - return element.jsValue - case let .text(text): - return text.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/GeometryUtils.swift b/Sources/DOMKit/WebIDL/GeometryUtils.swift deleted file mode 100644 index 15114de3..00000000 --- a/Sources/DOMKit/WebIDL/GeometryUtils.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol GeometryUtils: JSBridgedClass {} -public extension GeometryUtils { - @inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] { - let this = jsObject - return this[Strings.getBoxQuads].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func convertQuadFromNode(quad: DOMQuadInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { - let this = jsObject - return this[Strings.convertQuadFromNode].function!(this: this, arguments: [quad.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { - let this = jsObject - return this[Strings.convertRectFromNode].function!(this: this, arguments: [rect.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMPoint { - let this = jsObject - return this[Strings.convertPointFromNode].function!(this: this, arguments: [point.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift deleted file mode 100644 index 9adb76b1..00000000 --- a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum HardwareAcceleration: JSString, JSValueCompatible { - case noPreference = "no-preference" - case preferHardware = "prefer-hardware" - case preferSoftware = "prefer-software" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ImageBufferSource.swift b/Sources/DOMKit/WebIDL/ImageBufferSource.swift deleted file mode 100644 index 0aa23282..00000000 --- a/Sources/DOMKit/WebIDL/ImageBufferSource.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ImageBufferSource: ConvertibleToJSValue {} -extension BufferSource: Any_ImageBufferSource {} -extension ReadableStream: Any_ImageBufferSource {} - -public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { - case bufferSource(BufferSource) - case readableStream(ReadableStream) - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var readableStream: ReadableStream? { - switch self { - case let .readableStream(readableStream): return readableStream - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let readableStream: ReadableStream = value.fromJSValue() { - return .readableStream(readableStream) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .readableStream(readableStream): - return readableStream.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift deleted file mode 100644 index 89806708..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecodeOptions: BridgedDictionary { - public convenience init(frameIndex: UInt32, completeFramesOnly: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.frameIndex] = frameIndex.jsValue - object[Strings.completeFramesOnly] = completeFramesOnly.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _frameIndex = ReadWriteAttribute(jsObject: object, name: Strings.frameIndex) - _completeFramesOnly = ReadWriteAttribute(jsObject: object, name: Strings.completeFramesOnly) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var frameIndex: UInt32 - - @ReadWriteAttribute - public var completeFramesOnly: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift deleted file mode 100644 index 1a4cb939..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecodeResult: BridgedDictionary { - public convenience init(image: VideoFrame, complete: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.image] = image.jsValue - object[Strings.complete] = complete.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _image = ReadWriteAttribute(jsObject: object, name: Strings.image) - _complete = ReadWriteAttribute(jsObject: object, name: Strings.complete) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var image: VideoFrame - - @ReadWriteAttribute - public var complete: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageDecoder.swift b/Sources/DOMKit/WebIDL/ImageDecoder.swift deleted file mode 100644 index 6112d940..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecoder.swift +++ /dev/null @@ -1,68 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) - _completed = ReadonlyAttribute(jsObject: jsObject, name: Strings.completed) - _tracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.tracks) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: ImageDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var complete: Bool - - @ReadonlyAttribute - public var completed: JSPromise - - @ReadonlyAttribute - public var tracks: ImageTrackList - - @inlinable public func decode(options: ImageDecodeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func decode(options: ImageDecodeOptions? = nil) async throws -> ImageDecodeResult { - let this = jsObject - let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isTypeSupported(type: String) -> JSPromise { - let this = constructor - return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isTypeSupported(type: String) async throws -> Bool { - let this = constructor - let _promise: JSPromise = this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift deleted file mode 100644 index 06179973..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecoderInit: BridgedDictionary { - public convenience init(type: String, data: ImageBufferSource, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, desiredWidth: UInt32, desiredHeight: UInt32, preferAnimation: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.data] = data.jsValue - object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue - object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue - object[Strings.desiredWidth] = desiredWidth.jsValue - object[Strings.desiredHeight] = desiredHeight.jsValue - object[Strings.preferAnimation] = preferAnimation.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) - _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) - _desiredWidth = ReadWriteAttribute(jsObject: object, name: Strings.desiredWidth) - _desiredHeight = ReadWriteAttribute(jsObject: object, name: Strings.desiredHeight) - _preferAnimation = ReadWriteAttribute(jsObject: object, name: Strings.preferAnimation) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var data: ImageBufferSource - - @ReadWriteAttribute - public var premultiplyAlpha: PremultiplyAlpha - - @ReadWriteAttribute - public var colorSpaceConversion: ColorSpaceConversion - - @ReadWriteAttribute - public var desiredWidth: UInt32 - - @ReadWriteAttribute - public var desiredHeight: UInt32 - - @ReadWriteAttribute - public var preferAnimation: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageTrack.swift b/Sources/DOMKit/WebIDL/ImageTrack.swift deleted file mode 100644 index b68c7a97..00000000 --- a/Sources/DOMKit/WebIDL/ImageTrack.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ImageTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _animated = ReadonlyAttribute(jsObject: jsObject, name: Strings.animated) - _frameCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameCount) - _repetitionCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.repetitionCount) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var animated: Bool - - @ReadonlyAttribute - public var frameCount: UInt32 - - @ReadonlyAttribute - public var repetitionCount: Float - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ReadWriteAttribute - public var selected: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageTrackList.swift b/Sources/DOMKit/WebIDL/ImageTrackList.swift deleted file mode 100644 index 10b44925..00000000 --- a/Sources/DOMKit/WebIDL/ImageTrackList.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageTrackList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageTrackList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _selectedTrack = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedTrack) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> ImageTrack { - jsObject[key].fromJSValue()! - } - - @ReadonlyAttribute - public var ready: JSPromise - - @ReadonlyAttribute - public var length: UInt32 - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ReadonlyAttribute - public var selectedTrack: ImageTrack? -} diff --git a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift deleted file mode 100644 index d6170195..00000000 --- a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift +++ /dev/null @@ -1,17 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class InputDeviceInfo: MediaDeviceInfo { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputDeviceInfo].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func getCapabilities() -> MediaTrackCapabilities { - let this = jsObject - return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/Int32List.swift b/Sources/DOMKit/WebIDL/Int32List.swift deleted file mode 100644 index ce876a5b..00000000 --- a/Sources/DOMKit/WebIDL/Int32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Int32List: ConvertibleToJSValue {} -extension Int32Array: Any_Int32List {} -extension Array: Any_Int32List where Element == GLint {} - -public enum Int32List: JSValueCompatible, Any_Int32List { - case int32Array(Int32Array) - case seq_of_GLint([GLint]) - - var int32Array: Int32Array? { - switch self { - case let .int32Array(int32Array): return int32Array - default: return nil - } - } - - var seq_of_GLint: [GLint]? { - switch self { - case let .seq_of_GLint(seq_of_GLint): return seq_of_GLint - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let int32Array: Int32Array = value.fromJSValue() { - return .int32Array(int32Array) - } - if let seq_of_GLint: [GLint] = value.fromJSValue() { - return .seq_of_GLint(seq_of_GLint) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .int32Array(int32Array): - return int32Array.jsValue - case let .seq_of_GLint(seq_of_GLint): - return seq_of_GLint.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift deleted file mode 100644 index 2cf015a8..00000000 --- a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class IsVisibleOptions: BridgedDictionary { - public convenience init() { - let object = JSObject.global[Strings.Object].function!.new() - - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - super.init(unsafelyWrapping: object) - } -} diff --git a/Sources/DOMKit/WebIDL/LatencyMode.swift b/Sources/DOMKit/WebIDL/LatencyMode.swift deleted file mode 100644 index d4aa61af..00000000 --- a/Sources/DOMKit/WebIDL/LatencyMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum LatencyMode: JSString, JSValueCompatible { - case quality = "quality" - case realtime = "realtime" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift deleted file mode 100644 index 1f063478..00000000 --- a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaDeviceInfo: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaDeviceInfo].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _deviceId = ReadonlyAttribute(jsObject: jsObject, name: Strings.deviceId) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _groupId = ReadonlyAttribute(jsObject: jsObject, name: Strings.groupId) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var deviceId: String - - @ReadonlyAttribute - public var kind: MediaDeviceKind - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var groupId: String - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift deleted file mode 100644 index a19daab0..00000000 --- a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum MediaDeviceKind: JSString, JSValueCompatible { - case audioinput = "audioinput" - case audiooutput = "audiooutput" - case videoinput = "videoinput" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/MediaDevices.swift b/Sources/DOMKit/WebIDL/MediaDevices.swift deleted file mode 100644 index a65b2d59..00000000 --- a/Sources/DOMKit/WebIDL/MediaDevices.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaDevices: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaDevices].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _ondevicechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondevicechange) - super.init(unsafelyWrapping: jsObject) - } - - @ClosureAttribute1Optional - public var ondevicechange: EventHandler - - @inlinable public func enumerateDevices() -> JSPromise { - let this = jsObject - return this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func enumerateDevices() async throws -> [MediaDeviceInfo] { - let this = jsObject - let _promise: JSPromise = this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getSupportedConstraints() -> MediaTrackSupportedConstraints { - let this = jsObject - return this[Strings.getSupportedConstraints].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) -> JSPromise { - let this = jsObject - return this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) async throws -> MediaStream { - let this = jsObject - let _promise: JSPromise = this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MediaQueryList.swift b/Sources/DOMKit/WebIDL/MediaQueryList.swift deleted file mode 100644 index e2f6e574..00000000 --- a/Sources/DOMKit/WebIDL/MediaQueryList.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaQueryList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) - _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var media: String - - @ReadonlyAttribute - public var matches: Bool - - // XXX: member 'addListener' is ignored - - // XXX: member 'removeListener' is ignored - - @ClosureAttribute1Optional - public var onchange: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift deleted file mode 100644 index e74e5c35..00000000 --- a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaQueryListEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryListEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) - _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MediaQueryListEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var media: String - - @ReadonlyAttribute - public var matches: Bool -} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift deleted file mode 100644 index 0f6adc8b..00000000 --- a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaQueryListEventInit: BridgedDictionary { - public convenience init(media: String, matches: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.media] = media.jsValue - object[Strings.matches] = matches.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _media = ReadWriteAttribute(jsObject: object, name: Strings.media) - _matches = ReadWriteAttribute(jsObject: object, name: Strings.matches) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var matches: Bool -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorder.swift b/Sources/DOMKit/WebIDL/MediaRecorder.swift deleted file mode 100644 index 9336c57b..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorder.swift +++ /dev/null @@ -1,94 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorder: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _stream = ReadonlyAttribute(jsObject: jsObject, name: Strings.stream) - _mimeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.mimeType) - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _onstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstart) - _onstop = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstop) - _ondataavailable = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondataavailable) - _onpause = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onpause) - _onresume = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onresume) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - _videoBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoBitsPerSecond) - _audioBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitsPerSecond) - _audioBitrateMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitrateMode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(stream: MediaStream, options: MediaRecorderOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var stream: MediaStream - - @ReadonlyAttribute - public var mimeType: String - - @ReadonlyAttribute - public var state: RecordingState - - @ClosureAttribute1Optional - public var onstart: EventHandler - - @ClosureAttribute1Optional - public var onstop: EventHandler - - @ClosureAttribute1Optional - public var ondataavailable: EventHandler - - @ClosureAttribute1Optional - public var onpause: EventHandler - - @ClosureAttribute1Optional - public var onresume: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @ReadonlyAttribute - public var videoBitsPerSecond: UInt32 - - @ReadonlyAttribute - public var audioBitsPerSecond: UInt32 - - @ReadonlyAttribute - public var audioBitrateMode: BitrateMode - - @inlinable public func start(timeslice: UInt32? = nil) { - let this = jsObject - _ = this[Strings.start].function!(this: this, arguments: [timeslice?.jsValue ?? .undefined]) - } - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } - - @inlinable public func pause() { - let this = jsObject - _ = this[Strings.pause].function!(this: this, arguments: []) - } - - @inlinable public func resume() { - let this = jsObject - _ = this[Strings.resume].function!(this: this, arguments: []) - } - - @inlinable public func requestData() { - let this = jsObject - _ = this[Strings.requestData].function!(this: this, arguments: []) - } - - @inlinable public static func isTypeSupported(type: String) -> Bool { - let this = constructor - return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift deleted file mode 100644 index c4b4cc09..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorderErrorEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorderErrorEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MediaRecorderErrorEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var error: DOMException -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift deleted file mode 100644 index 4c773a67..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorderErrorEventInit: BridgedDictionary { - public convenience init(error: DOMException) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.error] = error.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _error = ReadWriteAttribute(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var error: DOMException -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift deleted file mode 100644 index 3a4300b0..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorderOptions: BridgedDictionary { - public convenience init(mimeType: String, audioBitsPerSecond: UInt32, videoBitsPerSecond: UInt32, bitsPerSecond: UInt32, audioBitrateMode: BitrateMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.mimeType] = mimeType.jsValue - object[Strings.audioBitsPerSecond] = audioBitsPerSecond.jsValue - object[Strings.videoBitsPerSecond] = videoBitsPerSecond.jsValue - object[Strings.bitsPerSecond] = bitsPerSecond.jsValue - object[Strings.audioBitrateMode] = audioBitrateMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mimeType = ReadWriteAttribute(jsObject: object, name: Strings.mimeType) - _audioBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.audioBitsPerSecond) - _videoBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.videoBitsPerSecond) - _bitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.bitsPerSecond) - _audioBitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.audioBitrateMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mimeType: String - - @ReadWriteAttribute - public var audioBitsPerSecond: UInt32 - - @ReadWriteAttribute - public var videoBitsPerSecond: UInt32 - - @ReadWriteAttribute - public var bitsPerSecond: UInt32 - - @ReadWriteAttribute - public var audioBitrateMode: BitrateMode -} diff --git a/Sources/DOMKit/WebIDL/MediaStream.swift b/Sources/DOMKit/WebIDL/MediaStream.swift deleted file mode 100644 index 819dac5a..00000000 --- a/Sources/DOMKit/WebIDL/MediaStream.swift +++ /dev/null @@ -1,75 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStream: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public convenience init(stream: MediaStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @inlinable public convenience init(tracks: [MediaStreamTrack]) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [tracks.jsValue])) - } - - @ReadonlyAttribute - public var id: String - - @inlinable public func getAudioTracks() -> [MediaStreamTrack] { - let this = jsObject - return this[Strings.getAudioTracks].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getVideoTracks() -> [MediaStreamTrack] { - let this = jsObject - return this[Strings.getVideoTracks].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getTracks() -> [MediaStreamTrack] { - let this = jsObject - return this[Strings.getTracks].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getTrackById(trackId: String) -> MediaStreamTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [trackId.jsValue]).fromJSValue()! - } - - @inlinable public func addTrack(track: MediaStreamTrack) { - let this = jsObject - _ = this[Strings.addTrack].function!(this: this, arguments: [track.jsValue]) - } - - @inlinable public func removeTrack(track: MediaStreamTrack) { - let this = jsObject - _ = this[Strings.removeTrack].function!(this: this, arguments: [track.jsValue]) - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var active: Bool - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift deleted file mode 100644 index b2ee4cce..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamConstraints: BridgedDictionary { - public convenience init(video: Bool_or_MediaTrackConstraints, audio: Bool_or_MediaTrackConstraints) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.video] = video.jsValue - object[Strings.audio] = audio.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _video = ReadWriteAttribute(jsObject: object, name: Strings.video) - _audio = ReadWriteAttribute(jsObject: object, name: Strings.audio) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var video: Bool_or_MediaTrackConstraints - - @ReadWriteAttribute - public var audio: Bool_or_MediaTrackConstraints -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift deleted file mode 100644 index 450347d9..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift +++ /dev/null @@ -1,85 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) - _muted = ReadonlyAttribute(jsObject: jsObject, name: Strings.muted) - _onmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmute) - _onunmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onunmute) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _onended = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onended) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var label: String - - @ReadWriteAttribute - public var enabled: Bool - - @ReadonlyAttribute - public var muted: Bool - - @ClosureAttribute1Optional - public var onmute: EventHandler - - @ClosureAttribute1Optional - public var onunmute: EventHandler - - @ReadonlyAttribute - public var readyState: MediaStreamTrackState - - @ClosureAttribute1Optional - public var onended: EventHandler - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } - - @inlinable public func getCapabilities() -> MediaTrackCapabilities { - let this = jsObject - return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getConstraints() -> MediaTrackConstraints { - let this = jsObject - return this[Strings.getConstraints].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getSettings() -> MediaTrackSettings { - let this = jsObject - return this[Strings.getSettings].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) -> JSPromise { - let this = jsObject - return this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift deleted file mode 100644 index 21d98e5a..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamTrackEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrackEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MediaStreamTrackEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var track: MediaStreamTrack -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift deleted file mode 100644 index 2bab9838..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamTrackEventInit: BridgedDictionary { - public convenience init(track: MediaStreamTrack) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.track] = track.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _track = ReadWriteAttribute(jsObject: object, name: Strings.track) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var track: MediaStreamTrack -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift deleted file mode 100644 index d08534a1..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum MediaStreamTrackState: JSString, JSValueCompatible { - case live = "live" - case ended = "ended" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift deleted file mode 100644 index 41982ba3..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackCapabilities: BridgedDictionary { - public convenience init(width: ULongRange, height: ULongRange, aspectRatio: DoubleRange, frameRate: DoubleRange, facingMode: [String], resizeMode: [String], sampleRate: ULongRange, sampleSize: ULongRange, echoCancellation: [Bool], autoGainControl: [Bool], noiseSuppression: [Bool], latency: DoubleRange, channelCount: ULongRange, deviceId: String, groupId: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: ULongRange - - @ReadWriteAttribute - public var height: ULongRange - - @ReadWriteAttribute - public var aspectRatio: DoubleRange - - @ReadWriteAttribute - public var frameRate: DoubleRange - - @ReadWriteAttribute - public var facingMode: [String] - - @ReadWriteAttribute - public var resizeMode: [String] - - @ReadWriteAttribute - public var sampleRate: ULongRange - - @ReadWriteAttribute - public var sampleSize: ULongRange - - @ReadWriteAttribute - public var echoCancellation: [Bool] - - @ReadWriteAttribute - public var autoGainControl: [Bool] - - @ReadWriteAttribute - public var noiseSuppression: [Bool] - - @ReadWriteAttribute - public var latency: DoubleRange - - @ReadWriteAttribute - public var channelCount: ULongRange - - @ReadWriteAttribute - public var deviceId: String - - @ReadWriteAttribute - public var groupId: String -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift deleted file mode 100644 index 1489baaa..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackConstraintSet: BridgedDictionary { - public convenience init(width: ConstrainULong, height: ConstrainULong, aspectRatio: ConstrainDouble, frameRate: ConstrainDouble, facingMode: ConstrainDOMString, resizeMode: ConstrainDOMString, sampleRate: ConstrainULong, sampleSize: ConstrainULong, echoCancellation: ConstrainBoolean, autoGainControl: ConstrainBoolean, noiseSuppression: ConstrainBoolean, latency: ConstrainDouble, channelCount: ConstrainULong, deviceId: ConstrainDOMString, groupId: ConstrainDOMString) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: ConstrainULong - - @ReadWriteAttribute - public var height: ConstrainULong - - @ReadWriteAttribute - public var aspectRatio: ConstrainDouble - - @ReadWriteAttribute - public var frameRate: ConstrainDouble - - @ReadWriteAttribute - public var facingMode: ConstrainDOMString - - @ReadWriteAttribute - public var resizeMode: ConstrainDOMString - - @ReadWriteAttribute - public var sampleRate: ConstrainULong - - @ReadWriteAttribute - public var sampleSize: ConstrainULong - - @ReadWriteAttribute - public var echoCancellation: ConstrainBoolean - - @ReadWriteAttribute - public var autoGainControl: ConstrainBoolean - - @ReadWriteAttribute - public var noiseSuppression: ConstrainBoolean - - @ReadWriteAttribute - public var latency: ConstrainDouble - - @ReadWriteAttribute - public var channelCount: ConstrainULong - - @ReadWriteAttribute - public var deviceId: ConstrainDOMString - - @ReadWriteAttribute - public var groupId: ConstrainDOMString -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift deleted file mode 100644 index 5307db8a..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackConstraints: BridgedDictionary { - public convenience init(advanced: [MediaTrackConstraintSet]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.advanced] = advanced.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _advanced = ReadWriteAttribute(jsObject: object, name: Strings.advanced) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var advanced: [MediaTrackConstraintSet] -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift deleted file mode 100644 index 84d866a3..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackSettings: BridgedDictionary { - public convenience init(width: Int32, height: Int32, aspectRatio: Double, frameRate: Double, facingMode: String, resizeMode: String, sampleRate: Int32, sampleSize: Int32, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Double, channelCount: Int32, deviceId: String, groupId: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: Int32 - - @ReadWriteAttribute - public var height: Int32 - - @ReadWriteAttribute - public var aspectRatio: Double - - @ReadWriteAttribute - public var frameRate: Double - - @ReadWriteAttribute - public var facingMode: String - - @ReadWriteAttribute - public var resizeMode: String - - @ReadWriteAttribute - public var sampleRate: Int32 - - @ReadWriteAttribute - public var sampleSize: Int32 - - @ReadWriteAttribute - public var echoCancellation: Bool - - @ReadWriteAttribute - public var autoGainControl: Bool - - @ReadWriteAttribute - public var noiseSuppression: Bool - - @ReadWriteAttribute - public var latency: Double - - @ReadWriteAttribute - public var channelCount: Int32 - - @ReadWriteAttribute - public var deviceId: String - - @ReadWriteAttribute - public var groupId: String -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift deleted file mode 100644 index bcbfd4ba..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackSupportedConstraints: BridgedDictionary { - public convenience init(width: Bool, height: Bool, aspectRatio: Bool, frameRate: Bool, facingMode: Bool, resizeMode: Bool, sampleRate: Bool, sampleSize: Bool, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Bool, channelCount: Bool, deviceId: Bool, groupId: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: Bool - - @ReadWriteAttribute - public var height: Bool - - @ReadWriteAttribute - public var aspectRatio: Bool - - @ReadWriteAttribute - public var frameRate: Bool - - @ReadWriteAttribute - public var facingMode: Bool - - @ReadWriteAttribute - public var resizeMode: Bool - - @ReadWriteAttribute - public var sampleRate: Bool - - @ReadWriteAttribute - public var sampleSize: Bool - - @ReadWriteAttribute - public var echoCancellation: Bool - - @ReadWriteAttribute - public var autoGainControl: Bool - - @ReadWriteAttribute - public var noiseSuppression: Bool - - @ReadWriteAttribute - public var latency: Bool - - @ReadWriteAttribute - public var channelCount: Bool - - @ReadWriteAttribute - public var deviceId: Bool - - @ReadWriteAttribute - public var groupId: Bool -} diff --git a/Sources/DOMKit/WebIDL/OverconstrainedError.swift b/Sources/DOMKit/WebIDL/OverconstrainedError.swift deleted file mode 100644 index 61499735..00000000 --- a/Sources/DOMKit/WebIDL/OverconstrainedError.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class OverconstrainedError: DOMException { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OverconstrainedError].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _constraint = ReadonlyAttribute(jsObject: jsObject, name: Strings.constraint) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(constraint: String, message: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [constraint.jsValue, message?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var constraint: String -} diff --git a/Sources/DOMKit/WebIDL/PlaneLayout.swift b/Sources/DOMKit/WebIDL/PlaneLayout.swift deleted file mode 100644 index a4de400e..00000000 --- a/Sources/DOMKit/WebIDL/PlaneLayout.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PlaneLayout: BridgedDictionary { - public convenience init(offset: UInt32, stride: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.stride] = stride.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _stride = ReadWriteAttribute(jsObject: object, name: Strings.stride) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: UInt32 - - @ReadWriteAttribute - public var stride: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/RecordingState.swift b/Sources/DOMKit/WebIDL/RecordingState.swift deleted file mode 100644 index 7e057605..00000000 --- a/Sources/DOMKit/WebIDL/RecordingState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RecordingState: JSString, JSValueCompatible { - case inactive = "inactive" - case recording = "recording" - case paused = "paused" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Screen.swift b/Sources/DOMKit/WebIDL/Screen.swift deleted file mode 100644 index a883fb2f..00000000 --- a/Sources/DOMKit/WebIDL/Screen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Screen: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _availWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.availWidth) - _availHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.availHeight) - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - _colorDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorDepth) - _pixelDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.pixelDepth) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var availWidth: Int32 - - @ReadonlyAttribute - public var availHeight: Int32 - - @ReadonlyAttribute - public var width: Int32 - - @ReadonlyAttribute - public var height: Int32 - - @ReadonlyAttribute - public var colorDepth: UInt32 - - @ReadonlyAttribute - public var pixelDepth: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/ScrollBehavior.swift b/Sources/DOMKit/WebIDL/ScrollBehavior.swift deleted file mode 100644 index a76ba1cb..00000000 --- a/Sources/DOMKit/WebIDL/ScrollBehavior.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ScrollBehavior: JSString, JSValueCompatible { - case auto = "auto" - case smooth = "smooth" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift deleted file mode 100644 index 23f42432..00000000 --- a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ScrollIntoViewOptions: BridgedDictionary { - public convenience init(block: ScrollLogicalPosition, inline: ScrollLogicalPosition) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.block] = block.jsValue - object[Strings.inline] = inline.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _block = ReadWriteAttribute(jsObject: object, name: Strings.block) - _inline = ReadWriteAttribute(jsObject: object, name: Strings.inline) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var block: ScrollLogicalPosition - - @ReadWriteAttribute - public var inline: ScrollLogicalPosition -} diff --git a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift deleted file mode 100644 index 9f11f0bf..00000000 --- a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ScrollLogicalPosition: JSString, JSValueCompatible { - case start = "start" - case center = "center" - case end = "end" - case nearest = "nearest" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ScrollOptions.swift b/Sources/DOMKit/WebIDL/ScrollOptions.swift deleted file mode 100644 index 93ba5ad2..00000000 --- a/Sources/DOMKit/WebIDL/ScrollOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ScrollOptions: BridgedDictionary { - public convenience init(behavior: ScrollBehavior) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.behavior] = behavior.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _behavior = ReadWriteAttribute(jsObject: object, name: Strings.behavior) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var behavior: ScrollBehavior -} diff --git a/Sources/DOMKit/WebIDL/ScrollToOptions.swift b/Sources/DOMKit/WebIDL/ScrollToOptions.swift deleted file mode 100644 index c48ba4d7..00000000 --- a/Sources/DOMKit/WebIDL/ScrollToOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ScrollToOptions: BridgedDictionary { - public convenience init(left: Double, top: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.left] = left.jsValue - object[Strings.top] = top.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _left = ReadWriteAttribute(jsObject: object, name: Strings.left) - _top = ReadWriteAttribute(jsObject: object, name: Strings.top) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var left: Double - - @ReadWriteAttribute - public var top: Double -} diff --git a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift deleted file mode 100644 index 2487040f..00000000 --- a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class SvcOutputMetadata: BridgedDictionary { - public convenience init(temporalLayerId: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.temporalLayerId] = temporalLayerId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _temporalLayerId = ReadWriteAttribute(jsObject: object, name: Strings.temporalLayerId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var temporalLayerId: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/TexImageSource.swift b/Sources/DOMKit/WebIDL/TexImageSource.swift deleted file mode 100644 index d5750fff..00000000 --- a/Sources/DOMKit/WebIDL/TexImageSource.swift +++ /dev/null @@ -1,116 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_TexImageSource: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_TexImageSource {} -extension HTMLImageElement: Any_TexImageSource {} -extension HTMLVideoElement: Any_TexImageSource {} -extension ImageBitmap: Any_TexImageSource {} -extension ImageData: Any_TexImageSource {} -extension OffscreenCanvas: Any_TexImageSource {} -extension VideoFrame: Any_TexImageSource {} - -public enum TexImageSource: JSValueCompatible, Any_TexImageSource { - case htmlCanvasElement(HTMLCanvasElement) - case htmlImageElement(HTMLImageElement) - case htmlVideoElement(HTMLVideoElement) - case imageBitmap(ImageBitmap) - case imageData(ImageData) - case offscreenCanvas(OffscreenCanvas) - case videoFrame(VideoFrame) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var htmlImageElement: HTMLImageElement? { - switch self { - case let .htmlImageElement(htmlImageElement): return htmlImageElement - default: return nil - } - } - - var htmlVideoElement: HTMLVideoElement? { - switch self { - case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement - default: return nil - } - } - - var imageBitmap: ImageBitmap? { - switch self { - case let .imageBitmap(imageBitmap): return imageBitmap - default: return nil - } - } - - var imageData: ImageData? { - switch self { - case let .imageData(imageData): return imageData - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - - var videoFrame: VideoFrame? { - switch self { - case let .videoFrame(videoFrame): return videoFrame - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let htmlImageElement: HTMLImageElement = value.fromJSValue() { - return .htmlImageElement(htmlImageElement) - } - if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { - return .htmlVideoElement(htmlVideoElement) - } - if let imageBitmap: ImageBitmap = value.fromJSValue() { - return .imageBitmap(imageBitmap) - } - if let imageData: ImageData = value.fromJSValue() { - return .imageData(imageData) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } - if let videoFrame: VideoFrame = value.fromJSValue() { - return .videoFrame(videoFrame) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .htmlImageElement(htmlImageElement): - return htmlImageElement.jsValue - case let .htmlVideoElement(htmlVideoElement): - return htmlVideoElement.jsValue - case let .imageBitmap(imageBitmap): - return imageBitmap.jsValue - case let .imageData(imageData): - return imageData.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue - case let .videoFrame(videoFrame): - return videoFrame.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ULongRange.swift b/Sources/DOMKit/WebIDL/ULongRange.swift deleted file mode 100644 index cf578d6c..00000000 --- a/Sources/DOMKit/WebIDL/ULongRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ULongRange: BridgedDictionary { - public convenience init(max: UInt32, min: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.max] = max.jsValue - object[Strings.min] = min.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _max = ReadWriteAttribute(jsObject: object, name: Strings.max) - _min = ReadWriteAttribute(jsObject: object, name: Strings.min) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var max: UInt32 - - @ReadWriteAttribute - public var min: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/Uint32List.swift b/Sources/DOMKit/WebIDL/Uint32List.swift deleted file mode 100644 index e8a01699..00000000 --- a/Sources/DOMKit/WebIDL/Uint32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Uint32List: ConvertibleToJSValue {} -extension Uint32Array: Any_Uint32List {} -extension Array: Any_Uint32List where Element == GLuint {} - -public enum Uint32List: JSValueCompatible, Any_Uint32List { - case uint32Array(Uint32Array) - case seq_of_GLuint([GLuint]) - - var uint32Array: Uint32Array? { - switch self { - case let .uint32Array(uint32Array): return uint32Array - default: return nil - } - } - - var seq_of_GLuint: [GLuint]? { - switch self { - case let .seq_of_GLuint(seq_of_GLuint): return seq_of_GLuint - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let uint32Array: Uint32Array = value.fromJSValue() { - return .uint32Array(uint32Array) - } - if let seq_of_GLuint: [GLuint] = value.fromJSValue() { - return .seq_of_GLuint(seq_of_GLuint) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .uint32Array(uint32Array): - return uint32Array.jsValue - case let .seq_of_GLuint(seq_of_GLuint): - return seq_of_GLuint.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift deleted file mode 100644 index 364fa134..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoColorPrimaries: JSString, JSValueCompatible { - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpace.swift b/Sources/DOMKit/WebIDL/VideoColorSpace.swift deleted file mode 100644 index 25b08860..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorSpace.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoColorSpace: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoColorSpace].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _primaries = ReadonlyAttribute(jsObject: jsObject, name: Strings.primaries) - _transfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.transfer) - _matrix = ReadonlyAttribute(jsObject: jsObject, name: Strings.matrix) - _fullRange = ReadonlyAttribute(jsObject: jsObject, name: Strings.fullRange) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var primaries: VideoColorPrimaries? - - @ReadonlyAttribute - public var transfer: VideoTransferCharacteristics? - - @ReadonlyAttribute - public var matrix: VideoMatrixCoefficients? - - @ReadonlyAttribute - public var fullRange: Bool? - - @inlinable public func toJSON() -> VideoColorSpaceInit { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift deleted file mode 100644 index 786cfccc..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoColorSpaceInit: BridgedDictionary { - public convenience init(primaries: VideoColorPrimaries, transfer: VideoTransferCharacteristics, matrix: VideoMatrixCoefficients, fullRange: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.primaries] = primaries.jsValue - object[Strings.transfer] = transfer.jsValue - object[Strings.matrix] = matrix.jsValue - object[Strings.fullRange] = fullRange.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _primaries = ReadWriteAttribute(jsObject: object, name: Strings.primaries) - _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) - _matrix = ReadWriteAttribute(jsObject: object, name: Strings.matrix) - _fullRange = ReadWriteAttribute(jsObject: object, name: Strings.fullRange) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var primaries: VideoColorPrimaries - - @ReadWriteAttribute - public var transfer: VideoTransferCharacteristics - - @ReadWriteAttribute - public var matrix: VideoMatrixCoefficients - - @ReadWriteAttribute - public var fullRange: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoder.swift b/Sources/DOMKit/WebIDL/VideoDecoder.swift deleted file mode 100644 index 8f8900c2..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var decodeQueueSize: UInt32 - - @inlinable public func configure(config: VideoDecoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func decode(chunk: EncodedVideoChunk) { - let this = jsObject - _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: VideoDecoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: VideoDecoderConfig) async throws -> VideoDecoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift deleted file mode 100644 index 3e431877..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderConfig: BridgedDictionary { - public convenience init(codec: String, description: BufferSource, codedWidth: UInt32, codedHeight: UInt32, displayAspectWidth: UInt32, displayAspectHeight: UInt32, colorSpace: VideoColorSpaceInit, hardwareAcceleration: HardwareAcceleration, optimizeForLatency: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.description] = description.jsValue - object[Strings.codedWidth] = codedWidth.jsValue - object[Strings.codedHeight] = codedHeight.jsValue - object[Strings.displayAspectWidth] = displayAspectWidth.jsValue - object[Strings.displayAspectHeight] = displayAspectHeight.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue - object[Strings.optimizeForLatency] = optimizeForLatency.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _description = ReadWriteAttribute(jsObject: object, name: Strings.description) - _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) - _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) - _displayAspectWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectWidth) - _displayAspectHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectHeight) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) - _optimizeForLatency = ReadWriteAttribute(jsObject: object, name: Strings.optimizeForLatency) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var description: BufferSource - - @ReadWriteAttribute - public var codedWidth: UInt32 - - @ReadWriteAttribute - public var codedHeight: UInt32 - - @ReadWriteAttribute - public var displayAspectWidth: UInt32 - - @ReadWriteAttribute - public var displayAspectHeight: UInt32 - - @ReadWriteAttribute - public var colorSpace: VideoColorSpaceInit - - @ReadWriteAttribute - public var hardwareAcceleration: HardwareAcceleration - - @ReadWriteAttribute - public var optimizeForLatency: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift deleted file mode 100644 index 0614f47e..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderInit: BridgedDictionary { - public convenience init(output: @escaping VideoFrameOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1Void - public var output: VideoFrameOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift deleted file mode 100644 index 4d41da3d..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: VideoDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: VideoDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoder.swift b/Sources/DOMKit/WebIDL/VideoEncoder.swift deleted file mode 100644 index 2349c057..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoEncoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoEncoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var encodeQueueSize: UInt32 - - @inlinable public func configure(config: VideoEncoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { - let this = jsObject - _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: VideoEncoderConfig) async throws -> VideoEncoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift deleted file mode 100644 index c6fdfd98..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift +++ /dev/null @@ -1,75 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderConfig: BridgedDictionary { - public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - object[Strings.bitrate] = bitrate.jsValue - object[Strings.framerate] = framerate.jsValue - object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue - object[Strings.alpha] = alpha.jsValue - object[Strings.scalabilityMode] = scalabilityMode.jsValue - object[Strings.bitrateMode] = bitrateMode.jsValue - object[Strings.latencyMode] = latencyMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) - _framerate = ReadWriteAttribute(jsObject: object, name: Strings.framerate) - _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _scalabilityMode = ReadWriteAttribute(jsObject: object, name: Strings.scalabilityMode) - _bitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.bitrateMode) - _latencyMode = ReadWriteAttribute(jsObject: object, name: Strings.latencyMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 - - @ReadWriteAttribute - public var bitrate: UInt64 - - @ReadWriteAttribute - public var framerate: Double - - @ReadWriteAttribute - public var hardwareAcceleration: HardwareAcceleration - - @ReadWriteAttribute - public var alpha: AlphaOption - - @ReadWriteAttribute - public var scalabilityMode: String - - @ReadWriteAttribute - public var bitrateMode: BitrateMode - - @ReadWriteAttribute - public var latencyMode: LatencyMode -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift deleted file mode 100644 index 583d307c..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderEncodeOptions: BridgedDictionary { - public convenience init(keyFrame: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.keyFrame] = keyFrame.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var keyFrame: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift deleted file mode 100644 index f9859e1b..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderInit: BridgedDictionary { - public convenience init(output: @escaping EncodedVideoChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute2Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute2Void - public var output: EncodedVideoChunkOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift deleted file mode 100644 index f6419290..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: VideoEncoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: VideoEncoderConfig -} diff --git a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift deleted file mode 100644 index 9d325b8a..00000000 --- a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoFacingModeEnum: JSString, JSValueCompatible { - case user = "user" - case environment = "environment" - case left = "left" - case right = "right" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoFrame.swift b/Sources/DOMKit/WebIDL/VideoFrame.swift deleted file mode 100644 index 9743b3fc..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrame.swift +++ /dev/null @@ -1,89 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrame: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoFrame].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) - _codedWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedWidth) - _codedHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedHeight) - _codedRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedRect) - _visibleRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibleRect) - _displayWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayWidth) - _displayHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayHeight) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) - self.jsObject = jsObject - } - - @inlinable public convenience init(image: CanvasImageSource, init: VideoFrameInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [image.jsValue, `init`?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(data: BufferSource, init: VideoFrameBufferInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, `init`.jsValue])) - } - - @ReadonlyAttribute - public var format: VideoPixelFormat? - - @ReadonlyAttribute - public var codedWidth: UInt32 - - @ReadonlyAttribute - public var codedHeight: UInt32 - - @ReadonlyAttribute - public var codedRect: DOMRectReadOnly? - - @ReadonlyAttribute - public var visibleRect: DOMRectReadOnly? - - @ReadonlyAttribute - public var displayWidth: UInt32 - - @ReadonlyAttribute - public var displayHeight: UInt32 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var timestamp: Int64? - - @ReadonlyAttribute - public var colorSpace: VideoColorSpace - - @inlinable public func allocationSize(options: VideoFrameCopyToOptions? = nil) -> UInt32 { - let this = jsObject - return this[Strings.allocationSize].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) async throws -> [PlaneLayout] { - let this = jsObject - let _promise: JSPromise = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift deleted file mode 100644 index 0607012e..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift +++ /dev/null @@ -1,65 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameBufferInit: BridgedDictionary { - public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.format] = format.jsValue - object[Strings.codedWidth] = codedWidth.jsValue - object[Strings.codedHeight] = codedHeight.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.layout] = layout.jsValue - object[Strings.visibleRect] = visibleRect.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) - _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) - _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var format: VideoPixelFormat - - @ReadWriteAttribute - public var codedWidth: UInt32 - - @ReadWriteAttribute - public var codedHeight: UInt32 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var layout: [PlaneLayout] - - @ReadWriteAttribute - public var visibleRect: DOMRectInit - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 - - @ReadWriteAttribute - public var colorSpace: VideoColorSpaceInit -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift deleted file mode 100644 index a86c57dd..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameCopyToOptions: BridgedDictionary { - public convenience init(rect: DOMRectInit, layout: [PlaneLayout]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.rect] = rect.jsValue - object[Strings.layout] = layout.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _rect = ReadWriteAttribute(jsObject: object, name: Strings.rect) - _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var rect: DOMRectInit - - @ReadWriteAttribute - public var layout: [PlaneLayout] -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameInit.swift b/Sources/DOMKit/WebIDL/VideoFrameInit.swift deleted file mode 100644 index a70eaea1..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameInit: BridgedDictionary { - public convenience init(duration: UInt64, timestamp: Int64, alpha: AlphaOption, visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.duration] = duration.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.alpha] = alpha.jsValue - object[Strings.visibleRect] = visibleRect.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var alpha: AlphaOption - - @ReadWriteAttribute - public var visibleRect: DOMRectInit - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift deleted file mode 100644 index 58f11f73..00000000 --- a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoMatrixCoefficients: JSString, JSValueCompatible { - case rgb = "rgb" - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift deleted file mode 100644 index 1c8dea1f..00000000 --- a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoPixelFormat: JSString, JSValueCompatible { - case i420 = "I420" - case i420A = "I420A" - case i422 = "I422" - case i444 = "I444" - case nV12 = "NV12" - case rGBA = "RGBA" - case rGBX = "RGBX" - case bGRA = "BGRA" - case bGRX = "BGRX" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift deleted file mode 100644 index 78582a71..00000000 --- a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoResizeModeEnum: JSString, JSValueCompatible { - case none = "none" - case cropAndScale = "crop-and-scale" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift deleted file mode 100644 index e8407da6..00000000 --- a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoTransferCharacteristics: JSString, JSValueCompatible { - case bt709 = "bt709" - case smpte170m = "smpte170m" - case iec6196621 = "iec61966-2-1" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift deleted file mode 100644 index 3ee19c40..00000000 --- a/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGL2RenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGL2RenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift deleted file mode 100644 index 2071c82e..00000000 --- a/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift +++ /dev/null @@ -1,1162 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGL2RenderingContextBase: JSBridgedClass {} -public extension WebGL2RenderingContextBase { - @inlinable static var READ_BUFFER: GLenum { 0x0C02 } - - @inlinable static var UNPACK_ROW_LENGTH: GLenum { 0x0CF2 } - - @inlinable static var UNPACK_SKIP_ROWS: GLenum { 0x0CF3 } - - @inlinable static var UNPACK_SKIP_PIXELS: GLenum { 0x0CF4 } - - @inlinable static var PACK_ROW_LENGTH: GLenum { 0x0D02 } - - @inlinable static var PACK_SKIP_ROWS: GLenum { 0x0D03 } - - @inlinable static var PACK_SKIP_PIXELS: GLenum { 0x0D04 } - - @inlinable static var COLOR: GLenum { 0x1800 } - - @inlinable static var DEPTH: GLenum { 0x1801 } - - @inlinable static var STENCIL: GLenum { 0x1802 } - - @inlinable static var RED: GLenum { 0x1903 } - - @inlinable static var RGB8: GLenum { 0x8051 } - - @inlinable static var RGBA8: GLenum { 0x8058 } - - @inlinable static var RGB10_A2: GLenum { 0x8059 } - - @inlinable static var TEXTURE_BINDING_3D: GLenum { 0x806A } - - @inlinable static var UNPACK_SKIP_IMAGES: GLenum { 0x806D } - - @inlinable static var UNPACK_IMAGE_HEIGHT: GLenum { 0x806E } - - @inlinable static var TEXTURE_3D: GLenum { 0x806F } - - @inlinable static var TEXTURE_WRAP_R: GLenum { 0x8072 } - - @inlinable static var MAX_3D_TEXTURE_SIZE: GLenum { 0x8073 } - - @inlinable static var UNSIGNED_INT_2_10_10_10_REV: GLenum { 0x8368 } - - @inlinable static var MAX_ELEMENTS_VERTICES: GLenum { 0x80E8 } - - @inlinable static var MAX_ELEMENTS_INDICES: GLenum { 0x80E9 } - - @inlinable static var TEXTURE_MIN_LOD: GLenum { 0x813A } - - @inlinable static var TEXTURE_MAX_LOD: GLenum { 0x813B } - - @inlinable static var TEXTURE_BASE_LEVEL: GLenum { 0x813C } - - @inlinable static var TEXTURE_MAX_LEVEL: GLenum { 0x813D } - - @inlinable static var MIN: GLenum { 0x8007 } - - @inlinable static var MAX: GLenum { 0x8008 } - - @inlinable static var DEPTH_COMPONENT24: GLenum { 0x81A6 } - - @inlinable static var MAX_TEXTURE_LOD_BIAS: GLenum { 0x84FD } - - @inlinable static var TEXTURE_COMPARE_MODE: GLenum { 0x884C } - - @inlinable static var TEXTURE_COMPARE_FUNC: GLenum { 0x884D } - - @inlinable static var CURRENT_QUERY: GLenum { 0x8865 } - - @inlinable static var QUERY_RESULT: GLenum { 0x8866 } - - @inlinable static var QUERY_RESULT_AVAILABLE: GLenum { 0x8867 } - - @inlinable static var STREAM_READ: GLenum { 0x88E1 } - - @inlinable static var STREAM_COPY: GLenum { 0x88E2 } - - @inlinable static var STATIC_READ: GLenum { 0x88E5 } - - @inlinable static var STATIC_COPY: GLenum { 0x88E6 } - - @inlinable static var DYNAMIC_READ: GLenum { 0x88E9 } - - @inlinable static var DYNAMIC_COPY: GLenum { 0x88EA } - - @inlinable static var MAX_DRAW_BUFFERS: GLenum { 0x8824 } - - @inlinable static var DRAW_BUFFER0: GLenum { 0x8825 } - - @inlinable static var DRAW_BUFFER1: GLenum { 0x8826 } - - @inlinable static var DRAW_BUFFER2: GLenum { 0x8827 } - - @inlinable static var DRAW_BUFFER3: GLenum { 0x8828 } - - @inlinable static var DRAW_BUFFER4: GLenum { 0x8829 } - - @inlinable static var DRAW_BUFFER5: GLenum { 0x882A } - - @inlinable static var DRAW_BUFFER6: GLenum { 0x882B } - - @inlinable static var DRAW_BUFFER7: GLenum { 0x882C } - - @inlinable static var DRAW_BUFFER8: GLenum { 0x882D } - - @inlinable static var DRAW_BUFFER9: GLenum { 0x882E } - - @inlinable static var DRAW_BUFFER10: GLenum { 0x882F } - - @inlinable static var DRAW_BUFFER11: GLenum { 0x8830 } - - @inlinable static var DRAW_BUFFER12: GLenum { 0x8831 } - - @inlinable static var DRAW_BUFFER13: GLenum { 0x8832 } - - @inlinable static var DRAW_BUFFER14: GLenum { 0x8833 } - - @inlinable static var DRAW_BUFFER15: GLenum { 0x8834 } - - @inlinable static var MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8B49 } - - @inlinable static var MAX_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8B4A } - - @inlinable static var SAMPLER_3D: GLenum { 0x8B5F } - - @inlinable static var SAMPLER_2D_SHADOW: GLenum { 0x8B62 } - - @inlinable static var FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum { 0x8B8B } - - @inlinable static var PIXEL_PACK_BUFFER: GLenum { 0x88EB } - - @inlinable static var PIXEL_UNPACK_BUFFER: GLenum { 0x88EC } - - @inlinable static var PIXEL_PACK_BUFFER_BINDING: GLenum { 0x88ED } - - @inlinable static var PIXEL_UNPACK_BUFFER_BINDING: GLenum { 0x88EF } - - @inlinable static var FLOAT_MAT2x3: GLenum { 0x8B65 } - - @inlinable static var FLOAT_MAT2x4: GLenum { 0x8B66 } - - @inlinable static var FLOAT_MAT3x2: GLenum { 0x8B67 } - - @inlinable static var FLOAT_MAT3x4: GLenum { 0x8B68 } - - @inlinable static var FLOAT_MAT4x2: GLenum { 0x8B69 } - - @inlinable static var FLOAT_MAT4x3: GLenum { 0x8B6A } - - @inlinable static var SRGB: GLenum { 0x8C40 } - - @inlinable static var SRGB8: GLenum { 0x8C41 } - - @inlinable static var SRGB8_ALPHA8: GLenum { 0x8C43 } - - @inlinable static var COMPARE_REF_TO_TEXTURE: GLenum { 0x884E } - - @inlinable static var RGBA32F: GLenum { 0x8814 } - - @inlinable static var RGB32F: GLenum { 0x8815 } - - @inlinable static var RGBA16F: GLenum { 0x881A } - - @inlinable static var RGB16F: GLenum { 0x881B } - - @inlinable static var VERTEX_ATTRIB_ARRAY_INTEGER: GLenum { 0x88FD } - - @inlinable static var MAX_ARRAY_TEXTURE_LAYERS: GLenum { 0x88FF } - - @inlinable static var MIN_PROGRAM_TEXEL_OFFSET: GLenum { 0x8904 } - - @inlinable static var MAX_PROGRAM_TEXEL_OFFSET: GLenum { 0x8905 } - - @inlinable static var MAX_VARYING_COMPONENTS: GLenum { 0x8B4B } - - @inlinable static var TEXTURE_2D_ARRAY: GLenum { 0x8C1A } - - @inlinable static var TEXTURE_BINDING_2D_ARRAY: GLenum { 0x8C1D } - - @inlinable static var R11F_G11F_B10F: GLenum { 0x8C3A } - - @inlinable static var UNSIGNED_INT_10F_11F_11F_REV: GLenum { 0x8C3B } - - @inlinable static var RGB9_E5: GLenum { 0x8C3D } - - @inlinable static var UNSIGNED_INT_5_9_9_9_REV: GLenum { 0x8C3E } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum { 0x8C7F } - - @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum { 0x8C80 } - - @inlinable static var TRANSFORM_FEEDBACK_VARYINGS: GLenum { 0x8C83 } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_START: GLenum { 0x8C84 } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum { 0x8C85 } - - @inlinable static var TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum { 0x8C88 } - - @inlinable static var RASTERIZER_DISCARD: GLenum { 0x8C89 } - - @inlinable static var MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum { 0x8C8A } - - @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum { 0x8C8B } - - @inlinable static var INTERLEAVED_ATTRIBS: GLenum { 0x8C8C } - - @inlinable static var SEPARATE_ATTRIBS: GLenum { 0x8C8D } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER: GLenum { 0x8C8E } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum { 0x8C8F } - - @inlinable static var RGBA32UI: GLenum { 0x8D70 } - - @inlinable static var RGB32UI: GLenum { 0x8D71 } - - @inlinable static var RGBA16UI: GLenum { 0x8D76 } - - @inlinable static var RGB16UI: GLenum { 0x8D77 } - - @inlinable static var RGBA8UI: GLenum { 0x8D7C } - - @inlinable static var RGB8UI: GLenum { 0x8D7D } - - @inlinable static var RGBA32I: GLenum { 0x8D82 } - - @inlinable static var RGB32I: GLenum { 0x8D83 } - - @inlinable static var RGBA16I: GLenum { 0x8D88 } - - @inlinable static var RGB16I: GLenum { 0x8D89 } - - @inlinable static var RGBA8I: GLenum { 0x8D8E } - - @inlinable static var RGB8I: GLenum { 0x8D8F } - - @inlinable static var RED_INTEGER: GLenum { 0x8D94 } - - @inlinable static var RGB_INTEGER: GLenum { 0x8D98 } - - @inlinable static var RGBA_INTEGER: GLenum { 0x8D99 } - - @inlinable static var SAMPLER_2D_ARRAY: GLenum { 0x8DC1 } - - @inlinable static var SAMPLER_2D_ARRAY_SHADOW: GLenum { 0x8DC4 } - - @inlinable static var SAMPLER_CUBE_SHADOW: GLenum { 0x8DC5 } - - @inlinable static var UNSIGNED_INT_VEC2: GLenum { 0x8DC6 } - - @inlinable static var UNSIGNED_INT_VEC3: GLenum { 0x8DC7 } - - @inlinable static var UNSIGNED_INT_VEC4: GLenum { 0x8DC8 } - - @inlinable static var INT_SAMPLER_2D: GLenum { 0x8DCA } - - @inlinable static var INT_SAMPLER_3D: GLenum { 0x8DCB } - - @inlinable static var INT_SAMPLER_CUBE: GLenum { 0x8DCC } - - @inlinable static var INT_SAMPLER_2D_ARRAY: GLenum { 0x8DCF } - - @inlinable static var UNSIGNED_INT_SAMPLER_2D: GLenum { 0x8DD2 } - - @inlinable static var UNSIGNED_INT_SAMPLER_3D: GLenum { 0x8DD3 } - - @inlinable static var UNSIGNED_INT_SAMPLER_CUBE: GLenum { 0x8DD4 } - - @inlinable static var UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum { 0x8DD7 } - - @inlinable static var DEPTH_COMPONENT32F: GLenum { 0x8CAC } - - @inlinable static var DEPTH32F_STENCIL8: GLenum { 0x8CAD } - - @inlinable static var FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum { 0x8DAD } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum { 0x8210 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum { 0x8211 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum { 0x8212 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum { 0x8213 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum { 0x8214 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum { 0x8215 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum { 0x8216 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum { 0x8217 } - - @inlinable static var FRAMEBUFFER_DEFAULT: GLenum { 0x8218 } - - @inlinable static var UNSIGNED_INT_24_8: GLenum { 0x84FA } - - @inlinable static var DEPTH24_STENCIL8: GLenum { 0x88F0 } - - @inlinable static var UNSIGNED_NORMALIZED: GLenum { 0x8C17 } - - @inlinable static var DRAW_FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } - - @inlinable static var READ_FRAMEBUFFER: GLenum { 0x8CA8 } - - @inlinable static var DRAW_FRAMEBUFFER: GLenum { 0x8CA9 } - - @inlinable static var READ_FRAMEBUFFER_BINDING: GLenum { 0x8CAA } - - @inlinable static var RENDERBUFFER_SAMPLES: GLenum { 0x8CAB } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum { 0x8CD4 } - - @inlinable static var MAX_COLOR_ATTACHMENTS: GLenum { 0x8CDF } - - @inlinable static var COLOR_ATTACHMENT1: GLenum { 0x8CE1 } - - @inlinable static var COLOR_ATTACHMENT2: GLenum { 0x8CE2 } - - @inlinable static var COLOR_ATTACHMENT3: GLenum { 0x8CE3 } - - @inlinable static var COLOR_ATTACHMENT4: GLenum { 0x8CE4 } - - @inlinable static var COLOR_ATTACHMENT5: GLenum { 0x8CE5 } - - @inlinable static var COLOR_ATTACHMENT6: GLenum { 0x8CE6 } - - @inlinable static var COLOR_ATTACHMENT7: GLenum { 0x8CE7 } - - @inlinable static var COLOR_ATTACHMENT8: GLenum { 0x8CE8 } - - @inlinable static var COLOR_ATTACHMENT9: GLenum { 0x8CE9 } - - @inlinable static var COLOR_ATTACHMENT10: GLenum { 0x8CEA } - - @inlinable static var COLOR_ATTACHMENT11: GLenum { 0x8CEB } - - @inlinable static var COLOR_ATTACHMENT12: GLenum { 0x8CEC } - - @inlinable static var COLOR_ATTACHMENT13: GLenum { 0x8CED } - - @inlinable static var COLOR_ATTACHMENT14: GLenum { 0x8CEE } - - @inlinable static var COLOR_ATTACHMENT15: GLenum { 0x8CEF } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum { 0x8D56 } - - @inlinable static var MAX_SAMPLES: GLenum { 0x8D57 } - - @inlinable static var HALF_FLOAT: GLenum { 0x140B } - - @inlinable static var RG: GLenum { 0x8227 } - - @inlinable static var RG_INTEGER: GLenum { 0x8228 } - - @inlinable static var R8: GLenum { 0x8229 } - - @inlinable static var RG8: GLenum { 0x822B } - - @inlinable static var R16F: GLenum { 0x822D } - - @inlinable static var R32F: GLenum { 0x822E } - - @inlinable static var RG16F: GLenum { 0x822F } - - @inlinable static var RG32F: GLenum { 0x8230 } - - @inlinable static var R8I: GLenum { 0x8231 } - - @inlinable static var R8UI: GLenum { 0x8232 } - - @inlinable static var R16I: GLenum { 0x8233 } - - @inlinable static var R16UI: GLenum { 0x8234 } - - @inlinable static var R32I: GLenum { 0x8235 } - - @inlinable static var R32UI: GLenum { 0x8236 } - - @inlinable static var RG8I: GLenum { 0x8237 } - - @inlinable static var RG8UI: GLenum { 0x8238 } - - @inlinable static var RG16I: GLenum { 0x8239 } - - @inlinable static var RG16UI: GLenum { 0x823A } - - @inlinable static var RG32I: GLenum { 0x823B } - - @inlinable static var RG32UI: GLenum { 0x823C } - - @inlinable static var VERTEX_ARRAY_BINDING: GLenum { 0x85B5 } - - @inlinable static var R8_SNORM: GLenum { 0x8F94 } - - @inlinable static var RG8_SNORM: GLenum { 0x8F95 } - - @inlinable static var RGB8_SNORM: GLenum { 0x8F96 } - - @inlinable static var RGBA8_SNORM: GLenum { 0x8F97 } - - @inlinable static var SIGNED_NORMALIZED: GLenum { 0x8F9C } - - @inlinable static var COPY_READ_BUFFER: GLenum { 0x8F36 } - - @inlinable static var COPY_WRITE_BUFFER: GLenum { 0x8F37 } - - @inlinable static var COPY_READ_BUFFER_BINDING: GLenum { 0x8F36 } - - @inlinable static var COPY_WRITE_BUFFER_BINDING: GLenum { 0x8F37 } - - @inlinable static var UNIFORM_BUFFER: GLenum { 0x8A11 } - - @inlinable static var UNIFORM_BUFFER_BINDING: GLenum { 0x8A28 } - - @inlinable static var UNIFORM_BUFFER_START: GLenum { 0x8A29 } - - @inlinable static var UNIFORM_BUFFER_SIZE: GLenum { 0x8A2A } - - @inlinable static var MAX_VERTEX_UNIFORM_BLOCKS: GLenum { 0x8A2B } - - @inlinable static var MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum { 0x8A2D } - - @inlinable static var MAX_COMBINED_UNIFORM_BLOCKS: GLenum { 0x8A2E } - - @inlinable static var MAX_UNIFORM_BUFFER_BINDINGS: GLenum { 0x8A2F } - - @inlinable static var MAX_UNIFORM_BLOCK_SIZE: GLenum { 0x8A30 } - - @inlinable static var MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8A31 } - - @inlinable static var MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8A33 } - - @inlinable static var UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum { 0x8A34 } - - @inlinable static var ACTIVE_UNIFORM_BLOCKS: GLenum { 0x8A36 } - - @inlinable static var UNIFORM_TYPE: GLenum { 0x8A37 } - - @inlinable static var UNIFORM_SIZE: GLenum { 0x8A38 } - - @inlinable static var UNIFORM_BLOCK_INDEX: GLenum { 0x8A3A } - - @inlinable static var UNIFORM_OFFSET: GLenum { 0x8A3B } - - @inlinable static var UNIFORM_ARRAY_STRIDE: GLenum { 0x8A3C } - - @inlinable static var UNIFORM_MATRIX_STRIDE: GLenum { 0x8A3D } - - @inlinable static var UNIFORM_IS_ROW_MAJOR: GLenum { 0x8A3E } - - @inlinable static var UNIFORM_BLOCK_BINDING: GLenum { 0x8A3F } - - @inlinable static var UNIFORM_BLOCK_DATA_SIZE: GLenum { 0x8A40 } - - @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum { 0x8A42 } - - @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum { 0x8A43 } - - @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum { 0x8A44 } - - @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum { 0x8A46 } - - @inlinable static var INVALID_INDEX: GLenum { 0xFFFF_FFFF } - - @inlinable static var MAX_VERTEX_OUTPUT_COMPONENTS: GLenum { 0x9122 } - - @inlinable static var MAX_FRAGMENT_INPUT_COMPONENTS: GLenum { 0x9125 } - - @inlinable static var MAX_SERVER_WAIT_TIMEOUT: GLenum { 0x9111 } - - @inlinable static var OBJECT_TYPE: GLenum { 0x9112 } - - @inlinable static var SYNC_CONDITION: GLenum { 0x9113 } - - @inlinable static var SYNC_STATUS: GLenum { 0x9114 } - - @inlinable static var SYNC_FLAGS: GLenum { 0x9115 } - - @inlinable static var SYNC_FENCE: GLenum { 0x9116 } - - @inlinable static var SYNC_GPU_COMMANDS_COMPLETE: GLenum { 0x9117 } - - @inlinable static var UNSIGNALED: GLenum { 0x9118 } - - @inlinable static var SIGNALED: GLenum { 0x9119 } - - @inlinable static var ALREADY_SIGNALED: GLenum { 0x911A } - - @inlinable static var TIMEOUT_EXPIRED: GLenum { 0x911B } - - @inlinable static var CONDITION_SATISFIED: GLenum { 0x911C } - - @inlinable static var WAIT_FAILED: GLenum { 0x911D } - - @inlinable static var SYNC_FLUSH_COMMANDS_BIT: GLenum { 0x0000_0001 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum { 0x88FE } - - @inlinable static var ANY_SAMPLES_PASSED: GLenum { 0x8C2F } - - @inlinable static var ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum { 0x8D6A } - - @inlinable static var SAMPLER_BINDING: GLenum { 0x8919 } - - @inlinable static var RGB10_A2UI: GLenum { 0x906F } - - @inlinable static var INT_2_10_10_10_REV: GLenum { 0x8D9F } - - @inlinable static var TRANSFORM_FEEDBACK: GLenum { 0x8E22 } - - @inlinable static var TRANSFORM_FEEDBACK_PAUSED: GLenum { 0x8E23 } - - @inlinable static var TRANSFORM_FEEDBACK_ACTIVE: GLenum { 0x8E24 } - - @inlinable static var TRANSFORM_FEEDBACK_BINDING: GLenum { 0x8E25 } - - @inlinable static var TEXTURE_IMMUTABLE_FORMAT: GLenum { 0x912F } - - @inlinable static var MAX_ELEMENT_INDEX: GLenum { 0x8D6B } - - @inlinable static var TEXTURE_IMMUTABLE_LEVELS: GLenum { 0x82DF } - - @inlinable static var TIMEOUT_IGNORED: GLint64 { -1 } - - @inlinable static var MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum { 0x9247 } - - @inlinable func copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr) { - let this = jsObject - _ = this[Strings.copyBufferSubData].function!(this: this, arguments: [readTarget.jsValue, writeTarget.jsValue, readOffset.jsValue, writeOffset.jsValue, size.jsValue]) - } - - @inlinable func getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset: GLuint? = nil, length: GLuint? = nil) { - let this = jsObject - _ = this[Strings.getBufferSubData].function!(this: this, arguments: [target.jsValue, srcByteOffset.jsValue, dstBuffer.jsValue, dstOffset?.jsValue ?? .undefined, length?.jsValue ?? .undefined]) - } - - @inlinable func blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum) { - let _arg0 = srcX0.jsValue - let _arg1 = srcY0.jsValue - let _arg2 = srcX1.jsValue - let _arg3 = srcY1.jsValue - let _arg4 = dstX0.jsValue - let _arg5 = dstY0.jsValue - let _arg6 = dstX1.jsValue - let _arg7 = dstY1.jsValue - let _arg8 = mask.jsValue - let _arg9 = filter.jsValue - let this = jsObject - _ = this[Strings.blitFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture?, level: GLint, layer: GLint) { - let this = jsObject - _ = this[Strings.framebufferTextureLayer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, texture.jsValue, level.jsValue, layer.jsValue]) - } - - @inlinable func invalidateFramebuffer(target: GLenum, attachments: [GLenum]) { - let this = jsObject - _ = this[Strings.invalidateFramebuffer].function!(this: this, arguments: [target.jsValue, attachments.jsValue]) - } - - @inlinable func invalidateSubFramebuffer(target: GLenum, attachments: [GLenum], x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = attachments.jsValue - let _arg2 = x.jsValue - let _arg3 = y.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let this = jsObject - _ = this[Strings.invalidateSubFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func readBuffer(src: GLenum) { - let this = jsObject - _ = this[Strings.readBuffer].function!(this: this, arguments: [src.jsValue]) - } - - @inlinable func getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getInternalformatParameter].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.renderbufferStorageMultisample].function!(this: this, arguments: [target.jsValue, samples.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.texStorage2D].function!(this: this, arguments: [target.jsValue, levels.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = levels.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let this = jsObject - _ = this[Strings.texStorage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = source.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = srcData.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = srcData.jsValue - let _arg10 = srcOffset.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = type.jsValue - let _arg10 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = type.jsValue - let _arg10 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView?, srcOffset: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = type.jsValue - let _arg10 = srcData.jsValue - let _arg11 = srcOffset?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) - } - - @inlinable func copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = x.jsValue - let _arg6 = y.jsValue - let _arg7 = width.jsValue - let _arg8 = height.jsValue - let this = jsObject - _ = this[Strings.copyTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = imageSize.jsValue - let _arg8 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = srcData.jsValue - let _arg8 = srcOffset?.jsValue ?? .undefined - let _arg9 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = imageSize.jsValue - let _arg10 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = srcData.jsValue - let _arg10 = srcOffset?.jsValue ?? .undefined - let _arg11 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) - } - - @inlinable func getFragDataLocation(program: WebGLProgram, name: String) -> GLint { - let this = jsObject - return this[Strings.getFragDataLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func uniform1ui(location: WebGLUniformLocation?, v0: GLuint) { - let this = jsObject - _ = this[Strings.uniform1ui].function!(this: this, arguments: [location.jsValue, v0.jsValue]) - } - - @inlinable func uniform2ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint) { - let this = jsObject - _ = this[Strings.uniform2ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue]) - } - - @inlinable func uniform3ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint) { - let this = jsObject - _ = this[Strings.uniform3ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue]) - } - - @inlinable func uniform4ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint) { - let this = jsObject - _ = this[Strings.uniform4ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue, v3.jsValue]) - } - - @inlinable func uniform1uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform1uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform2uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform2uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform3uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform3uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform4uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform4uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix3x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix3x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix4x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix4x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix2x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix2x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix4x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix4x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix2x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix2x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix3x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix3x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint) { - let this = jsObject - _ = this[Strings.vertexAttribI4i].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttribI4iv(index: GLuint, values: Int32List) { - let this = jsObject - _ = this[Strings.vertexAttribI4iv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) { - let this = jsObject - _ = this[Strings.vertexAttribI4ui].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttribI4uiv(index: GLuint, values: Uint32List) { - let this = jsObject - _ = this[Strings.vertexAttribI4uiv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr) { - let this = jsObject - _ = this[Strings.vertexAttribIPointer].function!(this: this, arguments: [index.jsValue, size.jsValue, type.jsValue, stride.jsValue, offset.jsValue]) - } - - @inlinable func vertexAttribDivisor(index: GLuint, divisor: GLuint) { - let this = jsObject - _ = this[Strings.vertexAttribDivisor].function!(this: this, arguments: [index.jsValue, divisor.jsValue]) - } - - @inlinable func drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei) { - let this = jsObject - _ = this[Strings.drawArraysInstanced].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue, instanceCount.jsValue]) - } - - @inlinable func drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei) { - let this = jsObject - _ = this[Strings.drawElementsInstanced].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue, instanceCount.jsValue]) - } - - @inlinable func drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr) { - let _arg0 = mode.jsValue - let _arg1 = start.jsValue - let _arg2 = end.jsValue - let _arg3 = count.jsValue - let _arg4 = type.jsValue - let _arg5 = offset.jsValue - let this = jsObject - _ = this[Strings.drawRangeElements].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func drawBuffers(buffers: [GLenum]) { - let this = jsObject - _ = this[Strings.drawBuffers].function!(this: this, arguments: [buffers.jsValue]) - } - - @inlinable func clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset: GLuint? = nil) { - let this = jsObject - _ = this[Strings.clearBufferfv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) - } - - @inlinable func clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset: GLuint? = nil) { - let this = jsObject - _ = this[Strings.clearBufferiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) - } - - @inlinable func clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset: GLuint? = nil) { - let this = jsObject - _ = this[Strings.clearBufferuiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) - } - - @inlinable func clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint) { - let this = jsObject - _ = this[Strings.clearBufferfi].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, depth.jsValue, stencil.jsValue]) - } - - @inlinable func createQuery() -> WebGLQuery? { - let this = jsObject - return this[Strings.createQuery].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteQuery(query: WebGLQuery?) { - let this = jsObject - _ = this[Strings.deleteQuery].function!(this: this, arguments: [query.jsValue]) - } - - @inlinable func isQuery(query: WebGLQuery?) -> GLboolean { - let this = jsObject - return this[Strings.isQuery].function!(this: this, arguments: [query.jsValue]).fromJSValue()! - } - - @inlinable func beginQuery(target: GLenum, query: WebGLQuery) { - let this = jsObject - _ = this[Strings.beginQuery].function!(this: this, arguments: [target.jsValue, query.jsValue]) - } - - @inlinable func endQuery(target: GLenum) { - let this = jsObject - _ = this[Strings.endQuery].function!(this: this, arguments: [target.jsValue]) - } - - @inlinable func getQuery(target: GLenum, pname: GLenum) -> WebGLQuery? { - let this = jsObject - return this[Strings.getQuery].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getQueryParameter(query: WebGLQuery, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getQueryParameter].function!(this: this, arguments: [query.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func createSampler() -> WebGLSampler? { - let this = jsObject - return this[Strings.createSampler].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteSampler(sampler: WebGLSampler?) { - let this = jsObject - _ = this[Strings.deleteSampler].function!(this: this, arguments: [sampler.jsValue]) - } - - @inlinable func isSampler(sampler: WebGLSampler?) -> GLboolean { - let this = jsObject - return this[Strings.isSampler].function!(this: this, arguments: [sampler.jsValue]).fromJSValue()! - } - - @inlinable func bindSampler(unit: GLuint, sampler: WebGLSampler?) { - let this = jsObject - _ = this[Strings.bindSampler].function!(this: this, arguments: [unit.jsValue, sampler.jsValue]) - } - - @inlinable func samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.samplerParameteri].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat) { - let this = jsObject - _ = this[Strings.samplerParameterf].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func getSamplerParameter(sampler: WebGLSampler, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getSamplerParameter].function!(this: this, arguments: [sampler.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func fenceSync(condition: GLenum, flags: GLbitfield) -> WebGLSync? { - let this = jsObject - return this[Strings.fenceSync].function!(this: this, arguments: [condition.jsValue, flags.jsValue]).fromJSValue()! - } - - @inlinable func isSync(sync: WebGLSync?) -> GLboolean { - let this = jsObject - return this[Strings.isSync].function!(this: this, arguments: [sync.jsValue]).fromJSValue()! - } - - @inlinable func deleteSync(sync: WebGLSync?) { - let this = jsObject - _ = this[Strings.deleteSync].function!(this: this, arguments: [sync.jsValue]) - } - - @inlinable func clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64) -> GLenum { - let this = jsObject - return this[Strings.clientWaitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]).fromJSValue()! - } - - @inlinable func waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64) { - let this = jsObject - _ = this[Strings.waitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]) - } - - @inlinable func getSyncParameter(sync: WebGLSync, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getSyncParameter].function!(this: this, arguments: [sync.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func createTransformFeedback() -> WebGLTransformFeedback? { - let this = jsObject - return this[Strings.createTransformFeedback].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteTransformFeedback(tf: WebGLTransformFeedback?) { - let this = jsObject - _ = this[Strings.deleteTransformFeedback].function!(this: this, arguments: [tf.jsValue]) - } - - @inlinable func isTransformFeedback(tf: WebGLTransformFeedback?) -> GLboolean { - let this = jsObject - return this[Strings.isTransformFeedback].function!(this: this, arguments: [tf.jsValue]).fromJSValue()! - } - - @inlinable func bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback?) { - let this = jsObject - _ = this[Strings.bindTransformFeedback].function!(this: this, arguments: [target.jsValue, tf.jsValue]) - } - - @inlinable func beginTransformFeedback(primitiveMode: GLenum) { - let this = jsObject - _ = this[Strings.beginTransformFeedback].function!(this: this, arguments: [primitiveMode.jsValue]) - } - - @inlinable func endTransformFeedback() { - let this = jsObject - _ = this[Strings.endTransformFeedback].function!(this: this, arguments: []) - } - - @inlinable func transformFeedbackVaryings(program: WebGLProgram, varyings: [String], bufferMode: GLenum) { - let this = jsObject - _ = this[Strings.transformFeedbackVaryings].function!(this: this, arguments: [program.jsValue, varyings.jsValue, bufferMode.jsValue]) - } - - @inlinable func getTransformFeedbackVarying(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getTransformFeedbackVarying].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func pauseTransformFeedback() { - let this = jsObject - _ = this[Strings.pauseTransformFeedback].function!(this: this, arguments: []) - } - - @inlinable func resumeTransformFeedback() { - let this = jsObject - _ = this[Strings.resumeTransformFeedback].function!(this: this, arguments: []) - } - - @inlinable func bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.bindBufferBase].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue]) - } - - @inlinable func bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer?, offset: GLintptr, size: GLsizeiptr) { - let this = jsObject - _ = this[Strings.bindBufferRange].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue, offset.jsValue, size.jsValue]) - } - - @inlinable func getIndexedParameter(target: GLenum, index: GLuint) -> JSValue { - let this = jsObject - return this[Strings.getIndexedParameter].function!(this: this, arguments: [target.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getUniformIndices(program: WebGLProgram, uniformNames: [String]) -> [GLuint]? { - let this = jsObject - return this[Strings.getUniformIndices].function!(this: this, arguments: [program.jsValue, uniformNames.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniforms(program: WebGLProgram, uniformIndices: [GLuint], pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getActiveUniforms].function!(this: this, arguments: [program.jsValue, uniformIndices.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getUniformBlockIndex(program: WebGLProgram, uniformBlockName: String) -> GLuint { - let this = jsObject - return this[Strings.getUniformBlockIndex].function!(this: this, arguments: [program.jsValue, uniformBlockName.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getActiveUniformBlockParameter].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint) -> String? { - let this = jsObject - return this[Strings.getActiveUniformBlockName].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue]).fromJSValue()! - } - - @inlinable func uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint) { - let this = jsObject - _ = this[Strings.uniformBlockBinding].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, uniformBlockBinding.jsValue]) - } - - @inlinable func createVertexArray() -> WebGLVertexArrayObject? { - let this = jsObject - return this[Strings.createVertexArray].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteVertexArray(vertexArray: WebGLVertexArrayObject?) { - let this = jsObject - _ = this[Strings.deleteVertexArray].function!(this: this, arguments: [vertexArray.jsValue]) - } - - @inlinable func isVertexArray(vertexArray: WebGLVertexArrayObject?) -> GLboolean { - let this = jsObject - return this[Strings.isVertexArray].function!(this: this, arguments: [vertexArray.jsValue]).fromJSValue()! - } - - @inlinable func bindVertexArray(array: WebGLVertexArrayObject?) { - let this = jsObject - _ = this[Strings.bindVertexArray].function!(this: this, arguments: [array.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift deleted file mode 100644 index 659213d5..00000000 --- a/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift +++ /dev/null @@ -1,317 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGL2RenderingContextOverloads: JSBridgedClass {} -public extension WebGL2RenderingContextOverloads { - @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) - } - - @inlinable func bufferData(target: GLenum, srcData: BufferSource?, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue]) - } - - @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue]) - } - - @inlinable func bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length: GLuint? = nil) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) - } - - @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length: GLuint? = nil) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = format.jsValue - let _arg4 = type.jsValue - let _arg5 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = srcData.jsValue - let _arg9 = srcOffset.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = srcData.jsValue - let _arg9 = srcOffset.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = imageSize.jsValue - let _arg7 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = srcData.jsValue - let _arg7 = srcOffset?.jsValue ?? .undefined - let _arg8 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = imageSize.jsValue - let _arg8 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = srcData.jsValue - let _arg8 = srcOffset?.jsValue ?? .undefined - let _arg9 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func uniform1fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform2fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform3fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform4fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform1iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform2iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform3iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform4iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView?) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = dstData.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = offset.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = dstData.jsValue - let _arg7 = dstOffset.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift deleted file mode 100644 index 38991452..00000000 --- a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLActiveInfo: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLActiveInfo].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var size: GLint - - @ReadonlyAttribute - public var type: GLenum - - @ReadonlyAttribute - public var name: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLBuffer.swift b/Sources/DOMKit/WebIDL/WebGLBuffer.swift deleted file mode 100644 index c5217eb0..00000000 --- a/Sources/DOMKit/WebIDL/WebGLBuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLBuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLBuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift deleted file mode 100644 index 28853501..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextAttributes: BridgedDictionary { - public convenience init(alpha: Bool, depth: Bool, stencil: Bool, antialias: Bool, premultipliedAlpha: Bool, preserveDrawingBuffer: Bool, powerPreference: WebGLPowerPreference, failIfMajorPerformanceCaveat: Bool, desynchronized: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - object[Strings.depth] = depth.jsValue - object[Strings.stencil] = stencil.jsValue - object[Strings.antialias] = antialias.jsValue - object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue - object[Strings.preserveDrawingBuffer] = preserveDrawingBuffer.jsValue - object[Strings.powerPreference] = powerPreference.jsValue - object[Strings.failIfMajorPerformanceCaveat] = failIfMajorPerformanceCaveat.jsValue - object[Strings.desynchronized] = desynchronized.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _depth = ReadWriteAttribute(jsObject: object, name: Strings.depth) - _stencil = ReadWriteAttribute(jsObject: object, name: Strings.stencil) - _antialias = ReadWriteAttribute(jsObject: object, name: Strings.antialias) - _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) - _preserveDrawingBuffer = ReadWriteAttribute(jsObject: object, name: Strings.preserveDrawingBuffer) - _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) - _failIfMajorPerformanceCaveat = ReadWriteAttribute(jsObject: object, name: Strings.failIfMajorPerformanceCaveat) - _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool - - @ReadWriteAttribute - public var depth: Bool - - @ReadWriteAttribute - public var stencil: Bool - - @ReadWriteAttribute - public var antialias: Bool - - @ReadWriteAttribute - public var premultipliedAlpha: Bool - - @ReadWriteAttribute - public var preserveDrawingBuffer: Bool - - @ReadWriteAttribute - public var powerPreference: WebGLPowerPreference - - @ReadWriteAttribute - public var failIfMajorPerformanceCaveat: Bool - - @ReadWriteAttribute - public var desynchronized: Bool -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift deleted file mode 100644 index 20837070..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLContextEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _statusMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusMessage) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInit: WebGLContextEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInit?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var statusMessage: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift deleted file mode 100644 index 20c0c668..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextEventInit: BridgedDictionary { - public convenience init(statusMessage: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.statusMessage] = statusMessage.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _statusMessage = ReadWriteAttribute(jsObject: object, name: Strings.statusMessage) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var statusMessage: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift deleted file mode 100644 index 83d1af39..00000000 --- a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLFramebuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLFramebuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLObject.swift b/Sources/DOMKit/WebIDL/WebGLObject.swift deleted file mode 100644 index c50d37fc..00000000 --- a/Sources/DOMKit/WebIDL/WebGLObject.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLObject: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLObject].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift deleted file mode 100644 index ce6b23f8..00000000 --- a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum WebGLPowerPreference: JSString, JSValueCompatible { - case `default` = "default" - case lowPower = "low-power" - case highPerformance = "high-performance" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/WebGLProgram.swift b/Sources/DOMKit/WebIDL/WebGLProgram.swift deleted file mode 100644 index e38d4a93..00000000 --- a/Sources/DOMKit/WebIDL/WebGLProgram.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLProgram: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLProgram].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLQuery.swift b/Sources/DOMKit/WebIDL/WebGLQuery.swift deleted file mode 100644 index 901356e4..00000000 --- a/Sources/DOMKit/WebIDL/WebGLQuery.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLQuery: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLQuery].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift deleted file mode 100644 index 3b364894..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLRenderbuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift deleted file mode 100644 index f9919cbe..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLRenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGLRenderingContextOverloads { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift deleted file mode 100644 index c0baf5db..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift +++ /dev/null @@ -1,1217 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGLRenderingContextBase: JSBridgedClass {} -public extension WebGLRenderingContextBase { - @inlinable static var DEPTH_BUFFER_BIT: GLenum { 0x0000_0100 } - - @inlinable static var STENCIL_BUFFER_BIT: GLenum { 0x0000_0400 } - - @inlinable static var COLOR_BUFFER_BIT: GLenum { 0x0000_4000 } - - @inlinable static var POINTS: GLenum { 0x0000 } - - @inlinable static var LINES: GLenum { 0x0001 } - - @inlinable static var LINE_LOOP: GLenum { 0x0002 } - - @inlinable static var LINE_STRIP: GLenum { 0x0003 } - - @inlinable static var TRIANGLES: GLenum { 0x0004 } - - @inlinable static var TRIANGLE_STRIP: GLenum { 0x0005 } - - @inlinable static var TRIANGLE_FAN: GLenum { 0x0006 } - - @inlinable static var ZERO: GLenum { 0 } - - @inlinable static var ONE: GLenum { 1 } - - @inlinable static var SRC_COLOR: GLenum { 0x0300 } - - @inlinable static var ONE_MINUS_SRC_COLOR: GLenum { 0x0301 } - - @inlinable static var SRC_ALPHA: GLenum { 0x0302 } - - @inlinable static var ONE_MINUS_SRC_ALPHA: GLenum { 0x0303 } - - @inlinable static var DST_ALPHA: GLenum { 0x0304 } - - @inlinable static var ONE_MINUS_DST_ALPHA: GLenum { 0x0305 } - - @inlinable static var DST_COLOR: GLenum { 0x0306 } - - @inlinable static var ONE_MINUS_DST_COLOR: GLenum { 0x0307 } - - @inlinable static var SRC_ALPHA_SATURATE: GLenum { 0x0308 } - - @inlinable static var FUNC_ADD: GLenum { 0x8006 } - - @inlinable static var BLEND_EQUATION: GLenum { 0x8009 } - - @inlinable static var BLEND_EQUATION_RGB: GLenum { 0x8009 } - - @inlinable static var BLEND_EQUATION_ALPHA: GLenum { 0x883D } - - @inlinable static var FUNC_SUBTRACT: GLenum { 0x800A } - - @inlinable static var FUNC_REVERSE_SUBTRACT: GLenum { 0x800B } - - @inlinable static var BLEND_DST_RGB: GLenum { 0x80C8 } - - @inlinable static var BLEND_SRC_RGB: GLenum { 0x80C9 } - - @inlinable static var BLEND_DST_ALPHA: GLenum { 0x80CA } - - @inlinable static var BLEND_SRC_ALPHA: GLenum { 0x80CB } - - @inlinable static var CONSTANT_COLOR: GLenum { 0x8001 } - - @inlinable static var ONE_MINUS_CONSTANT_COLOR: GLenum { 0x8002 } - - @inlinable static var CONSTANT_ALPHA: GLenum { 0x8003 } - - @inlinable static var ONE_MINUS_CONSTANT_ALPHA: GLenum { 0x8004 } - - @inlinable static var BLEND_COLOR: GLenum { 0x8005 } - - @inlinable static var ARRAY_BUFFER: GLenum { 0x8892 } - - @inlinable static var ELEMENT_ARRAY_BUFFER: GLenum { 0x8893 } - - @inlinable static var ARRAY_BUFFER_BINDING: GLenum { 0x8894 } - - @inlinable static var ELEMENT_ARRAY_BUFFER_BINDING: GLenum { 0x8895 } - - @inlinable static var STREAM_DRAW: GLenum { 0x88E0 } - - @inlinable static var STATIC_DRAW: GLenum { 0x88E4 } - - @inlinable static var DYNAMIC_DRAW: GLenum { 0x88E8 } - - @inlinable static var BUFFER_SIZE: GLenum { 0x8764 } - - @inlinable static var BUFFER_USAGE: GLenum { 0x8765 } - - @inlinable static var CURRENT_VERTEX_ATTRIB: GLenum { 0x8626 } - - @inlinable static var FRONT: GLenum { 0x0404 } - - @inlinable static var BACK: GLenum { 0x0405 } - - @inlinable static var FRONT_AND_BACK: GLenum { 0x0408 } - - @inlinable static var CULL_FACE: GLenum { 0x0B44 } - - @inlinable static var BLEND: GLenum { 0x0BE2 } - - @inlinable static var DITHER: GLenum { 0x0BD0 } - - @inlinable static var STENCIL_TEST: GLenum { 0x0B90 } - - @inlinable static var DEPTH_TEST: GLenum { 0x0B71 } - - @inlinable static var SCISSOR_TEST: GLenum { 0x0C11 } - - @inlinable static var POLYGON_OFFSET_FILL: GLenum { 0x8037 } - - @inlinable static var SAMPLE_ALPHA_TO_COVERAGE: GLenum { 0x809E } - - @inlinable static var SAMPLE_COVERAGE: GLenum { 0x80A0 } - - @inlinable static var NO_ERROR: GLenum { 0 } - - @inlinable static var INVALID_ENUM: GLenum { 0x0500 } - - @inlinable static var INVALID_VALUE: GLenum { 0x0501 } - - @inlinable static var INVALID_OPERATION: GLenum { 0x0502 } - - @inlinable static var OUT_OF_MEMORY: GLenum { 0x0505 } - - @inlinable static var CW: GLenum { 0x0900 } - - @inlinable static var CCW: GLenum { 0x0901 } - - @inlinable static var LINE_WIDTH: GLenum { 0x0B21 } - - @inlinable static var ALIASED_POINT_SIZE_RANGE: GLenum { 0x846D } - - @inlinable static var ALIASED_LINE_WIDTH_RANGE: GLenum { 0x846E } - - @inlinable static var CULL_FACE_MODE: GLenum { 0x0B45 } - - @inlinable static var FRONT_FACE: GLenum { 0x0B46 } - - @inlinable static var DEPTH_RANGE: GLenum { 0x0B70 } - - @inlinable static var DEPTH_WRITEMASK: GLenum { 0x0B72 } - - @inlinable static var DEPTH_CLEAR_VALUE: GLenum { 0x0B73 } - - @inlinable static var DEPTH_FUNC: GLenum { 0x0B74 } - - @inlinable static var STENCIL_CLEAR_VALUE: GLenum { 0x0B91 } - - @inlinable static var STENCIL_FUNC: GLenum { 0x0B92 } - - @inlinable static var STENCIL_FAIL: GLenum { 0x0B94 } - - @inlinable static var STENCIL_PASS_DEPTH_FAIL: GLenum { 0x0B95 } - - @inlinable static var STENCIL_PASS_DEPTH_PASS: GLenum { 0x0B96 } - - @inlinable static var STENCIL_REF: GLenum { 0x0B97 } - - @inlinable static var STENCIL_VALUE_MASK: GLenum { 0x0B93 } - - @inlinable static var STENCIL_WRITEMASK: GLenum { 0x0B98 } - - @inlinable static var STENCIL_BACK_FUNC: GLenum { 0x8800 } - - @inlinable static var STENCIL_BACK_FAIL: GLenum { 0x8801 } - - @inlinable static var STENCIL_BACK_PASS_DEPTH_FAIL: GLenum { 0x8802 } - - @inlinable static var STENCIL_BACK_PASS_DEPTH_PASS: GLenum { 0x8803 } - - @inlinable static var STENCIL_BACK_REF: GLenum { 0x8CA3 } - - @inlinable static var STENCIL_BACK_VALUE_MASK: GLenum { 0x8CA4 } - - @inlinable static var STENCIL_BACK_WRITEMASK: GLenum { 0x8CA5 } - - @inlinable static var VIEWPORT: GLenum { 0x0BA2 } - - @inlinable static var SCISSOR_BOX: GLenum { 0x0C10 } - - @inlinable static var COLOR_CLEAR_VALUE: GLenum { 0x0C22 } - - @inlinable static var COLOR_WRITEMASK: GLenum { 0x0C23 } - - @inlinable static var UNPACK_ALIGNMENT: GLenum { 0x0CF5 } - - @inlinable static var PACK_ALIGNMENT: GLenum { 0x0D05 } - - @inlinable static var MAX_TEXTURE_SIZE: GLenum { 0x0D33 } - - @inlinable static var MAX_VIEWPORT_DIMS: GLenum { 0x0D3A } - - @inlinable static var SUBPIXEL_BITS: GLenum { 0x0D50 } - - @inlinable static var RED_BITS: GLenum { 0x0D52 } - - @inlinable static var GREEN_BITS: GLenum { 0x0D53 } - - @inlinable static var BLUE_BITS: GLenum { 0x0D54 } - - @inlinable static var ALPHA_BITS: GLenum { 0x0D55 } - - @inlinable static var DEPTH_BITS: GLenum { 0x0D56 } - - @inlinable static var STENCIL_BITS: GLenum { 0x0D57 } - - @inlinable static var POLYGON_OFFSET_UNITS: GLenum { 0x2A00 } - - @inlinable static var POLYGON_OFFSET_FACTOR: GLenum { 0x8038 } - - @inlinable static var TEXTURE_BINDING_2D: GLenum { 0x8069 } - - @inlinable static var SAMPLE_BUFFERS: GLenum { 0x80A8 } - - @inlinable static var SAMPLES: GLenum { 0x80A9 } - - @inlinable static var SAMPLE_COVERAGE_VALUE: GLenum { 0x80AA } - - @inlinable static var SAMPLE_COVERAGE_INVERT: GLenum { 0x80AB } - - @inlinable static var COMPRESSED_TEXTURE_FORMATS: GLenum { 0x86A3 } - - @inlinable static var DONT_CARE: GLenum { 0x1100 } - - @inlinable static var FASTEST: GLenum { 0x1101 } - - @inlinable static var NICEST: GLenum { 0x1102 } - - @inlinable static var GENERATE_MIPMAP_HINT: GLenum { 0x8192 } - - @inlinable static var BYTE: GLenum { 0x1400 } - - @inlinable static var UNSIGNED_BYTE: GLenum { 0x1401 } - - @inlinable static var SHORT: GLenum { 0x1402 } - - @inlinable static var UNSIGNED_SHORT: GLenum { 0x1403 } - - @inlinable static var INT: GLenum { 0x1404 } - - @inlinable static var UNSIGNED_INT: GLenum { 0x1405 } - - @inlinable static var FLOAT: GLenum { 0x1406 } - - @inlinable static var DEPTH_COMPONENT: GLenum { 0x1902 } - - @inlinable static var ALPHA: GLenum { 0x1906 } - - @inlinable static var RGB: GLenum { 0x1907 } - - @inlinable static var RGBA: GLenum { 0x1908 } - - @inlinable static var LUMINANCE: GLenum { 0x1909 } - - @inlinable static var LUMINANCE_ALPHA: GLenum { 0x190A } - - @inlinable static var UNSIGNED_SHORT_4_4_4_4: GLenum { 0x8033 } - - @inlinable static var UNSIGNED_SHORT_5_5_5_1: GLenum { 0x8034 } - - @inlinable static var UNSIGNED_SHORT_5_6_5: GLenum { 0x8363 } - - @inlinable static var FRAGMENT_SHADER: GLenum { 0x8B30 } - - @inlinable static var VERTEX_SHADER: GLenum { 0x8B31 } - - @inlinable static var MAX_VERTEX_ATTRIBS: GLenum { 0x8869 } - - @inlinable static var MAX_VERTEX_UNIFORM_VECTORS: GLenum { 0x8DFB } - - @inlinable static var MAX_VARYING_VECTORS: GLenum { 0x8DFC } - - @inlinable static var MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4D } - - @inlinable static var MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4C } - - @inlinable static var MAX_TEXTURE_IMAGE_UNITS: GLenum { 0x8872 } - - @inlinable static var MAX_FRAGMENT_UNIFORM_VECTORS: GLenum { 0x8DFD } - - @inlinable static var SHADER_TYPE: GLenum { 0x8B4F } - - @inlinable static var DELETE_STATUS: GLenum { 0x8B80 } - - @inlinable static var LINK_STATUS: GLenum { 0x8B82 } - - @inlinable static var VALIDATE_STATUS: GLenum { 0x8B83 } - - @inlinable static var ATTACHED_SHADERS: GLenum { 0x8B85 } - - @inlinable static var ACTIVE_UNIFORMS: GLenum { 0x8B86 } - - @inlinable static var ACTIVE_ATTRIBUTES: GLenum { 0x8B89 } - - @inlinable static var SHADING_LANGUAGE_VERSION: GLenum { 0x8B8C } - - @inlinable static var CURRENT_PROGRAM: GLenum { 0x8B8D } - - @inlinable static var NEVER: GLenum { 0x0200 } - - @inlinable static var LESS: GLenum { 0x0201 } - - @inlinable static var EQUAL: GLenum { 0x0202 } - - @inlinable static var LEQUAL: GLenum { 0x0203 } - - @inlinable static var GREATER: GLenum { 0x0204 } - - @inlinable static var NOTEQUAL: GLenum { 0x0205 } - - @inlinable static var GEQUAL: GLenum { 0x0206 } - - @inlinable static var ALWAYS: GLenum { 0x0207 } - - @inlinable static var KEEP: GLenum { 0x1E00 } - - @inlinable static var REPLACE: GLenum { 0x1E01 } - - @inlinable static var INCR: GLenum { 0x1E02 } - - @inlinable static var DECR: GLenum { 0x1E03 } - - @inlinable static var INVERT: GLenum { 0x150A } - - @inlinable static var INCR_WRAP: GLenum { 0x8507 } - - @inlinable static var DECR_WRAP: GLenum { 0x8508 } - - @inlinable static var VENDOR: GLenum { 0x1F00 } - - @inlinable static var RENDERER: GLenum { 0x1F01 } - - @inlinable static var VERSION: GLenum { 0x1F02 } - - @inlinable static var NEAREST: GLenum { 0x2600 } - - @inlinable static var LINEAR: GLenum { 0x2601 } - - @inlinable static var NEAREST_MIPMAP_NEAREST: GLenum { 0x2700 } - - @inlinable static var LINEAR_MIPMAP_NEAREST: GLenum { 0x2701 } - - @inlinable static var NEAREST_MIPMAP_LINEAR: GLenum { 0x2702 } - - @inlinable static var LINEAR_MIPMAP_LINEAR: GLenum { 0x2703 } - - @inlinable static var TEXTURE_MAG_FILTER: GLenum { 0x2800 } - - @inlinable static var TEXTURE_MIN_FILTER: GLenum { 0x2801 } - - @inlinable static var TEXTURE_WRAP_S: GLenum { 0x2802 } - - @inlinable static var TEXTURE_WRAP_T: GLenum { 0x2803 } - - @inlinable static var TEXTURE_2D: GLenum { 0x0DE1 } - - @inlinable static var TEXTURE: GLenum { 0x1702 } - - @inlinable static var TEXTURE_CUBE_MAP: GLenum { 0x8513 } - - @inlinable static var TEXTURE_BINDING_CUBE_MAP: GLenum { 0x8514 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_X: GLenum { 0x8515 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum { 0x8516 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum { 0x8517 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum { 0x8518 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum { 0x8519 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum { 0x851A } - - @inlinable static var MAX_CUBE_MAP_TEXTURE_SIZE: GLenum { 0x851C } - - @inlinable static var TEXTURE0: GLenum { 0x84C0 } - - @inlinable static var TEXTURE1: GLenum { 0x84C1 } - - @inlinable static var TEXTURE2: GLenum { 0x84C2 } - - @inlinable static var TEXTURE3: GLenum { 0x84C3 } - - @inlinable static var TEXTURE4: GLenum { 0x84C4 } - - @inlinable static var TEXTURE5: GLenum { 0x84C5 } - - @inlinable static var TEXTURE6: GLenum { 0x84C6 } - - @inlinable static var TEXTURE7: GLenum { 0x84C7 } - - @inlinable static var TEXTURE8: GLenum { 0x84C8 } - - @inlinable static var TEXTURE9: GLenum { 0x84C9 } - - @inlinable static var TEXTURE10: GLenum { 0x84CA } - - @inlinable static var TEXTURE11: GLenum { 0x84CB } - - @inlinable static var TEXTURE12: GLenum { 0x84CC } - - @inlinable static var TEXTURE13: GLenum { 0x84CD } - - @inlinable static var TEXTURE14: GLenum { 0x84CE } - - @inlinable static var TEXTURE15: GLenum { 0x84CF } - - @inlinable static var TEXTURE16: GLenum { 0x84D0 } - - @inlinable static var TEXTURE17: GLenum { 0x84D1 } - - @inlinable static var TEXTURE18: GLenum { 0x84D2 } - - @inlinable static var TEXTURE19: GLenum { 0x84D3 } - - @inlinable static var TEXTURE20: GLenum { 0x84D4 } - - @inlinable static var TEXTURE21: GLenum { 0x84D5 } - - @inlinable static var TEXTURE22: GLenum { 0x84D6 } - - @inlinable static var TEXTURE23: GLenum { 0x84D7 } - - @inlinable static var TEXTURE24: GLenum { 0x84D8 } - - @inlinable static var TEXTURE25: GLenum { 0x84D9 } - - @inlinable static var TEXTURE26: GLenum { 0x84DA } - - @inlinable static var TEXTURE27: GLenum { 0x84DB } - - @inlinable static var TEXTURE28: GLenum { 0x84DC } - - @inlinable static var TEXTURE29: GLenum { 0x84DD } - - @inlinable static var TEXTURE30: GLenum { 0x84DE } - - @inlinable static var TEXTURE31: GLenum { 0x84DF } - - @inlinable static var ACTIVE_TEXTURE: GLenum { 0x84E0 } - - @inlinable static var REPEAT: GLenum { 0x2901 } - - @inlinable static var CLAMP_TO_EDGE: GLenum { 0x812F } - - @inlinable static var MIRRORED_REPEAT: GLenum { 0x8370 } - - @inlinable static var FLOAT_VEC2: GLenum { 0x8B50 } - - @inlinable static var FLOAT_VEC3: GLenum { 0x8B51 } - - @inlinable static var FLOAT_VEC4: GLenum { 0x8B52 } - - @inlinable static var INT_VEC2: GLenum { 0x8B53 } - - @inlinable static var INT_VEC3: GLenum { 0x8B54 } - - @inlinable static var INT_VEC4: GLenum { 0x8B55 } - - @inlinable static var BOOL: GLenum { 0x8B56 } - - @inlinable static var BOOL_VEC2: GLenum { 0x8B57 } - - @inlinable static var BOOL_VEC3: GLenum { 0x8B58 } - - @inlinable static var BOOL_VEC4: GLenum { 0x8B59 } - - @inlinable static var FLOAT_MAT2: GLenum { 0x8B5A } - - @inlinable static var FLOAT_MAT3: GLenum { 0x8B5B } - - @inlinable static var FLOAT_MAT4: GLenum { 0x8B5C } - - @inlinable static var SAMPLER_2D: GLenum { 0x8B5E } - - @inlinable static var SAMPLER_CUBE: GLenum { 0x8B60 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_ENABLED: GLenum { 0x8622 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_SIZE: GLenum { 0x8623 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_STRIDE: GLenum { 0x8624 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_TYPE: GLenum { 0x8625 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum { 0x886A } - - @inlinable static var VERTEX_ATTRIB_ARRAY_POINTER: GLenum { 0x8645 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum { 0x889F } - - @inlinable static var IMPLEMENTATION_COLOR_READ_TYPE: GLenum { 0x8B9A } - - @inlinable static var IMPLEMENTATION_COLOR_READ_FORMAT: GLenum { 0x8B9B } - - @inlinable static var COMPILE_STATUS: GLenum { 0x8B81 } - - @inlinable static var LOW_FLOAT: GLenum { 0x8DF0 } - - @inlinable static var MEDIUM_FLOAT: GLenum { 0x8DF1 } - - @inlinable static var HIGH_FLOAT: GLenum { 0x8DF2 } - - @inlinable static var LOW_INT: GLenum { 0x8DF3 } - - @inlinable static var MEDIUM_INT: GLenum { 0x8DF4 } - - @inlinable static var HIGH_INT: GLenum { 0x8DF5 } - - @inlinable static var FRAMEBUFFER: GLenum { 0x8D40 } - - @inlinable static var RENDERBUFFER: GLenum { 0x8D41 } - - @inlinable static var RGBA4: GLenum { 0x8056 } - - @inlinable static var RGB5_A1: GLenum { 0x8057 } - - @inlinable static var RGB565: GLenum { 0x8D62 } - - @inlinable static var DEPTH_COMPONENT16: GLenum { 0x81A5 } - - @inlinable static var STENCIL_INDEX8: GLenum { 0x8D48 } - - @inlinable static var DEPTH_STENCIL: GLenum { 0x84F9 } - - @inlinable static var RENDERBUFFER_WIDTH: GLenum { 0x8D42 } - - @inlinable static var RENDERBUFFER_HEIGHT: GLenum { 0x8D43 } - - @inlinable static var RENDERBUFFER_INTERNAL_FORMAT: GLenum { 0x8D44 } - - @inlinable static var RENDERBUFFER_RED_SIZE: GLenum { 0x8D50 } - - @inlinable static var RENDERBUFFER_GREEN_SIZE: GLenum { 0x8D51 } - - @inlinable static var RENDERBUFFER_BLUE_SIZE: GLenum { 0x8D52 } - - @inlinable static var RENDERBUFFER_ALPHA_SIZE: GLenum { 0x8D53 } - - @inlinable static var RENDERBUFFER_DEPTH_SIZE: GLenum { 0x8D54 } - - @inlinable static var RENDERBUFFER_STENCIL_SIZE: GLenum { 0x8D55 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum { 0x8CD0 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum { 0x8CD1 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum { 0x8CD2 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum { 0x8CD3 } - - @inlinable static var COLOR_ATTACHMENT0: GLenum { 0x8CE0 } - - @inlinable static var DEPTH_ATTACHMENT: GLenum { 0x8D00 } - - @inlinable static var STENCIL_ATTACHMENT: GLenum { 0x8D20 } - - @inlinable static var DEPTH_STENCIL_ATTACHMENT: GLenum { 0x821A } - - @inlinable static var NONE: GLenum { 0 } - - @inlinable static var FRAMEBUFFER_COMPLETE: GLenum { 0x8CD5 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum { 0x8CD6 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum { 0x8CD7 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum { 0x8CD9 } - - @inlinable static var FRAMEBUFFER_UNSUPPORTED: GLenum { 0x8CDD } - - @inlinable static var FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } - - @inlinable static var RENDERBUFFER_BINDING: GLenum { 0x8CA7 } - - @inlinable static var MAX_RENDERBUFFER_SIZE: GLenum { 0x84E8 } - - @inlinable static var INVALID_FRAMEBUFFER_OPERATION: GLenum { 0x0506 } - - @inlinable static var UNPACK_FLIP_Y_WEBGL: GLenum { 0x9240 } - - @inlinable static var UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum { 0x9241 } - - @inlinable static var CONTEXT_LOST_WEBGL: GLenum { 0x9242 } - - @inlinable static var UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum { 0x9243 } - - @inlinable static var BROWSER_DEFAULT_WEBGL: GLenum { 0x9244 } - - @inlinable var canvas: HTMLCanvasElement_or_OffscreenCanvas { ReadonlyAttribute[Strings.canvas, in: jsObject] } - - @inlinable var drawingBufferWidth: GLsizei { ReadonlyAttribute[Strings.drawingBufferWidth, in: jsObject] } - - @inlinable var drawingBufferHeight: GLsizei { ReadonlyAttribute[Strings.drawingBufferHeight, in: jsObject] } - - @inlinable func getContextAttributes() -> WebGLContextAttributes? { - let this = jsObject - return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func isContextLost() -> Bool { - let this = jsObject - return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getSupportedExtensions() -> [String]? { - let this = jsObject - return this[Strings.getSupportedExtensions].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getExtension(name: String) -> JSObject? { - let this = jsObject - return this[Strings.getExtension].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable func activeTexture(texture: GLenum) { - let this = jsObject - _ = this[Strings.activeTexture].function!(this: this, arguments: [texture.jsValue]) - } - - @inlinable func attachShader(program: WebGLProgram, shader: WebGLShader) { - let this = jsObject - _ = this[Strings.attachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) - } - - @inlinable func bindAttribLocation(program: WebGLProgram, index: GLuint, name: String) { - let this = jsObject - _ = this[Strings.bindAttribLocation].function!(this: this, arguments: [program.jsValue, index.jsValue, name.jsValue]) - } - - @inlinable func bindBuffer(target: GLenum, buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.bindBuffer].function!(this: this, arguments: [target.jsValue, buffer.jsValue]) - } - - @inlinable func bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer?) { - let this = jsObject - _ = this[Strings.bindFramebuffer].function!(this: this, arguments: [target.jsValue, framebuffer.jsValue]) - } - - @inlinable func bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.bindRenderbuffer].function!(this: this, arguments: [target.jsValue, renderbuffer.jsValue]) - } - - @inlinable func bindTexture(target: GLenum, texture: WebGLTexture?) { - let this = jsObject - _ = this[Strings.bindTexture].function!(this: this, arguments: [target.jsValue, texture.jsValue]) - } - - @inlinable func blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { - let this = jsObject - _ = this[Strings.blendColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func blendEquation(mode: GLenum) { - let this = jsObject - _ = this[Strings.blendEquation].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) { - let this = jsObject - _ = this[Strings.blendEquationSeparate].function!(this: this, arguments: [modeRGB.jsValue, modeAlpha.jsValue]) - } - - @inlinable func blendFunc(sfactor: GLenum, dfactor: GLenum) { - let this = jsObject - _ = this[Strings.blendFunc].function!(this: this, arguments: [sfactor.jsValue, dfactor.jsValue]) - } - - @inlinable func blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) { - let this = jsObject - _ = this[Strings.blendFuncSeparate].function!(this: this, arguments: [srcRGB.jsValue, dstRGB.jsValue, srcAlpha.jsValue, dstAlpha.jsValue]) - } - - @inlinable func checkFramebufferStatus(target: GLenum) -> GLenum { - let this = jsObject - return this[Strings.checkFramebufferStatus].function!(this: this, arguments: [target.jsValue]).fromJSValue()! - } - - @inlinable func clear(mask: GLbitfield) { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: [mask.jsValue]) - } - - @inlinable func clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { - let this = jsObject - _ = this[Strings.clearColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func clearDepth(depth: GLclampf) { - let this = jsObject - _ = this[Strings.clearDepth].function!(this: this, arguments: [depth.jsValue]) - } - - @inlinable func clearStencil(s: GLint) { - let this = jsObject - _ = this[Strings.clearStencil].function!(this: this, arguments: [s.jsValue]) - } - - @inlinable func colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) { - let this = jsObject - _ = this[Strings.colorMask].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func compileShader(shader: WebGLShader) { - let this = jsObject - _ = this[Strings.compileShader].function!(this: this, arguments: [shader.jsValue]) - } - - @inlinable func copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = x.jsValue - let _arg4 = y.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = border.jsValue - let this = jsObject - _ = this[Strings.copyTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue - let _arg6 = width.jsValue - let _arg7 = height.jsValue - let this = jsObject - _ = this[Strings.copyTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func createBuffer() -> WebGLBuffer? { - let this = jsObject - return this[Strings.createBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createFramebuffer() -> WebGLFramebuffer? { - let this = jsObject - return this[Strings.createFramebuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createProgram() -> WebGLProgram? { - let this = jsObject - return this[Strings.createProgram].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createRenderbuffer() -> WebGLRenderbuffer? { - let this = jsObject - return this[Strings.createRenderbuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createShader(type: GLenum) -> WebGLShader? { - let this = jsObject - return this[Strings.createShader].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @inlinable func createTexture() -> WebGLTexture? { - let this = jsObject - return this[Strings.createTexture].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func cullFace(mode: GLenum) { - let this = jsObject - _ = this[Strings.cullFace].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func deleteBuffer(buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.deleteBuffer].function!(this: this, arguments: [buffer.jsValue]) - } - - @inlinable func deleteFramebuffer(framebuffer: WebGLFramebuffer?) { - let this = jsObject - _ = this[Strings.deleteFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]) - } - - @inlinable func deleteProgram(program: WebGLProgram?) { - let this = jsObject - _ = this[Strings.deleteProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.deleteRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]) - } - - @inlinable func deleteShader(shader: WebGLShader?) { - let this = jsObject - _ = this[Strings.deleteShader].function!(this: this, arguments: [shader.jsValue]) - } - - @inlinable func deleteTexture(texture: WebGLTexture?) { - let this = jsObject - _ = this[Strings.deleteTexture].function!(this: this, arguments: [texture.jsValue]) - } - - @inlinable func depthFunc(func: GLenum) { - let this = jsObject - _ = this[Strings.depthFunc].function!(this: this, arguments: [`func`.jsValue]) - } - - @inlinable func depthMask(flag: GLboolean) { - let this = jsObject - _ = this[Strings.depthMask].function!(this: this, arguments: [flag.jsValue]) - } - - @inlinable func depthRange(zNear: GLclampf, zFar: GLclampf) { - let this = jsObject - _ = this[Strings.depthRange].function!(this: this, arguments: [zNear.jsValue, zFar.jsValue]) - } - - @inlinable func detachShader(program: WebGLProgram, shader: WebGLShader) { - let this = jsObject - _ = this[Strings.detachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) - } - - @inlinable func disable(cap: GLenum) { - let this = jsObject - _ = this[Strings.disable].function!(this: this, arguments: [cap.jsValue]) - } - - @inlinable func disableVertexAttribArray(index: GLuint) { - let this = jsObject - _ = this[Strings.disableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable func drawArrays(mode: GLenum, first: GLint, count: GLsizei) { - let this = jsObject - _ = this[Strings.drawArrays].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue]) - } - - @inlinable func drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) { - let this = jsObject - _ = this[Strings.drawElements].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue]) - } - - @inlinable func enable(cap: GLenum) { - let this = jsObject - _ = this[Strings.enable].function!(this: this, arguments: [cap.jsValue]) - } - - @inlinable func enableVertexAttribArray(index: GLuint) { - let this = jsObject - _ = this[Strings.enableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable func finish() { - let this = jsObject - _ = this[Strings.finish].function!(this: this, arguments: []) - } - - @inlinable func flush() { - let this = jsObject - _ = this[Strings.flush].function!(this: this, arguments: []) - } - - @inlinable func framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.framebufferRenderbuffer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, renderbuffertarget.jsValue, renderbuffer.jsValue]) - } - - @inlinable func framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture?, level: GLint) { - let this = jsObject - _ = this[Strings.framebufferTexture2D].function!(this: this, arguments: [target.jsValue, attachment.jsValue, textarget.jsValue, texture.jsValue, level.jsValue]) - } - - @inlinable func frontFace(mode: GLenum) { - let this = jsObject - _ = this[Strings.frontFace].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func generateMipmap(target: GLenum) { - let this = jsObject - _ = this[Strings.generateMipmap].function!(this: this, arguments: [target.jsValue]) - } - - @inlinable func getActiveAttrib(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getActiveAttrib].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniform(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getActiveUniform].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getAttachedShaders(program: WebGLProgram) -> [WebGLShader]? { - let this = jsObject - return this[Strings.getAttachedShaders].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func getAttribLocation(program: WebGLProgram, name: String) -> GLint { - let this = jsObject - return this[Strings.getAttribLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func getBufferParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getBufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getParameter(pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getParameter].function!(this: this, arguments: [pname.jsValue]).fromJSValue()! - } - - @inlinable func getError() -> GLenum { - let this = jsObject - return this[Strings.getError].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getFramebufferAttachmentParameter].function!(this: this, arguments: [target.jsValue, attachment.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getProgramParameter(program: WebGLProgram, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getProgramParameter].function!(this: this, arguments: [program.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getProgramInfoLog(program: WebGLProgram) -> String? { - let this = jsObject - return this[Strings.getProgramInfoLog].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func getRenderbufferParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getRenderbufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getShaderParameter(shader: WebGLShader, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getShaderParameter].function!(this: this, arguments: [shader.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) -> WebGLShaderPrecisionFormat? { - let this = jsObject - return this[Strings.getShaderPrecisionFormat].function!(this: this, arguments: [shadertype.jsValue, precisiontype.jsValue]).fromJSValue()! - } - - @inlinable func getShaderInfoLog(shader: WebGLShader) -> String? { - let this = jsObject - return this[Strings.getShaderInfoLog].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func getShaderSource(shader: WebGLShader) -> String? { - let this = jsObject - return this[Strings.getShaderSource].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func getTexParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getTexParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getUniform(program: WebGLProgram, location: WebGLUniformLocation) -> JSValue { - let this = jsObject - return this[Strings.getUniform].function!(this: this, arguments: [program.jsValue, location.jsValue]).fromJSValue()! - } - - @inlinable func getUniformLocation(program: WebGLProgram, name: String) -> WebGLUniformLocation? { - let this = jsObject - return this[Strings.getUniformLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func getVertexAttrib(index: GLuint, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getVertexAttrib].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getVertexAttribOffset(index: GLuint, pname: GLenum) -> GLintptr { - let this = jsObject - return this[Strings.getVertexAttribOffset].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func hint(target: GLenum, mode: GLenum) { - let this = jsObject - _ = this[Strings.hint].function!(this: this, arguments: [target.jsValue, mode.jsValue]) - } - - @inlinable func isBuffer(buffer: WebGLBuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isBuffer].function!(this: this, arguments: [buffer.jsValue]).fromJSValue()! - } - - @inlinable func isEnabled(cap: GLenum) -> GLboolean { - let this = jsObject - return this[Strings.isEnabled].function!(this: this, arguments: [cap.jsValue]).fromJSValue()! - } - - @inlinable func isFramebuffer(framebuffer: WebGLFramebuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]).fromJSValue()! - } - - @inlinable func isProgram(program: WebGLProgram?) -> GLboolean { - let this = jsObject - return this[Strings.isProgram].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func isRenderbuffer(renderbuffer: WebGLRenderbuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]).fromJSValue()! - } - - @inlinable func isShader(shader: WebGLShader?) -> GLboolean { - let this = jsObject - return this[Strings.isShader].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func isTexture(texture: WebGLTexture?) -> GLboolean { - let this = jsObject - return this[Strings.isTexture].function!(this: this, arguments: [texture.jsValue]).fromJSValue()! - } - - @inlinable func lineWidth(width: GLfloat) { - let this = jsObject - _ = this[Strings.lineWidth].function!(this: this, arguments: [width.jsValue]) - } - - @inlinable func linkProgram(program: WebGLProgram) { - let this = jsObject - _ = this[Strings.linkProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func pixelStorei(pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.pixelStorei].function!(this: this, arguments: [pname.jsValue, param.jsValue]) - } - - @inlinable func polygonOffset(factor: GLfloat, units: GLfloat) { - let this = jsObject - _ = this[Strings.polygonOffset].function!(this: this, arguments: [factor.jsValue, units.jsValue]) - } - - @inlinable func renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.renderbufferStorage].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func sampleCoverage(value: GLclampf, invert: GLboolean) { - let this = jsObject - _ = this[Strings.sampleCoverage].function!(this: this, arguments: [value.jsValue, invert.jsValue]) - } - - @inlinable func scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.scissor].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func shaderSource(shader: WebGLShader, source: String) { - let this = jsObject - _ = this[Strings.shaderSource].function!(this: this, arguments: [shader.jsValue, source.jsValue]) - } - - @inlinable func stencilFunc(func: GLenum, ref: GLint, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilFunc].function!(this: this, arguments: [`func`.jsValue, ref.jsValue, mask.jsValue]) - } - - @inlinable func stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilFuncSeparate].function!(this: this, arguments: [face.jsValue, `func`.jsValue, ref.jsValue, mask.jsValue]) - } - - @inlinable func stencilMask(mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilMask].function!(this: this, arguments: [mask.jsValue]) - } - - @inlinable func stencilMaskSeparate(face: GLenum, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilMaskSeparate].function!(this: this, arguments: [face.jsValue, mask.jsValue]) - } - - @inlinable func stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) { - let this = jsObject - _ = this[Strings.stencilOp].function!(this: this, arguments: [fail.jsValue, zfail.jsValue, zpass.jsValue]) - } - - @inlinable func stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) { - let this = jsObject - _ = this[Strings.stencilOpSeparate].function!(this: this, arguments: [face.jsValue, fail.jsValue, zfail.jsValue, zpass.jsValue]) - } - - @inlinable func texParameterf(target: GLenum, pname: GLenum, param: GLfloat) { - let this = jsObject - _ = this[Strings.texParameterf].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func texParameteri(target: GLenum, pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.texParameteri].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func uniform1f(location: WebGLUniformLocation?, x: GLfloat) { - let this = jsObject - _ = this[Strings.uniform1f].function!(this: this, arguments: [location.jsValue, x.jsValue]) - } - - @inlinable func uniform2f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat) { - let this = jsObject - _ = this[Strings.uniform2f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func uniform3f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat) { - let this = jsObject - _ = this[Strings.uniform3f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func uniform4f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { - let this = jsObject - _ = this[Strings.uniform4f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func uniform1i(location: WebGLUniformLocation?, x: GLint) { - let this = jsObject - _ = this[Strings.uniform1i].function!(this: this, arguments: [location.jsValue, x.jsValue]) - } - - @inlinable func uniform2i(location: WebGLUniformLocation?, x: GLint, y: GLint) { - let this = jsObject - _ = this[Strings.uniform2i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func uniform3i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint) { - let this = jsObject - _ = this[Strings.uniform3i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func uniform4i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint, w: GLint) { - let this = jsObject - _ = this[Strings.uniform4i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func useProgram(program: WebGLProgram?) { - let this = jsObject - _ = this[Strings.useProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func validateProgram(program: WebGLProgram) { - let this = jsObject - _ = this[Strings.validateProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func vertexAttrib1f(index: GLuint, x: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib1f].function!(this: this, arguments: [index.jsValue, x.jsValue]) - } - - @inlinable func vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib2f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib3f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib4f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttrib1fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib1fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib2fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib2fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib3fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib3fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib4fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib4fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) { - let _arg0 = index.jsValue - let _arg1 = size.jsValue - let _arg2 = type.jsValue - let _arg3 = normalized.jsValue - let _arg4 = stride.jsValue - let _arg5 = offset.jsValue - let this = jsObject - _ = this[Strings.vertexAttribPointer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.viewport].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift deleted file mode 100644 index fe1977ac..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift +++ /dev/null @@ -1,165 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGLRenderingContextOverloads: JSBridgedClass {} -public extension WebGLRenderingContextOverloads { - @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) - } - - @inlinable func bufferData(target: GLenum, data: BufferSource?, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, data.jsValue, usage.jsValue]) - } - - @inlinable func bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, offset.jsValue, data.jsValue]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = data.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = data.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = pixels.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = format.jsValue - let _arg4 = type.jsValue - let _arg5 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } - - @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } - - @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLSampler.swift b/Sources/DOMKit/WebIDL/WebGLSampler.swift deleted file mode 100644 index 1b6c94e3..00000000 --- a/Sources/DOMKit/WebIDL/WebGLSampler.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLSampler: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSampler].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLShader.swift b/Sources/DOMKit/WebIDL/WebGLShader.swift deleted file mode 100644 index 97f2b719..00000000 --- a/Sources/DOMKit/WebIDL/WebGLShader.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLShader: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift deleted file mode 100644 index 67725e58..00000000 --- a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLShaderPrecisionFormat: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLShaderPrecisionFormat].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _rangeMin = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMin) - _rangeMax = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMax) - _precision = ReadonlyAttribute(jsObject: jsObject, name: Strings.precision) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var rangeMin: GLint - - @ReadonlyAttribute - public var rangeMax: GLint - - @ReadonlyAttribute - public var precision: GLint -} diff --git a/Sources/DOMKit/WebIDL/WebGLSync.swift b/Sources/DOMKit/WebIDL/WebGLSync.swift deleted file mode 100644 index 38271eb1..00000000 --- a/Sources/DOMKit/WebIDL/WebGLSync.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLSync: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSync].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLTexture.swift b/Sources/DOMKit/WebIDL/WebGLTexture.swift deleted file mode 100644 index ee7ad6c9..00000000 --- a/Sources/DOMKit/WebIDL/WebGLTexture.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLTexture: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift b/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift deleted file mode 100644 index 981c92d1..00000000 --- a/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLTransformFeedback: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTransformFeedback].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift deleted file mode 100644 index cf833a95..00000000 --- a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLUniformLocation: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift b/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift deleted file mode 100644 index 2ca909eb..00000000 --- a/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLVertexArrayObject: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLVertexArrayObject].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/console.swift b/Sources/DOMKit/WebIDL/console.swift deleted file mode 100644 index d61e67e0..00000000 --- a/Sources/DOMKit/WebIDL/console.swift +++ /dev/null @@ -1,105 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum console { - @inlinable public static var jsObject: JSObject { - JSObject.global[Strings.console].object! - } - - @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func clear() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public static func debug(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func error(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func info(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func log(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) - } - - @inlinable public static func trace(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func warn(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) - } - - @inlinable public static func dirxml(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func count(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func countReset(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func group(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupCollapsed(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupEnd() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupEnd].function!(this: this, arguments: []) - } - - @inlinable public static func time(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func timeEnd(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } -} diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index d56c79ee..ab6f2899 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -7,6 +7,7 @@ enum IDLBuilder { import JavaScriptKit import JavaScriptEventLoop + import JavaScriptBigIntSupport \n """ From 41fa131438aa6b7c591f9d01a363168dc8f84d66 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:08:54 +0100 Subject: [PATCH 13/18] Revert "Bump JSKit, fix BigInt support" This reverts commit f6f0fed2c609dd4f158899ed1139b56e3bee73f2. --- Package.resolved | 2 +- Package.swift | 15 +- Sources/DOMKit/WebIDL/AlphaOption.swift | 22 + Sources/DOMKit/WebIDL/AudioData.swift | 62 + .../WebIDL/AudioDataCopyToOptions.swift | 35 + Sources/DOMKit/WebIDL/AudioDataInit.swift | 45 + Sources/DOMKit/WebIDL/AudioDecoder.swift | 70 + .../DOMKit/WebIDL/AudioDecoderConfig.swift | 35 + Sources/DOMKit/WebIDL/AudioDecoderInit.swift | 25 + .../DOMKit/WebIDL/AudioDecoderSupport.swift | 25 + Sources/DOMKit/WebIDL/AudioEncoder.swift | 70 + .../DOMKit/WebIDL/AudioEncoderConfig.swift | 35 + Sources/DOMKit/WebIDL/AudioEncoderInit.swift | 25 + .../DOMKit/WebIDL/AudioEncoderSupport.swift | 25 + Sources/DOMKit/WebIDL/AudioSampleFormat.swift | 28 + Sources/DOMKit/WebIDL/BitrateMode.swift | 22 + Sources/DOMKit/WebIDL/BlobEvent.swift | 24 + Sources/DOMKit/WebIDL/BlobEventInit.swift | 25 + .../Bool_or_MediaTrackConstraints.swift | 46 + .../Bool_or_ScrollIntoViewOptions.swift | 46 + Sources/DOMKit/WebIDL/BoxQuadOptions.swift | 25 + Sources/DOMKit/WebIDL/CSSBoxType.swift | 24 + Sources/DOMKit/WebIDL/CSSPseudoElement.swift | 29 + .../WebIDL/CSSPseudoElement_or_Element.swift | 46 + .../CameraDevicePermissionDescriptor.swift | 20 + Sources/DOMKit/WebIDL/CaretPosition.swift | 27 + Sources/DOMKit/WebIDL/CodecState.swift | 23 + Sources/DOMKit/WebIDL/ConstrainBoolean.swift | 46 + .../WebIDL/ConstrainBooleanParameters.swift | 25 + .../DOMKit/WebIDL/ConstrainDOMString.swift | 60 + .../WebIDL/ConstrainDOMStringParameters.swift | 25 + Sources/DOMKit/WebIDL/ConstrainDouble.swift | 46 + .../DOMKit/WebIDL/ConstrainDoubleRange.swift | 25 + Sources/DOMKit/WebIDL/ConstrainULong.swift | 46 + .../DOMKit/WebIDL/ConstrainULongRange.swift | 25 + .../WebIDL/ConvertCoordinateOptions.swift | 25 + .../WebIDL/DevicePermissionDescriptor.swift | 20 + Sources/DOMKit/WebIDL/DoubleRange.swift | 25 + Sources/DOMKit/WebIDL/EncodedAudioChunk.swift | 39 + .../DOMKit/WebIDL/EncodedAudioChunkInit.swift | 35 + .../WebIDL/EncodedAudioChunkMetadata.swift | 20 + .../DOMKit/WebIDL/EncodedAudioChunkType.swift | 22 + Sources/DOMKit/WebIDL/EncodedVideoChunk.swift | 39 + .../DOMKit/WebIDL/EncodedVideoChunkInit.swift | 35 + .../WebIDL/EncodedVideoChunkMetadata.swift | 30 + .../DOMKit/WebIDL/EncodedVideoChunkType.swift | 22 + Sources/DOMKit/WebIDL/Float32List.swift | 46 + Sources/DOMKit/WebIDL/GeometryNode.swift | 74 + Sources/DOMKit/WebIDL/GeometryUtils.swift | 27 + .../DOMKit/WebIDL/HardwareAcceleration.swift | 23 + Sources/DOMKit/WebIDL/ImageBufferSource.swift | 46 + .../DOMKit/WebIDL/ImageDecodeOptions.swift | 25 + Sources/DOMKit/WebIDL/ImageDecodeResult.swift | 25 + Sources/DOMKit/WebIDL/ImageDecoder.swift | 68 + Sources/DOMKit/WebIDL/ImageDecoderInit.swift | 50 + Sources/DOMKit/WebIDL/ImageTrack.swift | 32 + Sources/DOMKit/WebIDL/ImageTrackList.swift | 34 + Sources/DOMKit/WebIDL/InputDeviceInfo.swift | 17 + Sources/DOMKit/WebIDL/Int32List.swift | 46 + Sources/DOMKit/WebIDL/IsVisibleOptions.swift | 16 + Sources/DOMKit/WebIDL/LatencyMode.swift | 22 + Sources/DOMKit/WebIDL/MediaDeviceInfo.swift | 35 + Sources/DOMKit/WebIDL/MediaDeviceKind.swift | 23 + Sources/DOMKit/WebIDL/MediaDevices.swift | 45 + Sources/DOMKit/WebIDL/MediaQueryList.swift | 28 + .../DOMKit/WebIDL/MediaQueryListEvent.swift | 24 + .../WebIDL/MediaQueryListEventInit.swift | 25 + Sources/DOMKit/WebIDL/MediaRecorder.swift | 94 ++ .../WebIDL/MediaRecorderErrorEvent.swift | 20 + .../WebIDL/MediaRecorderErrorEventInit.swift | 20 + .../DOMKit/WebIDL/MediaRecorderOptions.swift | 40 + Sources/DOMKit/WebIDL/MediaStream.swift | 75 + .../WebIDL/MediaStreamConstraints.swift | 25 + Sources/DOMKit/WebIDL/MediaStreamTrack.swift | 85 ++ .../DOMKit/WebIDL/MediaStreamTrackEvent.swift | 20 + .../WebIDL/MediaStreamTrackEventInit.swift | 20 + .../DOMKit/WebIDL/MediaStreamTrackState.swift | 22 + .../WebIDL/MediaTrackCapabilities.swift | 90 ++ .../WebIDL/MediaTrackConstraintSet.swift | 90 ++ .../DOMKit/WebIDL/MediaTrackConstraints.swift | 20 + .../DOMKit/WebIDL/MediaTrackSettings.swift | 90 ++ .../MediaTrackSupportedConstraints.swift | 90 ++ .../DOMKit/WebIDL/OverconstrainedError.swift | 20 + Sources/DOMKit/WebIDL/PlaneLayout.swift | 25 + Sources/DOMKit/WebIDL/RecordingState.swift | 23 + Sources/DOMKit/WebIDL/Screen.swift | 38 + Sources/DOMKit/WebIDL/ScrollBehavior.swift | 22 + .../DOMKit/WebIDL/ScrollIntoViewOptions.swift | 25 + .../DOMKit/WebIDL/ScrollLogicalPosition.swift | 24 + Sources/DOMKit/WebIDL/ScrollOptions.swift | 20 + Sources/DOMKit/WebIDL/ScrollToOptions.swift | 25 + Sources/DOMKit/WebIDL/SvcOutputMetadata.swift | 20 + Sources/DOMKit/WebIDL/TexImageSource.swift | 116 ++ Sources/DOMKit/WebIDL/ULongRange.swift | 25 + Sources/DOMKit/WebIDL/Uint32List.swift | 46 + .../DOMKit/WebIDL/VideoColorPrimaries.swift | 23 + Sources/DOMKit/WebIDL/VideoColorSpace.swift | 39 + .../DOMKit/WebIDL/VideoColorSpaceInit.swift | 35 + Sources/DOMKit/WebIDL/VideoDecoder.swift | 70 + .../DOMKit/WebIDL/VideoDecoderConfig.swift | 60 + Sources/DOMKit/WebIDL/VideoDecoderInit.swift | 25 + .../DOMKit/WebIDL/VideoDecoderSupport.swift | 25 + Sources/DOMKit/WebIDL/VideoEncoder.swift | 70 + .../DOMKit/WebIDL/VideoEncoderConfig.swift | 75 + .../WebIDL/VideoEncoderEncodeOptions.swift | 20 + Sources/DOMKit/WebIDL/VideoEncoderInit.swift | 25 + .../DOMKit/WebIDL/VideoEncoderSupport.swift | 25 + .../DOMKit/WebIDL/VideoFacingModeEnum.swift | 24 + Sources/DOMKit/WebIDL/VideoFrame.swift | 89 ++ .../DOMKit/WebIDL/VideoFrameBufferInit.swift | 65 + .../WebIDL/VideoFrameCopyToOptions.swift | 25 + Sources/DOMKit/WebIDL/VideoFrameInit.swift | 45 + .../WebIDL/VideoMatrixCoefficients.swift | 24 + Sources/DOMKit/WebIDL/VideoPixelFormat.swift | 29 + .../DOMKit/WebIDL/VideoResizeModeEnum.swift | 22 + .../WebIDL/VideoTransferCharacteristics.swift | 23 + .../WebIDL/WebGL2RenderingContext.swift | 14 + .../WebIDL/WebGL2RenderingContextBase.swift | 1162 ++++++++++++++++ .../WebGL2RenderingContextOverloads.swift | 317 +++++ Sources/DOMKit/WebIDL/WebGLActiveInfo.swift | 26 + Sources/DOMKit/WebIDL/WebGLBuffer.swift | 12 + .../WebIDL/WebGLContextAttributes.swift | 60 + Sources/DOMKit/WebIDL/WebGLContextEvent.swift | 20 + .../DOMKit/WebIDL/WebGLContextEventInit.swift | 20 + Sources/DOMKit/WebIDL/WebGLFramebuffer.swift | 12 + Sources/DOMKit/WebIDL/WebGLObject.swift | 14 + .../DOMKit/WebIDL/WebGLPowerPreference.swift | 23 + Sources/DOMKit/WebIDL/WebGLProgram.swift | 12 + Sources/DOMKit/WebIDL/WebGLQuery.swift | 12 + Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift | 12 + .../DOMKit/WebIDL/WebGLRenderingContext.swift | 14 + .../WebIDL/WebGLRenderingContextBase.swift | 1217 +++++++++++++++++ .../WebGLRenderingContextOverloads.swift | 165 +++ Sources/DOMKit/WebIDL/WebGLSampler.swift | 12 + Sources/DOMKit/WebIDL/WebGLShader.swift | 12 + .../WebIDL/WebGLShaderPrecisionFormat.swift | 26 + Sources/DOMKit/WebIDL/WebGLSync.swift | 12 + Sources/DOMKit/WebIDL/WebGLTexture.swift | 12 + .../WebIDL/WebGLTransformFeedback.swift | 12 + .../DOMKit/WebIDL/WebGLUniformLocation.swift | 14 + .../WebIDL/WebGLVertexArrayObject.swift | 12 + Sources/DOMKit/WebIDL/console.swift | 105 ++ Sources/WebIDLToSwift/IDLBuilder.swift | 1 - 143 files changed, 7603 insertions(+), 12 deletions(-) create mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift create mode 100644 Sources/DOMKit/WebIDL/AudioData.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift create mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift create mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift create mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift create mode 100644 Sources/DOMKit/WebIDL/CodecState.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift create mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/Float32List.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift create mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift create mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift create mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/Int32List.swift create mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift create mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift create mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift create mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift create mode 100644 Sources/DOMKit/WebIDL/Screen.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift create mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/Uint32List.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift create mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift create mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift create mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLQuery.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLSampler.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLSync.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift create mode 100644 Sources/DOMKit/WebIDL/console.swift diff --git a/Package.resolved b/Package.resolved index 2c01643c..60906fdc 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/swiftwasm/JavaScriptKit.git", "state": { "branch": "main", - "revision": "384ef252c70bd0b9988e1cef95b416e6ed48d82f", + "revision": "95d0c4cd78b48ffc7e19c618d57c3244917be09a", "version": null } } diff --git a/Package.swift b/Package.swift index 891b5951..4e2b3830 100644 --- a/Package.swift +++ b/Package.swift @@ -8,12 +8,10 @@ let package = Package( products: [ .executable( name: "DOMKitDemo", - targets: ["DOMKitDemo"] - ), + targets: ["DOMKitDemo"]), .library( name: "DOMKit", - targets: ["DOMKit"] - ), + targets: ["DOMKit"]), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), ], @@ -26,8 +24,7 @@ let package = Package( targets: [ .target( name: "DOMKitDemo", - dependencies: ["DOMKit"] - ), + dependencies: ["DOMKit"]), .target( name: "DOMKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")] @@ -40,11 +37,9 @@ let package = Package( .target(name: "WebIDL"), .target( name: "WebIDLToSwift", - dependencies: ["WebIDL"] - ), + dependencies: ["WebIDL"]), .testTarget( name: "DOMKitTests", - dependencies: ["DOMKit"] - ), + dependencies: ["DOMKit"]), ] ) diff --git a/Sources/DOMKit/WebIDL/AlphaOption.swift b/Sources/DOMKit/WebIDL/AlphaOption.swift new file mode 100644 index 00000000..f086fd3a --- /dev/null +++ b/Sources/DOMKit/WebIDL/AlphaOption.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum AlphaOption: JSString, JSValueCompatible { + case keep = "keep" + case discard = "discard" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/AudioData.swift b/Sources/DOMKit/WebIDL/AudioData.swift new file mode 100644 index 00000000..a0fc829f --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioData.swift @@ -0,0 +1,62 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioData: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioData].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) + _sampleRate = ReadonlyAttribute(jsObject: jsObject, name: Strings.sampleRate) + _numberOfFrames = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfFrames) + _numberOfChannels = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfChannels) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioDataInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var format: AudioSampleFormat? + + @ReadonlyAttribute + public var sampleRate: Float + + @ReadonlyAttribute + public var numberOfFrames: UInt32 + + @ReadonlyAttribute + public var numberOfChannels: UInt32 + + @ReadonlyAttribute + public var duration: UInt64 + + @ReadonlyAttribute + public var timestamp: Int64 + + @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! + } + + @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} diff --git a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift new file mode 100644 index 00000000..78daea46 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDataCopyToOptions: BridgedDictionary { + public convenience init(planeIndex: UInt32, frameOffset: UInt32, frameCount: UInt32, format: AudioSampleFormat) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.planeIndex] = planeIndex.jsValue + object[Strings.frameOffset] = frameOffset.jsValue + object[Strings.frameCount] = frameCount.jsValue + object[Strings.format] = format.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _planeIndex = ReadWriteAttribute(jsObject: object, name: Strings.planeIndex) + _frameOffset = ReadWriteAttribute(jsObject: object, name: Strings.frameOffset) + _frameCount = ReadWriteAttribute(jsObject: object, name: Strings.frameCount) + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var planeIndex: UInt32 + + @ReadWriteAttribute + public var frameOffset: UInt32 + + @ReadWriteAttribute + public var frameCount: UInt32 + + @ReadWriteAttribute + public var format: AudioSampleFormat +} diff --git a/Sources/DOMKit/WebIDL/AudioDataInit.swift b/Sources/DOMKit/WebIDL/AudioDataInit.swift new file mode 100644 index 00000000..d0395761 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDataInit.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDataInit: BridgedDictionary { + public convenience init(format: AudioSampleFormat, sampleRate: Float, numberOfFrames: UInt32, numberOfChannels: UInt32, timestamp: Int64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfFrames] = numberOfFrames.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfFrames = ReadWriteAttribute(jsObject: object, name: Strings.numberOfFrames) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: AudioSampleFormat + + @ReadWriteAttribute + public var sampleRate: Float + + @ReadWriteAttribute + public var numberOfFrames: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoder.swift b/Sources/DOMKit/WebIDL/AudioDecoder.swift new file mode 100644 index 00000000..d511e5ba --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var decodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func decode(chunk: EncodedAudioChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: AudioDecoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: AudioDecoderConfig) async throws -> AudioDecoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift new file mode 100644 index 00000000..55aa5a27 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderConfig: BridgedDictionary { + public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, description: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.description] = description.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _description = ReadWriteAttribute(jsObject: object, name: Strings.description) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var description: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift new file mode 100644 index 00000000..b98e0449 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderInit: BridgedDictionary { + public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1Void + public var output: AudioDataOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift new file mode 100644 index 00000000..8245e0da --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: AudioDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoder.swift b/Sources/DOMKit/WebIDL/AudioEncoder.swift new file mode 100644 index 00000000..7565bc23 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: AudioEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioEncoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func encode(data: AudioData) { + let this = jsObject + _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: AudioEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: AudioEncoderConfig) async throws -> AudioEncoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift new file mode 100644 index 00000000..0d8f8acf --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderConfig: BridgedDictionary { + public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, bitrate: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.numberOfChannels] = numberOfChannels.jsValue + object[Strings.bitrate] = bitrate.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) + _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift new file mode 100644 index 00000000..550e8415 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderInit: BridgedDictionary { + public convenience init(output: @escaping EncodedAudioChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute2Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute2Void + public var output: EncodedAudioChunkOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift new file mode 100644 index 00000000..bed3a52b --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class AudioEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioEncoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: AudioEncoderConfig +} diff --git a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift new file mode 100644 index 00000000..a629b0a5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift @@ -0,0 +1,28 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum AudioSampleFormat: JSString, JSValueCompatible { + case u8 = "u8" + case s16 = "s16" + case s32 = "s32" + case f32 = "f32" + case u8Planar = "u8-planar" + case s16Planar = "s16-planar" + case s32Planar = "s32-planar" + case f32Planar = "f32-planar" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/BitrateMode.swift b/Sources/DOMKit/WebIDL/BitrateMode.swift new file mode 100644 index 00000000..b0001ae7 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BitrateMode.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum BitrateMode: JSString, JSValueCompatible { + case constant = "constant" + case variable = "variable" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/BlobEvent.swift b/Sources/DOMKit/WebIDL/BlobEvent.swift new file mode 100644 index 00000000..2f09f782 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BlobEvent.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class BlobEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BlobEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _timecode = ReadonlyAttribute(jsObject: jsObject, name: Strings.timecode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: BlobEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var data: Blob + + @ReadonlyAttribute + public var timecode: DOMHighResTimeStamp +} diff --git a/Sources/DOMKit/WebIDL/BlobEventInit.swift b/Sources/DOMKit/WebIDL/BlobEventInit.swift new file mode 100644 index 00000000..adb0fd32 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BlobEventInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class BlobEventInit: BridgedDictionary { + public convenience init(data: Blob, timecode: DOMHighResTimeStamp) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.timecode] = timecode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _timecode = ReadWriteAttribute(jsObject: object, name: Strings.timecode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: Blob + + @ReadWriteAttribute + public var timecode: DOMHighResTimeStamp +} diff --git a/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift new file mode 100644 index 00000000..1c9c71e0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Bool_or_MediaTrackConstraints: ConvertibleToJSValue {} +extension Bool: Any_Bool_or_MediaTrackConstraints {} +extension MediaTrackConstraints: Any_Bool_or_MediaTrackConstraints {} + +public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaTrackConstraints { + case bool(Bool) + case mediaTrackConstraints(MediaTrackConstraints) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var mediaTrackConstraints: MediaTrackConstraints? { + switch self { + case let .mediaTrackConstraints(mediaTrackConstraints): return mediaTrackConstraints + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let mediaTrackConstraints: MediaTrackConstraints = value.fromJSValue() { + return .mediaTrackConstraints(mediaTrackConstraints) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .mediaTrackConstraints(mediaTrackConstraints): + return mediaTrackConstraints.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift new file mode 100644 index 00000000..53fb3394 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Bool_or_ScrollIntoViewOptions: ConvertibleToJSValue {} +extension Bool: Any_Bool_or_ScrollIntoViewOptions {} +extension ScrollIntoViewOptions: Any_Bool_or_ScrollIntoViewOptions {} + +public enum Bool_or_ScrollIntoViewOptions: JSValueCompatible, Any_Bool_or_ScrollIntoViewOptions { + case bool(Bool) + case scrollIntoViewOptions(ScrollIntoViewOptions) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var scrollIntoViewOptions: ScrollIntoViewOptions? { + switch self { + case let .scrollIntoViewOptions(scrollIntoViewOptions): return scrollIntoViewOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let scrollIntoViewOptions: ScrollIntoViewOptions = value.fromJSValue() { + return .scrollIntoViewOptions(scrollIntoViewOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .scrollIntoViewOptions(scrollIntoViewOptions): + return scrollIntoViewOptions.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/BoxQuadOptions.swift b/Sources/DOMKit/WebIDL/BoxQuadOptions.swift new file mode 100644 index 00000000..9c68f521 --- /dev/null +++ b/Sources/DOMKit/WebIDL/BoxQuadOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class BoxQuadOptions: BridgedDictionary { + public convenience init(box: CSSBoxType, relativeTo: GeometryNode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.box] = box.jsValue + object[Strings.relativeTo] = relativeTo.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _box = ReadWriteAttribute(jsObject: object, name: Strings.box) + _relativeTo = ReadWriteAttribute(jsObject: object, name: Strings.relativeTo) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var box: CSSBoxType + + @ReadWriteAttribute + public var relativeTo: GeometryNode +} diff --git a/Sources/DOMKit/WebIDL/CSSBoxType.swift b/Sources/DOMKit/WebIDL/CSSBoxType.swift new file mode 100644 index 00000000..55fb3a91 --- /dev/null +++ b/Sources/DOMKit/WebIDL/CSSBoxType.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum CSSBoxType: JSString, JSValueCompatible { + case margin = "margin" + case border = "border" + case padding = "padding" + case content = "content" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement.swift new file mode 100644 index 00000000..29314d8d --- /dev/null +++ b/Sources/DOMKit/WebIDL/CSSPseudoElement.swift @@ -0,0 +1,29 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class CSSPseudoElement: EventTarget, GeometryUtils { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CSSPseudoElement].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _element = ReadonlyAttribute(jsObject: jsObject, name: Strings.element) + _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var element: Element + + @ReadonlyAttribute + public var parent: CSSPseudoElement_or_Element + + @inlinable public func pseudo(type: String) -> CSSPseudoElement? { + let this = jsObject + return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift new file mode 100644 index 00000000..3c06e5d5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_CSSPseudoElement_or_Element: ConvertibleToJSValue {} +extension CSSPseudoElement: Any_CSSPseudoElement_or_Element {} +extension Element: Any_CSSPseudoElement_or_Element {} + +public enum CSSPseudoElement_or_Element: JSValueCompatible, Any_CSSPseudoElement_or_Element { + case cssPseudoElement(CSSPseudoElement) + case element(Element) + + var cssPseudoElement: CSSPseudoElement? { + switch self { + case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement + default: return nil + } + } + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { + return .cssPseudoElement(cssPseudoElement) + } + if let element: Element = value.fromJSValue() { + return .element(element) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .cssPseudoElement(cssPseudoElement): + return cssPseudoElement.jsValue + case let .element(element): + return element.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift new file mode 100644 index 00000000..ee012fa8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class CameraDevicePermissionDescriptor: BridgedDictionary { + public convenience init(panTiltZoom: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.panTiltZoom] = panTiltZoom.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _panTiltZoom = ReadWriteAttribute(jsObject: object, name: Strings.panTiltZoom) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var panTiltZoom: Bool +} diff --git a/Sources/DOMKit/WebIDL/CaretPosition.swift b/Sources/DOMKit/WebIDL/CaretPosition.swift new file mode 100644 index 00000000..385d49ef --- /dev/null +++ b/Sources/DOMKit/WebIDL/CaretPosition.swift @@ -0,0 +1,27 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class CaretPosition: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CaretPosition].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _offsetNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetNode) + _offset = ReadonlyAttribute(jsObject: jsObject, name: Strings.offset) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var offsetNode: Node + + @ReadonlyAttribute + public var offset: UInt32 + + @inlinable public func getClientRect() -> DOMRect? { + let this = jsObject + return this[Strings.getClientRect].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/CodecState.swift b/Sources/DOMKit/WebIDL/CodecState.swift new file mode 100644 index 00000000..3495763f --- /dev/null +++ b/Sources/DOMKit/WebIDL/CodecState.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum CodecState: JSString, JSValueCompatible { + case unconfigured = "unconfigured" + case configured = "configured" + case closed = "closed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainBoolean.swift b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift new file mode 100644 index 00000000..38559275 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainBoolean: ConvertibleToJSValue {} +extension Bool: Any_ConstrainBoolean {} +extension ConstrainBooleanParameters: Any_ConstrainBoolean {} + +public enum ConstrainBoolean: JSValueCompatible, Any_ConstrainBoolean { + case bool(Bool) + case constrainBooleanParameters(ConstrainBooleanParameters) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var constrainBooleanParameters: ConstrainBooleanParameters? { + switch self { + case let .constrainBooleanParameters(constrainBooleanParameters): return constrainBooleanParameters + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let constrainBooleanParameters: ConstrainBooleanParameters = value.fromJSValue() { + return .constrainBooleanParameters(constrainBooleanParameters) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .constrainBooleanParameters(constrainBooleanParameters): + return constrainBooleanParameters.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift new file mode 100644 index 00000000..aed2cd3b --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainBooleanParameters: BridgedDictionary { + public convenience init(exact: Bool, ideal: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: Bool + + @ReadWriteAttribute + public var ideal: Bool +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift new file mode 100644 index 00000000..5c2cb816 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainDOMString: ConvertibleToJSValue {} +extension ConstrainDOMStringParameters: Any_ConstrainDOMString {} +extension String: Any_ConstrainDOMString {} +extension Array: Any_ConstrainDOMString where Element == String {} + +public enum ConstrainDOMString: JSValueCompatible, Any_ConstrainDOMString { + case constrainDOMStringParameters(ConstrainDOMStringParameters) + case string(String) + case seq_of_String([String]) + + var constrainDOMStringParameters: ConstrainDOMStringParameters? { + switch self { + case let .constrainDOMStringParameters(constrainDOMStringParameters): return constrainDOMStringParameters + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var seq_of_String: [String]? { + switch self { + case let .seq_of_String(seq_of_String): return seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainDOMStringParameters: ConstrainDOMStringParameters = value.fromJSValue() { + return .constrainDOMStringParameters(constrainDOMStringParameters) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + if let seq_of_String: [String] = value.fromJSValue() { + return .seq_of_String(seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainDOMStringParameters(constrainDOMStringParameters): + return constrainDOMStringParameters.jsValue + case let .string(string): + return string.jsValue + case let .seq_of_String(seq_of_String): + return seq_of_String.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift new file mode 100644 index 00000000..8a51b973 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainDOMStringParameters: BridgedDictionary { + public convenience init(exact: String_or_seq_of_String, ideal: String_or_seq_of_String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: String_or_seq_of_String + + @ReadWriteAttribute + public var ideal: String_or_seq_of_String +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDouble.swift b/Sources/DOMKit/WebIDL/ConstrainDouble.swift new file mode 100644 index 00000000..41993e8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDouble.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainDouble: ConvertibleToJSValue {} +extension ConstrainDoubleRange: Any_ConstrainDouble {} +extension Double: Any_ConstrainDouble {} + +public enum ConstrainDouble: JSValueCompatible, Any_ConstrainDouble { + case constrainDoubleRange(ConstrainDoubleRange) + case double(Double) + + var constrainDoubleRange: ConstrainDoubleRange? { + switch self { + case let .constrainDoubleRange(constrainDoubleRange): return constrainDoubleRange + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainDoubleRange: ConstrainDoubleRange = value.fromJSValue() { + return .constrainDoubleRange(constrainDoubleRange) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainDoubleRange(constrainDoubleRange): + return constrainDoubleRange.jsValue + case let .double(double): + return double.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift new file mode 100644 index 00000000..9ee176e9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainDoubleRange: BridgedDictionary { + public convenience init(exact: Double, ideal: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: Double + + @ReadWriteAttribute + public var ideal: Double +} diff --git a/Sources/DOMKit/WebIDL/ConstrainULong.swift b/Sources/DOMKit/WebIDL/ConstrainULong.swift new file mode 100644 index 00000000..614cf30b --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainULong.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainULong: ConvertibleToJSValue {} +extension ConstrainULongRange: Any_ConstrainULong {} +extension UInt32: Any_ConstrainULong {} + +public enum ConstrainULong: JSValueCompatible, Any_ConstrainULong { + case constrainULongRange(ConstrainULongRange) + case uInt32(UInt32) + + var constrainULongRange: ConstrainULongRange? { + switch self { + case let .constrainULongRange(constrainULongRange): return constrainULongRange + default: return nil + } + } + + var uInt32: UInt32? { + switch self { + case let .uInt32(uInt32): return uInt32 + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainULongRange: ConstrainULongRange = value.fromJSValue() { + return .constrainULongRange(constrainULongRange) + } + if let uInt32: UInt32 = value.fromJSValue() { + return .uInt32(uInt32) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainULongRange(constrainULongRange): + return constrainULongRange.jsValue + case let .uInt32(uInt32): + return uInt32.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift new file mode 100644 index 00000000..5a87be30 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainULongRange: BridgedDictionary { + public convenience init(exact: UInt32, ideal: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: UInt32 + + @ReadWriteAttribute + public var ideal: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift new file mode 100644 index 00000000..e5671dbc --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConvertCoordinateOptions: BridgedDictionary { + public convenience init(fromBox: CSSBoxType, toBox: CSSBoxType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.fromBox] = fromBox.jsValue + object[Strings.toBox] = toBox.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _fromBox = ReadWriteAttribute(jsObject: object, name: Strings.fromBox) + _toBox = ReadWriteAttribute(jsObject: object, name: Strings.toBox) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var fromBox: CSSBoxType + + @ReadWriteAttribute + public var toBox: CSSBoxType +} diff --git a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift new file mode 100644 index 00000000..92ae09de --- /dev/null +++ b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class DevicePermissionDescriptor: BridgedDictionary { + public convenience init(deviceId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.deviceId] = deviceId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var deviceId: String +} diff --git a/Sources/DOMKit/WebIDL/DoubleRange.swift b/Sources/DOMKit/WebIDL/DoubleRange.swift new file mode 100644 index 00000000..b58107cf --- /dev/null +++ b/Sources/DOMKit/WebIDL/DoubleRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class DoubleRange: BridgedDictionary { + public convenience init(max: Double, min: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.max] = max.jsValue + object[Strings.min] = min.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _max = ReadWriteAttribute(jsObject: object, name: Strings.max) + _min = ReadWriteAttribute(jsObject: object, name: Strings.min) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var max: Double + + @ReadWriteAttribute + public var min: Double +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift new file mode 100644 index 00000000..010e2b06 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunk: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedAudioChunk].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: EncodedAudioChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: EncodedAudioChunkType + + @ReadonlyAttribute + public var timestamp: Int64 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift new file mode 100644 index 00000000..054201f8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunkInit: BridgedDictionary { + public convenience init(type: EncodedAudioChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: EncodedAudioChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift new file mode 100644 index 00000000..6f5f8314 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedAudioChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: AudioDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.decoderConfig] = decoderConfig.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var decoderConfig: AudioDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift new file mode 100644 index 00000000..9c35362e --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum EncodedAudioChunkType: JSString, JSValueCompatible { + case key = "key" + case delta = "delta" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift new file mode 100644 index 00000000..1da80666 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunk: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedVideoChunk].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: EncodedVideoChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: EncodedVideoChunkType + + @ReadonlyAttribute + public var timestamp: Int64 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift new file mode 100644 index 00000000..0c95c51f --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunkInit: BridgedDictionary { + public convenience init(type: EncodedVideoChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: EncodedVideoChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift new file mode 100644 index 00000000..6b3572e9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift @@ -0,0 +1,30 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class EncodedVideoChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: VideoDecoderConfig, svc: SvcOutputMetadata, alphaSideData: BufferSource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.decoderConfig] = decoderConfig.jsValue + object[Strings.svc] = svc.jsValue + object[Strings.alphaSideData] = alphaSideData.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) + _svc = ReadWriteAttribute(jsObject: object, name: Strings.svc) + _alphaSideData = ReadWriteAttribute(jsObject: object, name: Strings.alphaSideData) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var decoderConfig: VideoDecoderConfig + + @ReadWriteAttribute + public var svc: SvcOutputMetadata + + @ReadWriteAttribute + public var alphaSideData: BufferSource +} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift new file mode 100644 index 00000000..f59b9723 --- /dev/null +++ b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum EncodedVideoChunkType: JSString, JSValueCompatible { + case key = "key" + case delta = "delta" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/Float32List.swift b/Sources/DOMKit/WebIDL/Float32List.swift new file mode 100644 index 00000000..1f1e5bdb --- /dev/null +++ b/Sources/DOMKit/WebIDL/Float32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Float32List: ConvertibleToJSValue {} +extension Float32Array: Any_Float32List {} +extension Array: Any_Float32List where Element == GLfloat {} + +public enum Float32List: JSValueCompatible, Any_Float32List { + case float32Array(Float32Array) + case seq_of_GLfloat([GLfloat]) + + var float32Array: Float32Array? { + switch self { + case let .float32Array(float32Array): return float32Array + default: return nil + } + } + + var seq_of_GLfloat: [GLfloat]? { + switch self { + case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let float32Array: Float32Array = value.fromJSValue() { + return .float32Array(float32Array) + } + if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { + return .seq_of_GLfloat(seq_of_GLfloat) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .float32Array(float32Array): + return float32Array.jsValue + case let .seq_of_GLfloat(seq_of_GLfloat): + return seq_of_GLfloat.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/GeometryNode.swift b/Sources/DOMKit/WebIDL/GeometryNode.swift new file mode 100644 index 00000000..5554a102 --- /dev/null +++ b/Sources/DOMKit/WebIDL/GeometryNode.swift @@ -0,0 +1,74 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_GeometryNode: ConvertibleToJSValue {} +extension CSSPseudoElement: Any_GeometryNode {} +extension Document: Any_GeometryNode {} +extension Element: Any_GeometryNode {} +extension Text: Any_GeometryNode {} + +public enum GeometryNode: JSValueCompatible, Any_GeometryNode { + case cssPseudoElement(CSSPseudoElement) + case document(Document) + case element(Element) + case text(Text) + + var cssPseudoElement: CSSPseudoElement? { + switch self { + case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement + default: return nil + } + } + + var document: Document? { + switch self { + case let .document(document): return document + default: return nil + } + } + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var text: Text? { + switch self { + case let .text(text): return text + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { + return .cssPseudoElement(cssPseudoElement) + } + if let document: Document = value.fromJSValue() { + return .document(document) + } + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let text: Text = value.fromJSValue() { + return .text(text) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .cssPseudoElement(cssPseudoElement): + return cssPseudoElement.jsValue + case let .document(document): + return document.jsValue + case let .element(element): + return element.jsValue + case let .text(text): + return text.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/GeometryUtils.swift b/Sources/DOMKit/WebIDL/GeometryUtils.swift new file mode 100644 index 00000000..15114de3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/GeometryUtils.swift @@ -0,0 +1,27 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol GeometryUtils: JSBridgedClass {} +public extension GeometryUtils { + @inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] { + let this = jsObject + return this[Strings.getBoxQuads].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertQuadFromNode(quad: DOMQuadInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { + let this = jsObject + return this[Strings.convertQuadFromNode].function!(this: this, arguments: [quad.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { + let this = jsObject + return this[Strings.convertRectFromNode].function!(this: this, arguments: [rect.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.convertPointFromNode].function!(this: this, arguments: [point.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift new file mode 100644 index 00000000..9adb76b1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum HardwareAcceleration: JSString, JSValueCompatible { + case noPreference = "no-preference" + case preferHardware = "prefer-hardware" + case preferSoftware = "prefer-software" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ImageBufferSource.swift b/Sources/DOMKit/WebIDL/ImageBufferSource.swift new file mode 100644 index 00000000..0aa23282 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageBufferSource.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ImageBufferSource: ConvertibleToJSValue {} +extension BufferSource: Any_ImageBufferSource {} +extension ReadableStream: Any_ImageBufferSource {} + +public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { + case bufferSource(BufferSource) + case readableStream(ReadableStream) + + var bufferSource: BufferSource? { + switch self { + case let .bufferSource(bufferSource): return bufferSource + default: return nil + } + } + + var readableStream: ReadableStream? { + switch self { + case let .readableStream(readableStream): return readableStream + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bufferSource: BufferSource = value.fromJSValue() { + return .bufferSource(bufferSource) + } + if let readableStream: ReadableStream = value.fromJSValue() { + return .readableStream(readableStream) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bufferSource(bufferSource): + return bufferSource.jsValue + case let .readableStream(readableStream): + return readableStream.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift new file mode 100644 index 00000000..89806708 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecodeOptions: BridgedDictionary { + public convenience init(frameIndex: UInt32, completeFramesOnly: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.frameIndex] = frameIndex.jsValue + object[Strings.completeFramesOnly] = completeFramesOnly.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _frameIndex = ReadWriteAttribute(jsObject: object, name: Strings.frameIndex) + _completeFramesOnly = ReadWriteAttribute(jsObject: object, name: Strings.completeFramesOnly) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var frameIndex: UInt32 + + @ReadWriteAttribute + public var completeFramesOnly: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift new file mode 100644 index 00000000..1a4cb939 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecodeResult: BridgedDictionary { + public convenience init(image: VideoFrame, complete: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.image] = image.jsValue + object[Strings.complete] = complete.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _image = ReadWriteAttribute(jsObject: object, name: Strings.image) + _complete = ReadWriteAttribute(jsObject: object, name: Strings.complete) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var image: VideoFrame + + @ReadWriteAttribute + public var complete: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageDecoder.swift b/Sources/DOMKit/WebIDL/ImageDecoder.swift new file mode 100644 index 00000000..6112d940 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecoder.swift @@ -0,0 +1,68 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) + _completed = ReadonlyAttribute(jsObject: jsObject, name: Strings.completed) + _tracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.tracks) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: ImageDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var type: String + + @ReadonlyAttribute + public var complete: Bool + + @ReadonlyAttribute + public var completed: JSPromise + + @ReadonlyAttribute + public var tracks: ImageTrackList + + @inlinable public func decode(options: ImageDecodeOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func decode(options: ImageDecodeOptions? = nil) async throws -> ImageDecodeResult { + let this = jsObject + let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isTypeSupported(type: String) -> JSPromise { + let this = constructor + return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isTypeSupported(type: String) async throws -> Bool { + let this = constructor + let _promise: JSPromise = this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift new file mode 100644 index 00000000..06179973 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift @@ -0,0 +1,50 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageDecoderInit: BridgedDictionary { + public convenience init(type: String, data: ImageBufferSource, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, desiredWidth: UInt32, desiredHeight: UInt32, preferAnimation: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.data] = data.jsValue + object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue + object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue + object[Strings.desiredWidth] = desiredWidth.jsValue + object[Strings.desiredHeight] = desiredHeight.jsValue + object[Strings.preferAnimation] = preferAnimation.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) + _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) + _desiredWidth = ReadWriteAttribute(jsObject: object, name: Strings.desiredWidth) + _desiredHeight = ReadWriteAttribute(jsObject: object, name: Strings.desiredHeight) + _preferAnimation = ReadWriteAttribute(jsObject: object, name: Strings.preferAnimation) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var data: ImageBufferSource + + @ReadWriteAttribute + public var premultiplyAlpha: PremultiplyAlpha + + @ReadWriteAttribute + public var colorSpaceConversion: ColorSpaceConversion + + @ReadWriteAttribute + public var desiredWidth: UInt32 + + @ReadWriteAttribute + public var desiredHeight: UInt32 + + @ReadWriteAttribute + public var preferAnimation: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageTrack.swift b/Sources/DOMKit/WebIDL/ImageTrack.swift new file mode 100644 index 00000000..b68c7a97 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageTrack.swift @@ -0,0 +1,32 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ImageTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _animated = ReadonlyAttribute(jsObject: jsObject, name: Strings.animated) + _frameCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameCount) + _repetitionCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.repetitionCount) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var animated: Bool + + @ReadonlyAttribute + public var frameCount: UInt32 + + @ReadonlyAttribute + public var repetitionCount: Float + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ReadWriteAttribute + public var selected: Bool +} diff --git a/Sources/DOMKit/WebIDL/ImageTrackList.swift b/Sources/DOMKit/WebIDL/ImageTrackList.swift new file mode 100644 index 00000000..10b44925 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ImageTrackList.swift @@ -0,0 +1,34 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ImageTrackList: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageTrackList].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _selectedTrack = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedTrack) + self.jsObject = jsObject + } + + @inlinable public subscript(key: Int) -> ImageTrack { + jsObject[key].fromJSValue()! + } + + @ReadonlyAttribute + public var ready: JSPromise + + @ReadonlyAttribute + public var length: UInt32 + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ReadonlyAttribute + public var selectedTrack: ImageTrack? +} diff --git a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift new file mode 100644 index 00000000..d6170195 --- /dev/null +++ b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift @@ -0,0 +1,17 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class InputDeviceInfo: MediaDeviceInfo { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputDeviceInfo].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func getCapabilities() -> MediaTrackCapabilities { + let this = jsObject + return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/Int32List.swift b/Sources/DOMKit/WebIDL/Int32List.swift new file mode 100644 index 00000000..ce876a5b --- /dev/null +++ b/Sources/DOMKit/WebIDL/Int32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Int32List: ConvertibleToJSValue {} +extension Int32Array: Any_Int32List {} +extension Array: Any_Int32List where Element == GLint {} + +public enum Int32List: JSValueCompatible, Any_Int32List { + case int32Array(Int32Array) + case seq_of_GLint([GLint]) + + var int32Array: Int32Array? { + switch self { + case let .int32Array(int32Array): return int32Array + default: return nil + } + } + + var seq_of_GLint: [GLint]? { + switch self { + case let .seq_of_GLint(seq_of_GLint): return seq_of_GLint + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let int32Array: Int32Array = value.fromJSValue() { + return .int32Array(int32Array) + } + if let seq_of_GLint: [GLint] = value.fromJSValue() { + return .seq_of_GLint(seq_of_GLint) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .int32Array(int32Array): + return int32Array.jsValue + case let .seq_of_GLint(seq_of_GLint): + return seq_of_GLint.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift new file mode 100644 index 00000000..2cf015a8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift @@ -0,0 +1,16 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class IsVisibleOptions: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} diff --git a/Sources/DOMKit/WebIDL/LatencyMode.swift b/Sources/DOMKit/WebIDL/LatencyMode.swift new file mode 100644 index 00000000..d4aa61af --- /dev/null +++ b/Sources/DOMKit/WebIDL/LatencyMode.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum LatencyMode: JSString, JSValueCompatible { + case quality = "quality" + case realtime = "realtime" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift new file mode 100644 index 00000000..1f063478 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaDeviceInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaDeviceInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _deviceId = ReadonlyAttribute(jsObject: jsObject, name: Strings.deviceId) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _groupId = ReadonlyAttribute(jsObject: jsObject, name: Strings.groupId) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var deviceId: String + + @ReadonlyAttribute + public var kind: MediaDeviceKind + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var groupId: String + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift new file mode 100644 index 00000000..a19daab0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum MediaDeviceKind: JSString, JSValueCompatible { + case audioinput = "audioinput" + case audiooutput = "audiooutput" + case videoinput = "videoinput" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaDevices.swift b/Sources/DOMKit/WebIDL/MediaDevices.swift new file mode 100644 index 00000000..a65b2d59 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDevices.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaDevices: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaDevices].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _ondevicechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondevicechange) + super.init(unsafelyWrapping: jsObject) + } + + @ClosureAttribute1Optional + public var ondevicechange: EventHandler + + @inlinable public func enumerateDevices() -> JSPromise { + let this = jsObject + return this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func enumerateDevices() async throws -> [MediaDeviceInfo] { + let this = jsObject + let _promise: JSPromise = this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getSupportedConstraints() -> MediaTrackSupportedConstraints { + let this = jsObject + return this[Strings.getSupportedConstraints].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) -> JSPromise { + let this = jsObject + return this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) async throws -> MediaStream { + let this = jsObject + let _promise: JSPromise = this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryList.swift b/Sources/DOMKit/WebIDL/MediaQueryList.swift new file mode 100644 index 00000000..e2f6e574 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryList.swift @@ -0,0 +1,28 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) + _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var media: String + + @ReadonlyAttribute + public var matches: Bool + + // XXX: member 'addListener' is ignored + + // XXX: member 'removeListener' is ignored + + @ClosureAttribute1Optional + public var onchange: EventHandler +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift new file mode 100644 index 00000000..e74e5c35 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryListEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryListEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) + _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaQueryListEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var media: String + + @ReadonlyAttribute + public var matches: Bool +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift new file mode 100644 index 00000000..0f6adc8b --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryListEventInit: BridgedDictionary { + public convenience init(media: String, matches: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.media] = media.jsValue + object[Strings.matches] = matches.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _media = ReadWriteAttribute(jsObject: object, name: Strings.media) + _matches = ReadWriteAttribute(jsObject: object, name: Strings.matches) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var matches: Bool +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorder.swift b/Sources/DOMKit/WebIDL/MediaRecorder.swift new file mode 100644 index 00000000..9336c57b --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorder.swift @@ -0,0 +1,94 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorder: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _stream = ReadonlyAttribute(jsObject: jsObject, name: Strings.stream) + _mimeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.mimeType) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _onstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstart) + _onstop = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstop) + _ondataavailable = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondataavailable) + _onpause = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onpause) + _onresume = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onresume) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _videoBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoBitsPerSecond) + _audioBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitsPerSecond) + _audioBitrateMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitrateMode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(stream: MediaStream, options: MediaRecorderOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var stream: MediaStream + + @ReadonlyAttribute + public var mimeType: String + + @ReadonlyAttribute + public var state: RecordingState + + @ClosureAttribute1Optional + public var onstart: EventHandler + + @ClosureAttribute1Optional + public var onstop: EventHandler + + @ClosureAttribute1Optional + public var ondataavailable: EventHandler + + @ClosureAttribute1Optional + public var onpause: EventHandler + + @ClosureAttribute1Optional + public var onresume: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ReadonlyAttribute + public var videoBitsPerSecond: UInt32 + + @ReadonlyAttribute + public var audioBitsPerSecond: UInt32 + + @ReadonlyAttribute + public var audioBitrateMode: BitrateMode + + @inlinable public func start(timeslice: UInt32? = nil) { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: [timeslice?.jsValue ?? .undefined]) + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @inlinable public func resume() { + let this = jsObject + _ = this[Strings.resume].function!(this: this, arguments: []) + } + + @inlinable public func requestData() { + let this = jsObject + _ = this[Strings.requestData].function!(this: this, arguments: []) + } + + @inlinable public static func isTypeSupported(type: String) -> Bool { + let this = constructor + return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift new file mode 100644 index 00000000..c4b4cc09 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorderErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaRecorderErrorEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var error: DOMException +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift new file mode 100644 index 00000000..4c773a67 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderErrorEventInit: BridgedDictionary { + public convenience init(error: DOMException) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _error = ReadWriteAttribute(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var error: DOMException +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift new file mode 100644 index 00000000..3a4300b0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift @@ -0,0 +1,40 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderOptions: BridgedDictionary { + public convenience init(mimeType: String, audioBitsPerSecond: UInt32, videoBitsPerSecond: UInt32, bitsPerSecond: UInt32, audioBitrateMode: BitrateMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mimeType] = mimeType.jsValue + object[Strings.audioBitsPerSecond] = audioBitsPerSecond.jsValue + object[Strings.videoBitsPerSecond] = videoBitsPerSecond.jsValue + object[Strings.bitsPerSecond] = bitsPerSecond.jsValue + object[Strings.audioBitrateMode] = audioBitrateMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mimeType = ReadWriteAttribute(jsObject: object, name: Strings.mimeType) + _audioBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.audioBitsPerSecond) + _videoBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.videoBitsPerSecond) + _bitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.bitsPerSecond) + _audioBitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.audioBitrateMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mimeType: String + + @ReadWriteAttribute + public var audioBitsPerSecond: UInt32 + + @ReadWriteAttribute + public var videoBitsPerSecond: UInt32 + + @ReadWriteAttribute + public var bitsPerSecond: UInt32 + + @ReadWriteAttribute + public var audioBitrateMode: BitrateMode +} diff --git a/Sources/DOMKit/WebIDL/MediaStream.swift b/Sources/DOMKit/WebIDL/MediaStream.swift new file mode 100644 index 00000000..819dac5a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStream.swift @@ -0,0 +1,75 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStream: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public convenience init(stream: MediaStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public convenience init(tracks: [MediaStreamTrack]) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [tracks.jsValue])) + } + + @ReadonlyAttribute + public var id: String + + @inlinable public func getAudioTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getAudioTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getVideoTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getVideoTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getTrackById(trackId: String) -> MediaStreamTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [trackId.jsValue]).fromJSValue()! + } + + @inlinable public func addTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.addTrack].function!(this: this, arguments: [track.jsValue]) + } + + @inlinable public func removeTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.removeTrack].function!(this: this, arguments: [track.jsValue]) + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var active: Bool + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift new file mode 100644 index 00000000..b2ee4cce --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamConstraints: BridgedDictionary { + public convenience init(video: Bool_or_MediaTrackConstraints, audio: Bool_or_MediaTrackConstraints) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.video] = video.jsValue + object[Strings.audio] = audio.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _video = ReadWriteAttribute(jsObject: object, name: Strings.video) + _audio = ReadWriteAttribute(jsObject: object, name: Strings.audio) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var video: Bool_or_MediaTrackConstraints + + @ReadWriteAttribute + public var audio: Bool_or_MediaTrackConstraints +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift new file mode 100644 index 00000000..450347d9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift @@ -0,0 +1,85 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) + _muted = ReadonlyAttribute(jsObject: jsObject, name: Strings.muted) + _onmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmute) + _onunmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onunmute) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _onended = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onended) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var label: String + + @ReadWriteAttribute + public var enabled: Bool + + @ReadonlyAttribute + public var muted: Bool + + @ClosureAttribute1Optional + public var onmute: EventHandler + + @ClosureAttribute1Optional + public var onunmute: EventHandler + + @ReadonlyAttribute + public var readyState: MediaStreamTrackState + + @ClosureAttribute1Optional + public var onended: EventHandler + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func getCapabilities() -> MediaTrackCapabilities { + let this = jsObject + return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getConstraints() -> MediaTrackConstraints { + let this = jsObject + return this[Strings.getConstraints].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getSettings() -> MediaTrackSettings { + let this = jsObject + return this[Strings.getSettings].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) -> JSPromise { + let this = jsObject + return this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift new file mode 100644 index 00000000..21d98e5a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrackEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaStreamTrackEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var track: MediaStreamTrack +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift new file mode 100644 index 00000000..2bab9838 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrackEventInit: BridgedDictionary { + public convenience init(track: MediaStreamTrack) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.track] = track.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _track = ReadWriteAttribute(jsObject: object, name: Strings.track) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var track: MediaStreamTrack +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift new file mode 100644 index 00000000..d08534a1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum MediaStreamTrackState: JSString, JSValueCompatible { + case live = "live" + case ended = "ended" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift new file mode 100644 index 00000000..41982ba3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackCapabilities: BridgedDictionary { + public convenience init(width: ULongRange, height: ULongRange, aspectRatio: DoubleRange, frameRate: DoubleRange, facingMode: [String], resizeMode: [String], sampleRate: ULongRange, sampleSize: ULongRange, echoCancellation: [Bool], autoGainControl: [Bool], noiseSuppression: [Bool], latency: DoubleRange, channelCount: ULongRange, deviceId: String, groupId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: ULongRange + + @ReadWriteAttribute + public var height: ULongRange + + @ReadWriteAttribute + public var aspectRatio: DoubleRange + + @ReadWriteAttribute + public var frameRate: DoubleRange + + @ReadWriteAttribute + public var facingMode: [String] + + @ReadWriteAttribute + public var resizeMode: [String] + + @ReadWriteAttribute + public var sampleRate: ULongRange + + @ReadWriteAttribute + public var sampleSize: ULongRange + + @ReadWriteAttribute + public var echoCancellation: [Bool] + + @ReadWriteAttribute + public var autoGainControl: [Bool] + + @ReadWriteAttribute + public var noiseSuppression: [Bool] + + @ReadWriteAttribute + public var latency: DoubleRange + + @ReadWriteAttribute + public var channelCount: ULongRange + + @ReadWriteAttribute + public var deviceId: String + + @ReadWriteAttribute + public var groupId: String +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift new file mode 100644 index 00000000..1489baaa --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackConstraintSet: BridgedDictionary { + public convenience init(width: ConstrainULong, height: ConstrainULong, aspectRatio: ConstrainDouble, frameRate: ConstrainDouble, facingMode: ConstrainDOMString, resizeMode: ConstrainDOMString, sampleRate: ConstrainULong, sampleSize: ConstrainULong, echoCancellation: ConstrainBoolean, autoGainControl: ConstrainBoolean, noiseSuppression: ConstrainBoolean, latency: ConstrainDouble, channelCount: ConstrainULong, deviceId: ConstrainDOMString, groupId: ConstrainDOMString) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: ConstrainULong + + @ReadWriteAttribute + public var height: ConstrainULong + + @ReadWriteAttribute + public var aspectRatio: ConstrainDouble + + @ReadWriteAttribute + public var frameRate: ConstrainDouble + + @ReadWriteAttribute + public var facingMode: ConstrainDOMString + + @ReadWriteAttribute + public var resizeMode: ConstrainDOMString + + @ReadWriteAttribute + public var sampleRate: ConstrainULong + + @ReadWriteAttribute + public var sampleSize: ConstrainULong + + @ReadWriteAttribute + public var echoCancellation: ConstrainBoolean + + @ReadWriteAttribute + public var autoGainControl: ConstrainBoolean + + @ReadWriteAttribute + public var noiseSuppression: ConstrainBoolean + + @ReadWriteAttribute + public var latency: ConstrainDouble + + @ReadWriteAttribute + public var channelCount: ConstrainULong + + @ReadWriteAttribute + public var deviceId: ConstrainDOMString + + @ReadWriteAttribute + public var groupId: ConstrainDOMString +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift new file mode 100644 index 00000000..5307db8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackConstraints: BridgedDictionary { + public convenience init(advanced: [MediaTrackConstraintSet]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.advanced] = advanced.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _advanced = ReadWriteAttribute(jsObject: object, name: Strings.advanced) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var advanced: [MediaTrackConstraintSet] +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift new file mode 100644 index 00000000..84d866a3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackSettings: BridgedDictionary { + public convenience init(width: Int32, height: Int32, aspectRatio: Double, frameRate: Double, facingMode: String, resizeMode: String, sampleRate: Int32, sampleSize: Int32, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Double, channelCount: Int32, deviceId: String, groupId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: Int32 + + @ReadWriteAttribute + public var height: Int32 + + @ReadWriteAttribute + public var aspectRatio: Double + + @ReadWriteAttribute + public var frameRate: Double + + @ReadWriteAttribute + public var facingMode: String + + @ReadWriteAttribute + public var resizeMode: String + + @ReadWriteAttribute + public var sampleRate: Int32 + + @ReadWriteAttribute + public var sampleSize: Int32 + + @ReadWriteAttribute + public var echoCancellation: Bool + + @ReadWriteAttribute + public var autoGainControl: Bool + + @ReadWriteAttribute + public var noiseSuppression: Bool + + @ReadWriteAttribute + public var latency: Double + + @ReadWriteAttribute + public var channelCount: Int32 + + @ReadWriteAttribute + public var deviceId: String + + @ReadWriteAttribute + public var groupId: String +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift new file mode 100644 index 00000000..bcbfd4ba --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackSupportedConstraints: BridgedDictionary { + public convenience init(width: Bool, height: Bool, aspectRatio: Bool, frameRate: Bool, facingMode: Bool, resizeMode: Bool, sampleRate: Bool, sampleSize: Bool, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Bool, channelCount: Bool, deviceId: Bool, groupId: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: Bool + + @ReadWriteAttribute + public var height: Bool + + @ReadWriteAttribute + public var aspectRatio: Bool + + @ReadWriteAttribute + public var frameRate: Bool + + @ReadWriteAttribute + public var facingMode: Bool + + @ReadWriteAttribute + public var resizeMode: Bool + + @ReadWriteAttribute + public var sampleRate: Bool + + @ReadWriteAttribute + public var sampleSize: Bool + + @ReadWriteAttribute + public var echoCancellation: Bool + + @ReadWriteAttribute + public var autoGainControl: Bool + + @ReadWriteAttribute + public var noiseSuppression: Bool + + @ReadWriteAttribute + public var latency: Bool + + @ReadWriteAttribute + public var channelCount: Bool + + @ReadWriteAttribute + public var deviceId: Bool + + @ReadWriteAttribute + public var groupId: Bool +} diff --git a/Sources/DOMKit/WebIDL/OverconstrainedError.swift b/Sources/DOMKit/WebIDL/OverconstrainedError.swift new file mode 100644 index 00000000..61499735 --- /dev/null +++ b/Sources/DOMKit/WebIDL/OverconstrainedError.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class OverconstrainedError: DOMException { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OverconstrainedError].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _constraint = ReadonlyAttribute(jsObject: jsObject, name: Strings.constraint) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(constraint: String, message: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [constraint.jsValue, message?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var constraint: String +} diff --git a/Sources/DOMKit/WebIDL/PlaneLayout.swift b/Sources/DOMKit/WebIDL/PlaneLayout.swift new file mode 100644 index 00000000..a4de400e --- /dev/null +++ b/Sources/DOMKit/WebIDL/PlaneLayout.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class PlaneLayout: BridgedDictionary { + public convenience init(offset: UInt32, stride: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.stride] = stride.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _stride = ReadWriteAttribute(jsObject: object, name: Strings.stride) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: UInt32 + + @ReadWriteAttribute + public var stride: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/RecordingState.swift b/Sources/DOMKit/WebIDL/RecordingState.swift new file mode 100644 index 00000000..7e057605 --- /dev/null +++ b/Sources/DOMKit/WebIDL/RecordingState.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum RecordingState: JSString, JSValueCompatible { + case inactive = "inactive" + case recording = "recording" + case paused = "paused" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/Screen.swift b/Sources/DOMKit/WebIDL/Screen.swift new file mode 100644 index 00000000..a883fb2f --- /dev/null +++ b/Sources/DOMKit/WebIDL/Screen.swift @@ -0,0 +1,38 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class Screen: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _availWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.availWidth) + _availHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.availHeight) + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _colorDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorDepth) + _pixelDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.pixelDepth) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var availWidth: Int32 + + @ReadonlyAttribute + public var availHeight: Int32 + + @ReadonlyAttribute + public var width: Int32 + + @ReadonlyAttribute + public var height: Int32 + + @ReadonlyAttribute + public var colorDepth: UInt32 + + @ReadonlyAttribute + public var pixelDepth: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/ScrollBehavior.swift b/Sources/DOMKit/WebIDL/ScrollBehavior.swift new file mode 100644 index 00000000..a76ba1cb --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollBehavior.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum ScrollBehavior: JSString, JSValueCompatible { + case auto = "auto" + case smooth = "smooth" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift new file mode 100644 index 00000000..23f42432 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollIntoViewOptions: BridgedDictionary { + public convenience init(block: ScrollLogicalPosition, inline: ScrollLogicalPosition) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.block] = block.jsValue + object[Strings.inline] = inline.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _block = ReadWriteAttribute(jsObject: object, name: Strings.block) + _inline = ReadWriteAttribute(jsObject: object, name: Strings.inline) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var block: ScrollLogicalPosition + + @ReadWriteAttribute + public var inline: ScrollLogicalPosition +} diff --git a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift new file mode 100644 index 00000000..9f11f0bf --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum ScrollLogicalPosition: JSString, JSValueCompatible { + case start = "start" + case center = "center" + case end = "end" + case nearest = "nearest" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ScrollOptions.swift b/Sources/DOMKit/WebIDL/ScrollOptions.swift new file mode 100644 index 00000000..93ba5ad2 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollOptions.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollOptions: BridgedDictionary { + public convenience init(behavior: ScrollBehavior) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.behavior] = behavior.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _behavior = ReadWriteAttribute(jsObject: object, name: Strings.behavior) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var behavior: ScrollBehavior +} diff --git a/Sources/DOMKit/WebIDL/ScrollToOptions.swift b/Sources/DOMKit/WebIDL/ScrollToOptions.swift new file mode 100644 index 00000000..c48ba4d7 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollToOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollToOptions: BridgedDictionary { + public convenience init(left: Double, top: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.left] = left.jsValue + object[Strings.top] = top.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _left = ReadWriteAttribute(jsObject: object, name: Strings.left) + _top = ReadWriteAttribute(jsObject: object, name: Strings.top) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var left: Double + + @ReadWriteAttribute + public var top: Double +} diff --git a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift new file mode 100644 index 00000000..2487040f --- /dev/null +++ b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class SvcOutputMetadata: BridgedDictionary { + public convenience init(temporalLayerId: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.temporalLayerId] = temporalLayerId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _temporalLayerId = ReadWriteAttribute(jsObject: object, name: Strings.temporalLayerId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var temporalLayerId: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/TexImageSource.swift b/Sources/DOMKit/WebIDL/TexImageSource.swift new file mode 100644 index 00000000..d5750fff --- /dev/null +++ b/Sources/DOMKit/WebIDL/TexImageSource.swift @@ -0,0 +1,116 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_TexImageSource: ConvertibleToJSValue {} +extension HTMLCanvasElement: Any_TexImageSource {} +extension HTMLImageElement: Any_TexImageSource {} +extension HTMLVideoElement: Any_TexImageSource {} +extension ImageBitmap: Any_TexImageSource {} +extension ImageData: Any_TexImageSource {} +extension OffscreenCanvas: Any_TexImageSource {} +extension VideoFrame: Any_TexImageSource {} + +public enum TexImageSource: JSValueCompatible, Any_TexImageSource { + case htmlCanvasElement(HTMLCanvasElement) + case htmlImageElement(HTMLImageElement) + case htmlVideoElement(HTMLVideoElement) + case imageBitmap(ImageBitmap) + case imageData(ImageData) + case offscreenCanvas(OffscreenCanvas) + case videoFrame(VideoFrame) + + var htmlCanvasElement: HTMLCanvasElement? { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement + default: return nil + } + } + + var htmlImageElement: HTMLImageElement? { + switch self { + case let .htmlImageElement(htmlImageElement): return htmlImageElement + default: return nil + } + } + + var htmlVideoElement: HTMLVideoElement? { + switch self { + case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement + default: return nil + } + } + + var imageBitmap: ImageBitmap? { + switch self { + case let .imageBitmap(imageBitmap): return imageBitmap + default: return nil + } + } + + var imageData: ImageData? { + switch self { + case let .imageData(imageData): return imageData + default: return nil + } + } + + var offscreenCanvas: OffscreenCanvas? { + switch self { + case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas + default: return nil + } + } + + var videoFrame: VideoFrame? { + switch self { + case let .videoFrame(videoFrame): return videoFrame + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { + return .htmlCanvasElement(htmlCanvasElement) + } + if let htmlImageElement: HTMLImageElement = value.fromJSValue() { + return .htmlImageElement(htmlImageElement) + } + if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { + return .htmlVideoElement(htmlVideoElement) + } + if let imageBitmap: ImageBitmap = value.fromJSValue() { + return .imageBitmap(imageBitmap) + } + if let imageData: ImageData = value.fromJSValue() { + return .imageData(imageData) + } + if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { + return .offscreenCanvas(offscreenCanvas) + } + if let videoFrame: VideoFrame = value.fromJSValue() { + return .videoFrame(videoFrame) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): + return htmlCanvasElement.jsValue + case let .htmlImageElement(htmlImageElement): + return htmlImageElement.jsValue + case let .htmlVideoElement(htmlVideoElement): + return htmlVideoElement.jsValue + case let .imageBitmap(imageBitmap): + return imageBitmap.jsValue + case let .imageData(imageData): + return imageData.jsValue + case let .offscreenCanvas(offscreenCanvas): + return offscreenCanvas.jsValue + case let .videoFrame(videoFrame): + return videoFrame.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ULongRange.swift b/Sources/DOMKit/WebIDL/ULongRange.swift new file mode 100644 index 00000000..cf578d6c --- /dev/null +++ b/Sources/DOMKit/WebIDL/ULongRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ULongRange: BridgedDictionary { + public convenience init(max: UInt32, min: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.max] = max.jsValue + object[Strings.min] = min.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _max = ReadWriteAttribute(jsObject: object, name: Strings.max) + _min = ReadWriteAttribute(jsObject: object, name: Strings.min) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var max: UInt32 + + @ReadWriteAttribute + public var min: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/Uint32List.swift b/Sources/DOMKit/WebIDL/Uint32List.swift new file mode 100644 index 00000000..e8a01699 --- /dev/null +++ b/Sources/DOMKit/WebIDL/Uint32List.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_Uint32List: ConvertibleToJSValue {} +extension Uint32Array: Any_Uint32List {} +extension Array: Any_Uint32List where Element == GLuint {} + +public enum Uint32List: JSValueCompatible, Any_Uint32List { + case uint32Array(Uint32Array) + case seq_of_GLuint([GLuint]) + + var uint32Array: Uint32Array? { + switch self { + case let .uint32Array(uint32Array): return uint32Array + default: return nil + } + } + + var seq_of_GLuint: [GLuint]? { + switch self { + case let .seq_of_GLuint(seq_of_GLuint): return seq_of_GLuint + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let uint32Array: Uint32Array = value.fromJSValue() { + return .uint32Array(uint32Array) + } + if let seq_of_GLuint: [GLuint] = value.fromJSValue() { + return .seq_of_GLuint(seq_of_GLuint) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .uint32Array(uint32Array): + return uint32Array.jsValue + case let .seq_of_GLuint(seq_of_GLuint): + return seq_of_GLuint.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift new file mode 100644 index 00000000..364fa134 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoColorPrimaries: JSString, JSValueCompatible { + case bt709 = "bt709" + case bt470bg = "bt470bg" + case smpte170m = "smpte170m" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpace.swift b/Sources/DOMKit/WebIDL/VideoColorSpace.swift new file mode 100644 index 00000000..25b08860 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorSpace.swift @@ -0,0 +1,39 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoColorSpace: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoColorSpace].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _primaries = ReadonlyAttribute(jsObject: jsObject, name: Strings.primaries) + _transfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.transfer) + _matrix = ReadonlyAttribute(jsObject: jsObject, name: Strings.matrix) + _fullRange = ReadonlyAttribute(jsObject: jsObject, name: Strings.fullRange) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var primaries: VideoColorPrimaries? + + @ReadonlyAttribute + public var transfer: VideoTransferCharacteristics? + + @ReadonlyAttribute + public var matrix: VideoMatrixCoefficients? + + @ReadonlyAttribute + public var fullRange: Bool? + + @inlinable public func toJSON() -> VideoColorSpaceInit { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift new file mode 100644 index 00000000..786cfccc --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoColorSpaceInit: BridgedDictionary { + public convenience init(primaries: VideoColorPrimaries, transfer: VideoTransferCharacteristics, matrix: VideoMatrixCoefficients, fullRange: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.primaries] = primaries.jsValue + object[Strings.transfer] = transfer.jsValue + object[Strings.matrix] = matrix.jsValue + object[Strings.fullRange] = fullRange.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _primaries = ReadWriteAttribute(jsObject: object, name: Strings.primaries) + _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) + _matrix = ReadWriteAttribute(jsObject: object, name: Strings.matrix) + _fullRange = ReadWriteAttribute(jsObject: object, name: Strings.fullRange) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var primaries: VideoColorPrimaries + + @ReadWriteAttribute + public var transfer: VideoTransferCharacteristics + + @ReadWriteAttribute + public var matrix: VideoMatrixCoefficients + + @ReadWriteAttribute + public var fullRange: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoder.swift b/Sources/DOMKit/WebIDL/VideoDecoder.swift new file mode 100644 index 00000000..8f8900c2 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoDecoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var decodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func decode(chunk: EncodedVideoChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: VideoDecoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: VideoDecoderConfig) async throws -> VideoDecoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift new file mode 100644 index 00000000..3e431877 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderConfig: BridgedDictionary { + public convenience init(codec: String, description: BufferSource, codedWidth: UInt32, codedHeight: UInt32, displayAspectWidth: UInt32, displayAspectHeight: UInt32, colorSpace: VideoColorSpaceInit, hardwareAcceleration: HardwareAcceleration, optimizeForLatency: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.description] = description.jsValue + object[Strings.codedWidth] = codedWidth.jsValue + object[Strings.codedHeight] = codedHeight.jsValue + object[Strings.displayAspectWidth] = displayAspectWidth.jsValue + object[Strings.displayAspectHeight] = displayAspectHeight.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue + object[Strings.optimizeForLatency] = optimizeForLatency.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _description = ReadWriteAttribute(jsObject: object, name: Strings.description) + _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) + _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) + _displayAspectWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectWidth) + _displayAspectHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectHeight) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) + _optimizeForLatency = ReadWriteAttribute(jsObject: object, name: Strings.optimizeForLatency) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var description: BufferSource + + @ReadWriteAttribute + public var codedWidth: UInt32 + + @ReadWriteAttribute + public var codedHeight: UInt32 + + @ReadWriteAttribute + public var displayAspectWidth: UInt32 + + @ReadWriteAttribute + public var displayAspectHeight: UInt32 + + @ReadWriteAttribute + public var colorSpace: VideoColorSpaceInit + + @ReadWriteAttribute + public var hardwareAcceleration: HardwareAcceleration + + @ReadWriteAttribute + public var optimizeForLatency: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift new file mode 100644 index 00000000..0614f47e --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderInit: BridgedDictionary { + public convenience init(output: @escaping VideoFrameOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1Void + public var output: VideoFrameOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift new file mode 100644 index 00000000..4d41da3d --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoDecoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: VideoDecoderConfig +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoder.swift b/Sources/DOMKit/WebIDL/VideoEncoder.swift new file mode 100644 index 00000000..2349c057 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoder.swift @@ -0,0 +1,70 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: VideoEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var state: CodecState + + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoEncoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } + + @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { + let this = jsObject + _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func reset() { + let this = jsObject + _ = this[Strings.reset].function!(this: this, arguments: []) + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } + + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) async throws -> VideoEncoderSupport { + let this = constructor + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift new file mode 100644 index 00000000..c6fdfd98 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift @@ -0,0 +1,75 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderConfig: BridgedDictionary { + public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.codec] = codec.jsValue + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + object[Strings.bitrate] = bitrate.jsValue + object[Strings.framerate] = framerate.jsValue + object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.scalabilityMode] = scalabilityMode.jsValue + object[Strings.bitrateMode] = bitrateMode.jsValue + object[Strings.latencyMode] = latencyMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) + _framerate = ReadWriteAttribute(jsObject: object, name: Strings.framerate) + _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _scalabilityMode = ReadWriteAttribute(jsObject: object, name: Strings.scalabilityMode) + _bitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.bitrateMode) + _latencyMode = ReadWriteAttribute(jsObject: object, name: Strings.latencyMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var codec: String + + @ReadWriteAttribute + public var width: UInt32 + + @ReadWriteAttribute + public var height: UInt32 + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 + + @ReadWriteAttribute + public var framerate: Double + + @ReadWriteAttribute + public var hardwareAcceleration: HardwareAcceleration + + @ReadWriteAttribute + public var alpha: AlphaOption + + @ReadWriteAttribute + public var scalabilityMode: String + + @ReadWriteAttribute + public var bitrateMode: BitrateMode + + @ReadWriteAttribute + public var latencyMode: LatencyMode +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift new file mode 100644 index 00000000..583d307c --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderEncodeOptions: BridgedDictionary { + public convenience init(keyFrame: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.keyFrame] = keyFrame.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var keyFrame: Bool +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift new file mode 100644 index 00000000..f9859e1b --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderInit: BridgedDictionary { + public convenience init(output: @escaping EncodedVideoChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute2Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute2Void + public var output: EncodedVideoChunkOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift new file mode 100644 index 00000000..f6419290 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoEncoderConfig) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var supported: Bool + + @ReadWriteAttribute + public var config: VideoEncoderConfig +} diff --git a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift new file mode 100644 index 00000000..9d325b8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoFacingModeEnum: JSString, JSValueCompatible { + case user = "user" + case environment = "environment" + case left = "left" + case right = "right" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoFrame.swift b/Sources/DOMKit/WebIDL/VideoFrame.swift new file mode 100644 index 00000000..9743b3fc --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrame.swift @@ -0,0 +1,89 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrame: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoFrame].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) + _codedWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedWidth) + _codedHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedHeight) + _codedRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedRect) + _visibleRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibleRect) + _displayWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayWidth) + _displayHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayHeight) + _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) + _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) + _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) + self.jsObject = jsObject + } + + @inlinable public convenience init(image: CanvasImageSource, init: VideoFrameInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [image.jsValue, `init`?.jsValue ?? .undefined])) + } + + @inlinable public convenience init(data: BufferSource, init: VideoFrameBufferInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, `init`.jsValue])) + } + + @ReadonlyAttribute + public var format: VideoPixelFormat? + + @ReadonlyAttribute + public var codedWidth: UInt32 + + @ReadonlyAttribute + public var codedHeight: UInt32 + + @ReadonlyAttribute + public var codedRect: DOMRectReadOnly? + + @ReadonlyAttribute + public var visibleRect: DOMRectReadOnly? + + @ReadonlyAttribute + public var displayWidth: UInt32 + + @ReadonlyAttribute + public var displayHeight: UInt32 + + @ReadonlyAttribute + public var duration: UInt64? + + @ReadonlyAttribute + public var timestamp: Int64? + + @ReadonlyAttribute + public var colorSpace: VideoColorSpace + + @inlinable public func allocationSize(options: VideoFrameCopyToOptions? = nil) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) async throws -> [PlaneLayout] { + let this = jsObject + let _promise: JSPromise = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift new file mode 100644 index 00000000..0607012e --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift @@ -0,0 +1,65 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameBufferInit: BridgedDictionary { + public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.codedWidth] = codedWidth.jsValue + object[Strings.codedHeight] = codedHeight.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.duration] = duration.jsValue + object[Strings.layout] = layout.jsValue + object[Strings.visibleRect] = visibleRect.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) + _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: VideoPixelFormat + + @ReadWriteAttribute + public var codedWidth: UInt32 + + @ReadWriteAttribute + public var codedHeight: UInt32 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var layout: [PlaneLayout] + + @ReadWriteAttribute + public var visibleRect: DOMRectInit + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 + + @ReadWriteAttribute + public var colorSpace: VideoColorSpaceInit +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift new file mode 100644 index 00000000..a86c57dd --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameCopyToOptions: BridgedDictionary { + public convenience init(rect: DOMRectInit, layout: [PlaneLayout]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.rect] = rect.jsValue + object[Strings.layout] = layout.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _rect = ReadWriteAttribute(jsObject: object, name: Strings.rect) + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var rect: DOMRectInit + + @ReadWriteAttribute + public var layout: [PlaneLayout] +} diff --git a/Sources/DOMKit/WebIDL/VideoFrameInit.swift b/Sources/DOMKit/WebIDL/VideoFrameInit.swift new file mode 100644 index 00000000..a70eaea1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFrameInit.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class VideoFrameInit: BridgedDictionary { + public convenience init(duration: UInt64, timestamp: Int64, alpha: AlphaOption, visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.duration] = duration.jsValue + object[Strings.timestamp] = timestamp.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.visibleRect] = visibleRect.jsValue + object[Strings.displayWidth] = displayWidth.jsValue + object[Strings.displayHeight] = displayHeight.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) + _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) + _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) + _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var alpha: AlphaOption + + @ReadWriteAttribute + public var visibleRect: DOMRectInit + + @ReadWriteAttribute + public var displayWidth: UInt32 + + @ReadWriteAttribute + public var displayHeight: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift new file mode 100644 index 00000000..58f11f73 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoMatrixCoefficients: JSString, JSValueCompatible { + case rgb = "rgb" + case bt709 = "bt709" + case bt470bg = "bt470bg" + case smpte170m = "smpte170m" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift new file mode 100644 index 00000000..1c8dea1f --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift @@ -0,0 +1,29 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoPixelFormat: JSString, JSValueCompatible { + case i420 = "I420" + case i420A = "I420A" + case i422 = "I422" + case i444 = "I444" + case nV12 = "NV12" + case rGBA = "RGBA" + case rGBX = "RGBX" + case bGRA = "BGRA" + case bGRX = "BGRX" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift new file mode 100644 index 00000000..78582a71 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoResizeModeEnum: JSString, JSValueCompatible { + case none = "none" + case cropAndScale = "crop-and-scale" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift new file mode 100644 index 00000000..e8407da6 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoTransferCharacteristics: JSString, JSValueCompatible { + case bt709 = "bt709" + case smpte170m = "smpte170m" + case iec6196621 = "iec61966-2-1" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift new file mode 100644 index 00000000..3ee19c40 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGL2RenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGL2RenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift new file mode 100644 index 00000000..2071c82e --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift @@ -0,0 +1,1162 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGL2RenderingContextBase: JSBridgedClass {} +public extension WebGL2RenderingContextBase { + @inlinable static var READ_BUFFER: GLenum { 0x0C02 } + + @inlinable static var UNPACK_ROW_LENGTH: GLenum { 0x0CF2 } + + @inlinable static var UNPACK_SKIP_ROWS: GLenum { 0x0CF3 } + + @inlinable static var UNPACK_SKIP_PIXELS: GLenum { 0x0CF4 } + + @inlinable static var PACK_ROW_LENGTH: GLenum { 0x0D02 } + + @inlinable static var PACK_SKIP_ROWS: GLenum { 0x0D03 } + + @inlinable static var PACK_SKIP_PIXELS: GLenum { 0x0D04 } + + @inlinable static var COLOR: GLenum { 0x1800 } + + @inlinable static var DEPTH: GLenum { 0x1801 } + + @inlinable static var STENCIL: GLenum { 0x1802 } + + @inlinable static var RED: GLenum { 0x1903 } + + @inlinable static var RGB8: GLenum { 0x8051 } + + @inlinable static var RGBA8: GLenum { 0x8058 } + + @inlinable static var RGB10_A2: GLenum { 0x8059 } + + @inlinable static var TEXTURE_BINDING_3D: GLenum { 0x806A } + + @inlinable static var UNPACK_SKIP_IMAGES: GLenum { 0x806D } + + @inlinable static var UNPACK_IMAGE_HEIGHT: GLenum { 0x806E } + + @inlinable static var TEXTURE_3D: GLenum { 0x806F } + + @inlinable static var TEXTURE_WRAP_R: GLenum { 0x8072 } + + @inlinable static var MAX_3D_TEXTURE_SIZE: GLenum { 0x8073 } + + @inlinable static var UNSIGNED_INT_2_10_10_10_REV: GLenum { 0x8368 } + + @inlinable static var MAX_ELEMENTS_VERTICES: GLenum { 0x80E8 } + + @inlinable static var MAX_ELEMENTS_INDICES: GLenum { 0x80E9 } + + @inlinable static var TEXTURE_MIN_LOD: GLenum { 0x813A } + + @inlinable static var TEXTURE_MAX_LOD: GLenum { 0x813B } + + @inlinable static var TEXTURE_BASE_LEVEL: GLenum { 0x813C } + + @inlinable static var TEXTURE_MAX_LEVEL: GLenum { 0x813D } + + @inlinable static var MIN: GLenum { 0x8007 } + + @inlinable static var MAX: GLenum { 0x8008 } + + @inlinable static var DEPTH_COMPONENT24: GLenum { 0x81A6 } + + @inlinable static var MAX_TEXTURE_LOD_BIAS: GLenum { 0x84FD } + + @inlinable static var TEXTURE_COMPARE_MODE: GLenum { 0x884C } + + @inlinable static var TEXTURE_COMPARE_FUNC: GLenum { 0x884D } + + @inlinable static var CURRENT_QUERY: GLenum { 0x8865 } + + @inlinable static var QUERY_RESULT: GLenum { 0x8866 } + + @inlinable static var QUERY_RESULT_AVAILABLE: GLenum { 0x8867 } + + @inlinable static var STREAM_READ: GLenum { 0x88E1 } + + @inlinable static var STREAM_COPY: GLenum { 0x88E2 } + + @inlinable static var STATIC_READ: GLenum { 0x88E5 } + + @inlinable static var STATIC_COPY: GLenum { 0x88E6 } + + @inlinable static var DYNAMIC_READ: GLenum { 0x88E9 } + + @inlinable static var DYNAMIC_COPY: GLenum { 0x88EA } + + @inlinable static var MAX_DRAW_BUFFERS: GLenum { 0x8824 } + + @inlinable static var DRAW_BUFFER0: GLenum { 0x8825 } + + @inlinable static var DRAW_BUFFER1: GLenum { 0x8826 } + + @inlinable static var DRAW_BUFFER2: GLenum { 0x8827 } + + @inlinable static var DRAW_BUFFER3: GLenum { 0x8828 } + + @inlinable static var DRAW_BUFFER4: GLenum { 0x8829 } + + @inlinable static var DRAW_BUFFER5: GLenum { 0x882A } + + @inlinable static var DRAW_BUFFER6: GLenum { 0x882B } + + @inlinable static var DRAW_BUFFER7: GLenum { 0x882C } + + @inlinable static var DRAW_BUFFER8: GLenum { 0x882D } + + @inlinable static var DRAW_BUFFER9: GLenum { 0x882E } + + @inlinable static var DRAW_BUFFER10: GLenum { 0x882F } + + @inlinable static var DRAW_BUFFER11: GLenum { 0x8830 } + + @inlinable static var DRAW_BUFFER12: GLenum { 0x8831 } + + @inlinable static var DRAW_BUFFER13: GLenum { 0x8832 } + + @inlinable static var DRAW_BUFFER14: GLenum { 0x8833 } + + @inlinable static var DRAW_BUFFER15: GLenum { 0x8834 } + + @inlinable static var MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8B49 } + + @inlinable static var MAX_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8B4A } + + @inlinable static var SAMPLER_3D: GLenum { 0x8B5F } + + @inlinable static var SAMPLER_2D_SHADOW: GLenum { 0x8B62 } + + @inlinable static var FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum { 0x8B8B } + + @inlinable static var PIXEL_PACK_BUFFER: GLenum { 0x88EB } + + @inlinable static var PIXEL_UNPACK_BUFFER: GLenum { 0x88EC } + + @inlinable static var PIXEL_PACK_BUFFER_BINDING: GLenum { 0x88ED } + + @inlinable static var PIXEL_UNPACK_BUFFER_BINDING: GLenum { 0x88EF } + + @inlinable static var FLOAT_MAT2x3: GLenum { 0x8B65 } + + @inlinable static var FLOAT_MAT2x4: GLenum { 0x8B66 } + + @inlinable static var FLOAT_MAT3x2: GLenum { 0x8B67 } + + @inlinable static var FLOAT_MAT3x4: GLenum { 0x8B68 } + + @inlinable static var FLOAT_MAT4x2: GLenum { 0x8B69 } + + @inlinable static var FLOAT_MAT4x3: GLenum { 0x8B6A } + + @inlinable static var SRGB: GLenum { 0x8C40 } + + @inlinable static var SRGB8: GLenum { 0x8C41 } + + @inlinable static var SRGB8_ALPHA8: GLenum { 0x8C43 } + + @inlinable static var COMPARE_REF_TO_TEXTURE: GLenum { 0x884E } + + @inlinable static var RGBA32F: GLenum { 0x8814 } + + @inlinable static var RGB32F: GLenum { 0x8815 } + + @inlinable static var RGBA16F: GLenum { 0x881A } + + @inlinable static var RGB16F: GLenum { 0x881B } + + @inlinable static var VERTEX_ATTRIB_ARRAY_INTEGER: GLenum { 0x88FD } + + @inlinable static var MAX_ARRAY_TEXTURE_LAYERS: GLenum { 0x88FF } + + @inlinable static var MIN_PROGRAM_TEXEL_OFFSET: GLenum { 0x8904 } + + @inlinable static var MAX_PROGRAM_TEXEL_OFFSET: GLenum { 0x8905 } + + @inlinable static var MAX_VARYING_COMPONENTS: GLenum { 0x8B4B } + + @inlinable static var TEXTURE_2D_ARRAY: GLenum { 0x8C1A } + + @inlinable static var TEXTURE_BINDING_2D_ARRAY: GLenum { 0x8C1D } + + @inlinable static var R11F_G11F_B10F: GLenum { 0x8C3A } + + @inlinable static var UNSIGNED_INT_10F_11F_11F_REV: GLenum { 0x8C3B } + + @inlinable static var RGB9_E5: GLenum { 0x8C3D } + + @inlinable static var UNSIGNED_INT_5_9_9_9_REV: GLenum { 0x8C3E } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum { 0x8C7F } + + @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum { 0x8C80 } + + @inlinable static var TRANSFORM_FEEDBACK_VARYINGS: GLenum { 0x8C83 } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_START: GLenum { 0x8C84 } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum { 0x8C85 } + + @inlinable static var TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum { 0x8C88 } + + @inlinable static var RASTERIZER_DISCARD: GLenum { 0x8C89 } + + @inlinable static var MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum { 0x8C8A } + + @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum { 0x8C8B } + + @inlinable static var INTERLEAVED_ATTRIBS: GLenum { 0x8C8C } + + @inlinable static var SEPARATE_ATTRIBS: GLenum { 0x8C8D } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER: GLenum { 0x8C8E } + + @inlinable static var TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum { 0x8C8F } + + @inlinable static var RGBA32UI: GLenum { 0x8D70 } + + @inlinable static var RGB32UI: GLenum { 0x8D71 } + + @inlinable static var RGBA16UI: GLenum { 0x8D76 } + + @inlinable static var RGB16UI: GLenum { 0x8D77 } + + @inlinable static var RGBA8UI: GLenum { 0x8D7C } + + @inlinable static var RGB8UI: GLenum { 0x8D7D } + + @inlinable static var RGBA32I: GLenum { 0x8D82 } + + @inlinable static var RGB32I: GLenum { 0x8D83 } + + @inlinable static var RGBA16I: GLenum { 0x8D88 } + + @inlinable static var RGB16I: GLenum { 0x8D89 } + + @inlinable static var RGBA8I: GLenum { 0x8D8E } + + @inlinable static var RGB8I: GLenum { 0x8D8F } + + @inlinable static var RED_INTEGER: GLenum { 0x8D94 } + + @inlinable static var RGB_INTEGER: GLenum { 0x8D98 } + + @inlinable static var RGBA_INTEGER: GLenum { 0x8D99 } + + @inlinable static var SAMPLER_2D_ARRAY: GLenum { 0x8DC1 } + + @inlinable static var SAMPLER_2D_ARRAY_SHADOW: GLenum { 0x8DC4 } + + @inlinable static var SAMPLER_CUBE_SHADOW: GLenum { 0x8DC5 } + + @inlinable static var UNSIGNED_INT_VEC2: GLenum { 0x8DC6 } + + @inlinable static var UNSIGNED_INT_VEC3: GLenum { 0x8DC7 } + + @inlinable static var UNSIGNED_INT_VEC4: GLenum { 0x8DC8 } + + @inlinable static var INT_SAMPLER_2D: GLenum { 0x8DCA } + + @inlinable static var INT_SAMPLER_3D: GLenum { 0x8DCB } + + @inlinable static var INT_SAMPLER_CUBE: GLenum { 0x8DCC } + + @inlinable static var INT_SAMPLER_2D_ARRAY: GLenum { 0x8DCF } + + @inlinable static var UNSIGNED_INT_SAMPLER_2D: GLenum { 0x8DD2 } + + @inlinable static var UNSIGNED_INT_SAMPLER_3D: GLenum { 0x8DD3 } + + @inlinable static var UNSIGNED_INT_SAMPLER_CUBE: GLenum { 0x8DD4 } + + @inlinable static var UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum { 0x8DD7 } + + @inlinable static var DEPTH_COMPONENT32F: GLenum { 0x8CAC } + + @inlinable static var DEPTH32F_STENCIL8: GLenum { 0x8CAD } + + @inlinable static var FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum { 0x8DAD } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum { 0x8210 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum { 0x8211 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum { 0x8212 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum { 0x8213 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum { 0x8214 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum { 0x8215 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum { 0x8216 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum { 0x8217 } + + @inlinable static var FRAMEBUFFER_DEFAULT: GLenum { 0x8218 } + + @inlinable static var UNSIGNED_INT_24_8: GLenum { 0x84FA } + + @inlinable static var DEPTH24_STENCIL8: GLenum { 0x88F0 } + + @inlinable static var UNSIGNED_NORMALIZED: GLenum { 0x8C17 } + + @inlinable static var DRAW_FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } + + @inlinable static var READ_FRAMEBUFFER: GLenum { 0x8CA8 } + + @inlinable static var DRAW_FRAMEBUFFER: GLenum { 0x8CA9 } + + @inlinable static var READ_FRAMEBUFFER_BINDING: GLenum { 0x8CAA } + + @inlinable static var RENDERBUFFER_SAMPLES: GLenum { 0x8CAB } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum { 0x8CD4 } + + @inlinable static var MAX_COLOR_ATTACHMENTS: GLenum { 0x8CDF } + + @inlinable static var COLOR_ATTACHMENT1: GLenum { 0x8CE1 } + + @inlinable static var COLOR_ATTACHMENT2: GLenum { 0x8CE2 } + + @inlinable static var COLOR_ATTACHMENT3: GLenum { 0x8CE3 } + + @inlinable static var COLOR_ATTACHMENT4: GLenum { 0x8CE4 } + + @inlinable static var COLOR_ATTACHMENT5: GLenum { 0x8CE5 } + + @inlinable static var COLOR_ATTACHMENT6: GLenum { 0x8CE6 } + + @inlinable static var COLOR_ATTACHMENT7: GLenum { 0x8CE7 } + + @inlinable static var COLOR_ATTACHMENT8: GLenum { 0x8CE8 } + + @inlinable static var COLOR_ATTACHMENT9: GLenum { 0x8CE9 } + + @inlinable static var COLOR_ATTACHMENT10: GLenum { 0x8CEA } + + @inlinable static var COLOR_ATTACHMENT11: GLenum { 0x8CEB } + + @inlinable static var COLOR_ATTACHMENT12: GLenum { 0x8CEC } + + @inlinable static var COLOR_ATTACHMENT13: GLenum { 0x8CED } + + @inlinable static var COLOR_ATTACHMENT14: GLenum { 0x8CEE } + + @inlinable static var COLOR_ATTACHMENT15: GLenum { 0x8CEF } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum { 0x8D56 } + + @inlinable static var MAX_SAMPLES: GLenum { 0x8D57 } + + @inlinable static var HALF_FLOAT: GLenum { 0x140B } + + @inlinable static var RG: GLenum { 0x8227 } + + @inlinable static var RG_INTEGER: GLenum { 0x8228 } + + @inlinable static var R8: GLenum { 0x8229 } + + @inlinable static var RG8: GLenum { 0x822B } + + @inlinable static var R16F: GLenum { 0x822D } + + @inlinable static var R32F: GLenum { 0x822E } + + @inlinable static var RG16F: GLenum { 0x822F } + + @inlinable static var RG32F: GLenum { 0x8230 } + + @inlinable static var R8I: GLenum { 0x8231 } + + @inlinable static var R8UI: GLenum { 0x8232 } + + @inlinable static var R16I: GLenum { 0x8233 } + + @inlinable static var R16UI: GLenum { 0x8234 } + + @inlinable static var R32I: GLenum { 0x8235 } + + @inlinable static var R32UI: GLenum { 0x8236 } + + @inlinable static var RG8I: GLenum { 0x8237 } + + @inlinable static var RG8UI: GLenum { 0x8238 } + + @inlinable static var RG16I: GLenum { 0x8239 } + + @inlinable static var RG16UI: GLenum { 0x823A } + + @inlinable static var RG32I: GLenum { 0x823B } + + @inlinable static var RG32UI: GLenum { 0x823C } + + @inlinable static var VERTEX_ARRAY_BINDING: GLenum { 0x85B5 } + + @inlinable static var R8_SNORM: GLenum { 0x8F94 } + + @inlinable static var RG8_SNORM: GLenum { 0x8F95 } + + @inlinable static var RGB8_SNORM: GLenum { 0x8F96 } + + @inlinable static var RGBA8_SNORM: GLenum { 0x8F97 } + + @inlinable static var SIGNED_NORMALIZED: GLenum { 0x8F9C } + + @inlinable static var COPY_READ_BUFFER: GLenum { 0x8F36 } + + @inlinable static var COPY_WRITE_BUFFER: GLenum { 0x8F37 } + + @inlinable static var COPY_READ_BUFFER_BINDING: GLenum { 0x8F36 } + + @inlinable static var COPY_WRITE_BUFFER_BINDING: GLenum { 0x8F37 } + + @inlinable static var UNIFORM_BUFFER: GLenum { 0x8A11 } + + @inlinable static var UNIFORM_BUFFER_BINDING: GLenum { 0x8A28 } + + @inlinable static var UNIFORM_BUFFER_START: GLenum { 0x8A29 } + + @inlinable static var UNIFORM_BUFFER_SIZE: GLenum { 0x8A2A } + + @inlinable static var MAX_VERTEX_UNIFORM_BLOCKS: GLenum { 0x8A2B } + + @inlinable static var MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum { 0x8A2D } + + @inlinable static var MAX_COMBINED_UNIFORM_BLOCKS: GLenum { 0x8A2E } + + @inlinable static var MAX_UNIFORM_BUFFER_BINDINGS: GLenum { 0x8A2F } + + @inlinable static var MAX_UNIFORM_BLOCK_SIZE: GLenum { 0x8A30 } + + @inlinable static var MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8A31 } + + @inlinable static var MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8A33 } + + @inlinable static var UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum { 0x8A34 } + + @inlinable static var ACTIVE_UNIFORM_BLOCKS: GLenum { 0x8A36 } + + @inlinable static var UNIFORM_TYPE: GLenum { 0x8A37 } + + @inlinable static var UNIFORM_SIZE: GLenum { 0x8A38 } + + @inlinable static var UNIFORM_BLOCK_INDEX: GLenum { 0x8A3A } + + @inlinable static var UNIFORM_OFFSET: GLenum { 0x8A3B } + + @inlinable static var UNIFORM_ARRAY_STRIDE: GLenum { 0x8A3C } + + @inlinable static var UNIFORM_MATRIX_STRIDE: GLenum { 0x8A3D } + + @inlinable static var UNIFORM_IS_ROW_MAJOR: GLenum { 0x8A3E } + + @inlinable static var UNIFORM_BLOCK_BINDING: GLenum { 0x8A3F } + + @inlinable static var UNIFORM_BLOCK_DATA_SIZE: GLenum { 0x8A40 } + + @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum { 0x8A42 } + + @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum { 0x8A43 } + + @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum { 0x8A44 } + + @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum { 0x8A46 } + + @inlinable static var INVALID_INDEX: GLenum { 0xFFFF_FFFF } + + @inlinable static var MAX_VERTEX_OUTPUT_COMPONENTS: GLenum { 0x9122 } + + @inlinable static var MAX_FRAGMENT_INPUT_COMPONENTS: GLenum { 0x9125 } + + @inlinable static var MAX_SERVER_WAIT_TIMEOUT: GLenum { 0x9111 } + + @inlinable static var OBJECT_TYPE: GLenum { 0x9112 } + + @inlinable static var SYNC_CONDITION: GLenum { 0x9113 } + + @inlinable static var SYNC_STATUS: GLenum { 0x9114 } + + @inlinable static var SYNC_FLAGS: GLenum { 0x9115 } + + @inlinable static var SYNC_FENCE: GLenum { 0x9116 } + + @inlinable static var SYNC_GPU_COMMANDS_COMPLETE: GLenum { 0x9117 } + + @inlinable static var UNSIGNALED: GLenum { 0x9118 } + + @inlinable static var SIGNALED: GLenum { 0x9119 } + + @inlinable static var ALREADY_SIGNALED: GLenum { 0x911A } + + @inlinable static var TIMEOUT_EXPIRED: GLenum { 0x911B } + + @inlinable static var CONDITION_SATISFIED: GLenum { 0x911C } + + @inlinable static var WAIT_FAILED: GLenum { 0x911D } + + @inlinable static var SYNC_FLUSH_COMMANDS_BIT: GLenum { 0x0000_0001 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum { 0x88FE } + + @inlinable static var ANY_SAMPLES_PASSED: GLenum { 0x8C2F } + + @inlinable static var ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum { 0x8D6A } + + @inlinable static var SAMPLER_BINDING: GLenum { 0x8919 } + + @inlinable static var RGB10_A2UI: GLenum { 0x906F } + + @inlinable static var INT_2_10_10_10_REV: GLenum { 0x8D9F } + + @inlinable static var TRANSFORM_FEEDBACK: GLenum { 0x8E22 } + + @inlinable static var TRANSFORM_FEEDBACK_PAUSED: GLenum { 0x8E23 } + + @inlinable static var TRANSFORM_FEEDBACK_ACTIVE: GLenum { 0x8E24 } + + @inlinable static var TRANSFORM_FEEDBACK_BINDING: GLenum { 0x8E25 } + + @inlinable static var TEXTURE_IMMUTABLE_FORMAT: GLenum { 0x912F } + + @inlinable static var MAX_ELEMENT_INDEX: GLenum { 0x8D6B } + + @inlinable static var TEXTURE_IMMUTABLE_LEVELS: GLenum { 0x82DF } + + @inlinable static var TIMEOUT_IGNORED: GLint64 { -1 } + + @inlinable static var MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum { 0x9247 } + + @inlinable func copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr) { + let this = jsObject + _ = this[Strings.copyBufferSubData].function!(this: this, arguments: [readTarget.jsValue, writeTarget.jsValue, readOffset.jsValue, writeOffset.jsValue, size.jsValue]) + } + + @inlinable func getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset: GLuint? = nil, length: GLuint? = nil) { + let this = jsObject + _ = this[Strings.getBufferSubData].function!(this: this, arguments: [target.jsValue, srcByteOffset.jsValue, dstBuffer.jsValue, dstOffset?.jsValue ?? .undefined, length?.jsValue ?? .undefined]) + } + + @inlinable func blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum) { + let _arg0 = srcX0.jsValue + let _arg1 = srcY0.jsValue + let _arg2 = srcX1.jsValue + let _arg3 = srcY1.jsValue + let _arg4 = dstX0.jsValue + let _arg5 = dstY0.jsValue + let _arg6 = dstX1.jsValue + let _arg7 = dstY1.jsValue + let _arg8 = mask.jsValue + let _arg9 = filter.jsValue + let this = jsObject + _ = this[Strings.blitFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture?, level: GLint, layer: GLint) { + let this = jsObject + _ = this[Strings.framebufferTextureLayer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, texture.jsValue, level.jsValue, layer.jsValue]) + } + + @inlinable func invalidateFramebuffer(target: GLenum, attachments: [GLenum]) { + let this = jsObject + _ = this[Strings.invalidateFramebuffer].function!(this: this, arguments: [target.jsValue, attachments.jsValue]) + } + + @inlinable func invalidateSubFramebuffer(target: GLenum, attachments: [GLenum], x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = attachments.jsValue + let _arg2 = x.jsValue + let _arg3 = y.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let this = jsObject + _ = this[Strings.invalidateSubFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func readBuffer(src: GLenum) { + let this = jsObject + _ = this[Strings.readBuffer].function!(this: this, arguments: [src.jsValue]) + } + + @inlinable func getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getInternalformatParameter].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.renderbufferStorageMultisample].function!(this: this, arguments: [target.jsValue, samples.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.texStorage2D].function!(this: this, arguments: [target.jsValue, levels.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = levels.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let this = jsObject + _ = this[Strings.texStorage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = source.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = srcData.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = format.jsValue + let _arg8 = type.jsValue + let _arg9 = srcData.jsValue + let _arg10 = srcOffset.jsValue + let this = jsObject + _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = type.jsValue + let _arg10 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = type.jsValue + let _arg10 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView?, srcOffset: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = type.jsValue + let _arg10 = srcData.jsValue + let _arg11 = srcOffset?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) + } + + @inlinable func copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = x.jsValue + let _arg6 = y.jsValue + let _arg7 = width.jsValue + let _arg8 = height.jsValue + let this = jsObject + _ = this[Strings.copyTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = imageSize.jsValue + let _arg8 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = depth.jsValue + let _arg6 = border.jsValue + let _arg7 = srcData.jsValue + let _arg8 = srcOffset?.jsValue ?? .undefined + let _arg9 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = imageSize.jsValue + let _arg10 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) + } + + @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = zoffset.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = depth.jsValue + let _arg8 = format.jsValue + let _arg9 = srcData.jsValue + let _arg10 = srcOffset?.jsValue ?? .undefined + let _arg11 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) + } + + @inlinable func getFragDataLocation(program: WebGLProgram, name: String) -> GLint { + let this = jsObject + return this[Strings.getFragDataLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func uniform1ui(location: WebGLUniformLocation?, v0: GLuint) { + let this = jsObject + _ = this[Strings.uniform1ui].function!(this: this, arguments: [location.jsValue, v0.jsValue]) + } + + @inlinable func uniform2ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint) { + let this = jsObject + _ = this[Strings.uniform2ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue]) + } + + @inlinable func uniform3ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint) { + let this = jsObject + _ = this[Strings.uniform3ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue]) + } + + @inlinable func uniform4ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint) { + let this = jsObject + _ = this[Strings.uniform4ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue, v3.jsValue]) + } + + @inlinable func uniform1uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform1uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform2uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform2uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform3uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform3uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform4uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform4uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix3x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix3x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix4x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix4x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix2x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix2x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix4x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix4x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix2x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix2x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix3x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix3x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint) { + let this = jsObject + _ = this[Strings.vertexAttribI4i].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttribI4iv(index: GLuint, values: Int32List) { + let this = jsObject + _ = this[Strings.vertexAttribI4iv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) { + let this = jsObject + _ = this[Strings.vertexAttribI4ui].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttribI4uiv(index: GLuint, values: Uint32List) { + let this = jsObject + _ = this[Strings.vertexAttribI4uiv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr) { + let this = jsObject + _ = this[Strings.vertexAttribIPointer].function!(this: this, arguments: [index.jsValue, size.jsValue, type.jsValue, stride.jsValue, offset.jsValue]) + } + + @inlinable func vertexAttribDivisor(index: GLuint, divisor: GLuint) { + let this = jsObject + _ = this[Strings.vertexAttribDivisor].function!(this: this, arguments: [index.jsValue, divisor.jsValue]) + } + + @inlinable func drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei) { + let this = jsObject + _ = this[Strings.drawArraysInstanced].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue, instanceCount.jsValue]) + } + + @inlinable func drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei) { + let this = jsObject + _ = this[Strings.drawElementsInstanced].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue, instanceCount.jsValue]) + } + + @inlinable func drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr) { + let _arg0 = mode.jsValue + let _arg1 = start.jsValue + let _arg2 = end.jsValue + let _arg3 = count.jsValue + let _arg4 = type.jsValue + let _arg5 = offset.jsValue + let this = jsObject + _ = this[Strings.drawRangeElements].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func drawBuffers(buffers: [GLenum]) { + let this = jsObject + _ = this[Strings.drawBuffers].function!(this: this, arguments: [buffers.jsValue]) + } + + @inlinable func clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset: GLuint? = nil) { + let this = jsObject + _ = this[Strings.clearBufferfv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) + } + + @inlinable func clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset: GLuint? = nil) { + let this = jsObject + _ = this[Strings.clearBufferiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) + } + + @inlinable func clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset: GLuint? = nil) { + let this = jsObject + _ = this[Strings.clearBufferuiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) + } + + @inlinable func clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint) { + let this = jsObject + _ = this[Strings.clearBufferfi].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, depth.jsValue, stencil.jsValue]) + } + + @inlinable func createQuery() -> WebGLQuery? { + let this = jsObject + return this[Strings.createQuery].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteQuery(query: WebGLQuery?) { + let this = jsObject + _ = this[Strings.deleteQuery].function!(this: this, arguments: [query.jsValue]) + } + + @inlinable func isQuery(query: WebGLQuery?) -> GLboolean { + let this = jsObject + return this[Strings.isQuery].function!(this: this, arguments: [query.jsValue]).fromJSValue()! + } + + @inlinable func beginQuery(target: GLenum, query: WebGLQuery) { + let this = jsObject + _ = this[Strings.beginQuery].function!(this: this, arguments: [target.jsValue, query.jsValue]) + } + + @inlinable func endQuery(target: GLenum) { + let this = jsObject + _ = this[Strings.endQuery].function!(this: this, arguments: [target.jsValue]) + } + + @inlinable func getQuery(target: GLenum, pname: GLenum) -> WebGLQuery? { + let this = jsObject + return this[Strings.getQuery].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getQueryParameter(query: WebGLQuery, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getQueryParameter].function!(this: this, arguments: [query.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func createSampler() -> WebGLSampler? { + let this = jsObject + return this[Strings.createSampler].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteSampler(sampler: WebGLSampler?) { + let this = jsObject + _ = this[Strings.deleteSampler].function!(this: this, arguments: [sampler.jsValue]) + } + + @inlinable func isSampler(sampler: WebGLSampler?) -> GLboolean { + let this = jsObject + return this[Strings.isSampler].function!(this: this, arguments: [sampler.jsValue]).fromJSValue()! + } + + @inlinable func bindSampler(unit: GLuint, sampler: WebGLSampler?) { + let this = jsObject + _ = this[Strings.bindSampler].function!(this: this, arguments: [unit.jsValue, sampler.jsValue]) + } + + @inlinable func samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.samplerParameteri].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat) { + let this = jsObject + _ = this[Strings.samplerParameterf].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func getSamplerParameter(sampler: WebGLSampler, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getSamplerParameter].function!(this: this, arguments: [sampler.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func fenceSync(condition: GLenum, flags: GLbitfield) -> WebGLSync? { + let this = jsObject + return this[Strings.fenceSync].function!(this: this, arguments: [condition.jsValue, flags.jsValue]).fromJSValue()! + } + + @inlinable func isSync(sync: WebGLSync?) -> GLboolean { + let this = jsObject + return this[Strings.isSync].function!(this: this, arguments: [sync.jsValue]).fromJSValue()! + } + + @inlinable func deleteSync(sync: WebGLSync?) { + let this = jsObject + _ = this[Strings.deleteSync].function!(this: this, arguments: [sync.jsValue]) + } + + @inlinable func clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64) -> GLenum { + let this = jsObject + return this[Strings.clientWaitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]).fromJSValue()! + } + + @inlinable func waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64) { + let this = jsObject + _ = this[Strings.waitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]) + } + + @inlinable func getSyncParameter(sync: WebGLSync, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getSyncParameter].function!(this: this, arguments: [sync.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func createTransformFeedback() -> WebGLTransformFeedback? { + let this = jsObject + return this[Strings.createTransformFeedback].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteTransformFeedback(tf: WebGLTransformFeedback?) { + let this = jsObject + _ = this[Strings.deleteTransformFeedback].function!(this: this, arguments: [tf.jsValue]) + } + + @inlinable func isTransformFeedback(tf: WebGLTransformFeedback?) -> GLboolean { + let this = jsObject + return this[Strings.isTransformFeedback].function!(this: this, arguments: [tf.jsValue]).fromJSValue()! + } + + @inlinable func bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback?) { + let this = jsObject + _ = this[Strings.bindTransformFeedback].function!(this: this, arguments: [target.jsValue, tf.jsValue]) + } + + @inlinable func beginTransformFeedback(primitiveMode: GLenum) { + let this = jsObject + _ = this[Strings.beginTransformFeedback].function!(this: this, arguments: [primitiveMode.jsValue]) + } + + @inlinable func endTransformFeedback() { + let this = jsObject + _ = this[Strings.endTransformFeedback].function!(this: this, arguments: []) + } + + @inlinable func transformFeedbackVaryings(program: WebGLProgram, varyings: [String], bufferMode: GLenum) { + let this = jsObject + _ = this[Strings.transformFeedbackVaryings].function!(this: this, arguments: [program.jsValue, varyings.jsValue, bufferMode.jsValue]) + } + + @inlinable func getTransformFeedbackVarying(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getTransformFeedbackVarying].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func pauseTransformFeedback() { + let this = jsObject + _ = this[Strings.pauseTransformFeedback].function!(this: this, arguments: []) + } + + @inlinable func resumeTransformFeedback() { + let this = jsObject + _ = this[Strings.resumeTransformFeedback].function!(this: this, arguments: []) + } + + @inlinable func bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.bindBufferBase].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue]) + } + + @inlinable func bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer?, offset: GLintptr, size: GLsizeiptr) { + let this = jsObject + _ = this[Strings.bindBufferRange].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue, offset.jsValue, size.jsValue]) + } + + @inlinable func getIndexedParameter(target: GLenum, index: GLuint) -> JSValue { + let this = jsObject + return this[Strings.getIndexedParameter].function!(this: this, arguments: [target.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getUniformIndices(program: WebGLProgram, uniformNames: [String]) -> [GLuint]? { + let this = jsObject + return this[Strings.getUniformIndices].function!(this: this, arguments: [program.jsValue, uniformNames.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniforms(program: WebGLProgram, uniformIndices: [GLuint], pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getActiveUniforms].function!(this: this, arguments: [program.jsValue, uniformIndices.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getUniformBlockIndex(program: WebGLProgram, uniformBlockName: String) -> GLuint { + let this = jsObject + return this[Strings.getUniformBlockIndex].function!(this: this, arguments: [program.jsValue, uniformBlockName.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getActiveUniformBlockParameter].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint) -> String? { + let this = jsObject + return this[Strings.getActiveUniformBlockName].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue]).fromJSValue()! + } + + @inlinable func uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint) { + let this = jsObject + _ = this[Strings.uniformBlockBinding].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, uniformBlockBinding.jsValue]) + } + + @inlinable func createVertexArray() -> WebGLVertexArrayObject? { + let this = jsObject + return this[Strings.createVertexArray].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func deleteVertexArray(vertexArray: WebGLVertexArrayObject?) { + let this = jsObject + _ = this[Strings.deleteVertexArray].function!(this: this, arguments: [vertexArray.jsValue]) + } + + @inlinable func isVertexArray(vertexArray: WebGLVertexArrayObject?) -> GLboolean { + let this = jsObject + return this[Strings.isVertexArray].function!(this: this, arguments: [vertexArray.jsValue]).fromJSValue()! + } + + @inlinable func bindVertexArray(array: WebGLVertexArrayObject?) { + let this = jsObject + _ = this[Strings.bindVertexArray].function!(this: this, arguments: [array.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift new file mode 100644 index 00000000..659213d5 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift @@ -0,0 +1,317 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGL2RenderingContextOverloads: JSBridgedClass {} +public extension WebGL2RenderingContextOverloads { + @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) + } + + @inlinable func bufferData(target: GLenum, srcData: BufferSource?, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue]) + } + + @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue]) + } + + @inlinable func bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length: GLuint? = nil) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) + } + + @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length: GLuint? = nil) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = format.jsValue + let _arg4 = type.jsValue + let _arg5 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = srcData.jsValue + let _arg9 = srcOffset.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pboOffset.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = srcData.jsValue + let _arg9 = srcOffset.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = imageSize.jsValue + let _arg7 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = srcData.jsValue + let _arg7 = srcOffset?.jsValue ?? .undefined + let _arg8 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = imageSize.jsValue + let _arg8 = offset.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = srcData.jsValue + let _arg8 = srcOffset?.jsValue ?? .undefined + let _arg9 = srcLengthOverride?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) + } + + @inlinable func uniform1fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform2fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform3fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform4fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform1iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform2iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform3iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniform4iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { + let this = jsObject + _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView?) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = dstData.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = offset.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = dstData.jsValue + let _arg7 = dstOffset.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift new file mode 100644 index 00000000..38991452 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift @@ -0,0 +1,26 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLActiveInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLActiveInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var size: GLint + + @ReadonlyAttribute + public var type: GLenum + + @ReadonlyAttribute + public var name: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLBuffer.swift b/Sources/DOMKit/WebIDL/WebGLBuffer.swift new file mode 100644 index 00000000..c5217eb0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLBuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLBuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLBuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift new file mode 100644 index 00000000..28853501 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextAttributes: BridgedDictionary { + public convenience init(alpha: Bool, depth: Bool, stencil: Bool, antialias: Bool, premultipliedAlpha: Bool, preserveDrawingBuffer: Bool, powerPreference: WebGLPowerPreference, failIfMajorPerformanceCaveat: Bool, desynchronized: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.alpha] = alpha.jsValue + object[Strings.depth] = depth.jsValue + object[Strings.stencil] = stencil.jsValue + object[Strings.antialias] = antialias.jsValue + object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue + object[Strings.preserveDrawingBuffer] = preserveDrawingBuffer.jsValue + object[Strings.powerPreference] = powerPreference.jsValue + object[Strings.failIfMajorPerformanceCaveat] = failIfMajorPerformanceCaveat.jsValue + object[Strings.desynchronized] = desynchronized.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _depth = ReadWriteAttribute(jsObject: object, name: Strings.depth) + _stencil = ReadWriteAttribute(jsObject: object, name: Strings.stencil) + _antialias = ReadWriteAttribute(jsObject: object, name: Strings.antialias) + _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) + _preserveDrawingBuffer = ReadWriteAttribute(jsObject: object, name: Strings.preserveDrawingBuffer) + _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) + _failIfMajorPerformanceCaveat = ReadWriteAttribute(jsObject: object, name: Strings.failIfMajorPerformanceCaveat) + _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var alpha: Bool + + @ReadWriteAttribute + public var depth: Bool + + @ReadWriteAttribute + public var stencil: Bool + + @ReadWriteAttribute + public var antialias: Bool + + @ReadWriteAttribute + public var premultipliedAlpha: Bool + + @ReadWriteAttribute + public var preserveDrawingBuffer: Bool + + @ReadWriteAttribute + public var powerPreference: WebGLPowerPreference + + @ReadWriteAttribute + public var failIfMajorPerformanceCaveat: Bool + + @ReadWriteAttribute + public var desynchronized: Bool +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift new file mode 100644 index 00000000..20837070 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLContextEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _statusMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusMessage) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInit: WebGLContextEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInit?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var statusMessage: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift new file mode 100644 index 00000000..20c0c668 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLContextEventInit: BridgedDictionary { + public convenience init(statusMessage: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.statusMessage] = statusMessage.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _statusMessage = ReadWriteAttribute(jsObject: object, name: Strings.statusMessage) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var statusMessage: String +} diff --git a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift new file mode 100644 index 00000000..83d1af39 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLFramebuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLFramebuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLObject.swift b/Sources/DOMKit/WebIDL/WebGLObject.swift new file mode 100644 index 00000000..c50d37fc --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLObject.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLObject: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLObject].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift new file mode 100644 index 00000000..ce6b23f8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum WebGLPowerPreference: JSString, JSValueCompatible { + case `default` = "default" + case lowPower = "low-power" + case highPerformance = "high-performance" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/WebGLProgram.swift b/Sources/DOMKit/WebIDL/WebGLProgram.swift new file mode 100644 index 00000000..e38d4a93 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLProgram.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLProgram: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLProgram].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLQuery.swift b/Sources/DOMKit/WebIDL/WebGLQuery.swift new file mode 100644 index 00000000..901356e4 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLQuery.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLQuery: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLQuery].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift new file mode 100644 index 00000000..3b364894 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLRenderbuffer: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift new file mode 100644 index 00000000..f9919cbe --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLRenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGLRenderingContextOverloads { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderingContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift new file mode 100644 index 00000000..c0baf5db --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift @@ -0,0 +1,1217 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGLRenderingContextBase: JSBridgedClass {} +public extension WebGLRenderingContextBase { + @inlinable static var DEPTH_BUFFER_BIT: GLenum { 0x0000_0100 } + + @inlinable static var STENCIL_BUFFER_BIT: GLenum { 0x0000_0400 } + + @inlinable static var COLOR_BUFFER_BIT: GLenum { 0x0000_4000 } + + @inlinable static var POINTS: GLenum { 0x0000 } + + @inlinable static var LINES: GLenum { 0x0001 } + + @inlinable static var LINE_LOOP: GLenum { 0x0002 } + + @inlinable static var LINE_STRIP: GLenum { 0x0003 } + + @inlinable static var TRIANGLES: GLenum { 0x0004 } + + @inlinable static var TRIANGLE_STRIP: GLenum { 0x0005 } + + @inlinable static var TRIANGLE_FAN: GLenum { 0x0006 } + + @inlinable static var ZERO: GLenum { 0 } + + @inlinable static var ONE: GLenum { 1 } + + @inlinable static var SRC_COLOR: GLenum { 0x0300 } + + @inlinable static var ONE_MINUS_SRC_COLOR: GLenum { 0x0301 } + + @inlinable static var SRC_ALPHA: GLenum { 0x0302 } + + @inlinable static var ONE_MINUS_SRC_ALPHA: GLenum { 0x0303 } + + @inlinable static var DST_ALPHA: GLenum { 0x0304 } + + @inlinable static var ONE_MINUS_DST_ALPHA: GLenum { 0x0305 } + + @inlinable static var DST_COLOR: GLenum { 0x0306 } + + @inlinable static var ONE_MINUS_DST_COLOR: GLenum { 0x0307 } + + @inlinable static var SRC_ALPHA_SATURATE: GLenum { 0x0308 } + + @inlinable static var FUNC_ADD: GLenum { 0x8006 } + + @inlinable static var BLEND_EQUATION: GLenum { 0x8009 } + + @inlinable static var BLEND_EQUATION_RGB: GLenum { 0x8009 } + + @inlinable static var BLEND_EQUATION_ALPHA: GLenum { 0x883D } + + @inlinable static var FUNC_SUBTRACT: GLenum { 0x800A } + + @inlinable static var FUNC_REVERSE_SUBTRACT: GLenum { 0x800B } + + @inlinable static var BLEND_DST_RGB: GLenum { 0x80C8 } + + @inlinable static var BLEND_SRC_RGB: GLenum { 0x80C9 } + + @inlinable static var BLEND_DST_ALPHA: GLenum { 0x80CA } + + @inlinable static var BLEND_SRC_ALPHA: GLenum { 0x80CB } + + @inlinable static var CONSTANT_COLOR: GLenum { 0x8001 } + + @inlinable static var ONE_MINUS_CONSTANT_COLOR: GLenum { 0x8002 } + + @inlinable static var CONSTANT_ALPHA: GLenum { 0x8003 } + + @inlinable static var ONE_MINUS_CONSTANT_ALPHA: GLenum { 0x8004 } + + @inlinable static var BLEND_COLOR: GLenum { 0x8005 } + + @inlinable static var ARRAY_BUFFER: GLenum { 0x8892 } + + @inlinable static var ELEMENT_ARRAY_BUFFER: GLenum { 0x8893 } + + @inlinable static var ARRAY_BUFFER_BINDING: GLenum { 0x8894 } + + @inlinable static var ELEMENT_ARRAY_BUFFER_BINDING: GLenum { 0x8895 } + + @inlinable static var STREAM_DRAW: GLenum { 0x88E0 } + + @inlinable static var STATIC_DRAW: GLenum { 0x88E4 } + + @inlinable static var DYNAMIC_DRAW: GLenum { 0x88E8 } + + @inlinable static var BUFFER_SIZE: GLenum { 0x8764 } + + @inlinable static var BUFFER_USAGE: GLenum { 0x8765 } + + @inlinable static var CURRENT_VERTEX_ATTRIB: GLenum { 0x8626 } + + @inlinable static var FRONT: GLenum { 0x0404 } + + @inlinable static var BACK: GLenum { 0x0405 } + + @inlinable static var FRONT_AND_BACK: GLenum { 0x0408 } + + @inlinable static var CULL_FACE: GLenum { 0x0B44 } + + @inlinable static var BLEND: GLenum { 0x0BE2 } + + @inlinable static var DITHER: GLenum { 0x0BD0 } + + @inlinable static var STENCIL_TEST: GLenum { 0x0B90 } + + @inlinable static var DEPTH_TEST: GLenum { 0x0B71 } + + @inlinable static var SCISSOR_TEST: GLenum { 0x0C11 } + + @inlinable static var POLYGON_OFFSET_FILL: GLenum { 0x8037 } + + @inlinable static var SAMPLE_ALPHA_TO_COVERAGE: GLenum { 0x809E } + + @inlinable static var SAMPLE_COVERAGE: GLenum { 0x80A0 } + + @inlinable static var NO_ERROR: GLenum { 0 } + + @inlinable static var INVALID_ENUM: GLenum { 0x0500 } + + @inlinable static var INVALID_VALUE: GLenum { 0x0501 } + + @inlinable static var INVALID_OPERATION: GLenum { 0x0502 } + + @inlinable static var OUT_OF_MEMORY: GLenum { 0x0505 } + + @inlinable static var CW: GLenum { 0x0900 } + + @inlinable static var CCW: GLenum { 0x0901 } + + @inlinable static var LINE_WIDTH: GLenum { 0x0B21 } + + @inlinable static var ALIASED_POINT_SIZE_RANGE: GLenum { 0x846D } + + @inlinable static var ALIASED_LINE_WIDTH_RANGE: GLenum { 0x846E } + + @inlinable static var CULL_FACE_MODE: GLenum { 0x0B45 } + + @inlinable static var FRONT_FACE: GLenum { 0x0B46 } + + @inlinable static var DEPTH_RANGE: GLenum { 0x0B70 } + + @inlinable static var DEPTH_WRITEMASK: GLenum { 0x0B72 } + + @inlinable static var DEPTH_CLEAR_VALUE: GLenum { 0x0B73 } + + @inlinable static var DEPTH_FUNC: GLenum { 0x0B74 } + + @inlinable static var STENCIL_CLEAR_VALUE: GLenum { 0x0B91 } + + @inlinable static var STENCIL_FUNC: GLenum { 0x0B92 } + + @inlinable static var STENCIL_FAIL: GLenum { 0x0B94 } + + @inlinable static var STENCIL_PASS_DEPTH_FAIL: GLenum { 0x0B95 } + + @inlinable static var STENCIL_PASS_DEPTH_PASS: GLenum { 0x0B96 } + + @inlinable static var STENCIL_REF: GLenum { 0x0B97 } + + @inlinable static var STENCIL_VALUE_MASK: GLenum { 0x0B93 } + + @inlinable static var STENCIL_WRITEMASK: GLenum { 0x0B98 } + + @inlinable static var STENCIL_BACK_FUNC: GLenum { 0x8800 } + + @inlinable static var STENCIL_BACK_FAIL: GLenum { 0x8801 } + + @inlinable static var STENCIL_BACK_PASS_DEPTH_FAIL: GLenum { 0x8802 } + + @inlinable static var STENCIL_BACK_PASS_DEPTH_PASS: GLenum { 0x8803 } + + @inlinable static var STENCIL_BACK_REF: GLenum { 0x8CA3 } + + @inlinable static var STENCIL_BACK_VALUE_MASK: GLenum { 0x8CA4 } + + @inlinable static var STENCIL_BACK_WRITEMASK: GLenum { 0x8CA5 } + + @inlinable static var VIEWPORT: GLenum { 0x0BA2 } + + @inlinable static var SCISSOR_BOX: GLenum { 0x0C10 } + + @inlinable static var COLOR_CLEAR_VALUE: GLenum { 0x0C22 } + + @inlinable static var COLOR_WRITEMASK: GLenum { 0x0C23 } + + @inlinable static var UNPACK_ALIGNMENT: GLenum { 0x0CF5 } + + @inlinable static var PACK_ALIGNMENT: GLenum { 0x0D05 } + + @inlinable static var MAX_TEXTURE_SIZE: GLenum { 0x0D33 } + + @inlinable static var MAX_VIEWPORT_DIMS: GLenum { 0x0D3A } + + @inlinable static var SUBPIXEL_BITS: GLenum { 0x0D50 } + + @inlinable static var RED_BITS: GLenum { 0x0D52 } + + @inlinable static var GREEN_BITS: GLenum { 0x0D53 } + + @inlinable static var BLUE_BITS: GLenum { 0x0D54 } + + @inlinable static var ALPHA_BITS: GLenum { 0x0D55 } + + @inlinable static var DEPTH_BITS: GLenum { 0x0D56 } + + @inlinable static var STENCIL_BITS: GLenum { 0x0D57 } + + @inlinable static var POLYGON_OFFSET_UNITS: GLenum { 0x2A00 } + + @inlinable static var POLYGON_OFFSET_FACTOR: GLenum { 0x8038 } + + @inlinable static var TEXTURE_BINDING_2D: GLenum { 0x8069 } + + @inlinable static var SAMPLE_BUFFERS: GLenum { 0x80A8 } + + @inlinable static var SAMPLES: GLenum { 0x80A9 } + + @inlinable static var SAMPLE_COVERAGE_VALUE: GLenum { 0x80AA } + + @inlinable static var SAMPLE_COVERAGE_INVERT: GLenum { 0x80AB } + + @inlinable static var COMPRESSED_TEXTURE_FORMATS: GLenum { 0x86A3 } + + @inlinable static var DONT_CARE: GLenum { 0x1100 } + + @inlinable static var FASTEST: GLenum { 0x1101 } + + @inlinable static var NICEST: GLenum { 0x1102 } + + @inlinable static var GENERATE_MIPMAP_HINT: GLenum { 0x8192 } + + @inlinable static var BYTE: GLenum { 0x1400 } + + @inlinable static var UNSIGNED_BYTE: GLenum { 0x1401 } + + @inlinable static var SHORT: GLenum { 0x1402 } + + @inlinable static var UNSIGNED_SHORT: GLenum { 0x1403 } + + @inlinable static var INT: GLenum { 0x1404 } + + @inlinable static var UNSIGNED_INT: GLenum { 0x1405 } + + @inlinable static var FLOAT: GLenum { 0x1406 } + + @inlinable static var DEPTH_COMPONENT: GLenum { 0x1902 } + + @inlinable static var ALPHA: GLenum { 0x1906 } + + @inlinable static var RGB: GLenum { 0x1907 } + + @inlinable static var RGBA: GLenum { 0x1908 } + + @inlinable static var LUMINANCE: GLenum { 0x1909 } + + @inlinable static var LUMINANCE_ALPHA: GLenum { 0x190A } + + @inlinable static var UNSIGNED_SHORT_4_4_4_4: GLenum { 0x8033 } + + @inlinable static var UNSIGNED_SHORT_5_5_5_1: GLenum { 0x8034 } + + @inlinable static var UNSIGNED_SHORT_5_6_5: GLenum { 0x8363 } + + @inlinable static var FRAGMENT_SHADER: GLenum { 0x8B30 } + + @inlinable static var VERTEX_SHADER: GLenum { 0x8B31 } + + @inlinable static var MAX_VERTEX_ATTRIBS: GLenum { 0x8869 } + + @inlinable static var MAX_VERTEX_UNIFORM_VECTORS: GLenum { 0x8DFB } + + @inlinable static var MAX_VARYING_VECTORS: GLenum { 0x8DFC } + + @inlinable static var MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4D } + + @inlinable static var MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4C } + + @inlinable static var MAX_TEXTURE_IMAGE_UNITS: GLenum { 0x8872 } + + @inlinable static var MAX_FRAGMENT_UNIFORM_VECTORS: GLenum { 0x8DFD } + + @inlinable static var SHADER_TYPE: GLenum { 0x8B4F } + + @inlinable static var DELETE_STATUS: GLenum { 0x8B80 } + + @inlinable static var LINK_STATUS: GLenum { 0x8B82 } + + @inlinable static var VALIDATE_STATUS: GLenum { 0x8B83 } + + @inlinable static var ATTACHED_SHADERS: GLenum { 0x8B85 } + + @inlinable static var ACTIVE_UNIFORMS: GLenum { 0x8B86 } + + @inlinable static var ACTIVE_ATTRIBUTES: GLenum { 0x8B89 } + + @inlinable static var SHADING_LANGUAGE_VERSION: GLenum { 0x8B8C } + + @inlinable static var CURRENT_PROGRAM: GLenum { 0x8B8D } + + @inlinable static var NEVER: GLenum { 0x0200 } + + @inlinable static var LESS: GLenum { 0x0201 } + + @inlinable static var EQUAL: GLenum { 0x0202 } + + @inlinable static var LEQUAL: GLenum { 0x0203 } + + @inlinable static var GREATER: GLenum { 0x0204 } + + @inlinable static var NOTEQUAL: GLenum { 0x0205 } + + @inlinable static var GEQUAL: GLenum { 0x0206 } + + @inlinable static var ALWAYS: GLenum { 0x0207 } + + @inlinable static var KEEP: GLenum { 0x1E00 } + + @inlinable static var REPLACE: GLenum { 0x1E01 } + + @inlinable static var INCR: GLenum { 0x1E02 } + + @inlinable static var DECR: GLenum { 0x1E03 } + + @inlinable static var INVERT: GLenum { 0x150A } + + @inlinable static var INCR_WRAP: GLenum { 0x8507 } + + @inlinable static var DECR_WRAP: GLenum { 0x8508 } + + @inlinable static var VENDOR: GLenum { 0x1F00 } + + @inlinable static var RENDERER: GLenum { 0x1F01 } + + @inlinable static var VERSION: GLenum { 0x1F02 } + + @inlinable static var NEAREST: GLenum { 0x2600 } + + @inlinable static var LINEAR: GLenum { 0x2601 } + + @inlinable static var NEAREST_MIPMAP_NEAREST: GLenum { 0x2700 } + + @inlinable static var LINEAR_MIPMAP_NEAREST: GLenum { 0x2701 } + + @inlinable static var NEAREST_MIPMAP_LINEAR: GLenum { 0x2702 } + + @inlinable static var LINEAR_MIPMAP_LINEAR: GLenum { 0x2703 } + + @inlinable static var TEXTURE_MAG_FILTER: GLenum { 0x2800 } + + @inlinable static var TEXTURE_MIN_FILTER: GLenum { 0x2801 } + + @inlinable static var TEXTURE_WRAP_S: GLenum { 0x2802 } + + @inlinable static var TEXTURE_WRAP_T: GLenum { 0x2803 } + + @inlinable static var TEXTURE_2D: GLenum { 0x0DE1 } + + @inlinable static var TEXTURE: GLenum { 0x1702 } + + @inlinable static var TEXTURE_CUBE_MAP: GLenum { 0x8513 } + + @inlinable static var TEXTURE_BINDING_CUBE_MAP: GLenum { 0x8514 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_X: GLenum { 0x8515 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum { 0x8516 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum { 0x8517 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum { 0x8518 } + + @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum { 0x8519 } + + @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum { 0x851A } + + @inlinable static var MAX_CUBE_MAP_TEXTURE_SIZE: GLenum { 0x851C } + + @inlinable static var TEXTURE0: GLenum { 0x84C0 } + + @inlinable static var TEXTURE1: GLenum { 0x84C1 } + + @inlinable static var TEXTURE2: GLenum { 0x84C2 } + + @inlinable static var TEXTURE3: GLenum { 0x84C3 } + + @inlinable static var TEXTURE4: GLenum { 0x84C4 } + + @inlinable static var TEXTURE5: GLenum { 0x84C5 } + + @inlinable static var TEXTURE6: GLenum { 0x84C6 } + + @inlinable static var TEXTURE7: GLenum { 0x84C7 } + + @inlinable static var TEXTURE8: GLenum { 0x84C8 } + + @inlinable static var TEXTURE9: GLenum { 0x84C9 } + + @inlinable static var TEXTURE10: GLenum { 0x84CA } + + @inlinable static var TEXTURE11: GLenum { 0x84CB } + + @inlinable static var TEXTURE12: GLenum { 0x84CC } + + @inlinable static var TEXTURE13: GLenum { 0x84CD } + + @inlinable static var TEXTURE14: GLenum { 0x84CE } + + @inlinable static var TEXTURE15: GLenum { 0x84CF } + + @inlinable static var TEXTURE16: GLenum { 0x84D0 } + + @inlinable static var TEXTURE17: GLenum { 0x84D1 } + + @inlinable static var TEXTURE18: GLenum { 0x84D2 } + + @inlinable static var TEXTURE19: GLenum { 0x84D3 } + + @inlinable static var TEXTURE20: GLenum { 0x84D4 } + + @inlinable static var TEXTURE21: GLenum { 0x84D5 } + + @inlinable static var TEXTURE22: GLenum { 0x84D6 } + + @inlinable static var TEXTURE23: GLenum { 0x84D7 } + + @inlinable static var TEXTURE24: GLenum { 0x84D8 } + + @inlinable static var TEXTURE25: GLenum { 0x84D9 } + + @inlinable static var TEXTURE26: GLenum { 0x84DA } + + @inlinable static var TEXTURE27: GLenum { 0x84DB } + + @inlinable static var TEXTURE28: GLenum { 0x84DC } + + @inlinable static var TEXTURE29: GLenum { 0x84DD } + + @inlinable static var TEXTURE30: GLenum { 0x84DE } + + @inlinable static var TEXTURE31: GLenum { 0x84DF } + + @inlinable static var ACTIVE_TEXTURE: GLenum { 0x84E0 } + + @inlinable static var REPEAT: GLenum { 0x2901 } + + @inlinable static var CLAMP_TO_EDGE: GLenum { 0x812F } + + @inlinable static var MIRRORED_REPEAT: GLenum { 0x8370 } + + @inlinable static var FLOAT_VEC2: GLenum { 0x8B50 } + + @inlinable static var FLOAT_VEC3: GLenum { 0x8B51 } + + @inlinable static var FLOAT_VEC4: GLenum { 0x8B52 } + + @inlinable static var INT_VEC2: GLenum { 0x8B53 } + + @inlinable static var INT_VEC3: GLenum { 0x8B54 } + + @inlinable static var INT_VEC4: GLenum { 0x8B55 } + + @inlinable static var BOOL: GLenum { 0x8B56 } + + @inlinable static var BOOL_VEC2: GLenum { 0x8B57 } + + @inlinable static var BOOL_VEC3: GLenum { 0x8B58 } + + @inlinable static var BOOL_VEC4: GLenum { 0x8B59 } + + @inlinable static var FLOAT_MAT2: GLenum { 0x8B5A } + + @inlinable static var FLOAT_MAT3: GLenum { 0x8B5B } + + @inlinable static var FLOAT_MAT4: GLenum { 0x8B5C } + + @inlinable static var SAMPLER_2D: GLenum { 0x8B5E } + + @inlinable static var SAMPLER_CUBE: GLenum { 0x8B60 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_ENABLED: GLenum { 0x8622 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_SIZE: GLenum { 0x8623 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_STRIDE: GLenum { 0x8624 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_TYPE: GLenum { 0x8625 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum { 0x886A } + + @inlinable static var VERTEX_ATTRIB_ARRAY_POINTER: GLenum { 0x8645 } + + @inlinable static var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum { 0x889F } + + @inlinable static var IMPLEMENTATION_COLOR_READ_TYPE: GLenum { 0x8B9A } + + @inlinable static var IMPLEMENTATION_COLOR_READ_FORMAT: GLenum { 0x8B9B } + + @inlinable static var COMPILE_STATUS: GLenum { 0x8B81 } + + @inlinable static var LOW_FLOAT: GLenum { 0x8DF0 } + + @inlinable static var MEDIUM_FLOAT: GLenum { 0x8DF1 } + + @inlinable static var HIGH_FLOAT: GLenum { 0x8DF2 } + + @inlinable static var LOW_INT: GLenum { 0x8DF3 } + + @inlinable static var MEDIUM_INT: GLenum { 0x8DF4 } + + @inlinable static var HIGH_INT: GLenum { 0x8DF5 } + + @inlinable static var FRAMEBUFFER: GLenum { 0x8D40 } + + @inlinable static var RENDERBUFFER: GLenum { 0x8D41 } + + @inlinable static var RGBA4: GLenum { 0x8056 } + + @inlinable static var RGB5_A1: GLenum { 0x8057 } + + @inlinable static var RGB565: GLenum { 0x8D62 } + + @inlinable static var DEPTH_COMPONENT16: GLenum { 0x81A5 } + + @inlinable static var STENCIL_INDEX8: GLenum { 0x8D48 } + + @inlinable static var DEPTH_STENCIL: GLenum { 0x84F9 } + + @inlinable static var RENDERBUFFER_WIDTH: GLenum { 0x8D42 } + + @inlinable static var RENDERBUFFER_HEIGHT: GLenum { 0x8D43 } + + @inlinable static var RENDERBUFFER_INTERNAL_FORMAT: GLenum { 0x8D44 } + + @inlinable static var RENDERBUFFER_RED_SIZE: GLenum { 0x8D50 } + + @inlinable static var RENDERBUFFER_GREEN_SIZE: GLenum { 0x8D51 } + + @inlinable static var RENDERBUFFER_BLUE_SIZE: GLenum { 0x8D52 } + + @inlinable static var RENDERBUFFER_ALPHA_SIZE: GLenum { 0x8D53 } + + @inlinable static var RENDERBUFFER_DEPTH_SIZE: GLenum { 0x8D54 } + + @inlinable static var RENDERBUFFER_STENCIL_SIZE: GLenum { 0x8D55 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum { 0x8CD0 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum { 0x8CD1 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum { 0x8CD2 } + + @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum { 0x8CD3 } + + @inlinable static var COLOR_ATTACHMENT0: GLenum { 0x8CE0 } + + @inlinable static var DEPTH_ATTACHMENT: GLenum { 0x8D00 } + + @inlinable static var STENCIL_ATTACHMENT: GLenum { 0x8D20 } + + @inlinable static var DEPTH_STENCIL_ATTACHMENT: GLenum { 0x821A } + + @inlinable static var NONE: GLenum { 0 } + + @inlinable static var FRAMEBUFFER_COMPLETE: GLenum { 0x8CD5 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum { 0x8CD6 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum { 0x8CD7 } + + @inlinable static var FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum { 0x8CD9 } + + @inlinable static var FRAMEBUFFER_UNSUPPORTED: GLenum { 0x8CDD } + + @inlinable static var FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } + + @inlinable static var RENDERBUFFER_BINDING: GLenum { 0x8CA7 } + + @inlinable static var MAX_RENDERBUFFER_SIZE: GLenum { 0x84E8 } + + @inlinable static var INVALID_FRAMEBUFFER_OPERATION: GLenum { 0x0506 } + + @inlinable static var UNPACK_FLIP_Y_WEBGL: GLenum { 0x9240 } + + @inlinable static var UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum { 0x9241 } + + @inlinable static var CONTEXT_LOST_WEBGL: GLenum { 0x9242 } + + @inlinable static var UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum { 0x9243 } + + @inlinable static var BROWSER_DEFAULT_WEBGL: GLenum { 0x9244 } + + @inlinable var canvas: HTMLCanvasElement_or_OffscreenCanvas { ReadonlyAttribute[Strings.canvas, in: jsObject] } + + @inlinable var drawingBufferWidth: GLsizei { ReadonlyAttribute[Strings.drawingBufferWidth, in: jsObject] } + + @inlinable var drawingBufferHeight: GLsizei { ReadonlyAttribute[Strings.drawingBufferHeight, in: jsObject] } + + @inlinable func getContextAttributes() -> WebGLContextAttributes? { + let this = jsObject + return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func isContextLost() -> Bool { + let this = jsObject + return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getSupportedExtensions() -> [String]? { + let this = jsObject + return this[Strings.getSupportedExtensions].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getExtension(name: String) -> JSObject? { + let this = jsObject + return this[Strings.getExtension].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable func activeTexture(texture: GLenum) { + let this = jsObject + _ = this[Strings.activeTexture].function!(this: this, arguments: [texture.jsValue]) + } + + @inlinable func attachShader(program: WebGLProgram, shader: WebGLShader) { + let this = jsObject + _ = this[Strings.attachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) + } + + @inlinable func bindAttribLocation(program: WebGLProgram, index: GLuint, name: String) { + let this = jsObject + _ = this[Strings.bindAttribLocation].function!(this: this, arguments: [program.jsValue, index.jsValue, name.jsValue]) + } + + @inlinable func bindBuffer(target: GLenum, buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.bindBuffer].function!(this: this, arguments: [target.jsValue, buffer.jsValue]) + } + + @inlinable func bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer?) { + let this = jsObject + _ = this[Strings.bindFramebuffer].function!(this: this, arguments: [target.jsValue, framebuffer.jsValue]) + } + + @inlinable func bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.bindRenderbuffer].function!(this: this, arguments: [target.jsValue, renderbuffer.jsValue]) + } + + @inlinable func bindTexture(target: GLenum, texture: WebGLTexture?) { + let this = jsObject + _ = this[Strings.bindTexture].function!(this: this, arguments: [target.jsValue, texture.jsValue]) + } + + @inlinable func blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { + let this = jsObject + _ = this[Strings.blendColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func blendEquation(mode: GLenum) { + let this = jsObject + _ = this[Strings.blendEquation].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) { + let this = jsObject + _ = this[Strings.blendEquationSeparate].function!(this: this, arguments: [modeRGB.jsValue, modeAlpha.jsValue]) + } + + @inlinable func blendFunc(sfactor: GLenum, dfactor: GLenum) { + let this = jsObject + _ = this[Strings.blendFunc].function!(this: this, arguments: [sfactor.jsValue, dfactor.jsValue]) + } + + @inlinable func blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) { + let this = jsObject + _ = this[Strings.blendFuncSeparate].function!(this: this, arguments: [srcRGB.jsValue, dstRGB.jsValue, srcAlpha.jsValue, dstAlpha.jsValue]) + } + + @inlinable func checkFramebufferStatus(target: GLenum) -> GLenum { + let this = jsObject + return this[Strings.checkFramebufferStatus].function!(this: this, arguments: [target.jsValue]).fromJSValue()! + } + + @inlinable func clear(mask: GLbitfield) { + let this = jsObject + _ = this[Strings.clear].function!(this: this, arguments: [mask.jsValue]) + } + + @inlinable func clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { + let this = jsObject + _ = this[Strings.clearColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func clearDepth(depth: GLclampf) { + let this = jsObject + _ = this[Strings.clearDepth].function!(this: this, arguments: [depth.jsValue]) + } + + @inlinable func clearStencil(s: GLint) { + let this = jsObject + _ = this[Strings.clearStencil].function!(this: this, arguments: [s.jsValue]) + } + + @inlinable func colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) { + let this = jsObject + _ = this[Strings.colorMask].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) + } + + @inlinable func compileShader(shader: WebGLShader) { + let this = jsObject + _ = this[Strings.compileShader].function!(this: this, arguments: [shader.jsValue]) + } + + @inlinable func copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = x.jsValue + let _arg4 = y.jsValue + let _arg5 = width.jsValue + let _arg6 = height.jsValue + let _arg7 = border.jsValue + let this = jsObject + _ = this[Strings.copyTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let _arg6 = width.jsValue + let _arg7 = height.jsValue + let this = jsObject + _ = this[Strings.copyTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func createBuffer() -> WebGLBuffer? { + let this = jsObject + return this[Strings.createBuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createFramebuffer() -> WebGLFramebuffer? { + let this = jsObject + return this[Strings.createFramebuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createProgram() -> WebGLProgram? { + let this = jsObject + return this[Strings.createProgram].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createRenderbuffer() -> WebGLRenderbuffer? { + let this = jsObject + return this[Strings.createRenderbuffer].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func createShader(type: GLenum) -> WebGLShader? { + let this = jsObject + return this[Strings.createShader].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @inlinable func createTexture() -> WebGLTexture? { + let this = jsObject + return this[Strings.createTexture].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func cullFace(mode: GLenum) { + let this = jsObject + _ = this[Strings.cullFace].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func deleteBuffer(buffer: WebGLBuffer?) { + let this = jsObject + _ = this[Strings.deleteBuffer].function!(this: this, arguments: [buffer.jsValue]) + } + + @inlinable func deleteFramebuffer(framebuffer: WebGLFramebuffer?) { + let this = jsObject + _ = this[Strings.deleteFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]) + } + + @inlinable func deleteProgram(program: WebGLProgram?) { + let this = jsObject + _ = this[Strings.deleteProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.deleteRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]) + } + + @inlinable func deleteShader(shader: WebGLShader?) { + let this = jsObject + _ = this[Strings.deleteShader].function!(this: this, arguments: [shader.jsValue]) + } + + @inlinable func deleteTexture(texture: WebGLTexture?) { + let this = jsObject + _ = this[Strings.deleteTexture].function!(this: this, arguments: [texture.jsValue]) + } + + @inlinable func depthFunc(func: GLenum) { + let this = jsObject + _ = this[Strings.depthFunc].function!(this: this, arguments: [`func`.jsValue]) + } + + @inlinable func depthMask(flag: GLboolean) { + let this = jsObject + _ = this[Strings.depthMask].function!(this: this, arguments: [flag.jsValue]) + } + + @inlinable func depthRange(zNear: GLclampf, zFar: GLclampf) { + let this = jsObject + _ = this[Strings.depthRange].function!(this: this, arguments: [zNear.jsValue, zFar.jsValue]) + } + + @inlinable func detachShader(program: WebGLProgram, shader: WebGLShader) { + let this = jsObject + _ = this[Strings.detachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) + } + + @inlinable func disable(cap: GLenum) { + let this = jsObject + _ = this[Strings.disable].function!(this: this, arguments: [cap.jsValue]) + } + + @inlinable func disableVertexAttribArray(index: GLuint) { + let this = jsObject + _ = this[Strings.disableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable func drawArrays(mode: GLenum, first: GLint, count: GLsizei) { + let this = jsObject + _ = this[Strings.drawArrays].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue]) + } + + @inlinable func drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) { + let this = jsObject + _ = this[Strings.drawElements].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue]) + } + + @inlinable func enable(cap: GLenum) { + let this = jsObject + _ = this[Strings.enable].function!(this: this, arguments: [cap.jsValue]) + } + + @inlinable func enableVertexAttribArray(index: GLuint) { + let this = jsObject + _ = this[Strings.enableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) + } + + @inlinable func finish() { + let this = jsObject + _ = this[Strings.finish].function!(this: this, arguments: []) + } + + @inlinable func flush() { + let this = jsObject + _ = this[Strings.flush].function!(this: this, arguments: []) + } + + @inlinable func framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer?) { + let this = jsObject + _ = this[Strings.framebufferRenderbuffer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, renderbuffertarget.jsValue, renderbuffer.jsValue]) + } + + @inlinable func framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture?, level: GLint) { + let this = jsObject + _ = this[Strings.framebufferTexture2D].function!(this: this, arguments: [target.jsValue, attachment.jsValue, textarget.jsValue, texture.jsValue, level.jsValue]) + } + + @inlinable func frontFace(mode: GLenum) { + let this = jsObject + _ = this[Strings.frontFace].function!(this: this, arguments: [mode.jsValue]) + } + + @inlinable func generateMipmap(target: GLenum) { + let this = jsObject + _ = this[Strings.generateMipmap].function!(this: this, arguments: [target.jsValue]) + } + + @inlinable func getActiveAttrib(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getActiveAttrib].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getActiveUniform(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { + let this = jsObject + return this[Strings.getActiveUniform].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! + } + + @inlinable func getAttachedShaders(program: WebGLProgram) -> [WebGLShader]? { + let this = jsObject + return this[Strings.getAttachedShaders].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func getAttribLocation(program: WebGLProgram, name: String) -> GLint { + let this = jsObject + return this[Strings.getAttribLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func getBufferParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getBufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getParameter(pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getParameter].function!(this: this, arguments: [pname.jsValue]).fromJSValue()! + } + + @inlinable func getError() -> GLenum { + let this = jsObject + return this[Strings.getError].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getFramebufferAttachmentParameter].function!(this: this, arguments: [target.jsValue, attachment.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getProgramParameter(program: WebGLProgram, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getProgramParameter].function!(this: this, arguments: [program.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getProgramInfoLog(program: WebGLProgram) -> String? { + let this = jsObject + return this[Strings.getProgramInfoLog].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func getRenderbufferParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getRenderbufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getShaderParameter(shader: WebGLShader, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getShaderParameter].function!(this: this, arguments: [shader.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) -> WebGLShaderPrecisionFormat? { + let this = jsObject + return this[Strings.getShaderPrecisionFormat].function!(this: this, arguments: [shadertype.jsValue, precisiontype.jsValue]).fromJSValue()! + } + + @inlinable func getShaderInfoLog(shader: WebGLShader) -> String? { + let this = jsObject + return this[Strings.getShaderInfoLog].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func getShaderSource(shader: WebGLShader) -> String? { + let this = jsObject + return this[Strings.getShaderSource].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func getTexParameter(target: GLenum, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getTexParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getUniform(program: WebGLProgram, location: WebGLUniformLocation) -> JSValue { + let this = jsObject + return this[Strings.getUniform].function!(this: this, arguments: [program.jsValue, location.jsValue]).fromJSValue()! + } + + @inlinable func getUniformLocation(program: WebGLProgram, name: String) -> WebGLUniformLocation? { + let this = jsObject + return this[Strings.getUniformLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! + } + + @inlinable func getVertexAttrib(index: GLuint, pname: GLenum) -> JSValue { + let this = jsObject + return this[Strings.getVertexAttrib].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func getVertexAttribOffset(index: GLuint, pname: GLenum) -> GLintptr { + let this = jsObject + return this[Strings.getVertexAttribOffset].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! + } + + @inlinable func hint(target: GLenum, mode: GLenum) { + let this = jsObject + _ = this[Strings.hint].function!(this: this, arguments: [target.jsValue, mode.jsValue]) + } + + @inlinable func isBuffer(buffer: WebGLBuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isBuffer].function!(this: this, arguments: [buffer.jsValue]).fromJSValue()! + } + + @inlinable func isEnabled(cap: GLenum) -> GLboolean { + let this = jsObject + return this[Strings.isEnabled].function!(this: this, arguments: [cap.jsValue]).fromJSValue()! + } + + @inlinable func isFramebuffer(framebuffer: WebGLFramebuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]).fromJSValue()! + } + + @inlinable func isProgram(program: WebGLProgram?) -> GLboolean { + let this = jsObject + return this[Strings.isProgram].function!(this: this, arguments: [program.jsValue]).fromJSValue()! + } + + @inlinable func isRenderbuffer(renderbuffer: WebGLRenderbuffer?) -> GLboolean { + let this = jsObject + return this[Strings.isRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]).fromJSValue()! + } + + @inlinable func isShader(shader: WebGLShader?) -> GLboolean { + let this = jsObject + return this[Strings.isShader].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! + } + + @inlinable func isTexture(texture: WebGLTexture?) -> GLboolean { + let this = jsObject + return this[Strings.isTexture].function!(this: this, arguments: [texture.jsValue]).fromJSValue()! + } + + @inlinable func lineWidth(width: GLfloat) { + let this = jsObject + _ = this[Strings.lineWidth].function!(this: this, arguments: [width.jsValue]) + } + + @inlinable func linkProgram(program: WebGLProgram) { + let this = jsObject + _ = this[Strings.linkProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func pixelStorei(pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.pixelStorei].function!(this: this, arguments: [pname.jsValue, param.jsValue]) + } + + @inlinable func polygonOffset(factor: GLfloat, units: GLfloat) { + let this = jsObject + _ = this[Strings.polygonOffset].function!(this: this, arguments: [factor.jsValue, units.jsValue]) + } + + @inlinable func renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.renderbufferStorage].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func sampleCoverage(value: GLclampf, invert: GLboolean) { + let this = jsObject + _ = this[Strings.sampleCoverage].function!(this: this, arguments: [value.jsValue, invert.jsValue]) + } + + @inlinable func scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.scissor].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable func shaderSource(shader: WebGLShader, source: String) { + let this = jsObject + _ = this[Strings.shaderSource].function!(this: this, arguments: [shader.jsValue, source.jsValue]) + } + + @inlinable func stencilFunc(func: GLenum, ref: GLint, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilFunc].function!(this: this, arguments: [`func`.jsValue, ref.jsValue, mask.jsValue]) + } + + @inlinable func stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilFuncSeparate].function!(this: this, arguments: [face.jsValue, `func`.jsValue, ref.jsValue, mask.jsValue]) + } + + @inlinable func stencilMask(mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilMask].function!(this: this, arguments: [mask.jsValue]) + } + + @inlinable func stencilMaskSeparate(face: GLenum, mask: GLuint) { + let this = jsObject + _ = this[Strings.stencilMaskSeparate].function!(this: this, arguments: [face.jsValue, mask.jsValue]) + } + + @inlinable func stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) { + let this = jsObject + _ = this[Strings.stencilOp].function!(this: this, arguments: [fail.jsValue, zfail.jsValue, zpass.jsValue]) + } + + @inlinable func stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) { + let this = jsObject + _ = this[Strings.stencilOpSeparate].function!(this: this, arguments: [face.jsValue, fail.jsValue, zfail.jsValue, zpass.jsValue]) + } + + @inlinable func texParameterf(target: GLenum, pname: GLenum, param: GLfloat) { + let this = jsObject + _ = this[Strings.texParameterf].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func texParameteri(target: GLenum, pname: GLenum, param: GLint) { + let this = jsObject + _ = this[Strings.texParameteri].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) + } + + @inlinable func uniform1f(location: WebGLUniformLocation?, x: GLfloat) { + let this = jsObject + _ = this[Strings.uniform1f].function!(this: this, arguments: [location.jsValue, x.jsValue]) + } + + @inlinable func uniform2f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat) { + let this = jsObject + _ = this[Strings.uniform2f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func uniform3f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat) { + let this = jsObject + _ = this[Strings.uniform3f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func uniform4f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { + let this = jsObject + _ = this[Strings.uniform4f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func uniform1i(location: WebGLUniformLocation?, x: GLint) { + let this = jsObject + _ = this[Strings.uniform1i].function!(this: this, arguments: [location.jsValue, x.jsValue]) + } + + @inlinable func uniform2i(location: WebGLUniformLocation?, x: GLint, y: GLint) { + let this = jsObject + _ = this[Strings.uniform2i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func uniform3i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint) { + let this = jsObject + _ = this[Strings.uniform3i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func uniform4i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint, w: GLint) { + let this = jsObject + _ = this[Strings.uniform4i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func useProgram(program: WebGLProgram?) { + let this = jsObject + _ = this[Strings.useProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func validateProgram(program: WebGLProgram) { + let this = jsObject + _ = this[Strings.validateProgram].function!(this: this, arguments: [program.jsValue]) + } + + @inlinable func vertexAttrib1f(index: GLuint, x: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib1f].function!(this: this, arguments: [index.jsValue, x.jsValue]) + } + + @inlinable func vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib2f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue]) + } + + @inlinable func vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib3f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue]) + } + + @inlinable func vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { + let this = jsObject + _ = this[Strings.vertexAttrib4f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) + } + + @inlinable func vertexAttrib1fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib1fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib2fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib2fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib3fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib3fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttrib4fv(index: GLuint, values: Float32List) { + let this = jsObject + _ = this[Strings.vertexAttrib4fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) + } + + @inlinable func vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) { + let _arg0 = index.jsValue + let _arg1 = size.jsValue + let _arg2 = type.jsValue + let _arg3 = normalized.jsValue + let _arg4 = stride.jsValue + let _arg5 = offset.jsValue + let this = jsObject + _ = this[Strings.vertexAttribPointer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { + let this = jsObject + _ = this[Strings.viewport].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift new file mode 100644 index 00000000..fe1977ac --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift @@ -0,0 +1,165 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol WebGLRenderingContextOverloads: JSBridgedClass {} +public extension WebGLRenderingContextOverloads { + @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) + } + + @inlinable func bufferData(target: GLenum, data: BufferSource?, usage: GLenum) { + let this = jsObject + _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, data.jsValue, usage.jsValue]) + } + + @inlinable func bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) { + let this = jsObject + _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, offset.jsValue, data.jsValue]) + } + + @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = data.jsValue + let this = jsObject + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = data.jsValue + let this = jsObject + _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } + + @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = pixels.jsValue + let this = jsObject + _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = width.jsValue + let _arg4 = height.jsValue + let _arg5 = border.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = internalformat.jsValue + let _arg3 = format.jsValue + let _arg4 = type.jsValue + let _arg5 = source.jsValue + let this = jsObject + _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = width.jsValue + let _arg5 = height.jsValue + let _arg6 = format.jsValue + let _arg7 = type.jsValue + let _arg8 = pixels.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + } + + @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { + let _arg0 = target.jsValue + let _arg1 = level.jsValue + let _arg2 = xoffset.jsValue + let _arg3 = yoffset.jsValue + let _arg4 = format.jsValue + let _arg5 = type.jsValue + let _arg6 = source.jsValue + let this = jsObject + _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + } + + @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } + + @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } + + @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } + + @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { + let this = jsObject + _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLSampler.swift b/Sources/DOMKit/WebIDL/WebGLSampler.swift new file mode 100644 index 00000000..1b6c94e3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLSampler.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLSampler: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSampler].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLShader.swift b/Sources/DOMKit/WebIDL/WebGLShader.swift new file mode 100644 index 00000000..97f2b719 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLShader.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLShader: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift new file mode 100644 index 00000000..67725e58 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift @@ -0,0 +1,26 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLShaderPrecisionFormat: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLShaderPrecisionFormat].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _rangeMin = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMin) + _rangeMax = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMax) + _precision = ReadonlyAttribute(jsObject: jsObject, name: Strings.precision) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var rangeMin: GLint + + @ReadonlyAttribute + public var rangeMax: GLint + + @ReadonlyAttribute + public var precision: GLint +} diff --git a/Sources/DOMKit/WebIDL/WebGLSync.swift b/Sources/DOMKit/WebIDL/WebGLSync.swift new file mode 100644 index 00000000..38271eb1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLSync.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLSync: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSync].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLTexture.swift b/Sources/DOMKit/WebIDL/WebGLTexture.swift new file mode 100644 index 00000000..ee7ad6c9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLTexture.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLTexture: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift b/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift new file mode 100644 index 00000000..981c92d1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLTransformFeedback: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTransformFeedback].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift new file mode 100644 index 00000000..cf833a95 --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift @@ -0,0 +1,14 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLUniformLocation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} diff --git a/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift b/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift new file mode 100644 index 00000000..2ca909eb --- /dev/null +++ b/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift @@ -0,0 +1,12 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class WebGLVertexArrayObject: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLVertexArrayObject].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} diff --git a/Sources/DOMKit/WebIDL/console.swift b/Sources/DOMKit/WebIDL/console.swift new file mode 100644 index 00000000..d61e67e0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/console.swift @@ -0,0 +1,105 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum console { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.console].object! + } + + @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func clear() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.clear].function!(this: this, arguments: []) + } + + @inlinable public static func debug(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func error(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func info(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func log(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) + } + + @inlinable public static func trace(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func warn(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) + } + + @inlinable public static func dirxml(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func count(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func countReset(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func group(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupCollapsed(data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) + } + + @inlinable public static func groupEnd() { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.groupEnd].function!(this: this, arguments: []) + } + + @inlinable public static func time(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } + + @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) + } + + @inlinable public static func timeEnd(label: String? = nil) { + let this = JSObject.global[Strings.console].object! + _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) + } +} diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index ab6f2899..d56c79ee 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -7,7 +7,6 @@ enum IDLBuilder { import JavaScriptKit import JavaScriptEventLoop - import JavaScriptBigIntSupport \n """ From 9e726621b28b74e27a07aaf8e228d92fff313bf7 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:10:01 +0100 Subject: [PATCH 14/18] Regenerate with older JSKit --- Sources/DOMKit/WebIDL/AlphaOption.swift | 22 - Sources/DOMKit/WebIDL/AudioData.swift | 62 - .../WebIDL/AudioDataCopyToOptions.swift | 35 - Sources/DOMKit/WebIDL/AudioDataInit.swift | 45 - Sources/DOMKit/WebIDL/AudioDecoder.swift | 70 - .../DOMKit/WebIDL/AudioDecoderConfig.swift | 35 - Sources/DOMKit/WebIDL/AudioDecoderInit.swift | 25 - .../DOMKit/WebIDL/AudioDecoderSupport.swift | 25 - Sources/DOMKit/WebIDL/AudioEncoder.swift | 70 - .../DOMKit/WebIDL/AudioEncoderConfig.swift | 35 - Sources/DOMKit/WebIDL/AudioEncoderInit.swift | 25 - .../DOMKit/WebIDL/AudioEncoderSupport.swift | 25 - Sources/DOMKit/WebIDL/AudioSampleFormat.swift | 28 - Sources/DOMKit/WebIDL/BitrateMode.swift | 22 - Sources/DOMKit/WebIDL/BlobEvent.swift | 24 - Sources/DOMKit/WebIDL/BlobEventInit.swift | 25 - .../Bool_or_MediaTrackConstraints.swift | 46 - .../Bool_or_ScrollIntoViewOptions.swift | 46 - Sources/DOMKit/WebIDL/BoxQuadOptions.swift | 25 - Sources/DOMKit/WebIDL/CSSBoxType.swift | 24 - Sources/DOMKit/WebIDL/CSSPseudoElement.swift | 29 - .../WebIDL/CSSPseudoElement_or_Element.swift | 46 - .../CameraDevicePermissionDescriptor.swift | 20 - Sources/DOMKit/WebIDL/CaretPosition.swift | 27 - Sources/DOMKit/WebIDL/CodecState.swift | 23 - Sources/DOMKit/WebIDL/ConstrainBoolean.swift | 46 - .../WebIDL/ConstrainBooleanParameters.swift | 25 - .../DOMKit/WebIDL/ConstrainDOMString.swift | 60 - .../WebIDL/ConstrainDOMStringParameters.swift | 25 - Sources/DOMKit/WebIDL/ConstrainDouble.swift | 46 - .../DOMKit/WebIDL/ConstrainDoubleRange.swift | 25 - Sources/DOMKit/WebIDL/ConstrainULong.swift | 46 - .../DOMKit/WebIDL/ConstrainULongRange.swift | 25 - .../WebIDL/ConvertCoordinateOptions.swift | 25 - .../WebIDL/DevicePermissionDescriptor.swift | 20 - Sources/DOMKit/WebIDL/DoubleRange.swift | 25 - Sources/DOMKit/WebIDL/EncodedAudioChunk.swift | 39 - .../DOMKit/WebIDL/EncodedAudioChunkInit.swift | 35 - .../WebIDL/EncodedAudioChunkMetadata.swift | 20 - .../DOMKit/WebIDL/EncodedAudioChunkType.swift | 22 - Sources/DOMKit/WebIDL/EncodedVideoChunk.swift | 39 - .../DOMKit/WebIDL/EncodedVideoChunkInit.swift | 35 - .../WebIDL/EncodedVideoChunkMetadata.swift | 30 - .../DOMKit/WebIDL/EncodedVideoChunkType.swift | 22 - Sources/DOMKit/WebIDL/Float32List.swift | 46 - Sources/DOMKit/WebIDL/GeometryNode.swift | 74 - Sources/DOMKit/WebIDL/GeometryUtils.swift | 27 - .../DOMKit/WebIDL/HardwareAcceleration.swift | 23 - Sources/DOMKit/WebIDL/ImageBufferSource.swift | 46 - .../DOMKit/WebIDL/ImageDecodeOptions.swift | 25 - Sources/DOMKit/WebIDL/ImageDecodeResult.swift | 25 - Sources/DOMKit/WebIDL/ImageDecoder.swift | 68 - Sources/DOMKit/WebIDL/ImageDecoderInit.swift | 50 - Sources/DOMKit/WebIDL/ImageTrack.swift | 32 - Sources/DOMKit/WebIDL/ImageTrackList.swift | 34 - Sources/DOMKit/WebIDL/InputDeviceInfo.swift | 17 - Sources/DOMKit/WebIDL/Int32List.swift | 46 - Sources/DOMKit/WebIDL/IsVisibleOptions.swift | 16 - Sources/DOMKit/WebIDL/LatencyMode.swift | 22 - Sources/DOMKit/WebIDL/MediaDeviceInfo.swift | 35 - Sources/DOMKit/WebIDL/MediaDeviceKind.swift | 23 - Sources/DOMKit/WebIDL/MediaDevices.swift | 45 - Sources/DOMKit/WebIDL/MediaQueryList.swift | 28 - .../DOMKit/WebIDL/MediaQueryListEvent.swift | 24 - .../WebIDL/MediaQueryListEventInit.swift | 25 - Sources/DOMKit/WebIDL/MediaRecorder.swift | 94 -- .../WebIDL/MediaRecorderErrorEvent.swift | 20 - .../WebIDL/MediaRecorderErrorEventInit.swift | 20 - .../DOMKit/WebIDL/MediaRecorderOptions.swift | 40 - Sources/DOMKit/WebIDL/MediaStream.swift | 75 - .../WebIDL/MediaStreamConstraints.swift | 25 - Sources/DOMKit/WebIDL/MediaStreamTrack.swift | 85 -- .../DOMKit/WebIDL/MediaStreamTrackEvent.swift | 20 - .../WebIDL/MediaStreamTrackEventInit.swift | 20 - .../DOMKit/WebIDL/MediaStreamTrackState.swift | 22 - .../WebIDL/MediaTrackCapabilities.swift | 90 -- .../WebIDL/MediaTrackConstraintSet.swift | 90 -- .../DOMKit/WebIDL/MediaTrackConstraints.swift | 20 - .../DOMKit/WebIDL/MediaTrackSettings.swift | 90 -- .../MediaTrackSupportedConstraints.swift | 90 -- .../DOMKit/WebIDL/OverconstrainedError.swift | 20 - Sources/DOMKit/WebIDL/PlaneLayout.swift | 25 - Sources/DOMKit/WebIDL/RecordingState.swift | 23 - Sources/DOMKit/WebIDL/Screen.swift | 38 - Sources/DOMKit/WebIDL/ScrollBehavior.swift | 22 - .../DOMKit/WebIDL/ScrollIntoViewOptions.swift | 25 - .../DOMKit/WebIDL/ScrollLogicalPosition.swift | 24 - Sources/DOMKit/WebIDL/ScrollOptions.swift | 20 - Sources/DOMKit/WebIDL/ScrollToOptions.swift | 25 - Sources/DOMKit/WebIDL/SvcOutputMetadata.swift | 20 - Sources/DOMKit/WebIDL/TexImageSource.swift | 116 -- Sources/DOMKit/WebIDL/ULongRange.swift | 25 - Sources/DOMKit/WebIDL/Uint32List.swift | 46 - .../DOMKit/WebIDL/VideoColorPrimaries.swift | 23 - Sources/DOMKit/WebIDL/VideoColorSpace.swift | 39 - .../DOMKit/WebIDL/VideoColorSpaceInit.swift | 35 - Sources/DOMKit/WebIDL/VideoDecoder.swift | 70 - .../DOMKit/WebIDL/VideoDecoderConfig.swift | 60 - Sources/DOMKit/WebIDL/VideoDecoderInit.swift | 25 - .../DOMKit/WebIDL/VideoDecoderSupport.swift | 25 - Sources/DOMKit/WebIDL/VideoEncoder.swift | 70 - .../DOMKit/WebIDL/VideoEncoderConfig.swift | 75 - .../WebIDL/VideoEncoderEncodeOptions.swift | 20 - Sources/DOMKit/WebIDL/VideoEncoderInit.swift | 25 - .../DOMKit/WebIDL/VideoEncoderSupport.swift | 25 - .../DOMKit/WebIDL/VideoFacingModeEnum.swift | 24 - Sources/DOMKit/WebIDL/VideoFrame.swift | 89 -- .../DOMKit/WebIDL/VideoFrameBufferInit.swift | 65 - .../WebIDL/VideoFrameCopyToOptions.swift | 25 - Sources/DOMKit/WebIDL/VideoFrameInit.swift | 45 - .../WebIDL/VideoMatrixCoefficients.swift | 24 - Sources/DOMKit/WebIDL/VideoPixelFormat.swift | 29 - .../DOMKit/WebIDL/VideoResizeModeEnum.swift | 22 - .../WebIDL/VideoTransferCharacteristics.swift | 23 - .../WebIDL/WebGL2RenderingContext.swift | 14 - .../WebIDL/WebGL2RenderingContextBase.swift | 1162 ---------------- .../WebGL2RenderingContextOverloads.swift | 317 ----- Sources/DOMKit/WebIDL/WebGLActiveInfo.swift | 26 - Sources/DOMKit/WebIDL/WebGLBuffer.swift | 12 - .../WebIDL/WebGLContextAttributes.swift | 60 - Sources/DOMKit/WebIDL/WebGLContextEvent.swift | 20 - .../DOMKit/WebIDL/WebGLContextEventInit.swift | 20 - Sources/DOMKit/WebIDL/WebGLFramebuffer.swift | 12 - Sources/DOMKit/WebIDL/WebGLObject.swift | 14 - .../DOMKit/WebIDL/WebGLPowerPreference.swift | 23 - Sources/DOMKit/WebIDL/WebGLProgram.swift | 12 - Sources/DOMKit/WebIDL/WebGLQuery.swift | 12 - Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift | 12 - .../DOMKit/WebIDL/WebGLRenderingContext.swift | 14 - .../WebIDL/WebGLRenderingContextBase.swift | 1217 ----------------- .../WebGLRenderingContextOverloads.swift | 165 --- Sources/DOMKit/WebIDL/WebGLSampler.swift | 12 - Sources/DOMKit/WebIDL/WebGLShader.swift | 12 - .../WebIDL/WebGLShaderPrecisionFormat.swift | 26 - Sources/DOMKit/WebIDL/WebGLSync.swift | 12 - Sources/DOMKit/WebIDL/WebGLTexture.swift | 12 - .../WebIDL/WebGLTransformFeedback.swift | 12 - .../DOMKit/WebIDL/WebGLUniformLocation.swift | 14 - .../WebIDL/WebGLVertexArrayObject.swift | 12 - Sources/DOMKit/WebIDL/console.swift | 105 -- 140 files changed, 7597 deletions(-) delete mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioData.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift delete mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift delete mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift delete mode 100644 Sources/DOMKit/WebIDL/CodecState.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift delete mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift delete mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/Float32List.swift delete mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift delete mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift delete mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/Int32List.swift delete mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift delete mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift delete mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift delete mode 100644 Sources/DOMKit/WebIDL/Screen.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift delete mode 100644 Sources/DOMKit/WebIDL/Uint32List.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLQuery.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLSampler.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLSync.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift delete mode 100644 Sources/DOMKit/WebIDL/console.swift diff --git a/Sources/DOMKit/WebIDL/AlphaOption.swift b/Sources/DOMKit/WebIDL/AlphaOption.swift deleted file mode 100644 index f086fd3a..00000000 --- a/Sources/DOMKit/WebIDL/AlphaOption.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AlphaOption: JSString, JSValueCompatible { - case keep = "keep" - case discard = "discard" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/AudioData.swift b/Sources/DOMKit/WebIDL/AudioData.swift deleted file mode 100644 index a0fc829f..00000000 --- a/Sources/DOMKit/WebIDL/AudioData.swift +++ /dev/null @@ -1,62 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioData: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioData].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) - _sampleRate = ReadonlyAttribute(jsObject: jsObject, name: Strings.sampleRate) - _numberOfFrames = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfFrames) - _numberOfChannels = ReadonlyAttribute(jsObject: jsObject, name: Strings.numberOfChannels) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioDataInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var format: AudioSampleFormat? - - @ReadonlyAttribute - public var sampleRate: Float - - @ReadonlyAttribute - public var numberOfFrames: UInt32 - - @ReadonlyAttribute - public var numberOfChannels: UInt32 - - @ReadonlyAttribute - public var duration: UInt64 - - @ReadonlyAttribute - public var timestamp: Int64 - - @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { - let this = jsObject - return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! - } - - @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift b/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift deleted file mode 100644 index 78daea46..00000000 --- a/Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDataCopyToOptions: BridgedDictionary { - public convenience init(planeIndex: UInt32, frameOffset: UInt32, frameCount: UInt32, format: AudioSampleFormat) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.planeIndex] = planeIndex.jsValue - object[Strings.frameOffset] = frameOffset.jsValue - object[Strings.frameCount] = frameCount.jsValue - object[Strings.format] = format.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _planeIndex = ReadWriteAttribute(jsObject: object, name: Strings.planeIndex) - _frameOffset = ReadWriteAttribute(jsObject: object, name: Strings.frameOffset) - _frameCount = ReadWriteAttribute(jsObject: object, name: Strings.frameCount) - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var planeIndex: UInt32 - - @ReadWriteAttribute - public var frameOffset: UInt32 - - @ReadWriteAttribute - public var frameCount: UInt32 - - @ReadWriteAttribute - public var format: AudioSampleFormat -} diff --git a/Sources/DOMKit/WebIDL/AudioDataInit.swift b/Sources/DOMKit/WebIDL/AudioDataInit.swift deleted file mode 100644 index d0395761..00000000 --- a/Sources/DOMKit/WebIDL/AudioDataInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDataInit: BridgedDictionary { - public convenience init(format: AudioSampleFormat, sampleRate: Float, numberOfFrames: UInt32, numberOfChannels: UInt32, timestamp: Int64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.format] = format.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfFrames] = numberOfFrames.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfFrames = ReadWriteAttribute(jsObject: object, name: Strings.numberOfFrames) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var format: AudioSampleFormat - - @ReadWriteAttribute - public var sampleRate: Float - - @ReadWriteAttribute - public var numberOfFrames: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoder.swift b/Sources/DOMKit/WebIDL/AudioDecoder.swift deleted file mode 100644 index d511e5ba..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var decodeQueueSize: UInt32 - - @inlinable public func configure(config: AudioDecoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func decode(chunk: EncodedAudioChunk) { - let this = jsObject - _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: AudioDecoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: AudioDecoderConfig) async throws -> AudioDecoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift b/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift deleted file mode 100644 index 55aa5a27..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderConfig.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderConfig: BridgedDictionary { - public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, description: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.description] = description.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _description = ReadWriteAttribute(jsObject: object, name: Strings.description) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var sampleRate: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var description: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift b/Sources/DOMKit/WebIDL/AudioDecoderInit.swift deleted file mode 100644 index b98e0449..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderInit: BridgedDictionary { - public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1Void - public var output: AudioDataOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift b/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift deleted file mode 100644 index 8245e0da..00000000 --- a/Sources/DOMKit/WebIDL/AudioDecoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioDecoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: AudioDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: AudioDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoder.swift b/Sources/DOMKit/WebIDL/AudioEncoder.swift deleted file mode 100644 index 7565bc23..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: AudioEncoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var encodeQueueSize: UInt32 - - @inlinable public func configure(config: AudioEncoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func encode(data: AudioData) { - let this = jsObject - _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: AudioEncoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: AudioEncoderConfig) async throws -> AudioEncoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift b/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift deleted file mode 100644 index 0d8f8acf..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderConfig.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderConfig: BridgedDictionary { - public convenience init(codec: String, sampleRate: UInt32, numberOfChannels: UInt32, bitrate: UInt64) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.numberOfChannels] = numberOfChannels.jsValue - object[Strings.bitrate] = bitrate.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _numberOfChannels = ReadWriteAttribute(jsObject: object, name: Strings.numberOfChannels) - _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var sampleRate: UInt32 - - @ReadWriteAttribute - public var numberOfChannels: UInt32 - - @ReadWriteAttribute - public var bitrate: UInt64 -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift b/Sources/DOMKit/WebIDL/AudioEncoderInit.swift deleted file mode 100644 index 550e8415..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderInit: BridgedDictionary { - public convenience init(output: @escaping EncodedAudioChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute2Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute2Void - public var output: EncodedAudioChunkOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift b/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift deleted file mode 100644 index bed3a52b..00000000 --- a/Sources/DOMKit/WebIDL/AudioEncoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class AudioEncoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: AudioEncoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: AudioEncoderConfig -} diff --git a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift b/Sources/DOMKit/WebIDL/AudioSampleFormat.swift deleted file mode 100644 index a629b0a5..00000000 --- a/Sources/DOMKit/WebIDL/AudioSampleFormat.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum AudioSampleFormat: JSString, JSValueCompatible { - case u8 = "u8" - case s16 = "s16" - case s32 = "s32" - case f32 = "f32" - case u8Planar = "u8-planar" - case s16Planar = "s16-planar" - case s32Planar = "s32-planar" - case f32Planar = "f32-planar" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/BitrateMode.swift b/Sources/DOMKit/WebIDL/BitrateMode.swift deleted file mode 100644 index b0001ae7..00000000 --- a/Sources/DOMKit/WebIDL/BitrateMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum BitrateMode: JSString, JSValueCompatible { - case constant = "constant" - case variable = "variable" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/BlobEvent.swift b/Sources/DOMKit/WebIDL/BlobEvent.swift deleted file mode 100644 index 2f09f782..00000000 --- a/Sources/DOMKit/WebIDL/BlobEvent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BlobEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BlobEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _timecode = ReadonlyAttribute(jsObject: jsObject, name: Strings.timecode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: BlobEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var data: Blob - - @ReadonlyAttribute - public var timecode: DOMHighResTimeStamp -} diff --git a/Sources/DOMKit/WebIDL/BlobEventInit.swift b/Sources/DOMKit/WebIDL/BlobEventInit.swift deleted file mode 100644 index adb0fd32..00000000 --- a/Sources/DOMKit/WebIDL/BlobEventInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BlobEventInit: BridgedDictionary { - public convenience init(data: Blob, timecode: DOMHighResTimeStamp) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.timecode] = timecode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _timecode = ReadWriteAttribute(jsObject: object, name: Strings.timecode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var data: Blob - - @ReadWriteAttribute - public var timecode: DOMHighResTimeStamp -} diff --git a/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift deleted file mode 100644 index 1c9c71e0..00000000 --- a/Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Bool_or_MediaTrackConstraints: ConvertibleToJSValue {} -extension Bool: Any_Bool_or_MediaTrackConstraints {} -extension MediaTrackConstraints: Any_Bool_or_MediaTrackConstraints {} - -public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaTrackConstraints { - case bool(Bool) - case mediaTrackConstraints(MediaTrackConstraints) - - var bool: Bool? { - switch self { - case let .bool(bool): return bool - default: return nil - } - } - - var mediaTrackConstraints: MediaTrackConstraints? { - switch self { - case let .mediaTrackConstraints(mediaTrackConstraints): return mediaTrackConstraints - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bool: Bool = value.fromJSValue() { - return .bool(bool) - } - if let mediaTrackConstraints: MediaTrackConstraints = value.fromJSValue() { - return .mediaTrackConstraints(mediaTrackConstraints) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bool(bool): - return bool.jsValue - case let .mediaTrackConstraints(mediaTrackConstraints): - return mediaTrackConstraints.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift deleted file mode 100644 index 53fb3394..00000000 --- a/Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Bool_or_ScrollIntoViewOptions: ConvertibleToJSValue {} -extension Bool: Any_Bool_or_ScrollIntoViewOptions {} -extension ScrollIntoViewOptions: Any_Bool_or_ScrollIntoViewOptions {} - -public enum Bool_or_ScrollIntoViewOptions: JSValueCompatible, Any_Bool_or_ScrollIntoViewOptions { - case bool(Bool) - case scrollIntoViewOptions(ScrollIntoViewOptions) - - var bool: Bool? { - switch self { - case let .bool(bool): return bool - default: return nil - } - } - - var scrollIntoViewOptions: ScrollIntoViewOptions? { - switch self { - case let .scrollIntoViewOptions(scrollIntoViewOptions): return scrollIntoViewOptions - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bool: Bool = value.fromJSValue() { - return .bool(bool) - } - if let scrollIntoViewOptions: ScrollIntoViewOptions = value.fromJSValue() { - return .scrollIntoViewOptions(scrollIntoViewOptions) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bool(bool): - return bool.jsValue - case let .scrollIntoViewOptions(scrollIntoViewOptions): - return scrollIntoViewOptions.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/BoxQuadOptions.swift b/Sources/DOMKit/WebIDL/BoxQuadOptions.swift deleted file mode 100644 index 9c68f521..00000000 --- a/Sources/DOMKit/WebIDL/BoxQuadOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class BoxQuadOptions: BridgedDictionary { - public convenience init(box: CSSBoxType, relativeTo: GeometryNode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.box] = box.jsValue - object[Strings.relativeTo] = relativeTo.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _box = ReadWriteAttribute(jsObject: object, name: Strings.box) - _relativeTo = ReadWriteAttribute(jsObject: object, name: Strings.relativeTo) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var box: CSSBoxType - - @ReadWriteAttribute - public var relativeTo: GeometryNode -} diff --git a/Sources/DOMKit/WebIDL/CSSBoxType.swift b/Sources/DOMKit/WebIDL/CSSBoxType.swift deleted file mode 100644 index 55fb3a91..00000000 --- a/Sources/DOMKit/WebIDL/CSSBoxType.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CSSBoxType: JSString, JSValueCompatible { - case margin = "margin" - case border = "border" - case padding = "padding" - case content = "content" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement.swift deleted file mode 100644 index 29314d8d..00000000 --- a/Sources/DOMKit/WebIDL/CSSPseudoElement.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CSSPseudoElement: EventTarget, GeometryUtils { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CSSPseudoElement].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _element = ReadonlyAttribute(jsObject: jsObject, name: Strings.element) - _parent = ReadonlyAttribute(jsObject: jsObject, name: Strings.parent) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var element: Element - - @ReadonlyAttribute - public var parent: CSSPseudoElement_or_Element - - @inlinable public func pseudo(type: String) -> CSSPseudoElement? { - let this = jsObject - return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift b/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift deleted file mode 100644 index 3c06e5d5..00000000 --- a/Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_CSSPseudoElement_or_Element: ConvertibleToJSValue {} -extension CSSPseudoElement: Any_CSSPseudoElement_or_Element {} -extension Element: Any_CSSPseudoElement_or_Element {} - -public enum CSSPseudoElement_or_Element: JSValueCompatible, Any_CSSPseudoElement_or_Element { - case cssPseudoElement(CSSPseudoElement) - case element(Element) - - var cssPseudoElement: CSSPseudoElement? { - switch self { - case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement - default: return nil - } - } - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { - return .cssPseudoElement(cssPseudoElement) - } - if let element: Element = value.fromJSValue() { - return .element(element) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .cssPseudoElement(cssPseudoElement): - return cssPseudoElement.jsValue - case let .element(element): - return element.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift deleted file mode 100644 index ee012fa8..00000000 --- a/Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CameraDevicePermissionDescriptor: BridgedDictionary { - public convenience init(panTiltZoom: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.panTiltZoom] = panTiltZoom.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _panTiltZoom = ReadWriteAttribute(jsObject: object, name: Strings.panTiltZoom) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var panTiltZoom: Bool -} diff --git a/Sources/DOMKit/WebIDL/CaretPosition.swift b/Sources/DOMKit/WebIDL/CaretPosition.swift deleted file mode 100644 index 385d49ef..00000000 --- a/Sources/DOMKit/WebIDL/CaretPosition.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class CaretPosition: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CaretPosition].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _offsetNode = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetNode) - _offset = ReadonlyAttribute(jsObject: jsObject, name: Strings.offset) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var offsetNode: Node - - @ReadonlyAttribute - public var offset: UInt32 - - @inlinable public func getClientRect() -> DOMRect? { - let this = jsObject - return this[Strings.getClientRect].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/CodecState.swift b/Sources/DOMKit/WebIDL/CodecState.swift deleted file mode 100644 index 3495763f..00000000 --- a/Sources/DOMKit/WebIDL/CodecState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum CodecState: JSString, JSValueCompatible { - case unconfigured = "unconfigured" - case configured = "configured" - case closed = "closed" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainBoolean.swift b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift deleted file mode 100644 index 38559275..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainBoolean.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainBoolean: ConvertibleToJSValue {} -extension Bool: Any_ConstrainBoolean {} -extension ConstrainBooleanParameters: Any_ConstrainBoolean {} - -public enum ConstrainBoolean: JSValueCompatible, Any_ConstrainBoolean { - case bool(Bool) - case constrainBooleanParameters(ConstrainBooleanParameters) - - var bool: Bool? { - switch self { - case let .bool(bool): return bool - default: return nil - } - } - - var constrainBooleanParameters: ConstrainBooleanParameters? { - switch self { - case let .constrainBooleanParameters(constrainBooleanParameters): return constrainBooleanParameters - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bool: Bool = value.fromJSValue() { - return .bool(bool) - } - if let constrainBooleanParameters: ConstrainBooleanParameters = value.fromJSValue() { - return .constrainBooleanParameters(constrainBooleanParameters) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bool(bool): - return bool.jsValue - case let .constrainBooleanParameters(constrainBooleanParameters): - return constrainBooleanParameters.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift deleted file mode 100644 index aed2cd3b..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainBooleanParameters: BridgedDictionary { - public convenience init(exact: Bool, ideal: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: Bool - - @ReadWriteAttribute - public var ideal: Bool -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift deleted file mode 100644 index 5c2cb816..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainDOMString: ConvertibleToJSValue {} -extension ConstrainDOMStringParameters: Any_ConstrainDOMString {} -extension String: Any_ConstrainDOMString {} -extension Array: Any_ConstrainDOMString where Element == String {} - -public enum ConstrainDOMString: JSValueCompatible, Any_ConstrainDOMString { - case constrainDOMStringParameters(ConstrainDOMStringParameters) - case string(String) - case seq_of_String([String]) - - var constrainDOMStringParameters: ConstrainDOMStringParameters? { - switch self { - case let .constrainDOMStringParameters(constrainDOMStringParameters): return constrainDOMStringParameters - default: return nil - } - } - - var string: String? { - switch self { - case let .string(string): return string - default: return nil - } - } - - var seq_of_String: [String]? { - switch self { - case let .seq_of_String(seq_of_String): return seq_of_String - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let constrainDOMStringParameters: ConstrainDOMStringParameters = value.fromJSValue() { - return .constrainDOMStringParameters(constrainDOMStringParameters) - } - if let string: String = value.fromJSValue() { - return .string(string) - } - if let seq_of_String: [String] = value.fromJSValue() { - return .seq_of_String(seq_of_String) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .constrainDOMStringParameters(constrainDOMStringParameters): - return constrainDOMStringParameters.jsValue - case let .string(string): - return string.jsValue - case let .seq_of_String(seq_of_String): - return seq_of_String.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift deleted file mode 100644 index 8a51b973..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainDOMStringParameters: BridgedDictionary { - public convenience init(exact: String_or_seq_of_String, ideal: String_or_seq_of_String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: String_or_seq_of_String - - @ReadWriteAttribute - public var ideal: String_or_seq_of_String -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDouble.swift b/Sources/DOMKit/WebIDL/ConstrainDouble.swift deleted file mode 100644 index 41993e8a..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDouble.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainDouble: ConvertibleToJSValue {} -extension ConstrainDoubleRange: Any_ConstrainDouble {} -extension Double: Any_ConstrainDouble {} - -public enum ConstrainDouble: JSValueCompatible, Any_ConstrainDouble { - case constrainDoubleRange(ConstrainDoubleRange) - case double(Double) - - var constrainDoubleRange: ConstrainDoubleRange? { - switch self { - case let .constrainDoubleRange(constrainDoubleRange): return constrainDoubleRange - default: return nil - } - } - - var double: Double? { - switch self { - case let .double(double): return double - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let constrainDoubleRange: ConstrainDoubleRange = value.fromJSValue() { - return .constrainDoubleRange(constrainDoubleRange) - } - if let double: Double = value.fromJSValue() { - return .double(double) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .constrainDoubleRange(constrainDoubleRange): - return constrainDoubleRange.jsValue - case let .double(double): - return double.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift deleted file mode 100644 index 9ee176e9..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainDoubleRange: BridgedDictionary { - public convenience init(exact: Double, ideal: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: Double - - @ReadWriteAttribute - public var ideal: Double -} diff --git a/Sources/DOMKit/WebIDL/ConstrainULong.swift b/Sources/DOMKit/WebIDL/ConstrainULong.swift deleted file mode 100644 index 614cf30b..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainULong.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ConstrainULong: ConvertibleToJSValue {} -extension ConstrainULongRange: Any_ConstrainULong {} -extension UInt32: Any_ConstrainULong {} - -public enum ConstrainULong: JSValueCompatible, Any_ConstrainULong { - case constrainULongRange(ConstrainULongRange) - case uInt32(UInt32) - - var constrainULongRange: ConstrainULongRange? { - switch self { - case let .constrainULongRange(constrainULongRange): return constrainULongRange - default: return nil - } - } - - var uInt32: UInt32? { - switch self { - case let .uInt32(uInt32): return uInt32 - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let constrainULongRange: ConstrainULongRange = value.fromJSValue() { - return .constrainULongRange(constrainULongRange) - } - if let uInt32: UInt32 = value.fromJSValue() { - return .uInt32(uInt32) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .constrainULongRange(constrainULongRange): - return constrainULongRange.jsValue - case let .uInt32(uInt32): - return uInt32.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift deleted file mode 100644 index 5a87be30..00000000 --- a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConstrainULongRange: BridgedDictionary { - public convenience init(exact: UInt32, ideal: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var exact: UInt32 - - @ReadWriteAttribute - public var ideal: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift deleted file mode 100644 index e5671dbc..00000000 --- a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ConvertCoordinateOptions: BridgedDictionary { - public convenience init(fromBox: CSSBoxType, toBox: CSSBoxType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.fromBox] = fromBox.jsValue - object[Strings.toBox] = toBox.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _fromBox = ReadWriteAttribute(jsObject: object, name: Strings.fromBox) - _toBox = ReadWriteAttribute(jsObject: object, name: Strings.toBox) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var fromBox: CSSBoxType - - @ReadWriteAttribute - public var toBox: CSSBoxType -} diff --git a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift deleted file mode 100644 index 92ae09de..00000000 --- a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DevicePermissionDescriptor: BridgedDictionary { - public convenience init(deviceId: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.deviceId] = deviceId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var deviceId: String -} diff --git a/Sources/DOMKit/WebIDL/DoubleRange.swift b/Sources/DOMKit/WebIDL/DoubleRange.swift deleted file mode 100644 index b58107cf..00000000 --- a/Sources/DOMKit/WebIDL/DoubleRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class DoubleRange: BridgedDictionary { - public convenience init(max: Double, min: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.max] = max.jsValue - object[Strings.min] = min.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _max = ReadWriteAttribute(jsObject: object, name: Strings.max) - _min = ReadWriteAttribute(jsObject: object, name: Strings.min) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var max: Double - - @ReadWriteAttribute - public var min: Double -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift deleted file mode 100644 index 010e2b06..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunk.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunk: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedAudioChunk].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: EncodedAudioChunkInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: EncodedAudioChunkType - - @ReadonlyAttribute - public var timestamp: Int64 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var byteLength: UInt32 - - @inlinable public func copyTo(destination: BufferSource) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift deleted file mode 100644 index 054201f8..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunkInit: BridgedDictionary { - public convenience init(type: EncodedAudioChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: EncodedAudioChunkType - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift deleted file mode 100644 index 6f5f8314..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedAudioChunkMetadata: BridgedDictionary { - public convenience init(decoderConfig: AudioDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.decoderConfig] = decoderConfig.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var decoderConfig: AudioDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift b/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift deleted file mode 100644 index 9c35362e..00000000 --- a/Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EncodedAudioChunkType: JSString, JSValueCompatible { - case key = "key" - case delta = "delta" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift deleted file mode 100644 index 1da80666..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunk.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunk: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.EncodedVideoChunk].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _byteLength = ReadonlyAttribute(jsObject: jsObject, name: Strings.byteLength) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: EncodedVideoChunkInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: EncodedVideoChunkType - - @ReadonlyAttribute - public var timestamp: Int64 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var byteLength: UInt32 - - @inlinable public func copyTo(destination: BufferSource) { - let this = jsObject - _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift deleted file mode 100644 index 0c95c51f..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunkInit: BridgedDictionary { - public convenience init(type: EncodedVideoChunkType, timestamp: Int64, duration: UInt64, data: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: EncodedVideoChunkType - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var data: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift deleted file mode 100644 index 6b3572e9..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift +++ /dev/null @@ -1,30 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class EncodedVideoChunkMetadata: BridgedDictionary { - public convenience init(decoderConfig: VideoDecoderConfig, svc: SvcOutputMetadata, alphaSideData: BufferSource) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.decoderConfig] = decoderConfig.jsValue - object[Strings.svc] = svc.jsValue - object[Strings.alphaSideData] = alphaSideData.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) - _svc = ReadWriteAttribute(jsObject: object, name: Strings.svc) - _alphaSideData = ReadWriteAttribute(jsObject: object, name: Strings.alphaSideData) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var decoderConfig: VideoDecoderConfig - - @ReadWriteAttribute - public var svc: SvcOutputMetadata - - @ReadWriteAttribute - public var alphaSideData: BufferSource -} diff --git a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift b/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift deleted file mode 100644 index f59b9723..00000000 --- a/Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum EncodedVideoChunkType: JSString, JSValueCompatible { - case key = "key" - case delta = "delta" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Float32List.swift b/Sources/DOMKit/WebIDL/Float32List.swift deleted file mode 100644 index 1f1e5bdb..00000000 --- a/Sources/DOMKit/WebIDL/Float32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Float32List: ConvertibleToJSValue {} -extension Float32Array: Any_Float32List {} -extension Array: Any_Float32List where Element == GLfloat {} - -public enum Float32List: JSValueCompatible, Any_Float32List { - case float32Array(Float32Array) - case seq_of_GLfloat([GLfloat]) - - var float32Array: Float32Array? { - switch self { - case let .float32Array(float32Array): return float32Array - default: return nil - } - } - - var seq_of_GLfloat: [GLfloat]? { - switch self { - case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let float32Array: Float32Array = value.fromJSValue() { - return .float32Array(float32Array) - } - if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { - return .seq_of_GLfloat(seq_of_GLfloat) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .float32Array(float32Array): - return float32Array.jsValue - case let .seq_of_GLfloat(seq_of_GLfloat): - return seq_of_GLfloat.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/GeometryNode.swift b/Sources/DOMKit/WebIDL/GeometryNode.swift deleted file mode 100644 index 5554a102..00000000 --- a/Sources/DOMKit/WebIDL/GeometryNode.swift +++ /dev/null @@ -1,74 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_GeometryNode: ConvertibleToJSValue {} -extension CSSPseudoElement: Any_GeometryNode {} -extension Document: Any_GeometryNode {} -extension Element: Any_GeometryNode {} -extension Text: Any_GeometryNode {} - -public enum GeometryNode: JSValueCompatible, Any_GeometryNode { - case cssPseudoElement(CSSPseudoElement) - case document(Document) - case element(Element) - case text(Text) - - var cssPseudoElement: CSSPseudoElement? { - switch self { - case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement - default: return nil - } - } - - var document: Document? { - switch self { - case let .document(document): return document - default: return nil - } - } - - var element: Element? { - switch self { - case let .element(element): return element - default: return nil - } - } - - var text: Text? { - switch self { - case let .text(text): return text - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { - return .cssPseudoElement(cssPseudoElement) - } - if let document: Document = value.fromJSValue() { - return .document(document) - } - if let element: Element = value.fromJSValue() { - return .element(element) - } - if let text: Text = value.fromJSValue() { - return .text(text) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .cssPseudoElement(cssPseudoElement): - return cssPseudoElement.jsValue - case let .document(document): - return document.jsValue - case let .element(element): - return element.jsValue - case let .text(text): - return text.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/GeometryUtils.swift b/Sources/DOMKit/WebIDL/GeometryUtils.swift deleted file mode 100644 index 15114de3..00000000 --- a/Sources/DOMKit/WebIDL/GeometryUtils.swift +++ /dev/null @@ -1,27 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol GeometryUtils: JSBridgedClass {} -public extension GeometryUtils { - @inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] { - let this = jsObject - return this[Strings.getBoxQuads].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func convertQuadFromNode(quad: DOMQuadInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { - let this = jsObject - return this[Strings.convertQuadFromNode].function!(this: this, arguments: [quad.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { - let this = jsObject - return this[Strings.convertRectFromNode].function!(this: this, arguments: [rect.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable func convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMPoint { - let this = jsObject - return this[Strings.convertPointFromNode].function!(this: this, arguments: [point.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift b/Sources/DOMKit/WebIDL/HardwareAcceleration.swift deleted file mode 100644 index 9adb76b1..00000000 --- a/Sources/DOMKit/WebIDL/HardwareAcceleration.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum HardwareAcceleration: JSString, JSValueCompatible { - case noPreference = "no-preference" - case preferHardware = "prefer-hardware" - case preferSoftware = "prefer-software" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ImageBufferSource.swift b/Sources/DOMKit/WebIDL/ImageBufferSource.swift deleted file mode 100644 index 0aa23282..00000000 --- a/Sources/DOMKit/WebIDL/ImageBufferSource.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_ImageBufferSource: ConvertibleToJSValue {} -extension BufferSource: Any_ImageBufferSource {} -extension ReadableStream: Any_ImageBufferSource {} - -public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { - case bufferSource(BufferSource) - case readableStream(ReadableStream) - - var bufferSource: BufferSource? { - switch self { - case let .bufferSource(bufferSource): return bufferSource - default: return nil - } - } - - var readableStream: ReadableStream? { - switch self { - case let .readableStream(readableStream): return readableStream - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let bufferSource: BufferSource = value.fromJSValue() { - return .bufferSource(bufferSource) - } - if let readableStream: ReadableStream = value.fromJSValue() { - return .readableStream(readableStream) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .bufferSource(bufferSource): - return bufferSource.jsValue - case let .readableStream(readableStream): - return readableStream.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift b/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift deleted file mode 100644 index 89806708..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecodeOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecodeOptions: BridgedDictionary { - public convenience init(frameIndex: UInt32, completeFramesOnly: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.frameIndex] = frameIndex.jsValue - object[Strings.completeFramesOnly] = completeFramesOnly.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _frameIndex = ReadWriteAttribute(jsObject: object, name: Strings.frameIndex) - _completeFramesOnly = ReadWriteAttribute(jsObject: object, name: Strings.completeFramesOnly) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var frameIndex: UInt32 - - @ReadWriteAttribute - public var completeFramesOnly: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift b/Sources/DOMKit/WebIDL/ImageDecodeResult.swift deleted file mode 100644 index 1a4cb939..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecodeResult.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecodeResult: BridgedDictionary { - public convenience init(image: VideoFrame, complete: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.image] = image.jsValue - object[Strings.complete] = complete.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _image = ReadWriteAttribute(jsObject: object, name: Strings.image) - _complete = ReadWriteAttribute(jsObject: object, name: Strings.complete) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var image: VideoFrame - - @ReadWriteAttribute - public var complete: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageDecoder.swift b/Sources/DOMKit/WebIDL/ImageDecoder.swift deleted file mode 100644 index 6112d940..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecoder.swift +++ /dev/null @@ -1,68 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _complete = ReadonlyAttribute(jsObject: jsObject, name: Strings.complete) - _completed = ReadonlyAttribute(jsObject: jsObject, name: Strings.completed) - _tracks = ReadonlyAttribute(jsObject: jsObject, name: Strings.tracks) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: ImageDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var type: String - - @ReadonlyAttribute - public var complete: Bool - - @ReadonlyAttribute - public var completed: JSPromise - - @ReadonlyAttribute - public var tracks: ImageTrackList - - @inlinable public func decode(options: ImageDecodeOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func decode(options: ImageDecodeOptions? = nil) async throws -> ImageDecodeResult { - let this = jsObject - let _promise: JSPromise = this[Strings.decode].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isTypeSupported(type: String) -> JSPromise { - let this = constructor - return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isTypeSupported(type: String) async throws -> Bool { - let this = constructor - let _promise: JSPromise = this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift b/Sources/DOMKit/WebIDL/ImageDecoderInit.swift deleted file mode 100644 index 06179973..00000000 --- a/Sources/DOMKit/WebIDL/ImageDecoderInit.swift +++ /dev/null @@ -1,50 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageDecoderInit: BridgedDictionary { - public convenience init(type: String, data: ImageBufferSource, premultiplyAlpha: PremultiplyAlpha, colorSpaceConversion: ColorSpaceConversion, desiredWidth: UInt32, desiredHeight: UInt32, preferAnimation: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.data] = data.jsValue - object[Strings.premultiplyAlpha] = premultiplyAlpha.jsValue - object[Strings.colorSpaceConversion] = colorSpaceConversion.jsValue - object[Strings.desiredWidth] = desiredWidth.jsValue - object[Strings.desiredHeight] = desiredHeight.jsValue - object[Strings.preferAnimation] = preferAnimation.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _premultiplyAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultiplyAlpha) - _colorSpaceConversion = ReadWriteAttribute(jsObject: object, name: Strings.colorSpaceConversion) - _desiredWidth = ReadWriteAttribute(jsObject: object, name: Strings.desiredWidth) - _desiredHeight = ReadWriteAttribute(jsObject: object, name: Strings.desiredHeight) - _preferAnimation = ReadWriteAttribute(jsObject: object, name: Strings.preferAnimation) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var type: String - - @ReadWriteAttribute - public var data: ImageBufferSource - - @ReadWriteAttribute - public var premultiplyAlpha: PremultiplyAlpha - - @ReadWriteAttribute - public var colorSpaceConversion: ColorSpaceConversion - - @ReadWriteAttribute - public var desiredWidth: UInt32 - - @ReadWriteAttribute - public var desiredHeight: UInt32 - - @ReadWriteAttribute - public var preferAnimation: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageTrack.swift b/Sources/DOMKit/WebIDL/ImageTrack.swift deleted file mode 100644 index b68c7a97..00000000 --- a/Sources/DOMKit/WebIDL/ImageTrack.swift +++ /dev/null @@ -1,32 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.ImageTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _animated = ReadonlyAttribute(jsObject: jsObject, name: Strings.animated) - _frameCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.frameCount) - _repetitionCount = ReadonlyAttribute(jsObject: jsObject, name: Strings.repetitionCount) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var animated: Bool - - @ReadonlyAttribute - public var frameCount: UInt32 - - @ReadonlyAttribute - public var repetitionCount: Float - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ReadWriteAttribute - public var selected: Bool -} diff --git a/Sources/DOMKit/WebIDL/ImageTrackList.swift b/Sources/DOMKit/WebIDL/ImageTrackList.swift deleted file mode 100644 index 10b44925..00000000 --- a/Sources/DOMKit/WebIDL/ImageTrackList.swift +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ImageTrackList: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ImageTrackList].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _ready = ReadonlyAttribute(jsObject: jsObject, name: Strings.ready) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _selectedTrack = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedTrack) - self.jsObject = jsObject - } - - @inlinable public subscript(key: Int) -> ImageTrack { - jsObject[key].fromJSValue()! - } - - @ReadonlyAttribute - public var ready: JSPromise - - @ReadonlyAttribute - public var length: UInt32 - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ReadonlyAttribute - public var selectedTrack: ImageTrack? -} diff --git a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift deleted file mode 100644 index d6170195..00000000 --- a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift +++ /dev/null @@ -1,17 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class InputDeviceInfo: MediaDeviceInfo { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputDeviceInfo].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public func getCapabilities() -> MediaTrackCapabilities { - let this = jsObject - return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/Int32List.swift b/Sources/DOMKit/WebIDL/Int32List.swift deleted file mode 100644 index ce876a5b..00000000 --- a/Sources/DOMKit/WebIDL/Int32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Int32List: ConvertibleToJSValue {} -extension Int32Array: Any_Int32List {} -extension Array: Any_Int32List where Element == GLint {} - -public enum Int32List: JSValueCompatible, Any_Int32List { - case int32Array(Int32Array) - case seq_of_GLint([GLint]) - - var int32Array: Int32Array? { - switch self { - case let .int32Array(int32Array): return int32Array - default: return nil - } - } - - var seq_of_GLint: [GLint]? { - switch self { - case let .seq_of_GLint(seq_of_GLint): return seq_of_GLint - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let int32Array: Int32Array = value.fromJSValue() { - return .int32Array(int32Array) - } - if let seq_of_GLint: [GLint] = value.fromJSValue() { - return .seq_of_GLint(seq_of_GLint) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .int32Array(int32Array): - return int32Array.jsValue - case let .seq_of_GLint(seq_of_GLint): - return seq_of_GLint.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift deleted file mode 100644 index 2cf015a8..00000000 --- a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class IsVisibleOptions: BridgedDictionary { - public convenience init() { - let object = JSObject.global[Strings.Object].function!.new() - - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - super.init(unsafelyWrapping: object) - } -} diff --git a/Sources/DOMKit/WebIDL/LatencyMode.swift b/Sources/DOMKit/WebIDL/LatencyMode.swift deleted file mode 100644 index d4aa61af..00000000 --- a/Sources/DOMKit/WebIDL/LatencyMode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum LatencyMode: JSString, JSValueCompatible { - case quality = "quality" - case realtime = "realtime" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift deleted file mode 100644 index 1f063478..00000000 --- a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaDeviceInfo: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaDeviceInfo].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _deviceId = ReadonlyAttribute(jsObject: jsObject, name: Strings.deviceId) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _groupId = ReadonlyAttribute(jsObject: jsObject, name: Strings.groupId) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var deviceId: String - - @ReadonlyAttribute - public var kind: MediaDeviceKind - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var groupId: String - - @inlinable public func toJSON() -> JSObject { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift deleted file mode 100644 index a19daab0..00000000 --- a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum MediaDeviceKind: JSString, JSValueCompatible { - case audioinput = "audioinput" - case audiooutput = "audiooutput" - case videoinput = "videoinput" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/MediaDevices.swift b/Sources/DOMKit/WebIDL/MediaDevices.swift deleted file mode 100644 index a65b2d59..00000000 --- a/Sources/DOMKit/WebIDL/MediaDevices.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaDevices: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaDevices].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _ondevicechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondevicechange) - super.init(unsafelyWrapping: jsObject) - } - - @ClosureAttribute1Optional - public var ondevicechange: EventHandler - - @inlinable public func enumerateDevices() -> JSPromise { - let this = jsObject - return this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func enumerateDevices() async throws -> [MediaDeviceInfo] { - let this = jsObject - let _promise: JSPromise = this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func getSupportedConstraints() -> MediaTrackSupportedConstraints { - let this = jsObject - return this[Strings.getSupportedConstraints].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) -> JSPromise { - let this = jsObject - return this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) async throws -> MediaStream { - let this = jsObject - let _promise: JSPromise = this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MediaQueryList.swift b/Sources/DOMKit/WebIDL/MediaQueryList.swift deleted file mode 100644 index e2f6e574..00000000 --- a/Sources/DOMKit/WebIDL/MediaQueryList.swift +++ /dev/null @@ -1,28 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaQueryList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) - _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var media: String - - @ReadonlyAttribute - public var matches: Bool - - // XXX: member 'addListener' is ignored - - // XXX: member 'removeListener' is ignored - - @ClosureAttribute1Optional - public var onchange: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift deleted file mode 100644 index e74e5c35..00000000 --- a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaQueryListEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryListEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) - _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MediaQueryListEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var media: String - - @ReadonlyAttribute - public var matches: Bool -} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift deleted file mode 100644 index 0f6adc8b..00000000 --- a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaQueryListEventInit: BridgedDictionary { - public convenience init(media: String, matches: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.media] = media.jsValue - object[Strings.matches] = matches.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _media = ReadWriteAttribute(jsObject: object, name: Strings.media) - _matches = ReadWriteAttribute(jsObject: object, name: Strings.matches) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var media: String - - @ReadWriteAttribute - public var matches: Bool -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorder.swift b/Sources/DOMKit/WebIDL/MediaRecorder.swift deleted file mode 100644 index 9336c57b..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorder.swift +++ /dev/null @@ -1,94 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorder: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _stream = ReadonlyAttribute(jsObject: jsObject, name: Strings.stream) - _mimeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.mimeType) - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _onstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstart) - _onstop = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstop) - _ondataavailable = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondataavailable) - _onpause = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onpause) - _onresume = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onresume) - _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) - _videoBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoBitsPerSecond) - _audioBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitsPerSecond) - _audioBitrateMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitrateMode) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(stream: MediaStream, options: MediaRecorderOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue, options?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var stream: MediaStream - - @ReadonlyAttribute - public var mimeType: String - - @ReadonlyAttribute - public var state: RecordingState - - @ClosureAttribute1Optional - public var onstart: EventHandler - - @ClosureAttribute1Optional - public var onstop: EventHandler - - @ClosureAttribute1Optional - public var ondataavailable: EventHandler - - @ClosureAttribute1Optional - public var onpause: EventHandler - - @ClosureAttribute1Optional - public var onresume: EventHandler - - @ClosureAttribute1Optional - public var onerror: EventHandler - - @ReadonlyAttribute - public var videoBitsPerSecond: UInt32 - - @ReadonlyAttribute - public var audioBitsPerSecond: UInt32 - - @ReadonlyAttribute - public var audioBitrateMode: BitrateMode - - @inlinable public func start(timeslice: UInt32? = nil) { - let this = jsObject - _ = this[Strings.start].function!(this: this, arguments: [timeslice?.jsValue ?? .undefined]) - } - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } - - @inlinable public func pause() { - let this = jsObject - _ = this[Strings.pause].function!(this: this, arguments: []) - } - - @inlinable public func resume() { - let this = jsObject - _ = this[Strings.resume].function!(this: this, arguments: []) - } - - @inlinable public func requestData() { - let this = jsObject - _ = this[Strings.requestData].function!(this: this, arguments: []) - } - - @inlinable public static func isTypeSupported(type: String) -> Bool { - let this = constructor - return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift deleted file mode 100644 index c4b4cc09..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorderErrorEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorderErrorEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MediaRecorderErrorEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var error: DOMException -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift deleted file mode 100644 index 4c773a67..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorderErrorEventInit: BridgedDictionary { - public convenience init(error: DOMException) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.error] = error.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _error = ReadWriteAttribute(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var error: DOMException -} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift deleted file mode 100644 index 3a4300b0..00000000 --- a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift +++ /dev/null @@ -1,40 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaRecorderOptions: BridgedDictionary { - public convenience init(mimeType: String, audioBitsPerSecond: UInt32, videoBitsPerSecond: UInt32, bitsPerSecond: UInt32, audioBitrateMode: BitrateMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.mimeType] = mimeType.jsValue - object[Strings.audioBitsPerSecond] = audioBitsPerSecond.jsValue - object[Strings.videoBitsPerSecond] = videoBitsPerSecond.jsValue - object[Strings.bitsPerSecond] = bitsPerSecond.jsValue - object[Strings.audioBitrateMode] = audioBitrateMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _mimeType = ReadWriteAttribute(jsObject: object, name: Strings.mimeType) - _audioBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.audioBitsPerSecond) - _videoBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.videoBitsPerSecond) - _bitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.bitsPerSecond) - _audioBitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.audioBitrateMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var mimeType: String - - @ReadWriteAttribute - public var audioBitsPerSecond: UInt32 - - @ReadWriteAttribute - public var videoBitsPerSecond: UInt32 - - @ReadWriteAttribute - public var bitsPerSecond: UInt32 - - @ReadWriteAttribute - public var audioBitrateMode: BitrateMode -} diff --git a/Sources/DOMKit/WebIDL/MediaStream.swift b/Sources/DOMKit/WebIDL/MediaStream.swift deleted file mode 100644 index 819dac5a..00000000 --- a/Sources/DOMKit/WebIDL/MediaStream.swift +++ /dev/null @@ -1,75 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStream: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init() { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) - } - - @inlinable public convenience init(stream: MediaStream) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) - } - - @inlinable public convenience init(tracks: [MediaStreamTrack]) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [tracks.jsValue])) - } - - @ReadonlyAttribute - public var id: String - - @inlinable public func getAudioTracks() -> [MediaStreamTrack] { - let this = jsObject - return this[Strings.getAudioTracks].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getVideoTracks() -> [MediaStreamTrack] { - let this = jsObject - return this[Strings.getVideoTracks].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getTracks() -> [MediaStreamTrack] { - let this = jsObject - return this[Strings.getTracks].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getTrackById(trackId: String) -> MediaStreamTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [trackId.jsValue]).fromJSValue()! - } - - @inlinable public func addTrack(track: MediaStreamTrack) { - let this = jsObject - _ = this[Strings.addTrack].function!(this: this, arguments: [track.jsValue]) - } - - @inlinable public func removeTrack(track: MediaStreamTrack) { - let this = jsObject - _ = this[Strings.removeTrack].function!(this: this, arguments: [track.jsValue]) - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @ReadonlyAttribute - public var active: Bool - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift deleted file mode 100644 index b2ee4cce..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamConstraints: BridgedDictionary { - public convenience init(video: Bool_or_MediaTrackConstraints, audio: Bool_or_MediaTrackConstraints) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.video] = video.jsValue - object[Strings.audio] = audio.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _video = ReadWriteAttribute(jsObject: object, name: Strings.video) - _audio = ReadWriteAttribute(jsObject: object, name: Strings.audio) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var video: Bool_or_MediaTrackConstraints - - @ReadWriteAttribute - public var audio: Bool_or_MediaTrackConstraints -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift deleted file mode 100644 index 450347d9..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift +++ /dev/null @@ -1,85 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamTrack: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrack].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) - _muted = ReadonlyAttribute(jsObject: jsObject, name: Strings.muted) - _onmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmute) - _onunmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onunmute) - _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) - _onended = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onended) - super.init(unsafelyWrapping: jsObject) - } - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var label: String - - @ReadWriteAttribute - public var enabled: Bool - - @ReadonlyAttribute - public var muted: Bool - - @ClosureAttribute1Optional - public var onmute: EventHandler - - @ClosureAttribute1Optional - public var onunmute: EventHandler - - @ReadonlyAttribute - public var readyState: MediaStreamTrackState - - @ClosureAttribute1Optional - public var onended: EventHandler - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func stop() { - let this = jsObject - _ = this[Strings.stop].function!(this: this, arguments: []) - } - - @inlinable public func getCapabilities() -> MediaTrackCapabilities { - let this = jsObject - return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getConstraints() -> MediaTrackConstraints { - let this = jsObject - return this[Strings.getConstraints].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getSettings() -> MediaTrackSettings { - let this = jsObject - return this[Strings.getSettings].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) -> JSPromise { - let this = jsObject - return this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! - _ = try await _promise.value - } -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift deleted file mode 100644 index 21d98e5a..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamTrackEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrackEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInitDict: MediaStreamTrackEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) - } - - @ReadonlyAttribute - public var track: MediaStreamTrack -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift deleted file mode 100644 index 2bab9838..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaStreamTrackEventInit: BridgedDictionary { - public convenience init(track: MediaStreamTrack) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.track] = track.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _track = ReadWriteAttribute(jsObject: object, name: Strings.track) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var track: MediaStreamTrack -} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift deleted file mode 100644 index d08534a1..00000000 --- a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum MediaStreamTrackState: JSString, JSValueCompatible { - case live = "live" - case ended = "ended" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift deleted file mode 100644 index 41982ba3..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackCapabilities: BridgedDictionary { - public convenience init(width: ULongRange, height: ULongRange, aspectRatio: DoubleRange, frameRate: DoubleRange, facingMode: [String], resizeMode: [String], sampleRate: ULongRange, sampleSize: ULongRange, echoCancellation: [Bool], autoGainControl: [Bool], noiseSuppression: [Bool], latency: DoubleRange, channelCount: ULongRange, deviceId: String, groupId: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: ULongRange - - @ReadWriteAttribute - public var height: ULongRange - - @ReadWriteAttribute - public var aspectRatio: DoubleRange - - @ReadWriteAttribute - public var frameRate: DoubleRange - - @ReadWriteAttribute - public var facingMode: [String] - - @ReadWriteAttribute - public var resizeMode: [String] - - @ReadWriteAttribute - public var sampleRate: ULongRange - - @ReadWriteAttribute - public var sampleSize: ULongRange - - @ReadWriteAttribute - public var echoCancellation: [Bool] - - @ReadWriteAttribute - public var autoGainControl: [Bool] - - @ReadWriteAttribute - public var noiseSuppression: [Bool] - - @ReadWriteAttribute - public var latency: DoubleRange - - @ReadWriteAttribute - public var channelCount: ULongRange - - @ReadWriteAttribute - public var deviceId: String - - @ReadWriteAttribute - public var groupId: String -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift deleted file mode 100644 index 1489baaa..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackConstraintSet: BridgedDictionary { - public convenience init(width: ConstrainULong, height: ConstrainULong, aspectRatio: ConstrainDouble, frameRate: ConstrainDouble, facingMode: ConstrainDOMString, resizeMode: ConstrainDOMString, sampleRate: ConstrainULong, sampleSize: ConstrainULong, echoCancellation: ConstrainBoolean, autoGainControl: ConstrainBoolean, noiseSuppression: ConstrainBoolean, latency: ConstrainDouble, channelCount: ConstrainULong, deviceId: ConstrainDOMString, groupId: ConstrainDOMString) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: ConstrainULong - - @ReadWriteAttribute - public var height: ConstrainULong - - @ReadWriteAttribute - public var aspectRatio: ConstrainDouble - - @ReadWriteAttribute - public var frameRate: ConstrainDouble - - @ReadWriteAttribute - public var facingMode: ConstrainDOMString - - @ReadWriteAttribute - public var resizeMode: ConstrainDOMString - - @ReadWriteAttribute - public var sampleRate: ConstrainULong - - @ReadWriteAttribute - public var sampleSize: ConstrainULong - - @ReadWriteAttribute - public var echoCancellation: ConstrainBoolean - - @ReadWriteAttribute - public var autoGainControl: ConstrainBoolean - - @ReadWriteAttribute - public var noiseSuppression: ConstrainBoolean - - @ReadWriteAttribute - public var latency: ConstrainDouble - - @ReadWriteAttribute - public var channelCount: ConstrainULong - - @ReadWriteAttribute - public var deviceId: ConstrainDOMString - - @ReadWriteAttribute - public var groupId: ConstrainDOMString -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift deleted file mode 100644 index 5307db8a..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackConstraints: BridgedDictionary { - public convenience init(advanced: [MediaTrackConstraintSet]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.advanced] = advanced.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _advanced = ReadWriteAttribute(jsObject: object, name: Strings.advanced) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var advanced: [MediaTrackConstraintSet] -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift deleted file mode 100644 index 84d866a3..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackSettings: BridgedDictionary { - public convenience init(width: Int32, height: Int32, aspectRatio: Double, frameRate: Double, facingMode: String, resizeMode: String, sampleRate: Int32, sampleSize: Int32, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Double, channelCount: Int32, deviceId: String, groupId: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: Int32 - - @ReadWriteAttribute - public var height: Int32 - - @ReadWriteAttribute - public var aspectRatio: Double - - @ReadWriteAttribute - public var frameRate: Double - - @ReadWriteAttribute - public var facingMode: String - - @ReadWriteAttribute - public var resizeMode: String - - @ReadWriteAttribute - public var sampleRate: Int32 - - @ReadWriteAttribute - public var sampleSize: Int32 - - @ReadWriteAttribute - public var echoCancellation: Bool - - @ReadWriteAttribute - public var autoGainControl: Bool - - @ReadWriteAttribute - public var noiseSuppression: Bool - - @ReadWriteAttribute - public var latency: Double - - @ReadWriteAttribute - public var channelCount: Int32 - - @ReadWriteAttribute - public var deviceId: String - - @ReadWriteAttribute - public var groupId: String -} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift deleted file mode 100644 index bcbfd4ba..00000000 --- a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift +++ /dev/null @@ -1,90 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class MediaTrackSupportedConstraints: BridgedDictionary { - public convenience init(width: Bool, height: Bool, aspectRatio: Bool, frameRate: Bool, facingMode: Bool, resizeMode: Bool, sampleRate: Bool, sampleSize: Bool, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Bool, channelCount: Bool, deviceId: Bool, groupId: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.aspectRatio] = aspectRatio.jsValue - object[Strings.frameRate] = frameRate.jsValue - object[Strings.facingMode] = facingMode.jsValue - object[Strings.resizeMode] = resizeMode.jsValue - object[Strings.sampleRate] = sampleRate.jsValue - object[Strings.sampleSize] = sampleSize.jsValue - object[Strings.echoCancellation] = echoCancellation.jsValue - object[Strings.autoGainControl] = autoGainControl.jsValue - object[Strings.noiseSuppression] = noiseSuppression.jsValue - object[Strings.latency] = latency.jsValue - object[Strings.channelCount] = channelCount.jsValue - object[Strings.deviceId] = deviceId.jsValue - object[Strings.groupId] = groupId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) - _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) - _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) - _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) - _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) - _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) - _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) - _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) - _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) - _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) - _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) - _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) - _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var width: Bool - - @ReadWriteAttribute - public var height: Bool - - @ReadWriteAttribute - public var aspectRatio: Bool - - @ReadWriteAttribute - public var frameRate: Bool - - @ReadWriteAttribute - public var facingMode: Bool - - @ReadWriteAttribute - public var resizeMode: Bool - - @ReadWriteAttribute - public var sampleRate: Bool - - @ReadWriteAttribute - public var sampleSize: Bool - - @ReadWriteAttribute - public var echoCancellation: Bool - - @ReadWriteAttribute - public var autoGainControl: Bool - - @ReadWriteAttribute - public var noiseSuppression: Bool - - @ReadWriteAttribute - public var latency: Bool - - @ReadWriteAttribute - public var channelCount: Bool - - @ReadWriteAttribute - public var deviceId: Bool - - @ReadWriteAttribute - public var groupId: Bool -} diff --git a/Sources/DOMKit/WebIDL/OverconstrainedError.swift b/Sources/DOMKit/WebIDL/OverconstrainedError.swift deleted file mode 100644 index 61499735..00000000 --- a/Sources/DOMKit/WebIDL/OverconstrainedError.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class OverconstrainedError: DOMException { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OverconstrainedError].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _constraint = ReadonlyAttribute(jsObject: jsObject, name: Strings.constraint) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(constraint: String, message: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [constraint.jsValue, message?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var constraint: String -} diff --git a/Sources/DOMKit/WebIDL/PlaneLayout.swift b/Sources/DOMKit/WebIDL/PlaneLayout.swift deleted file mode 100644 index a4de400e..00000000 --- a/Sources/DOMKit/WebIDL/PlaneLayout.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class PlaneLayout: BridgedDictionary { - public convenience init(offset: UInt32, stride: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.stride] = stride.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _stride = ReadWriteAttribute(jsObject: object, name: Strings.stride) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var offset: UInt32 - - @ReadWriteAttribute - public var stride: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/RecordingState.swift b/Sources/DOMKit/WebIDL/RecordingState.swift deleted file mode 100644 index 7e057605..00000000 --- a/Sources/DOMKit/WebIDL/RecordingState.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum RecordingState: JSString, JSValueCompatible { - case inactive = "inactive" - case recording = "recording" - case paused = "paused" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/Screen.swift b/Sources/DOMKit/WebIDL/Screen.swift deleted file mode 100644 index a883fb2f..00000000 --- a/Sources/DOMKit/WebIDL/Screen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class Screen: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _availWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.availWidth) - _availHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.availHeight) - _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) - _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) - _colorDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorDepth) - _pixelDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.pixelDepth) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var availWidth: Int32 - - @ReadonlyAttribute - public var availHeight: Int32 - - @ReadonlyAttribute - public var width: Int32 - - @ReadonlyAttribute - public var height: Int32 - - @ReadonlyAttribute - public var colorDepth: UInt32 - - @ReadonlyAttribute - public var pixelDepth: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/ScrollBehavior.swift b/Sources/DOMKit/WebIDL/ScrollBehavior.swift deleted file mode 100644 index a76ba1cb..00000000 --- a/Sources/DOMKit/WebIDL/ScrollBehavior.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ScrollBehavior: JSString, JSValueCompatible { - case auto = "auto" - case smooth = "smooth" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift deleted file mode 100644 index 23f42432..00000000 --- a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ScrollIntoViewOptions: BridgedDictionary { - public convenience init(block: ScrollLogicalPosition, inline: ScrollLogicalPosition) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.block] = block.jsValue - object[Strings.inline] = inline.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _block = ReadWriteAttribute(jsObject: object, name: Strings.block) - _inline = ReadWriteAttribute(jsObject: object, name: Strings.inline) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var block: ScrollLogicalPosition - - @ReadWriteAttribute - public var inline: ScrollLogicalPosition -} diff --git a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift deleted file mode 100644 index 9f11f0bf..00000000 --- a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum ScrollLogicalPosition: JSString, JSValueCompatible { - case start = "start" - case center = "center" - case end = "end" - case nearest = "nearest" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/ScrollOptions.swift b/Sources/DOMKit/WebIDL/ScrollOptions.swift deleted file mode 100644 index 93ba5ad2..00000000 --- a/Sources/DOMKit/WebIDL/ScrollOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ScrollOptions: BridgedDictionary { - public convenience init(behavior: ScrollBehavior) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.behavior] = behavior.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _behavior = ReadWriteAttribute(jsObject: object, name: Strings.behavior) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var behavior: ScrollBehavior -} diff --git a/Sources/DOMKit/WebIDL/ScrollToOptions.swift b/Sources/DOMKit/WebIDL/ScrollToOptions.swift deleted file mode 100644 index c48ba4d7..00000000 --- a/Sources/DOMKit/WebIDL/ScrollToOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ScrollToOptions: BridgedDictionary { - public convenience init(left: Double, top: Double) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.left] = left.jsValue - object[Strings.top] = top.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _left = ReadWriteAttribute(jsObject: object, name: Strings.left) - _top = ReadWriteAttribute(jsObject: object, name: Strings.top) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var left: Double - - @ReadWriteAttribute - public var top: Double -} diff --git a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift b/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift deleted file mode 100644 index 2487040f..00000000 --- a/Sources/DOMKit/WebIDL/SvcOutputMetadata.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class SvcOutputMetadata: BridgedDictionary { - public convenience init(temporalLayerId: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.temporalLayerId] = temporalLayerId.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _temporalLayerId = ReadWriteAttribute(jsObject: object, name: Strings.temporalLayerId) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var temporalLayerId: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/TexImageSource.swift b/Sources/DOMKit/WebIDL/TexImageSource.swift deleted file mode 100644 index d5750fff..00000000 --- a/Sources/DOMKit/WebIDL/TexImageSource.swift +++ /dev/null @@ -1,116 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_TexImageSource: ConvertibleToJSValue {} -extension HTMLCanvasElement: Any_TexImageSource {} -extension HTMLImageElement: Any_TexImageSource {} -extension HTMLVideoElement: Any_TexImageSource {} -extension ImageBitmap: Any_TexImageSource {} -extension ImageData: Any_TexImageSource {} -extension OffscreenCanvas: Any_TexImageSource {} -extension VideoFrame: Any_TexImageSource {} - -public enum TexImageSource: JSValueCompatible, Any_TexImageSource { - case htmlCanvasElement(HTMLCanvasElement) - case htmlImageElement(HTMLImageElement) - case htmlVideoElement(HTMLVideoElement) - case imageBitmap(ImageBitmap) - case imageData(ImageData) - case offscreenCanvas(OffscreenCanvas) - case videoFrame(VideoFrame) - - var htmlCanvasElement: HTMLCanvasElement? { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement - default: return nil - } - } - - var htmlImageElement: HTMLImageElement? { - switch self { - case let .htmlImageElement(htmlImageElement): return htmlImageElement - default: return nil - } - } - - var htmlVideoElement: HTMLVideoElement? { - switch self { - case let .htmlVideoElement(htmlVideoElement): return htmlVideoElement - default: return nil - } - } - - var imageBitmap: ImageBitmap? { - switch self { - case let .imageBitmap(imageBitmap): return imageBitmap - default: return nil - } - } - - var imageData: ImageData? { - switch self { - case let .imageData(imageData): return imageData - default: return nil - } - } - - var offscreenCanvas: OffscreenCanvas? { - switch self { - case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas - default: return nil - } - } - - var videoFrame: VideoFrame? { - switch self { - case let .videoFrame(videoFrame): return videoFrame - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { - return .htmlCanvasElement(htmlCanvasElement) - } - if let htmlImageElement: HTMLImageElement = value.fromJSValue() { - return .htmlImageElement(htmlImageElement) - } - if let htmlVideoElement: HTMLVideoElement = value.fromJSValue() { - return .htmlVideoElement(htmlVideoElement) - } - if let imageBitmap: ImageBitmap = value.fromJSValue() { - return .imageBitmap(imageBitmap) - } - if let imageData: ImageData = value.fromJSValue() { - return .imageData(imageData) - } - if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { - return .offscreenCanvas(offscreenCanvas) - } - if let videoFrame: VideoFrame = value.fromJSValue() { - return .videoFrame(videoFrame) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .htmlCanvasElement(htmlCanvasElement): - return htmlCanvasElement.jsValue - case let .htmlImageElement(htmlImageElement): - return htmlImageElement.jsValue - case let .htmlVideoElement(htmlVideoElement): - return htmlVideoElement.jsValue - case let .imageBitmap(imageBitmap): - return imageBitmap.jsValue - case let .imageData(imageData): - return imageData.jsValue - case let .offscreenCanvas(offscreenCanvas): - return offscreenCanvas.jsValue - case let .videoFrame(videoFrame): - return videoFrame.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/ULongRange.swift b/Sources/DOMKit/WebIDL/ULongRange.swift deleted file mode 100644 index cf578d6c..00000000 --- a/Sources/DOMKit/WebIDL/ULongRange.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class ULongRange: BridgedDictionary { - public convenience init(max: UInt32, min: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.max] = max.jsValue - object[Strings.min] = min.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _max = ReadWriteAttribute(jsObject: object, name: Strings.max) - _min = ReadWriteAttribute(jsObject: object, name: Strings.min) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var max: UInt32 - - @ReadWriteAttribute - public var min: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/Uint32List.swift b/Sources/DOMKit/WebIDL/Uint32List.swift deleted file mode 100644 index e8a01699..00000000 --- a/Sources/DOMKit/WebIDL/Uint32List.swift +++ /dev/null @@ -1,46 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_Uint32List: ConvertibleToJSValue {} -extension Uint32Array: Any_Uint32List {} -extension Array: Any_Uint32List where Element == GLuint {} - -public enum Uint32List: JSValueCompatible, Any_Uint32List { - case uint32Array(Uint32Array) - case seq_of_GLuint([GLuint]) - - var uint32Array: Uint32Array? { - switch self { - case let .uint32Array(uint32Array): return uint32Array - default: return nil - } - } - - var seq_of_GLuint: [GLuint]? { - switch self { - case let .seq_of_GLuint(seq_of_GLuint): return seq_of_GLuint - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let uint32Array: Uint32Array = value.fromJSValue() { - return .uint32Array(uint32Array) - } - if let seq_of_GLuint: [GLuint] = value.fromJSValue() { - return .seq_of_GLuint(seq_of_GLuint) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .uint32Array(uint32Array): - return uint32Array.jsValue - case let .seq_of_GLuint(seq_of_GLuint): - return seq_of_GLuint.jsValue - } - } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift b/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift deleted file mode 100644 index 364fa134..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorPrimaries.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoColorPrimaries: JSString, JSValueCompatible { - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpace.swift b/Sources/DOMKit/WebIDL/VideoColorSpace.swift deleted file mode 100644 index 25b08860..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorSpace.swift +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoColorSpace: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoColorSpace].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _primaries = ReadonlyAttribute(jsObject: jsObject, name: Strings.primaries) - _transfer = ReadonlyAttribute(jsObject: jsObject, name: Strings.transfer) - _matrix = ReadonlyAttribute(jsObject: jsObject, name: Strings.matrix) - _fullRange = ReadonlyAttribute(jsObject: jsObject, name: Strings.fullRange) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var primaries: VideoColorPrimaries? - - @ReadonlyAttribute - public var transfer: VideoTransferCharacteristics? - - @ReadonlyAttribute - public var matrix: VideoMatrixCoefficients? - - @ReadonlyAttribute - public var fullRange: Bool? - - @inlinable public func toJSON() -> VideoColorSpaceInit { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift b/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift deleted file mode 100644 index 786cfccc..00000000 --- a/Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift +++ /dev/null @@ -1,35 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoColorSpaceInit: BridgedDictionary { - public convenience init(primaries: VideoColorPrimaries, transfer: VideoTransferCharacteristics, matrix: VideoMatrixCoefficients, fullRange: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.primaries] = primaries.jsValue - object[Strings.transfer] = transfer.jsValue - object[Strings.matrix] = matrix.jsValue - object[Strings.fullRange] = fullRange.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _primaries = ReadWriteAttribute(jsObject: object, name: Strings.primaries) - _transfer = ReadWriteAttribute(jsObject: object, name: Strings.transfer) - _matrix = ReadWriteAttribute(jsObject: object, name: Strings.matrix) - _fullRange = ReadWriteAttribute(jsObject: object, name: Strings.fullRange) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var primaries: VideoColorPrimaries - - @ReadWriteAttribute - public var transfer: VideoTransferCharacteristics - - @ReadWriteAttribute - public var matrix: VideoMatrixCoefficients - - @ReadWriteAttribute - public var fullRange: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoder.swift b/Sources/DOMKit/WebIDL/VideoDecoder.swift deleted file mode 100644 index 8f8900c2..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoDecoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoDecoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var decodeQueueSize: UInt32 - - @inlinable public func configure(config: VideoDecoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func decode(chunk: EncodedVideoChunk) { - let this = jsObject - _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: VideoDecoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: VideoDecoderConfig) async throws -> VideoDecoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift b/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift deleted file mode 100644 index 3e431877..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderConfig.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderConfig: BridgedDictionary { - public convenience init(codec: String, description: BufferSource, codedWidth: UInt32, codedHeight: UInt32, displayAspectWidth: UInt32, displayAspectHeight: UInt32, colorSpace: VideoColorSpaceInit, hardwareAcceleration: HardwareAcceleration, optimizeForLatency: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.description] = description.jsValue - object[Strings.codedWidth] = codedWidth.jsValue - object[Strings.codedHeight] = codedHeight.jsValue - object[Strings.displayAspectWidth] = displayAspectWidth.jsValue - object[Strings.displayAspectHeight] = displayAspectHeight.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue - object[Strings.optimizeForLatency] = optimizeForLatency.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _description = ReadWriteAttribute(jsObject: object, name: Strings.description) - _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) - _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) - _displayAspectWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectWidth) - _displayAspectHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayAspectHeight) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) - _optimizeForLatency = ReadWriteAttribute(jsObject: object, name: Strings.optimizeForLatency) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var description: BufferSource - - @ReadWriteAttribute - public var codedWidth: UInt32 - - @ReadWriteAttribute - public var codedHeight: UInt32 - - @ReadWriteAttribute - public var displayAspectWidth: UInt32 - - @ReadWriteAttribute - public var displayAspectHeight: UInt32 - - @ReadWriteAttribute - public var colorSpace: VideoColorSpaceInit - - @ReadWriteAttribute - public var hardwareAcceleration: HardwareAcceleration - - @ReadWriteAttribute - public var optimizeForLatency: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift b/Sources/DOMKit/WebIDL/VideoDecoderInit.swift deleted file mode 100644 index 0614f47e..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderInit: BridgedDictionary { - public convenience init(output: @escaping VideoFrameOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute1Void - public var output: VideoFrameOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift b/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift deleted file mode 100644 index 4d41da3d..00000000 --- a/Sources/DOMKit/WebIDL/VideoDecoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoDecoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: VideoDecoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: VideoDecoderConfig -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoder.swift b/Sources/DOMKit/WebIDL/VideoEncoder.swift deleted file mode 100644 index 2349c057..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoder: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoEncoder].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) - _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) - self.jsObject = jsObject - } - - @inlinable public convenience init(init: VideoEncoderInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) - } - - @ReadonlyAttribute - public var state: CodecState - - @ReadonlyAttribute - public var encodeQueueSize: UInt32 - - @inlinable public func configure(config: VideoEncoderConfig) { - let this = jsObject - _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) - } - - @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { - let this = jsObject - _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) - } - - @inlinable public func flush() -> JSPromise { - let this = jsObject - return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func flush() async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! - _ = try await _promise.value - } - - @inlinable public func reset() { - let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } - - @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { - let this = constructor - return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public static func isConfigSupported(config: VideoEncoderConfig) async throws -> VideoEncoderSupport { - let this = constructor - let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift b/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift deleted file mode 100644 index c6fdfd98..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderConfig.swift +++ /dev/null @@ -1,75 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderConfig: BridgedDictionary { - public convenience init(codec: String, width: UInt32, height: UInt32, displayWidth: UInt32, displayHeight: UInt32, bitrate: UInt64, framerate: Double, hardwareAcceleration: HardwareAcceleration, alpha: AlphaOption, scalabilityMode: String, bitrateMode: BitrateMode, latencyMode: LatencyMode) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.codec] = codec.jsValue - object[Strings.width] = width.jsValue - object[Strings.height] = height.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - object[Strings.bitrate] = bitrate.jsValue - object[Strings.framerate] = framerate.jsValue - object[Strings.hardwareAcceleration] = hardwareAcceleration.jsValue - object[Strings.alpha] = alpha.jsValue - object[Strings.scalabilityMode] = scalabilityMode.jsValue - object[Strings.bitrateMode] = bitrateMode.jsValue - object[Strings.latencyMode] = latencyMode.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _codec = ReadWriteAttribute(jsObject: object, name: Strings.codec) - _width = ReadWriteAttribute(jsObject: object, name: Strings.width) - _height = ReadWriteAttribute(jsObject: object, name: Strings.height) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - _bitrate = ReadWriteAttribute(jsObject: object, name: Strings.bitrate) - _framerate = ReadWriteAttribute(jsObject: object, name: Strings.framerate) - _hardwareAcceleration = ReadWriteAttribute(jsObject: object, name: Strings.hardwareAcceleration) - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _scalabilityMode = ReadWriteAttribute(jsObject: object, name: Strings.scalabilityMode) - _bitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.bitrateMode) - _latencyMode = ReadWriteAttribute(jsObject: object, name: Strings.latencyMode) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var codec: String - - @ReadWriteAttribute - public var width: UInt32 - - @ReadWriteAttribute - public var height: UInt32 - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 - - @ReadWriteAttribute - public var bitrate: UInt64 - - @ReadWriteAttribute - public var framerate: Double - - @ReadWriteAttribute - public var hardwareAcceleration: HardwareAcceleration - - @ReadWriteAttribute - public var alpha: AlphaOption - - @ReadWriteAttribute - public var scalabilityMode: String - - @ReadWriteAttribute - public var bitrateMode: BitrateMode - - @ReadWriteAttribute - public var latencyMode: LatencyMode -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift b/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift deleted file mode 100644 index 583d307c..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderEncodeOptions: BridgedDictionary { - public convenience init(keyFrame: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.keyFrame] = keyFrame.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var keyFrame: Bool -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift b/Sources/DOMKit/WebIDL/VideoEncoderInit.swift deleted file mode 100644 index f9859e1b..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderInit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderInit: BridgedDictionary { - public convenience init(output: @escaping EncodedVideoChunkOutputCallback, error: @escaping WebCodecsErrorCallback) { - let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute2Void[Strings.output, in: object] = output - ClosureAttribute1Void[Strings.error, in: object] = error - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) - _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) - super.init(unsafelyWrapping: object) - } - - @ClosureAttribute2Void - public var output: EncodedVideoChunkOutputCallback - - @ClosureAttribute1Void - public var error: WebCodecsErrorCallback -} diff --git a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift b/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift deleted file mode 100644 index f6419290..00000000 --- a/Sources/DOMKit/WebIDL/VideoEncoderSupport.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoEncoderSupport: BridgedDictionary { - public convenience init(supported: Bool, config: VideoEncoderConfig) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.supported] = supported.jsValue - object[Strings.config] = config.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) - _config = ReadWriteAttribute(jsObject: object, name: Strings.config) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var supported: Bool - - @ReadWriteAttribute - public var config: VideoEncoderConfig -} diff --git a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift deleted file mode 100644 index 9d325b8a..00000000 --- a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoFacingModeEnum: JSString, JSValueCompatible { - case user = "user" - case environment = "environment" - case left = "left" - case right = "right" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoFrame.swift b/Sources/DOMKit/WebIDL/VideoFrame.swift deleted file mode 100644 index 9743b3fc..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrame.swift +++ /dev/null @@ -1,89 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrame: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoFrame].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _format = ReadonlyAttribute(jsObject: jsObject, name: Strings.format) - _codedWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedWidth) - _codedHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedHeight) - _codedRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.codedRect) - _visibleRect = ReadonlyAttribute(jsObject: jsObject, name: Strings.visibleRect) - _displayWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayWidth) - _displayHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.displayHeight) - _duration = ReadonlyAttribute(jsObject: jsObject, name: Strings.duration) - _timestamp = ReadonlyAttribute(jsObject: jsObject, name: Strings.timestamp) - _colorSpace = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorSpace) - self.jsObject = jsObject - } - - @inlinable public convenience init(image: CanvasImageSource, init: VideoFrameInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [image.jsValue, `init`?.jsValue ?? .undefined])) - } - - @inlinable public convenience init(data: BufferSource, init: VideoFrameBufferInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data.jsValue, `init`.jsValue])) - } - - @ReadonlyAttribute - public var format: VideoPixelFormat? - - @ReadonlyAttribute - public var codedWidth: UInt32 - - @ReadonlyAttribute - public var codedHeight: UInt32 - - @ReadonlyAttribute - public var codedRect: DOMRectReadOnly? - - @ReadonlyAttribute - public var visibleRect: DOMRectReadOnly? - - @ReadonlyAttribute - public var displayWidth: UInt32 - - @ReadonlyAttribute - public var displayHeight: UInt32 - - @ReadonlyAttribute - public var duration: UInt64? - - @ReadonlyAttribute - public var timestamp: Int64? - - @ReadonlyAttribute - public var colorSpace: VideoColorSpace - - @inlinable public func allocationSize(options: VideoFrameCopyToOptions? = nil) -> UInt32 { - let this = jsObject - return this[Strings.allocationSize].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func copyTo(destination: BufferSource, options: VideoFrameCopyToOptions? = nil) async throws -> [PlaneLayout] { - let this = jsObject - let _promise: JSPromise = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func clone() -> Self { - let this = jsObject - return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) - } -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift b/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift deleted file mode 100644 index 0607012e..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift +++ /dev/null @@ -1,65 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameBufferInit: BridgedDictionary { - public convenience init(format: VideoPixelFormat, codedWidth: UInt32, codedHeight: UInt32, timestamp: Int64, duration: UInt64, layout: [PlaneLayout], visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32, colorSpace: VideoColorSpaceInit) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.format] = format.jsValue - object[Strings.codedWidth] = codedWidth.jsValue - object[Strings.codedHeight] = codedHeight.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.duration] = duration.jsValue - object[Strings.layout] = layout.jsValue - object[Strings.visibleRect] = visibleRect.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _format = ReadWriteAttribute(jsObject: object, name: Strings.format) - _codedWidth = ReadWriteAttribute(jsObject: object, name: Strings.codedWidth) - _codedHeight = ReadWriteAttribute(jsObject: object, name: Strings.codedHeight) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) - _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var format: VideoPixelFormat - - @ReadWriteAttribute - public var codedWidth: UInt32 - - @ReadWriteAttribute - public var codedHeight: UInt32 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var layout: [PlaneLayout] - - @ReadWriteAttribute - public var visibleRect: DOMRectInit - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 - - @ReadWriteAttribute - public var colorSpace: VideoColorSpaceInit -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift b/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift deleted file mode 100644 index a86c57dd..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameCopyToOptions: BridgedDictionary { - public convenience init(rect: DOMRectInit, layout: [PlaneLayout]) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.rect] = rect.jsValue - object[Strings.layout] = layout.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _rect = ReadWriteAttribute(jsObject: object, name: Strings.rect) - _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var rect: DOMRectInit - - @ReadWriteAttribute - public var layout: [PlaneLayout] -} diff --git a/Sources/DOMKit/WebIDL/VideoFrameInit.swift b/Sources/DOMKit/WebIDL/VideoFrameInit.swift deleted file mode 100644 index a70eaea1..00000000 --- a/Sources/DOMKit/WebIDL/VideoFrameInit.swift +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class VideoFrameInit: BridgedDictionary { - public convenience init(duration: UInt64, timestamp: Int64, alpha: AlphaOption, visibleRect: DOMRectInit, displayWidth: UInt32, displayHeight: UInt32) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.duration] = duration.jsValue - object[Strings.timestamp] = timestamp.jsValue - object[Strings.alpha] = alpha.jsValue - object[Strings.visibleRect] = visibleRect.jsValue - object[Strings.displayWidth] = displayWidth.jsValue - object[Strings.displayHeight] = displayHeight.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _duration = ReadWriteAttribute(jsObject: object, name: Strings.duration) - _timestamp = ReadWriteAttribute(jsObject: object, name: Strings.timestamp) - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _visibleRect = ReadWriteAttribute(jsObject: object, name: Strings.visibleRect) - _displayWidth = ReadWriteAttribute(jsObject: object, name: Strings.displayWidth) - _displayHeight = ReadWriteAttribute(jsObject: object, name: Strings.displayHeight) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var duration: UInt64 - - @ReadWriteAttribute - public var timestamp: Int64 - - @ReadWriteAttribute - public var alpha: AlphaOption - - @ReadWriteAttribute - public var visibleRect: DOMRectInit - - @ReadWriteAttribute - public var displayWidth: UInt32 - - @ReadWriteAttribute - public var displayHeight: UInt32 -} diff --git a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift b/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift deleted file mode 100644 index 58f11f73..00000000 --- a/Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift +++ /dev/null @@ -1,24 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoMatrixCoefficients: JSString, JSValueCompatible { - case rgb = "rgb" - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift b/Sources/DOMKit/WebIDL/VideoPixelFormat.swift deleted file mode 100644 index 1c8dea1f..00000000 --- a/Sources/DOMKit/WebIDL/VideoPixelFormat.swift +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoPixelFormat: JSString, JSValueCompatible { - case i420 = "I420" - case i420A = "I420A" - case i422 = "I422" - case i444 = "I444" - case nV12 = "NV12" - case rGBA = "RGBA" - case rGBX = "RGBX" - case bGRA = "BGRA" - case bGRX = "BGRX" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift deleted file mode 100644 index 78582a71..00000000 --- a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoResizeModeEnum: JSString, JSValueCompatible { - case none = "none" - case cropAndScale = "crop-and-scale" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift b/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift deleted file mode 100644 index e8407da6..00000000 --- a/Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum VideoTransferCharacteristics: JSString, JSValueCompatible { - case bt709 = "bt709" - case smpte170m = "smpte170m" - case iec6196621 = "iec61966-2-1" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift deleted file mode 100644 index 3ee19c40..00000000 --- a/Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGL2RenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGL2RenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift deleted file mode 100644 index 2071c82e..00000000 --- a/Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift +++ /dev/null @@ -1,1162 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGL2RenderingContextBase: JSBridgedClass {} -public extension WebGL2RenderingContextBase { - @inlinable static var READ_BUFFER: GLenum { 0x0C02 } - - @inlinable static var UNPACK_ROW_LENGTH: GLenum { 0x0CF2 } - - @inlinable static var UNPACK_SKIP_ROWS: GLenum { 0x0CF3 } - - @inlinable static var UNPACK_SKIP_PIXELS: GLenum { 0x0CF4 } - - @inlinable static var PACK_ROW_LENGTH: GLenum { 0x0D02 } - - @inlinable static var PACK_SKIP_ROWS: GLenum { 0x0D03 } - - @inlinable static var PACK_SKIP_PIXELS: GLenum { 0x0D04 } - - @inlinable static var COLOR: GLenum { 0x1800 } - - @inlinable static var DEPTH: GLenum { 0x1801 } - - @inlinable static var STENCIL: GLenum { 0x1802 } - - @inlinable static var RED: GLenum { 0x1903 } - - @inlinable static var RGB8: GLenum { 0x8051 } - - @inlinable static var RGBA8: GLenum { 0x8058 } - - @inlinable static var RGB10_A2: GLenum { 0x8059 } - - @inlinable static var TEXTURE_BINDING_3D: GLenum { 0x806A } - - @inlinable static var UNPACK_SKIP_IMAGES: GLenum { 0x806D } - - @inlinable static var UNPACK_IMAGE_HEIGHT: GLenum { 0x806E } - - @inlinable static var TEXTURE_3D: GLenum { 0x806F } - - @inlinable static var TEXTURE_WRAP_R: GLenum { 0x8072 } - - @inlinable static var MAX_3D_TEXTURE_SIZE: GLenum { 0x8073 } - - @inlinable static var UNSIGNED_INT_2_10_10_10_REV: GLenum { 0x8368 } - - @inlinable static var MAX_ELEMENTS_VERTICES: GLenum { 0x80E8 } - - @inlinable static var MAX_ELEMENTS_INDICES: GLenum { 0x80E9 } - - @inlinable static var TEXTURE_MIN_LOD: GLenum { 0x813A } - - @inlinable static var TEXTURE_MAX_LOD: GLenum { 0x813B } - - @inlinable static var TEXTURE_BASE_LEVEL: GLenum { 0x813C } - - @inlinable static var TEXTURE_MAX_LEVEL: GLenum { 0x813D } - - @inlinable static var MIN: GLenum { 0x8007 } - - @inlinable static var MAX: GLenum { 0x8008 } - - @inlinable static var DEPTH_COMPONENT24: GLenum { 0x81A6 } - - @inlinable static var MAX_TEXTURE_LOD_BIAS: GLenum { 0x84FD } - - @inlinable static var TEXTURE_COMPARE_MODE: GLenum { 0x884C } - - @inlinable static var TEXTURE_COMPARE_FUNC: GLenum { 0x884D } - - @inlinable static var CURRENT_QUERY: GLenum { 0x8865 } - - @inlinable static var QUERY_RESULT: GLenum { 0x8866 } - - @inlinable static var QUERY_RESULT_AVAILABLE: GLenum { 0x8867 } - - @inlinable static var STREAM_READ: GLenum { 0x88E1 } - - @inlinable static var STREAM_COPY: GLenum { 0x88E2 } - - @inlinable static var STATIC_READ: GLenum { 0x88E5 } - - @inlinable static var STATIC_COPY: GLenum { 0x88E6 } - - @inlinable static var DYNAMIC_READ: GLenum { 0x88E9 } - - @inlinable static var DYNAMIC_COPY: GLenum { 0x88EA } - - @inlinable static var MAX_DRAW_BUFFERS: GLenum { 0x8824 } - - @inlinable static var DRAW_BUFFER0: GLenum { 0x8825 } - - @inlinable static var DRAW_BUFFER1: GLenum { 0x8826 } - - @inlinable static var DRAW_BUFFER2: GLenum { 0x8827 } - - @inlinable static var DRAW_BUFFER3: GLenum { 0x8828 } - - @inlinable static var DRAW_BUFFER4: GLenum { 0x8829 } - - @inlinable static var DRAW_BUFFER5: GLenum { 0x882A } - - @inlinable static var DRAW_BUFFER6: GLenum { 0x882B } - - @inlinable static var DRAW_BUFFER7: GLenum { 0x882C } - - @inlinable static var DRAW_BUFFER8: GLenum { 0x882D } - - @inlinable static var DRAW_BUFFER9: GLenum { 0x882E } - - @inlinable static var DRAW_BUFFER10: GLenum { 0x882F } - - @inlinable static var DRAW_BUFFER11: GLenum { 0x8830 } - - @inlinable static var DRAW_BUFFER12: GLenum { 0x8831 } - - @inlinable static var DRAW_BUFFER13: GLenum { 0x8832 } - - @inlinable static var DRAW_BUFFER14: GLenum { 0x8833 } - - @inlinable static var DRAW_BUFFER15: GLenum { 0x8834 } - - @inlinable static var MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8B49 } - - @inlinable static var MAX_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8B4A } - - @inlinable static var SAMPLER_3D: GLenum { 0x8B5F } - - @inlinable static var SAMPLER_2D_SHADOW: GLenum { 0x8B62 } - - @inlinable static var FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum { 0x8B8B } - - @inlinable static var PIXEL_PACK_BUFFER: GLenum { 0x88EB } - - @inlinable static var PIXEL_UNPACK_BUFFER: GLenum { 0x88EC } - - @inlinable static var PIXEL_PACK_BUFFER_BINDING: GLenum { 0x88ED } - - @inlinable static var PIXEL_UNPACK_BUFFER_BINDING: GLenum { 0x88EF } - - @inlinable static var FLOAT_MAT2x3: GLenum { 0x8B65 } - - @inlinable static var FLOAT_MAT2x4: GLenum { 0x8B66 } - - @inlinable static var FLOAT_MAT3x2: GLenum { 0x8B67 } - - @inlinable static var FLOAT_MAT3x4: GLenum { 0x8B68 } - - @inlinable static var FLOAT_MAT4x2: GLenum { 0x8B69 } - - @inlinable static var FLOAT_MAT4x3: GLenum { 0x8B6A } - - @inlinable static var SRGB: GLenum { 0x8C40 } - - @inlinable static var SRGB8: GLenum { 0x8C41 } - - @inlinable static var SRGB8_ALPHA8: GLenum { 0x8C43 } - - @inlinable static var COMPARE_REF_TO_TEXTURE: GLenum { 0x884E } - - @inlinable static var RGBA32F: GLenum { 0x8814 } - - @inlinable static var RGB32F: GLenum { 0x8815 } - - @inlinable static var RGBA16F: GLenum { 0x881A } - - @inlinable static var RGB16F: GLenum { 0x881B } - - @inlinable static var VERTEX_ATTRIB_ARRAY_INTEGER: GLenum { 0x88FD } - - @inlinable static var MAX_ARRAY_TEXTURE_LAYERS: GLenum { 0x88FF } - - @inlinable static var MIN_PROGRAM_TEXEL_OFFSET: GLenum { 0x8904 } - - @inlinable static var MAX_PROGRAM_TEXEL_OFFSET: GLenum { 0x8905 } - - @inlinable static var MAX_VARYING_COMPONENTS: GLenum { 0x8B4B } - - @inlinable static var TEXTURE_2D_ARRAY: GLenum { 0x8C1A } - - @inlinable static var TEXTURE_BINDING_2D_ARRAY: GLenum { 0x8C1D } - - @inlinable static var R11F_G11F_B10F: GLenum { 0x8C3A } - - @inlinable static var UNSIGNED_INT_10F_11F_11F_REV: GLenum { 0x8C3B } - - @inlinable static var RGB9_E5: GLenum { 0x8C3D } - - @inlinable static var UNSIGNED_INT_5_9_9_9_REV: GLenum { 0x8C3E } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum { 0x8C7F } - - @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum { 0x8C80 } - - @inlinable static var TRANSFORM_FEEDBACK_VARYINGS: GLenum { 0x8C83 } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_START: GLenum { 0x8C84 } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum { 0x8C85 } - - @inlinable static var TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum { 0x8C88 } - - @inlinable static var RASTERIZER_DISCARD: GLenum { 0x8C89 } - - @inlinable static var MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum { 0x8C8A } - - @inlinable static var MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum { 0x8C8B } - - @inlinable static var INTERLEAVED_ATTRIBS: GLenum { 0x8C8C } - - @inlinable static var SEPARATE_ATTRIBS: GLenum { 0x8C8D } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER: GLenum { 0x8C8E } - - @inlinable static var TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum { 0x8C8F } - - @inlinable static var RGBA32UI: GLenum { 0x8D70 } - - @inlinable static var RGB32UI: GLenum { 0x8D71 } - - @inlinable static var RGBA16UI: GLenum { 0x8D76 } - - @inlinable static var RGB16UI: GLenum { 0x8D77 } - - @inlinable static var RGBA8UI: GLenum { 0x8D7C } - - @inlinable static var RGB8UI: GLenum { 0x8D7D } - - @inlinable static var RGBA32I: GLenum { 0x8D82 } - - @inlinable static var RGB32I: GLenum { 0x8D83 } - - @inlinable static var RGBA16I: GLenum { 0x8D88 } - - @inlinable static var RGB16I: GLenum { 0x8D89 } - - @inlinable static var RGBA8I: GLenum { 0x8D8E } - - @inlinable static var RGB8I: GLenum { 0x8D8F } - - @inlinable static var RED_INTEGER: GLenum { 0x8D94 } - - @inlinable static var RGB_INTEGER: GLenum { 0x8D98 } - - @inlinable static var RGBA_INTEGER: GLenum { 0x8D99 } - - @inlinable static var SAMPLER_2D_ARRAY: GLenum { 0x8DC1 } - - @inlinable static var SAMPLER_2D_ARRAY_SHADOW: GLenum { 0x8DC4 } - - @inlinable static var SAMPLER_CUBE_SHADOW: GLenum { 0x8DC5 } - - @inlinable static var UNSIGNED_INT_VEC2: GLenum { 0x8DC6 } - - @inlinable static var UNSIGNED_INT_VEC3: GLenum { 0x8DC7 } - - @inlinable static var UNSIGNED_INT_VEC4: GLenum { 0x8DC8 } - - @inlinable static var INT_SAMPLER_2D: GLenum { 0x8DCA } - - @inlinable static var INT_SAMPLER_3D: GLenum { 0x8DCB } - - @inlinable static var INT_SAMPLER_CUBE: GLenum { 0x8DCC } - - @inlinable static var INT_SAMPLER_2D_ARRAY: GLenum { 0x8DCF } - - @inlinable static var UNSIGNED_INT_SAMPLER_2D: GLenum { 0x8DD2 } - - @inlinable static var UNSIGNED_INT_SAMPLER_3D: GLenum { 0x8DD3 } - - @inlinable static var UNSIGNED_INT_SAMPLER_CUBE: GLenum { 0x8DD4 } - - @inlinable static var UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum { 0x8DD7 } - - @inlinable static var DEPTH_COMPONENT32F: GLenum { 0x8CAC } - - @inlinable static var DEPTH32F_STENCIL8: GLenum { 0x8CAD } - - @inlinable static var FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum { 0x8DAD } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum { 0x8210 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum { 0x8211 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum { 0x8212 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum { 0x8213 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum { 0x8214 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum { 0x8215 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum { 0x8216 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum { 0x8217 } - - @inlinable static var FRAMEBUFFER_DEFAULT: GLenum { 0x8218 } - - @inlinable static var UNSIGNED_INT_24_8: GLenum { 0x84FA } - - @inlinable static var DEPTH24_STENCIL8: GLenum { 0x88F0 } - - @inlinable static var UNSIGNED_NORMALIZED: GLenum { 0x8C17 } - - @inlinable static var DRAW_FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } - - @inlinable static var READ_FRAMEBUFFER: GLenum { 0x8CA8 } - - @inlinable static var DRAW_FRAMEBUFFER: GLenum { 0x8CA9 } - - @inlinable static var READ_FRAMEBUFFER_BINDING: GLenum { 0x8CAA } - - @inlinable static var RENDERBUFFER_SAMPLES: GLenum { 0x8CAB } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum { 0x8CD4 } - - @inlinable static var MAX_COLOR_ATTACHMENTS: GLenum { 0x8CDF } - - @inlinable static var COLOR_ATTACHMENT1: GLenum { 0x8CE1 } - - @inlinable static var COLOR_ATTACHMENT2: GLenum { 0x8CE2 } - - @inlinable static var COLOR_ATTACHMENT3: GLenum { 0x8CE3 } - - @inlinable static var COLOR_ATTACHMENT4: GLenum { 0x8CE4 } - - @inlinable static var COLOR_ATTACHMENT5: GLenum { 0x8CE5 } - - @inlinable static var COLOR_ATTACHMENT6: GLenum { 0x8CE6 } - - @inlinable static var COLOR_ATTACHMENT7: GLenum { 0x8CE7 } - - @inlinable static var COLOR_ATTACHMENT8: GLenum { 0x8CE8 } - - @inlinable static var COLOR_ATTACHMENT9: GLenum { 0x8CE9 } - - @inlinable static var COLOR_ATTACHMENT10: GLenum { 0x8CEA } - - @inlinable static var COLOR_ATTACHMENT11: GLenum { 0x8CEB } - - @inlinable static var COLOR_ATTACHMENT12: GLenum { 0x8CEC } - - @inlinable static var COLOR_ATTACHMENT13: GLenum { 0x8CED } - - @inlinable static var COLOR_ATTACHMENT14: GLenum { 0x8CEE } - - @inlinable static var COLOR_ATTACHMENT15: GLenum { 0x8CEF } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum { 0x8D56 } - - @inlinable static var MAX_SAMPLES: GLenum { 0x8D57 } - - @inlinable static var HALF_FLOAT: GLenum { 0x140B } - - @inlinable static var RG: GLenum { 0x8227 } - - @inlinable static var RG_INTEGER: GLenum { 0x8228 } - - @inlinable static var R8: GLenum { 0x8229 } - - @inlinable static var RG8: GLenum { 0x822B } - - @inlinable static var R16F: GLenum { 0x822D } - - @inlinable static var R32F: GLenum { 0x822E } - - @inlinable static var RG16F: GLenum { 0x822F } - - @inlinable static var RG32F: GLenum { 0x8230 } - - @inlinable static var R8I: GLenum { 0x8231 } - - @inlinable static var R8UI: GLenum { 0x8232 } - - @inlinable static var R16I: GLenum { 0x8233 } - - @inlinable static var R16UI: GLenum { 0x8234 } - - @inlinable static var R32I: GLenum { 0x8235 } - - @inlinable static var R32UI: GLenum { 0x8236 } - - @inlinable static var RG8I: GLenum { 0x8237 } - - @inlinable static var RG8UI: GLenum { 0x8238 } - - @inlinable static var RG16I: GLenum { 0x8239 } - - @inlinable static var RG16UI: GLenum { 0x823A } - - @inlinable static var RG32I: GLenum { 0x823B } - - @inlinable static var RG32UI: GLenum { 0x823C } - - @inlinable static var VERTEX_ARRAY_BINDING: GLenum { 0x85B5 } - - @inlinable static var R8_SNORM: GLenum { 0x8F94 } - - @inlinable static var RG8_SNORM: GLenum { 0x8F95 } - - @inlinable static var RGB8_SNORM: GLenum { 0x8F96 } - - @inlinable static var RGBA8_SNORM: GLenum { 0x8F97 } - - @inlinable static var SIGNED_NORMALIZED: GLenum { 0x8F9C } - - @inlinable static var COPY_READ_BUFFER: GLenum { 0x8F36 } - - @inlinable static var COPY_WRITE_BUFFER: GLenum { 0x8F37 } - - @inlinable static var COPY_READ_BUFFER_BINDING: GLenum { 0x8F36 } - - @inlinable static var COPY_WRITE_BUFFER_BINDING: GLenum { 0x8F37 } - - @inlinable static var UNIFORM_BUFFER: GLenum { 0x8A11 } - - @inlinable static var UNIFORM_BUFFER_BINDING: GLenum { 0x8A28 } - - @inlinable static var UNIFORM_BUFFER_START: GLenum { 0x8A29 } - - @inlinable static var UNIFORM_BUFFER_SIZE: GLenum { 0x8A2A } - - @inlinable static var MAX_VERTEX_UNIFORM_BLOCKS: GLenum { 0x8A2B } - - @inlinable static var MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum { 0x8A2D } - - @inlinable static var MAX_COMBINED_UNIFORM_BLOCKS: GLenum { 0x8A2E } - - @inlinable static var MAX_UNIFORM_BUFFER_BINDINGS: GLenum { 0x8A2F } - - @inlinable static var MAX_UNIFORM_BLOCK_SIZE: GLenum { 0x8A30 } - - @inlinable static var MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum { 0x8A31 } - - @inlinable static var MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum { 0x8A33 } - - @inlinable static var UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum { 0x8A34 } - - @inlinable static var ACTIVE_UNIFORM_BLOCKS: GLenum { 0x8A36 } - - @inlinable static var UNIFORM_TYPE: GLenum { 0x8A37 } - - @inlinable static var UNIFORM_SIZE: GLenum { 0x8A38 } - - @inlinable static var UNIFORM_BLOCK_INDEX: GLenum { 0x8A3A } - - @inlinable static var UNIFORM_OFFSET: GLenum { 0x8A3B } - - @inlinable static var UNIFORM_ARRAY_STRIDE: GLenum { 0x8A3C } - - @inlinable static var UNIFORM_MATRIX_STRIDE: GLenum { 0x8A3D } - - @inlinable static var UNIFORM_IS_ROW_MAJOR: GLenum { 0x8A3E } - - @inlinable static var UNIFORM_BLOCK_BINDING: GLenum { 0x8A3F } - - @inlinable static var UNIFORM_BLOCK_DATA_SIZE: GLenum { 0x8A40 } - - @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum { 0x8A42 } - - @inlinable static var UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum { 0x8A43 } - - @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum { 0x8A44 } - - @inlinable static var UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum { 0x8A46 } - - @inlinable static var INVALID_INDEX: GLenum { 0xFFFF_FFFF } - - @inlinable static var MAX_VERTEX_OUTPUT_COMPONENTS: GLenum { 0x9122 } - - @inlinable static var MAX_FRAGMENT_INPUT_COMPONENTS: GLenum { 0x9125 } - - @inlinable static var MAX_SERVER_WAIT_TIMEOUT: GLenum { 0x9111 } - - @inlinable static var OBJECT_TYPE: GLenum { 0x9112 } - - @inlinable static var SYNC_CONDITION: GLenum { 0x9113 } - - @inlinable static var SYNC_STATUS: GLenum { 0x9114 } - - @inlinable static var SYNC_FLAGS: GLenum { 0x9115 } - - @inlinable static var SYNC_FENCE: GLenum { 0x9116 } - - @inlinable static var SYNC_GPU_COMMANDS_COMPLETE: GLenum { 0x9117 } - - @inlinable static var UNSIGNALED: GLenum { 0x9118 } - - @inlinable static var SIGNALED: GLenum { 0x9119 } - - @inlinable static var ALREADY_SIGNALED: GLenum { 0x911A } - - @inlinable static var TIMEOUT_EXPIRED: GLenum { 0x911B } - - @inlinable static var CONDITION_SATISFIED: GLenum { 0x911C } - - @inlinable static var WAIT_FAILED: GLenum { 0x911D } - - @inlinable static var SYNC_FLUSH_COMMANDS_BIT: GLenum { 0x0000_0001 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum { 0x88FE } - - @inlinable static var ANY_SAMPLES_PASSED: GLenum { 0x8C2F } - - @inlinable static var ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum { 0x8D6A } - - @inlinable static var SAMPLER_BINDING: GLenum { 0x8919 } - - @inlinable static var RGB10_A2UI: GLenum { 0x906F } - - @inlinable static var INT_2_10_10_10_REV: GLenum { 0x8D9F } - - @inlinable static var TRANSFORM_FEEDBACK: GLenum { 0x8E22 } - - @inlinable static var TRANSFORM_FEEDBACK_PAUSED: GLenum { 0x8E23 } - - @inlinable static var TRANSFORM_FEEDBACK_ACTIVE: GLenum { 0x8E24 } - - @inlinable static var TRANSFORM_FEEDBACK_BINDING: GLenum { 0x8E25 } - - @inlinable static var TEXTURE_IMMUTABLE_FORMAT: GLenum { 0x912F } - - @inlinable static var MAX_ELEMENT_INDEX: GLenum { 0x8D6B } - - @inlinable static var TEXTURE_IMMUTABLE_LEVELS: GLenum { 0x82DF } - - @inlinable static var TIMEOUT_IGNORED: GLint64 { -1 } - - @inlinable static var MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum { 0x9247 } - - @inlinable func copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr) { - let this = jsObject - _ = this[Strings.copyBufferSubData].function!(this: this, arguments: [readTarget.jsValue, writeTarget.jsValue, readOffset.jsValue, writeOffset.jsValue, size.jsValue]) - } - - @inlinable func getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset: GLuint? = nil, length: GLuint? = nil) { - let this = jsObject - _ = this[Strings.getBufferSubData].function!(this: this, arguments: [target.jsValue, srcByteOffset.jsValue, dstBuffer.jsValue, dstOffset?.jsValue ?? .undefined, length?.jsValue ?? .undefined]) - } - - @inlinable func blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum) { - let _arg0 = srcX0.jsValue - let _arg1 = srcY0.jsValue - let _arg2 = srcX1.jsValue - let _arg3 = srcY1.jsValue - let _arg4 = dstX0.jsValue - let _arg5 = dstY0.jsValue - let _arg6 = dstX1.jsValue - let _arg7 = dstY1.jsValue - let _arg8 = mask.jsValue - let _arg9 = filter.jsValue - let this = jsObject - _ = this[Strings.blitFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture?, level: GLint, layer: GLint) { - let this = jsObject - _ = this[Strings.framebufferTextureLayer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, texture.jsValue, level.jsValue, layer.jsValue]) - } - - @inlinable func invalidateFramebuffer(target: GLenum, attachments: [GLenum]) { - let this = jsObject - _ = this[Strings.invalidateFramebuffer].function!(this: this, arguments: [target.jsValue, attachments.jsValue]) - } - - @inlinable func invalidateSubFramebuffer(target: GLenum, attachments: [GLenum], x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = attachments.jsValue - let _arg2 = x.jsValue - let _arg3 = y.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let this = jsObject - _ = this[Strings.invalidateSubFramebuffer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func readBuffer(src: GLenum) { - let this = jsObject - _ = this[Strings.readBuffer].function!(this: this, arguments: [src.jsValue]) - } - - @inlinable func getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getInternalformatParameter].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.renderbufferStorageMultisample].function!(this: this, arguments: [target.jsValue, samples.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.texStorage2D].function!(this: this, arguments: [target.jsValue, levels.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = levels.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let this = jsObject - _ = this[Strings.texStorage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = source.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = srcData.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = format.jsValue - let _arg8 = type.jsValue - let _arg9 = srcData.jsValue - let _arg10 = srcOffset.jsValue - let this = jsObject - _ = this[Strings.texImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = type.jsValue - let _arg10 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = type.jsValue - let _arg10 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView?, srcOffset: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = type.jsValue - let _arg10 = srcData.jsValue - let _arg11 = srcOffset?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.texSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) - } - - @inlinable func copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = x.jsValue - let _arg6 = y.jsValue - let _arg7 = width.jsValue - let _arg8 = height.jsValue - let this = jsObject - _ = this[Strings.copyTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = imageSize.jsValue - let _arg8 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = depth.jsValue - let _arg6 = border.jsValue - let _arg7 = srcData.jsValue - let _arg8 = srcOffset?.jsValue ?? .undefined - let _arg9 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = imageSize.jsValue - let _arg10 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10]) - } - - @inlinable func compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = zoffset.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = depth.jsValue - let _arg8 = format.jsValue - let _arg9 = srcData.jsValue - let _arg10 = srcOffset?.jsValue ?? .undefined - let _arg11 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexSubImage3D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11]) - } - - @inlinable func getFragDataLocation(program: WebGLProgram, name: String) -> GLint { - let this = jsObject - return this[Strings.getFragDataLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func uniform1ui(location: WebGLUniformLocation?, v0: GLuint) { - let this = jsObject - _ = this[Strings.uniform1ui].function!(this: this, arguments: [location.jsValue, v0.jsValue]) - } - - @inlinable func uniform2ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint) { - let this = jsObject - _ = this[Strings.uniform2ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue]) - } - - @inlinable func uniform3ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint) { - let this = jsObject - _ = this[Strings.uniform3ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue]) - } - - @inlinable func uniform4ui(location: WebGLUniformLocation?, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint) { - let this = jsObject - _ = this[Strings.uniform4ui].function!(this: this, arguments: [location.jsValue, v0.jsValue, v1.jsValue, v2.jsValue, v3.jsValue]) - } - - @inlinable func uniform1uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform1uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform2uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform2uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform3uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform3uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform4uiv(location: WebGLUniformLocation?, data: Uint32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform4uiv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix3x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix3x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix4x2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix4x2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix2x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix2x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix4x3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix4x3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix2x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix2x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix3x4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix3x4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint) { - let this = jsObject - _ = this[Strings.vertexAttribI4i].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttribI4iv(index: GLuint, values: Int32List) { - let this = jsObject - _ = this[Strings.vertexAttribI4iv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) { - let this = jsObject - _ = this[Strings.vertexAttribI4ui].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttribI4uiv(index: GLuint, values: Uint32List) { - let this = jsObject - _ = this[Strings.vertexAttribI4uiv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr) { - let this = jsObject - _ = this[Strings.vertexAttribIPointer].function!(this: this, arguments: [index.jsValue, size.jsValue, type.jsValue, stride.jsValue, offset.jsValue]) - } - - @inlinable func vertexAttribDivisor(index: GLuint, divisor: GLuint) { - let this = jsObject - _ = this[Strings.vertexAttribDivisor].function!(this: this, arguments: [index.jsValue, divisor.jsValue]) - } - - @inlinable func drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei) { - let this = jsObject - _ = this[Strings.drawArraysInstanced].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue, instanceCount.jsValue]) - } - - @inlinable func drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei) { - let this = jsObject - _ = this[Strings.drawElementsInstanced].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue, instanceCount.jsValue]) - } - - @inlinable func drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr) { - let _arg0 = mode.jsValue - let _arg1 = start.jsValue - let _arg2 = end.jsValue - let _arg3 = count.jsValue - let _arg4 = type.jsValue - let _arg5 = offset.jsValue - let this = jsObject - _ = this[Strings.drawRangeElements].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func drawBuffers(buffers: [GLenum]) { - let this = jsObject - _ = this[Strings.drawBuffers].function!(this: this, arguments: [buffers.jsValue]) - } - - @inlinable func clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset: GLuint? = nil) { - let this = jsObject - _ = this[Strings.clearBufferfv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) - } - - @inlinable func clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset: GLuint? = nil) { - let this = jsObject - _ = this[Strings.clearBufferiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) - } - - @inlinable func clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset: GLuint? = nil) { - let this = jsObject - _ = this[Strings.clearBufferuiv].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, values.jsValue, srcOffset?.jsValue ?? .undefined]) - } - - @inlinable func clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint) { - let this = jsObject - _ = this[Strings.clearBufferfi].function!(this: this, arguments: [buffer.jsValue, drawbuffer.jsValue, depth.jsValue, stencil.jsValue]) - } - - @inlinable func createQuery() -> WebGLQuery? { - let this = jsObject - return this[Strings.createQuery].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteQuery(query: WebGLQuery?) { - let this = jsObject - _ = this[Strings.deleteQuery].function!(this: this, arguments: [query.jsValue]) - } - - @inlinable func isQuery(query: WebGLQuery?) -> GLboolean { - let this = jsObject - return this[Strings.isQuery].function!(this: this, arguments: [query.jsValue]).fromJSValue()! - } - - @inlinable func beginQuery(target: GLenum, query: WebGLQuery) { - let this = jsObject - _ = this[Strings.beginQuery].function!(this: this, arguments: [target.jsValue, query.jsValue]) - } - - @inlinable func endQuery(target: GLenum) { - let this = jsObject - _ = this[Strings.endQuery].function!(this: this, arguments: [target.jsValue]) - } - - @inlinable func getQuery(target: GLenum, pname: GLenum) -> WebGLQuery? { - let this = jsObject - return this[Strings.getQuery].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getQueryParameter(query: WebGLQuery, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getQueryParameter].function!(this: this, arguments: [query.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func createSampler() -> WebGLSampler? { - let this = jsObject - return this[Strings.createSampler].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteSampler(sampler: WebGLSampler?) { - let this = jsObject - _ = this[Strings.deleteSampler].function!(this: this, arguments: [sampler.jsValue]) - } - - @inlinable func isSampler(sampler: WebGLSampler?) -> GLboolean { - let this = jsObject - return this[Strings.isSampler].function!(this: this, arguments: [sampler.jsValue]).fromJSValue()! - } - - @inlinable func bindSampler(unit: GLuint, sampler: WebGLSampler?) { - let this = jsObject - _ = this[Strings.bindSampler].function!(this: this, arguments: [unit.jsValue, sampler.jsValue]) - } - - @inlinable func samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.samplerParameteri].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat) { - let this = jsObject - _ = this[Strings.samplerParameterf].function!(this: this, arguments: [sampler.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func getSamplerParameter(sampler: WebGLSampler, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getSamplerParameter].function!(this: this, arguments: [sampler.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func fenceSync(condition: GLenum, flags: GLbitfield) -> WebGLSync? { - let this = jsObject - return this[Strings.fenceSync].function!(this: this, arguments: [condition.jsValue, flags.jsValue]).fromJSValue()! - } - - @inlinable func isSync(sync: WebGLSync?) -> GLboolean { - let this = jsObject - return this[Strings.isSync].function!(this: this, arguments: [sync.jsValue]).fromJSValue()! - } - - @inlinable func deleteSync(sync: WebGLSync?) { - let this = jsObject - _ = this[Strings.deleteSync].function!(this: this, arguments: [sync.jsValue]) - } - - @inlinable func clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64) -> GLenum { - let this = jsObject - return this[Strings.clientWaitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]).fromJSValue()! - } - - @inlinable func waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64) { - let this = jsObject - _ = this[Strings.waitSync].function!(this: this, arguments: [sync.jsValue, flags.jsValue, timeout.jsValue]) - } - - @inlinable func getSyncParameter(sync: WebGLSync, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getSyncParameter].function!(this: this, arguments: [sync.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func createTransformFeedback() -> WebGLTransformFeedback? { - let this = jsObject - return this[Strings.createTransformFeedback].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteTransformFeedback(tf: WebGLTransformFeedback?) { - let this = jsObject - _ = this[Strings.deleteTransformFeedback].function!(this: this, arguments: [tf.jsValue]) - } - - @inlinable func isTransformFeedback(tf: WebGLTransformFeedback?) -> GLboolean { - let this = jsObject - return this[Strings.isTransformFeedback].function!(this: this, arguments: [tf.jsValue]).fromJSValue()! - } - - @inlinable func bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback?) { - let this = jsObject - _ = this[Strings.bindTransformFeedback].function!(this: this, arguments: [target.jsValue, tf.jsValue]) - } - - @inlinable func beginTransformFeedback(primitiveMode: GLenum) { - let this = jsObject - _ = this[Strings.beginTransformFeedback].function!(this: this, arguments: [primitiveMode.jsValue]) - } - - @inlinable func endTransformFeedback() { - let this = jsObject - _ = this[Strings.endTransformFeedback].function!(this: this, arguments: []) - } - - @inlinable func transformFeedbackVaryings(program: WebGLProgram, varyings: [String], bufferMode: GLenum) { - let this = jsObject - _ = this[Strings.transformFeedbackVaryings].function!(this: this, arguments: [program.jsValue, varyings.jsValue, bufferMode.jsValue]) - } - - @inlinable func getTransformFeedbackVarying(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getTransformFeedbackVarying].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func pauseTransformFeedback() { - let this = jsObject - _ = this[Strings.pauseTransformFeedback].function!(this: this, arguments: []) - } - - @inlinable func resumeTransformFeedback() { - let this = jsObject - _ = this[Strings.resumeTransformFeedback].function!(this: this, arguments: []) - } - - @inlinable func bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.bindBufferBase].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue]) - } - - @inlinable func bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer?, offset: GLintptr, size: GLsizeiptr) { - let this = jsObject - _ = this[Strings.bindBufferRange].function!(this: this, arguments: [target.jsValue, index.jsValue, buffer.jsValue, offset.jsValue, size.jsValue]) - } - - @inlinable func getIndexedParameter(target: GLenum, index: GLuint) -> JSValue { - let this = jsObject - return this[Strings.getIndexedParameter].function!(this: this, arguments: [target.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getUniformIndices(program: WebGLProgram, uniformNames: [String]) -> [GLuint]? { - let this = jsObject - return this[Strings.getUniformIndices].function!(this: this, arguments: [program.jsValue, uniformNames.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniforms(program: WebGLProgram, uniformIndices: [GLuint], pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getActiveUniforms].function!(this: this, arguments: [program.jsValue, uniformIndices.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getUniformBlockIndex(program: WebGLProgram, uniformBlockName: String) -> GLuint { - let this = jsObject - return this[Strings.getUniformBlockIndex].function!(this: this, arguments: [program.jsValue, uniformBlockName.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getActiveUniformBlockParameter].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint) -> String? { - let this = jsObject - return this[Strings.getActiveUniformBlockName].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue]).fromJSValue()! - } - - @inlinable func uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint) { - let this = jsObject - _ = this[Strings.uniformBlockBinding].function!(this: this, arguments: [program.jsValue, uniformBlockIndex.jsValue, uniformBlockBinding.jsValue]) - } - - @inlinable func createVertexArray() -> WebGLVertexArrayObject? { - let this = jsObject - return this[Strings.createVertexArray].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func deleteVertexArray(vertexArray: WebGLVertexArrayObject?) { - let this = jsObject - _ = this[Strings.deleteVertexArray].function!(this: this, arguments: [vertexArray.jsValue]) - } - - @inlinable func isVertexArray(vertexArray: WebGLVertexArrayObject?) -> GLboolean { - let this = jsObject - return this[Strings.isVertexArray].function!(this: this, arguments: [vertexArray.jsValue]).fromJSValue()! - } - - @inlinable func bindVertexArray(array: WebGLVertexArrayObject?) { - let this = jsObject - _ = this[Strings.bindVertexArray].function!(this: this, arguments: [array.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift deleted file mode 100644 index 659213d5..00000000 --- a/Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift +++ /dev/null @@ -1,317 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGL2RenderingContextOverloads: JSBridgedClass {} -public extension WebGL2RenderingContextOverloads { - @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) - } - - @inlinable func bufferData(target: GLenum, srcData: BufferSource?, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue]) - } - - @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue]) - } - - @inlinable func bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length: GLuint? = nil) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, srcData.jsValue, usage.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) - } - - @inlinable func bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length: GLuint? = nil) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, dstByteOffset.jsValue, srcData.jsValue, srcOffset.jsValue, length?.jsValue ?? .undefined]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = format.jsValue - let _arg4 = type.jsValue - let _arg5 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = srcData.jsValue - let _arg9 = srcOffset.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pboOffset.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = srcData.jsValue - let _arg9 = srcOffset.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = imageSize.jsValue - let _arg7 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = srcData.jsValue - let _arg7 = srcOffset?.jsValue ?? .undefined - let _arg8 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = imageSize.jsValue - let _arg8 = offset.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset: GLuint? = nil, srcLengthOverride: GLuint? = nil) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = srcData.jsValue - let _arg8 = srcOffset?.jsValue ?? .undefined - let _arg9 = srcLengthOverride?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9]) - } - - @inlinable func uniform1fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform2fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform3fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform4fv(location: WebGLUniformLocation?, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform1iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform2iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform3iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniform4iv(location: WebGLUniformLocation?, data: Int32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, data: Float32List, srcOffset: GLuint? = nil, srcLength: GLuint? = nil) { - let this = jsObject - _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, data.jsValue, srcOffset?.jsValue ?? .undefined, srcLength?.jsValue ?? .undefined]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView?) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = dstData.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = offset.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = dstData.jsValue - let _arg7 = dstOffset.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift b/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift deleted file mode 100644 index 38991452..00000000 --- a/Sources/DOMKit/WebIDL/WebGLActiveInfo.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLActiveInfo: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLActiveInfo].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var size: GLint - - @ReadonlyAttribute - public var type: GLenum - - @ReadonlyAttribute - public var name: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLBuffer.swift b/Sources/DOMKit/WebIDL/WebGLBuffer.swift deleted file mode 100644 index c5217eb0..00000000 --- a/Sources/DOMKit/WebIDL/WebGLBuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLBuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLBuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift b/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift deleted file mode 100644 index 28853501..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextAttributes.swift +++ /dev/null @@ -1,60 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextAttributes: BridgedDictionary { - public convenience init(alpha: Bool, depth: Bool, stencil: Bool, antialias: Bool, premultipliedAlpha: Bool, preserveDrawingBuffer: Bool, powerPreference: WebGLPowerPreference, failIfMajorPerformanceCaveat: Bool, desynchronized: Bool) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - object[Strings.depth] = depth.jsValue - object[Strings.stencil] = stencil.jsValue - object[Strings.antialias] = antialias.jsValue - object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue - object[Strings.preserveDrawingBuffer] = preserveDrawingBuffer.jsValue - object[Strings.powerPreference] = powerPreference.jsValue - object[Strings.failIfMajorPerformanceCaveat] = failIfMajorPerformanceCaveat.jsValue - object[Strings.desynchronized] = desynchronized.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _depth = ReadWriteAttribute(jsObject: object, name: Strings.depth) - _stencil = ReadWriteAttribute(jsObject: object, name: Strings.stencil) - _antialias = ReadWriteAttribute(jsObject: object, name: Strings.antialias) - _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) - _preserveDrawingBuffer = ReadWriteAttribute(jsObject: object, name: Strings.preserveDrawingBuffer) - _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) - _failIfMajorPerformanceCaveat = ReadWriteAttribute(jsObject: object, name: Strings.failIfMajorPerformanceCaveat) - _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var alpha: Bool - - @ReadWriteAttribute - public var depth: Bool - - @ReadWriteAttribute - public var stencil: Bool - - @ReadWriteAttribute - public var antialias: Bool - - @ReadWriteAttribute - public var premultipliedAlpha: Bool - - @ReadWriteAttribute - public var preserveDrawingBuffer: Bool - - @ReadWriteAttribute - public var powerPreference: WebGLPowerPreference - - @ReadWriteAttribute - public var failIfMajorPerformanceCaveat: Bool - - @ReadWriteAttribute - public var desynchronized: Bool -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift b/Sources/DOMKit/WebIDL/WebGLContextEvent.swift deleted file mode 100644 index 20837070..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextEvent.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLContextEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _statusMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.statusMessage) - super.init(unsafelyWrapping: jsObject) - } - - @inlinable public convenience init(type: String, eventInit: WebGLContextEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInit?.jsValue ?? .undefined])) - } - - @ReadonlyAttribute - public var statusMessage: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift b/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift deleted file mode 100644 index 20c0c668..00000000 --- a/Sources/DOMKit/WebIDL/WebGLContextEventInit.swift +++ /dev/null @@ -1,20 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLContextEventInit: BridgedDictionary { - public convenience init(statusMessage: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.statusMessage] = statusMessage.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _statusMessage = ReadWriteAttribute(jsObject: object, name: Strings.statusMessage) - super.init(unsafelyWrapping: object) - } - - @ReadWriteAttribute - public var statusMessage: String -} diff --git a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift b/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift deleted file mode 100644 index 83d1af39..00000000 --- a/Sources/DOMKit/WebIDL/WebGLFramebuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLFramebuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLFramebuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLObject.swift b/Sources/DOMKit/WebIDL/WebGLObject.swift deleted file mode 100644 index c50d37fc..00000000 --- a/Sources/DOMKit/WebIDL/WebGLObject.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLObject: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLObject].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift b/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift deleted file mode 100644 index ce6b23f8..00000000 --- a/Sources/DOMKit/WebIDL/WebGLPowerPreference.swift +++ /dev/null @@ -1,23 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum WebGLPowerPreference: JSString, JSValueCompatible { - case `default` = "default" - case lowPower = "low-power" - case highPerformance = "high-performance" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} diff --git a/Sources/DOMKit/WebIDL/WebGLProgram.swift b/Sources/DOMKit/WebIDL/WebGLProgram.swift deleted file mode 100644 index e38d4a93..00000000 --- a/Sources/DOMKit/WebIDL/WebGLProgram.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLProgram: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLProgram].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLQuery.swift b/Sources/DOMKit/WebIDL/WebGLQuery.swift deleted file mode 100644 index 901356e4..00000000 --- a/Sources/DOMKit/WebIDL/WebGLQuery.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLQuery: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLQuery].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift b/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift deleted file mode 100644 index 3b364894..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLRenderbuffer: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift deleted file mode 100644 index f9919cbe..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContext.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLRenderingContext: JSBridgedClass, WebGLRenderingContextBase, WebGLRenderingContextOverloads { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderingContext].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift deleted file mode 100644 index c0baf5db..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift +++ /dev/null @@ -1,1217 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGLRenderingContextBase: JSBridgedClass {} -public extension WebGLRenderingContextBase { - @inlinable static var DEPTH_BUFFER_BIT: GLenum { 0x0000_0100 } - - @inlinable static var STENCIL_BUFFER_BIT: GLenum { 0x0000_0400 } - - @inlinable static var COLOR_BUFFER_BIT: GLenum { 0x0000_4000 } - - @inlinable static var POINTS: GLenum { 0x0000 } - - @inlinable static var LINES: GLenum { 0x0001 } - - @inlinable static var LINE_LOOP: GLenum { 0x0002 } - - @inlinable static var LINE_STRIP: GLenum { 0x0003 } - - @inlinable static var TRIANGLES: GLenum { 0x0004 } - - @inlinable static var TRIANGLE_STRIP: GLenum { 0x0005 } - - @inlinable static var TRIANGLE_FAN: GLenum { 0x0006 } - - @inlinable static var ZERO: GLenum { 0 } - - @inlinable static var ONE: GLenum { 1 } - - @inlinable static var SRC_COLOR: GLenum { 0x0300 } - - @inlinable static var ONE_MINUS_SRC_COLOR: GLenum { 0x0301 } - - @inlinable static var SRC_ALPHA: GLenum { 0x0302 } - - @inlinable static var ONE_MINUS_SRC_ALPHA: GLenum { 0x0303 } - - @inlinable static var DST_ALPHA: GLenum { 0x0304 } - - @inlinable static var ONE_MINUS_DST_ALPHA: GLenum { 0x0305 } - - @inlinable static var DST_COLOR: GLenum { 0x0306 } - - @inlinable static var ONE_MINUS_DST_COLOR: GLenum { 0x0307 } - - @inlinable static var SRC_ALPHA_SATURATE: GLenum { 0x0308 } - - @inlinable static var FUNC_ADD: GLenum { 0x8006 } - - @inlinable static var BLEND_EQUATION: GLenum { 0x8009 } - - @inlinable static var BLEND_EQUATION_RGB: GLenum { 0x8009 } - - @inlinable static var BLEND_EQUATION_ALPHA: GLenum { 0x883D } - - @inlinable static var FUNC_SUBTRACT: GLenum { 0x800A } - - @inlinable static var FUNC_REVERSE_SUBTRACT: GLenum { 0x800B } - - @inlinable static var BLEND_DST_RGB: GLenum { 0x80C8 } - - @inlinable static var BLEND_SRC_RGB: GLenum { 0x80C9 } - - @inlinable static var BLEND_DST_ALPHA: GLenum { 0x80CA } - - @inlinable static var BLEND_SRC_ALPHA: GLenum { 0x80CB } - - @inlinable static var CONSTANT_COLOR: GLenum { 0x8001 } - - @inlinable static var ONE_MINUS_CONSTANT_COLOR: GLenum { 0x8002 } - - @inlinable static var CONSTANT_ALPHA: GLenum { 0x8003 } - - @inlinable static var ONE_MINUS_CONSTANT_ALPHA: GLenum { 0x8004 } - - @inlinable static var BLEND_COLOR: GLenum { 0x8005 } - - @inlinable static var ARRAY_BUFFER: GLenum { 0x8892 } - - @inlinable static var ELEMENT_ARRAY_BUFFER: GLenum { 0x8893 } - - @inlinable static var ARRAY_BUFFER_BINDING: GLenum { 0x8894 } - - @inlinable static var ELEMENT_ARRAY_BUFFER_BINDING: GLenum { 0x8895 } - - @inlinable static var STREAM_DRAW: GLenum { 0x88E0 } - - @inlinable static var STATIC_DRAW: GLenum { 0x88E4 } - - @inlinable static var DYNAMIC_DRAW: GLenum { 0x88E8 } - - @inlinable static var BUFFER_SIZE: GLenum { 0x8764 } - - @inlinable static var BUFFER_USAGE: GLenum { 0x8765 } - - @inlinable static var CURRENT_VERTEX_ATTRIB: GLenum { 0x8626 } - - @inlinable static var FRONT: GLenum { 0x0404 } - - @inlinable static var BACK: GLenum { 0x0405 } - - @inlinable static var FRONT_AND_BACK: GLenum { 0x0408 } - - @inlinable static var CULL_FACE: GLenum { 0x0B44 } - - @inlinable static var BLEND: GLenum { 0x0BE2 } - - @inlinable static var DITHER: GLenum { 0x0BD0 } - - @inlinable static var STENCIL_TEST: GLenum { 0x0B90 } - - @inlinable static var DEPTH_TEST: GLenum { 0x0B71 } - - @inlinable static var SCISSOR_TEST: GLenum { 0x0C11 } - - @inlinable static var POLYGON_OFFSET_FILL: GLenum { 0x8037 } - - @inlinable static var SAMPLE_ALPHA_TO_COVERAGE: GLenum { 0x809E } - - @inlinable static var SAMPLE_COVERAGE: GLenum { 0x80A0 } - - @inlinable static var NO_ERROR: GLenum { 0 } - - @inlinable static var INVALID_ENUM: GLenum { 0x0500 } - - @inlinable static var INVALID_VALUE: GLenum { 0x0501 } - - @inlinable static var INVALID_OPERATION: GLenum { 0x0502 } - - @inlinable static var OUT_OF_MEMORY: GLenum { 0x0505 } - - @inlinable static var CW: GLenum { 0x0900 } - - @inlinable static var CCW: GLenum { 0x0901 } - - @inlinable static var LINE_WIDTH: GLenum { 0x0B21 } - - @inlinable static var ALIASED_POINT_SIZE_RANGE: GLenum { 0x846D } - - @inlinable static var ALIASED_LINE_WIDTH_RANGE: GLenum { 0x846E } - - @inlinable static var CULL_FACE_MODE: GLenum { 0x0B45 } - - @inlinable static var FRONT_FACE: GLenum { 0x0B46 } - - @inlinable static var DEPTH_RANGE: GLenum { 0x0B70 } - - @inlinable static var DEPTH_WRITEMASK: GLenum { 0x0B72 } - - @inlinable static var DEPTH_CLEAR_VALUE: GLenum { 0x0B73 } - - @inlinable static var DEPTH_FUNC: GLenum { 0x0B74 } - - @inlinable static var STENCIL_CLEAR_VALUE: GLenum { 0x0B91 } - - @inlinable static var STENCIL_FUNC: GLenum { 0x0B92 } - - @inlinable static var STENCIL_FAIL: GLenum { 0x0B94 } - - @inlinable static var STENCIL_PASS_DEPTH_FAIL: GLenum { 0x0B95 } - - @inlinable static var STENCIL_PASS_DEPTH_PASS: GLenum { 0x0B96 } - - @inlinable static var STENCIL_REF: GLenum { 0x0B97 } - - @inlinable static var STENCIL_VALUE_MASK: GLenum { 0x0B93 } - - @inlinable static var STENCIL_WRITEMASK: GLenum { 0x0B98 } - - @inlinable static var STENCIL_BACK_FUNC: GLenum { 0x8800 } - - @inlinable static var STENCIL_BACK_FAIL: GLenum { 0x8801 } - - @inlinable static var STENCIL_BACK_PASS_DEPTH_FAIL: GLenum { 0x8802 } - - @inlinable static var STENCIL_BACK_PASS_DEPTH_PASS: GLenum { 0x8803 } - - @inlinable static var STENCIL_BACK_REF: GLenum { 0x8CA3 } - - @inlinable static var STENCIL_BACK_VALUE_MASK: GLenum { 0x8CA4 } - - @inlinable static var STENCIL_BACK_WRITEMASK: GLenum { 0x8CA5 } - - @inlinable static var VIEWPORT: GLenum { 0x0BA2 } - - @inlinable static var SCISSOR_BOX: GLenum { 0x0C10 } - - @inlinable static var COLOR_CLEAR_VALUE: GLenum { 0x0C22 } - - @inlinable static var COLOR_WRITEMASK: GLenum { 0x0C23 } - - @inlinable static var UNPACK_ALIGNMENT: GLenum { 0x0CF5 } - - @inlinable static var PACK_ALIGNMENT: GLenum { 0x0D05 } - - @inlinable static var MAX_TEXTURE_SIZE: GLenum { 0x0D33 } - - @inlinable static var MAX_VIEWPORT_DIMS: GLenum { 0x0D3A } - - @inlinable static var SUBPIXEL_BITS: GLenum { 0x0D50 } - - @inlinable static var RED_BITS: GLenum { 0x0D52 } - - @inlinable static var GREEN_BITS: GLenum { 0x0D53 } - - @inlinable static var BLUE_BITS: GLenum { 0x0D54 } - - @inlinable static var ALPHA_BITS: GLenum { 0x0D55 } - - @inlinable static var DEPTH_BITS: GLenum { 0x0D56 } - - @inlinable static var STENCIL_BITS: GLenum { 0x0D57 } - - @inlinable static var POLYGON_OFFSET_UNITS: GLenum { 0x2A00 } - - @inlinable static var POLYGON_OFFSET_FACTOR: GLenum { 0x8038 } - - @inlinable static var TEXTURE_BINDING_2D: GLenum { 0x8069 } - - @inlinable static var SAMPLE_BUFFERS: GLenum { 0x80A8 } - - @inlinable static var SAMPLES: GLenum { 0x80A9 } - - @inlinable static var SAMPLE_COVERAGE_VALUE: GLenum { 0x80AA } - - @inlinable static var SAMPLE_COVERAGE_INVERT: GLenum { 0x80AB } - - @inlinable static var COMPRESSED_TEXTURE_FORMATS: GLenum { 0x86A3 } - - @inlinable static var DONT_CARE: GLenum { 0x1100 } - - @inlinable static var FASTEST: GLenum { 0x1101 } - - @inlinable static var NICEST: GLenum { 0x1102 } - - @inlinable static var GENERATE_MIPMAP_HINT: GLenum { 0x8192 } - - @inlinable static var BYTE: GLenum { 0x1400 } - - @inlinable static var UNSIGNED_BYTE: GLenum { 0x1401 } - - @inlinable static var SHORT: GLenum { 0x1402 } - - @inlinable static var UNSIGNED_SHORT: GLenum { 0x1403 } - - @inlinable static var INT: GLenum { 0x1404 } - - @inlinable static var UNSIGNED_INT: GLenum { 0x1405 } - - @inlinable static var FLOAT: GLenum { 0x1406 } - - @inlinable static var DEPTH_COMPONENT: GLenum { 0x1902 } - - @inlinable static var ALPHA: GLenum { 0x1906 } - - @inlinable static var RGB: GLenum { 0x1907 } - - @inlinable static var RGBA: GLenum { 0x1908 } - - @inlinable static var LUMINANCE: GLenum { 0x1909 } - - @inlinable static var LUMINANCE_ALPHA: GLenum { 0x190A } - - @inlinable static var UNSIGNED_SHORT_4_4_4_4: GLenum { 0x8033 } - - @inlinable static var UNSIGNED_SHORT_5_5_5_1: GLenum { 0x8034 } - - @inlinable static var UNSIGNED_SHORT_5_6_5: GLenum { 0x8363 } - - @inlinable static var FRAGMENT_SHADER: GLenum { 0x8B30 } - - @inlinable static var VERTEX_SHADER: GLenum { 0x8B31 } - - @inlinable static var MAX_VERTEX_ATTRIBS: GLenum { 0x8869 } - - @inlinable static var MAX_VERTEX_UNIFORM_VECTORS: GLenum { 0x8DFB } - - @inlinable static var MAX_VARYING_VECTORS: GLenum { 0x8DFC } - - @inlinable static var MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4D } - - @inlinable static var MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum { 0x8B4C } - - @inlinable static var MAX_TEXTURE_IMAGE_UNITS: GLenum { 0x8872 } - - @inlinable static var MAX_FRAGMENT_UNIFORM_VECTORS: GLenum { 0x8DFD } - - @inlinable static var SHADER_TYPE: GLenum { 0x8B4F } - - @inlinable static var DELETE_STATUS: GLenum { 0x8B80 } - - @inlinable static var LINK_STATUS: GLenum { 0x8B82 } - - @inlinable static var VALIDATE_STATUS: GLenum { 0x8B83 } - - @inlinable static var ATTACHED_SHADERS: GLenum { 0x8B85 } - - @inlinable static var ACTIVE_UNIFORMS: GLenum { 0x8B86 } - - @inlinable static var ACTIVE_ATTRIBUTES: GLenum { 0x8B89 } - - @inlinable static var SHADING_LANGUAGE_VERSION: GLenum { 0x8B8C } - - @inlinable static var CURRENT_PROGRAM: GLenum { 0x8B8D } - - @inlinable static var NEVER: GLenum { 0x0200 } - - @inlinable static var LESS: GLenum { 0x0201 } - - @inlinable static var EQUAL: GLenum { 0x0202 } - - @inlinable static var LEQUAL: GLenum { 0x0203 } - - @inlinable static var GREATER: GLenum { 0x0204 } - - @inlinable static var NOTEQUAL: GLenum { 0x0205 } - - @inlinable static var GEQUAL: GLenum { 0x0206 } - - @inlinable static var ALWAYS: GLenum { 0x0207 } - - @inlinable static var KEEP: GLenum { 0x1E00 } - - @inlinable static var REPLACE: GLenum { 0x1E01 } - - @inlinable static var INCR: GLenum { 0x1E02 } - - @inlinable static var DECR: GLenum { 0x1E03 } - - @inlinable static var INVERT: GLenum { 0x150A } - - @inlinable static var INCR_WRAP: GLenum { 0x8507 } - - @inlinable static var DECR_WRAP: GLenum { 0x8508 } - - @inlinable static var VENDOR: GLenum { 0x1F00 } - - @inlinable static var RENDERER: GLenum { 0x1F01 } - - @inlinable static var VERSION: GLenum { 0x1F02 } - - @inlinable static var NEAREST: GLenum { 0x2600 } - - @inlinable static var LINEAR: GLenum { 0x2601 } - - @inlinable static var NEAREST_MIPMAP_NEAREST: GLenum { 0x2700 } - - @inlinable static var LINEAR_MIPMAP_NEAREST: GLenum { 0x2701 } - - @inlinable static var NEAREST_MIPMAP_LINEAR: GLenum { 0x2702 } - - @inlinable static var LINEAR_MIPMAP_LINEAR: GLenum { 0x2703 } - - @inlinable static var TEXTURE_MAG_FILTER: GLenum { 0x2800 } - - @inlinable static var TEXTURE_MIN_FILTER: GLenum { 0x2801 } - - @inlinable static var TEXTURE_WRAP_S: GLenum { 0x2802 } - - @inlinable static var TEXTURE_WRAP_T: GLenum { 0x2803 } - - @inlinable static var TEXTURE_2D: GLenum { 0x0DE1 } - - @inlinable static var TEXTURE: GLenum { 0x1702 } - - @inlinable static var TEXTURE_CUBE_MAP: GLenum { 0x8513 } - - @inlinable static var TEXTURE_BINDING_CUBE_MAP: GLenum { 0x8514 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_X: GLenum { 0x8515 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum { 0x8516 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum { 0x8517 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum { 0x8518 } - - @inlinable static var TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum { 0x8519 } - - @inlinable static var TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum { 0x851A } - - @inlinable static var MAX_CUBE_MAP_TEXTURE_SIZE: GLenum { 0x851C } - - @inlinable static var TEXTURE0: GLenum { 0x84C0 } - - @inlinable static var TEXTURE1: GLenum { 0x84C1 } - - @inlinable static var TEXTURE2: GLenum { 0x84C2 } - - @inlinable static var TEXTURE3: GLenum { 0x84C3 } - - @inlinable static var TEXTURE4: GLenum { 0x84C4 } - - @inlinable static var TEXTURE5: GLenum { 0x84C5 } - - @inlinable static var TEXTURE6: GLenum { 0x84C6 } - - @inlinable static var TEXTURE7: GLenum { 0x84C7 } - - @inlinable static var TEXTURE8: GLenum { 0x84C8 } - - @inlinable static var TEXTURE9: GLenum { 0x84C9 } - - @inlinable static var TEXTURE10: GLenum { 0x84CA } - - @inlinable static var TEXTURE11: GLenum { 0x84CB } - - @inlinable static var TEXTURE12: GLenum { 0x84CC } - - @inlinable static var TEXTURE13: GLenum { 0x84CD } - - @inlinable static var TEXTURE14: GLenum { 0x84CE } - - @inlinable static var TEXTURE15: GLenum { 0x84CF } - - @inlinable static var TEXTURE16: GLenum { 0x84D0 } - - @inlinable static var TEXTURE17: GLenum { 0x84D1 } - - @inlinable static var TEXTURE18: GLenum { 0x84D2 } - - @inlinable static var TEXTURE19: GLenum { 0x84D3 } - - @inlinable static var TEXTURE20: GLenum { 0x84D4 } - - @inlinable static var TEXTURE21: GLenum { 0x84D5 } - - @inlinable static var TEXTURE22: GLenum { 0x84D6 } - - @inlinable static var TEXTURE23: GLenum { 0x84D7 } - - @inlinable static var TEXTURE24: GLenum { 0x84D8 } - - @inlinable static var TEXTURE25: GLenum { 0x84D9 } - - @inlinable static var TEXTURE26: GLenum { 0x84DA } - - @inlinable static var TEXTURE27: GLenum { 0x84DB } - - @inlinable static var TEXTURE28: GLenum { 0x84DC } - - @inlinable static var TEXTURE29: GLenum { 0x84DD } - - @inlinable static var TEXTURE30: GLenum { 0x84DE } - - @inlinable static var TEXTURE31: GLenum { 0x84DF } - - @inlinable static var ACTIVE_TEXTURE: GLenum { 0x84E0 } - - @inlinable static var REPEAT: GLenum { 0x2901 } - - @inlinable static var CLAMP_TO_EDGE: GLenum { 0x812F } - - @inlinable static var MIRRORED_REPEAT: GLenum { 0x8370 } - - @inlinable static var FLOAT_VEC2: GLenum { 0x8B50 } - - @inlinable static var FLOAT_VEC3: GLenum { 0x8B51 } - - @inlinable static var FLOAT_VEC4: GLenum { 0x8B52 } - - @inlinable static var INT_VEC2: GLenum { 0x8B53 } - - @inlinable static var INT_VEC3: GLenum { 0x8B54 } - - @inlinable static var INT_VEC4: GLenum { 0x8B55 } - - @inlinable static var BOOL: GLenum { 0x8B56 } - - @inlinable static var BOOL_VEC2: GLenum { 0x8B57 } - - @inlinable static var BOOL_VEC3: GLenum { 0x8B58 } - - @inlinable static var BOOL_VEC4: GLenum { 0x8B59 } - - @inlinable static var FLOAT_MAT2: GLenum { 0x8B5A } - - @inlinable static var FLOAT_MAT3: GLenum { 0x8B5B } - - @inlinable static var FLOAT_MAT4: GLenum { 0x8B5C } - - @inlinable static var SAMPLER_2D: GLenum { 0x8B5E } - - @inlinable static var SAMPLER_CUBE: GLenum { 0x8B60 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_ENABLED: GLenum { 0x8622 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_SIZE: GLenum { 0x8623 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_STRIDE: GLenum { 0x8624 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_TYPE: GLenum { 0x8625 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum { 0x886A } - - @inlinable static var VERTEX_ATTRIB_ARRAY_POINTER: GLenum { 0x8645 } - - @inlinable static var VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum { 0x889F } - - @inlinable static var IMPLEMENTATION_COLOR_READ_TYPE: GLenum { 0x8B9A } - - @inlinable static var IMPLEMENTATION_COLOR_READ_FORMAT: GLenum { 0x8B9B } - - @inlinable static var COMPILE_STATUS: GLenum { 0x8B81 } - - @inlinable static var LOW_FLOAT: GLenum { 0x8DF0 } - - @inlinable static var MEDIUM_FLOAT: GLenum { 0x8DF1 } - - @inlinable static var HIGH_FLOAT: GLenum { 0x8DF2 } - - @inlinable static var LOW_INT: GLenum { 0x8DF3 } - - @inlinable static var MEDIUM_INT: GLenum { 0x8DF4 } - - @inlinable static var HIGH_INT: GLenum { 0x8DF5 } - - @inlinable static var FRAMEBUFFER: GLenum { 0x8D40 } - - @inlinable static var RENDERBUFFER: GLenum { 0x8D41 } - - @inlinable static var RGBA4: GLenum { 0x8056 } - - @inlinable static var RGB5_A1: GLenum { 0x8057 } - - @inlinable static var RGB565: GLenum { 0x8D62 } - - @inlinable static var DEPTH_COMPONENT16: GLenum { 0x81A5 } - - @inlinable static var STENCIL_INDEX8: GLenum { 0x8D48 } - - @inlinable static var DEPTH_STENCIL: GLenum { 0x84F9 } - - @inlinable static var RENDERBUFFER_WIDTH: GLenum { 0x8D42 } - - @inlinable static var RENDERBUFFER_HEIGHT: GLenum { 0x8D43 } - - @inlinable static var RENDERBUFFER_INTERNAL_FORMAT: GLenum { 0x8D44 } - - @inlinable static var RENDERBUFFER_RED_SIZE: GLenum { 0x8D50 } - - @inlinable static var RENDERBUFFER_GREEN_SIZE: GLenum { 0x8D51 } - - @inlinable static var RENDERBUFFER_BLUE_SIZE: GLenum { 0x8D52 } - - @inlinable static var RENDERBUFFER_ALPHA_SIZE: GLenum { 0x8D53 } - - @inlinable static var RENDERBUFFER_DEPTH_SIZE: GLenum { 0x8D54 } - - @inlinable static var RENDERBUFFER_STENCIL_SIZE: GLenum { 0x8D55 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum { 0x8CD0 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum { 0x8CD1 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum { 0x8CD2 } - - @inlinable static var FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum { 0x8CD3 } - - @inlinable static var COLOR_ATTACHMENT0: GLenum { 0x8CE0 } - - @inlinable static var DEPTH_ATTACHMENT: GLenum { 0x8D00 } - - @inlinable static var STENCIL_ATTACHMENT: GLenum { 0x8D20 } - - @inlinable static var DEPTH_STENCIL_ATTACHMENT: GLenum { 0x821A } - - @inlinable static var NONE: GLenum { 0 } - - @inlinable static var FRAMEBUFFER_COMPLETE: GLenum { 0x8CD5 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum { 0x8CD6 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum { 0x8CD7 } - - @inlinable static var FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum { 0x8CD9 } - - @inlinable static var FRAMEBUFFER_UNSUPPORTED: GLenum { 0x8CDD } - - @inlinable static var FRAMEBUFFER_BINDING: GLenum { 0x8CA6 } - - @inlinable static var RENDERBUFFER_BINDING: GLenum { 0x8CA7 } - - @inlinable static var MAX_RENDERBUFFER_SIZE: GLenum { 0x84E8 } - - @inlinable static var INVALID_FRAMEBUFFER_OPERATION: GLenum { 0x0506 } - - @inlinable static var UNPACK_FLIP_Y_WEBGL: GLenum { 0x9240 } - - @inlinable static var UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum { 0x9241 } - - @inlinable static var CONTEXT_LOST_WEBGL: GLenum { 0x9242 } - - @inlinable static var UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum { 0x9243 } - - @inlinable static var BROWSER_DEFAULT_WEBGL: GLenum { 0x9244 } - - @inlinable var canvas: HTMLCanvasElement_or_OffscreenCanvas { ReadonlyAttribute[Strings.canvas, in: jsObject] } - - @inlinable var drawingBufferWidth: GLsizei { ReadonlyAttribute[Strings.drawingBufferWidth, in: jsObject] } - - @inlinable var drawingBufferHeight: GLsizei { ReadonlyAttribute[Strings.drawingBufferHeight, in: jsObject] } - - @inlinable func getContextAttributes() -> WebGLContextAttributes? { - let this = jsObject - return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func isContextLost() -> Bool { - let this = jsObject - return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getSupportedExtensions() -> [String]? { - let this = jsObject - return this[Strings.getSupportedExtensions].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getExtension(name: String) -> JSObject? { - let this = jsObject - return this[Strings.getExtension].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - } - - @inlinable func activeTexture(texture: GLenum) { - let this = jsObject - _ = this[Strings.activeTexture].function!(this: this, arguments: [texture.jsValue]) - } - - @inlinable func attachShader(program: WebGLProgram, shader: WebGLShader) { - let this = jsObject - _ = this[Strings.attachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) - } - - @inlinable func bindAttribLocation(program: WebGLProgram, index: GLuint, name: String) { - let this = jsObject - _ = this[Strings.bindAttribLocation].function!(this: this, arguments: [program.jsValue, index.jsValue, name.jsValue]) - } - - @inlinable func bindBuffer(target: GLenum, buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.bindBuffer].function!(this: this, arguments: [target.jsValue, buffer.jsValue]) - } - - @inlinable func bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer?) { - let this = jsObject - _ = this[Strings.bindFramebuffer].function!(this: this, arguments: [target.jsValue, framebuffer.jsValue]) - } - - @inlinable func bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.bindRenderbuffer].function!(this: this, arguments: [target.jsValue, renderbuffer.jsValue]) - } - - @inlinable func bindTexture(target: GLenum, texture: WebGLTexture?) { - let this = jsObject - _ = this[Strings.bindTexture].function!(this: this, arguments: [target.jsValue, texture.jsValue]) - } - - @inlinable func blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { - let this = jsObject - _ = this[Strings.blendColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func blendEquation(mode: GLenum) { - let this = jsObject - _ = this[Strings.blendEquation].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) { - let this = jsObject - _ = this[Strings.blendEquationSeparate].function!(this: this, arguments: [modeRGB.jsValue, modeAlpha.jsValue]) - } - - @inlinable func blendFunc(sfactor: GLenum, dfactor: GLenum) { - let this = jsObject - _ = this[Strings.blendFunc].function!(this: this, arguments: [sfactor.jsValue, dfactor.jsValue]) - } - - @inlinable func blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) { - let this = jsObject - _ = this[Strings.blendFuncSeparate].function!(this: this, arguments: [srcRGB.jsValue, dstRGB.jsValue, srcAlpha.jsValue, dstAlpha.jsValue]) - } - - @inlinable func checkFramebufferStatus(target: GLenum) -> GLenum { - let this = jsObject - return this[Strings.checkFramebufferStatus].function!(this: this, arguments: [target.jsValue]).fromJSValue()! - } - - @inlinable func clear(mask: GLbitfield) { - let this = jsObject - _ = this[Strings.clear].function!(this: this, arguments: [mask.jsValue]) - } - - @inlinable func clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) { - let this = jsObject - _ = this[Strings.clearColor].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func clearDepth(depth: GLclampf) { - let this = jsObject - _ = this[Strings.clearDepth].function!(this: this, arguments: [depth.jsValue]) - } - - @inlinable func clearStencil(s: GLint) { - let this = jsObject - _ = this[Strings.clearStencil].function!(this: this, arguments: [s.jsValue]) - } - - @inlinable func colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) { - let this = jsObject - _ = this[Strings.colorMask].function!(this: this, arguments: [red.jsValue, green.jsValue, blue.jsValue, alpha.jsValue]) - } - - @inlinable func compileShader(shader: WebGLShader) { - let this = jsObject - _ = this[Strings.compileShader].function!(this: this, arguments: [shader.jsValue]) - } - - @inlinable func copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = x.jsValue - let _arg4 = y.jsValue - let _arg5 = width.jsValue - let _arg6 = height.jsValue - let _arg7 = border.jsValue - let this = jsObject - _ = this[Strings.copyTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue - let _arg6 = width.jsValue - let _arg7 = height.jsValue - let this = jsObject - _ = this[Strings.copyTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func createBuffer() -> WebGLBuffer? { - let this = jsObject - return this[Strings.createBuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createFramebuffer() -> WebGLFramebuffer? { - let this = jsObject - return this[Strings.createFramebuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createProgram() -> WebGLProgram? { - let this = jsObject - return this[Strings.createProgram].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createRenderbuffer() -> WebGLRenderbuffer? { - let this = jsObject - return this[Strings.createRenderbuffer].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func createShader(type: GLenum) -> WebGLShader? { - let this = jsObject - return this[Strings.createShader].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @inlinable func createTexture() -> WebGLTexture? { - let this = jsObject - return this[Strings.createTexture].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func cullFace(mode: GLenum) { - let this = jsObject - _ = this[Strings.cullFace].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func deleteBuffer(buffer: WebGLBuffer?) { - let this = jsObject - _ = this[Strings.deleteBuffer].function!(this: this, arguments: [buffer.jsValue]) - } - - @inlinable func deleteFramebuffer(framebuffer: WebGLFramebuffer?) { - let this = jsObject - _ = this[Strings.deleteFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]) - } - - @inlinable func deleteProgram(program: WebGLProgram?) { - let this = jsObject - _ = this[Strings.deleteProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.deleteRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]) - } - - @inlinable func deleteShader(shader: WebGLShader?) { - let this = jsObject - _ = this[Strings.deleteShader].function!(this: this, arguments: [shader.jsValue]) - } - - @inlinable func deleteTexture(texture: WebGLTexture?) { - let this = jsObject - _ = this[Strings.deleteTexture].function!(this: this, arguments: [texture.jsValue]) - } - - @inlinable func depthFunc(func: GLenum) { - let this = jsObject - _ = this[Strings.depthFunc].function!(this: this, arguments: [`func`.jsValue]) - } - - @inlinable func depthMask(flag: GLboolean) { - let this = jsObject - _ = this[Strings.depthMask].function!(this: this, arguments: [flag.jsValue]) - } - - @inlinable func depthRange(zNear: GLclampf, zFar: GLclampf) { - let this = jsObject - _ = this[Strings.depthRange].function!(this: this, arguments: [zNear.jsValue, zFar.jsValue]) - } - - @inlinable func detachShader(program: WebGLProgram, shader: WebGLShader) { - let this = jsObject - _ = this[Strings.detachShader].function!(this: this, arguments: [program.jsValue, shader.jsValue]) - } - - @inlinable func disable(cap: GLenum) { - let this = jsObject - _ = this[Strings.disable].function!(this: this, arguments: [cap.jsValue]) - } - - @inlinable func disableVertexAttribArray(index: GLuint) { - let this = jsObject - _ = this[Strings.disableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable func drawArrays(mode: GLenum, first: GLint, count: GLsizei) { - let this = jsObject - _ = this[Strings.drawArrays].function!(this: this, arguments: [mode.jsValue, first.jsValue, count.jsValue]) - } - - @inlinable func drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) { - let this = jsObject - _ = this[Strings.drawElements].function!(this: this, arguments: [mode.jsValue, count.jsValue, type.jsValue, offset.jsValue]) - } - - @inlinable func enable(cap: GLenum) { - let this = jsObject - _ = this[Strings.enable].function!(this: this, arguments: [cap.jsValue]) - } - - @inlinable func enableVertexAttribArray(index: GLuint) { - let this = jsObject - _ = this[Strings.enableVertexAttribArray].function!(this: this, arguments: [index.jsValue]) - } - - @inlinable func finish() { - let this = jsObject - _ = this[Strings.finish].function!(this: this, arguments: []) - } - - @inlinable func flush() { - let this = jsObject - _ = this[Strings.flush].function!(this: this, arguments: []) - } - - @inlinable func framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer?) { - let this = jsObject - _ = this[Strings.framebufferRenderbuffer].function!(this: this, arguments: [target.jsValue, attachment.jsValue, renderbuffertarget.jsValue, renderbuffer.jsValue]) - } - - @inlinable func framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture?, level: GLint) { - let this = jsObject - _ = this[Strings.framebufferTexture2D].function!(this: this, arguments: [target.jsValue, attachment.jsValue, textarget.jsValue, texture.jsValue, level.jsValue]) - } - - @inlinable func frontFace(mode: GLenum) { - let this = jsObject - _ = this[Strings.frontFace].function!(this: this, arguments: [mode.jsValue]) - } - - @inlinable func generateMipmap(target: GLenum) { - let this = jsObject - _ = this[Strings.generateMipmap].function!(this: this, arguments: [target.jsValue]) - } - - @inlinable func getActiveAttrib(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getActiveAttrib].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getActiveUniform(program: WebGLProgram, index: GLuint) -> WebGLActiveInfo? { - let this = jsObject - return this[Strings.getActiveUniform].function!(this: this, arguments: [program.jsValue, index.jsValue]).fromJSValue()! - } - - @inlinable func getAttachedShaders(program: WebGLProgram) -> [WebGLShader]? { - let this = jsObject - return this[Strings.getAttachedShaders].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func getAttribLocation(program: WebGLProgram, name: String) -> GLint { - let this = jsObject - return this[Strings.getAttribLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func getBufferParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getBufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getParameter(pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getParameter].function!(this: this, arguments: [pname.jsValue]).fromJSValue()! - } - - @inlinable func getError() -> GLenum { - let this = jsObject - return this[Strings.getError].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getFramebufferAttachmentParameter].function!(this: this, arguments: [target.jsValue, attachment.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getProgramParameter(program: WebGLProgram, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getProgramParameter].function!(this: this, arguments: [program.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getProgramInfoLog(program: WebGLProgram) -> String? { - let this = jsObject - return this[Strings.getProgramInfoLog].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func getRenderbufferParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getRenderbufferParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getShaderParameter(shader: WebGLShader, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getShaderParameter].function!(this: this, arguments: [shader.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) -> WebGLShaderPrecisionFormat? { - let this = jsObject - return this[Strings.getShaderPrecisionFormat].function!(this: this, arguments: [shadertype.jsValue, precisiontype.jsValue]).fromJSValue()! - } - - @inlinable func getShaderInfoLog(shader: WebGLShader) -> String? { - let this = jsObject - return this[Strings.getShaderInfoLog].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func getShaderSource(shader: WebGLShader) -> String? { - let this = jsObject - return this[Strings.getShaderSource].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func getTexParameter(target: GLenum, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getTexParameter].function!(this: this, arguments: [target.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getUniform(program: WebGLProgram, location: WebGLUniformLocation) -> JSValue { - let this = jsObject - return this[Strings.getUniform].function!(this: this, arguments: [program.jsValue, location.jsValue]).fromJSValue()! - } - - @inlinable func getUniformLocation(program: WebGLProgram, name: String) -> WebGLUniformLocation? { - let this = jsObject - return this[Strings.getUniformLocation].function!(this: this, arguments: [program.jsValue, name.jsValue]).fromJSValue()! - } - - @inlinable func getVertexAttrib(index: GLuint, pname: GLenum) -> JSValue { - let this = jsObject - return this[Strings.getVertexAttrib].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func getVertexAttribOffset(index: GLuint, pname: GLenum) -> GLintptr { - let this = jsObject - return this[Strings.getVertexAttribOffset].function!(this: this, arguments: [index.jsValue, pname.jsValue]).fromJSValue()! - } - - @inlinable func hint(target: GLenum, mode: GLenum) { - let this = jsObject - _ = this[Strings.hint].function!(this: this, arguments: [target.jsValue, mode.jsValue]) - } - - @inlinable func isBuffer(buffer: WebGLBuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isBuffer].function!(this: this, arguments: [buffer.jsValue]).fromJSValue()! - } - - @inlinable func isEnabled(cap: GLenum) -> GLboolean { - let this = jsObject - return this[Strings.isEnabled].function!(this: this, arguments: [cap.jsValue]).fromJSValue()! - } - - @inlinable func isFramebuffer(framebuffer: WebGLFramebuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isFramebuffer].function!(this: this, arguments: [framebuffer.jsValue]).fromJSValue()! - } - - @inlinable func isProgram(program: WebGLProgram?) -> GLboolean { - let this = jsObject - return this[Strings.isProgram].function!(this: this, arguments: [program.jsValue]).fromJSValue()! - } - - @inlinable func isRenderbuffer(renderbuffer: WebGLRenderbuffer?) -> GLboolean { - let this = jsObject - return this[Strings.isRenderbuffer].function!(this: this, arguments: [renderbuffer.jsValue]).fromJSValue()! - } - - @inlinable func isShader(shader: WebGLShader?) -> GLboolean { - let this = jsObject - return this[Strings.isShader].function!(this: this, arguments: [shader.jsValue]).fromJSValue()! - } - - @inlinable func isTexture(texture: WebGLTexture?) -> GLboolean { - let this = jsObject - return this[Strings.isTexture].function!(this: this, arguments: [texture.jsValue]).fromJSValue()! - } - - @inlinable func lineWidth(width: GLfloat) { - let this = jsObject - _ = this[Strings.lineWidth].function!(this: this, arguments: [width.jsValue]) - } - - @inlinable func linkProgram(program: WebGLProgram) { - let this = jsObject - _ = this[Strings.linkProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func pixelStorei(pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.pixelStorei].function!(this: this, arguments: [pname.jsValue, param.jsValue]) - } - - @inlinable func polygonOffset(factor: GLfloat, units: GLfloat) { - let this = jsObject - _ = this[Strings.polygonOffset].function!(this: this, arguments: [factor.jsValue, units.jsValue]) - } - - @inlinable func renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.renderbufferStorage].function!(this: this, arguments: [target.jsValue, internalformat.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func sampleCoverage(value: GLclampf, invert: GLboolean) { - let this = jsObject - _ = this[Strings.sampleCoverage].function!(this: this, arguments: [value.jsValue, invert.jsValue]) - } - - @inlinable func scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.scissor].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) - } - - @inlinable func shaderSource(shader: WebGLShader, source: String) { - let this = jsObject - _ = this[Strings.shaderSource].function!(this: this, arguments: [shader.jsValue, source.jsValue]) - } - - @inlinable func stencilFunc(func: GLenum, ref: GLint, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilFunc].function!(this: this, arguments: [`func`.jsValue, ref.jsValue, mask.jsValue]) - } - - @inlinable func stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilFuncSeparate].function!(this: this, arguments: [face.jsValue, `func`.jsValue, ref.jsValue, mask.jsValue]) - } - - @inlinable func stencilMask(mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilMask].function!(this: this, arguments: [mask.jsValue]) - } - - @inlinable func stencilMaskSeparate(face: GLenum, mask: GLuint) { - let this = jsObject - _ = this[Strings.stencilMaskSeparate].function!(this: this, arguments: [face.jsValue, mask.jsValue]) - } - - @inlinable func stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) { - let this = jsObject - _ = this[Strings.stencilOp].function!(this: this, arguments: [fail.jsValue, zfail.jsValue, zpass.jsValue]) - } - - @inlinable func stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) { - let this = jsObject - _ = this[Strings.stencilOpSeparate].function!(this: this, arguments: [face.jsValue, fail.jsValue, zfail.jsValue, zpass.jsValue]) - } - - @inlinable func texParameterf(target: GLenum, pname: GLenum, param: GLfloat) { - let this = jsObject - _ = this[Strings.texParameterf].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func texParameteri(target: GLenum, pname: GLenum, param: GLint) { - let this = jsObject - _ = this[Strings.texParameteri].function!(this: this, arguments: [target.jsValue, pname.jsValue, param.jsValue]) - } - - @inlinable func uniform1f(location: WebGLUniformLocation?, x: GLfloat) { - let this = jsObject - _ = this[Strings.uniform1f].function!(this: this, arguments: [location.jsValue, x.jsValue]) - } - - @inlinable func uniform2f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat) { - let this = jsObject - _ = this[Strings.uniform2f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func uniform3f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat) { - let this = jsObject - _ = this[Strings.uniform3f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func uniform4f(location: WebGLUniformLocation?, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { - let this = jsObject - _ = this[Strings.uniform4f].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func uniform1i(location: WebGLUniformLocation?, x: GLint) { - let this = jsObject - _ = this[Strings.uniform1i].function!(this: this, arguments: [location.jsValue, x.jsValue]) - } - - @inlinable func uniform2i(location: WebGLUniformLocation?, x: GLint, y: GLint) { - let this = jsObject - _ = this[Strings.uniform2i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func uniform3i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint) { - let this = jsObject - _ = this[Strings.uniform3i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func uniform4i(location: WebGLUniformLocation?, x: GLint, y: GLint, z: GLint, w: GLint) { - let this = jsObject - _ = this[Strings.uniform4i].function!(this: this, arguments: [location.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func useProgram(program: WebGLProgram?) { - let this = jsObject - _ = this[Strings.useProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func validateProgram(program: WebGLProgram) { - let this = jsObject - _ = this[Strings.validateProgram].function!(this: this, arguments: [program.jsValue]) - } - - @inlinable func vertexAttrib1f(index: GLuint, x: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib1f].function!(this: this, arguments: [index.jsValue, x.jsValue]) - } - - @inlinable func vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib2f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue]) - } - - @inlinable func vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib3f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue]) - } - - @inlinable func vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) { - let this = jsObject - _ = this[Strings.vertexAttrib4f].function!(this: this, arguments: [index.jsValue, x.jsValue, y.jsValue, z.jsValue, w.jsValue]) - } - - @inlinable func vertexAttrib1fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib1fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib2fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib2fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib3fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib3fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttrib4fv(index: GLuint, values: Float32List) { - let this = jsObject - _ = this[Strings.vertexAttrib4fv].function!(this: this, arguments: [index.jsValue, values.jsValue]) - } - - @inlinable func vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) { - let _arg0 = index.jsValue - let _arg1 = size.jsValue - let _arg2 = type.jsValue - let _arg3 = normalized.jsValue - let _arg4 = stride.jsValue - let _arg5 = offset.jsValue - let this = jsObject - _ = this[Strings.vertexAttribPointer].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) { - let this = jsObject - _ = this[Strings.viewport].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift b/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift deleted file mode 100644 index fe1977ac..00000000 --- a/Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift +++ /dev/null @@ -1,165 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol WebGLRenderingContextOverloads: JSBridgedClass {} -public extension WebGLRenderingContextOverloads { - @inlinable func bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, size.jsValue, usage.jsValue]) - } - - @inlinable func bufferData(target: GLenum, data: BufferSource?, usage: GLenum) { - let this = jsObject - _ = this[Strings.bufferData].function!(this: this, arguments: [target.jsValue, data.jsValue, usage.jsValue]) - } - - @inlinable func bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) { - let this = jsObject - _ = this[Strings.bufferSubData].function!(this: this, arguments: [target.jsValue, offset.jsValue, data.jsValue]) - } - - @inlinable func compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = data.jsValue - let this = jsObject - _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = data.jsValue - let this = jsObject - _ = this[Strings.compressedTexSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } - - @inlinable func readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = width.jsValue - let _arg3 = height.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = pixels.jsValue - let this = jsObject - _ = this[Strings.readPixels].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = width.jsValue - let _arg4 = height.jsValue - let _arg5 = border.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = internalformat.jsValue - let _arg3 = format.jsValue - let _arg4 = type.jsValue - let _arg5 = source.jsValue - let this = jsObject - _ = this[Strings.texImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView?) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = width.jsValue - let _arg5 = height.jsValue - let _arg6 = format.jsValue - let _arg7 = type.jsValue - let _arg8 = pixels.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) - } - - @inlinable func texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) { - let _arg0 = target.jsValue - let _arg1 = level.jsValue - let _arg2 = xoffset.jsValue - let _arg3 = yoffset.jsValue - let _arg4 = format.jsValue - let _arg5 = type.jsValue - let _arg6 = source.jsValue - let this = jsObject - _ = this[Strings.texSubImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) - } - - @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { - let this = jsObject - _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { - let this = jsObject - _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) - } - - @inlinable func uniformMatrix2fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix2fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } - - @inlinable func uniformMatrix3fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix3fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } - - @inlinable func uniformMatrix4fv(location: WebGLUniformLocation?, transpose: GLboolean, value: Float32List) { - let this = jsObject - _ = this[Strings.uniformMatrix4fv].function!(this: this, arguments: [location.jsValue, transpose.jsValue, value.jsValue]) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLSampler.swift b/Sources/DOMKit/WebIDL/WebGLSampler.swift deleted file mode 100644 index 1b6c94e3..00000000 --- a/Sources/DOMKit/WebIDL/WebGLSampler.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLSampler: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSampler].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLShader.swift b/Sources/DOMKit/WebIDL/WebGLShader.swift deleted file mode 100644 index 97f2b719..00000000 --- a/Sources/DOMKit/WebIDL/WebGLShader.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLShader: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift b/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift deleted file mode 100644 index 67725e58..00000000 --- a/Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift +++ /dev/null @@ -1,26 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLShaderPrecisionFormat: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLShaderPrecisionFormat].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _rangeMin = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMin) - _rangeMax = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeMax) - _precision = ReadonlyAttribute(jsObject: jsObject, name: Strings.precision) - self.jsObject = jsObject - } - - @ReadonlyAttribute - public var rangeMin: GLint - - @ReadonlyAttribute - public var rangeMax: GLint - - @ReadonlyAttribute - public var precision: GLint -} diff --git a/Sources/DOMKit/WebIDL/WebGLSync.swift b/Sources/DOMKit/WebIDL/WebGLSync.swift deleted file mode 100644 index 38271eb1..00000000 --- a/Sources/DOMKit/WebIDL/WebGLSync.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLSync: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLSync].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLTexture.swift b/Sources/DOMKit/WebIDL/WebGLTexture.swift deleted file mode 100644 index ee7ad6c9..00000000 --- a/Sources/DOMKit/WebIDL/WebGLTexture.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLTexture: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift b/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift deleted file mode 100644 index 981c92d1..00000000 --- a/Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLTransformFeedback: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTransformFeedback].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift b/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift deleted file mode 100644 index cf833a95..00000000 --- a/Sources/DOMKit/WebIDL/WebGLUniformLocation.swift +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLUniformLocation: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } -} diff --git a/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift b/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift deleted file mode 100644 index 2ca909eb..00000000 --- a/Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift +++ /dev/null @@ -1,12 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public class WebGLVertexArrayObject: WebGLObject { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLVertexArrayObject].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } -} diff --git a/Sources/DOMKit/WebIDL/console.swift b/Sources/DOMKit/WebIDL/console.swift deleted file mode 100644 index d61e67e0..00000000 --- a/Sources/DOMKit/WebIDL/console.swift +++ /dev/null @@ -1,105 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public enum console { - @inlinable public static var jsObject: JSObject { - JSObject.global[Strings.console].object! - } - - @inlinable public static func assert(condition: Bool? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.assert].function!(this: this, arguments: [condition?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func clear() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.clear].function!(this: this, arguments: []) - } - - @inlinable public static func debug(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.debug].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func error(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.error].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func info(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.info].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func log(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.log].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func table(tabularData: JSValue? = nil, properties: [String]? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.table].function!(this: this, arguments: [tabularData?.jsValue ?? .undefined, properties?.jsValue ?? .undefined]) - } - - @inlinable public static func trace(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.trace].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func warn(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.warn].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func dir(item: JSValue? = nil, options: JSObject? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dir].function!(this: this, arguments: [item?.jsValue ?? .undefined, options?.jsValue ?? .undefined]) - } - - @inlinable public static func dirxml(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.dirxml].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func count(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.count].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func countReset(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.countReset].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func group(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.group].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupCollapsed(data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupCollapsed].function!(this: this, arguments: data.map(\.jsValue)) - } - - @inlinable public static func groupEnd() { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.groupEnd].function!(this: this, arguments: []) - } - - @inlinable public static func time(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.time].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } - - @inlinable public static func timeLog(label: String? = nil, data: JSValue...) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeLog].function!(this: this, arguments: [label?.jsValue ?? .undefined] + data.map(\.jsValue)) - } - - @inlinable public static func timeEnd(label: String? = nil) { - let this = JSObject.global[Strings.console].object! - _ = this[Strings.timeEnd].function!(this: this, arguments: [label?.jsValue ?? .undefined]) - } -} From 8e964cc7d4eb32293924128cd96b1b209f03d2e1 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:11:16 +0100 Subject: [PATCH 15/18] Use revision requirement --- Package.swift | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index 4e2b3830..891b5951 100644 --- a/Package.swift +++ b/Package.swift @@ -8,10 +8,12 @@ let package = Package( products: [ .executable( name: "DOMKitDemo", - targets: ["DOMKitDemo"]), + targets: ["DOMKitDemo"] + ), .library( name: "DOMKit", - targets: ["DOMKit"]), + targets: ["DOMKit"] + ), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), ], @@ -24,7 +26,8 @@ let package = Package( targets: [ .target( name: "DOMKitDemo", - dependencies: ["DOMKit"]), + dependencies: ["DOMKit"] + ), .target( name: "DOMKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")] @@ -37,9 +40,11 @@ let package = Package( .target(name: "WebIDL"), .target( name: "WebIDLToSwift", - dependencies: ["WebIDL"]), + dependencies: ["WebIDL"] + ), .testTarget( name: "DOMKitTests", - dependencies: ["DOMKit"]), + dependencies: ["DOMKit"] + ), ] ) From 4900271ad7bf30acf0105f4f732f105ed23b7d05 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 16:43:21 +0100 Subject: [PATCH 16/18] Uncomment compatible code --- Sources/DOMKit/RenderingContext.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/DOMKit/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift index 13ef65df..6e493665 100644 --- a/Sources/DOMKit/RenderingContext.swift +++ b/Sources/DOMKit/RenderingContext.swift @@ -7,8 +7,8 @@ public protocol Any_RenderingContext: ConvertibleToJSValue {} extension CanvasRenderingContext2D: Any_RenderingContext {} // extension GPUCanvasContext: Any_RenderingContext {} extension ImageBitmapRenderingContext: Any_RenderingContext {} -// extension WebGL2RenderingContext: Any_RenderingContext {} -// extension WebGLRenderingContext: Any_RenderingContext {} +extension WebGL2RenderingContext: Any_RenderingContext {} +extension WebGLRenderingContext: Any_RenderingContext {} public enum RenderingContext: JSValueCompatible, Any_RenderingContext { case canvasRenderingContext2D(CanvasRenderingContext2D) From 309a60079daf5b580178979fc643e06a85c33450 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 16:51:30 +0100 Subject: [PATCH 17/18] Add `webgpu` IDL spec and generated code This allows removing manual `OffscreenRenderingContext` and `RenderingContext` declarations. --- Sources/DOMKit/Generated.swift | 4590 ++++++++++++++++- .../DOMKit/OffscreenRenderingContext.swift | 88 - Sources/DOMKit/RenderingContext.swift | 88 - Sources/DOMKitDemo/WebGLDemo.swift | 2 +- Sources/WebIDLToSwift/IDLBuilder.swift | 1 - parse-idl/parse-all.js | 1 + 6 files changed, 4360 insertions(+), 410 deletions(-) delete mode 100644 Sources/DOMKit/OffscreenRenderingContext.swift delete mode 100644 Sources/DOMKit/RenderingContext.swift diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index 22b3eff4..0ec0d64c 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -7757,6 +7757,3364 @@ public enum FrameType: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } +public class GPU: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPU].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func requestAdapter(options: GPURequestAdapterOptions? = nil) -> JSPromise { + let this = jsObject + return this[Strings.requestAdapter].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func requestAdapter(options: GPURequestAdapterOptions? = nil) async throws -> GPUAdapter? { + let this = jsObject + let _promise: JSPromise = this[Strings.requestAdapter].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class GPUAdapter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUAdapter].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _features = ReadonlyAttribute(jsObject: jsObject, name: Strings.features) + _limits = ReadonlyAttribute(jsObject: jsObject, name: Strings.limits) + _isFallbackAdapter = ReadonlyAttribute(jsObject: jsObject, name: Strings.isFallbackAdapter) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var name: String + + @ReadonlyAttribute + public var features: GPUSupportedFeatures + + @ReadonlyAttribute + public var limits: GPUSupportedLimits + + @ReadonlyAttribute + public var isFallbackAdapter: Bool + + @inlinable public func requestDevice(descriptor: GPUDeviceDescriptor? = nil) -> JSPromise { + let this = jsObject + return this[Strings.requestDevice].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func requestDevice(descriptor: GPUDeviceDescriptor? = nil) async throws -> GPUDevice { + let this = jsObject + let _promise: JSPromise = this[Strings.requestDevice].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public enum GPUAddressMode: JSString, JSValueCompatible { + case clampToEdge = "clamp-to-edge" + case `repeat` = "repeat" + case mirrorRepeat = "mirror-repeat" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUBindGroup: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUBindGroup].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUBindGroupDescriptor: BridgedDictionary { + public convenience init(layout: GPUBindGroupLayout, entries: [GPUBindGroupEntry]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.layout] = layout.jsValue + object[Strings.entries] = entries.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + _entries = ReadWriteAttribute(jsObject: object, name: Strings.entries) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var layout: GPUBindGroupLayout + + @ReadWriteAttribute + public var entries: [GPUBindGroupEntry] +} + +public class GPUBindGroupEntry: BridgedDictionary { + public convenience init(binding: GPUIndex32, resource: GPUBindingResource) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.binding] = binding.jsValue + object[Strings.resource] = resource.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _binding = ReadWriteAttribute(jsObject: object, name: Strings.binding) + _resource = ReadWriteAttribute(jsObject: object, name: Strings.resource) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var binding: GPUIndex32 + + @ReadWriteAttribute + public var resource: GPUBindingResource +} + +public class GPUBindGroupLayout: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUBindGroupLayout].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUBindGroupLayoutDescriptor: BridgedDictionary { + public convenience init(entries: [GPUBindGroupLayoutEntry]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.entries] = entries.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _entries = ReadWriteAttribute(jsObject: object, name: Strings.entries) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var entries: [GPUBindGroupLayoutEntry] +} + +public class GPUBindGroupLayoutEntry: BridgedDictionary { + public convenience init(binding: GPUIndex32, visibility: GPUShaderStageFlags, buffer: GPUBufferBindingLayout, sampler: GPUSamplerBindingLayout, texture: GPUTextureBindingLayout, storageTexture: GPUStorageTextureBindingLayout, externalTexture: GPUExternalTextureBindingLayout) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.binding] = binding.jsValue + object[Strings.visibility] = visibility.jsValue + object[Strings.buffer] = buffer.jsValue + object[Strings.sampler] = sampler.jsValue + object[Strings.texture] = texture.jsValue + object[Strings.storageTexture] = storageTexture.jsValue + object[Strings.externalTexture] = externalTexture.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _binding = ReadWriteAttribute(jsObject: object, name: Strings.binding) + _visibility = ReadWriteAttribute(jsObject: object, name: Strings.visibility) + _buffer = ReadWriteAttribute(jsObject: object, name: Strings.buffer) + _sampler = ReadWriteAttribute(jsObject: object, name: Strings.sampler) + _texture = ReadWriteAttribute(jsObject: object, name: Strings.texture) + _storageTexture = ReadWriteAttribute(jsObject: object, name: Strings.storageTexture) + _externalTexture = ReadWriteAttribute(jsObject: object, name: Strings.externalTexture) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var binding: GPUIndex32 + + @ReadWriteAttribute + public var visibility: GPUShaderStageFlags + + @ReadWriteAttribute + public var buffer: GPUBufferBindingLayout + + @ReadWriteAttribute + public var sampler: GPUSamplerBindingLayout + + @ReadWriteAttribute + public var texture: GPUTextureBindingLayout + + @ReadWriteAttribute + public var storageTexture: GPUStorageTextureBindingLayout + + @ReadWriteAttribute + public var externalTexture: GPUExternalTextureBindingLayout +} + +public class GPUBlendComponent: BridgedDictionary { + public convenience init(operation: GPUBlendOperation, srcFactor: GPUBlendFactor, dstFactor: GPUBlendFactor) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.operation] = operation.jsValue + object[Strings.srcFactor] = srcFactor.jsValue + object[Strings.dstFactor] = dstFactor.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _operation = ReadWriteAttribute(jsObject: object, name: Strings.operation) + _srcFactor = ReadWriteAttribute(jsObject: object, name: Strings.srcFactor) + _dstFactor = ReadWriteAttribute(jsObject: object, name: Strings.dstFactor) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var operation: GPUBlendOperation + + @ReadWriteAttribute + public var srcFactor: GPUBlendFactor + + @ReadWriteAttribute + public var dstFactor: GPUBlendFactor +} + +public enum GPUBlendFactor: JSString, JSValueCompatible { + case zero = "zero" + case one = "one" + case src = "src" + case oneMinusSrc = "one-minus-src" + case srcAlpha = "src-alpha" + case oneMinusSrcAlpha = "one-minus-src-alpha" + case dst = "dst" + case oneMinusDst = "one-minus-dst" + case dstAlpha = "dst-alpha" + case oneMinusDstAlpha = "one-minus-dst-alpha" + case srcAlphaSaturated = "src-alpha-saturated" + case constant = "constant" + case oneMinusConstant = "one-minus-constant" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUBlendOperation: JSString, JSValueCompatible { + case add = "add" + case subtract = "subtract" + case reverseSubtract = "reverse-subtract" + case min = "min" + case max = "max" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUBlendState: BridgedDictionary { + public convenience init(color: GPUBlendComponent, alpha: GPUBlendComponent) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.color] = color.jsValue + object[Strings.alpha] = alpha.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _color = ReadWriteAttribute(jsObject: object, name: Strings.color) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var color: GPUBlendComponent + + @ReadWriteAttribute + public var alpha: GPUBlendComponent +} + +public class GPUBuffer: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUBuffer].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func mapAsync(mode: GPUMapModeFlags, offset: GPUSize64? = nil, size: GPUSize64? = nil) -> JSPromise { + let this = jsObject + return this[Strings.mapAsync].function!(this: this, arguments: [mode.jsValue, offset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func mapAsync(mode: GPUMapModeFlags, offset: GPUSize64? = nil, size: GPUSize64? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.mapAsync].function!(this: this, arguments: [mode.jsValue, offset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func getMappedRange(offset: GPUSize64? = nil, size: GPUSize64? = nil) -> ArrayBuffer { + let this = jsObject + return this[Strings.getMappedRange].function!(this: this, arguments: [offset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func unmap() { + let this = jsObject + _ = this[Strings.unmap].function!(this: this, arguments: []) + } + + @inlinable public func destroy() { + let this = jsObject + _ = this[Strings.destroy].function!(this: this, arguments: []) + } +} + +public class GPUBufferBinding: BridgedDictionary { + public convenience init(buffer: GPUBuffer, offset: GPUSize64, size: GPUSize64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.buffer] = buffer.jsValue + object[Strings.offset] = offset.jsValue + object[Strings.size] = size.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _buffer = ReadWriteAttribute(jsObject: object, name: Strings.buffer) + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _size = ReadWriteAttribute(jsObject: object, name: Strings.size) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var buffer: GPUBuffer + + @ReadWriteAttribute + public var offset: GPUSize64 + + @ReadWriteAttribute + public var size: GPUSize64 +} + +public class GPUBufferBindingLayout: BridgedDictionary { + public convenience init(type: GPUBufferBindingType, hasDynamicOffset: Bool, minBindingSize: GPUSize64) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.hasDynamicOffset] = hasDynamicOffset.jsValue + object[Strings.minBindingSize] = minBindingSize.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _hasDynamicOffset = ReadWriteAttribute(jsObject: object, name: Strings.hasDynamicOffset) + _minBindingSize = ReadWriteAttribute(jsObject: object, name: Strings.minBindingSize) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: GPUBufferBindingType + + @ReadWriteAttribute + public var hasDynamicOffset: Bool + + @ReadWriteAttribute + public var minBindingSize: GPUSize64 +} + +public enum GPUBufferBindingType: JSString, JSValueCompatible { + case uniform = "uniform" + case storage = "storage" + case readOnlyStorage = "read-only-storage" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUBufferDescriptor: BridgedDictionary { + public convenience init(size: GPUSize64, usage: GPUBufferUsageFlags, mappedAtCreation: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.size] = size.jsValue + object[Strings.usage] = usage.jsValue + object[Strings.mappedAtCreation] = mappedAtCreation.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _size = ReadWriteAttribute(jsObject: object, name: Strings.size) + _usage = ReadWriteAttribute(jsObject: object, name: Strings.usage) + _mappedAtCreation = ReadWriteAttribute(jsObject: object, name: Strings.mappedAtCreation) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var size: GPUSize64 + + @ReadWriteAttribute + public var usage: GPUBufferUsageFlags + + @ReadWriteAttribute + public var mappedAtCreation: Bool +} + +public enum GPUBufferUsage { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.GPUBufferUsage].object! + } + + public static let MAP_READ: GPUFlagsConstant = 0x0001 + + public static let MAP_WRITE: GPUFlagsConstant = 0x0002 + + public static let COPY_SRC: GPUFlagsConstant = 0x0004 + + public static let COPY_DST: GPUFlagsConstant = 0x0008 + + public static let INDEX: GPUFlagsConstant = 0x0010 + + public static let VERTEX: GPUFlagsConstant = 0x0020 + + public static let UNIFORM: GPUFlagsConstant = 0x0040 + + public static let STORAGE: GPUFlagsConstant = 0x0080 + + public static let INDIRECT: GPUFlagsConstant = 0x0100 + + public static let QUERY_RESOLVE: GPUFlagsConstant = 0x0200 +} + +public enum GPUCanvasCompositingAlphaMode: JSString, JSValueCompatible { + case opaque = "opaque" + case premultiplied = "premultiplied" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUCanvasConfiguration: BridgedDictionary { + public convenience init(device: GPUDevice, format: GPUTextureFormat, usage: GPUTextureUsageFlags, viewFormats: [GPUTextureFormat], colorSpace: GPUPredefinedColorSpace, compositingAlphaMode: GPUCanvasCompositingAlphaMode, size: GPUExtent3D) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.device] = device.jsValue + object[Strings.format] = format.jsValue + object[Strings.usage] = usage.jsValue + object[Strings.viewFormats] = viewFormats.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.compositingAlphaMode] = compositingAlphaMode.jsValue + object[Strings.size] = size.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _device = ReadWriteAttribute(jsObject: object, name: Strings.device) + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _usage = ReadWriteAttribute(jsObject: object, name: Strings.usage) + _viewFormats = ReadWriteAttribute(jsObject: object, name: Strings.viewFormats) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _compositingAlphaMode = ReadWriteAttribute(jsObject: object, name: Strings.compositingAlphaMode) + _size = ReadWriteAttribute(jsObject: object, name: Strings.size) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var device: GPUDevice + + @ReadWriteAttribute + public var format: GPUTextureFormat + + @ReadWriteAttribute + public var usage: GPUTextureUsageFlags + + @ReadWriteAttribute + public var viewFormats: [GPUTextureFormat] + + @ReadWriteAttribute + public var colorSpace: GPUPredefinedColorSpace + + @ReadWriteAttribute + public var compositingAlphaMode: GPUCanvasCompositingAlphaMode + + @ReadWriteAttribute + public var size: GPUExtent3D +} + +public class GPUCanvasContext: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUCanvasContext].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var canvas: HTMLCanvasElement_or_OffscreenCanvas + + @inlinable public func configure(configuration: GPUCanvasConfiguration) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [configuration.jsValue]) + } + + @inlinable public func unconfigure() { + let this = jsObject + _ = this[Strings.unconfigure].function!(this: this, arguments: []) + } + + @inlinable public func getPreferredFormat(adapter: GPUAdapter) -> GPUTextureFormat { + let this = jsObject + return this[Strings.getPreferredFormat].function!(this: this, arguments: [adapter.jsValue]).fromJSValue()! + } + + @inlinable public func getCurrentTexture() -> GPUTexture { + let this = jsObject + return this[Strings.getCurrentTexture].function!(this: this, arguments: []).fromJSValue()! + } +} + +public class GPUColorDict: BridgedDictionary { + public convenience init(r: Double, g: Double, b: Double, a: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.r] = r.jsValue + object[Strings.g] = g.jsValue + object[Strings.b] = b.jsValue + object[Strings.a] = a.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _r = ReadWriteAttribute(jsObject: object, name: Strings.r) + _g = ReadWriteAttribute(jsObject: object, name: Strings.g) + _b = ReadWriteAttribute(jsObject: object, name: Strings.b) + _a = ReadWriteAttribute(jsObject: object, name: Strings.a) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var r: Double + + @ReadWriteAttribute + public var g: Double + + @ReadWriteAttribute + public var b: Double + + @ReadWriteAttribute + public var a: Double +} + +public class GPUColorTargetState: BridgedDictionary { + public convenience init(format: GPUTextureFormat, blend: GPUBlendState, writeMask: GPUColorWriteFlags) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.blend] = blend.jsValue + object[Strings.writeMask] = writeMask.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _blend = ReadWriteAttribute(jsObject: object, name: Strings.blend) + _writeMask = ReadWriteAttribute(jsObject: object, name: Strings.writeMask) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: GPUTextureFormat + + @ReadWriteAttribute + public var blend: GPUBlendState + + @ReadWriteAttribute + public var writeMask: GPUColorWriteFlags +} + +public enum GPUColorWrite { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.GPUColorWrite].object! + } + + public static let RED: GPUFlagsConstant = 0x1 + + public static let GREEN: GPUFlagsConstant = 0x2 + + public static let BLUE: GPUFlagsConstant = 0x4 + + public static let ALPHA: GPUFlagsConstant = 0x8 + + public static let ALL: GPUFlagsConstant = 0xF +} + +public class GPUCommandBuffer: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUCommandBuffer].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUCommandBufferDescriptor: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class GPUCommandEncoder: JSBridgedClass, GPUObjectBase, GPUCommandsMixin, GPUDebugCommandsMixin { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUCommandEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func beginRenderPass(descriptor: GPURenderPassDescriptor) -> GPURenderPassEncoder { + let this = jsObject + return this[Strings.beginRenderPass].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func beginComputePass(descriptor: GPUComputePassDescriptor? = nil) -> GPUComputePassEncoder { + let this = jsObject + return this[Strings.beginComputePass].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64) { + let this = jsObject + _ = this[Strings.copyBufferToBuffer].function!(this: this, arguments: [source.jsValue, sourceOffset.jsValue, destination.jsValue, destinationOffset.jsValue, size.jsValue]) + } + + @inlinable public func copyBufferToTexture(source: GPUImageCopyBuffer, destination: GPUImageCopyTexture, copySize: GPUExtent3D) { + let this = jsObject + _ = this[Strings.copyBufferToTexture].function!(this: this, arguments: [source.jsValue, destination.jsValue, copySize.jsValue]) + } + + @inlinable public func copyTextureToBuffer(source: GPUImageCopyTexture, destination: GPUImageCopyBuffer, copySize: GPUExtent3D) { + let this = jsObject + _ = this[Strings.copyTextureToBuffer].function!(this: this, arguments: [source.jsValue, destination.jsValue, copySize.jsValue]) + } + + @inlinable public func copyTextureToTexture(source: GPUImageCopyTexture, destination: GPUImageCopyTexture, copySize: GPUExtent3D) { + let this = jsObject + _ = this[Strings.copyTextureToTexture].function!(this: this, arguments: [source.jsValue, destination.jsValue, copySize.jsValue]) + } + + @inlinable public func clearBuffer(buffer: GPUBuffer, offset: GPUSize64? = nil, size: GPUSize64? = nil) { + let this = jsObject + _ = this[Strings.clearBuffer].function!(this: this, arguments: [buffer.jsValue, offset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]) + } + + @inlinable public func writeTimestamp(querySet: GPUQuerySet, queryIndex: GPUSize32) { + let this = jsObject + _ = this[Strings.writeTimestamp].function!(this: this, arguments: [querySet.jsValue, queryIndex.jsValue]) + } + + @inlinable public func resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64) { + let this = jsObject + _ = this[Strings.resolveQuerySet].function!(this: this, arguments: [querySet.jsValue, firstQuery.jsValue, queryCount.jsValue, destination.jsValue, destinationOffset.jsValue]) + } + + @inlinable public func finish(descriptor: GPUCommandBufferDescriptor? = nil) -> GPUCommandBuffer { + let this = jsObject + return this[Strings.finish].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class GPUCommandEncoderDescriptor: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public protocol GPUCommandsMixin: JSBridgedClass {} +public extension GPUCommandsMixin {} + +public enum GPUCompareFunction: JSString, JSValueCompatible { + case never = "never" + case less = "less" + case equal = "equal" + case lessEqual = "less-equal" + case greater = "greater" + case notEqual = "not-equal" + case greaterEqual = "greater-equal" + case always = "always" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUCompilationInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUCompilationInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _messages = ReadonlyAttribute(jsObject: jsObject, name: Strings.messages) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var messages: [GPUCompilationMessage] +} + +public class GPUCompilationMessage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUCompilationMessage].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _lineNum = ReadonlyAttribute(jsObject: jsObject, name: Strings.lineNum) + _linePos = ReadonlyAttribute(jsObject: jsObject, name: Strings.linePos) + _offset = ReadonlyAttribute(jsObject: jsObject, name: Strings.offset) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var message: String + + @ReadonlyAttribute + public var type: GPUCompilationMessageType + + @ReadonlyAttribute + public var lineNum: UInt64 + + @ReadonlyAttribute + public var linePos: UInt64 + + @ReadonlyAttribute + public var offset: UInt64 + + @ReadonlyAttribute + public var length: UInt64 +} + +public enum GPUCompilationMessageType: JSString, JSValueCompatible { + case error = "error" + case warning = "warning" + case info = "info" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUComputePassDescriptor: BridgedDictionary { + public convenience init(timestampWrites: GPUComputePassTimestampWrites) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.timestampWrites] = timestampWrites.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _timestampWrites = ReadWriteAttribute(jsObject: object, name: Strings.timestampWrites) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var timestampWrites: GPUComputePassTimestampWrites +} + +public class GPUComputePassEncoder: JSBridgedClass, GPUObjectBase, GPUCommandsMixin, GPUDebugCommandsMixin, GPUProgrammablePassEncoder { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUComputePassEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func setPipeline(pipeline: GPUComputePipeline) { + let this = jsObject + _ = this[Strings.setPipeline].function!(this: this, arguments: [pipeline.jsValue]) + } + + @inlinable public func dispatch(workgroupCountX: GPUSize32, workgroupCountY: GPUSize32? = nil, workgroupCountZ: GPUSize32? = nil) { + let this = jsObject + _ = this[Strings.dispatch].function!(this: this, arguments: [workgroupCountX.jsValue, workgroupCountY?.jsValue ?? .undefined, workgroupCountZ?.jsValue ?? .undefined]) + } + + @inlinable public func dispatchIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64) { + let this = jsObject + _ = this[Strings.dispatchIndirect].function!(this: this, arguments: [indirectBuffer.jsValue, indirectOffset.jsValue]) + } + + @inlinable public func end() { + let this = jsObject + _ = this[Strings.end].function!(this: this, arguments: []) + } +} + +public enum GPUComputePassTimestampLocation: JSString, JSValueCompatible { + case beginning = "beginning" + case end = "end" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUComputePassTimestampWrite: BridgedDictionary { + public convenience init(querySet: GPUQuerySet, queryIndex: GPUSize32, location: GPUComputePassTimestampLocation) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.querySet] = querySet.jsValue + object[Strings.queryIndex] = queryIndex.jsValue + object[Strings.location] = location.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _querySet = ReadWriteAttribute(jsObject: object, name: Strings.querySet) + _queryIndex = ReadWriteAttribute(jsObject: object, name: Strings.queryIndex) + _location = ReadWriteAttribute(jsObject: object, name: Strings.location) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var querySet: GPUQuerySet + + @ReadWriteAttribute + public var queryIndex: GPUSize32 + + @ReadWriteAttribute + public var location: GPUComputePassTimestampLocation +} + +public class GPUComputePipeline: JSBridgedClass, GPUObjectBase, GPUPipelineBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUComputePipeline].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUComputePipelineDescriptor: BridgedDictionary { + public convenience init(compute: GPUProgrammableStage) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.compute] = compute.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _compute = ReadWriteAttribute(jsObject: object, name: Strings.compute) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var compute: GPUProgrammableStage +} + +public enum GPUCullMode: JSString, JSValueCompatible { + case none = "none" + case front = "front" + case back = "back" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol GPUDebugCommandsMixin: JSBridgedClass {} +public extension GPUDebugCommandsMixin { + @inlinable func pushDebugGroup(groupLabel: String) { + let this = jsObject + _ = this[Strings.pushDebugGroup].function!(this: this, arguments: [groupLabel.jsValue]) + } + + @inlinable func popDebugGroup() { + let this = jsObject + _ = this[Strings.popDebugGroup].function!(this: this, arguments: []) + } + + @inlinable func insertDebugMarker(markerLabel: String) { + let this = jsObject + _ = this[Strings.insertDebugMarker].function!(this: this, arguments: [markerLabel.jsValue]) + } +} + +public class GPUDepthStencilState: BridgedDictionary { + public convenience init(format: GPUTextureFormat, depthWriteEnabled: Bool, depthCompare: GPUCompareFunction, stencilFront: GPUStencilFaceState, stencilBack: GPUStencilFaceState, stencilReadMask: GPUStencilValue, stencilWriteMask: GPUStencilValue, depthBias: GPUDepthBias, depthBiasSlopeScale: Float, depthBiasClamp: Float) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.depthWriteEnabled] = depthWriteEnabled.jsValue + object[Strings.depthCompare] = depthCompare.jsValue + object[Strings.stencilFront] = stencilFront.jsValue + object[Strings.stencilBack] = stencilBack.jsValue + object[Strings.stencilReadMask] = stencilReadMask.jsValue + object[Strings.stencilWriteMask] = stencilWriteMask.jsValue + object[Strings.depthBias] = depthBias.jsValue + object[Strings.depthBiasSlopeScale] = depthBiasSlopeScale.jsValue + object[Strings.depthBiasClamp] = depthBiasClamp.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _depthWriteEnabled = ReadWriteAttribute(jsObject: object, name: Strings.depthWriteEnabled) + _depthCompare = ReadWriteAttribute(jsObject: object, name: Strings.depthCompare) + _stencilFront = ReadWriteAttribute(jsObject: object, name: Strings.stencilFront) + _stencilBack = ReadWriteAttribute(jsObject: object, name: Strings.stencilBack) + _stencilReadMask = ReadWriteAttribute(jsObject: object, name: Strings.stencilReadMask) + _stencilWriteMask = ReadWriteAttribute(jsObject: object, name: Strings.stencilWriteMask) + _depthBias = ReadWriteAttribute(jsObject: object, name: Strings.depthBias) + _depthBiasSlopeScale = ReadWriteAttribute(jsObject: object, name: Strings.depthBiasSlopeScale) + _depthBiasClamp = ReadWriteAttribute(jsObject: object, name: Strings.depthBiasClamp) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: GPUTextureFormat + + @ReadWriteAttribute + public var depthWriteEnabled: Bool + + @ReadWriteAttribute + public var depthCompare: GPUCompareFunction + + @ReadWriteAttribute + public var stencilFront: GPUStencilFaceState + + @ReadWriteAttribute + public var stencilBack: GPUStencilFaceState + + @ReadWriteAttribute + public var stencilReadMask: GPUStencilValue + + @ReadWriteAttribute + public var stencilWriteMask: GPUStencilValue + + @ReadWriteAttribute + public var depthBias: GPUDepthBias + + @ReadWriteAttribute + public var depthBiasSlopeScale: Float + + @ReadWriteAttribute + public var depthBiasClamp: Float +} + +public class GPUDevice: EventTarget, GPUObjectBase { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.GPUDevice].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _features = ReadonlyAttribute(jsObject: jsObject, name: Strings.features) + _limits = ReadonlyAttribute(jsObject: jsObject, name: Strings.limits) + _queue = ReadonlyAttribute(jsObject: jsObject, name: Strings.queue) + _lost = ReadonlyAttribute(jsObject: jsObject, name: Strings.lost) + _onuncapturederror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onuncapturederror) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var features: GPUSupportedFeatures + + @ReadonlyAttribute + public var limits: GPUSupportedLimits + + @ReadonlyAttribute + public var queue: GPUQueue + + @inlinable public func destroy() { + let this = jsObject + _ = this[Strings.destroy].function!(this: this, arguments: []) + } + + @inlinable public func createBuffer(descriptor: GPUBufferDescriptor) -> GPUBuffer { + let this = jsObject + return this[Strings.createBuffer].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createTexture(descriptor: GPUTextureDescriptor) -> GPUTexture { + let this = jsObject + return this[Strings.createTexture].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createSampler(descriptor: GPUSamplerDescriptor? = nil) -> GPUSampler { + let this = jsObject + return this[Strings.createSampler].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func importExternalTexture(descriptor: GPUExternalTextureDescriptor) -> GPUExternalTexture { + let this = jsObject + return this[Strings.importExternalTexture].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor) -> GPUBindGroupLayout { + let this = jsObject + return this[Strings.createBindGroupLayout].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor) -> GPUPipelineLayout { + let this = jsObject + return this[Strings.createPipelineLayout].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createBindGroup(descriptor: GPUBindGroupDescriptor) -> GPUBindGroup { + let this = jsObject + return this[Strings.createBindGroup].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createShaderModule(descriptor: GPUShaderModuleDescriptor) -> GPUShaderModule { + let this = jsObject + return this[Strings.createShaderModule].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createComputePipeline(descriptor: GPUComputePipelineDescriptor) -> GPUComputePipeline { + let this = jsObject + return this[Strings.createComputePipeline].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createRenderPipeline(descriptor: GPURenderPipelineDescriptor) -> GPURenderPipeline { + let this = jsObject + return this[Strings.createRenderPipeline].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor) -> JSPromise { + let this = jsObject + return this[Strings.createComputePipelineAsync].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor) async throws -> GPUComputePipeline { + let this = jsObject + let _promise: JSPromise = this[Strings.createComputePipelineAsync].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor) -> JSPromise { + let this = jsObject + return this[Strings.createRenderPipelineAsync].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor) async throws -> GPURenderPipeline { + let this = jsObject + let _promise: JSPromise = this[Strings.createRenderPipelineAsync].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func createCommandEncoder(descriptor: GPUCommandEncoderDescriptor? = nil) -> GPUCommandEncoder { + let this = jsObject + return this[Strings.createCommandEncoder].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor) -> GPURenderBundleEncoder { + let this = jsObject + return this[Strings.createRenderBundleEncoder].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @inlinable public func createQuerySet(descriptor: GPUQuerySetDescriptor) -> GPUQuerySet { + let this = jsObject + return this[Strings.createQuerySet].function!(this: this, arguments: [descriptor.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var lost: JSPromise + + @inlinable public func pushErrorScope(filter: GPUErrorFilter) { + let this = jsObject + _ = this[Strings.pushErrorScope].function!(this: this, arguments: [filter.jsValue]) + } + + @inlinable public func popErrorScope() -> JSPromise { + let this = jsObject + return this[Strings.popErrorScope].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func popErrorScope() async throws -> GPUError? { + let this = jsObject + let _promise: JSPromise = this[Strings.popErrorScope].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @ClosureAttribute1Optional + public var onuncapturederror: EventHandler +} + +public class GPUDeviceDescriptor: BridgedDictionary { + public convenience init(requiredFeatures: [GPUFeatureName], requiredLimits: [String: GPUSize64], defaultQueue: GPUQueueDescriptor) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.requiredFeatures] = requiredFeatures.jsValue + object[Strings.requiredLimits] = requiredLimits.jsValue + object[Strings.defaultQueue] = defaultQueue.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _requiredFeatures = ReadWriteAttribute(jsObject: object, name: Strings.requiredFeatures) + _requiredLimits = ReadWriteAttribute(jsObject: object, name: Strings.requiredLimits) + _defaultQueue = ReadWriteAttribute(jsObject: object, name: Strings.defaultQueue) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var requiredFeatures: [GPUFeatureName] + + @ReadWriteAttribute + public var requiredLimits: [String: GPUSize64] + + @ReadWriteAttribute + public var defaultQueue: GPUQueueDescriptor +} + +public class GPUDeviceLostInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUDeviceLostInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _reason = ReadonlyAttribute(jsObject: jsObject, name: Strings.reason) + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var reason: GPUDeviceLostReason? + + @ReadonlyAttribute + public var message: String +} + +public enum GPUDeviceLostReason: JSString, JSValueCompatible { + case destroyed = "destroyed" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUErrorFilter: JSString, JSValueCompatible { + case outOfMemory = "out-of-memory" + case validation = "validation" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUExtent3DDict: BridgedDictionary { + public convenience init(width: GPUIntegerCoordinate, height: GPUIntegerCoordinate, depthOrArrayLayers: GPUIntegerCoordinate) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.depthOrArrayLayers] = depthOrArrayLayers.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _depthOrArrayLayers = ReadWriteAttribute(jsObject: object, name: Strings.depthOrArrayLayers) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: GPUIntegerCoordinate + + @ReadWriteAttribute + public var height: GPUIntegerCoordinate + + @ReadWriteAttribute + public var depthOrArrayLayers: GPUIntegerCoordinate +} + +public class GPUExternalTexture: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUExternalTexture].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _expired = ReadonlyAttribute(jsObject: jsObject, name: Strings.expired) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var expired: Bool +} + +public class GPUExternalTextureBindingLayout: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class GPUExternalTextureDescriptor: BridgedDictionary { + public convenience init(source: HTMLVideoElement, colorSpace: GPUPredefinedColorSpace) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.source] = source.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _source = ReadWriteAttribute(jsObject: object, name: Strings.source) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var source: HTMLVideoElement + + @ReadWriteAttribute + public var colorSpace: GPUPredefinedColorSpace +} + +public enum GPUFeatureName: JSString, JSValueCompatible { + case depthClipControl = "depth-clip-control" + case depth24unormStencil8 = "depth24unorm-stencil8" + case depth32floatStencil8 = "depth32float-stencil8" + case textureCompressionBc = "texture-compression-bc" + case textureCompressionEtc2 = "texture-compression-etc2" + case textureCompressionAstc = "texture-compression-astc" + case timestampQuery = "timestamp-query" + case indirectFirstInstance = "indirect-first-instance" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUFilterMode: JSString, JSValueCompatible { + case nearest = "nearest" + case linear = "linear" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUFragmentState: BridgedDictionary { + public convenience init(targets: [GPUColorTargetState?]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.targets] = targets.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _targets = ReadWriteAttribute(jsObject: object, name: Strings.targets) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var targets: [GPUColorTargetState?] +} + +public enum GPUFrontFace: JSString, JSValueCompatible { + case ccw = "ccw" + case cw = "cw" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUImageCopyBuffer: BridgedDictionary { + public convenience init(buffer: GPUBuffer) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.buffer] = buffer.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _buffer = ReadWriteAttribute(jsObject: object, name: Strings.buffer) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var buffer: GPUBuffer +} + +public class GPUImageCopyExternalImage: BridgedDictionary { + public convenience init(source: HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas, origin: GPUOrigin2D, flipY: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.source] = source.jsValue + object[Strings.origin] = origin.jsValue + object[Strings.flipY] = flipY.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _source = ReadWriteAttribute(jsObject: object, name: Strings.source) + _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) + _flipY = ReadWriteAttribute(jsObject: object, name: Strings.flipY) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var source: HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas + + @ReadWriteAttribute + public var origin: GPUOrigin2D + + @ReadWriteAttribute + public var flipY: Bool +} + +public class GPUImageCopyTexture: BridgedDictionary { + public convenience init(texture: GPUTexture, mipLevel: GPUIntegerCoordinate, origin: GPUOrigin3D, aspect: GPUTextureAspect) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.texture] = texture.jsValue + object[Strings.mipLevel] = mipLevel.jsValue + object[Strings.origin] = origin.jsValue + object[Strings.aspect] = aspect.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _texture = ReadWriteAttribute(jsObject: object, name: Strings.texture) + _mipLevel = ReadWriteAttribute(jsObject: object, name: Strings.mipLevel) + _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) + _aspect = ReadWriteAttribute(jsObject: object, name: Strings.aspect) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var texture: GPUTexture + + @ReadWriteAttribute + public var mipLevel: GPUIntegerCoordinate + + @ReadWriteAttribute + public var origin: GPUOrigin3D + + @ReadWriteAttribute + public var aspect: GPUTextureAspect +} + +public class GPUImageCopyTextureTagged: BridgedDictionary { + public convenience init(colorSpace: GPUPredefinedColorSpace, premultipliedAlpha: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.premultipliedAlpha] = premultipliedAlpha.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _premultipliedAlpha = ReadWriteAttribute(jsObject: object, name: Strings.premultipliedAlpha) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorSpace: GPUPredefinedColorSpace + + @ReadWriteAttribute + public var premultipliedAlpha: Bool +} + +public class GPUImageDataLayout: BridgedDictionary { + public convenience init(offset: GPUSize64, bytesPerRow: GPUSize32, rowsPerImage: GPUSize32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.bytesPerRow] = bytesPerRow.jsValue + object[Strings.rowsPerImage] = rowsPerImage.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _bytesPerRow = ReadWriteAttribute(jsObject: object, name: Strings.bytesPerRow) + _rowsPerImage = ReadWriteAttribute(jsObject: object, name: Strings.rowsPerImage) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var offset: GPUSize64 + + @ReadWriteAttribute + public var bytesPerRow: GPUSize32 + + @ReadWriteAttribute + public var rowsPerImage: GPUSize32 +} + +public enum GPUIndexFormat: JSString, JSValueCompatible { + case uint16 = "uint16" + case uint32 = "uint32" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPULoadOp: JSString, JSValueCompatible { + case load = "load" + case clear = "clear" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUMapMode { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.GPUMapMode].object! + } + + public static let READ: GPUFlagsConstant = 0x0001 + + public static let WRITE: GPUFlagsConstant = 0x0002 +} + +public enum GPUMipmapFilterMode: JSString, JSValueCompatible { + case nearest = "nearest" + case linear = "linear" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUMultisampleState: BridgedDictionary { + public convenience init(count: GPUSize32, mask: GPUSampleMask, alphaToCoverageEnabled: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.count] = count.jsValue + object[Strings.mask] = mask.jsValue + object[Strings.alphaToCoverageEnabled] = alphaToCoverageEnabled.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _count = ReadWriteAttribute(jsObject: object, name: Strings.count) + _mask = ReadWriteAttribute(jsObject: object, name: Strings.mask) + _alphaToCoverageEnabled = ReadWriteAttribute(jsObject: object, name: Strings.alphaToCoverageEnabled) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var count: GPUSize32 + + @ReadWriteAttribute + public var mask: GPUSampleMask + + @ReadWriteAttribute + public var alphaToCoverageEnabled: Bool +} + +public protocol GPUObjectBase: JSBridgedClass {} +public extension GPUObjectBase { + @inlinable var label: String? { + get { ReadWriteAttribute[Strings.label, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.label, in: jsObject] = newValue } + } +} + +public class GPUObjectDescriptorBase: BridgedDictionary { + public convenience init(label: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.label] = label.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _label = ReadWriteAttribute(jsObject: object, name: Strings.label) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var label: String +} + +public class GPUOrigin2DDict: BridgedDictionary { + public convenience init(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.x] = x.jsValue + object[Strings.y] = y.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _x = ReadWriteAttribute(jsObject: object, name: Strings.x) + _y = ReadWriteAttribute(jsObject: object, name: Strings.y) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var x: GPUIntegerCoordinate + + @ReadWriteAttribute + public var y: GPUIntegerCoordinate +} + +public class GPUOrigin3DDict: BridgedDictionary { + public convenience init(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, z: GPUIntegerCoordinate) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.x] = x.jsValue + object[Strings.y] = y.jsValue + object[Strings.z] = z.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _x = ReadWriteAttribute(jsObject: object, name: Strings.x) + _y = ReadWriteAttribute(jsObject: object, name: Strings.y) + _z = ReadWriteAttribute(jsObject: object, name: Strings.z) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var x: GPUIntegerCoordinate + + @ReadWriteAttribute + public var y: GPUIntegerCoordinate + + @ReadWriteAttribute + public var z: GPUIntegerCoordinate +} + +public class GPUOutOfMemoryError: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUOutOfMemoryError].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } +} + +public protocol GPUPipelineBase: JSBridgedClass {} +public extension GPUPipelineBase { + @inlinable func getBindGroupLayout(index: UInt32) -> GPUBindGroupLayout { + let this = jsObject + return this[Strings.getBindGroupLayout].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public class GPUPipelineDescriptorBase: BridgedDictionary { + public convenience init(layout: GPUPipelineLayout) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.layout] = layout.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var layout: GPUPipelineLayout +} + +public class GPUPipelineLayout: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUPipelineLayout].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUPipelineLayoutDescriptor: BridgedDictionary { + public convenience init(bindGroupLayouts: [GPUBindGroupLayout]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.bindGroupLayouts] = bindGroupLayouts.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _bindGroupLayouts = ReadWriteAttribute(jsObject: object, name: Strings.bindGroupLayouts) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var bindGroupLayouts: [GPUBindGroupLayout] +} + +public enum GPUPowerPreference: JSString, JSValueCompatible { + case lowPower = "low-power" + case highPerformance = "high-performance" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUPredefinedColorSpace: JSString, JSValueCompatible { + case srgb = "srgb" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUPrimitiveState: BridgedDictionary { + public convenience init(topology: GPUPrimitiveTopology, stripIndexFormat: GPUIndexFormat, frontFace: GPUFrontFace, cullMode: GPUCullMode, unclippedDepth: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.topology] = topology.jsValue + object[Strings.stripIndexFormat] = stripIndexFormat.jsValue + object[Strings.frontFace] = frontFace.jsValue + object[Strings.cullMode] = cullMode.jsValue + object[Strings.unclippedDepth] = unclippedDepth.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _topology = ReadWriteAttribute(jsObject: object, name: Strings.topology) + _stripIndexFormat = ReadWriteAttribute(jsObject: object, name: Strings.stripIndexFormat) + _frontFace = ReadWriteAttribute(jsObject: object, name: Strings.frontFace) + _cullMode = ReadWriteAttribute(jsObject: object, name: Strings.cullMode) + _unclippedDepth = ReadWriteAttribute(jsObject: object, name: Strings.unclippedDepth) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var topology: GPUPrimitiveTopology + + @ReadWriteAttribute + public var stripIndexFormat: GPUIndexFormat + + @ReadWriteAttribute + public var frontFace: GPUFrontFace + + @ReadWriteAttribute + public var cullMode: GPUCullMode + + @ReadWriteAttribute + public var unclippedDepth: Bool +} + +public enum GPUPrimitiveTopology: JSString, JSValueCompatible { + case pointList = "point-list" + case lineList = "line-list" + case lineStrip = "line-strip" + case triangleList = "triangle-list" + case triangleStrip = "triangle-strip" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol GPUProgrammablePassEncoder: JSBridgedClass {} +public extension GPUProgrammablePassEncoder { + @inlinable func setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup, dynamicOffsets: [GPUBufferDynamicOffset]? = nil) { + let this = jsObject + _ = this[Strings.setBindGroup].function!(this: this, arguments: [index.jsValue, bindGroup.jsValue, dynamicOffsets?.jsValue ?? .undefined]) + } + + @inlinable func setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32) { + let this = jsObject + _ = this[Strings.setBindGroup].function!(this: this, arguments: [index.jsValue, bindGroup.jsValue, dynamicOffsetsData.jsValue, dynamicOffsetsDataStart.jsValue, dynamicOffsetsDataLength.jsValue]) + } +} + +public class GPUProgrammableStage: BridgedDictionary { + public convenience init(module: GPUShaderModule, entryPoint: String, constants: [String: GPUPipelineConstantValue]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.module] = module.jsValue + object[Strings.entryPoint] = entryPoint.jsValue + object[Strings.constants] = constants.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _module = ReadWriteAttribute(jsObject: object, name: Strings.module) + _entryPoint = ReadWriteAttribute(jsObject: object, name: Strings.entryPoint) + _constants = ReadWriteAttribute(jsObject: object, name: Strings.constants) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var module: GPUShaderModule + + @ReadWriteAttribute + public var entryPoint: String + + @ReadWriteAttribute + public var constants: [String: GPUPipelineConstantValue] +} + +public class GPUQuerySet: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUQuerySet].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func destroy() { + let this = jsObject + _ = this[Strings.destroy].function!(this: this, arguments: []) + } +} + +public class GPUQuerySetDescriptor: BridgedDictionary { + public convenience init(type: GPUQueryType, count: GPUSize32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.count] = count.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _count = ReadWriteAttribute(jsObject: object, name: Strings.count) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: GPUQueryType + + @ReadWriteAttribute + public var count: GPUSize32 +} + +public enum GPUQueryType: JSString, JSValueCompatible { + case occlusion = "occlusion" + case timestamp = "timestamp" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUQueue: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUQueue].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func submit(commandBuffers: [GPUCommandBuffer]) { + let this = jsObject + _ = this[Strings.submit].function!(this: this, arguments: [commandBuffers.jsValue]) + } + + @inlinable public func onSubmittedWorkDone() -> JSPromise { + let this = jsObject + return this[Strings.onSubmittedWorkDone].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func onSubmittedWorkDone() async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.onSubmittedWorkDone].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value + } + + @inlinable public func writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: BufferSource, dataOffset: GPUSize64? = nil, size: GPUSize64? = nil) { + let this = jsObject + _ = this[Strings.writeBuffer].function!(this: this, arguments: [buffer.jsValue, bufferOffset.jsValue, data.jsValue, dataOffset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]) + } + + @inlinable public func writeTexture(destination: GPUImageCopyTexture, data: BufferSource, dataLayout: GPUImageDataLayout, size: GPUExtent3D) { + let this = jsObject + _ = this[Strings.writeTexture].function!(this: this, arguments: [destination.jsValue, data.jsValue, dataLayout.jsValue, size.jsValue]) + } + + @inlinable public func copyExternalImageToTexture(source: GPUImageCopyExternalImage, destination: GPUImageCopyTextureTagged, copySize: GPUExtent3D) { + let this = jsObject + _ = this[Strings.copyExternalImageToTexture].function!(this: this, arguments: [source.jsValue, destination.jsValue, copySize.jsValue]) + } +} + +public class GPUQueueDescriptor: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class GPURenderBundle: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPURenderBundle].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPURenderBundleDescriptor: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} + +public class GPURenderBundleEncoder: JSBridgedClass, GPUObjectBase, GPUCommandsMixin, GPUDebugCommandsMixin, GPUProgrammablePassEncoder, GPURenderEncoderBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPURenderBundleEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func finish(descriptor: GPURenderBundleDescriptor? = nil) -> GPURenderBundle { + let this = jsObject + return this[Strings.finish].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } +} + +public class GPURenderBundleEncoderDescriptor: BridgedDictionary { + public convenience init(depthReadOnly: Bool, stencilReadOnly: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.depthReadOnly] = depthReadOnly.jsValue + object[Strings.stencilReadOnly] = stencilReadOnly.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _depthReadOnly = ReadWriteAttribute(jsObject: object, name: Strings.depthReadOnly) + _stencilReadOnly = ReadWriteAttribute(jsObject: object, name: Strings.stencilReadOnly) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var depthReadOnly: Bool + + @ReadWriteAttribute + public var stencilReadOnly: Bool +} + +public protocol GPURenderEncoderBase: JSBridgedClass {} +public extension GPURenderEncoderBase { + @inlinable func setPipeline(pipeline: GPURenderPipeline) { + let this = jsObject + _ = this[Strings.setPipeline].function!(this: this, arguments: [pipeline.jsValue]) + } + + @inlinable func setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset: GPUSize64? = nil, size: GPUSize64? = nil) { + let this = jsObject + _ = this[Strings.setIndexBuffer].function!(this: this, arguments: [buffer.jsValue, indexFormat.jsValue, offset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]) + } + + @inlinable func setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer, offset: GPUSize64? = nil, size: GPUSize64? = nil) { + let this = jsObject + _ = this[Strings.setVertexBuffer].function!(this: this, arguments: [slot.jsValue, buffer.jsValue, offset?.jsValue ?? .undefined, size?.jsValue ?? .undefined]) + } + + @inlinable func draw(vertexCount: GPUSize32, instanceCount: GPUSize32? = nil, firstVertex: GPUSize32? = nil, firstInstance: GPUSize32? = nil) { + let this = jsObject + _ = this[Strings.draw].function!(this: this, arguments: [vertexCount.jsValue, instanceCount?.jsValue ?? .undefined, firstVertex?.jsValue ?? .undefined, firstInstance?.jsValue ?? .undefined]) + } + + @inlinable func drawIndexed(indexCount: GPUSize32, instanceCount: GPUSize32? = nil, firstIndex: GPUSize32? = nil, baseVertex: GPUSignedOffset32? = nil, firstInstance: GPUSize32? = nil) { + let this = jsObject + _ = this[Strings.drawIndexed].function!(this: this, arguments: [indexCount.jsValue, instanceCount?.jsValue ?? .undefined, firstIndex?.jsValue ?? .undefined, baseVertex?.jsValue ?? .undefined, firstInstance?.jsValue ?? .undefined]) + } + + @inlinable func drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64) { + let this = jsObject + _ = this[Strings.drawIndirect].function!(this: this, arguments: [indirectBuffer.jsValue, indirectOffset.jsValue]) + } + + @inlinable func drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64) { + let this = jsObject + _ = this[Strings.drawIndexedIndirect].function!(this: this, arguments: [indirectBuffer.jsValue, indirectOffset.jsValue]) + } +} + +public class GPURenderPassColorAttachment: BridgedDictionary { + public convenience init(view: GPUTextureView, resolveTarget: GPUTextureView, clearValue: GPUColor, loadOp: GPULoadOp, storeOp: GPUStoreOp) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.view] = view.jsValue + object[Strings.resolveTarget] = resolveTarget.jsValue + object[Strings.clearValue] = clearValue.jsValue + object[Strings.loadOp] = loadOp.jsValue + object[Strings.storeOp] = storeOp.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _view = ReadWriteAttribute(jsObject: object, name: Strings.view) + _resolveTarget = ReadWriteAttribute(jsObject: object, name: Strings.resolveTarget) + _clearValue = ReadWriteAttribute(jsObject: object, name: Strings.clearValue) + _loadOp = ReadWriteAttribute(jsObject: object, name: Strings.loadOp) + _storeOp = ReadWriteAttribute(jsObject: object, name: Strings.storeOp) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var view: GPUTextureView + + @ReadWriteAttribute + public var resolveTarget: GPUTextureView + + @ReadWriteAttribute + public var clearValue: GPUColor + + @ReadWriteAttribute + public var loadOp: GPULoadOp + + @ReadWriteAttribute + public var storeOp: GPUStoreOp +} + +public class GPURenderPassDepthStencilAttachment: BridgedDictionary { + public convenience init(view: GPUTextureView, depthClearValue: Float, depthLoadOp: GPULoadOp, depthStoreOp: GPUStoreOp, depthReadOnly: Bool, stencilClearValue: GPUStencilValue, stencilLoadOp: GPULoadOp, stencilStoreOp: GPUStoreOp, stencilReadOnly: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.view] = view.jsValue + object[Strings.depthClearValue] = depthClearValue.jsValue + object[Strings.depthLoadOp] = depthLoadOp.jsValue + object[Strings.depthStoreOp] = depthStoreOp.jsValue + object[Strings.depthReadOnly] = depthReadOnly.jsValue + object[Strings.stencilClearValue] = stencilClearValue.jsValue + object[Strings.stencilLoadOp] = stencilLoadOp.jsValue + object[Strings.stencilStoreOp] = stencilStoreOp.jsValue + object[Strings.stencilReadOnly] = stencilReadOnly.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _view = ReadWriteAttribute(jsObject: object, name: Strings.view) + _depthClearValue = ReadWriteAttribute(jsObject: object, name: Strings.depthClearValue) + _depthLoadOp = ReadWriteAttribute(jsObject: object, name: Strings.depthLoadOp) + _depthStoreOp = ReadWriteAttribute(jsObject: object, name: Strings.depthStoreOp) + _depthReadOnly = ReadWriteAttribute(jsObject: object, name: Strings.depthReadOnly) + _stencilClearValue = ReadWriteAttribute(jsObject: object, name: Strings.stencilClearValue) + _stencilLoadOp = ReadWriteAttribute(jsObject: object, name: Strings.stencilLoadOp) + _stencilStoreOp = ReadWriteAttribute(jsObject: object, name: Strings.stencilStoreOp) + _stencilReadOnly = ReadWriteAttribute(jsObject: object, name: Strings.stencilReadOnly) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var view: GPUTextureView + + @ReadWriteAttribute + public var depthClearValue: Float + + @ReadWriteAttribute + public var depthLoadOp: GPULoadOp + + @ReadWriteAttribute + public var depthStoreOp: GPUStoreOp + + @ReadWriteAttribute + public var depthReadOnly: Bool + + @ReadWriteAttribute + public var stencilClearValue: GPUStencilValue + + @ReadWriteAttribute + public var stencilLoadOp: GPULoadOp + + @ReadWriteAttribute + public var stencilStoreOp: GPUStoreOp + + @ReadWriteAttribute + public var stencilReadOnly: Bool +} + +public class GPURenderPassDescriptor: BridgedDictionary { + public convenience init(colorAttachments: [GPURenderPassColorAttachment?], depthStencilAttachment: GPURenderPassDepthStencilAttachment, occlusionQuerySet: GPUQuerySet, timestampWrites: GPURenderPassTimestampWrites) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.colorAttachments] = colorAttachments.jsValue + object[Strings.depthStencilAttachment] = depthStencilAttachment.jsValue + object[Strings.occlusionQuerySet] = occlusionQuerySet.jsValue + object[Strings.timestampWrites] = timestampWrites.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _colorAttachments = ReadWriteAttribute(jsObject: object, name: Strings.colorAttachments) + _depthStencilAttachment = ReadWriteAttribute(jsObject: object, name: Strings.depthStencilAttachment) + _occlusionQuerySet = ReadWriteAttribute(jsObject: object, name: Strings.occlusionQuerySet) + _timestampWrites = ReadWriteAttribute(jsObject: object, name: Strings.timestampWrites) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorAttachments: [GPURenderPassColorAttachment?] + + @ReadWriteAttribute + public var depthStencilAttachment: GPURenderPassDepthStencilAttachment + + @ReadWriteAttribute + public var occlusionQuerySet: GPUQuerySet + + @ReadWriteAttribute + public var timestampWrites: GPURenderPassTimestampWrites +} + +public class GPURenderPassEncoder: JSBridgedClass, GPUObjectBase, GPUCommandsMixin, GPUDebugCommandsMixin, GPUProgrammablePassEncoder, GPURenderEncoderBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPURenderPassEncoder].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func setViewport(x: Float, y: Float, width: Float, height: Float, minDepth: Float, maxDepth: Float) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = width.jsValue + let _arg3 = height.jsValue + let _arg4 = minDepth.jsValue + let _arg5 = maxDepth.jsValue + let this = jsObject + _ = this[Strings.setViewport].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable public func setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate) { + let this = jsObject + _ = this[Strings.setScissorRect].function!(this: this, arguments: [x.jsValue, y.jsValue, width.jsValue, height.jsValue]) + } + + @inlinable public func setBlendConstant(color: GPUColor) { + let this = jsObject + _ = this[Strings.setBlendConstant].function!(this: this, arguments: [color.jsValue]) + } + + @inlinable public func setStencilReference(reference: GPUStencilValue) { + let this = jsObject + _ = this[Strings.setStencilReference].function!(this: this, arguments: [reference.jsValue]) + } + + @inlinable public func beginOcclusionQuery(queryIndex: GPUSize32) { + let this = jsObject + _ = this[Strings.beginOcclusionQuery].function!(this: this, arguments: [queryIndex.jsValue]) + } + + @inlinable public func endOcclusionQuery() { + let this = jsObject + _ = this[Strings.endOcclusionQuery].function!(this: this, arguments: []) + } + + @inlinable public func executeBundles(bundles: [GPURenderBundle]) { + let this = jsObject + _ = this[Strings.executeBundles].function!(this: this, arguments: [bundles.jsValue]) + } + + @inlinable public func end() { + let this = jsObject + _ = this[Strings.end].function!(this: this, arguments: []) + } +} + +public class GPURenderPassLayout: BridgedDictionary { + public convenience init(colorFormats: [GPUTextureFormat?], depthStencilFormat: GPUTextureFormat, sampleCount: GPUSize32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.colorFormats] = colorFormats.jsValue + object[Strings.depthStencilFormat] = depthStencilFormat.jsValue + object[Strings.sampleCount] = sampleCount.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _colorFormats = ReadWriteAttribute(jsObject: object, name: Strings.colorFormats) + _depthStencilFormat = ReadWriteAttribute(jsObject: object, name: Strings.depthStencilFormat) + _sampleCount = ReadWriteAttribute(jsObject: object, name: Strings.sampleCount) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorFormats: [GPUTextureFormat?] + + @ReadWriteAttribute + public var depthStencilFormat: GPUTextureFormat + + @ReadWriteAttribute + public var sampleCount: GPUSize32 +} + +public enum GPURenderPassTimestampLocation: JSString, JSValueCompatible { + case beginning = "beginning" + case end = "end" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPURenderPassTimestampWrite: BridgedDictionary { + public convenience init(querySet: GPUQuerySet, queryIndex: GPUSize32, location: GPURenderPassTimestampLocation) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.querySet] = querySet.jsValue + object[Strings.queryIndex] = queryIndex.jsValue + object[Strings.location] = location.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _querySet = ReadWriteAttribute(jsObject: object, name: Strings.querySet) + _queryIndex = ReadWriteAttribute(jsObject: object, name: Strings.queryIndex) + _location = ReadWriteAttribute(jsObject: object, name: Strings.location) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var querySet: GPUQuerySet + + @ReadWriteAttribute + public var queryIndex: GPUSize32 + + @ReadWriteAttribute + public var location: GPURenderPassTimestampLocation +} + +public class GPURenderPipeline: JSBridgedClass, GPUObjectBase, GPUPipelineBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPURenderPipeline].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPURenderPipelineDescriptor: BridgedDictionary { + public convenience init(vertex: GPUVertexState, primitive: GPUPrimitiveState, depthStencil: GPUDepthStencilState, multisample: GPUMultisampleState, fragment: GPUFragmentState) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.vertex] = vertex.jsValue + object[Strings.primitive] = primitive.jsValue + object[Strings.depthStencil] = depthStencil.jsValue + object[Strings.multisample] = multisample.jsValue + object[Strings.fragment] = fragment.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _vertex = ReadWriteAttribute(jsObject: object, name: Strings.vertex) + _primitive = ReadWriteAttribute(jsObject: object, name: Strings.primitive) + _depthStencil = ReadWriteAttribute(jsObject: object, name: Strings.depthStencil) + _multisample = ReadWriteAttribute(jsObject: object, name: Strings.multisample) + _fragment = ReadWriteAttribute(jsObject: object, name: Strings.fragment) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var vertex: GPUVertexState + + @ReadWriteAttribute + public var primitive: GPUPrimitiveState + + @ReadWriteAttribute + public var depthStencil: GPUDepthStencilState + + @ReadWriteAttribute + public var multisample: GPUMultisampleState + + @ReadWriteAttribute + public var fragment: GPUFragmentState +} + +public class GPURequestAdapterOptions: BridgedDictionary { + public convenience init(powerPreference: GPUPowerPreference, forceFallbackAdapter: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.powerPreference] = powerPreference.jsValue + object[Strings.forceFallbackAdapter] = forceFallbackAdapter.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _powerPreference = ReadWriteAttribute(jsObject: object, name: Strings.powerPreference) + _forceFallbackAdapter = ReadWriteAttribute(jsObject: object, name: Strings.forceFallbackAdapter) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var powerPreference: GPUPowerPreference + + @ReadWriteAttribute + public var forceFallbackAdapter: Bool +} + +public class GPUSampler: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUSampler].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUSamplerBindingLayout: BridgedDictionary { + public convenience init(type: GPUSamplerBindingType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var type: GPUSamplerBindingType +} + +public enum GPUSamplerBindingType: JSString, JSValueCompatible { + case filtering = "filtering" + case nonFiltering = "non-filtering" + case comparison = "comparison" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUSamplerDescriptor: BridgedDictionary { + public convenience init(addressModeU: GPUAddressMode, addressModeV: GPUAddressMode, addressModeW: GPUAddressMode, magFilter: GPUFilterMode, minFilter: GPUFilterMode, mipmapFilter: GPUMipmapFilterMode, lodMinClamp: Float, lodMaxClamp: Float, compare: GPUCompareFunction, maxAnisotropy: UInt16) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.addressModeU] = addressModeU.jsValue + object[Strings.addressModeV] = addressModeV.jsValue + object[Strings.addressModeW] = addressModeW.jsValue + object[Strings.magFilter] = magFilter.jsValue + object[Strings.minFilter] = minFilter.jsValue + object[Strings.mipmapFilter] = mipmapFilter.jsValue + object[Strings.lodMinClamp] = lodMinClamp.jsValue + object[Strings.lodMaxClamp] = lodMaxClamp.jsValue + object[Strings.compare] = compare.jsValue + object[Strings.maxAnisotropy] = maxAnisotropy.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _addressModeU = ReadWriteAttribute(jsObject: object, name: Strings.addressModeU) + _addressModeV = ReadWriteAttribute(jsObject: object, name: Strings.addressModeV) + _addressModeW = ReadWriteAttribute(jsObject: object, name: Strings.addressModeW) + _magFilter = ReadWriteAttribute(jsObject: object, name: Strings.magFilter) + _minFilter = ReadWriteAttribute(jsObject: object, name: Strings.minFilter) + _mipmapFilter = ReadWriteAttribute(jsObject: object, name: Strings.mipmapFilter) + _lodMinClamp = ReadWriteAttribute(jsObject: object, name: Strings.lodMinClamp) + _lodMaxClamp = ReadWriteAttribute(jsObject: object, name: Strings.lodMaxClamp) + _compare = ReadWriteAttribute(jsObject: object, name: Strings.compare) + _maxAnisotropy = ReadWriteAttribute(jsObject: object, name: Strings.maxAnisotropy) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var addressModeU: GPUAddressMode + + @ReadWriteAttribute + public var addressModeV: GPUAddressMode + + @ReadWriteAttribute + public var addressModeW: GPUAddressMode + + @ReadWriteAttribute + public var magFilter: GPUFilterMode + + @ReadWriteAttribute + public var minFilter: GPUFilterMode + + @ReadWriteAttribute + public var mipmapFilter: GPUMipmapFilterMode + + @ReadWriteAttribute + public var lodMinClamp: Float + + @ReadWriteAttribute + public var lodMaxClamp: Float + + @ReadWriteAttribute + public var compare: GPUCompareFunction + + @ReadWriteAttribute + public var maxAnisotropy: UInt16 +} + +public class GPUShaderModule: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUShaderModule].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func compilationInfo() -> JSPromise { + let this = jsObject + return this[Strings.compilationInfo].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func compilationInfo() async throws -> GPUCompilationInfo { + let this = jsObject + let _promise: JSPromise = this[Strings.compilationInfo].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} + +public class GPUShaderModuleCompilationHint: BridgedDictionary { + public convenience init(layout: GPUPipelineLayout) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.layout] = layout.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _layout = ReadWriteAttribute(jsObject: object, name: Strings.layout) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var layout: GPUPipelineLayout +} + +public class GPUShaderModuleDescriptor: BridgedDictionary { + public convenience init(code: String, sourceMap: JSObject, hints: [String: GPUShaderModuleCompilationHint]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.code] = code.jsValue + object[Strings.sourceMap] = sourceMap.jsValue + object[Strings.hints] = hints.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _code = ReadWriteAttribute(jsObject: object, name: Strings.code) + _sourceMap = ReadWriteAttribute(jsObject: object, name: Strings.sourceMap) + _hints = ReadWriteAttribute(jsObject: object, name: Strings.hints) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var code: String + + @ReadWriteAttribute + public var sourceMap: JSObject + + @ReadWriteAttribute + public var hints: [String: GPUShaderModuleCompilationHint] +} + +public enum GPUShaderStage { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.GPUShaderStage].object! + } + + public static let VERTEX: GPUFlagsConstant = 0x1 + + public static let FRAGMENT: GPUFlagsConstant = 0x2 + + public static let COMPUTE: GPUFlagsConstant = 0x4 +} + +public class GPUStencilFaceState: BridgedDictionary { + public convenience init(compare: GPUCompareFunction, failOp: GPUStencilOperation, depthFailOp: GPUStencilOperation, passOp: GPUStencilOperation) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.compare] = compare.jsValue + object[Strings.failOp] = failOp.jsValue + object[Strings.depthFailOp] = depthFailOp.jsValue + object[Strings.passOp] = passOp.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _compare = ReadWriteAttribute(jsObject: object, name: Strings.compare) + _failOp = ReadWriteAttribute(jsObject: object, name: Strings.failOp) + _depthFailOp = ReadWriteAttribute(jsObject: object, name: Strings.depthFailOp) + _passOp = ReadWriteAttribute(jsObject: object, name: Strings.passOp) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var compare: GPUCompareFunction + + @ReadWriteAttribute + public var failOp: GPUStencilOperation + + @ReadWriteAttribute + public var depthFailOp: GPUStencilOperation + + @ReadWriteAttribute + public var passOp: GPUStencilOperation +} + +public enum GPUStencilOperation: JSString, JSValueCompatible { + case keep = "keep" + case zero = "zero" + case replace = "replace" + case invert = "invert" + case incrementClamp = "increment-clamp" + case decrementClamp = "decrement-clamp" + case incrementWrap = "increment-wrap" + case decrementWrap = "decrement-wrap" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUStorageTextureAccess: JSString, JSValueCompatible { + case writeOnly = "write-only" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUStorageTextureBindingLayout: BridgedDictionary { + public convenience init(access: GPUStorageTextureAccess, format: GPUTextureFormat, viewDimension: GPUTextureViewDimension) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.access] = access.jsValue + object[Strings.format] = format.jsValue + object[Strings.viewDimension] = viewDimension.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _access = ReadWriteAttribute(jsObject: object, name: Strings.access) + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _viewDimension = ReadWriteAttribute(jsObject: object, name: Strings.viewDimension) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var access: GPUStorageTextureAccess + + @ReadWriteAttribute + public var format: GPUTextureFormat + + @ReadWriteAttribute + public var viewDimension: GPUTextureViewDimension +} + +public enum GPUStoreOp: JSString, JSValueCompatible { + case store = "store" + case discard = "discard" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUSupportedFeatures: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUSupportedFeatures].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + // XXX: make me Set-like! +} + +public class GPUSupportedLimits: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUSupportedLimits].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _maxTextureDimension1D = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxTextureDimension1D) + _maxTextureDimension2D = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxTextureDimension2D) + _maxTextureDimension3D = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxTextureDimension3D) + _maxTextureArrayLayers = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxTextureArrayLayers) + _maxBindGroups = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxBindGroups) + _maxDynamicUniformBuffersPerPipelineLayout = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxDynamicUniformBuffersPerPipelineLayout) + _maxDynamicStorageBuffersPerPipelineLayout = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxDynamicStorageBuffersPerPipelineLayout) + _maxSampledTexturesPerShaderStage = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxSampledTexturesPerShaderStage) + _maxSamplersPerShaderStage = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxSamplersPerShaderStage) + _maxStorageBuffersPerShaderStage = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxStorageBuffersPerShaderStage) + _maxStorageTexturesPerShaderStage = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxStorageTexturesPerShaderStage) + _maxUniformBuffersPerShaderStage = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxUniformBuffersPerShaderStage) + _maxUniformBufferBindingSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxUniformBufferBindingSize) + _maxStorageBufferBindingSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxStorageBufferBindingSize) + _minUniformBufferOffsetAlignment = ReadonlyAttribute(jsObject: jsObject, name: Strings.minUniformBufferOffsetAlignment) + _minStorageBufferOffsetAlignment = ReadonlyAttribute(jsObject: jsObject, name: Strings.minStorageBufferOffsetAlignment) + _maxVertexBuffers = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxVertexBuffers) + _maxVertexAttributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxVertexAttributes) + _maxVertexBufferArrayStride = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxVertexBufferArrayStride) + _maxInterStageShaderComponents = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxInterStageShaderComponents) + _maxComputeWorkgroupStorageSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxComputeWorkgroupStorageSize) + _maxComputeInvocationsPerWorkgroup = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxComputeInvocationsPerWorkgroup) + _maxComputeWorkgroupSizeX = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxComputeWorkgroupSizeX) + _maxComputeWorkgroupSizeY = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxComputeWorkgroupSizeY) + _maxComputeWorkgroupSizeZ = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxComputeWorkgroupSizeZ) + _maxComputeWorkgroupsPerDimension = ReadonlyAttribute(jsObject: jsObject, name: Strings.maxComputeWorkgroupsPerDimension) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var maxTextureDimension1D: UInt32 + + @ReadonlyAttribute + public var maxTextureDimension2D: UInt32 + + @ReadonlyAttribute + public var maxTextureDimension3D: UInt32 + + @ReadonlyAttribute + public var maxTextureArrayLayers: UInt32 + + @ReadonlyAttribute + public var maxBindGroups: UInt32 + + @ReadonlyAttribute + public var maxDynamicUniformBuffersPerPipelineLayout: UInt32 + + @ReadonlyAttribute + public var maxDynamicStorageBuffersPerPipelineLayout: UInt32 + + @ReadonlyAttribute + public var maxSampledTexturesPerShaderStage: UInt32 + + @ReadonlyAttribute + public var maxSamplersPerShaderStage: UInt32 + + @ReadonlyAttribute + public var maxStorageBuffersPerShaderStage: UInt32 + + @ReadonlyAttribute + public var maxStorageTexturesPerShaderStage: UInt32 + + @ReadonlyAttribute + public var maxUniformBuffersPerShaderStage: UInt32 + + @ReadonlyAttribute + public var maxUniformBufferBindingSize: UInt64 + + @ReadonlyAttribute + public var maxStorageBufferBindingSize: UInt64 + + @ReadonlyAttribute + public var minUniformBufferOffsetAlignment: UInt32 + + @ReadonlyAttribute + public var minStorageBufferOffsetAlignment: UInt32 + + @ReadonlyAttribute + public var maxVertexBuffers: UInt32 + + @ReadonlyAttribute + public var maxVertexAttributes: UInt32 + + @ReadonlyAttribute + public var maxVertexBufferArrayStride: UInt32 + + @ReadonlyAttribute + public var maxInterStageShaderComponents: UInt32 + + @ReadonlyAttribute + public var maxComputeWorkgroupStorageSize: UInt32 + + @ReadonlyAttribute + public var maxComputeInvocationsPerWorkgroup: UInt32 + + @ReadonlyAttribute + public var maxComputeWorkgroupSizeX: UInt32 + + @ReadonlyAttribute + public var maxComputeWorkgroupSizeY: UInt32 + + @ReadonlyAttribute + public var maxComputeWorkgroupSizeZ: UInt32 + + @ReadonlyAttribute + public var maxComputeWorkgroupsPerDimension: UInt32 +} + +public class GPUTexture: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUTexture].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func createView(descriptor: GPUTextureViewDescriptor? = nil) -> GPUTextureView { + let this = jsObject + return this[Strings.createView].function!(this: this, arguments: [descriptor?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func destroy() { + let this = jsObject + _ = this[Strings.destroy].function!(this: this, arguments: []) + } +} + +public enum GPUTextureAspect: JSString, JSValueCompatible { + case all = "all" + case stencilOnly = "stencil-only" + case depthOnly = "depth-only" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUTextureBindingLayout: BridgedDictionary { + public convenience init(sampleType: GPUTextureSampleType, viewDimension: GPUTextureViewDimension, multisampled: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.sampleType] = sampleType.jsValue + object[Strings.viewDimension] = viewDimension.jsValue + object[Strings.multisampled] = multisampled.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _sampleType = ReadWriteAttribute(jsObject: object, name: Strings.sampleType) + _viewDimension = ReadWriteAttribute(jsObject: object, name: Strings.viewDimension) + _multisampled = ReadWriteAttribute(jsObject: object, name: Strings.multisampled) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var sampleType: GPUTextureSampleType + + @ReadWriteAttribute + public var viewDimension: GPUTextureViewDimension + + @ReadWriteAttribute + public var multisampled: Bool +} + +public class GPUTextureDescriptor: BridgedDictionary { + public convenience init(size: GPUExtent3D, mipLevelCount: GPUIntegerCoordinate, sampleCount: GPUSize32, dimension: GPUTextureDimension, format: GPUTextureFormat, usage: GPUTextureUsageFlags, viewFormats: [GPUTextureFormat]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.size] = size.jsValue + object[Strings.mipLevelCount] = mipLevelCount.jsValue + object[Strings.sampleCount] = sampleCount.jsValue + object[Strings.dimension] = dimension.jsValue + object[Strings.format] = format.jsValue + object[Strings.usage] = usage.jsValue + object[Strings.viewFormats] = viewFormats.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _size = ReadWriteAttribute(jsObject: object, name: Strings.size) + _mipLevelCount = ReadWriteAttribute(jsObject: object, name: Strings.mipLevelCount) + _sampleCount = ReadWriteAttribute(jsObject: object, name: Strings.sampleCount) + _dimension = ReadWriteAttribute(jsObject: object, name: Strings.dimension) + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _usage = ReadWriteAttribute(jsObject: object, name: Strings.usage) + _viewFormats = ReadWriteAttribute(jsObject: object, name: Strings.viewFormats) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var size: GPUExtent3D + + @ReadWriteAttribute + public var mipLevelCount: GPUIntegerCoordinate + + @ReadWriteAttribute + public var sampleCount: GPUSize32 + + @ReadWriteAttribute + public var dimension: GPUTextureDimension + + @ReadWriteAttribute + public var format: GPUTextureFormat + + @ReadWriteAttribute + public var usage: GPUTextureUsageFlags + + @ReadWriteAttribute + public var viewFormats: [GPUTextureFormat] +} + +public enum GPUTextureDimension: JSString, JSValueCompatible { + case _1d = "1d" + case _2d = "2d" + case _3d = "3d" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUTextureFormat: JSString, JSValueCompatible { + case r8unorm = "r8unorm" + case r8snorm = "r8snorm" + case r8uint = "r8uint" + case r8sint = "r8sint" + case r16uint = "r16uint" + case r16sint = "r16sint" + case r16float = "r16float" + case rg8unorm = "rg8unorm" + case rg8snorm = "rg8snorm" + case rg8uint = "rg8uint" + case rg8sint = "rg8sint" + case r32uint = "r32uint" + case r32sint = "r32sint" + case r32float = "r32float" + case rg16uint = "rg16uint" + case rg16sint = "rg16sint" + case rg16float = "rg16float" + case rgba8unorm = "rgba8unorm" + case rgba8unormSrgb = "rgba8unorm-srgb" + case rgba8snorm = "rgba8snorm" + case rgba8uint = "rgba8uint" + case rgba8sint = "rgba8sint" + case bgra8unorm = "bgra8unorm" + case bgra8unormSrgb = "bgra8unorm-srgb" + case rgb9e5ufloat = "rgb9e5ufloat" + case rgb10a2unorm = "rgb10a2unorm" + case rg11b10ufloat = "rg11b10ufloat" + case rg32uint = "rg32uint" + case rg32sint = "rg32sint" + case rg32float = "rg32float" + case rgba16uint = "rgba16uint" + case rgba16sint = "rgba16sint" + case rgba16float = "rgba16float" + case rgba32uint = "rgba32uint" + case rgba32sint = "rgba32sint" + case rgba32float = "rgba32float" + case stencil8 = "stencil8" + case depth16unorm = "depth16unorm" + case depth24plus = "depth24plus" + case depth24plusStencil8 = "depth24plus-stencil8" + case depth32float = "depth32float" + case depth24unormStencil8 = "depth24unorm-stencil8" + case depth32floatStencil8 = "depth32float-stencil8" + case bc1RgbaUnorm = "bc1-rgba-unorm" + case bc1RgbaUnormSrgb = "bc1-rgba-unorm-srgb" + case bc2RgbaUnorm = "bc2-rgba-unorm" + case bc2RgbaUnormSrgb = "bc2-rgba-unorm-srgb" + case bc3RgbaUnorm = "bc3-rgba-unorm" + case bc3RgbaUnormSrgb = "bc3-rgba-unorm-srgb" + case bc4RUnorm = "bc4-r-unorm" + case bc4RSnorm = "bc4-r-snorm" + case bc5RgUnorm = "bc5-rg-unorm" + case bc5RgSnorm = "bc5-rg-snorm" + case bc6hRgbUfloat = "bc6h-rgb-ufloat" + case bc6hRgbFloat = "bc6h-rgb-float" + case bc7RgbaUnorm = "bc7-rgba-unorm" + case bc7RgbaUnormSrgb = "bc7-rgba-unorm-srgb" + case etc2Rgb8unorm = "etc2-rgb8unorm" + case etc2Rgb8unormSrgb = "etc2-rgb8unorm-srgb" + case etc2Rgb8a1unorm = "etc2-rgb8a1unorm" + case etc2Rgb8a1unormSrgb = "etc2-rgb8a1unorm-srgb" + case etc2Rgba8unorm = "etc2-rgba8unorm" + case etc2Rgba8unormSrgb = "etc2-rgba8unorm-srgb" + case eacR11unorm = "eac-r11unorm" + case eacR11snorm = "eac-r11snorm" + case eacRg11unorm = "eac-rg11unorm" + case eacRg11snorm = "eac-rg11snorm" + case astc4x4Unorm = "astc-4x4-unorm" + case astc4x4UnormSrgb = "astc-4x4-unorm-srgb" + case astc5x4Unorm = "astc-5x4-unorm" + case astc5x4UnormSrgb = "astc-5x4-unorm-srgb" + case astc5x5Unorm = "astc-5x5-unorm" + case astc5x5UnormSrgb = "astc-5x5-unorm-srgb" + case astc6x5Unorm = "astc-6x5-unorm" + case astc6x5UnormSrgb = "astc-6x5-unorm-srgb" + case astc6x6Unorm = "astc-6x6-unorm" + case astc6x6UnormSrgb = "astc-6x6-unorm-srgb" + case astc8x5Unorm = "astc-8x5-unorm" + case astc8x5UnormSrgb = "astc-8x5-unorm-srgb" + case astc8x6Unorm = "astc-8x6-unorm" + case astc8x6UnormSrgb = "astc-8x6-unorm-srgb" + case astc8x8Unorm = "astc-8x8-unorm" + case astc8x8UnormSrgb = "astc-8x8-unorm-srgb" + case astc10x5Unorm = "astc-10x5-unorm" + case astc10x5UnormSrgb = "astc-10x5-unorm-srgb" + case astc10x6Unorm = "astc-10x6-unorm" + case astc10x6UnormSrgb = "astc-10x6-unorm-srgb" + case astc10x8Unorm = "astc-10x8-unorm" + case astc10x8UnormSrgb = "astc-10x8-unorm-srgb" + case astc10x10Unorm = "astc-10x10-unorm" + case astc10x10UnormSrgb = "astc-10x10-unorm-srgb" + case astc12x10Unorm = "astc-12x10-unorm" + case astc12x10UnormSrgb = "astc-12x10-unorm-srgb" + case astc12x12Unorm = "astc-12x12-unorm" + case astc12x12UnormSrgb = "astc-12x12-unorm-srgb" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUTextureSampleType: JSString, JSValueCompatible { + case float = "float" + case unfilterableFloat = "unfilterable-float" + case depth = "depth" + case sint = "sint" + case uint = "uint" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum GPUTextureUsage { + @inlinable public static var jsObject: JSObject { + JSObject.global[Strings.GPUTextureUsage].object! + } + + public static let COPY_SRC: GPUFlagsConstant = 0x01 + + public static let COPY_DST: GPUFlagsConstant = 0x02 + + public static let TEXTURE_BINDING: GPUFlagsConstant = 0x04 + + public static let STORAGE_BINDING: GPUFlagsConstant = 0x08 + + public static let RENDER_ATTACHMENT: GPUFlagsConstant = 0x10 +} + +public class GPUTextureView: JSBridgedClass, GPUObjectBase { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUTextureView].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } +} + +public class GPUTextureViewDescriptor: BridgedDictionary { + public convenience init(format: GPUTextureFormat, dimension: GPUTextureViewDimension, aspect: GPUTextureAspect, baseMipLevel: GPUIntegerCoordinate, mipLevelCount: GPUIntegerCoordinate, baseArrayLayer: GPUIntegerCoordinate, arrayLayerCount: GPUIntegerCoordinate) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.dimension] = dimension.jsValue + object[Strings.aspect] = aspect.jsValue + object[Strings.baseMipLevel] = baseMipLevel.jsValue + object[Strings.mipLevelCount] = mipLevelCount.jsValue + object[Strings.baseArrayLayer] = baseArrayLayer.jsValue + object[Strings.arrayLayerCount] = arrayLayerCount.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _dimension = ReadWriteAttribute(jsObject: object, name: Strings.dimension) + _aspect = ReadWriteAttribute(jsObject: object, name: Strings.aspect) + _baseMipLevel = ReadWriteAttribute(jsObject: object, name: Strings.baseMipLevel) + _mipLevelCount = ReadWriteAttribute(jsObject: object, name: Strings.mipLevelCount) + _baseArrayLayer = ReadWriteAttribute(jsObject: object, name: Strings.baseArrayLayer) + _arrayLayerCount = ReadWriteAttribute(jsObject: object, name: Strings.arrayLayerCount) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: GPUTextureFormat + + @ReadWriteAttribute + public var dimension: GPUTextureViewDimension + + @ReadWriteAttribute + public var aspect: GPUTextureAspect + + @ReadWriteAttribute + public var baseMipLevel: GPUIntegerCoordinate + + @ReadWriteAttribute + public var mipLevelCount: GPUIntegerCoordinate + + @ReadWriteAttribute + public var baseArrayLayer: GPUIntegerCoordinate + + @ReadWriteAttribute + public var arrayLayerCount: GPUIntegerCoordinate +} + +public enum GPUTextureViewDimension: JSString, JSValueCompatible { + case _1d = "1d" + case _2d = "2d" + case _2dArray = "2d-array" + case cube = "cube" + case cubeArray = "cube-array" + case _3d = "3d" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUUncapturedErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.GPUUncapturedErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, gpuUncapturedErrorEventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var error: GPUError +} + +public class GPUUncapturedErrorEventInit: BridgedDictionary { + public convenience init(error: GPUError) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _error = ReadWriteAttribute(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var error: GPUError +} + +public class GPUValidationError: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.GPUValidationError].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _message = ReadonlyAttribute(jsObject: jsObject, name: Strings.message) + self.jsObject = jsObject + } + + @inlinable public convenience init(message: String) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [message.jsValue])) + } + + @ReadonlyAttribute + public var message: String +} + +public class GPUVertexAttribute: BridgedDictionary { + public convenience init(format: GPUVertexFormat, offset: GPUSize64, shaderLocation: GPUIndex32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.format] = format.jsValue + object[Strings.offset] = offset.jsValue + object[Strings.shaderLocation] = shaderLocation.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _format = ReadWriteAttribute(jsObject: object, name: Strings.format) + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _shaderLocation = ReadWriteAttribute(jsObject: object, name: Strings.shaderLocation) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var format: GPUVertexFormat + + @ReadWriteAttribute + public var offset: GPUSize64 + + @ReadWriteAttribute + public var shaderLocation: GPUIndex32 +} + +public class GPUVertexBufferLayout: BridgedDictionary { + public convenience init(arrayStride: GPUSize64, stepMode: GPUVertexStepMode, attributes: [GPUVertexAttribute]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.arrayStride] = arrayStride.jsValue + object[Strings.stepMode] = stepMode.jsValue + object[Strings.attributes] = attributes.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _arrayStride = ReadWriteAttribute(jsObject: object, name: Strings.arrayStride) + _stepMode = ReadWriteAttribute(jsObject: object, name: Strings.stepMode) + _attributes = ReadWriteAttribute(jsObject: object, name: Strings.attributes) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var arrayStride: GPUSize64 + + @ReadWriteAttribute + public var stepMode: GPUVertexStepMode + + @ReadWriteAttribute + public var attributes: [GPUVertexAttribute] +} + +public enum GPUVertexFormat: JSString, JSValueCompatible { + case uint8x2 = "uint8x2" + case uint8x4 = "uint8x4" + case sint8x2 = "sint8x2" + case sint8x4 = "sint8x4" + case unorm8x2 = "unorm8x2" + case unorm8x4 = "unorm8x4" + case snorm8x2 = "snorm8x2" + case snorm8x4 = "snorm8x4" + case uint16x2 = "uint16x2" + case uint16x4 = "uint16x4" + case sint16x2 = "sint16x2" + case sint16x4 = "sint16x4" + case unorm16x2 = "unorm16x2" + case unorm16x4 = "unorm16x4" + case snorm16x2 = "snorm16x2" + case snorm16x4 = "snorm16x4" + case float16x2 = "float16x2" + case float16x4 = "float16x4" + case float32 = "float32" + case float32x2 = "float32x2" + case float32x3 = "float32x3" + case float32x4 = "float32x4" + case uint32 = "uint32" + case uint32x2 = "uint32x2" + case uint32x3 = "uint32x3" + case uint32x4 = "uint32x4" + case sint32 = "sint32" + case sint32x2 = "sint32x2" + case sint32x3 = "sint32x3" + case sint32x4 = "sint32x4" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class GPUVertexState: BridgedDictionary { + public convenience init(buffers: [GPUVertexBufferLayout?]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.buffers] = buffers.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _buffers = ReadWriteAttribute(jsObject: object, name: Strings.buffers) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var buffers: [GPUVertexBufferLayout?] +} + +public enum GPUVertexStepMode: JSString, JSValueCompatible { + case vertex = "vertex" + case instance = "instance" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + public class GainNode: AudioNode { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.GainNode].function! } @@ -14243,7 +17601,7 @@ public class NavigationPreloadState: BridgedDictionary { public var headerValue: String } -public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware { +public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorGPU { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Navigator].function! } public let jsObject: JSObject @@ -14286,6 +17644,11 @@ public extension NavigatorCookies { @inlinable var cookieEnabled: Bool { ReadonlyAttribute[Strings.cookieEnabled, in: jsObject] } } +public protocol NavigatorGPU: JSBridgedClass {} +public extension NavigatorGPU { + @inlinable var gpu: GPU { ReadonlyAttribute[Strings.gpu, in: jsObject] } +} + public protocol NavigatorID: JSBridgedClass {} public extension NavigatorID { @inlinable var appCodeName: String { ReadonlyAttribute[Strings.appCodeName, in: jsObject] } @@ -17886,6 +21249,27 @@ public typealias GLclampf = Float public typealias GLint64 = Int64 public typealias GLuint64 = UInt64 +public typealias GPUBufferUsageFlags = UInt32 +public typealias GPUMapModeFlags = UInt32 +public typealias GPUTextureUsageFlags = UInt32 +public typealias GPUShaderStageFlags = UInt32 + +public typealias GPUPipelineConstantValue = Double +public typealias GPUColorWriteFlags = UInt32 +public typealias GPUComputePassTimestampWrites = [GPUComputePassTimestampWrite] +public typealias GPURenderPassTimestampWrites = [GPURenderPassTimestampWrite] + +public typealias GPUBufferDynamicOffset = UInt32 +public typealias GPUStencilValue = UInt32 +public typealias GPUSampleMask = UInt32 +public typealias GPUDepthBias = Int32 +public typealias GPUSize64 = UInt64 +public typealias GPUIntegerCoordinate = UInt32 +public typealias GPUIndex32 = UInt32 +public typealias GPUSize32 = UInt32 +public typealias GPUSignedOffset32 = Int32 +public typealias GPUFlagsConstant = UInt32 + public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void @@ -24248,6 +27632,42 @@ public enum console { @usableFromInline static let FocusEvent: JSString = "FocusEvent" @usableFromInline static let FormData: JSString = "FormData" @usableFromInline static let FormDataEvent: JSString = "FormDataEvent" + @usableFromInline static let GPU: JSString = "GPU" + @usableFromInline static let GPUAdapter: JSString = "GPUAdapter" + @usableFromInline static let GPUBindGroup: JSString = "GPUBindGroup" + @usableFromInline static let GPUBindGroupLayout: JSString = "GPUBindGroupLayout" + @usableFromInline static let GPUBuffer: JSString = "GPUBuffer" + @usableFromInline static let GPUBufferUsage: JSString = "GPUBufferUsage" + @usableFromInline static let GPUCanvasContext: JSString = "GPUCanvasContext" + @usableFromInline static let GPUColorWrite: JSString = "GPUColorWrite" + @usableFromInline static let GPUCommandBuffer: JSString = "GPUCommandBuffer" + @usableFromInline static let GPUCommandEncoder: JSString = "GPUCommandEncoder" + @usableFromInline static let GPUCompilationInfo: JSString = "GPUCompilationInfo" + @usableFromInline static let GPUCompilationMessage: JSString = "GPUCompilationMessage" + @usableFromInline static let GPUComputePassEncoder: JSString = "GPUComputePassEncoder" + @usableFromInline static let GPUComputePipeline: JSString = "GPUComputePipeline" + @usableFromInline static let GPUDevice: JSString = "GPUDevice" + @usableFromInline static let GPUDeviceLostInfo: JSString = "GPUDeviceLostInfo" + @usableFromInline static let GPUExternalTexture: JSString = "GPUExternalTexture" + @usableFromInline static let GPUMapMode: JSString = "GPUMapMode" + @usableFromInline static let GPUOutOfMemoryError: JSString = "GPUOutOfMemoryError" + @usableFromInline static let GPUPipelineLayout: JSString = "GPUPipelineLayout" + @usableFromInline static let GPUQuerySet: JSString = "GPUQuerySet" + @usableFromInline static let GPUQueue: JSString = "GPUQueue" + @usableFromInline static let GPURenderBundle: JSString = "GPURenderBundle" + @usableFromInline static let GPURenderBundleEncoder: JSString = "GPURenderBundleEncoder" + @usableFromInline static let GPURenderPassEncoder: JSString = "GPURenderPassEncoder" + @usableFromInline static let GPURenderPipeline: JSString = "GPURenderPipeline" + @usableFromInline static let GPUSampler: JSString = "GPUSampler" + @usableFromInline static let GPUShaderModule: JSString = "GPUShaderModule" + @usableFromInline static let GPUShaderStage: JSString = "GPUShaderStage" + @usableFromInline static let GPUSupportedFeatures: JSString = "GPUSupportedFeatures" + @usableFromInline static let GPUSupportedLimits: JSString = "GPUSupportedLimits" + @usableFromInline static let GPUTexture: JSString = "GPUTexture" + @usableFromInline static let GPUTextureUsage: JSString = "GPUTextureUsage" + @usableFromInline static let GPUTextureView: JSString = "GPUTextureView" + @usableFromInline static let GPUUncapturedErrorEvent: JSString = "GPUUncapturedErrorEvent" + @usableFromInline static let GPUValidationError: JSString = "GPUValidationError" @usableFromInline static let GainNode: JSString = "GainNode" @usableFromInline static let HTMLAllCollection: JSString = "HTMLAllCollection" @usableFromInline static let HTMLAnchorElement: JSString = "HTMLAnchorElement" @@ -24473,6 +27893,7 @@ public enum console { @usableFromInline static let aborted: JSString = "aborted" @usableFromInline static let accept: JSString = "accept" @usableFromInline static let acceptCharset: JSString = "acceptCharset" + @usableFromInline static let access: JSString = "access" @usableFromInline static let accessKey: JSString = "accessKey" @usableFromInline static let accessKeyLabel: JSString = "accessKeyLabel" @usableFromInline static let action: JSString = "action" @@ -24493,6 +27914,9 @@ public enum console { @usableFromInline static let addTextTrack: JSString = "addTextTrack" @usableFromInline static let addTrack: JSString = "addTrack" @usableFromInline static let addedNodes: JSString = "addedNodes" + @usableFromInline static let addressModeU: JSString = "addressModeU" + @usableFromInline static let addressModeV: JSString = "addressModeV" + @usableFromInline static let addressModeW: JSString = "addressModeW" @usableFromInline static let adoptNode: JSString = "adoptNode" @usableFromInline static let advanced: JSString = "advanced" @usableFromInline static let after: JSString = "after" @@ -24505,6 +27929,7 @@ public enum console { @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" @usableFromInline static let alpha: JSString = "alpha" @usableFromInline static let alphaSideData: JSString = "alphaSideData" + @usableFromInline static let alphaToCoverageEnabled: JSString = "alphaToCoverageEnabled" @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" @usableFromInline static let alt: JSString = "alt" @usableFromInline static let altKey: JSString = "altKey" @@ -24566,7 +27991,10 @@ public enum console { @usableFromInline static let ariaValueNow: JSString = "ariaValueNow" @usableFromInline static let ariaValueText: JSString = "ariaValueText" @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" + @usableFromInline static let arrayLayerCount: JSString = "arrayLayerCount" + @usableFromInline static let arrayStride: JSString = "arrayStride" @usableFromInline static let `as`: JSString = "as" + @usableFromInline static let aspect: JSString = "aspect" @usableFromInline static let aspectRatio: JSString = "aspectRatio" @usableFromInline static let assert: JSString = "assert" @usableFromInline static let assign: JSString = "assign" @@ -24605,11 +28033,16 @@ public enum console { @usableFromInline static let back: JSString = "back" @usableFromInline static let background: JSString = "background" @usableFromInline static let badInput: JSString = "badInput" + @usableFromInline static let baseArrayLayer: JSString = "baseArrayLayer" @usableFromInline static let baseLatency: JSString = "baseLatency" + @usableFromInline static let baseMipLevel: JSString = "baseMipLevel" @usableFromInline static let baseURI: JSString = "baseURI" @usableFromInline static let before: JSString = "before" + @usableFromInline static let beginComputePass: JSString = "beginComputePass" + @usableFromInline static let beginOcclusionQuery: JSString = "beginOcclusionQuery" @usableFromInline static let beginPath: JSString = "beginPath" @usableFromInline static let beginQuery: JSString = "beginQuery" + @usableFromInline static let beginRenderPass: JSString = "beginRenderPass" @usableFromInline static let beginTransformFeedback: JSString = "beginTransformFeedback" @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @@ -24620,14 +28053,17 @@ public enum console { @usableFromInline static let bindBufferBase: JSString = "bindBufferBase" @usableFromInline static let bindBufferRange: JSString = "bindBufferRange" @usableFromInline static let bindFramebuffer: JSString = "bindFramebuffer" + @usableFromInline static let bindGroupLayouts: JSString = "bindGroupLayouts" @usableFromInline static let bindRenderbuffer: JSString = "bindRenderbuffer" @usableFromInline static let bindSampler: JSString = "bindSampler" @usableFromInline static let bindTexture: JSString = "bindTexture" @usableFromInline static let bindTransformFeedback: JSString = "bindTransformFeedback" @usableFromInline static let bindVertexArray: JSString = "bindVertexArray" + @usableFromInline static let binding: JSString = "binding" @usableFromInline static let bitrate: JSString = "bitrate" @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" + @usableFromInline static let blend: JSString = "blend" @usableFromInline static let blendColor: JSString = "blendColor" @usableFromInline static let blendEquation: JSString = "blendEquation" @usableFromInline static let blendEquationSeparate: JSString = "blendEquationSeparate" @@ -24652,10 +28088,12 @@ public enum console { @usableFromInline static let bufferSubData: JSString = "bufferSubData" @usableFromInline static let buffered: JSString = "buffered" @usableFromInline static let bufferedAmount: JSString = "bufferedAmount" + @usableFromInline static let buffers: JSString = "buffers" @usableFromInline static let button: JSString = "button" @usableFromInline static let buttons: JSString = "buttons" @usableFromInline static let byobRequest: JSString = "byobRequest" @usableFromInline static let byteLength: JSString = "byteLength" + @usableFromInline static let bytesPerRow: JSString = "bytesPerRow" @usableFromInline static let c: JSString = "c" @usableFromInline static let cache: JSString = "cache" @usableFromInline static let cacheName: JSString = "cacheName" @@ -24697,6 +28135,7 @@ public enum console { @usableFromInline static let classList: JSString = "classList" @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearBuffer: JSString = "clearBuffer" @usableFromInline static let clearBufferfi: JSString = "clearBufferfi" @usableFromInline static let clearBufferfv: JSString = "clearBufferfv" @usableFromInline static let clearBufferiv: JSString = "clearBufferiv" @@ -24709,6 +28148,7 @@ public enum console { @usableFromInline static let clearRect: JSString = "clearRect" @usableFromInline static let clearStencil: JSString = "clearStencil" @usableFromInline static let clearTimeout: JSString = "clearTimeout" + @usableFromInline static let clearValue: JSString = "clearValue" @usableFromInline static let click: JSString = "click" @usableFromInline static let clientHeight: JSString = "clientHeight" @usableFromInline static let clientId: JSString = "clientId" @@ -24740,7 +28180,9 @@ public enum console { @usableFromInline static let collapsed: JSString = "collapsed" @usableFromInline static let colno: JSString = "colno" @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorAttachments: JSString = "colorAttachments" @usableFromInline static let colorDepth: JSString = "colorDepth" + @usableFromInline static let colorFormats: JSString = "colorFormats" @usableFromInline static let colorMask: JSString = "colorMask" @usableFromInline static let colorSpace: JSString = "colorSpace" @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" @@ -24749,10 +28191,12 @@ public enum console { @usableFromInline static let commitStyles: JSString = "commitStyles" @usableFromInline static let commonAncestorContainer: JSString = "commonAncestorContainer" @usableFromInline static let compact: JSString = "compact" + @usableFromInline static let compare: JSString = "compare" @usableFromInline static let compareBoundaryPoints: JSString = "compareBoundaryPoints" @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" @usableFromInline static let comparePoint: JSString = "comparePoint" @usableFromInline static let compatMode: JSString = "compatMode" + @usableFromInline static let compilationInfo: JSString = "compilationInfo" @usableFromInline static let compileShader: JSString = "compileShader" @usableFromInline static let complete: JSString = "complete" @usableFromInline static let completeFramesOnly: JSString = "completeFramesOnly" @@ -24760,10 +28204,12 @@ public enum console { @usableFromInline static let composed: JSString = "composed" @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" + @usableFromInline static let compositingAlphaMode: JSString = "compositingAlphaMode" @usableFromInline static let compressedTexImage2D: JSString = "compressedTexImage2D" @usableFromInline static let compressedTexImage3D: JSString = "compressedTexImage3D" @usableFromInline static let compressedTexSubImage2D: JSString = "compressedTexSubImage2D" @usableFromInline static let compressedTexSubImage3D: JSString = "compressedTexSubImage3D" + @usableFromInline static let compute: JSString = "compute" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let coneInnerAngle: JSString = "coneInnerAngle" @usableFromInline static let coneOuterAngle: JSString = "coneOuterAngle" @@ -24773,6 +28219,7 @@ public enum console { @usableFromInline static let confirm: JSString = "confirm" @usableFromInline static let connect: JSString = "connect" @usableFromInline static let console: JSString = "console" + @usableFromInline static let constants: JSString = "constants" @usableFromInline static let constraint: JSString = "constraint" @usableFromInline static let contains: JSString = "contains" @usableFromInline static let content: JSString = "content" @@ -24793,10 +28240,15 @@ public enum console { @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" @usableFromInline static let copyBufferSubData: JSString = "copyBufferSubData" + @usableFromInline static let copyBufferToBuffer: JSString = "copyBufferToBuffer" + @usableFromInline static let copyBufferToTexture: JSString = "copyBufferToTexture" + @usableFromInline static let copyExternalImageToTexture: JSString = "copyExternalImageToTexture" @usableFromInline static let copyFromChannel: JSString = "copyFromChannel" @usableFromInline static let copyTexImage2D: JSString = "copyTexImage2D" @usableFromInline static let copyTexSubImage2D: JSString = "copyTexSubImage2D" @usableFromInline static let copyTexSubImage3D: JSString = "copyTexSubImage3D" + @usableFromInline static let copyTextureToBuffer: JSString = "copyTextureToBuffer" + @usableFromInline static let copyTextureToTexture: JSString = "copyTextureToTexture" @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let copyToChannel: JSString = "copyToChannel" @usableFromInline static let count: JSString = "count" @@ -24804,6 +28256,8 @@ public enum console { @usableFromInline static let createAnalyser: JSString = "createAnalyser" @usableFromInline static let createAttribute: JSString = "createAttribute" @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" + @usableFromInline static let createBindGroup: JSString = "createBindGroup" + @usableFromInline static let createBindGroupLayout: JSString = "createBindGroupLayout" @usableFromInline static let createBiquadFilter: JSString = "createBiquadFilter" @usableFromInline static let createBuffer: JSString = "createBuffer" @usableFromInline static let createBufferSource: JSString = "createBufferSource" @@ -24811,7 +28265,10 @@ public enum console { @usableFromInline static let createCaption: JSString = "createCaption" @usableFromInline static let createChannelMerger: JSString = "createChannelMerger" @usableFromInline static let createChannelSplitter: JSString = "createChannelSplitter" + @usableFromInline static let createCommandEncoder: JSString = "createCommandEncoder" @usableFromInline static let createComment: JSString = "createComment" + @usableFromInline static let createComputePipeline: JSString = "createComputePipeline" + @usableFromInline static let createComputePipelineAsync: JSString = "createComputePipelineAsync" @usableFromInline static let createConicGradient: JSString = "createConicGradient" @usableFromInline static let createConstantSource: JSString = "createConstantSource" @usableFromInline static let createConvolver: JSString = "createConvolver" @@ -24839,15 +28296,21 @@ public enum console { @usableFromInline static let createPanner: JSString = "createPanner" @usableFromInline static let createPattern: JSString = "createPattern" @usableFromInline static let createPeriodicWave: JSString = "createPeriodicWave" + @usableFromInline static let createPipelineLayout: JSString = "createPipelineLayout" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" @usableFromInline static let createProgram: JSString = "createProgram" @usableFromInline static let createQuery: JSString = "createQuery" + @usableFromInline static let createQuerySet: JSString = "createQuerySet" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @usableFromInline static let createRange: JSString = "createRange" + @usableFromInline static let createRenderBundleEncoder: JSString = "createRenderBundleEncoder" + @usableFromInline static let createRenderPipeline: JSString = "createRenderPipeline" + @usableFromInline static let createRenderPipelineAsync: JSString = "createRenderPipelineAsync" @usableFromInline static let createRenderbuffer: JSString = "createRenderbuffer" @usableFromInline static let createSampler: JSString = "createSampler" @usableFromInline static let createScriptProcessor: JSString = "createScriptProcessor" @usableFromInline static let createShader: JSString = "createShader" + @usableFromInline static let createShaderModule: JSString = "createShaderModule" @usableFromInline static let createStereoPanner: JSString = "createStereoPanner" @usableFromInline static let createTBody: JSString = "createTBody" @usableFromInline static let createTFoot: JSString = "createTFoot" @@ -24856,6 +28319,7 @@ public enum console { @usableFromInline static let createTexture: JSString = "createTexture" @usableFromInline static let createTransformFeedback: JSString = "createTransformFeedback" @usableFromInline static let createVertexArray: JSString = "createVertexArray" + @usableFromInline static let createView: JSString = "createView" @usableFromInline static let createWaveShaper: JSString = "createWaveShaper" @usableFromInline static let credentials: JSString = "credentials" @usableFromInline static let crossOrigin: JSString = "crossOrigin" @@ -24863,6 +28327,7 @@ public enum console { @usableFromInline static let ctrlKey: JSString = "ctrlKey" @usableFromInline static let cues: JSString = "cues" @usableFromInline static let cullFace: JSString = "cullFace" + @usableFromInline static let cullMode: JSString = "cullMode" @usableFromInline static let currentIteration: JSString = "currentIteration" @usableFromInline static let currentNode: JSString = "currentNode" @usableFromInline static let currentScript: JSString = "currentScript" @@ -24888,6 +28353,7 @@ public enum console { @usableFromInline static let defaultMuted: JSString = "defaultMuted" @usableFromInline static let defaultPlaybackRate: JSString = "defaultPlaybackRate" @usableFromInline static let defaultPrevented: JSString = "defaultPrevented" + @usableFromInline static let defaultQueue: JSString = "defaultQueue" @usableFromInline static let defaultSelected: JSString = "defaultSelected" @usableFromInline static let defaultValue: JSString = "defaultValue" @usableFromInline static let defaultView: JSString = "defaultView" @@ -24920,22 +28386,39 @@ public enum console { @usableFromInline static let deltaY: JSString = "deltaY" @usableFromInline static let deltaZ: JSString = "deltaZ" @usableFromInline static let depth: JSString = "depth" + @usableFromInline static let depthBias: JSString = "depthBias" + @usableFromInline static let depthBiasClamp: JSString = "depthBiasClamp" + @usableFromInline static let depthBiasSlopeScale: JSString = "depthBiasSlopeScale" + @usableFromInline static let depthClearValue: JSString = "depthClearValue" + @usableFromInline static let depthCompare: JSString = "depthCompare" + @usableFromInline static let depthFailOp: JSString = "depthFailOp" @usableFromInline static let depthFunc: JSString = "depthFunc" + @usableFromInline static let depthLoadOp: JSString = "depthLoadOp" @usableFromInline static let depthMask: JSString = "depthMask" + @usableFromInline static let depthOrArrayLayers: JSString = "depthOrArrayLayers" @usableFromInline static let depthRange: JSString = "depthRange" + @usableFromInline static let depthReadOnly: JSString = "depthReadOnly" + @usableFromInline static let depthStencil: JSString = "depthStencil" + @usableFromInline static let depthStencilAttachment: JSString = "depthStencilAttachment" + @usableFromInline static let depthStencilFormat: JSString = "depthStencilFormat" + @usableFromInline static let depthStoreOp: JSString = "depthStoreOp" + @usableFromInline static let depthWriteEnabled: JSString = "depthWriteEnabled" @usableFromInline static let description: JSString = "description" @usableFromInline static let designMode: JSString = "designMode" @usableFromInline static let desiredHeight: JSString = "desiredHeight" @usableFromInline static let desiredSize: JSString = "desiredSize" @usableFromInline static let desiredWidth: JSString = "desiredWidth" @usableFromInline static let destination: JSString = "destination" + @usableFromInline static let destroy: JSString = "destroy" @usableFromInline static let desynchronized: JSString = "desynchronized" @usableFromInline static let detach: JSString = "detach" @usableFromInline static let detachShader: JSString = "detachShader" @usableFromInline static let detail: JSString = "detail" @usableFromInline static let detune: JSString = "detune" + @usableFromInline static let device: JSString = "device" @usableFromInline static let deviceId: JSString = "deviceId" @usableFromInline static let devicePixelRatio: JSString = "devicePixelRatio" + @usableFromInline static let dimension: JSString = "dimension" @usableFromInline static let dir: JSString = "dir" @usableFromInline static let dirName: JSString = "dirName" @usableFromInline static let direction: JSString = "direction" @@ -24945,7 +28428,9 @@ public enum console { @usableFromInline static let disableVertexAttribArray: JSString = "disableVertexAttribArray" @usableFromInline static let disabled: JSString = "disabled" @usableFromInline static let disconnect: JSString = "disconnect" + @usableFromInline static let dispatch: JSString = "dispatch" @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" + @usableFromInline static let dispatchIndirect: JSString = "dispatchIndirect" @usableFromInline static let displayAspectHeight: JSString = "displayAspectHeight" @usableFromInline static let displayAspectWidth: JSString = "displayAspectWidth" @usableFromInline static let displayHeight: JSString = "displayHeight" @@ -24959,6 +28444,7 @@ public enum console { @usableFromInline static let done: JSString = "done" @usableFromInline static let download: JSString = "download" @usableFromInline static let draggable: JSString = "draggable" + @usableFromInline static let draw: JSString = "draw" @usableFromInline static let drawArrays: JSString = "drawArrays" @usableFromInline static let drawArraysInstanced: JSString = "drawArraysInstanced" @usableFromInline static let drawBuffers: JSString = "drawBuffers" @@ -24966,10 +28452,14 @@ public enum console { @usableFromInline static let drawElementsInstanced: JSString = "drawElementsInstanced" @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let drawIndexed: JSString = "drawIndexed" + @usableFromInline static let drawIndexedIndirect: JSString = "drawIndexedIndirect" + @usableFromInline static let drawIndirect: JSString = "drawIndirect" @usableFromInline static let drawRangeElements: JSString = "drawRangeElements" @usableFromInline static let drawingBufferHeight: JSString = "drawingBufferHeight" @usableFromInline static let drawingBufferWidth: JSString = "drawingBufferWidth" @usableFromInline static let dropEffect: JSString = "dropEffect" + @usableFromInline static let dstFactor: JSString = "dstFactor" @usableFromInline static let duration: JSString = "duration" @usableFromInline static let e: JSString = "e" @usableFromInline static let easing: JSString = "easing" @@ -24995,6 +28485,7 @@ public enum console { @usableFromInline static let end: JSString = "end" @usableFromInline static let endContainer: JSString = "endContainer" @usableFromInline static let endDelay: JSString = "endDelay" + @usableFromInline static let endOcclusionQuery: JSString = "endOcclusionQuery" @usableFromInline static let endOffset: JSString = "endOffset" @usableFromInline static let endQuery: JSString = "endQuery" @usableFromInline static let endTime: JSString = "endTime" @@ -25003,6 +28494,8 @@ public enum console { @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" + @usableFromInline static let entries: JSString = "entries" + @usableFromInline static let entryPoint: JSString = "entryPoint" @usableFromInline static let enumerateDevices: JSString = "enumerateDevices" @usableFromInline static let error: JSString = "error" @usableFromInline static let evaluate: JSString = "evaluate" @@ -25010,16 +28503,21 @@ public enum console { @usableFromInline static let eventPhase: JSString = "eventPhase" @usableFromInline static let exact: JSString = "exact" @usableFromInline static let execCommand: JSString = "execCommand" + @usableFromInline static let executeBundles: JSString = "executeBundles" + @usableFromInline static let expired: JSString = "expired" @usableFromInline static let exponentialRampToValueAtTime: JSString = "exponentialRampToValueAtTime" @usableFromInline static let extends: JSString = "extends" @usableFromInline static let extensions: JSString = "extensions" @usableFromInline static let external: JSString = "external" + @usableFromInline static let externalTexture: JSString = "externalTexture" @usableFromInline static let extractContents: JSString = "extractContents" @usableFromInline static let f: JSString = "f" @usableFromInline static let face: JSString = "face" @usableFromInline static let facingMode: JSString = "facingMode" @usableFromInline static let failIfMajorPerformanceCaveat: JSString = "failIfMajorPerformanceCaveat" + @usableFromInline static let failOp: JSString = "failOp" @usableFromInline static let fastSeek: JSString = "fastSeek" + @usableFromInline static let features: JSString = "features" @usableFromInline static let feedback: JSString = "feedback" @usableFromInline static let feedforward: JSString = "feedforward" @usableFromInline static let fenceSync: JSString = "fenceSync" @@ -25048,6 +28546,7 @@ public enum console { @usableFromInline static let fontKerning: JSString = "fontKerning" @usableFromInline static let fontStretch: JSString = "fontStretch" @usableFromInline static let fontVariantCaps: JSString = "fontVariantCaps" + @usableFromInline static let forceFallbackAdapter: JSString = "forceFallbackAdapter" @usableFromInline static let form: JSString = "form" @usableFromInline static let formAction: JSString = "formAction" @usableFromInline static let formData: JSString = "formData" @@ -25061,6 +28560,7 @@ public enum console { @usableFromInline static let forwardX: JSString = "forwardX" @usableFromInline static let forwardY: JSString = "forwardY" @usableFromInline static let forwardZ: JSString = "forwardZ" + @usableFromInline static let fragment: JSString = "fragment" @usableFromInline static let frame: JSString = "frame" @usableFromInline static let frameBorder: JSString = "frameBorder" @usableFromInline static let frameCount: JSString = "frameCount" @@ -25084,6 +28584,7 @@ public enum console { @usableFromInline static let fromRect: JSString = "fromRect" @usableFromInline static let frontFace: JSString = "frontFace" @usableFromInline static let fullRange: JSString = "fullRange" + @usableFromInline static let g: JSString = "g" @usableFromInline static let gain: JSString = "gain" @usableFromInline static let generateMipmap: JSString = "generateMipmap" @usableFromInline static let get: JSString = "get" @@ -25104,6 +28605,7 @@ public enum console { @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" @usableFromInline static let getAudioTracks: JSString = "getAudioTracks" + @usableFromInline static let getBindGroupLayout: JSString = "getBindGroupLayout" @usableFromInline static let getBoundingClientRect: JSString = "getBoundingClientRect" @usableFromInline static let getBounds: JSString = "getBounds" @usableFromInline static let getBoxQuads: JSString = "getBoxQuads" @@ -25120,6 +28622,7 @@ public enum console { @usableFromInline static let getContext: JSString = "getContext" @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" @usableFromInline static let getCueById: JSString = "getCueById" + @usableFromInline static let getCurrentTexture: JSString = "getCurrentTexture" @usableFromInline static let getData: JSString = "getData" @usableFromInline static let getElementById: JSString = "getElementById" @usableFromInline static let getElementsByClassName: JSString = "getElementsByClassName" @@ -25138,10 +28641,12 @@ public enum console { @usableFromInline static let getInternalformatParameter: JSString = "getInternalformatParameter" @usableFromInline static let getKeyframes: JSString = "getKeyframes" @usableFromInline static let getLineDash: JSString = "getLineDash" + @usableFromInline static let getMappedRange: JSString = "getMappedRange" @usableFromInline static let getModifierState: JSString = "getModifierState" @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" @usableFromInline static let getOutputTimestamp: JSString = "getOutputTimestamp" @usableFromInline static let getParameter: JSString = "getParameter" + @usableFromInline static let getPreferredFormat: JSString = "getPreferredFormat" @usableFromInline static let getProgramInfoLog: JSString = "getProgramInfoLog" @usableFromInline static let getProgramParameter: JSString = "getProgramParameter" @usableFromInline static let getQuery: JSString = "getQuery" @@ -25182,6 +28687,7 @@ public enum console { @usableFromInline static let globalAlpha: JSString = "globalAlpha" @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" @usableFromInline static let go: JSString = "go" + @usableFromInline static let gpu: JSString = "gpu" @usableFromInline static let group: JSString = "group" @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" @usableFromInline static let groupEnd: JSString = "groupEnd" @@ -25195,6 +28701,7 @@ public enum console { @usableFromInline static let hasAttributeNS: JSString = "hasAttributeNS" @usableFromInline static let hasAttributes: JSString = "hasAttributes" @usableFromInline static let hasChildNodes: JSString = "hasChildNodes" + @usableFromInline static let hasDynamicOffset: JSString = "hasDynamicOffset" @usableFromInline static let hasFeature: JSString = "hasFeature" @usableFromInline static let hasFocus: JSString = "hasFocus" @usableFromInline static let hash: JSString = "hash" @@ -25206,6 +28713,7 @@ public enum console { @usableFromInline static let high: JSString = "high" @usableFromInline static let highWaterMark: JSString = "highWaterMark" @usableFromInline static let hint: JSString = "hint" + @usableFromInline static let hints: JSString = "hints" @usableFromInline static let history: JSString = "history" @usableFromInline static let host: JSString = "host" @usableFromInline static let hostname: JSString = "hostname" @@ -25229,6 +28737,7 @@ public enum console { @usableFromInline static let imageSrcset: JSString = "imageSrcset" @usableFromInline static let images: JSString = "images" @usableFromInline static let implementation: JSString = "implementation" + @usableFromInline static let importExternalTexture: JSString = "importExternalTexture" @usableFromInline static let importNode: JSString = "importNode" @usableFromInline static let importStylesheet: JSString = "importStylesheet" @usableFromInline static let inBandMetadataTrackDispatchType: JSString = "inBandMetadataTrackDispatchType" @@ -25259,6 +28768,7 @@ public enum console { @usableFromInline static let insertBefore: JSString = "insertBefore" @usableFromInline static let insertCell: JSString = "insertCell" @usableFromInline static let insertData: JSString = "insertData" + @usableFromInline static let insertDebugMarker: JSString = "insertDebugMarker" @usableFromInline static let insertNode: JSString = "insertNode" @usableFromInline static let insertRow: JSString = "insertRow" @usableFromInline static let installing: JSString = "installing" @@ -25280,6 +28790,7 @@ public enum console { @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" @usableFromInline static let isEnabled: JSString = "isEnabled" @usableFromInline static let isEqualNode: JSString = "isEqualNode" + @usableFromInline static let isFallbackAdapter: JSString = "isFallbackAdapter" @usableFromInline static let isFramebuffer: JSString = "isFramebuffer" @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" @usableFromInline static let isIdentity: JSString = "isIdentity" @@ -25333,9 +28844,12 @@ public enum console { @usableFromInline static let length: JSString = "length" @usableFromInline static let lengthComputable: JSString = "lengthComputable" @usableFromInline static let letterSpacing: JSString = "letterSpacing" + @usableFromInline static let limits: JSString = "limits" @usableFromInline static let lineCap: JSString = "lineCap" @usableFromInline static let lineDashOffset: JSString = "lineDashOffset" @usableFromInline static let lineJoin: JSString = "lineJoin" + @usableFromInline static let lineNum: JSString = "lineNum" + @usableFromInline static let linePos: JSString = "linePos" @usableFromInline static let lineTo: JSString = "lineTo" @usableFromInline static let lineWidth: JSString = "lineWidth" @usableFromInline static let linearRampToValueAtTime: JSString = "linearRampToValueAtTime" @@ -25347,6 +28861,7 @@ public enum console { @usableFromInline static let list: JSString = "list" @usableFromInline static let listener: JSString = "listener" @usableFromInline static let load: JSString = "load" + @usableFromInline static let loadOp: JSString = "loadOp" @usableFromInline static let loaded: JSString = "loaded" @usableFromInline static let loading: JSString = "loading" @usableFromInline static let localName: JSString = "localName" @@ -25354,6 +28869,8 @@ public enum console { @usableFromInline static let location: JSString = "location" @usableFromInline static let locationbar: JSString = "locationbar" @usableFromInline static let locked: JSString = "locked" + @usableFromInline static let lodMaxClamp: JSString = "lodMaxClamp" + @usableFromInline static let lodMinClamp: JSString = "lodMinClamp" @usableFromInline static let log: JSString = "log" @usableFromInline static let longDesc: JSString = "longDesc" @usableFromInline static let lookupNamespaceURI: JSString = "lookupNamespaceURI" @@ -25361,6 +28878,7 @@ public enum console { @usableFromInline static let loop: JSString = "loop" @usableFromInline static let loopEnd: JSString = "loopEnd" @usableFromInline static let loopStart: JSString = "loopStart" + @usableFromInline static let lost: JSString = "lost" @usableFromInline static let low: JSString = "low" @usableFromInline static let lowsrc: JSString = "lowsrc" @usableFromInline static let m11: JSString = "m11" @@ -25379,8 +28897,12 @@ public enum console { @usableFromInline static let m42: JSString = "m42" @usableFromInline static let m43: JSString = "m43" @usableFromInline static let m44: JSString = "m44" + @usableFromInline static let magFilter: JSString = "magFilter" + @usableFromInline static let mapAsync: JSString = "mapAsync" + @usableFromInline static let mappedAtCreation: JSString = "mappedAtCreation" @usableFromInline static let marginHeight: JSString = "marginHeight" @usableFromInline static let marginWidth: JSString = "marginWidth" + @usableFromInline static let mask: JSString = "mask" @usableFromInline static let match: JSString = "match" @usableFromInline static let matchAll: JSString = "matchAll" @usableFromInline static let matchMedia: JSString = "matchMedia" @@ -25388,12 +28910,37 @@ public enum console { @usableFromInline static let matrix: JSString = "matrix" @usableFromInline static let matrixTransform: JSString = "matrixTransform" @usableFromInline static let max: JSString = "max" + @usableFromInline static let maxAnisotropy: JSString = "maxAnisotropy" + @usableFromInline static let maxBindGroups: JSString = "maxBindGroups" @usableFromInline static let maxChannelCount: JSString = "maxChannelCount" + @usableFromInline static let maxComputeInvocationsPerWorkgroup: JSString = "maxComputeInvocationsPerWorkgroup" + @usableFromInline static let maxComputeWorkgroupSizeX: JSString = "maxComputeWorkgroupSizeX" + @usableFromInline static let maxComputeWorkgroupSizeY: JSString = "maxComputeWorkgroupSizeY" + @usableFromInline static let maxComputeWorkgroupSizeZ: JSString = "maxComputeWorkgroupSizeZ" + @usableFromInline static let maxComputeWorkgroupStorageSize: JSString = "maxComputeWorkgroupStorageSize" + @usableFromInline static let maxComputeWorkgroupsPerDimension: JSString = "maxComputeWorkgroupsPerDimension" @usableFromInline static let maxDecibels: JSString = "maxDecibels" @usableFromInline static let maxDelayTime: JSString = "maxDelayTime" @usableFromInline static let maxDistance: JSString = "maxDistance" + @usableFromInline static let maxDynamicStorageBuffersPerPipelineLayout: JSString = "maxDynamicStorageBuffersPerPipelineLayout" + @usableFromInline static let maxDynamicUniformBuffersPerPipelineLayout: JSString = "maxDynamicUniformBuffersPerPipelineLayout" + @usableFromInline static let maxInterStageShaderComponents: JSString = "maxInterStageShaderComponents" @usableFromInline static let maxLength: JSString = "maxLength" + @usableFromInline static let maxSampledTexturesPerShaderStage: JSString = "maxSampledTexturesPerShaderStage" + @usableFromInline static let maxSamplersPerShaderStage: JSString = "maxSamplersPerShaderStage" + @usableFromInline static let maxStorageBufferBindingSize: JSString = "maxStorageBufferBindingSize" + @usableFromInline static let maxStorageBuffersPerShaderStage: JSString = "maxStorageBuffersPerShaderStage" + @usableFromInline static let maxStorageTexturesPerShaderStage: JSString = "maxStorageTexturesPerShaderStage" + @usableFromInline static let maxTextureArrayLayers: JSString = "maxTextureArrayLayers" + @usableFromInline static let maxTextureDimension1D: JSString = "maxTextureDimension1D" + @usableFromInline static let maxTextureDimension2D: JSString = "maxTextureDimension2D" + @usableFromInline static let maxTextureDimension3D: JSString = "maxTextureDimension3D" + @usableFromInline static let maxUniformBufferBindingSize: JSString = "maxUniformBufferBindingSize" + @usableFromInline static let maxUniformBuffersPerShaderStage: JSString = "maxUniformBuffersPerShaderStage" @usableFromInline static let maxValue: JSString = "maxValue" + @usableFromInline static let maxVertexAttributes: JSString = "maxVertexAttributes" + @usableFromInline static let maxVertexBufferArrayStride: JSString = "maxVertexBufferArrayStride" + @usableFromInline static let maxVertexBuffers: JSString = "maxVertexBuffers" @usableFromInline static let measureText: JSString = "measureText" @usableFromInline static let media: JSString = "media" @usableFromInline static let mediaDevices: JSString = "mediaDevices" @@ -25402,14 +28949,22 @@ public enum console { @usableFromInline static let mediaStreamTrack: JSString = "mediaStreamTrack" @usableFromInline static let menubar: JSString = "menubar" @usableFromInline static let message: JSString = "message" + @usableFromInline static let messages: JSString = "messages" @usableFromInline static let metaKey: JSString = "metaKey" @usableFromInline static let method: JSString = "method" @usableFromInline static let mimeType: JSString = "mimeType" @usableFromInline static let mimeTypes: JSString = "mimeTypes" @usableFromInline static let min: JSString = "min" + @usableFromInline static let minBindingSize: JSString = "minBindingSize" @usableFromInline static let minDecibels: JSString = "minDecibels" + @usableFromInline static let minFilter: JSString = "minFilter" @usableFromInline static let minLength: JSString = "minLength" + @usableFromInline static let minStorageBufferOffsetAlignment: JSString = "minStorageBufferOffsetAlignment" + @usableFromInline static let minUniformBufferOffsetAlignment: JSString = "minUniformBufferOffsetAlignment" @usableFromInline static let minValue: JSString = "minValue" + @usableFromInline static let mipLevel: JSString = "mipLevel" + @usableFromInline static let mipLevelCount: JSString = "mipLevelCount" + @usableFromInline static let mipmapFilter: JSString = "mipmapFilter" @usableFromInline static let miterLimit: JSString = "miterLimit" @usableFromInline static let mode: JSString = "mode" @usableFromInline static let modifierAltGraph: JSString = "modifierAltGraph" @@ -25422,11 +28977,14 @@ public enum console { @usableFromInline static let modifierSuper: JSString = "modifierSuper" @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" + @usableFromInline static let module: JSString = "module" @usableFromInline static let moveBy: JSString = "moveBy" @usableFromInline static let moveTo: JSString = "moveTo" @usableFromInline static let multiple: JSString = "multiple" @usableFromInline static let multiply: JSString = "multiply" @usableFromInline static let multiplySelf: JSString = "multiplySelf" + @usableFromInline static let multisample: JSString = "multisample" + @usableFromInline static let multisampled: JSString = "multisampled" @usableFromInline static let muted: JSString = "muted" @usableFromInline static let name: JSString = "name" @usableFromInline static let namedItem: JSString = "namedItem" @@ -25460,6 +29018,7 @@ public enum console { @usableFromInline static let numberOfOutputs: JSString = "numberOfOutputs" @usableFromInline static let numberValue: JSString = "numberValue" @usableFromInline static let observe: JSString = "observe" + @usableFromInline static let occlusionQuerySet: JSString = "occlusionQuerySet" @usableFromInline static let offset: JSString = "offset" @usableFromInline static let offsetHeight: JSString = "offsetHeight" @usableFromInline static let offsetLeft: JSString = "offsetLeft" @@ -25473,6 +29032,7 @@ public enum console { @usableFromInline static let oldURL: JSString = "oldURL" @usableFromInline static let oldValue: JSString = "oldValue" @usableFromInline static let onLine: JSString = "onLine" + @usableFromInline static let onSubmittedWorkDone: JSString = "onSubmittedWorkDone" @usableFromInline static let onabort: JSString = "onabort" @usableFromInline static let onaddtrack: JSString = "onaddtrack" @usableFromInline static let onafterprint: JSString = "onafterprint" @@ -25573,6 +29133,7 @@ public enum console { @usableFromInline static let ontimeout: JSString = "ontimeout" @usableFromInline static let ontimeupdate: JSString = "ontimeupdate" @usableFromInline static let ontoggle: JSString = "ontoggle" + @usableFromInline static let onuncapturederror: JSString = "onuncapturederror" @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" @usableFromInline static let onunload: JSString = "onunload" @usableFromInline static let onunmute: JSString = "onunmute" @@ -25587,6 +29148,7 @@ public enum console { @usableFromInline static let onwheel: JSString = "onwheel" @usableFromInline static let open: JSString = "open" @usableFromInline static let opener: JSString = "opener" + @usableFromInline static let operation: JSString = "operation" @usableFromInline static let optimizeForLatency: JSString = "optimizeForLatency" @usableFromInline static let optimum: JSString = "optimum" @usableFromInline static let options: JSString = "options" @@ -25625,6 +29187,7 @@ public enum console { @usableFromInline static let parentElement: JSString = "parentElement" @usableFromInline static let parentNode: JSString = "parentNode" @usableFromInline static let parseFromString: JSString = "parseFromString" + @usableFromInline static let passOp: JSString = "passOp" @usableFromInline static let passive: JSString = "passive" @usableFromInline static let password: JSString = "password" @usableFromInline static let pathname: JSString = "pathname" @@ -25660,6 +29223,8 @@ public enum console { @usableFromInline static let plugins: JSString = "plugins" @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" @usableFromInline static let polygonOffset: JSString = "polygonOffset" + @usableFromInline static let popDebugGroup: JSString = "popDebugGroup" + @usableFromInline static let popErrorScope: JSString = "popErrorScope" @usableFromInline static let port: JSString = "port" @usableFromInline static let port1: JSString = "port1" @usableFromInline static let port2: JSString = "port2" @@ -25692,6 +29257,7 @@ public enum console { @usableFromInline static let previousNode: JSString = "previousNode" @usableFromInline static let previousSibling: JSString = "previousSibling" @usableFromInline static let primaries: JSString = "primaries" + @usableFromInline static let primitive: JSString = "primitive" @usableFromInline static let print: JSString = "print" @usableFromInline static let processorOptions: JSString = "processorOptions" @usableFromInline static let product: JSString = "product" @@ -25704,6 +29270,8 @@ public enum console { @usableFromInline static let pseudoElement: JSString = "pseudoElement" @usableFromInline static let publicId: JSString = "publicId" @usableFromInline static let pull: JSString = "pull" + @usableFromInline static let pushDebugGroup: JSString = "pushDebugGroup" + @usableFromInline static let pushErrorScope: JSString = "pushErrorScope" @usableFromInline static let pushState: JSString = "pushState" @usableFromInline static let put: JSString = "put" @usableFromInline static let putImageData: JSString = "putImageData" @@ -25714,8 +29282,12 @@ public enum console { @usableFromInline static let queryCommandState: JSString = "queryCommandState" @usableFromInline static let queryCommandSupported: JSString = "queryCommandSupported" @usableFromInline static let queryCommandValue: JSString = "queryCommandValue" + @usableFromInline static let queryIndex: JSString = "queryIndex" @usableFromInline static let querySelector: JSString = "querySelector" @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" + @usableFromInline static let querySet: JSString = "querySet" + @usableFromInline static let queue: JSString = "queue" + @usableFromInline static let r: JSString = "r" @usableFromInline static let rangeMax: JSString = "rangeMax" @usableFromInline static let rangeMin: JSString = "rangeMin" @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" @@ -25781,9 +29353,13 @@ public enum console { @usableFromInline static let reportError: JSString = "reportError" @usableFromInline static let reportValidity: JSString = "reportValidity" @usableFromInline static let request: JSString = "request" + @usableFromInline static let requestAdapter: JSString = "requestAdapter" @usableFromInline static let requestData: JSString = "requestData" + @usableFromInline static let requestDevice: JSString = "requestDevice" @usableFromInline static let requestSubmit: JSString = "requestSubmit" @usableFromInline static let required: JSString = "required" + @usableFromInline static let requiredFeatures: JSString = "requiredFeatures" + @usableFromInline static let requiredLimits: JSString = "requiredLimits" @usableFromInline static let reset: JSString = "reset" @usableFromInline static let resetTransform: JSString = "resetTransform" @usableFromInline static let resizeBy: JSString = "resizeBy" @@ -25792,6 +29368,9 @@ public enum console { @usableFromInline static let resizeQuality: JSString = "resizeQuality" @usableFromInline static let resizeTo: JSString = "resizeTo" @usableFromInline static let resizeWidth: JSString = "resizeWidth" + @usableFromInline static let resolveQuerySet: JSString = "resolveQuerySet" + @usableFromInline static let resolveTarget: JSString = "resolveTarget" + @usableFromInline static let resource: JSString = "resource" @usableFromInline static let respond: JSString = "respond" @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" @usableFromInline static let response: JSString = "response" @@ -25824,10 +29403,14 @@ public enum console { @usableFromInline static let rowIndex: JSString = "rowIndex" @usableFromInline static let rowSpan: JSString = "rowSpan" @usableFromInline static let rows: JSString = "rows" + @usableFromInline static let rowsPerImage: JSString = "rowsPerImage" @usableFromInline static let rules: JSString = "rules" + @usableFromInline static let sampleCount: JSString = "sampleCount" @usableFromInline static let sampleCoverage: JSString = "sampleCoverage" @usableFromInline static let sampleRate: JSString = "sampleRate" @usableFromInline static let sampleSize: JSString = "sampleSize" + @usableFromInline static let sampleType: JSString = "sampleType" + @usableFromInline static let sampler: JSString = "sampler" @usableFromInline static let samplerParameterf: JSString = "samplerParameterf" @usableFromInline static let samplerParameteri: JSString = "samplerParameteri" @usableFromInline static let sandbox: JSString = "sandbox" @@ -25888,6 +29471,8 @@ public enum console { @usableFromInline static let setAttributeNS: JSString = "setAttributeNS" @usableFromInline static let setAttributeNode: JSString = "setAttributeNode" @usableFromInline static let setAttributeNodeNS: JSString = "setAttributeNodeNS" + @usableFromInline static let setBindGroup: JSString = "setBindGroup" + @usableFromInline static let setBlendConstant: JSString = "setBlendConstant" @usableFromInline static let setCustomValidity: JSString = "setCustomValidity" @usableFromInline static let setData: JSString = "setData" @usableFromInline static let setDragImage: JSString = "setDragImage" @@ -25896,6 +29481,7 @@ public enum console { @usableFromInline static let setEndBefore: JSString = "setEndBefore" @usableFromInline static let setFormValue: JSString = "setFormValue" @usableFromInline static let setHeaderValue: JSString = "setHeaderValue" + @usableFromInline static let setIndexBuffer: JSString = "setIndexBuffer" @usableFromInline static let setInterval: JSString = "setInterval" @usableFromInline static let setKeyframes: JSString = "setKeyframes" @usableFromInline static let setLineDash: JSString = "setLineDash" @@ -25905,19 +29491,25 @@ public enum console { @usableFromInline static let setOrientation: JSString = "setOrientation" @usableFromInline static let setParameter: JSString = "setParameter" @usableFromInline static let setPeriodicWave: JSString = "setPeriodicWave" + @usableFromInline static let setPipeline: JSString = "setPipeline" @usableFromInline static let setPosition: JSString = "setPosition" @usableFromInline static let setRangeText: JSString = "setRangeText" @usableFromInline static let setRequestHeader: JSString = "setRequestHeader" + @usableFromInline static let setScissorRect: JSString = "setScissorRect" @usableFromInline static let setSelectionRange: JSString = "setSelectionRange" @usableFromInline static let setStart: JSString = "setStart" @usableFromInline static let setStartAfter: JSString = "setStartAfter" @usableFromInline static let setStartBefore: JSString = "setStartBefore" + @usableFromInline static let setStencilReference: JSString = "setStencilReference" @usableFromInline static let setTargetAtTime: JSString = "setTargetAtTime" @usableFromInline static let setTimeout: JSString = "setTimeout" @usableFromInline static let setTransform: JSString = "setTransform" @usableFromInline static let setValidity: JSString = "setValidity" @usableFromInline static let setValueAtTime: JSString = "setValueAtTime" @usableFromInline static let setValueCurveAtTime: JSString = "setValueCurveAtTime" + @usableFromInline static let setVertexBuffer: JSString = "setVertexBuffer" + @usableFromInline static let setViewport: JSString = "setViewport" + @usableFromInline static let shaderLocation: JSString = "shaderLocation" @usableFromInline static let shaderSource: JSString = "shaderSource" @usableFromInline static let shadowBlur: JSString = "shadowBlur" @usableFromInline static let shadowColor: JSString = "shadowColor" @@ -25945,12 +29537,14 @@ public enum console { @usableFromInline static let snapshotLength: JSString = "snapshotLength" @usableFromInline static let sort: JSString = "sort" @usableFromInline static let source: JSString = "source" + @usableFromInline static let sourceMap: JSString = "sourceMap" @usableFromInline static let span: JSString = "span" @usableFromInline static let specified: JSString = "specified" @usableFromInline static let spellcheck: JSString = "spellcheck" @usableFromInline static let splitText: JSString = "splitText" @usableFromInline static let src: JSString = "src" @usableFromInline static let srcElement: JSString = "srcElement" + @usableFromInline static let srcFactor: JSString = "srcFactor" @usableFromInline static let srcdoc: JSString = "srcdoc" @usableFromInline static let srclang: JSString = "srclang" @usableFromInline static let srcset: JSString = "srcset" @@ -25967,23 +29561,35 @@ public enum console { @usableFromInline static let statusText: JSString = "statusText" @usableFromInline static let statusbar: JSString = "statusbar" @usableFromInline static let stencil: JSString = "stencil" + @usableFromInline static let stencilBack: JSString = "stencilBack" + @usableFromInline static let stencilClearValue: JSString = "stencilClearValue" + @usableFromInline static let stencilFront: JSString = "stencilFront" @usableFromInline static let stencilFunc: JSString = "stencilFunc" @usableFromInline static let stencilFuncSeparate: JSString = "stencilFuncSeparate" + @usableFromInline static let stencilLoadOp: JSString = "stencilLoadOp" @usableFromInline static let stencilMask: JSString = "stencilMask" @usableFromInline static let stencilMaskSeparate: JSString = "stencilMaskSeparate" @usableFromInline static let stencilOp: JSString = "stencilOp" @usableFromInline static let stencilOpSeparate: JSString = "stencilOpSeparate" + @usableFromInline static let stencilReadMask: JSString = "stencilReadMask" + @usableFromInline static let stencilReadOnly: JSString = "stencilReadOnly" + @usableFromInline static let stencilStoreOp: JSString = "stencilStoreOp" + @usableFromInline static let stencilWriteMask: JSString = "stencilWriteMask" @usableFromInline static let step: JSString = "step" @usableFromInline static let stepDown: JSString = "stepDown" @usableFromInline static let stepMismatch: JSString = "stepMismatch" + @usableFromInline static let stepMode: JSString = "stepMode" @usableFromInline static let stepUp: JSString = "stepUp" @usableFromInline static let stop: JSString = "stop" @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" @usableFromInline static let stopPropagation: JSString = "stopPropagation" @usableFromInline static let storageArea: JSString = "storageArea" + @usableFromInline static let storageTexture: JSString = "storageTexture" + @usableFromInline static let storeOp: JSString = "storeOp" @usableFromInline static let stream: JSString = "stream" @usableFromInline static let stride: JSString = "stride" @usableFromInline static let stringValue: JSString = "stringValue" + @usableFromInline static let stripIndexFormat: JSString = "stripIndexFormat" @usableFromInline static let stroke: JSString = "stroke" @usableFromInline static let strokeRect: JSString = "strokeRect" @usableFromInline static let strokeStyle: JSString = "strokeStyle" @@ -26011,6 +29617,7 @@ public enum console { @usableFromInline static let takeRecords: JSString = "takeRecords" @usableFromInline static let target: JSString = "target" @usableFromInline static let targetOrigin: JSString = "targetOrigin" + @usableFromInline static let targets: JSString = "targets" @usableFromInline static let tee: JSString = "tee" @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" @@ -26029,6 +29636,7 @@ public enum console { @usableFromInline static let textLength: JSString = "textLength" @usableFromInline static let textRendering: JSString = "textRendering" @usableFromInline static let textTracks: JSString = "textTracks" + @usableFromInline static let texture: JSString = "texture" @usableFromInline static let threshold: JSString = "threshold" @usableFromInline static let throwIfAborted: JSString = "throwIfAborted" @usableFromInline static let time: JSString = "time" @@ -26040,6 +29648,7 @@ public enum console { @usableFromInline static let timeline: JSString = "timeline" @usableFromInline static let timeout: JSString = "timeout" @usableFromInline static let timestamp: JSString = "timestamp" + @usableFromInline static let timestampWrites: JSString = "timestampWrites" @usableFromInline static let title: JSString = "title" @usableFromInline static let toBox: JSString = "toBox" @usableFromInline static let toDataURL: JSString = "toDataURL" @@ -26053,6 +29662,7 @@ public enum console { @usableFromInline static let tooShort: JSString = "tooShort" @usableFromInline static let toolbar: JSString = "toolbar" @usableFromInline static let top: JSString = "top" + @usableFromInline static let topology: JSString = "topology" @usableFromInline static let total: JSString = "total" @usableFromInline static let trace: JSString = "trace" @usableFromInline static let track: JSString = "track" @@ -26072,6 +29682,8 @@ public enum console { @usableFromInline static let type: JSString = "type" @usableFromInline static let typeMismatch: JSString = "typeMismatch" @usableFromInline static let types: JSString = "types" + @usableFromInline static let unclippedDepth: JSString = "unclippedDepth" + @usableFromInline static let unconfigure: JSString = "unconfigure" @usableFromInline static let uniform1f: JSString = "uniform1f" @usableFromInline static let uniform1fv: JSString = "uniform1fv" @usableFromInline static let uniform1i: JSString = "uniform1i" @@ -26106,6 +29718,7 @@ public enum console { @usableFromInline static let uniformMatrix4fv: JSString = "uniformMatrix4fv" @usableFromInline static let uniformMatrix4x2fv: JSString = "uniformMatrix4x2fv" @usableFromInline static let uniformMatrix4x3fv: JSString = "uniformMatrix4x3fv" + @usableFromInline static let unmap: JSString = "unmap" @usableFromInline static let unregister: JSString = "unregister" @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" @usableFromInline static let upX: JSString = "upX" @@ -26118,6 +29731,7 @@ public enum console { @usableFromInline static let upgrade: JSString = "upgrade" @usableFromInline static let upload: JSString = "upload" @usableFromInline static let url: JSString = "url" + @usableFromInline static let usage: JSString = "usage" @usableFromInline static let useMap: JSString = "useMap" @usableFromInline static let useProgram: JSString = "useProgram" @usableFromInline static let userAgent: JSString = "userAgent" @@ -26136,6 +29750,7 @@ public enum console { @usableFromInline static let vendor: JSString = "vendor" @usableFromInline static let vendorSub: JSString = "vendorSub" @usableFromInline static let version: JSString = "version" + @usableFromInline static let vertex: JSString = "vertex" @usableFromInline static let vertexAttrib1f: JSString = "vertexAttrib1f" @usableFromInline static let vertexAttrib1fv: JSString = "vertexAttrib1fv" @usableFromInline static let vertexAttrib2f: JSString = "vertexAttrib2f" @@ -26157,7 +29772,10 @@ public enum console { @usableFromInline static let videoTracks: JSString = "videoTracks" @usableFromInline static let videoWidth: JSString = "videoWidth" @usableFromInline static let view: JSString = "view" + @usableFromInline static let viewDimension: JSString = "viewDimension" + @usableFromInline static let viewFormats: JSString = "viewFormats" @usableFromInline static let viewport: JSString = "viewport" + @usableFromInline static let visibility: JSString = "visibility" @usableFromInline static let visibilityState: JSString = "visibilityState" @usableFromInline static let visible: JSString = "visible" @usableFromInline static let visibleRect: JSString = "visibleRect" @@ -26184,6 +29802,10 @@ public enum console { @usableFromInline static let writable: JSString = "writable" @usableFromInline static let writableType: JSString = "writableType" @usableFromInline static let write: JSString = "write" + @usableFromInline static let writeBuffer: JSString = "writeBuffer" + @usableFromInline static let writeMask: JSString = "writeMask" + @usableFromInline static let writeTexture: JSString = "writeTexture" + @usableFromInline static let writeTimestamp: JSString = "writeTimestamp" @usableFromInline static let writeln: JSString = "writeln" @usableFromInline static let x: JSString = "x" @usableFromInline static let y: JSString = "y" @@ -27096,161 +30718,422 @@ public enum DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double: JSValueComp if let double: Double = value.fromJSValue() { return .double(double) } - if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { - return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) + if let seq_of_DOMPointInit_or_Double: [DOMPointInit_or_Double] = value.fromJSValue() { + return .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .domPointInit(domPointInit): + return domPointInit.jsValue + case let .double(double): + return double.jsValue + case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): + return seq_of_DOMPointInit_or_Double.jsValue + } + } +} + +public protocol Any_Document_or_XMLHttpRequestBodyInit: ConvertibleToJSValue {} +extension Document: Any_Document_or_XMLHttpRequestBodyInit {} +extension XMLHttpRequestBodyInit: Any_Document_or_XMLHttpRequestBodyInit {} + +public enum Document_or_XMLHttpRequestBodyInit: JSValueCompatible, Any_Document_or_XMLHttpRequestBodyInit { + case document(Document) + case xmlHttpRequestBodyInit(XMLHttpRequestBodyInit) + + var document: Document? { + switch self { + case let .document(document): return document + default: return nil + } + } + + var xmlHttpRequestBodyInit: XMLHttpRequestBodyInit? { + switch self { + case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): return xmlHttpRequestBodyInit + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let document: Document = value.fromJSValue() { + return .document(document) + } + if let xmlHttpRequestBodyInit: XMLHttpRequestBodyInit = value.fromJSValue() { + return .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .document(document): + return document.jsValue + case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): + return xmlHttpRequestBodyInit.jsValue + } + } +} + +public protocol Any_Double_or_KeyframeAnimationOptions: ConvertibleToJSValue {} +extension Double: Any_Double_or_KeyframeAnimationOptions {} +extension KeyframeAnimationOptions: Any_Double_or_KeyframeAnimationOptions {} + +public enum Double_or_KeyframeAnimationOptions: JSValueCompatible, Any_Double_or_KeyframeAnimationOptions { + case double(Double) + case keyframeAnimationOptions(KeyframeAnimationOptions) + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var keyframeAnimationOptions: KeyframeAnimationOptions? { + switch self { + case let .keyframeAnimationOptions(keyframeAnimationOptions): return keyframeAnimationOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let keyframeAnimationOptions: KeyframeAnimationOptions = value.fromJSValue() { + return .keyframeAnimationOptions(keyframeAnimationOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .double(double): + return double.jsValue + case let .keyframeAnimationOptions(keyframeAnimationOptions): + return keyframeAnimationOptions.jsValue + } + } +} + +public protocol Any_Double_or_KeyframeEffectOptions: ConvertibleToJSValue {} +extension Double: Any_Double_or_KeyframeEffectOptions {} +extension KeyframeEffectOptions: Any_Double_or_KeyframeEffectOptions {} + +public enum Double_or_KeyframeEffectOptions: JSValueCompatible, Any_Double_or_KeyframeEffectOptions { + case double(Double) + case keyframeEffectOptions(KeyframeEffectOptions) + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var keyframeEffectOptions: KeyframeEffectOptions? { + switch self { + case let .keyframeEffectOptions(keyframeEffectOptions): return keyframeEffectOptions + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let keyframeEffectOptions: KeyframeEffectOptions = value.fromJSValue() { + return .keyframeEffectOptions(keyframeEffectOptions) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .double(double): + return double.jsValue + case let .keyframeEffectOptions(keyframeEffectOptions): + return keyframeEffectOptions.jsValue + } + } +} + +public protocol Any_Double_or_String: ConvertibleToJSValue {} +extension Double: Any_Double_or_String {} +extension String: Any_Double_or_String {} + +public enum Double_or_String: JSValueCompatible, Any_Double_or_String { + case double(Double) + case string(String) + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let double: Double = value.fromJSValue() { + return .double(double) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .double(double): + return double.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} +extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} +extension String: Any_ElementCreationOptions_or_String {} + +public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { + case elementCreationOptions(ElementCreationOptions) + case string(String) + + var elementCreationOptions: ElementCreationOptions? { + switch self { + case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { + return .elementCreationOptions(elementCreationOptions) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .elementCreationOptions(elementCreationOptions): + return elementCreationOptions.jsValue + case let .string(string): + return string.jsValue + } + } +} + +public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} +extension Element: Any_Element_or_HTMLCollection {} +extension HTMLCollection: Any_Element_or_HTMLCollection {} + +public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { + case element(Element) + case htmlCollection(HTMLCollection) + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var htmlCollection: HTMLCollection? { + switch self { + case let .htmlCollection(htmlCollection): return htmlCollection + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let htmlCollection: HTMLCollection = value.fromJSValue() { + return .htmlCollection(htmlCollection) } return nil } public var jsValue: JSValue { switch self { - case let .domPointInit(domPointInit): - return domPointInit.jsValue - case let .double(double): - return double.jsValue - case let .seq_of_DOMPointInit_or_Double(seq_of_DOMPointInit_or_Double): - return seq_of_DOMPointInit_or_Double.jsValue + case let .element(element): + return element.jsValue + case let .htmlCollection(htmlCollection): + return htmlCollection.jsValue } } } -public protocol Any_Document_or_XMLHttpRequestBodyInit: ConvertibleToJSValue {} -extension Document: Any_Document_or_XMLHttpRequestBodyInit {} -extension XMLHttpRequestBodyInit: Any_Document_or_XMLHttpRequestBodyInit {} +public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} +extension Element: Any_Element_or_RadioNodeList {} +extension RadioNodeList: Any_Element_or_RadioNodeList {} -public enum Document_or_XMLHttpRequestBodyInit: JSValueCompatible, Any_Document_or_XMLHttpRequestBodyInit { - case document(Document) - case xmlHttpRequestBodyInit(XMLHttpRequestBodyInit) +public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { + case element(Element) + case radioNodeList(RadioNodeList) - var document: Document? { + var element: Element? { switch self { - case let .document(document): return document + case let .element(element): return element default: return nil } } - var xmlHttpRequestBodyInit: XMLHttpRequestBodyInit? { + var radioNodeList: RadioNodeList? { switch self { - case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): return xmlHttpRequestBodyInit + case let .radioNodeList(radioNodeList): return radioNodeList default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let document: Document = value.fromJSValue() { - return .document(document) + if let element: Element = value.fromJSValue() { + return .element(element) } - if let xmlHttpRequestBodyInit: XMLHttpRequestBodyInit = value.fromJSValue() { - return .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit) + if let radioNodeList: RadioNodeList = value.fromJSValue() { + return .radioNodeList(radioNodeList) } return nil } public var jsValue: JSValue { switch self { - case let .document(document): - return document.jsValue - case let .xmlHttpRequestBodyInit(xmlHttpRequestBodyInit): - return xmlHttpRequestBodyInit.jsValue + case let .element(element): + return element.jsValue + case let .radioNodeList(radioNodeList): + return radioNodeList.jsValue } } } -public protocol Any_Double_or_KeyframeAnimationOptions: ConvertibleToJSValue {} -extension Double: Any_Double_or_KeyframeAnimationOptions {} -extension KeyframeAnimationOptions: Any_Double_or_KeyframeAnimationOptions {} +public protocol Any_Element_or_Text: ConvertibleToJSValue {} +extension Element: Any_Element_or_Text {} +extension Text: Any_Element_or_Text {} -public enum Double_or_KeyframeAnimationOptions: JSValueCompatible, Any_Double_or_KeyframeAnimationOptions { - case double(Double) - case keyframeAnimationOptions(KeyframeAnimationOptions) +public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { + case element(Element) + case text(Text) - var double: Double? { + var element: Element? { switch self { - case let .double(double): return double + case let .element(element): return element default: return nil } } - var keyframeAnimationOptions: KeyframeAnimationOptions? { + var text: Text? { switch self { - case let .keyframeAnimationOptions(keyframeAnimationOptions): return keyframeAnimationOptions + case let .text(text): return text default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) + if let element: Element = value.fromJSValue() { + return .element(element) } - if let keyframeAnimationOptions: KeyframeAnimationOptions = value.fromJSValue() { - return .keyframeAnimationOptions(keyframeAnimationOptions) + if let text: Text = value.fromJSValue() { + return .text(text) } return nil } public var jsValue: JSValue { switch self { - case let .double(double): - return double.jsValue - case let .keyframeAnimationOptions(keyframeAnimationOptions): - return keyframeAnimationOptions.jsValue + case let .element(element): + return element.jsValue + case let .text(text): + return text.jsValue } } } -public protocol Any_Double_or_KeyframeEffectOptions: ConvertibleToJSValue {} -extension Double: Any_Double_or_KeyframeEffectOptions {} -extension KeyframeEffectOptions: Any_Double_or_KeyframeEffectOptions {} +public protocol Any_Event_or_String: ConvertibleToJSValue {} +extension Event: Any_Event_or_String {} +extension String: Any_Event_or_String {} -public enum Double_or_KeyframeEffectOptions: JSValueCompatible, Any_Double_or_KeyframeEffectOptions { - case double(Double) - case keyframeEffectOptions(KeyframeEffectOptions) +public enum Event_or_String: JSValueCompatible, Any_Event_or_String { + case event(Event) + case string(String) - var double: Double? { + var event: Event? { switch self { - case let .double(double): return double + case let .event(event): return event default: return nil } } - var keyframeEffectOptions: KeyframeEffectOptions? { + var string: String? { switch self { - case let .keyframeEffectOptions(keyframeEffectOptions): return keyframeEffectOptions + case let .string(string): return string default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) + if let event: Event = value.fromJSValue() { + return .event(event) } - if let keyframeEffectOptions: KeyframeEffectOptions = value.fromJSValue() { - return .keyframeEffectOptions(keyframeEffectOptions) + if let string: String = value.fromJSValue() { + return .string(string) } return nil } public var jsValue: JSValue { switch self { - case let .double(double): - return double.jsValue - case let .keyframeEffectOptions(keyframeEffectOptions): - return keyframeEffectOptions.jsValue + case let .event(event): + return event.jsValue + case let .string(string): + return string.jsValue } } } -public protocol Any_Double_or_String: ConvertibleToJSValue {} -extension Double: Any_Double_or_String {} -extension String: Any_Double_or_String {} +public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} +extension File: Any_File_or_FormData_or_String {} +extension FormData: Any_File_or_FormData_or_String {} +extension String: Any_File_or_FormData_or_String {} -public enum Double_or_String: JSValueCompatible, Any_Double_or_String { - case double(Double) +public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { + case file(File) + case formData(FormData) case string(String) - var double: Double? { + var file: File? { switch self { - case let .double(double): return double + case let .file(file): return file + default: return nil + } + } + + var formData: FormData? { + switch self { + case let .formData(formData): return formData default: return nil } } @@ -27263,8 +31146,11 @@ public enum Double_or_String: JSValueCompatible, Any_Double_or_String { } public static func construct(from value: JSValue) -> Self? { - if let double: Double = value.fromJSValue() { - return .double(double) + if let file: File = value.fromJSValue() { + return .file(file) + } + if let formData: FormData = value.fromJSValue() { + return .formData(formData) } if let string: String = value.fromJSValue() { return .string(string) @@ -27274,360 +31160,376 @@ public enum Double_or_String: JSValueCompatible, Any_Double_or_String { public var jsValue: JSValue { switch self { - case let .double(double): - return double.jsValue + case let .file(file): + return file.jsValue + case let .formData(formData): + return formData.jsValue case let .string(string): return string.jsValue } } } -public protocol Any_ElementCreationOptions_or_String: ConvertibleToJSValue {} -extension ElementCreationOptions: Any_ElementCreationOptions_or_String {} -extension String: Any_ElementCreationOptions_or_String {} +public protocol Any_Float32List: ConvertibleToJSValue {} +extension Float32Array: Any_Float32List {} +extension Array: Any_Float32List where Element == GLfloat {} -public enum ElementCreationOptions_or_String: JSValueCompatible, Any_ElementCreationOptions_or_String { - case elementCreationOptions(ElementCreationOptions) - case string(String) +public enum Float32List: JSValueCompatible, Any_Float32List { + case float32Array(Float32Array) + case seq_of_GLfloat([GLfloat]) - var elementCreationOptions: ElementCreationOptions? { + var float32Array: Float32Array? { switch self { - case let .elementCreationOptions(elementCreationOptions): return elementCreationOptions + case let .float32Array(float32Array): return float32Array default: return nil } } - var string: String? { + var seq_of_GLfloat: [GLfloat]? { switch self { - case let .string(string): return string + case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let elementCreationOptions: ElementCreationOptions = value.fromJSValue() { - return .elementCreationOptions(elementCreationOptions) + if let float32Array: Float32Array = value.fromJSValue() { + return .float32Array(float32Array) } - if let string: String = value.fromJSValue() { - return .string(string) + if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { + return .seq_of_GLfloat(seq_of_GLfloat) } return nil } public var jsValue: JSValue { switch self { - case let .elementCreationOptions(elementCreationOptions): - return elementCreationOptions.jsValue - case let .string(string): - return string.jsValue + case let .float32Array(float32Array): + return float32Array.jsValue + case let .seq_of_GLfloat(seq_of_GLfloat): + return seq_of_GLfloat.jsValue } } } -public protocol Any_Element_or_HTMLCollection: ConvertibleToJSValue {} -extension Element: Any_Element_or_HTMLCollection {} -extension HTMLCollection: Any_Element_or_HTMLCollection {} +public protocol Any_FormDataEntryValue: ConvertibleToJSValue {} +extension File: Any_FormDataEntryValue {} +extension String: Any_FormDataEntryValue {} -public enum Element_or_HTMLCollection: JSValueCompatible, Any_Element_or_HTMLCollection { - case element(Element) - case htmlCollection(HTMLCollection) +public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { + case file(File) + case string(String) - var element: Element? { + var file: File? { switch self { - case let .element(element): return element + case let .file(file): return file default: return nil } } - var htmlCollection: HTMLCollection? { + var string: String? { switch self { - case let .htmlCollection(htmlCollection): return htmlCollection + case let .string(string): return string default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) + if let file: File = value.fromJSValue() { + return .file(file) } - if let htmlCollection: HTMLCollection = value.fromJSValue() { - return .htmlCollection(htmlCollection) + if let string: String = value.fromJSValue() { + return .string(string) } return nil } public var jsValue: JSValue { switch self { - case let .element(element): - return element.jsValue - case let .htmlCollection(htmlCollection): - return htmlCollection.jsValue + case let .file(file): + return file.jsValue + case let .string(string): + return string.jsValue } } } -public protocol Any_Element_or_RadioNodeList: ConvertibleToJSValue {} -extension Element: Any_Element_or_RadioNodeList {} -extension RadioNodeList: Any_Element_or_RadioNodeList {} +public protocol Any_GPUBindingResource: ConvertibleToJSValue {} +extension GPUBufferBinding: Any_GPUBindingResource {} +extension GPUExternalTexture: Any_GPUBindingResource {} +extension GPUSampler: Any_GPUBindingResource {} +extension GPUTextureView: Any_GPUBindingResource {} -public enum Element_or_RadioNodeList: JSValueCompatible, Any_Element_or_RadioNodeList { - case element(Element) - case radioNodeList(RadioNodeList) +public enum GPUBindingResource: JSValueCompatible, Any_GPUBindingResource { + case gpuBufferBinding(GPUBufferBinding) + case gpuExternalTexture(GPUExternalTexture) + case gpuSampler(GPUSampler) + case gpuTextureView(GPUTextureView) - var element: Element? { + var gpuBufferBinding: GPUBufferBinding? { switch self { - case let .element(element): return element + case let .gpuBufferBinding(gpuBufferBinding): return gpuBufferBinding default: return nil } } - var radioNodeList: RadioNodeList? { + var gpuExternalTexture: GPUExternalTexture? { switch self { - case let .radioNodeList(radioNodeList): return radioNodeList + case let .gpuExternalTexture(gpuExternalTexture): return gpuExternalTexture + default: return nil + } + } + + var gpuSampler: GPUSampler? { + switch self { + case let .gpuSampler(gpuSampler): return gpuSampler + default: return nil + } + } + + var gpuTextureView: GPUTextureView? { + switch self { + case let .gpuTextureView(gpuTextureView): return gpuTextureView default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) + if let gpuBufferBinding: GPUBufferBinding = value.fromJSValue() { + return .gpuBufferBinding(gpuBufferBinding) } - if let radioNodeList: RadioNodeList = value.fromJSValue() { - return .radioNodeList(radioNodeList) + if let gpuExternalTexture: GPUExternalTexture = value.fromJSValue() { + return .gpuExternalTexture(gpuExternalTexture) + } + if let gpuSampler: GPUSampler = value.fromJSValue() { + return .gpuSampler(gpuSampler) + } + if let gpuTextureView: GPUTextureView = value.fromJSValue() { + return .gpuTextureView(gpuTextureView) } return nil } public var jsValue: JSValue { switch self { - case let .element(element): - return element.jsValue - case let .radioNodeList(radioNodeList): - return radioNodeList.jsValue + case let .gpuBufferBinding(gpuBufferBinding): + return gpuBufferBinding.jsValue + case let .gpuExternalTexture(gpuExternalTexture): + return gpuExternalTexture.jsValue + case let .gpuSampler(gpuSampler): + return gpuSampler.jsValue + case let .gpuTextureView(gpuTextureView): + return gpuTextureView.jsValue } } } -public protocol Any_Element_or_Text: ConvertibleToJSValue {} -extension Element: Any_Element_or_Text {} -extension Text: Any_Element_or_Text {} +public protocol Any_GPUColor: ConvertibleToJSValue {} +extension GPUColorDict: Any_GPUColor {} +extension Array: Any_GPUColor where Element == Double {} -public enum Element_or_Text: JSValueCompatible, Any_Element_or_Text { - case element(Element) - case text(Text) +public enum GPUColor: JSValueCompatible, Any_GPUColor { + case gpuColorDict(GPUColorDict) + case seq_of_Double([Double]) - var element: Element? { + var gpuColorDict: GPUColorDict? { switch self { - case let .element(element): return element + case let .gpuColorDict(gpuColorDict): return gpuColorDict default: return nil } } - var text: Text? { + var seq_of_Double: [Double]? { switch self { - case let .text(text): return text + case let .seq_of_Double(seq_of_Double): return seq_of_Double default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let element: Element = value.fromJSValue() { - return .element(element) + if let gpuColorDict: GPUColorDict = value.fromJSValue() { + return .gpuColorDict(gpuColorDict) } - if let text: Text = value.fromJSValue() { - return .text(text) + if let seq_of_Double: [Double] = value.fromJSValue() { + return .seq_of_Double(seq_of_Double) } return nil } public var jsValue: JSValue { switch self { - case let .element(element): - return element.jsValue - case let .text(text): - return text.jsValue + case let .gpuColorDict(gpuColorDict): + return gpuColorDict.jsValue + case let .seq_of_Double(seq_of_Double): + return seq_of_Double.jsValue } } } -public protocol Any_Event_or_String: ConvertibleToJSValue {} -extension Event: Any_Event_or_String {} -extension String: Any_Event_or_String {} +public protocol Any_GPUError: ConvertibleToJSValue {} +extension GPUOutOfMemoryError: Any_GPUError {} +extension GPUValidationError: Any_GPUError {} -public enum Event_or_String: JSValueCompatible, Any_Event_or_String { - case event(Event) - case string(String) +public enum GPUError: JSValueCompatible, Any_GPUError { + case gpuOutOfMemoryError(GPUOutOfMemoryError) + case gpuValidationError(GPUValidationError) - var event: Event? { + var gpuOutOfMemoryError: GPUOutOfMemoryError? { switch self { - case let .event(event): return event + case let .gpuOutOfMemoryError(gpuOutOfMemoryError): return gpuOutOfMemoryError default: return nil } } - var string: String? { + var gpuValidationError: GPUValidationError? { switch self { - case let .string(string): return string + case let .gpuValidationError(gpuValidationError): return gpuValidationError default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let event: Event = value.fromJSValue() { - return .event(event) + if let gpuOutOfMemoryError: GPUOutOfMemoryError = value.fromJSValue() { + return .gpuOutOfMemoryError(gpuOutOfMemoryError) } - if let string: String = value.fromJSValue() { - return .string(string) + if let gpuValidationError: GPUValidationError = value.fromJSValue() { + return .gpuValidationError(gpuValidationError) } return nil } public var jsValue: JSValue { switch self { - case let .event(event): - return event.jsValue - case let .string(string): - return string.jsValue + case let .gpuOutOfMemoryError(gpuOutOfMemoryError): + return gpuOutOfMemoryError.jsValue + case let .gpuValidationError(gpuValidationError): + return gpuValidationError.jsValue } } } -public protocol Any_File_or_FormData_or_String: ConvertibleToJSValue {} -extension File: Any_File_or_FormData_or_String {} -extension FormData: Any_File_or_FormData_or_String {} -extension String: Any_File_or_FormData_or_String {} - -public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_or_String { - case file(File) - case formData(FormData) - case string(String) +public protocol Any_GPUExtent3D: ConvertibleToJSValue {} +extension GPUExtent3DDict: Any_GPUExtent3D {} +extension Array: Any_GPUExtent3D where Element == GPUIntegerCoordinate {} - var file: File? { - switch self { - case let .file(file): return file - default: return nil - } - } +public enum GPUExtent3D: JSValueCompatible, Any_GPUExtent3D { + case gpuExtent3DDict(GPUExtent3DDict) + case seq_of_GPUIntegerCoordinate([GPUIntegerCoordinate]) - var formData: FormData? { + var gpuExtent3DDict: GPUExtent3DDict? { switch self { - case let .formData(formData): return formData + case let .gpuExtent3DDict(gpuExtent3DDict): return gpuExtent3DDict default: return nil } } - var string: String? { + var seq_of_GPUIntegerCoordinate: [GPUIntegerCoordinate]? { switch self { - case let .string(string): return string + case let .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate): return seq_of_GPUIntegerCoordinate default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) - } - if let formData: FormData = value.fromJSValue() { - return .formData(formData) + if let gpuExtent3DDict: GPUExtent3DDict = value.fromJSValue() { + return .gpuExtent3DDict(gpuExtent3DDict) } - if let string: String = value.fromJSValue() { - return .string(string) + if let seq_of_GPUIntegerCoordinate: [GPUIntegerCoordinate] = value.fromJSValue() { + return .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate) } return nil } public var jsValue: JSValue { switch self { - case let .file(file): - return file.jsValue - case let .formData(formData): - return formData.jsValue - case let .string(string): - return string.jsValue + case let .gpuExtent3DDict(gpuExtent3DDict): + return gpuExtent3DDict.jsValue + case let .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate): + return seq_of_GPUIntegerCoordinate.jsValue } } } -public protocol Any_Float32List: ConvertibleToJSValue {} -extension Float32Array: Any_Float32List {} -extension Array: Any_Float32List where Element == GLfloat {} +public protocol Any_GPUOrigin2D: ConvertibleToJSValue {} +extension GPUOrigin2DDict: Any_GPUOrigin2D {} +extension Array: Any_GPUOrigin2D where Element == GPUIntegerCoordinate {} -public enum Float32List: JSValueCompatible, Any_Float32List { - case float32Array(Float32Array) - case seq_of_GLfloat([GLfloat]) +public enum GPUOrigin2D: JSValueCompatible, Any_GPUOrigin2D { + case gpuOrigin2DDict(GPUOrigin2DDict) + case seq_of_GPUIntegerCoordinate([GPUIntegerCoordinate]) - var float32Array: Float32Array? { + var gpuOrigin2DDict: GPUOrigin2DDict? { switch self { - case let .float32Array(float32Array): return float32Array + case let .gpuOrigin2DDict(gpuOrigin2DDict): return gpuOrigin2DDict default: return nil } } - var seq_of_GLfloat: [GLfloat]? { + var seq_of_GPUIntegerCoordinate: [GPUIntegerCoordinate]? { switch self { - case let .seq_of_GLfloat(seq_of_GLfloat): return seq_of_GLfloat + case let .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate): return seq_of_GPUIntegerCoordinate default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let float32Array: Float32Array = value.fromJSValue() { - return .float32Array(float32Array) + if let gpuOrigin2DDict: GPUOrigin2DDict = value.fromJSValue() { + return .gpuOrigin2DDict(gpuOrigin2DDict) } - if let seq_of_GLfloat: [GLfloat] = value.fromJSValue() { - return .seq_of_GLfloat(seq_of_GLfloat) + if let seq_of_GPUIntegerCoordinate: [GPUIntegerCoordinate] = value.fromJSValue() { + return .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate) } return nil } public var jsValue: JSValue { switch self { - case let .float32Array(float32Array): - return float32Array.jsValue - case let .seq_of_GLfloat(seq_of_GLfloat): - return seq_of_GLfloat.jsValue + case let .gpuOrigin2DDict(gpuOrigin2DDict): + return gpuOrigin2DDict.jsValue + case let .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate): + return seq_of_GPUIntegerCoordinate.jsValue } } } -public protocol Any_FormDataEntryValue: ConvertibleToJSValue {} -extension File: Any_FormDataEntryValue {} -extension String: Any_FormDataEntryValue {} +public protocol Any_GPUOrigin3D: ConvertibleToJSValue {} +extension GPUOrigin3DDict: Any_GPUOrigin3D {} +extension Array: Any_GPUOrigin3D where Element == GPUIntegerCoordinate {} -public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { - case file(File) - case string(String) +public enum GPUOrigin3D: JSValueCompatible, Any_GPUOrigin3D { + case gpuOrigin3DDict(GPUOrigin3DDict) + case seq_of_GPUIntegerCoordinate([GPUIntegerCoordinate]) - var file: File? { + var gpuOrigin3DDict: GPUOrigin3DDict? { switch self { - case let .file(file): return file + case let .gpuOrigin3DDict(gpuOrigin3DDict): return gpuOrigin3DDict default: return nil } } - var string: String? { + var seq_of_GPUIntegerCoordinate: [GPUIntegerCoordinate]? { switch self { - case let .string(string): return string + case let .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate): return seq_of_GPUIntegerCoordinate default: return nil } } public static func construct(from value: JSValue) -> Self? { - if let file: File = value.fromJSValue() { - return .file(file) + if let gpuOrigin3DDict: GPUOrigin3DDict = value.fromJSValue() { + return .gpuOrigin3DDict(gpuOrigin3DDict) } - if let string: String = value.fromJSValue() { - return .string(string) + if let seq_of_GPUIntegerCoordinate: [GPUIntegerCoordinate] = value.fromJSValue() { + return .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate) } return nil } public var jsValue: JSValue { switch self { - case let .file(file): - return file.jsValue - case let .string(string): - return string.jsValue + case let .gpuOrigin3DDict(gpuOrigin3DDict): + return gpuOrigin3DDict.jsValue + case let .seq_of_GPUIntegerCoordinate(seq_of_GPUIntegerCoordinate): + return seq_of_GPUIntegerCoordinate.jsValue } } } @@ -27702,6 +31604,62 @@ public enum GeometryNode: JSValueCompatible, Any_GeometryNode { } } +public protocol Any_HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas: ConvertibleToJSValue {} +extension HTMLCanvasElement: Any_HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas {} +extension ImageBitmap: Any_HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas {} +extension OffscreenCanvas: Any_HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas {} + +public enum HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas: JSValueCompatible, Any_HTMLCanvasElement_or_ImageBitmap_or_OffscreenCanvas { + case htmlCanvasElement(HTMLCanvasElement) + case imageBitmap(ImageBitmap) + case offscreenCanvas(OffscreenCanvas) + + var htmlCanvasElement: HTMLCanvasElement? { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): return htmlCanvasElement + default: return nil + } + } + + var imageBitmap: ImageBitmap? { + switch self { + case let .imageBitmap(imageBitmap): return imageBitmap + default: return nil + } + } + + var offscreenCanvas: OffscreenCanvas? { + switch self { + case let .offscreenCanvas(offscreenCanvas): return offscreenCanvas + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let htmlCanvasElement: HTMLCanvasElement = value.fromJSValue() { + return .htmlCanvasElement(htmlCanvasElement) + } + if let imageBitmap: ImageBitmap = value.fromJSValue() { + return .imageBitmap(imageBitmap) + } + if let offscreenCanvas: OffscreenCanvas = value.fromJSValue() { + return .offscreenCanvas(offscreenCanvas) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .htmlCanvasElement(htmlCanvasElement): + return htmlCanvasElement.jsValue + case let .imageBitmap(imageBitmap): + return imageBitmap.jsValue + case let .offscreenCanvas(offscreenCanvas): + return offscreenCanvas.jsValue + } + } +} + public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} @@ -28108,6 +32066,90 @@ public enum Node_or_String: JSValueCompatible, Any_Node_or_String { } } +public protocol Any_OffscreenRenderingContext: ConvertibleToJSValue {} +extension GPUCanvasContext: Any_OffscreenRenderingContext {} +extension ImageBitmapRenderingContext: Any_OffscreenRenderingContext {} +extension OffscreenCanvasRenderingContext2D: Any_OffscreenRenderingContext {} +extension WebGL2RenderingContext: Any_OffscreenRenderingContext {} +extension WebGLRenderingContext: Any_OffscreenRenderingContext {} + +public enum OffscreenRenderingContext: JSValueCompatible, Any_OffscreenRenderingContext { + case gpuCanvasContext(GPUCanvasContext) + case imageBitmapRenderingContext(ImageBitmapRenderingContext) + case offscreenCanvasRenderingContext2D(OffscreenCanvasRenderingContext2D) + case webGL2RenderingContext(WebGL2RenderingContext) + case webGLRenderingContext(WebGLRenderingContext) + + var gpuCanvasContext: GPUCanvasContext? { + switch self { + case let .gpuCanvasContext(gpuCanvasContext): return gpuCanvasContext + default: return nil + } + } + + var imageBitmapRenderingContext: ImageBitmapRenderingContext? { + switch self { + case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext + default: return nil + } + } + + var offscreenCanvasRenderingContext2D: OffscreenCanvasRenderingContext2D? { + switch self { + case let .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D): return offscreenCanvasRenderingContext2D + default: return nil + } + } + + var webGL2RenderingContext: WebGL2RenderingContext? { + switch self { + case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext + default: return nil + } + } + + var webGLRenderingContext: WebGLRenderingContext? { + switch self { + case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let gpuCanvasContext: GPUCanvasContext = value.fromJSValue() { + return .gpuCanvasContext(gpuCanvasContext) + } + if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { + return .imageBitmapRenderingContext(imageBitmapRenderingContext) + } + if let offscreenCanvasRenderingContext2D: OffscreenCanvasRenderingContext2D = value.fromJSValue() { + return .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D) + } + if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { + return .webGL2RenderingContext(webGL2RenderingContext) + } + if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { + return .webGLRenderingContext(webGLRenderingContext) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .gpuCanvasContext(gpuCanvasContext): + return gpuCanvasContext.jsValue + case let .imageBitmapRenderingContext(imageBitmapRenderingContext): + return imageBitmapRenderingContext.jsValue + case let .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D): + return offscreenCanvasRenderingContext2D.jsValue + case let .webGL2RenderingContext(webGL2RenderingContext): + return webGL2RenderingContext.jsValue + case let .webGLRenderingContext(webGLRenderingContext): + return webGLRenderingContext.jsValue + } + } +} + public protocol Any_Path2D_or_String: ConvertibleToJSValue {} extension Path2D: Any_Path2D_or_String {} extension String: Any_Path2D_or_String {} @@ -28234,6 +32276,90 @@ public enum ReadableStreamReader: JSValueCompatible, Any_ReadableStreamReader { } } +public protocol Any_RenderingContext: ConvertibleToJSValue {} +extension CanvasRenderingContext2D: Any_RenderingContext {} +extension GPUCanvasContext: Any_RenderingContext {} +extension ImageBitmapRenderingContext: Any_RenderingContext {} +extension WebGL2RenderingContext: Any_RenderingContext {} +extension WebGLRenderingContext: Any_RenderingContext {} + +public enum RenderingContext: JSValueCompatible, Any_RenderingContext { + case canvasRenderingContext2D(CanvasRenderingContext2D) + case gpuCanvasContext(GPUCanvasContext) + case imageBitmapRenderingContext(ImageBitmapRenderingContext) + case webGL2RenderingContext(WebGL2RenderingContext) + case webGLRenderingContext(WebGLRenderingContext) + + var canvasRenderingContext2D: CanvasRenderingContext2D? { + switch self { + case let .canvasRenderingContext2D(canvasRenderingContext2D): return canvasRenderingContext2D + default: return nil + } + } + + var gpuCanvasContext: GPUCanvasContext? { + switch self { + case let .gpuCanvasContext(gpuCanvasContext): return gpuCanvasContext + default: return nil + } + } + + var imageBitmapRenderingContext: ImageBitmapRenderingContext? { + switch self { + case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext + default: return nil + } + } + + var webGL2RenderingContext: WebGL2RenderingContext? { + switch self { + case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext + default: return nil + } + } + + var webGLRenderingContext: WebGLRenderingContext? { + switch self { + case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let canvasRenderingContext2D: CanvasRenderingContext2D = value.fromJSValue() { + return .canvasRenderingContext2D(canvasRenderingContext2D) + } + if let gpuCanvasContext: GPUCanvasContext = value.fromJSValue() { + return .gpuCanvasContext(gpuCanvasContext) + } + if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { + return .imageBitmapRenderingContext(imageBitmapRenderingContext) + } + if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { + return .webGL2RenderingContext(webGL2RenderingContext) + } + if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { + return .webGLRenderingContext(webGLRenderingContext) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .canvasRenderingContext2D(canvasRenderingContext2D): + return canvasRenderingContext2D.jsValue + case let .gpuCanvasContext(gpuCanvasContext): + return gpuCanvasContext.jsValue + case let .imageBitmapRenderingContext(imageBitmapRenderingContext): + return imageBitmapRenderingContext.jsValue + case let .webGL2RenderingContext(webGL2RenderingContext): + return webGL2RenderingContext.jsValue + case let .webGLRenderingContext(webGLRenderingContext): + return webGLRenderingContext.jsValue + } + } +} + public protocol Any_RequestInfo: ConvertibleToJSValue {} extension Request: Any_RequestInfo {} extension String: Any_RequestInfo {} diff --git a/Sources/DOMKit/OffscreenRenderingContext.swift b/Sources/DOMKit/OffscreenRenderingContext.swift deleted file mode 100644 index 12bcb462..00000000 --- a/Sources/DOMKit/OffscreenRenderingContext.swift +++ /dev/null @@ -1,88 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_OffscreenRenderingContext: ConvertibleToJSValue {} -//extension GPUCanvasContext: Any_OffscreenRenderingContext {} -extension ImageBitmapRenderingContext: Any_OffscreenRenderingContext {} -extension OffscreenCanvasRenderingContext2D: Any_OffscreenRenderingContext {} -//extension WebGL2RenderingContext: Any_OffscreenRenderingContext {} -//extension WebGLRenderingContext: Any_OffscreenRenderingContext {} - -public enum OffscreenRenderingContext: JSValueCompatible, Any_OffscreenRenderingContext { -// case gpuCanvasContext(GPUCanvasContext) - case imageBitmapRenderingContext(ImageBitmapRenderingContext) - case offscreenCanvasRenderingContext2D(OffscreenCanvasRenderingContext2D) -// case webGL2RenderingContext(WebGL2RenderingContext) -// case webGLRenderingContext(WebGLRenderingContext) - -// var gpuCanvasContext: GPUCanvasContext? { -// switch self { -// case let .gpuCanvasContext(gpuCanvasContext): return gpuCanvasContext -// default: return nil -// } -// } - - var imageBitmapRenderingContext: ImageBitmapRenderingContext? { - switch self { - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext - default: return nil - } - } - - var offscreenCanvasRenderingContext2D: OffscreenCanvasRenderingContext2D? { - switch self { - case let .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D): return offscreenCanvasRenderingContext2D - default: return nil - } - } - -// var webGL2RenderingContext: WebGL2RenderingContext? { -// switch self { -// case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext -// default: return nil -// } -// } -// -// var webGLRenderingContext: WebGLRenderingContext? { -// switch self { -// case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext -// default: return nil -// } -// } - - public static func construct(from value: JSValue) -> Self? { -// if let gpuCanvasContext: GPUCanvasContext = value.fromJSValue() { -// return .gpuCanvasContext(gpuCanvasContext) -// } - if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { - return .imageBitmapRenderingContext(imageBitmapRenderingContext) - } - if let offscreenCanvasRenderingContext2D: OffscreenCanvasRenderingContext2D = value.fromJSValue() { - return .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D) - } -// if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { -// return .webGL2RenderingContext(webGL2RenderingContext) -// } -// if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { -// return .webGLRenderingContext(webGLRenderingContext) -// } - return nil - } - - public var jsValue: JSValue { - switch self { -// case let .gpuCanvasContext(gpuCanvasContext): -// return gpuCanvasContext.jsValue - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): - return imageBitmapRenderingContext.jsValue - case let .offscreenCanvasRenderingContext2D(offscreenCanvasRenderingContext2D): - return offscreenCanvasRenderingContext2D.jsValue -// case let .webGL2RenderingContext(webGL2RenderingContext): -// return webGL2RenderingContext.jsValue -// case let .webGLRenderingContext(webGLRenderingContext): -// return webGLRenderingContext.jsValue - } - } -} diff --git a/Sources/DOMKit/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift deleted file mode 100644 index 6e493665..00000000 --- a/Sources/DOMKit/RenderingContext.swift +++ /dev/null @@ -1,88 +0,0 @@ -// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! - -import JavaScriptEventLoop -import JavaScriptKit - -public protocol Any_RenderingContext: ConvertibleToJSValue {} -extension CanvasRenderingContext2D: Any_RenderingContext {} -// extension GPUCanvasContext: Any_RenderingContext {} -extension ImageBitmapRenderingContext: Any_RenderingContext {} -extension WebGL2RenderingContext: Any_RenderingContext {} -extension WebGLRenderingContext: Any_RenderingContext {} - -public enum RenderingContext: JSValueCompatible, Any_RenderingContext { - case canvasRenderingContext2D(CanvasRenderingContext2D) -// case gpuCanvasContext(GPUCanvasContext) - case imageBitmapRenderingContext(ImageBitmapRenderingContext) - case webGL2RenderingContext(WebGL2RenderingContext) - case webGLRenderingContext(WebGLRenderingContext) - - var canvasRenderingContext2D: CanvasRenderingContext2D? { - switch self { - case let .canvasRenderingContext2D(canvasRenderingContext2D): return canvasRenderingContext2D - default: return nil - } - } - -// var gpuCanvasContext: GPUCanvasContext? { -// switch self { -// case let .gpuCanvasContext(gpuCanvasContext): return gpuCanvasContext -// default: return nil -// } -// } - - public var imageBitmapRenderingContext: ImageBitmapRenderingContext? { - switch self { - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext - default: return nil - } - } - - public var webGL2RenderingContext: WebGL2RenderingContext? { - switch self { - case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext - default: return nil - } - } - - public var webGLRenderingContext: WebGLRenderingContext? { - switch self { - case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext - default: return nil - } - } - - public static func construct(from value: JSValue) -> Self? { - if let canvasRenderingContext2D: CanvasRenderingContext2D = value.fromJSValue() { - return .canvasRenderingContext2D(canvasRenderingContext2D) - } -// if let gpuCanvasContext: GPUCanvasContext = value.fromJSValue() { -// return .gpuCanvasContext(gpuCanvasContext) -// } - if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { - return .imageBitmapRenderingContext(imageBitmapRenderingContext) - } - if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { - return .webGL2RenderingContext(webGL2RenderingContext) - } - if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { - return .webGLRenderingContext(webGLRenderingContext) - } - return nil - } - - public var jsValue: JSValue { - switch self { - case let .canvasRenderingContext2D(canvasRenderingContext2D): - return canvasRenderingContext2D.jsValue -// case let .gpuCanvasContext(gpuCanvasContext): -// return gpuCanvasContext.jsValue - case let .imageBitmapRenderingContext(imageBitmapRenderingContext): - return imageBitmapRenderingContext.jsValue - case let .webGL2RenderingContext(webGL2RenderingContext): - return webGL2RenderingContext.jsValue - case let .webGLRenderingContext(webGLRenderingContext): - return webGLRenderingContext.jsValue - } - } -} diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/DOMKitDemo/WebGLDemo.swift index 290e1fc0..dfd80905 100644 --- a/Sources/DOMKitDemo/WebGLDemo.swift +++ b/Sources/DOMKitDemo/WebGLDemo.swift @@ -117,7 +117,7 @@ func runWebGLDemo() { // Get A WebGL context let canvas = HTMLCanvasElement(from: document.createElement(localName: "canvas"))! _ = document.body?.appendChild(node: canvas) - let context = canvas.getContext(contextId: "webgl2")!.webGL2RenderingContext! + let context = WebGL2RenderingContext.construct(from: canvas.getContext(contextId: "webgl2")!.jsValue)! // create GLSL shaders, upload the GLSL source, compile the shaders guard diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index d56c79ee..69d1cb11 100644 --- a/Sources/WebIDLToSwift/IDLBuilder.swift +++ b/Sources/WebIDLToSwift/IDLBuilder.swift @@ -18,7 +18,6 @@ enum IDLBuilder { "CSSColorValue_or_CSSStyleValue", // need types from specs not yet included "ShadowAnimation", "MediaProvider", "Blob_or_MediaSource", - "OffscreenRenderingContext", "RenderingContext", "HTMLOrSVGImageElement", "HTMLOrSVGScriptElement", "BodyInit", // implemented manually // ArrayBufferView diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 9e188430..3dfec331 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -34,6 +34,7 @@ console.log( "webcodecs", "webgl1", "webgl2", + "webgpu", ].map((key) => parsedFiles[key]), null, 2 From 85c3163beb46091c589520ba0e78e2868bfe79a9 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 21:09:29 +0100 Subject: [PATCH 18/18] Clean up a few files --- Package.resolved | 2 +- Sources/WebIDL/Declaration.swift | 2 +- parse-idl/parse-all.js | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Package.resolved b/Package.resolved index 60906fdc..7376f3c6 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,7 +5,7 @@ "package": "JavaScriptKit", "repositoryURL": "https://github.com/swiftwasm/JavaScriptKit.git", "state": { - "branch": "main", + "branch": null, "revision": "95d0c4cd78b48ffc7e19c618d57c3244917be09a", "version": null } diff --git a/Sources/WebIDL/Declaration.swift b/Sources/WebIDL/Declaration.swift index 7b7ced1a..d03d8c81 100644 --- a/Sources/WebIDL/Declaration.swift +++ b/Sources/WebIDL/Declaration.swift @@ -1,5 +1,5 @@ /// https://github.com/w3c/webidl2.js#iterable-async-iterable-maplike-and-setlike-declarations -public protocol IDLDeclaration: IDLNode, IDLInterfaceMember { +public protocol IDLDeclaration: IDLInterfaceMember { var idlType: [IDLType] { get } var arguments: [IDLArgument] { get } } diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 3dfec331..fc813f1d 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -29,8 +29,6 @@ console.log( "webaudio", "mediacapture-streams", "mediastream-recording", - "css-pseudo", - "cssom-view", "webcodecs", "webgl1", "webgl2",