From 0b73f1b9376b7339377cbd738a9e06131e462ab3 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:07:16 +0100 Subject: [PATCH 01/15] 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 38dec9631c80dc13143bae6202524fe00bfde7f8 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:11:45 +0100 Subject: [PATCH 02/15] 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 9fdd6c32cbde8d64f8bd414fb2611a9448684f4b Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:07:39 +0100 Subject: [PATCH 03/15] 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 4cbf17029c1551adc4e2de7bd9d253997bb14b44 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:15:27 +0100 Subject: [PATCH 04/15] 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 39c963f30c6faf3e32615270c22266e8965dff8a Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:11:23 +0100 Subject: [PATCH 05/15] 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 030f6f03aef56396ebc1514d3e9bfb9f04c7987a Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 18:05:58 +0100 Subject: [PATCH 06/15] 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 0fb646f023304d20288aff2cea54b6ed3cc7004b Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:07:16 +0100 Subject: [PATCH 07/15] 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 4c7527d7ec1995d86203e8b0a14fc6dd9ae8026e Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:15:27 +0100 Subject: [PATCH 08/15] 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 d043901bd3a9835d453107d87a4c2eeec59d3276 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:19:04 +0100 Subject: [PATCH 09/15] 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 5386e4ad6c2e1174bc895ec3e8d72fcce56db792 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 19:35:13 +0100 Subject: [PATCH 10/15] Add WebGL demo to `DOMKitDemo` --- 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 +++++ parse-idl/parse-all.js | 2 + 59 files changed, 2087 insertions(+) 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/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/parse-idl/parse-all.js b/parse-idl/parse-all.js index fc813f1d..3dfec331 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 bc4d279fcfada8c40120c2646b94e866fd8c201a Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 12:41:34 +0100 Subject: [PATCH 11/15] Bump JSKit, fix BigInt support --- 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 + 141 files changed, 1 insertion(+), 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]) - } -} diff --git a/Sources/WebIDLToSwift/IDLBuilder.swift b/Sources/WebIDLToSwift/IDLBuilder.swift index 69d1cb11..0ec86fc2 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 9a0c97b29399b4215532e604083d74a4a1391561 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:08:54 +0100 Subject: [PATCH 12/15] Revert "Bump JSKit, fix BigInt support" This reverts commit f6f0fed2c609dd4f158899ed1139b56e3bee73f2. --- 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 - 141 files changed, 7597 insertions(+), 1 deletion(-) 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/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 0ec86fc2..69d1cb11 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 4e253a072a4324814321659f886d134598c40ec6 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:10:01 +0100 Subject: [PATCH 13/15] 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 e206e3a9b238c48ec216cab306fd10521c2ea53c Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 19:36:16 +0100 Subject: [PATCH 14/15] Rename package to WebAPIKit Resolves #22. --- .github/workflows/test.yml | 4 ++-- LICENSE | 2 +- Package.swift | 20 +++++++++---------- Sources/{DOMKit => WebAPIKit}/Generated.swift | 0 .../RotationMatrixType.swift | 0 Sources/{DOMKit => WebAPIKit}/Support.swift | 0 .../WebGLDemo.swift | 4 ++-- .../{DOMKitDemo => WebAPIKitDemo}/main.swift | 2 +- Sources/WebIDLToSwift/main.swift | 5 +++-- .../WebAPIKitTests.swift} | 4 ++-- 10 files changed, 21 insertions(+), 20 deletions(-) rename Sources/{DOMKit => WebAPIKit}/Generated.swift (100%) rename Sources/{DOMKit => WebAPIKit}/RotationMatrixType.swift (100%) rename Sources/{DOMKit => WebAPIKit}/Support.swift (100%) rename Sources/{DOMKitDemo => WebAPIKitDemo}/WebGLDemo.swift (98%) rename Sources/{DOMKitDemo => WebAPIKitDemo}/main.swift (94%) rename Tests/{DOMKitTests/DOMKitTests.swift => WebAPIKitTests/WebAPIKitTests.swift} (95%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c69c7367..63c5c921 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,10 +16,10 @@ jobs: run: | set -ex sudo xcode-select --switch /Applications/Xcode_13.3.1.app/Contents/Developer/ - + brew install swiftwasm/tap/carton - carton bundle --product DOMKitDemo + carton bundle --product WebAPIKitDemo carton test --environment defaultBrowser env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/LICENSE b/LICENSE index 265a9c65..cdec2db8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 DOMKit contributors +Copyright (c) 2020 WebAPIKit contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Package.swift b/Package.swift index 891b5951..5ad07a0d 100644 --- a/Package.swift +++ b/Package.swift @@ -4,15 +4,15 @@ import PackageDescription let package = Package( - name: "DOMKit", + name: "WebAPIKit", products: [ .executable( - name: "DOMKitDemo", - targets: ["DOMKitDemo"] + name: "WebAPIKitDemo", + targets: ["WebAPIKitDemo"] ), .library( - name: "DOMKit", - targets: ["DOMKit"] + name: "WebAPIKit", + targets: ["WebAPIKit"] ), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), @@ -25,11 +25,11 @@ let package = Package( ], targets: [ .target( - name: "DOMKitDemo", - dependencies: ["DOMKit"] + name: "WebAPIKitDemo", + dependencies: ["WebAPIKit"] ), .target( - name: "DOMKit", + name: "WebAPIKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")] ), // This support library should be moved to JavaScriptKit @@ -43,8 +43,8 @@ let package = Package( dependencies: ["WebIDL"] ), .testTarget( - name: "DOMKitTests", - dependencies: ["DOMKit"] + name: "WebAPIKitTests", + dependencies: ["WebAPIKit"] ), ] ) diff --git a/Sources/DOMKit/Generated.swift b/Sources/WebAPIKit/Generated.swift similarity index 100% rename from Sources/DOMKit/Generated.swift rename to Sources/WebAPIKit/Generated.swift diff --git a/Sources/DOMKit/RotationMatrixType.swift b/Sources/WebAPIKit/RotationMatrixType.swift similarity index 100% rename from Sources/DOMKit/RotationMatrixType.swift rename to Sources/WebAPIKit/RotationMatrixType.swift diff --git a/Sources/DOMKit/Support.swift b/Sources/WebAPIKit/Support.swift similarity index 100% rename from Sources/DOMKit/Support.swift rename to Sources/WebAPIKit/Support.swift diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/WebAPIKitDemo/WebGLDemo.swift similarity index 98% rename from Sources/DOMKitDemo/WebGLDemo.swift rename to Sources/WebAPIKitDemo/WebGLDemo.swift index dfd80905..ad96f9e7 100644 --- a/Sources/DOMKitDemo/WebGLDemo.swift +++ b/Sources/WebAPIKitDemo/WebGLDemo.swift @@ -1,4 +1,4 @@ -// Copyright 2021-2022, GFXFundamentals and DOMKit contributors. +// Copyright 2021-2022, GFXFundamentals and WebAPIKit contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import DOMKit +import WebAPIKit let vertexShaderSource = """ diff --git a/Sources/DOMKitDemo/main.swift b/Sources/WebAPIKitDemo/main.swift similarity index 94% rename from Sources/DOMKitDemo/main.swift rename to Sources/WebAPIKitDemo/main.swift index dfe47211..38f61dd4 100644 --- a/Sources/DOMKitDemo/main.swift +++ b/Sources/WebAPIKitDemo/main.swift @@ -1,5 +1,5 @@ -import DOMKit import JavaScriptKit +import WebAPIKit let document = globalThis.document diff --git a/Sources/WebIDLToSwift/main.swift b/Sources/WebIDLToSwift/main.swift index 1945e0f0..994d6d65 100644 --- a/Sources/WebIDLToSwift/main.swift +++ b/Sources/WebIDLToSwift/main.swift @@ -7,7 +7,7 @@ func main() { do { let startTime = Date() let idl = try IDLParser.parseIDL() - let outputPath = "Sources/DOMKit/Generated.swift" + let outputPath = "Sources/WebAPIKit/Generated.swift" var contents: [SwiftSource] = [] print("Generating bindings...") contents.append(try IDLBuilder.generateIDLBindings(idl: idl)) @@ -19,7 +19,8 @@ func main() { contents.append(try IDLBuilder.generateUnions()) try IDLBuilder.writeFile( path: outputPath, - content: contents.joined(separator: "\n\n").source) + content: contents.joined(separator: "\n\n").source + ) SwiftFormatter.run(source: outputPath) print("Done in \(Int(Date().timeIntervalSince(startTime) * 1000))ms.") diff --git a/Tests/DOMKitTests/DOMKitTests.swift b/Tests/WebAPIKitTests/WebAPIKitTests.swift similarity index 95% rename from Tests/DOMKitTests/DOMKitTests.swift rename to Tests/WebAPIKitTests/WebAPIKitTests.swift index 16cf7424..ec936d38 100644 --- a/Tests/DOMKitTests/DOMKitTests.swift +++ b/Tests/WebAPIKitTests/WebAPIKitTests.swift @@ -1,9 +1,9 @@ -import DOMKit import Foundation import JavaScriptKit +import WebAPIKit import XCTest -final class DOMKitTests: XCTestCase { +final class WebAPIKitTests: XCTestCase { func testQuerySelector() { let document = globalThis.document let button = document.createElement(localName: "button") From cc9b069485723b912598b400aecfa6a8f739565b Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Wed, 4 May 2022 10:23:26 +0100 Subject: [PATCH 15/15] Fix merge conflict --- parse-idl/parse-all.js | 2 -- 1 file changed, 2 deletions(-) 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",