From 03bd5466aebfd55511704086ca66ec27236acff9 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 10:59:36 +0100 Subject: [PATCH 01/21] Add `mediacapture-streams` IDL spec and generated code --- Sources/DOMKit/Generated.swift | 1298 ++++++++++++++++++++++++++++++-- parse-idl/parse-all.js | 3 +- 2 files changed, 1238 insertions(+), 63 deletions(-) diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index f2a075f0..907d355b 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -1155,6 +1155,22 @@ public class CacheStorage: JSBridgedClass { } } +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 +} + public enum CanPlayTypeResult: JSString, JSValueCompatible { case _empty = "" case maybe = "maybe" @@ -2222,6 +2238,90 @@ public class ComputedEffectTiming: BridgedDictionary { public var currentIteration: Double? } +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 +} + +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 +} + +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 +} + +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 +} + public class CountQueuingStrategy: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } @@ -3625,6 +3725,22 @@ public class DataTransferItemList: JSBridgedClass { } } +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 +} + public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } @@ -4098,6 +4214,27 @@ public enum DocumentVisibilityState: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } +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 +} + public class DragEvent: MouseEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.DragEvent].function! } @@ -9326,6 +9463,19 @@ public enum ImageSmoothingQuality: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } +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()! + } +} + public class InputEvent: UIEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputEvent].function! } @@ -9651,6 +9801,97 @@ public class Location: JSBridgedClass { public var ancestorOrigins: DOMStringList } +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()! + } +} + +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 } +} + +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()! + } +} + public class MediaError: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaError].function! } @@ -9677,104 +9918,687 @@ public class MediaError: JSBridgedClass { public var message: String } -public class MessageChannel: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MessageChannel].function! } - - public let jsObject: JSObject +public class MediaStream: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } public required init(unsafelyWrapping jsObject: JSObject) { - _port1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port1) - _port2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port2) - self.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: [])) } - @ReadonlyAttribute - public var port1: MessagePort + @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 port2: MessagePort -} + public var id: String -public class MessageEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessageEvent].function! } + @inlinable public func getAudioTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getAudioTracks].function!(this: this, arguments: []).fromJSValue()! + } - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastEventId) - _source = ReadonlyAttribute(jsObject: jsObject, name: Strings.source) - _ports = ReadonlyAttribute(jsObject: jsObject, name: Strings.ports) - super.init(unsafelyWrapping: jsObject) + @inlinable public func getVideoTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getVideoTracks].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + @inlinable public func getTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getTracks].function!(this: this, arguments: []).fromJSValue()! } - @ReadonlyAttribute - public var data: JSValue + @inlinable public func getTrackById(trackId: String) -> MediaStreamTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [trackId.jsValue]).fromJSValue()! + } - @ReadonlyAttribute - public var origin: String + @inlinable public func addTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.addTrack].function!(this: this, arguments: [track.jsValue]) + } - @ReadonlyAttribute - public var lastEventId: String + @inlinable public func removeTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.removeTrack].function!(this: this, arguments: [track.jsValue]) + } - @ReadonlyAttribute - public var source: MessageEventSource? + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } @ReadonlyAttribute - public var ports: [MessagePort] + public var active: Bool - @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { - let _arg0 = type.jsValue - let _arg1 = bubbles?.jsValue ?? .undefined - let _arg2 = cancelable?.jsValue ?? .undefined - let _arg3 = data?.jsValue ?? .undefined - let _arg4 = origin?.jsValue ?? .undefined - let _arg5 = lastEventId?.jsValue ?? .undefined - let _arg6 = source?.jsValue ?? .undefined - let _arg7 = ports?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler } -public class MessageEventInit: BridgedDictionary { - public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { +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.data] = data.jsValue - object[Strings.origin] = origin.jsValue - object[Strings.lastEventId] = lastEventId.jsValue - object[Strings.source] = source.jsValue - object[Strings.ports] = ports.jsValue + object[Strings.video] = video.jsValue + object[Strings.audio] = audio.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) - _lastEventId = ReadWriteAttribute(jsObject: object, name: Strings.lastEventId) - _source = ReadWriteAttribute(jsObject: object, name: Strings.source) - _ports = ReadWriteAttribute(jsObject: object, name: Strings.ports) + _video = ReadWriteAttribute(jsObject: object, name: Strings.video) + _audio = ReadWriteAttribute(jsObject: object, name: Strings.audio) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var data: JSValue - - @ReadWriteAttribute - public var origin: String + public var video: Bool_or_MediaTrackConstraints @ReadWriteAttribute - public var lastEventId: String + public var audio: Bool_or_MediaTrackConstraints +} - @ReadWriteAttribute - public var source: MessageEventSource? +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 + } +} + +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 +} + +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 +} + +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 } +} + +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 +} + +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 +} + +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] +} + +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 +} + +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 +} + +public class MessageChannel: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MessageChannel].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _port1 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port1) + _port2 = ReadonlyAttribute(jsObject: jsObject, name: Strings.port2) + self.jsObject = jsObject + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @ReadonlyAttribute + public var port1: MessagePort + + @ReadonlyAttribute + public var port2: MessagePort +} + +public class MessageEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MessageEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _lastEventId = ReadonlyAttribute(jsObject: jsObject, name: Strings.lastEventId) + _source = ReadonlyAttribute(jsObject: jsObject, name: Strings.source) + _ports = ReadonlyAttribute(jsObject: jsObject, name: Strings.ports) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MessageEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: JSValue + + @ReadonlyAttribute + public var origin: String + + @ReadonlyAttribute + public var lastEventId: String + + @ReadonlyAttribute + public var source: MessageEventSource? + + @ReadonlyAttribute + public var ports: [MessagePort] + + @inlinable public func initMessageEvent(type: String, bubbles: Bool? = nil, cancelable: Bool? = nil, data: JSValue? = nil, origin: String? = nil, lastEventId: String? = nil, source: MessageEventSource? = nil, ports: [MessagePort]? = nil) { + let _arg0 = type.jsValue + let _arg1 = bubbles?.jsValue ?? .undefined + let _arg2 = cancelable?.jsValue ?? .undefined + let _arg3 = data?.jsValue ?? .undefined + let _arg4 = origin?.jsValue ?? .undefined + let _arg5 = lastEventId?.jsValue ?? .undefined + let _arg6 = source?.jsValue ?? .undefined + let _arg7 = ports?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.initMessageEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) + } +} + +public class MessageEventInit: BridgedDictionary { + public convenience init(data: JSValue, origin: String, lastEventId: String, source: MessageEventSource?, ports: [MessagePort]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + object[Strings.origin] = origin.jsValue + object[Strings.lastEventId] = lastEventId.jsValue + object[Strings.source] = source.jsValue + object[Strings.ports] = ports.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _origin = ReadWriteAttribute(jsObject: object, name: Strings.origin) + _lastEventId = ReadWriteAttribute(jsObject: object, name: Strings.lastEventId) + _source = ReadWriteAttribute(jsObject: object, name: Strings.source) + _ports = ReadWriteAttribute(jsObject: object, name: Strings.ports) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: JSValue + + @ReadWriteAttribute + public var origin: String + + @ReadWriteAttribute + public var lastEventId: String + + @ReadWriteAttribute + public var source: MessageEventSource? @ReadWriteAttribute public var ports: [MessagePort] @@ -10306,11 +11130,17 @@ public class Navigator: JSBridgedClass, NavigatorID, NavigatorLanguage, Navigato public required init(unsafelyWrapping jsObject: JSObject) { _serviceWorker = ReadonlyAttribute(jsObject: jsObject, name: Strings.serviceWorker) + _mediaDevices = ReadonlyAttribute(jsObject: jsObject, name: Strings.mediaDevices) self.jsObject = jsObject } @ReadonlyAttribute public var serviceWorker: ServiceWorkerContainer + + @ReadonlyAttribute + public var mediaDevices: MediaDevices + + // XXX: member 'getUserMedia' is ignored } public protocol NavigatorConcurrentHardware: JSBridgedClass {} @@ -10787,6 +11617,22 @@ public class OptionalEffectTiming: BridgedDictionary { public var easing: String } +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 +} + public class PageTransitionEvent: Event { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.PageTransitionEvent].function! } @@ -13231,6 +14077,8 @@ public typealias TransformerStartCallback = (TransformStreamDefaultController) - public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise public typealias QueuingStrategySize = (JSValue) -> Double +public typealias NavigatorUserMediaSuccessCallback = (MediaStream) -> Void +public typealias NavigatorUserMediaErrorCallback = (DOMException) -> Void public class UIEvent: Event { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } @@ -13286,6 +14134,27 @@ public class UIEventInit: BridgedDictionary { public var which: UInt32 } +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 +} + public class URL: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } @@ -13608,6 +14477,44 @@ public class ValidityStateFlags: BridgedDictionary { public var customError: Bool } +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 } +} + +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 } +} + public class VideoTrack: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } @@ -15430,12 +16337,18 @@ public enum console { @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" @usableFromInline static let ImageData: JSString = "ImageData" + @usableFromInline static let InputDeviceInfo: JSString = "InputDeviceInfo" @usableFromInline static let InputEvent: JSString = "InputEvent" @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" @usableFromInline static let KeyboardEvent: JSString = "KeyboardEvent" @usableFromInline static let KeyframeEffect: JSString = "KeyframeEffect" @usableFromInline static let Location: JSString = "Location" + @usableFromInline static let MediaDeviceInfo: JSString = "MediaDeviceInfo" + @usableFromInline static let MediaDevices: JSString = "MediaDevices" @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MediaStream: JSString = "MediaStream" + @usableFromInline static let MediaStreamTrack: JSString = "MediaStreamTrack" + @usableFromInline static let MediaStreamTrackEvent: JSString = "MediaStreamTrackEvent" @usableFromInline static let MessageChannel: JSString = "MessageChannel" @usableFromInline static let MessageEvent: JSString = "MessageEvent" @usableFromInline static let MessagePort: JSString = "MessagePort" @@ -15454,6 +16367,7 @@ public enum console { @usableFromInline static let Object: JSString = "Object" @usableFromInline static let OffscreenCanvas: JSString = "OffscreenCanvas" @usableFromInline static let OffscreenCanvasRenderingContext2D: JSString = "OffscreenCanvasRenderingContext2D" + @usableFromInline static let OverconstrainedError: JSString = "OverconstrainedError" @usableFromInline static let PageTransitionEvent: JSString = "PageTransitionEvent" @usableFromInline static let Path2D: JSString = "Path2D" @usableFromInline static let Performance: JSString = "Performance" @@ -15538,8 +16452,10 @@ public enum console { @usableFromInline static let addModule: JSString = "addModule" @usableFromInline static let addPath: JSString = "addPath" @usableFromInline static let addTextTrack: JSString = "addTextTrack" + @usableFromInline static let addTrack: JSString = "addTrack" @usableFromInline static let addedNodes: JSString = "addedNodes" @usableFromInline static let adoptNode: JSString = "adoptNode" + @usableFromInline static let advanced: JSString = "advanced" @usableFromInline static let after: JSString = "after" @usableFromInline static let alert: JSString = "alert" @usableFromInline static let align: JSString = "align" @@ -15561,6 +16477,7 @@ public enum console { @usableFromInline static let appendChild: JSString = "appendChild" @usableFromInline static let appendData: JSString = "appendData" @usableFromInline static let applets: JSString = "applets" + @usableFromInline static let applyConstraints: JSString = "applyConstraints" @usableFromInline static let arc: JSString = "arc" @usableFromInline static let arcTo: JSString = "arcTo" @usableFromInline static let archive: JSString = "archive" @@ -15607,6 +16524,7 @@ public enum console { @usableFromInline static let ariaValueText: JSString = "ariaValueText" @usableFromInline static let arrayBuffer: JSString = "arrayBuffer" @usableFromInline static let `as`: JSString = "as" + @usableFromInline static let aspectRatio: JSString = "aspectRatio" @usableFromInline static let assert: JSString = "assert" @usableFromInline static let assign: JSString = "assign" @usableFromInline static let assignedElements: JSString = "assignedElements" @@ -15623,8 +16541,10 @@ public enum console { @usableFromInline static let attributeNamespace: JSString = "attributeNamespace" @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" @usableFromInline static let attributes: JSString = "attributes" + @usableFromInline static let audio: JSString = "audio" @usableFromInline static let audioTracks: JSString = "audioTracks" @usableFromInline static let autoAllocateChunkSize: JSString = "autoAllocateChunkSize" + @usableFromInline static let autoGainControl: JSString = "autoGainControl" @usableFromInline static let autocapitalize: JSString = "autocapitalize" @usableFromInline static let autocomplete: JSString = "autocomplete" @usableFromInline static let autofocus: JSString = "autofocus" @@ -15673,6 +16593,7 @@ public enum console { @usableFromInline static let cells: JSString = "cells" @usableFromInline static let ch: JSString = "ch" @usableFromInline static let chOff: JSString = "chOff" + @usableFromInline static let channelCount: JSString = "channelCount" @usableFromInline static let charCode: JSString = "charCode" @usableFromInline static let characterData: JSString = "characterData" @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" @@ -15733,6 +16654,7 @@ public enum console { @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let confirm: JSString = "confirm" @usableFromInline static let console: JSString = "console" + @usableFromInline static let constraint: JSString = "constraint" @usableFromInline static let contains: JSString = "contains" @usableFromInline static let content: JSString = "content" @usableFromInline static let contentDocument: JSString = "contentDocument" @@ -15826,6 +16748,7 @@ public enum console { @usableFromInline static let desynchronized: JSString = "desynchronized" @usableFromInline static let detach: JSString = "detach" @usableFromInline static let detail: JSString = "detail" + @usableFromInline static let deviceId: JSString = "deviceId" @usableFromInline static let dir: JSString = "dir" @usableFromInline static let dirName: JSString = "dirName" @usableFromInline static let direction: JSString = "direction" @@ -15848,6 +16771,7 @@ public enum console { @usableFromInline static let duration: JSString = "duration" @usableFromInline static let e: JSString = "e" @usableFromInline static let easing: JSString = "easing" + @usableFromInline static let echoCancellation: JSString = "echoCancellation" @usableFromInline static let effect: JSString = "effect" @usableFromInline static let effectAllowed: JSString = "effectAllowed" @usableFromInline static let elements: JSString = "elements" @@ -15869,16 +16793,19 @@ public enum console { @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @usableFromInline static let enterKeyHint: JSString = "enterKeyHint" + @usableFromInline static let enumerateDevices: JSString = "enumerateDevices" @usableFromInline static let error: JSString = "error" @usableFromInline static let evaluate: JSString = "evaluate" @usableFromInline static let event: JSString = "event" @usableFromInline static let eventPhase: JSString = "eventPhase" + @usableFromInline static let exact: JSString = "exact" @usableFromInline static let execCommand: JSString = "execCommand" @usableFromInline static let extends: JSString = "extends" @usableFromInline static let external: JSString = "external" @usableFromInline static let extractContents: JSString = "extractContents" @usableFromInline static let f: JSString = "f" @usableFromInline static let face: JSString = "face" + @usableFromInline static let facingMode: JSString = "facingMode" @usableFromInline static let fastSeek: JSString = "fastSeek" @usableFromInline static let fetch: JSString = "fetch" @usableFromInline static let fgColor: JSString = "fgColor" @@ -15916,6 +16843,7 @@ public enum console { @usableFromInline static let frame: JSString = "frame" @usableFromInline static let frameBorder: JSString = "frameBorder" @usableFromInline static let frameElement: JSString = "frameElement" + @usableFromInline static let frameRate: JSString = "frameRate" @usableFromInline static let frames: JSString = "frames" @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" @@ -15933,8 +16861,11 @@ public enum console { @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" + @usableFromInline static let getAudioTracks: JSString = "getAudioTracks" @usableFromInline static let getBounds: JSString = "getBounds" + @usableFromInline static let getCapabilities: JSString = "getCapabilities" @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" + @usableFromInline static let getConstraints: JSString = "getConstraints" @usableFromInline static let getContext: JSString = "getContext" @usableFromInline static let getContextAttributes: JSString = "getContextAttributes" @usableFromInline static let getCueById: JSString = "getCueById" @@ -15956,11 +16887,16 @@ public enum console { @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" @usableFromInline static let getRootNode: JSString = "getRootNode" @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getSettings: JSString = "getSettings" @usableFromInline static let getStartDate: JSString = "getStartDate" @usableFromInline static let getState: JSString = "getState" + @usableFromInline static let getSupportedConstraints: JSString = "getSupportedConstraints" @usableFromInline static let getTiming: JSString = "getTiming" @usableFromInline static let getTrackById: JSString = "getTrackById" + @usableFromInline static let getTracks: JSString = "getTracks" @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getUserMedia: JSString = "getUserMedia" + @usableFromInline static let getVideoTracks: JSString = "getVideoTracks" @usableFromInline static let getWriter: JSString = "getWriter" @usableFromInline static let globalAlpha: JSString = "globalAlpha" @usableFromInline static let globalCompositeOperation: JSString = "globalCompositeOperation" @@ -15968,6 +16904,7 @@ public enum console { @usableFromInline static let group: JSString = "group" @usableFromInline static let groupCollapsed: JSString = "groupCollapsed" @usableFromInline static let groupEnd: JSString = "groupEnd" + @usableFromInline static let groupId: JSString = "groupId" @usableFromInline static let handled: JSString = "handled" @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" @@ -15995,6 +16932,7 @@ public enum console { @usableFromInline static let htmlFor: JSString = "htmlFor" @usableFromInline static let httpEquiv: JSString = "httpEquiv" @usableFromInline static let id: JSString = "id" + @usableFromInline static let ideal: JSString = "ideal" @usableFromInline static let ideographicBaseline: JSString = "ideographicBaseline" @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" @@ -16079,6 +17017,7 @@ public enum console { @usableFromInline static let lastElementChild: JSString = "lastElementChild" @usableFromInline static let lastEventId: JSString = "lastEventId" @usableFromInline static let lastModified: JSString = "lastModified" + @usableFromInline static let latency: JSString = "latency" @usableFromInline static let left: JSString = "left" @usableFromInline static let length: JSString = "length" @usableFromInline static let lengthComputable: JSString = "lengthComputable" @@ -16134,6 +17073,7 @@ public enum console { @usableFromInline static let maxLength: JSString = "maxLength" @usableFromInline static let measureText: JSString = "measureText" @usableFromInline static let media: JSString = "media" + @usableFromInline static let mediaDevices: JSString = "mediaDevices" @usableFromInline static let menubar: JSString = "menubar" @usableFromInline static let message: JSString = "message" @usableFromInline static let metaKey: JSString = "metaKey" @@ -16180,6 +17120,7 @@ public enum console { @usableFromInline static let nodeName: JSString = "nodeName" @usableFromInline static let nodeType: JSString = "nodeType" @usableFromInline static let nodeValue: JSString = "nodeValue" + @usableFromInline static let noiseSuppression: JSString = "noiseSuppression" @usableFromInline static let nonce: JSString = "nonce" @usableFromInline static let normalize: JSString = "normalize" @usableFromInline static let now: JSString = "now" @@ -16212,6 +17153,7 @@ public enum console { @usableFromInline static let oncuechange: JSString = "oncuechange" @usableFromInline static let oncut: JSString = "oncut" @usableFromInline static let ondblclick: JSString = "ondblclick" + @usableFromInline static let ondevicechange: JSString = "ondevicechange" @usableFromInline static let ondrag: JSString = "ondrag" @usableFromInline static let ondragend: JSString = "ondragend" @usableFromInline static let ondragenter: JSString = "ondragenter" @@ -16249,6 +17191,7 @@ public enum console { @usableFromInline static let onmouseout: JSString = "onmouseout" @usableFromInline static let onmouseover: JSString = "onmouseover" @usableFromInline static let onmouseup: JSString = "onmouseup" + @usableFromInline static let onmute: JSString = "onmute" @usableFromInline static let onoffline: JSString = "onoffline" @usableFromInline static let ononline: JSString = "ononline" @usableFromInline static let onopen: JSString = "onopen" @@ -16283,6 +17226,7 @@ public enum console { @usableFromInline static let ontoggle: JSString = "ontoggle" @usableFromInline static let onunhandledrejection: JSString = "onunhandledrejection" @usableFromInline static let onunload: JSString = "onunload" + @usableFromInline static let onunmute: JSString = "onunmute" @usableFromInline static let onupdatefound: JSString = "onupdatefound" @usableFromInline static let onvisibilitychange: JSString = "onvisibilitychange" @usableFromInline static let onvolumechange: JSString = "onvolumechange" @@ -16308,6 +17252,7 @@ public enum console { @usableFromInline static let p2: JSString = "p2" @usableFromInline static let p3: JSString = "p3" @usableFromInline static let p4: JSString = "p4" + @usableFromInline static let panTiltZoom: JSString = "panTiltZoom" @usableFromInline static let parent: JSString = "parent" @usableFromInline static let parentElement: JSString = "parentElement" @usableFromInline static let parentNode: JSString = "parentNode" @@ -16422,6 +17367,7 @@ public enum console { @usableFromInline static let removeNamedItem: JSString = "removeNamedItem" @usableFromInline static let removeNamedItemNS: JSString = "removeNamedItemNS" @usableFromInline static let removeParameter: JSString = "removeParameter" + @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" @usableFromInline static let `repeat`: JSString = "repeat" @usableFromInline static let replace: JSString = "replace" @@ -16439,6 +17385,7 @@ public enum console { @usableFromInline static let reset: JSString = "reset" @usableFromInline static let resetTransform: JSString = "resetTransform" @usableFromInline static let resizeHeight: JSString = "resizeHeight" + @usableFromInline static let resizeMode: JSString = "resizeMode" @usableFromInline static let resizeQuality: JSString = "resizeQuality" @usableFromInline static let resizeWidth: JSString = "resizeWidth" @usableFromInline static let respond: JSString = "respond" @@ -16471,6 +17418,8 @@ public enum console { @usableFromInline static let rowSpan: JSString = "rowSpan" @usableFromInline static let rows: JSString = "rows" @usableFromInline static let rules: JSString = "rules" + @usableFromInline static let sampleRate: JSString = "sampleRate" + @usableFromInline static let sampleSize: JSString = "sampleSize" @usableFromInline static let sandbox: JSString = "sandbox" @usableFromInline static let save: JSString = "save" @usableFromInline static let scale: JSString = "scale" @@ -16684,6 +17633,7 @@ public enum console { @usableFromInline static let vendor: JSString = "vendor" @usableFromInline static let vendorSub: JSString = "vendorSub" @usableFromInline static let version: JSString = "version" + @usableFromInline static let video: JSString = "video" @usableFromInline static let videoHeight: JSString = "videoHeight" @usableFromInline static let videoTracks: JSString = "videoTracks" @usableFromInline static let videoWidth: JSString = "videoWidth" @@ -16871,6 +17821,48 @@ public enum BlobPart: JSValueCompatible, Any_BlobPart { } } +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 + } + } +} + public protocol Any_BufferSource: ConvertibleToJSValue {} extension ArrayBuffer: Any_BufferSource {} extension ArrayBufferView: Any_BufferSource {} @@ -17095,6 +18087,188 @@ public enum CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto: JSValue } } +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 + } + } +} + +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 + } + } +} + +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 + } + } +} + +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 + } + } +} + public protocol Any_DOMPointInit_or_Double: ConvertibleToJSValue {} extension DOMPointInit: Any_DOMPointInit_or_Double {} extension Double: Any_DOMPointInit_or_Double {} diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index a992f772..08b8be31 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -7,6 +7,7 @@ const parsedFiles = await parseAll(); console.log( JSON.stringify( [ + "console", "dom", "fetch", "FileAPI", @@ -22,7 +23,7 @@ console.log( "service-workers", "url", "streams", - "console", + "mediacapture-streams", ].map((key) => parsedFiles[key]), null, 2 From c6fb68d8acd327c8086cc63f4ce029df26b2abcb Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:03:00 +0100 Subject: [PATCH 02/21] Add `mediastream-recording` IDL and generated code This is a requirement for `webgl2`, which I'm going to add in a future PR. --- Sources/DOMKit/Generated.swift | 253 +++++++++++++++++++++++++++++++++ parse-idl/parse-all.js | 1 + 2 files changed, 254 insertions(+) diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index 907d355b..3cfbd4a3 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -760,6 +760,24 @@ public class BeforeUnloadEvent: Event { // XXX: member 'returnValue' is ignored } +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 } +} + public class Blob: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } @@ -813,6 +831,47 @@ public class Blob: JSBridgedClass { } } +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 +} + +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 +} + public class BlobPropertyBag: BridgedDictionary { public convenience init(type: String, endings: EndingType) { let object = JSObject.global[Strings.Object].function!.new() @@ -9918,6 +9977,164 @@ public class MediaError: JSBridgedClass { public var message: String } +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()! + } +} + +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 +} + +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 +} + +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 +} + public class MediaStream: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } @@ -12529,6 +12746,25 @@ public class ReadableWritablePair: BridgedDictionary { public var writable: WritableStream } +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 } +} + public enum ReferrerPolicy: JSString, JSValueCompatible { case _empty = "" case noReferrer = "no-referrer" @@ -16206,6 +16442,7 @@ public enum console { @usableFromInline static let BarProp: JSString = "BarProp" @usableFromInline static let BeforeUnloadEvent: JSString = "BeforeUnloadEvent" @usableFromInline static let Blob: JSString = "Blob" + @usableFromInline static let BlobEvent: JSString = "BlobEvent" @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" @usableFromInline static let CDATASection: JSString = "CDATASection" @@ -16346,6 +16583,8 @@ public enum console { @usableFromInline static let MediaDeviceInfo: JSString = "MediaDeviceInfo" @usableFromInline static let MediaDevices: JSString = "MediaDevices" @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MediaRecorder: JSString = "MediaRecorder" + @usableFromInline static let MediaRecorderErrorEvent: JSString = "MediaRecorderErrorEvent" @usableFromInline static let MediaStream: JSString = "MediaStream" @usableFromInline static let MediaStreamTrack: JSString = "MediaStreamTrack" @usableFromInline static let MediaStreamTrackEvent: JSString = "MediaStreamTrackEvent" @@ -16542,6 +16781,8 @@ public enum console { @usableFromInline static let attributeOldValue: JSString = "attributeOldValue" @usableFromInline static let attributes: JSString = "attributes" @usableFromInline static let audio: JSString = "audio" + @usableFromInline static let audioBitrateMode: JSString = "audioBitrateMode" + @usableFromInline static let audioBitsPerSecond: JSString = "audioBitsPerSecond" @usableFromInline static let audioTracks: JSString = "audioTracks" @usableFromInline static let autoAllocateChunkSize: JSString = "autoAllocateChunkSize" @usableFromInline static let autoGainControl: JSString = "autoGainControl" @@ -16560,6 +16801,7 @@ public enum console { @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" + @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" @usableFromInline static let blob: JSString = "blob" @usableFromInline static let blocking: JSString = "blocking" @usableFromInline static let blur: JSString = "blur" @@ -16996,6 +17238,7 @@ public enum console { @usableFromInline static let isSameNode: JSString = "isSameNode" @usableFromInline static let isSecureContext: JSString = "isSecureContext" @usableFromInline static let isTrusted: JSString = "isTrusted" + @usableFromInline static let isTypeSupported: JSString = "isTypeSupported" @usableFromInline static let item: JSString = "item" @usableFromInline static let items: JSString = "items" @usableFromInline static let iterateNext: JSString = "iterateNext" @@ -17078,6 +17321,7 @@ public enum console { @usableFromInline static let message: JSString = "message" @usableFromInline static let metaKey: JSString = "metaKey" @usableFromInline static let method: JSString = "method" + @usableFromInline static let mimeType: JSString = "mimeType" @usableFromInline static let mimeTypes: JSString = "mimeTypes" @usableFromInline static let min: JSString = "min" @usableFromInline static let minLength: JSString = "minLength" @@ -17152,6 +17396,7 @@ public enum console { @usableFromInline static let oncopy: JSString = "oncopy" @usableFromInline static let oncuechange: JSString = "oncuechange" @usableFromInline static let oncut: JSString = "oncut" + @usableFromInline static let ondataavailable: JSString = "ondataavailable" @usableFromInline static let ondblclick: JSString = "ondblclick" @usableFromInline static let ondevicechange: JSString = "ondevicechange" @usableFromInline static let ondrag: JSString = "ondrag" @@ -17210,6 +17455,7 @@ public enum console { @usableFromInline static let onremovetrack: JSString = "onremovetrack" @usableFromInline static let onreset: JSString = "onreset" @usableFromInline static let onresize: JSString = "onresize" + @usableFromInline static let onresume: JSString = "onresume" @usableFromInline static let onscroll: JSString = "onscroll" @usableFromInline static let onsecuritypolicyviolation: JSString = "onsecuritypolicyviolation" @usableFromInline static let onseeked: JSString = "onseeked" @@ -17217,7 +17463,9 @@ public enum console { @usableFromInline static let onselect: JSString = "onselect" @usableFromInline static let onslotchange: JSString = "onslotchange" @usableFromInline static let onstalled: JSString = "onstalled" + @usableFromInline static let onstart: JSString = "onstart" @usableFromInline static let onstatechange: JSString = "onstatechange" + @usableFromInline static let onstop: JSString = "onstop" @usableFromInline static let onstorage: JSString = "onstorage" @usableFromInline static let onsubmit: JSString = "onsubmit" @usableFromInline static let onsuspend: JSString = "onsuspend" @@ -17380,6 +17628,7 @@ public enum console { @usableFromInline static let reportError: JSString = "reportError" @usableFromInline static let reportValidity: JSString = "reportValidity" @usableFromInline static let request: JSString = "request" + @usableFromInline static let requestData: JSString = "requestData" @usableFromInline static let requestSubmit: JSString = "requestSubmit" @usableFromInline static let required: JSString = "required" @usableFromInline static let reset: JSString = "reset" @@ -17399,6 +17648,7 @@ public enum console { @usableFromInline static let result: JSString = "result" @usableFromInline static let resultType: JSString = "resultType" @usableFromInline static let resultingClientId: JSString = "resultingClientId" + @usableFromInline static let resume: JSString = "resume" @usableFromInline static let returnValue: JSString = "returnValue" @usableFromInline static let rev: JSString = "rev" @usableFromInline static let reverse: JSString = "reverse" @@ -17537,6 +17787,7 @@ public enum console { @usableFromInline static let stopImmediatePropagation: JSString = "stopImmediatePropagation" @usableFromInline static let stopPropagation: JSString = "stopPropagation" @usableFromInline static let storageArea: JSString = "storageArea" + @usableFromInline static let stream: JSString = "stream" @usableFromInline static let stringValue: JSString = "stringValue" @usableFromInline static let stroke: JSString = "stroke" @usableFromInline static let strokeRect: JSString = "strokeRect" @@ -17577,6 +17828,7 @@ public enum console { @usableFromInline static let timeLog: JSString = "timeLog" @usableFromInline static let timeOrigin: JSString = "timeOrigin" @usableFromInline static let timeStamp: JSString = "timeStamp" + @usableFromInline static let timecode: JSString = "timecode" @usableFromInline static let timeline: JSString = "timeline" @usableFromInline static let timeout: JSString = "timeout" @usableFromInline static let title: JSString = "title" @@ -17634,6 +17886,7 @@ public enum console { @usableFromInline static let vendorSub: JSString = "vendorSub" @usableFromInline static let version: JSString = "version" @usableFromInline static let video: JSString = "video" + @usableFromInline static let videoBitsPerSecond: JSString = "videoBitsPerSecond" @usableFromInline static let videoHeight: JSString = "videoHeight" @usableFromInline static let videoTracks: JSString = "videoTracks" @usableFromInline static let videoWidth: JSString = "videoWidth" diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 08b8be31..36343f70 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -24,6 +24,7 @@ console.log( "url", "streams", "mediacapture-streams", + "mediastream-recording", ].map((key) => parsedFiles[key]), null, 2 From 49fa44502902abbe1998742817ec6f73b4f120e1 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:07:16 +0100 Subject: [PATCH 03/21] 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 +++++ parse-idl/parse-all.js | 1 + 53 files changed, 1930 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 } +} diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 36343f70..3a3c1f5e 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -25,6 +25,7 @@ console.log( "streams", "mediacapture-streams", "mediastream-recording", + "webcodecs", ].map((key) => parsedFiles[key]), null, 2 From a663185b94e8ebaeaa7a08c6760fcc9dba22eba8 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:11:45 +0100 Subject: [PATCH 04/21] 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 6f27a486dd5494a8ddd63e9c3ac5bfa969cfeea4 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:07:39 +0100 Subject: [PATCH 05/21] 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 60c66438c7dca5527d3d3e009bddd6af7379cf49 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:09:30 +0100 Subject: [PATCH 06/21] Fix merge conflict --- Sources/DOMKit/Generated.swift | 4923 ++++++++++++++++++++++---------- 1 file changed, 3358 insertions(+), 1565 deletions(-) diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index 3cfbd4a3..88bb7667 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -333,6 +333,24 @@ public class AddEventListenerOptions: BridgedDictionary { public var signal: AbortSignal } +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 } +} + public protocol Animatable: JSBridgedClass {} public extension Animatable { @inlinable func animate(keyframes: JSObject?, options: Double_or_KeyframeAnimationOptions? = nil) -> Animation { @@ -590,682 +608,611 @@ public class Attr: Node { public var specified: Bool } -public class AudioTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioTrack].function! } +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) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) + _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 } - @ReadonlyAttribute - public var id: String + @inlinable public convenience init(init: AudioDataInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } @ReadonlyAttribute - public var kind: String + public var format: AudioSampleFormat? @ReadonlyAttribute - public var label: String + public var sampleRate: Float @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var enabled: Bool -} + public var numberOfFrames: UInt32 -public class AudioTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AudioTrackList].function! } + @ReadonlyAttribute + public var numberOfChannels: UInt32 - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) - } + @ReadonlyAttribute + public var duration: UInt64 @ReadonlyAttribute - public var length: UInt32 + public var timestamp: Int64 - @inlinable public subscript(key: Int) -> AudioTrack { - jsObject[key].fromJSValue()! + @inlinable public func allocationSize(options: AudioDataCopyToOptions) -> UInt32 { + let this = jsObject + return this[Strings.allocationSize].function!(this: this, arguments: [options.jsValue]).fromJSValue()! } - @inlinable public func getTrackById(id: String) -> AudioTrack? { + @inlinable public func copyTo(destination: BufferSource, options: AudioDataCopyToOptions) { let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue, options.jsValue]) } - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} - -public class BarProp: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.BarProp].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _visible = ReadonlyAttribute(jsObject: jsObject, name: Strings.visible) - self.jsObject = jsObject + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! } - @ReadonlyAttribute - public var visible: Bool + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) + } } -public class BaseComputedKeyframe: BridgedDictionary { - public convenience init(offset: Double?, computedOffset: Double, easing: String, composite: CompositeOperationOrAuto) { +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.offset] = offset.jsValue - object[Strings.computedOffset] = computedOffset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue + 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) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _computedOffset = ReadWriteAttribute(jsObject: object, name: Strings.computedOffset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + _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 offset: Double? + public var planeIndex: UInt32 @ReadWriteAttribute - public var computedOffset: Double + public var frameOffset: UInt32 @ReadWriteAttribute - public var easing: String + public var frameCount: UInt32 @ReadWriteAttribute - public var composite: CompositeOperationOrAuto + public var format: AudioSampleFormat } -public class BaseKeyframe: BridgedDictionary { - public convenience init(offset: Double?, easing: String, composite: CompositeOperationOrAuto) { +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.offset] = offset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue + 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) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + _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 offset: Double? + public var format: AudioSampleFormat @ReadWriteAttribute - public var easing: String + public var sampleRate: Float @ReadWriteAttribute - public var composite: CompositeOperationOrAuto -} - -public class BasePropertyIndexedKeyframe: BridgedDictionary { - public convenience init(offset: nullable_Double_or_seq_of_nullable_Double, easing: String_or_seq_of_String, composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.offset] = offset.jsValue - object[Strings.easing] = easing.jsValue - object[Strings.composite] = composite.jsValue - self.init(unsafelyWrapping: object) - } - - public required init(unsafelyWrapping object: JSObject) { - _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) - _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) - _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) - super.init(unsafelyWrapping: object) - } + public var numberOfFrames: UInt32 @ReadWriteAttribute - public var offset: nullable_Double_or_seq_of_nullable_Double + public var numberOfChannels: UInt32 @ReadWriteAttribute - public var easing: String_or_seq_of_String + public var timestamp: Int64 @ReadWriteAttribute - public var composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto -} - -public class BeforeUnloadEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BeforeUnloadEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) - } - - // XXX: member 'returnValue' is ignored -} - -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 } + public var data: BufferSource } -public class Blob: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } +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) { - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _decodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.decodeQueueSize) self.jsObject = jsObject } - @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) + @inlinable public convenience init(init: AudioDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) } @ReadonlyAttribute - public var size: UInt64 + public var state: CodecState @ReadonlyAttribute - public var type: String + public var decodeQueueSize: UInt32 - @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { + @inlinable public func configure(config: AudioDecoderConfig) { let this = jsObject - return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) } - // XXX: member 'stream' is ignored + @inlinable public func decode(chunk: EncodedAudioChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } - @inlinable public func text() -> JSPromise { + @inlinable public func flush() -> JSPromise { let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + 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 text() async throws -> String { + @inlinable public func flush() async throws { let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value } - @inlinable public func arrayBuffer() -> JSPromise { + @inlinable public func reset() { let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + _ = this[Strings.reset].function!(this: this, arguments: []) } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func arrayBuffer() async throws -> ArrayBuffer { + @inlinable public func close() { let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + _ = 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()! } } -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) +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) } - @inlinable public convenience init(type: String, eventInitDict: BlobEventInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + 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) } - @ReadonlyAttribute - public var data: Blob + @ReadWriteAttribute + public var codec: String - @ReadonlyAttribute - public var timecode: DOMHighResTimeStamp + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var description: BufferSource } -public class BlobEventInit: BridgedDictionary { - public convenience init(data: Blob, timecode: DOMHighResTimeStamp) { +public class AudioDecoderInit: BridgedDictionary { + public convenience init(output: @escaping AudioDataOutputCallback, error: @escaping WebCodecsErrorCallback) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - object[Strings.timecode] = timecode.jsValue + ClosureAttribute1Void[Strings.output, in: object] = output + ClosureAttribute1Void[Strings.error, in: object] = error self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - _timecode = ReadWriteAttribute(jsObject: object, name: Strings.timecode) + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) super.init(unsafelyWrapping: object) } - @ReadWriteAttribute - public var data: Blob + @ClosureAttribute1Void + public var output: AudioDataOutputCallback - @ReadWriteAttribute - public var timecode: DOMHighResTimeStamp + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback } -public class BlobPropertyBag: BridgedDictionary { - public convenience init(type: String, endings: EndingType) { +public class AudioDecoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: AudioDecoderConfig) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.type] = type.jsValue - object[Strings.endings] = endings.jsValue + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var type: String + public var supported: Bool @ReadWriteAttribute - public var endings: EndingType + public var config: AudioDecoderConfig } -public protocol Body: JSBridgedClass {} -public extension Body { - // XXX: attribute 'body' is ignored +public class AudioEncoder: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioEncoder].function! } - @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } + public let jsObject: JSObject - @inlinable func arrayBuffer() -> JSPromise { - let this = jsObject - return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + public required init(unsafelyWrapping jsObject: JSObject) { + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _encodeQueueSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.encodeQueueSize) + self.jsObject = jsObject } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func arrayBuffer() async throws -> ArrayBuffer { - let this = jsObject - let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + @inlinable public convenience init(init: AudioEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) } - @inlinable func blob() -> JSPromise { - let this = jsObject - return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - } + @ReadonlyAttribute + public var state: CodecState - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func blob() async throws -> Blob { + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: AudioEncoderConfig) { let this = jsObject - let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) } - @inlinable func formData() -> JSPromise { + @inlinable public func encode(data: AudioData) { let this = jsObject - return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + _ = this[Strings.encode].function!(this: this, arguments: [data.jsValue]) } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func formData() async throws -> FormData { + @inlinable public func flush() -> JSPromise { let this = jsObject - let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! } - @inlinable func json() -> JSPromise { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { let this = jsObject - return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable func json() async throws -> JSValue { + @inlinable public func reset() { let this = jsObject - let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! + _ = this[Strings.reset].function!(this: this, arguments: []) } - @inlinable func text() -> JSPromise { + @inlinable public func close() { let this = jsObject - return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + _ = 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 func text() async throws -> String { - let this = jsObject - let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + @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()! } } -public class BroadcastChannel: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) - _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) - _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) - super.init(unsafelyWrapping: jsObject) +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) } - @inlinable public convenience init(name: String) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) + 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) } - @ReadonlyAttribute - public var name: String + @ReadWriteAttribute + public var codec: String - @inlinable public func postMessage(message: JSValue) { - let this = jsObject - _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue]) + @ReadWriteAttribute + public var sampleRate: UInt32 + + @ReadWriteAttribute + public var numberOfChannels: UInt32 + + @ReadWriteAttribute + public var bitrate: UInt64 +} + +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) } - @inlinable public func close() { - let this = jsObject - _ = this[Strings.close].function!(this: this, arguments: []) + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) } - @ClosureAttribute1Optional - public var onmessage: EventHandler + @ClosureAttribute2Void + public var output: EncodedAudioChunkOutputCallback - @ClosureAttribute1Optional - public var onmessageerror: EventHandler + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback } -public class ByteLengthQueuingStrategy: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ByteLengthQueuingStrategy].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - self.jsObject = jsObject +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) } - @inlinable public convenience init(init: QueuingStrategyInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + public required init(unsafelyWrapping object: JSObject) { + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) + super.init(unsafelyWrapping: object) } - @ReadonlyAttribute - public var highWaterMark: Double + @ReadWriteAttribute + public var supported: Bool - @ReadonlyAttribute - public var size: JSFunction + @ReadWriteAttribute + public var config: AudioEncoderConfig } -public class CDATASection: Text { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CDATASection].function! } +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" - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public class Cache: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } +public class AudioTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.AudioTrack].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) self.jsObject = jsObject } - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } + @ReadonlyAttribute + public var id: String - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } + @ReadonlyAttribute + public var kind: String - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } + @ReadonlyAttribute + public var label: String - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { - let this = jsObject - let _promise: JSPromise = this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } + @ReadonlyAttribute + public var language: String - @inlinable public func add(request: RequestInfo) -> JSPromise { - let this = jsObject - return this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - } + @ReadWriteAttribute + public var enabled: Bool +} - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func add(request: RequestInfo) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! - _ = try await _promise.value - } +public class AudioTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.AudioTrackList].function! } - @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { - let this = jsObject - return this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func addAll(requests: [RequestInfo]) async throws { - let this = jsObject - let _promise: JSPromise = this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! - _ = try await _promise.value - } + @ReadonlyAttribute + public var length: UInt32 - @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { - let this = jsObject - return this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + @inlinable public subscript(key: Int) -> AudioTrack { + jsObject[key].fromJSValue()! } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func put(request: RequestInfo, response: Response) async throws { + @inlinable public func getTrackById(id: String) -> AudioTrack? { let this = jsObject - let _promise: JSPromise = this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! - _ = try await _promise.value + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! } - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } + @ClosureAttribute1Optional + public var onchange: EventHandler - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } + @ClosureAttribute1Optional + public var onaddtrack: EventHandler - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - } + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { - let this = jsObject - let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! +public class BarProp: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.BarProp].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _visible = ReadonlyAttribute(jsObject: jsObject, name: Strings.visible) + self.jsObject = jsObject } + + @ReadonlyAttribute + public var visible: Bool } -public class CacheQueryOptions: BridgedDictionary { - public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { +public class BaseComputedKeyframe: BridgedDictionary { + public convenience init(offset: Double?, computedOffset: Double, easing: String, composite: CompositeOperationOrAuto) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.ignoreSearch] = ignoreSearch.jsValue - object[Strings.ignoreMethod] = ignoreMethod.jsValue - object[Strings.ignoreVary] = ignoreVary.jsValue + object[Strings.offset] = offset.jsValue + object[Strings.computedOffset] = computedOffset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _ignoreSearch = ReadWriteAttribute(jsObject: object, name: Strings.ignoreSearch) - _ignoreMethod = ReadWriteAttribute(jsObject: object, name: Strings.ignoreMethod) - _ignoreVary = ReadWriteAttribute(jsObject: object, name: Strings.ignoreVary) + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _computedOffset = ReadWriteAttribute(jsObject: object, name: Strings.computedOffset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var ignoreSearch: Bool + public var offset: Double? @ReadWriteAttribute - public var ignoreMethod: Bool + public var computedOffset: Double @ReadWriteAttribute - public var ignoreVary: Bool + public var easing: String + + @ReadWriteAttribute + public var composite: CompositeOperationOrAuto } -public class CacheStorage: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CacheStorage].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject - } - - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { - let this = jsObject - return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { - let this = jsObject - let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func has(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func has(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } - - @inlinable public func open(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - } - - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func open(cacheName: String) async throws -> Cache { - let this = jsObject - let _promise: JSPromise = this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! +public class BaseKeyframe: BridgedDictionary { + public convenience init(offset: Double?, easing: String, composite: CompositeOperationOrAuto) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.offset] = offset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue + self.init(unsafelyWrapping: object) } - @inlinable public func delete(cacheName: String) -> JSPromise { - let this = jsObject - return this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + public required init(unsafelyWrapping object: JSObject) { + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) + super.init(unsafelyWrapping: object) } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func delete(cacheName: String) async throws -> Bool { - let this = jsObject - let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! - } + @ReadWriteAttribute + public var offset: Double? - @inlinable public func keys() -> JSPromise { - let this = jsObject - return this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! - } + @ReadWriteAttribute + public var easing: String - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func keys() async throws -> [String] { - let this = jsObject - let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! - return try await _promise.value.fromJSValue()! - } + @ReadWriteAttribute + public var composite: CompositeOperationOrAuto } -public class CameraDevicePermissionDescriptor: BridgedDictionary { - public convenience init(panTiltZoom: Bool) { +public class BasePropertyIndexedKeyframe: BridgedDictionary { + public convenience init(offset: nullable_Double_or_seq_of_nullable_Double, easing: String_or_seq_of_String, composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.panTiltZoom] = panTiltZoom.jsValue + object[Strings.offset] = offset.jsValue + object[Strings.easing] = easing.jsValue + object[Strings.composite] = composite.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _panTiltZoom = ReadWriteAttribute(jsObject: object, name: Strings.panTiltZoom) + _offset = ReadWriteAttribute(jsObject: object, name: Strings.offset) + _easing = ReadWriteAttribute(jsObject: object, name: Strings.easing) + _composite = ReadWriteAttribute(jsObject: object, name: Strings.composite) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var panTiltZoom: Bool -} - -public enum CanPlayTypeResult: JSString, JSValueCompatible { - case _empty = "" - case maybe = "maybe" - case probably = "probably" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } + public var offset: nullable_Double_or_seq_of_nullable_Double - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } + @ReadWriteAttribute + public var easing: String_or_seq_of_String - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @ReadWriteAttribute + public var composite: CompositeOperationOrAuto_or_seq_of_CompositeOperationOrAuto } -public protocol CanvasCompositing: JSBridgedClass {} -public extension CanvasCompositing { - @inlinable var globalAlpha: Double { - get { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] = newValue } - } +public class BeforeUnloadEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BeforeUnloadEvent].function! } - @inlinable var globalCompositeOperation: String { - get { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] = newValue } + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) } + + // XXX: member 'returnValue' is ignored } -public enum CanvasDirection: JSString, JSValueCompatible { - case ltr = "ltr" - case rtl = "rtl" - case inherit = "inherit" +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 { @@ -1281,239 +1228,254 @@ public enum CanvasDirection: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public protocol CanvasDrawImage: JSBridgedClass {} -public extension CanvasDrawImage { - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) - } +public class Blob: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Blob].function! } - @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) - } + public let jsObject: JSObject - @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { - let _arg0 = image.jsValue - let _arg1 = sx.jsValue - let _arg2 = sy.jsValue - let _arg3 = sw.jsValue - let _arg4 = sh.jsValue - let _arg5 = dx.jsValue - let _arg6 = dy.jsValue - let _arg7 = dw.jsValue - let _arg8 = dh.jsValue - let this = jsObject - _ = this[Strings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) + public required init(unsafelyWrapping jsObject: JSObject) { + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + _type = ReadonlyAttribute(jsObject: jsObject, name: Strings.type) + self.jsObject = jsObject } -} -public protocol CanvasDrawPath: JSBridgedClass {} -public extension CanvasDrawPath { - @inlinable func beginPath() { - let this = jsObject - _ = this[Strings.beginPath].function!(this: this, arguments: []) + @inlinable public convenience init(blobParts: [BlobPart]? = nil, options: BlobPropertyBag? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [blobParts?.jsValue ?? .undefined, options?.jsValue ?? .undefined])) } - @inlinable func fill(fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) - } + @ReadonlyAttribute + public var size: UInt64 - @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { - let this = jsObject - _ = this[Strings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) - } + @ReadonlyAttribute + public var type: String - @inlinable func stroke() { + @inlinable public func slice(start: Int64? = nil, end: Int64? = nil, contentType: String? = nil) -> Self { let this = jsObject - _ = this[Strings.stroke].function!(this: this, arguments: []) + return this[Strings.slice].function!(this: this, arguments: [start?.jsValue ?? .undefined, end?.jsValue ?? .undefined, contentType?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable func stroke(path: Path2D) { - let this = jsObject - _ = this[Strings.stroke].function!(this: this, arguments: [path.jsValue]) - } + // XXX: member 'stream' is ignored - @inlinable func clip(fillRule: CanvasFillRule? = nil) { + @inlinable public func text() -> JSPromise { let this = jsObject - _ = this[Strings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! } - @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func text() async throws -> String { let this = jsObject - _ = this[Strings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + @inlinable public func arrayBuffer() -> JSPromise { let this = jsObject - return this[Strings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! } - @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func arrayBuffer() async throws -> ArrayBuffer { let this = jsObject - return this[Strings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } +} - @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { - let this = jsObject - return this[Strings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! +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 func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { - let this = jsObject - return this[Strings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + @inlinable public convenience init(type: String, eventInitDict: BlobEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) } -} -public enum CanvasFillRule: JSString, JSValueCompatible { - case nonzero = "nonzero" - case evenodd = "evenodd" + @ReadonlyAttribute + public var data: Blob - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @ReadonlyAttribute + public var timecode: DOMHighResTimeStamp +} + +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) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + _timecode = ReadWriteAttribute(jsObject: object, name: Strings.timecode) + super.init(unsafelyWrapping: object) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @ReadWriteAttribute + public var data: Blob + + @ReadWriteAttribute + public var timecode: DOMHighResTimeStamp } -public protocol CanvasFillStrokeStyles: JSBridgedClass {} -public extension CanvasFillStrokeStyles { - @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { - get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } +public class BlobPropertyBag: BridgedDictionary { + public convenience init(type: String, endings: EndingType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.type] = type.jsValue + object[Strings.endings] = endings.jsValue + self.init(unsafelyWrapping: object) } - @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { - get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } + public required init(unsafelyWrapping object: JSObject) { + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _endings = ReadWriteAttribute(jsObject: object, name: Strings.endings) + super.init(unsafelyWrapping: object) } - @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { + @ReadWriteAttribute + public var type: String + + @ReadWriteAttribute + public var endings: EndingType +} + +public protocol Body: JSBridgedClass {} +public extension Body { + // XXX: attribute 'body' is ignored + + @inlinable var bodyUsed: Bool { ReadonlyAttribute[Strings.bodyUsed, in: jsObject] } + + @inlinable func arrayBuffer() -> JSPromise { let this = jsObject - return this[Strings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! + return this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! } - @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { - let _arg0 = x0.jsValue - let _arg1 = y0.jsValue - let _arg2 = r0.jsValue - let _arg3 = x1.jsValue - let _arg4 = y1.jsValue - let _arg5 = r1.jsValue + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func arrayBuffer() async throws -> ArrayBuffer { let this = jsObject - return this[Strings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! + let _promise: JSPromise = this[Strings.arrayBuffer].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { + @inlinable func blob() -> JSPromise { let this = jsObject - return this[Strings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + return this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! } - @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func blob() async throws -> Blob { let this = jsObject - return this[Strings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! + let _promise: JSPromise = this[Strings.blob].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } -} -public class CanvasFilter: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasFilter].function! } + @inlinable func formData() -> JSPromise { + let this = jsObject + return this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + } - public let jsObject: JSObject + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func formData() async throws -> FormData { + let this = jsObject + let _promise: JSPromise = this[Strings.formData].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject + @inlinable func json() -> JSPromise { + let this = jsObject + return this[Strings.json].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func json() async throws -> JSValue { + let this = jsObject + let _promise: JSPromise = this[Strings.json].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } -} -public protocol CanvasFilters: JSBridgedClass {} -public extension CanvasFilters { - @inlinable var filter: CanvasFilter_or_String { - get { ReadWriteAttribute[Strings.filter, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } + @inlinable func text() -> JSPromise { + let this = jsObject + return this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable func text() async throws -> String { + let this = jsObject + let _promise: JSPromise = this[Strings.text].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } } -public enum CanvasFontKerning: JSString, JSValueCompatible { - case auto = "auto" - case normal = "normal" - case none = "none" +public class BroadcastChannel: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + public required init(unsafelyWrapping jsObject: JSObject) { + _name = ReadonlyAttribute(jsObject: jsObject, name: Strings.name) + _onmessage = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessage) + _onmessageerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmessageerror) + super.init(unsafelyWrapping: jsObject) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public convenience init(name: String) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [name.jsValue])) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasFontStretch: JSString, JSValueCompatible { - case ultraCondensed = "ultra-condensed" - case extraCondensed = "extra-condensed" - case condensed = "condensed" - case semiCondensed = "semi-condensed" - case normal = "normal" - case semiExpanded = "semi-expanded" - case expanded = "expanded" - case extraExpanded = "extra-expanded" - case ultraExpanded = "ultra-expanded" + @ReadonlyAttribute + public var name: String - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable public func postMessage(message: JSValue) { + let this = jsObject + _ = this[Strings.postMessage].function!(this: this, arguments: [message.jsValue]) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public func close() { + let this = jsObject + _ = this[Strings.close].function!(this: this, arguments: []) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @ClosureAttribute1Optional + public var onmessage: EventHandler + + @ClosureAttribute1Optional + public var onmessageerror: EventHandler } -public enum CanvasFontVariantCaps: JSString, JSValueCompatible { - case normal = "normal" - case smallCaps = "small-caps" - case allSmallCaps = "all-small-caps" - case petiteCaps = "petite-caps" - case allPetiteCaps = "all-petite-caps" - case unicase = "unicase" - case titlingCaps = "titling-caps" +public class ByteLengthQueuingStrategy: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ByteLengthQueuingStrategy].function! } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + self.jsObject = jsObject } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public convenience init(init: QueuingStrategyInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @ReadonlyAttribute + public var highWaterMark: Double + + @ReadonlyAttribute + public var size: JSFunction } -public class CanvasGradient: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasGradient].function! } +public class CDATASection: Text { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CDATASection].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } +} + +public class Cache: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } public let jsObject: JSObject @@ -1521,384 +1483,342 @@ public class CanvasGradient: JSBridgedClass { self.jsObject = jsObject } - @inlinable public func addColorStop(offset: Double, color: String) { + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { let this = jsObject - _ = this[Strings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) + return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } -} -public protocol CanvasImageData: JSBridgedClass {} -public extension CanvasImageData { - @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Response? { let this = jsObject - return this[Strings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable func createImageData(imagedata: ImageData) -> ImageData { + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { let this = jsObject - return this[Strings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! + return this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func matchAll(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Response] { let this = jsObject - return this[Strings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! + let _promise: JSPromise = this[Strings.matchAll].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { + @inlinable public func add(request: RequestInfo) -> JSPromise { let this = jsObject - _ = this[Strings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) + return this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! } - @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { - let _arg0 = imagedata.jsValue - let _arg1 = dx.jsValue - let _arg2 = dy.jsValue - let _arg3 = dirtyX.jsValue - let _arg4 = dirtyY.jsValue - let _arg5 = dirtyWidth.jsValue - let _arg6 = dirtyHeight.jsValue + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func add(request: RequestInfo) async throws { let this = jsObject - _ = this[Strings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) + let _promise: JSPromise = this[Strings.add].function!(this: this, arguments: [request.jsValue]).fromJSValue()! + _ = try await _promise.value } -} -public protocol CanvasImageSmoothing: JSBridgedClass {} -public extension CanvasImageSmoothing { - @inlinable var imageSmoothingEnabled: Bool { - get { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] = newValue } + @inlinable public func addAll(requests: [RequestInfo]) -> JSPromise { + let this = jsObject + return this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! } - @inlinable var imageSmoothingQuality: ImageSmoothingQuality { - get { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] = newValue } - } -} - -public enum CanvasLineCap: JSString, JSValueCompatible { - case butt = "butt" - case round = "round" - case square = "square" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CanvasLineJoin: JSString, JSValueCompatible { - case round = "round" - case bevel = "bevel" - case miter = "miter" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } - - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public protocol CanvasPath: JSBridgedClass {} -public extension CanvasPath { - @inlinable func closePath() { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func addAll(requests: [RequestInfo]) async throws { let this = jsObject - _ = this[Strings.closePath].function!(this: this, arguments: []) + let _promise: JSPromise = this[Strings.addAll].function!(this: this, arguments: [requests.jsValue]).fromJSValue()! + _ = try await _promise.value } - @inlinable func moveTo(x: Double, y: Double) { + @inlinable public func put(request: RequestInfo, response: Response) -> JSPromise { let this = jsObject - _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + return this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! } - @inlinable func lineTo(x: Double, y: Double) { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func put(request: RequestInfo, response: Response) async throws { let this = jsObject - _ = this[Strings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + let _promise: JSPromise = this[Strings.put].function!(this: this, arguments: [request.jsValue, response.jsValue]).fromJSValue()! + _ = try await _promise.value } - @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) -> JSPromise { let this = jsObject - _ = this[Strings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) + return this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { - let _arg0 = cp1x.jsValue - let _arg1 = cp1y.jsValue - let _arg2 = cp2x.jsValue - let _arg3 = cp2y.jsValue - let _arg4 = x.jsValue - let _arg5 = y.jsValue + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(request: RequestInfo, options: CacheQueryOptions? = nil) async throws -> Bool { let this = jsObject - _ = this[Strings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) -> JSPromise { let this = jsObject - _ = this[Strings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) + return this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys(request: RequestInfo? = nil, options: CacheQueryOptions? = nil) async throws -> [Request] { let this = jsObject - _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: [request?.jsValue ?? .undefined, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! } +} - @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { - let this = jsObject - _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) +public class CacheQueryOptions: BridgedDictionary { + public convenience init(ignoreSearch: Bool, ignoreMethod: Bool, ignoreVary: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.ignoreSearch] = ignoreSearch.jsValue + object[Strings.ignoreMethod] = ignoreMethod.jsValue + object[Strings.ignoreVary] = ignoreVary.jsValue + self.init(unsafelyWrapping: object) } - @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radius.jsValue - let _arg3 = startAngle.jsValue - let _arg4 = endAngle.jsValue - let _arg5 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + public required init(unsafelyWrapping object: JSObject) { + _ignoreSearch = ReadWriteAttribute(jsObject: object, name: Strings.ignoreSearch) + _ignoreMethod = ReadWriteAttribute(jsObject: object, name: Strings.ignoreMethod) + _ignoreVary = ReadWriteAttribute(jsObject: object, name: Strings.ignoreVary) + super.init(unsafelyWrapping: object) } - @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { - let _arg0 = x.jsValue - let _arg1 = y.jsValue - let _arg2 = radiusX.jsValue - let _arg3 = radiusY.jsValue - let _arg4 = rotation.jsValue - let _arg5 = startAngle.jsValue - let _arg6 = endAngle.jsValue - let _arg7 = counterclockwise?.jsValue ?? .undefined - let this = jsObject - _ = this[Strings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) - } -} + @ReadWriteAttribute + public var ignoreSearch: Bool -public protocol CanvasPathDrawingStyles: JSBridgedClass {} -public extension CanvasPathDrawingStyles { - @inlinable var lineWidth: Double { - get { ReadWriteAttribute[Strings.lineWidth, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineWidth, in: jsObject] = newValue } - } + @ReadWriteAttribute + public var ignoreMethod: Bool - @inlinable var lineCap: CanvasLineCap { - get { ReadWriteAttribute[Strings.lineCap, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineCap, in: jsObject] = newValue } - } + @ReadWriteAttribute + public var ignoreVary: Bool +} - @inlinable var lineJoin: CanvasLineJoin { - get { ReadWriteAttribute[Strings.lineJoin, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineJoin, in: jsObject] = newValue } - } +public class CacheStorage: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CacheStorage].function! } - @inlinable var miterLimit: Double { - get { ReadWriteAttribute[Strings.miterLimit, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.miterLimit, in: jsObject] = newValue } + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject } - @inlinable func setLineDash(segments: [Double]) { + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) -> JSPromise { let this = jsObject - _ = this[Strings.setLineDash].function!(this: this, arguments: [segments.jsValue]) + return this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable func getLineDash() -> [Double] { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func match(request: RequestInfo, options: MultiCacheQueryOptions? = nil) async throws -> Response? { let this = jsObject - return this[Strings.getLineDash].function!(this: this, arguments: []).fromJSValue()! + let _promise: JSPromise = this[Strings.match].function!(this: this, arguments: [request.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable var lineDashOffset: Double { - get { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] = newValue } + @inlinable public func has(cacheName: String) -> JSPromise { + let this = jsObject + return this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! } -} -public class CanvasPattern: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasPattern].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func has(cacheName: String) async throws -> Bool { + let this = jsObject + let _promise: JSPromise = this[Strings.has].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { + @inlinable public func open(cacheName: String) -> JSPromise { let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + return this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! } -} -public protocol CanvasRect: JSBridgedClass {} -public extension CanvasRect { - @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func open(cacheName: String) async throws -> Cache { let this = jsObject - _ = this[Strings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + let _promise: JSPromise = this[Strings.open].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! } - @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { + @inlinable public func delete(cacheName: String) -> JSPromise { let this = jsObject - _ = this[Strings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + return this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! } - @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func delete(cacheName: String) async throws -> Bool { let this = jsObject - _ = this[Strings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + let _promise: JSPromise = this[Strings.delete].function!(this: this, arguments: [cacheName.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! } -} - -public class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasRenderingContext2D].function! } - - public let jsObject: JSObject - public required init(unsafelyWrapping jsObject: JSObject) { - _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) - self.jsObject = jsObject + @inlinable public func keys() -> JSPromise { + let this = jsObject + return this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! } - @ReadonlyAttribute - public var canvas: HTMLCanvasElement - - @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func keys() async throws -> [String] { let this = jsObject - return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + let _promise: JSPromise = this[Strings.keys].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! } } -public class CanvasRenderingContext2DSettings: BridgedDictionary { - public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { +public class CameraDevicePermissionDescriptor: BridgedDictionary { + public convenience init(panTiltZoom: Bool) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.alpha] = alpha.jsValue - object[Strings.desynchronized] = desynchronized.jsValue - object[Strings.colorSpace] = colorSpace.jsValue - object[Strings.willReadFrequently] = willReadFrequently.jsValue + object[Strings.panTiltZoom] = panTiltZoom.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) - _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - _willReadFrequently = ReadWriteAttribute(jsObject: object, name: Strings.willReadFrequently) + _panTiltZoom = ReadWriteAttribute(jsObject: object, name: Strings.panTiltZoom) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var alpha: Bool + public var panTiltZoom: Bool +} - @ReadWriteAttribute - public var desynchronized: Bool +public enum CanPlayTypeResult: JSString, JSValueCompatible { + case _empty = "" + case maybe = "maybe" + case probably = "probably" - @ReadWriteAttribute - public var colorSpace: PredefinedColorSpace + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } - @ReadWriteAttribute - public var willReadFrequently: Bool + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public protocol CanvasShadowStyles: JSBridgedClass {} -public extension CanvasShadowStyles { - @inlinable var shadowOffsetX: Double { - get { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] = newValue } +public protocol CanvasCompositing: JSBridgedClass {} +public extension CanvasCompositing { + @inlinable var globalAlpha: Double { + get { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.globalAlpha, in: jsObject] = newValue } } - @inlinable var shadowOffsetY: Double { - get { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] = newValue } + @inlinable var globalCompositeOperation: String { + get { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.globalCompositeOperation, in: jsObject] = newValue } } +} - @inlinable var shadowBlur: Double { - get { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] = newValue } +public enum CanvasDirection: JSString, JSValueCompatible { + case ltr = "ltr" + case rtl = "rtl" + case inherit = "inherit" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil } - @inlinable var shadowColor: String { - get { ReadWriteAttribute[Strings.shadowColor, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.shadowColor, in: jsObject] = newValue } + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public protocol CanvasState: JSBridgedClass {} -public extension CanvasState { - @inlinable func save() { +public protocol CanvasDrawImage: JSBridgedClass {} +public extension CanvasDrawImage { + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double) { let this = jsObject - _ = this[Strings.save].function!(this: this, arguments: []) + _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue]) } - @inlinable func restore() { + @inlinable func drawImage(image: CanvasImageSource, dx: Double, dy: Double, dw: Double, dh: Double) { let this = jsObject - _ = this[Strings.restore].function!(this: this, arguments: []) + _ = this[Strings.drawImage].function!(this: this, arguments: [image.jsValue, dx.jsValue, dy.jsValue, dw.jsValue, dh.jsValue]) } - @inlinable func reset() { + @inlinable func drawImage(image: CanvasImageSource, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) { + let _arg0 = image.jsValue + let _arg1 = sx.jsValue + let _arg2 = sy.jsValue + let _arg3 = sw.jsValue + let _arg4 = sh.jsValue + let _arg5 = dx.jsValue + let _arg6 = dy.jsValue + let _arg7 = dw.jsValue + let _arg8 = dh.jsValue let this = jsObject - _ = this[Strings.reset].function!(this: this, arguments: []) + _ = this[Strings.drawImage].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) } +} - @inlinable func isContextLost() -> Bool { +public protocol CanvasDrawPath: JSBridgedClass {} +public extension CanvasDrawPath { + @inlinable func beginPath() { let this = jsObject - return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! + _ = this[Strings.beginPath].function!(this: this, arguments: []) } -} -public protocol CanvasText: JSBridgedClass {} -public extension CanvasText { - @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + @inlinable func fill(fillRule: CanvasFillRule? = nil) { let this = jsObject - _ = this[Strings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + _ = this[Strings.fill].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) } - @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { + @inlinable func fill(path: Path2D, fillRule: CanvasFillRule? = nil) { let this = jsObject - _ = this[Strings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) + _ = this[Strings.fill].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) } - @inlinable func measureText(text: String) -> TextMetrics { + @inlinable func stroke() { let this = jsObject - return this[Strings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! + _ = this[Strings.stroke].function!(this: this, arguments: []) } -} -public enum CanvasTextAlign: JSString, JSValueCompatible { - case start = "start" - case end = "end" - case left = "left" - case right = "right" - case center = "center" + @inlinable func stroke(path: Path2D) { + let this = jsObject + _ = this[Strings.stroke].function!(this: this, arguments: [path.jsValue]) + } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable func clip(fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.clip].function!(this: this, arguments: [fillRule?.jsValue ?? .undefined]) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable func clip(path: Path2D, fillRule: CanvasFillRule? = nil) { + let this = jsObject + _ = this[Strings.clip].function!(this: this, arguments: [path.jsValue, fillRule?.jsValue ?? .undefined]) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @inlinable func isPointInPath(x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[Strings.isPointInPath].function!(this: this, arguments: [x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInPath(path: Path2D, x: Double, y: Double, fillRule: CanvasFillRule? = nil) -> Bool { + let this = jsObject + return this[Strings.isPointInPath].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue, fillRule?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func isPointInStroke(x: Double, y: Double) -> Bool { + let this = jsObject + return this[Strings.isPointInStroke].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable func isPointInStroke(path: Path2D, x: Double, y: Double) -> Bool { + let this = jsObject + return this[Strings.isPointInStroke].function!(this: this, arguments: [path.jsValue, x.jsValue, y.jsValue]).fromJSValue()! + } } -public enum CanvasTextBaseline: JSString, JSValueCompatible { - case top = "top" - case hanging = "hanging" - case middle = "middle" - case alphabetic = "alphabetic" - case ideographic = "ideographic" - case bottom = "bottom" +public enum CanvasFillRule: JSString, JSValueCompatible { + case nonzero = "nonzero" + case evenodd = "evenodd" @inlinable public static func construct(from jsValue: JSValue) -> Self? { if let string = jsValue.jsString { @@ -1914,64 +1834,71 @@ public enum CanvasTextBaseline: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public protocol CanvasTextDrawingStyles: JSBridgedClass {} -public extension CanvasTextDrawingStyles { - @inlinable var font: String { - get { ReadWriteAttribute[Strings.font, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.font, in: jsObject] = newValue } +public protocol CanvasFillStrokeStyles: JSBridgedClass {} +public extension CanvasFillStrokeStyles { + @inlinable var strokeStyle: CanvasGradient_or_CanvasPattern_or_String { + get { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.strokeStyle, in: jsObject] = newValue } } - @inlinable var textAlign: CanvasTextAlign { - get { ReadWriteAttribute[Strings.textAlign, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textAlign, in: jsObject] = newValue } + @inlinable var fillStyle: CanvasGradient_or_CanvasPattern_or_String { + get { ReadWriteAttribute[Strings.fillStyle, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fillStyle, in: jsObject] = newValue } } - @inlinable var textBaseline: CanvasTextBaseline { - get { ReadWriteAttribute[Strings.textBaseline, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textBaseline, in: jsObject] = newValue } + @inlinable func createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double) -> CanvasGradient { + let this = jsObject + return this[Strings.createLinearGradient].function!(this: this, arguments: [x0.jsValue, y0.jsValue, x1.jsValue, y1.jsValue]).fromJSValue()! } - @inlinable var direction: CanvasDirection { - get { ReadWriteAttribute[Strings.direction, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.direction, in: jsObject] = newValue } + @inlinable func createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double) -> CanvasGradient { + let _arg0 = x0.jsValue + let _arg1 = y0.jsValue + let _arg2 = r0.jsValue + let _arg3 = x1.jsValue + let _arg4 = y1.jsValue + let _arg5 = r1.jsValue + let this = jsObject + return this[Strings.createRadialGradient].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]).fromJSValue()! } - @inlinable var letterSpacing: String { - get { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] = newValue } + @inlinable func createConicGradient(startAngle: Double, x: Double, y: Double) -> CanvasGradient { + let this = jsObject + return this[Strings.createConicGradient].function!(this: this, arguments: [startAngle.jsValue, x.jsValue, y.jsValue]).fromJSValue()! } - @inlinable var fontKerning: CanvasFontKerning { - get { ReadWriteAttribute[Strings.fontKerning, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontKerning, in: jsObject] = newValue } + @inlinable func createPattern(image: CanvasImageSource, repetition: String) -> CanvasPattern? { + let this = jsObject + return this[Strings.createPattern].function!(this: this, arguments: [image.jsValue, repetition.jsValue]).fromJSValue()! } +} - @inlinable var fontStretch: CanvasFontStretch { - get { ReadWriteAttribute[Strings.fontStretch, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontStretch, in: jsObject] = newValue } - } +public class CanvasFilter: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasFilter].function! } - @inlinable var fontVariantCaps: CanvasFontVariantCaps { - get { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] = newValue } + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject } - @inlinable var textRendering: CanvasTextRendering { - get { ReadWriteAttribute[Strings.textRendering, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.textRendering, in: jsObject] = newValue } + @inlinable public convenience init(filters: CanvasFilterInput_or_seq_of_CanvasFilterInput? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [filters?.jsValue ?? .undefined])) } +} - @inlinable var wordSpacing: String { - get { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] = newValue } +public protocol CanvasFilters: JSBridgedClass {} +public extension CanvasFilters { + @inlinable var filter: CanvasFilter_or_String { + get { ReadWriteAttribute[Strings.filter, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.filter, in: jsObject] = newValue } } } -public enum CanvasTextRendering: JSString, JSValueCompatible { +public enum CanvasFontKerning: JSString, JSValueCompatible { case auto = "auto" - case optimizeSpeed = "optimizeSpeed" - case optimizeLegibility = "optimizeLegibility" - case geometricPrecision = "geometricPrecision" + case normal = "normal" + case none = "none" @inlinable public static func construct(from jsValue: JSValue) -> Self? { if let string = jsValue.jsString { @@ -1987,174 +1914,121 @@ public enum CanvasTextRendering: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public protocol CanvasTransform: JSBridgedClass {} -public extension CanvasTransform { - @inlinable func scale(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } +public enum CanvasFontStretch: JSString, JSValueCompatible { + case ultraCondensed = "ultra-condensed" + case extraCondensed = "extra-condensed" + case condensed = "condensed" + case semiCondensed = "semi-condensed" + case normal = "normal" + case semiExpanded = "semi-expanded" + case expanded = "expanded" + case extraExpanded = "extra-expanded" + case ultraExpanded = "ultra-expanded" - @inlinable func rotate(angle: Double) { - let this = jsObject - _ = this[Strings.rotate].function!(this: this, arguments: [angle.jsValue]) + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil } - @inlinable func translate(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) } - @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[Strings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func getTransform() -> DOMMatrix { - let this = jsObject - return this[Strings.getTransform].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { - let _arg0 = a.jsValue - let _arg1 = b.jsValue - let _arg2 = c.jsValue - let _arg3 = d.jsValue - let _arg4 = e.jsValue - let _arg5 = f.jsValue - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) - } - - @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { - let this = jsObject - _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) - } - - @inlinable func resetTransform() { - let this = jsObject - _ = this[Strings.resetTransform].function!(this: this, arguments: []) - } + @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public protocol CanvasUserInterface: JSBridgedClass {} -public extension CanvasUserInterface { - @inlinable func drawFocusIfNeeded(element: Element) { - let this = jsObject - _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) - } +public enum CanvasFontVariantCaps: JSString, JSValueCompatible { + case normal = "normal" + case smallCaps = "small-caps" + case allSmallCaps = "all-small-caps" + case petiteCaps = "petite-caps" + case allPetiteCaps = "all-petite-caps" + case unicase = "unicase" + case titlingCaps = "titling-caps" - @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { - let this = jsObject - _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil } - @inlinable func scrollPathIntoView() { - let this = jsObject - _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: []) + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) } - @inlinable func scrollPathIntoView(path: Path2D) { - let this = jsObject - _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) - } + @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - super.init(unsafelyWrapping: jsObject) - } - - @ReadWriteAttribute - public var data: String - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { - let this = jsObject - return this[Strings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! - } +public class CanvasGradient: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasGradient].function! } - @inlinable public func appendData(data: String) { - let this = jsObject - _ = this[Strings.appendData].function!(this: this, arguments: [data.jsValue]) - } + public let jsObject: JSObject - @inlinable public func insertData(offset: UInt32, data: String) { - let this = jsObject - _ = this[Strings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject } - @inlinable public func deleteData(offset: UInt32, count: UInt32) { + @inlinable public func addColorStop(offset: Double, color: String) { let this = jsObject - _ = this[Strings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) + _ = this[Strings.addColorStop].function!(this: this, arguments: [offset.jsValue, color.jsValue]) } +} - @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { +public protocol CanvasImageData: JSBridgedClass {} +public extension CanvasImageData { + @inlinable func createImageData(sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { let this = jsObject - _ = this[Strings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) + return this[Strings.createImageData].function!(this: this, arguments: [sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! } -} -public protocol ChildNode: JSBridgedClass {} -public extension ChildNode { - @inlinable func before(nodes: Node_or_String...) { + @inlinable func createImageData(imagedata: ImageData) -> ImageData { let this = jsObject - _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) + return this[Strings.createImageData].function!(this: this, arguments: [imagedata.jsValue]).fromJSValue()! } - @inlinable func after(nodes: Node_or_String...) { + @inlinable func getImageData(sx: Int32, sy: Int32, sw: Int32, sh: Int32, settings: ImageDataSettings? = nil) -> ImageData { let this = jsObject - _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) + return this[Strings.getImageData].function!(this: this, arguments: [sx.jsValue, sy.jsValue, sw.jsValue, sh.jsValue, settings?.jsValue ?? .undefined]).fromJSValue()! } - @inlinable func replaceWith(nodes: Node_or_String...) { + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32) { let this = jsObject - _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) + _ = this[Strings.putImageData].function!(this: this, arguments: [imagedata.jsValue, dx.jsValue, dy.jsValue]) } - @inlinable func remove() { + @inlinable func putImageData(imagedata: ImageData, dx: Int32, dy: Int32, dirtyX: Int32, dirtyY: Int32, dirtyWidth: Int32, dirtyHeight: Int32) { + let _arg0 = imagedata.jsValue + let _arg1 = dx.jsValue + let _arg2 = dy.jsValue + let _arg3 = dirtyX.jsValue + let _arg4 = dirtyY.jsValue + let _arg5 = dirtyWidth.jsValue + let _arg6 = dirtyHeight.jsValue let this = jsObject - _ = this[Strings.remove].function!(this: this, arguments: []) + _ = this[Strings.putImageData].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6]) } } -public class ClientQueryOptions: BridgedDictionary { - public convenience init(includeUncontrolled: Bool, type: ClientType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.includeUncontrolled] = includeUncontrolled.jsValue - object[Strings.type] = type.jsValue - self.init(unsafelyWrapping: object) +public protocol CanvasImageSmoothing: JSBridgedClass {} +public extension CanvasImageSmoothing { + @inlinable var imageSmoothingEnabled: Bool { + get { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.imageSmoothingEnabled, in: jsObject] = newValue } } - public required init(unsafelyWrapping object: JSObject) { - _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: Strings.includeUncontrolled) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - super.init(unsafelyWrapping: object) + @inlinable var imageSmoothingQuality: ImageSmoothingQuality { + get { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.imageSmoothingQuality, in: jsObject] = newValue } } - - @ReadWriteAttribute - public var includeUncontrolled: Bool - - @ReadWriteAttribute - public var type: ClientType } -public enum ClientType: JSString, JSValueCompatible { - case window = "window" - case worker = "worker" - case sharedworker = "sharedworker" - case all = "all" +public enum CanvasLineCap: JSString, JSValueCompatible { + case butt = "butt" + case round = "round" + case square = "square" @inlinable public static func construct(from jsValue: JSValue) -> Self? { if let string = jsValue.jsString { @@ -2170,9 +2044,10 @@ public enum ClientType: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public enum ColorSpaceConversion: JSString, JSValueCompatible { - case none = "none" - case `default` = "default" +public enum CanvasLineJoin: JSString, JSValueCompatible { + case round = "round" + case bevel = "bevel" + case miter = "miter" @inlinable public static func construct(from jsValue: JSValue) -> Self? { if let string = jsValue.jsString { @@ -2188,265 +2063,859 @@ public enum ColorSpaceConversion: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public class Comment: CharacterData { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Comment].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - super.init(unsafelyWrapping: jsObject) +public protocol CanvasPath: JSBridgedClass {} +public extension CanvasPath { + @inlinable func closePath() { + let this = jsObject + _ = this[Strings.closePath].function!(this: this, arguments: []) } - @inlinable public convenience init(data: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + @inlinable func moveTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) } -} - -public enum CompositeOperation: JSString, JSValueCompatible { - case replace = "replace" - case add = "add" - case accumulate = "accumulate" - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable func lineTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.lineTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable func quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double) { + let this = jsObject + _ = this[Strings.quadraticCurveTo].function!(this: this, arguments: [cpx.jsValue, cpy.jsValue, x.jsValue, y.jsValue]) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public enum CompositeOperationOrAuto: JSString, JSValueCompatible { - case replace = "replace" - case add = "add" - case accumulate = "accumulate" - case auto = "auto" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable func bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double) { + let _arg0 = cp1x.jsValue + let _arg1 = cp1y.jsValue + let _arg2 = cp2x.jsValue + let _arg3 = cp2y.jsValue + let _arg4 = x.jsValue + let _arg5 = y.jsValue + let this = jsObject + _ = this[Strings.bezierCurveTo].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable func arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double) { + let this = jsObject + _ = this[Strings.arcTo].function!(this: this, arguments: [x1.jsValue, y1.jsValue, x2.jsValue, y2.jsValue, radius.jsValue]) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} - -public class CompositionEvent: UIEvent { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CompositionEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) - super.init(unsafelyWrapping: jsObject) + @inlinable func rect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.rect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) } - @inlinable public convenience init(type: String, eventInitDict: CompositionEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + @inlinable func roundRect(x: Double, y: Double, w: Double, h: Double, radii: DOMPointInit_or_Double_or_seq_of_DOMPointInit_or_Double? = nil) { + let this = jsObject + _ = this[Strings.roundRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue, radii?.jsValue ?? .undefined]) } - @ReadonlyAttribute - public var data: String + @inlinable func arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radius.jsValue + let _arg3 = startAngle.jsValue + let _arg4 = endAngle.jsValue + let _arg5 = counterclockwise?.jsValue ?? .undefined + let this = jsObject + _ = this[Strings.arc].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } - @inlinable public func initCompositionEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: WindowProxy? = nil, dataArg: String? = nil) { + @inlinable func ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, counterclockwise: Bool? = nil) { + let _arg0 = x.jsValue + let _arg1 = y.jsValue + let _arg2 = radiusX.jsValue + let _arg3 = radiusY.jsValue + let _arg4 = rotation.jsValue + let _arg5 = startAngle.jsValue + let _arg6 = endAngle.jsValue + let _arg7 = counterclockwise?.jsValue ?? .undefined let this = jsObject - _ = this[Strings.initCompositionEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, dataArg?.jsValue ?? .undefined]) + _ = this[Strings.ellipse].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7]) } } -public class CompositionEventInit: BridgedDictionary { - public convenience init(data: String) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.data] = data.jsValue - self.init(unsafelyWrapping: object) +public protocol CanvasPathDrawingStyles: JSBridgedClass {} +public extension CanvasPathDrawingStyles { + @inlinable var lineWidth: Double { + get { ReadWriteAttribute[Strings.lineWidth, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineWidth, in: jsObject] = newValue } } - public required init(unsafelyWrapping object: JSObject) { - _data = ReadWriteAttribute(jsObject: object, name: Strings.data) - super.init(unsafelyWrapping: object) + @inlinable var lineCap: CanvasLineCap { + get { ReadWriteAttribute[Strings.lineCap, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineCap, in: jsObject] = newValue } } - @ReadWriteAttribute - public var data: String -} + @inlinable var lineJoin: CanvasLineJoin { + get { ReadWriteAttribute[Strings.lineJoin, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineJoin, in: jsObject] = newValue } + } -public class ComputedEffectTiming: BridgedDictionary { - public convenience init(progress: Double?, currentIteration: Double?) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.progress] = progress.jsValue - object[Strings.currentIteration] = currentIteration.jsValue - self.init(unsafelyWrapping: object) + @inlinable var miterLimit: Double { + get { ReadWriteAttribute[Strings.miterLimit, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.miterLimit, in: jsObject] = newValue } } - public required init(unsafelyWrapping object: JSObject) { - _progress = ReadWriteAttribute(jsObject: object, name: Strings.progress) - _currentIteration = ReadWriteAttribute(jsObject: object, name: Strings.currentIteration) - super.init(unsafelyWrapping: object) + @inlinable func setLineDash(segments: [Double]) { + let this = jsObject + _ = this[Strings.setLineDash].function!(this: this, arguments: [segments.jsValue]) } - @ReadWriteAttribute - public var progress: Double? + @inlinable func getLineDash() -> [Double] { + let this = jsObject + return this[Strings.getLineDash].function!(this: this, arguments: []).fromJSValue()! + } - @ReadWriteAttribute - public var currentIteration: Double? + @inlinable var lineDashOffset: Double { + get { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.lineDashOffset, in: jsObject] = newValue } + } } -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 class CanvasPattern: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasPattern].function! } - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) - } + public let jsObject: JSObject - @ReadWriteAttribute - public var exact: Bool + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } - @ReadWriteAttribute - public var ideal: Bool + @inlinable public func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } } -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 protocol CanvasRect: JSBridgedClass {} +public extension CanvasRect { + @inlinable func clearRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.clearRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) } - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) + @inlinable func fillRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.fillRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) } - @ReadWriteAttribute - public var exact: String_or_seq_of_String - - @ReadWriteAttribute - public var ideal: String_or_seq_of_String + @inlinable func strokeRect(x: Double, y: Double, w: Double, h: Double) { + let this = jsObject + _ = this[Strings.strokeRect].function!(this: this, arguments: [x.jsValue, y.jsValue, w.jsValue, h.jsValue]) + } } -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 class CanvasRenderingContext2D: JSBridgedClass, CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CanvasRenderingContext2D].function! } - public required init(unsafelyWrapping object: JSObject) { - _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) - _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) - super.init(unsafelyWrapping: object) + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _canvas = ReadonlyAttribute(jsObject: jsObject, name: Strings.canvas) + self.jsObject = jsObject } - @ReadWriteAttribute - public var exact: Double + @ReadonlyAttribute + public var canvas: HTMLCanvasElement - @ReadWriteAttribute - public var ideal: Double + @inlinable public func getContextAttributes() -> CanvasRenderingContext2DSettings { + let this = jsObject + return this[Strings.getContextAttributes].function!(this: this, arguments: []).fromJSValue()! + } } -public class ConstrainULongRange: BridgedDictionary { - public convenience init(exact: UInt32, ideal: UInt32) { +public class CanvasRenderingContext2DSettings: BridgedDictionary { + public convenience init(alpha: Bool, desynchronized: Bool, colorSpace: PredefinedColorSpace, willReadFrequently: Bool) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.exact] = exact.jsValue - object[Strings.ideal] = ideal.jsValue + object[Strings.alpha] = alpha.jsValue + object[Strings.desynchronized] = desynchronized.jsValue + object[Strings.colorSpace] = colorSpace.jsValue + object[Strings.willReadFrequently] = willReadFrequently.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) + _alpha = ReadWriteAttribute(jsObject: object, name: Strings.alpha) + _desynchronized = ReadWriteAttribute(jsObject: object, name: Strings.desynchronized) + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + _willReadFrequently = ReadWriteAttribute(jsObject: object, name: Strings.willReadFrequently) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var exact: UInt32 + public var alpha: Bool @ReadWriteAttribute - public var ideal: UInt32 -} + public var desynchronized: Bool -public class CountQueuingStrategy: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace - public let jsObject: JSObject + @ReadWriteAttribute + public var willReadFrequently: Bool +} - public required init(unsafelyWrapping jsObject: JSObject) { - _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) - _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) - self.jsObject = jsObject +public protocol CanvasShadowStyles: JSBridgedClass {} +public extension CanvasShadowStyles { + @inlinable var shadowOffsetX: Double { + get { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowOffsetX, in: jsObject] = newValue } } - @inlinable public convenience init(init: QueuingStrategyInit) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + @inlinable var shadowOffsetY: Double { + get { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowOffsetY, in: jsObject] = newValue } } - @ReadonlyAttribute - public var highWaterMark: Double + @inlinable var shadowBlur: Double { + get { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowBlur, in: jsObject] = newValue } + } - @ReadonlyAttribute - public var size: JSFunction + @inlinable var shadowColor: String { + get { ReadWriteAttribute[Strings.shadowColor, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.shadowColor, in: jsObject] = newValue } + } } -public class CustomElementRegistry: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CustomElementRegistry].function! } - - public let jsObject: JSObject +public protocol CanvasState: JSBridgedClass {} +public extension CanvasState { + @inlinable func save() { + let this = jsObject + _ = this[Strings.save].function!(this: this, arguments: []) + } - public required init(unsafelyWrapping jsObject: JSObject) { - self.jsObject = jsObject + @inlinable func restore() { + let this = jsObject + _ = this[Strings.restore].function!(this: this, arguments: []) } - @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { + @inlinable func reset() { let this = jsObject - _ = this[Strings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) + _ = this[Strings.reset].function!(this: this, arguments: []) } - @inlinable public func get(name: String) -> CustomElementConstructor? { + @inlinable func isContextLost() -> Bool { let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + return this[Strings.isContextLost].function!(this: this, arguments: []).fromJSValue()! } +} - @inlinable public func whenDefined(name: String) -> JSPromise { +public protocol CanvasText: JSBridgedClass {} +public extension CanvasText { + @inlinable func fillText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { let this = jsObject - return this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + _ = this[Strings.fillText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) } - @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) - @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { + @inlinable func strokeText(text: String, x: Double, y: Double, maxWidth: Double? = nil) { let this = jsObject - let _promise: JSPromise = this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! - return try await _promise.value.fromJSValue()! + _ = this[Strings.strokeText].function!(this: this, arguments: [text.jsValue, x.jsValue, y.jsValue, maxWidth?.jsValue ?? .undefined]) } - @inlinable public func upgrade(root: Node) { + @inlinable func measureText(text: String) -> TextMetrics { let this = jsObject - _ = this[Strings.upgrade].function!(this: this, arguments: [root.jsValue]) + return this[Strings.measureText].function!(this: this, arguments: [text.jsValue]).fromJSValue()! } } -public class CustomEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CustomEvent].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) - super.init(unsafelyWrapping: jsObject) - } +public enum CanvasTextAlign: JSString, JSValueCompatible { + case start = "start" + case end = "end" + case left = "left" + case right = "right" + case center = "center" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CanvasTextBaseline: JSString, JSValueCompatible { + case top = "top" + case hanging = "hanging" + case middle = "middle" + case alphabetic = "alphabetic" + case ideographic = "ideographic" + case bottom = "bottom" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTextDrawingStyles: JSBridgedClass {} +public extension CanvasTextDrawingStyles { + @inlinable var font: String { + get { ReadWriteAttribute[Strings.font, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.font, in: jsObject] = newValue } + } + + @inlinable var textAlign: CanvasTextAlign { + get { ReadWriteAttribute[Strings.textAlign, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textAlign, in: jsObject] = newValue } + } + + @inlinable var textBaseline: CanvasTextBaseline { + get { ReadWriteAttribute[Strings.textBaseline, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textBaseline, in: jsObject] = newValue } + } + + @inlinable var direction: CanvasDirection { + get { ReadWriteAttribute[Strings.direction, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.direction, in: jsObject] = newValue } + } + + @inlinable var letterSpacing: String { + get { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.letterSpacing, in: jsObject] = newValue } + } + + @inlinable var fontKerning: CanvasFontKerning { + get { ReadWriteAttribute[Strings.fontKerning, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontKerning, in: jsObject] = newValue } + } + + @inlinable var fontStretch: CanvasFontStretch { + get { ReadWriteAttribute[Strings.fontStretch, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontStretch, in: jsObject] = newValue } + } + + @inlinable var fontVariantCaps: CanvasFontVariantCaps { + get { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.fontVariantCaps, in: jsObject] = newValue } + } + + @inlinable var textRendering: CanvasTextRendering { + get { ReadWriteAttribute[Strings.textRendering, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.textRendering, in: jsObject] = newValue } + } + + @inlinable var wordSpacing: String { + get { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.wordSpacing, in: jsObject] = newValue } + } +} + +public enum CanvasTextRendering: JSString, JSValueCompatible { + case auto = "auto" + case optimizeSpeed = "optimizeSpeed" + case optimizeLegibility = "optimizeLegibility" + case geometricPrecision = "geometricPrecision" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public protocol CanvasTransform: JSBridgedClass {} +public extension CanvasTransform { + @inlinable func scale(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scale].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func rotate(angle: Double) { + let this = jsObject + _ = this[Strings.rotate].function!(this: this, arguments: [angle.jsValue]) + } + + @inlinable func translate(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.translate].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable func transform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[Strings.transform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func getTransform() -> DOMMatrix { + let this = jsObject + return this[Strings.getTransform].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable func setTransform(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double) { + let _arg0 = a.jsValue + let _arg1 = b.jsValue + let _arg2 = c.jsValue + let _arg3 = d.jsValue + let _arg4 = e.jsValue + let _arg5 = f.jsValue + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5]) + } + + @inlinable func setTransform(transform: DOMMatrix2DInit? = nil) { + let this = jsObject + _ = this[Strings.setTransform].function!(this: this, arguments: [transform?.jsValue ?? .undefined]) + } + + @inlinable func resetTransform() { + let this = jsObject + _ = this[Strings.resetTransform].function!(this: this, arguments: []) + } +} + +public protocol CanvasUserInterface: JSBridgedClass {} +public extension CanvasUserInterface { + @inlinable func drawFocusIfNeeded(element: Element) { + let this = jsObject + _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [element.jsValue]) + } + + @inlinable func drawFocusIfNeeded(path: Path2D, element: Element) { + let this = jsObject + _ = this[Strings.drawFocusIfNeeded].function!(this: this, arguments: [path.jsValue, element.jsValue]) + } + + @inlinable func scrollPathIntoView() { + let this = jsObject + _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: []) + } + + @inlinable func scrollPathIntoView(path: Path2D) { + let this = jsObject + _ = this[Strings.scrollPathIntoView].function!(this: this, arguments: [path.jsValue]) + } +} + +public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadWriteAttribute(jsObject: jsObject, name: Strings.data) + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + super.init(unsafelyWrapping: jsObject) + } + + @ReadWriteAttribute + public var data: String + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func substringData(offset: UInt32, count: UInt32) -> String { + let this = jsObject + return this[Strings.substringData].function!(this: this, arguments: [offset.jsValue, count.jsValue]).fromJSValue()! + } + + @inlinable public func appendData(data: String) { + let this = jsObject + _ = this[Strings.appendData].function!(this: this, arguments: [data.jsValue]) + } + + @inlinable public func insertData(offset: UInt32, data: String) { + let this = jsObject + _ = this[Strings.insertData].function!(this: this, arguments: [offset.jsValue, data.jsValue]) + } + + @inlinable public func deleteData(offset: UInt32, count: UInt32) { + let this = jsObject + _ = this[Strings.deleteData].function!(this: this, arguments: [offset.jsValue, count.jsValue]) + } + + @inlinable public func replaceData(offset: UInt32, count: UInt32, data: String) { + let this = jsObject + _ = this[Strings.replaceData].function!(this: this, arguments: [offset.jsValue, count.jsValue, data.jsValue]) + } +} + +public protocol ChildNode: JSBridgedClass {} +public extension ChildNode { + @inlinable func before(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.before].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func after(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.after].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func replaceWith(nodes: Node_or_String...) { + let this = jsObject + _ = this[Strings.replaceWith].function!(this: this, arguments: nodes.map(\.jsValue)) + } + + @inlinable func remove() { + let this = jsObject + _ = this[Strings.remove].function!(this: this, arguments: []) + } +} + +public class ClientQueryOptions: BridgedDictionary { + public convenience init(includeUncontrolled: Bool, type: ClientType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.includeUncontrolled] = includeUncontrolled.jsValue + object[Strings.type] = type.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _includeUncontrolled = ReadWriteAttribute(jsObject: object, name: Strings.includeUncontrolled) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var includeUncontrolled: Bool + + @ReadWriteAttribute + public var type: ClientType +} + +public enum ClientType: JSString, JSValueCompatible { + case window = "window" + case worker = "worker" + case sharedworker = "sharedworker" + case all = "all" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum 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 } +} + +public enum ColorSpaceConversion: JSString, JSValueCompatible { + case none = "none" + case `default` = "default" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class Comment: CharacterData { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Comment].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(data: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [data?.jsValue ?? .undefined])) + } +} + +public enum CompositeOperation: JSString, JSValueCompatible { + case replace = "replace" + case add = "add" + case accumulate = "accumulate" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public enum CompositeOperationOrAuto: JSString, JSValueCompatible { + case replace = "replace" + case add = "add" + case accumulate = "accumulate" + case auto = "auto" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class CompositionEvent: UIEvent { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CompositionEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _data = ReadonlyAttribute(jsObject: jsObject, name: Strings.data) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: CompositionEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var data: String + + @inlinable public func initCompositionEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: WindowProxy? = nil, dataArg: String? = nil) { + let this = jsObject + _ = this[Strings.initCompositionEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, dataArg?.jsValue ?? .undefined]) + } +} + +public class CompositionEventInit: BridgedDictionary { + public convenience init(data: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.data] = data.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _data = ReadWriteAttribute(jsObject: object, name: Strings.data) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var data: String +} + +public class ComputedEffectTiming: BridgedDictionary { + public convenience init(progress: Double?, currentIteration: Double?) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.progress] = progress.jsValue + object[Strings.currentIteration] = currentIteration.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _progress = ReadWriteAttribute(jsObject: object, name: Strings.progress) + _currentIteration = ReadWriteAttribute(jsObject: object, name: Strings.currentIteration) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var progress: Double? + + @ReadWriteAttribute + public var currentIteration: Double? +} + +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 +} + +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 +} + +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 +} + +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 +} + +public class CountQueuingStrategy: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _highWaterMark = ReadonlyAttribute(jsObject: jsObject, name: Strings.highWaterMark) + _size = ReadonlyAttribute(jsObject: jsObject, name: Strings.size) + self.jsObject = jsObject + } + + @inlinable public convenience init(init: QueuingStrategyInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) + } + + @ReadonlyAttribute + public var highWaterMark: Double + + @ReadonlyAttribute + public var size: JSFunction +} + +public class CustomElementRegistry: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CustomElementRegistry].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public func define(name: String, constructor: CustomElementConstructor, options: ElementDefinitionOptions? = nil) { + let this = jsObject + _ = this[Strings.define].function!(this: this, arguments: [name.jsValue, constructor.jsValue, options?.jsValue ?? .undefined]) + } + + @inlinable public func get(name: String) -> CustomElementConstructor? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @inlinable public func whenDefined(name: String) -> JSPromise { + let this = jsObject + return this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func whenDefined(name: String) async throws -> CustomElementConstructor { + let this = jsObject + let _promise: JSPromise = this[Strings.whenDefined].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func upgrade(root: Node) { + let this = jsObject + _ = this[Strings.upgrade].function!(this: this, arguments: [root.jsValue]) + } +} + +public class CustomEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CustomEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) + super.init(unsafelyWrapping: jsObject) + } @inlinable public convenience init(type: String, eventInitDict: CustomEventInit? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) @@ -4557,98 +5026,308 @@ public extension ElementContentEditable { nonmutating set { ReadWriteAttribute[Strings.enterKeyHint, in: jsObject] = newValue } } - @inlinable var isContentEditable: Bool { ReadonlyAttribute[Strings.isContentEditable, in: jsObject] } + @inlinable var isContentEditable: Bool { ReadonlyAttribute[Strings.isContentEditable, in: jsObject] } + + @inlinable var inputMode: String { + get { ReadWriteAttribute[Strings.inputMode, in: jsObject] } + nonmutating set { ReadWriteAttribute[Strings.inputMode, in: jsObject] = newValue } + } +} + +public class ElementCreationOptions: BridgedDictionary { + public convenience init(is: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.is] = `is`.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _is = ReadWriteAttribute(jsObject: object, name: Strings.is) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var `is`: String +} + +public class ElementDefinitionOptions: BridgedDictionary { + public convenience init(extends: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.extends] = extends.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _extends = ReadWriteAttribute(jsObject: object, name: Strings.extends) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var extends: String +} + +public class ElementInternals: JSBridgedClass, ARIAMixin { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ElementInternals].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) + _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) + _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) + _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) + _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var shadowRoot: ShadowRoot? + + @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { + let this = jsObject + _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var form: HTMLFormElement? + + @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { + let this = jsObject + _ = this[Strings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var willValidate: Bool + + @ReadonlyAttribute + public var validity: ValidityState + + @ReadonlyAttribute + public var validationMessage: String + + @inlinable public func checkValidity() -> Bool { + let this = jsObject + return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func reportValidity() -> Bool { + let this = jsObject + return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var labels: NodeList +} + +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? - @inlinable var inputMode: String { - get { ReadWriteAttribute[Strings.inputMode, in: jsObject] } - nonmutating set { ReadWriteAttribute[Strings.inputMode, in: jsObject] = newValue } + @ReadonlyAttribute + public var byteLength: UInt32 + + @inlinable public func copyTo(destination: BufferSource) { + let this = jsObject + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) } } -public class ElementCreationOptions: BridgedDictionary { - public convenience init(is: String) { +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.is] = `is`.jsValue + 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) { - _is = ReadWriteAttribute(jsObject: object, name: Strings.is) + _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 `is`: String + public var type: EncodedAudioChunkType + + @ReadWriteAttribute + public var timestamp: Int64 + + @ReadWriteAttribute + public var duration: UInt64 + + @ReadWriteAttribute + public var data: BufferSource } -public class ElementDefinitionOptions: BridgedDictionary { - public convenience init(extends: String) { +public class EncodedAudioChunkMetadata: BridgedDictionary { + public convenience init(decoderConfig: AudioDecoderConfig) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.extends] = extends.jsValue + object[Strings.decoderConfig] = decoderConfig.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _extends = ReadWriteAttribute(jsObject: object, name: Strings.extends) + _decoderConfig = ReadWriteAttribute(jsObject: object, name: Strings.decoderConfig) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var extends: String + public var decoderConfig: AudioDecoderConfig } -public class ElementInternals: JSBridgedClass, ARIAMixin { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ElementInternals].function! } +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 } +} + +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) { - _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) - _form = ReadonlyAttribute(jsObject: jsObject, name: Strings.form) - _willValidate = ReadonlyAttribute(jsObject: jsObject, name: Strings.willValidate) - _validity = ReadonlyAttribute(jsObject: jsObject, name: Strings.validity) - _validationMessage = ReadonlyAttribute(jsObject: jsObject, name: Strings.validationMessage) - _labels = ReadonlyAttribute(jsObject: jsObject, name: Strings.labels) + _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 } - @ReadonlyAttribute - public var shadowRoot: ShadowRoot? - - @inlinable public func setFormValue(value: File_or_FormData_or_String?, state: File_or_FormData_or_String? = nil) { - let this = jsObject - _ = this[Strings.setFormValue].function!(this: this, arguments: [value.jsValue, state?.jsValue ?? .undefined]) + @inlinable public convenience init(init: EncodedVideoChunkInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) } @ReadonlyAttribute - public var form: HTMLFormElement? - - @inlinable public func setValidity(flags: ValidityStateFlags? = nil, message: String? = nil, anchor: HTMLElement? = nil) { - let this = jsObject - _ = this[Strings.setValidity].function!(this: this, arguments: [flags?.jsValue ?? .undefined, message?.jsValue ?? .undefined, anchor?.jsValue ?? .undefined]) - } + public var type: EncodedVideoChunkType @ReadonlyAttribute - public var willValidate: Bool + public var timestamp: Int64 @ReadonlyAttribute - public var validity: ValidityState + public var duration: UInt64? @ReadonlyAttribute - public var validationMessage: String + public var byteLength: UInt32 - @inlinable public func checkValidity() -> Bool { + @inlinable public func copyTo(destination: BufferSource) { let this = jsObject - return this[Strings.checkValidity].function!(this: this, arguments: []).fromJSValue()! + _ = this[Strings.copyTo].function!(this: this, arguments: [destination.jsValue]) } +} - @inlinable public func reportValidity() -> Bool { - let this = jsObject - return this[Strings.reportValidity].function!(this: this, arguments: []).fromJSValue()! +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) } - @ReadonlyAttribute - public var labels: NodeList + 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 +} + +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 +} + +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 } } public enum EndingType: JSString, JSValueCompatible { @@ -9183,6 +9862,25 @@ public class HTMLVideoElement: HTMLMediaElement { public var playsInline: Bool } +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 } +} + public class HashChangeEvent: Event { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.HashChangeEvent].function! } @@ -9455,13 +10153,165 @@ public class ImageDataSettings: BridgedDictionary { self.init(unsafelyWrapping: object) } - public required init(unsafelyWrapping object: JSObject) { - _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) - super.init(unsafelyWrapping: object) - } + public required init(unsafelyWrapping object: JSObject) { + _colorSpace = ReadWriteAttribute(jsObject: object, name: Strings.colorSpace) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var colorSpace: PredefinedColorSpace +} + +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 +} + +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 +} + +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()! + } +} + +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 colorSpace: PredefinedColorSpace + public var desiredHeight: UInt32 + + @ReadWriteAttribute + public var preferAnimation: Bool } public class ImageEncodeOptions: BridgedDictionary { @@ -9522,6 +10372,64 @@ public enum ImageSmoothingQuality: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } +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 +} + +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? +} + public class InputDeviceInfo: MediaDeviceInfo { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputDeviceInfo].function! } @@ -9795,6 +10703,24 @@ public class KeyframeEffectOptions: BridgedDictionary { public var pseudoElement: String? } +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 } +} + public class Location: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Location].function! } @@ -11959,6 +12885,27 @@ public class Performance: EventTarget { } } +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 +} + public enum PlaybackDirection: JSString, JSValueCompatible { case normal = "normal" case reverse = "reverse" @@ -13796,6 +14743,22 @@ public class SubmitEventInit: BridgedDictionary { public var submitter: HTMLElement? } +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 +} + public class Text: CharacterData, Slottable { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } @@ -14054,670 +15017,1372 @@ public enum TextTrackMode: JSString, JSValueCompatible { return nil } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) - } + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TimeRanges: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TimeRanges].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public func start(index: UInt32) -> Double { + let this = jsObject + return this[Strings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } + + @inlinable public func end(index: UInt32) -> Double { + let this = jsObject + return this[Strings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + } +} + +public enum TimelinePhase: JSString, JSValueCompatible { + case inactive = "inactive" + case before = "before" + case active = "active" + case after = "after" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class TrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TrackEvent].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: TrackEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var track: AudioTrack_or_TextTrack_or_VideoTrack? +} + +public class TrackEventInit: BridgedDictionary { + public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { + 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: AudioTrack_or_TextTrack_or_VideoTrack? +} + +public class TransformStream: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStream].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _readable = ReadonlyAttribute(jsObject: jsObject, name: Strings.readable) + _writable = ReadonlyAttribute(jsObject: jsObject, name: Strings.writable) + self.jsObject = jsObject + } + + @inlinable public convenience init(transformer: JSObject? = nil, writableStrategy: QueuingStrategy? = nil, readableStrategy: QueuingStrategy? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [transformer?.jsValue ?? .undefined, writableStrategy?.jsValue ?? .undefined, readableStrategy?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var readable: ReadableStream + + @ReadonlyAttribute + public var writable: WritableStream +} + +public class TransformStreamDefaultController: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStreamDefaultController].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var desiredSize: Double? + + @inlinable public func enqueue(chunk: JSValue? = nil) { + let this = jsObject + _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) + } + + @inlinable public func error(reason: JSValue? = nil) { + let this = jsObject + _ = this[Strings.error].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + } + + @inlinable public func terminate() { + let this = jsObject + _ = this[Strings.terminate].function!(this: this, arguments: []) + } +} + +public class Transformer: BridgedDictionary { + public convenience init(start: @escaping TransformerStartCallback, transform: @escaping TransformerTransformCallback, flush: @escaping TransformerFlushCallback, readableType: JSValue, writableType: JSValue) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute2[Strings.transform, in: object] = transform + ClosureAttribute1[Strings.flush, in: object] = flush + object[Strings.readableType] = readableType.jsValue + object[Strings.writableType] = writableType.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _transform = ClosureAttribute2(jsObject: object, name: Strings.transform) + _flush = ClosureAttribute1(jsObject: object, name: Strings.flush) + _readableType = ReadWriteAttribute(jsObject: object, name: Strings.readableType) + _writableType = ReadWriteAttribute(jsObject: object, name: Strings.writableType) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: TransformerStartCallback + + @ClosureAttribute2 + public var transform: TransformerTransformCallback + + @ClosureAttribute1 + public var flush: TransformerFlushCallback + + @ReadWriteAttribute + public var readableType: JSValue - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @ReadWriteAttribute + public var writableType: JSValue } -public class TimeRanges: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TimeRanges].function! } +public class TreeWalker: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TreeWalker].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) + _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) + _currentNode = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentNode) self.jsObject = jsObject } @ReadonlyAttribute - public var length: UInt32 + public var root: Node - @inlinable public func start(index: UInt32) -> Double { + @ReadonlyAttribute + public var whatToShow: UInt32 + + // XXX: member 'filter' is ignored + + @ReadWriteAttribute + public var currentNode: Node + + @inlinable public func parentNode() -> Node? { let this = jsObject - return this[Strings.start].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + return this[Strings.parentNode].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public func end(index: UInt32) -> Double { + @inlinable public func firstChild() -> Node? { let this = jsObject - return this[Strings.end].function!(this: this, arguments: [index.jsValue]).fromJSValue()! + return this[Strings.firstChild].function!(this: this, arguments: []).fromJSValue()! } -} -public enum TimelinePhase: JSString, JSValueCompatible { - case inactive = "inactive" - case before = "before" - case active = "active" - case after = "after" + @inlinable public func lastChild() -> Node? { + let this = jsObject + return this[Strings.lastChild].function!(this: this, arguments: []).fromJSValue()! + } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable public func previousSibling() -> Node? { + let this = jsObject + return this[Strings.previousSibling].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public func nextSibling() -> Node? { + let this = jsObject + return this[Strings.nextSibling].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public var jsValue: JSValue { rawValue.jsValue } + @inlinable public func previousNode() -> Node? { + let this = jsObject + return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func nextNode() -> Node? { + let this = jsObject + return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! + } } -public class TrackEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.TrackEvent].function! } +public typealias CanvasFilterInput = [String: JSValue] + +public typealias EventHandler = EventHandlerNonNull? +public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? +public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? + +public typealias DOMHighResTimeStamp = Double +public typealias EpochTimeStamp = UInt64 + +public typealias DOMTimeStamp = UInt64 + +public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void +public typealias BlobCallback = (Blob?) -> Void +public typealias FunctionStringCallback = (String) -> Void +public typealias EventHandlerNonNull = (Event) -> JSValue +public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue +public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? +public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void +public typealias VoidFunction = () -> Void +public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue +public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise +public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise +public typealias UnderlyingSinkStartCallback = (WritableStreamDefaultController) -> JSValue +public typealias UnderlyingSinkWriteCallback = (JSValue, WritableStreamDefaultController) -> JSPromise +public typealias UnderlyingSinkCloseCallback = () -> JSPromise +public typealias UnderlyingSinkAbortCallback = (JSValue) -> JSPromise +public typealias TransformerStartCallback = (TransformStreamDefaultController) -> JSValue +public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise +public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise +public typealias QueuingStrategySize = (JSValue) -> Double +public typealias NavigatorUserMediaSuccessCallback = (MediaStream) -> Void +public typealias NavigatorUserMediaErrorCallback = (DOMException) -> Void +public typealias AudioDataOutputCallback = (AudioData) -> Void +public typealias VideoFrameOutputCallback = (VideoFrame) -> Void +public typealias EncodedAudioChunkOutputCallback = (EncodedAudioChunk, EncodedAudioChunkMetadata) -> Void +public typealias EncodedVideoChunkOutputCallback = (EncodedVideoChunk, EncodedVideoChunkMetadata) -> Void +public typealias WebCodecsErrorCallback = (DOMException) -> Void +public class UIEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } public required init(unsafelyWrapping jsObject: JSObject) { - _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) + _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) + _which = ReadonlyAttribute(jsObject: jsObject, name: Strings.which) super.init(unsafelyWrapping: jsObject) } - @inlinable public convenience init(type: String, eventInitDict: TrackEventInit? = nil) { + @inlinable public convenience init(type: String, eventInitDict: UIEventInit? = nil) { self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) } @ReadonlyAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? + public var view: Window? + + @ReadonlyAttribute + public var detail: Int32 + + @inlinable public func initUIEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil) { + let this = jsObject + _ = this[Strings.initUIEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, detailArg?.jsValue ?? .undefined]) + } + + @ReadonlyAttribute + public var which: UInt32 } -public class TrackEventInit: BridgedDictionary { - public convenience init(track: AudioTrack_or_TextTrack_or_VideoTrack?) { +public class UIEventInit: BridgedDictionary { + public convenience init(view: Window?, detail: Int32, which: UInt32) { let object = JSObject.global[Strings.Object].function!.new() - object[Strings.track] = track.jsValue + object[Strings.view] = view.jsValue + object[Strings.detail] = detail.jsValue + object[Strings.which] = which.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _track = ReadWriteAttribute(jsObject: object, name: Strings.track) + _view = ReadWriteAttribute(jsObject: object, name: Strings.view) + _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) + _which = ReadWriteAttribute(jsObject: object, name: Strings.which) super.init(unsafelyWrapping: object) } @ReadWriteAttribute - public var track: AudioTrack_or_TextTrack_or_VideoTrack? + public var view: Window? + + @ReadWriteAttribute + public var detail: Int32 + + @ReadWriteAttribute + public var which: UInt32 } -public class TransformStream: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStream].function! } +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 +} + +public class URL: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _readable = ReadonlyAttribute(jsObject: jsObject, name: Strings.readable) - _writable = ReadonlyAttribute(jsObject: jsObject, name: Strings.writable) + _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) + _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) + _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) + _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) + _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) + _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) + _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) + _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) + _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) + _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) + _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) + _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) self.jsObject = jsObject } - @inlinable public convenience init(transformer: JSObject? = nil, writableStrategy: QueuingStrategy? = nil, readableStrategy: QueuingStrategy? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [transformer?.jsValue ?? .undefined, writableStrategy?.jsValue ?? .undefined, readableStrategy?.jsValue ?? .undefined])) + @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { + let this = constructor + return this[Strings.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! + } + + @inlinable public static func revokeObjectURL(url: String) { + let this = constructor + _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) } + @inlinable public convenience init(url: String, base: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) + } + + @ReadWriteAttribute + public var href: String + @ReadonlyAttribute - public var readable: ReadableStream + public var origin: String + + @ReadWriteAttribute + public var `protocol`: String + + @ReadWriteAttribute + public var username: String + + @ReadWriteAttribute + public var password: String + + @ReadWriteAttribute + public var host: String + + @ReadWriteAttribute + public var hostname: String + + @ReadWriteAttribute + public var port: String + + @ReadWriteAttribute + public var pathname: String + + @ReadWriteAttribute + public var search: String @ReadonlyAttribute - public var writable: WritableStream + public var searchParams: URLSearchParams + + @ReadWriteAttribute + public var hash: String + + @inlinable public func toJSON() -> String { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } } -public class TransformStreamDefaultController: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TransformStreamDefaultController].function! } +public class URLSearchParams: JSBridgedClass, Sequence { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } public let jsObject: JSObject - public required init(unsafelyWrapping jsObject: JSObject) { - _desiredSize = ReadonlyAttribute(jsObject: jsObject, name: Strings.desiredSize) - self.jsObject = jsObject + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject + } + + @inlinable public convenience init(init: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + } + + @inlinable public func append(name: String, value: String) { + let this = jsObject + _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) + } + + @inlinable public func delete(name: String) { + let this = jsObject + _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + } + + @inlinable public func get(name: String) -> String? { + let this = jsObject + return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! } - @ReadonlyAttribute - public var desiredSize: Double? + @inlinable public func getAll(name: String) -> [String] { + let this = jsObject + return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + } - @inlinable public func enqueue(chunk: JSValue? = nil) { + @inlinable public func has(name: String) -> Bool { let this = jsObject - _ = this[Strings.enqueue].function!(this: this, arguments: [chunk?.jsValue ?? .undefined]) + return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! } - @inlinable public func error(reason: JSValue? = nil) { + @inlinable public func set(name: String, value: String) { let this = jsObject - _ = this[Strings.error].function!(this: this, arguments: [reason?.jsValue ?? .undefined]) + _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) } - @inlinable public func terminate() { + @inlinable public func sort() { let this = jsObject - _ = this[Strings.terminate].function!(this: this, arguments: []) + _ = this[Strings.sort].function!(this: this, arguments: []) + } + + public typealias Element = String + public func makeIterator() -> ValueIterableIterator { + ValueIterableIterator(sequence: self) + } + + @inlinable public var description: String { + jsObject[Strings.toString]!().fromJSValue()! } } -public class Transformer: BridgedDictionary { - public convenience init(start: @escaping TransformerStartCallback, transform: @escaping TransformerTransformCallback, flush: @escaping TransformerFlushCallback, readableType: JSValue, writableType: JSValue) { +public class UnderlyingSink: BridgedDictionary { + public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { let object = JSObject.global[Strings.Object].function!.new() ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute2[Strings.transform, in: object] = transform - ClosureAttribute1[Strings.flush, in: object] = flush - object[Strings.readableType] = readableType.jsValue - object[Strings.writableType] = writableType.jsValue + ClosureAttribute2[Strings.write, in: object] = write + ClosureAttribute0[Strings.close, in: object] = close + ClosureAttribute1[Strings.abort, in: object] = abort + object[Strings.type] = type.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _transform = ClosureAttribute2(jsObject: object, name: Strings.transform) - _flush = ClosureAttribute1(jsObject: object, name: Strings.flush) - _readableType = ReadWriteAttribute(jsObject: object, name: Strings.readableType) - _writableType = ReadWriteAttribute(jsObject: object, name: Strings.writableType) + _write = ClosureAttribute2(jsObject: object, name: Strings.write) + _close = ClosureAttribute0(jsObject: object, name: Strings.close) + _abort = ClosureAttribute1(jsObject: object, name: Strings.abort) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) super.init(unsafelyWrapping: object) } @ClosureAttribute1 - public var start: TransformerStartCallback + public var start: UnderlyingSinkStartCallback @ClosureAttribute2 - public var transform: TransformerTransformCallback + public var write: UnderlyingSinkWriteCallback + + @ClosureAttribute0 + public var close: UnderlyingSinkCloseCallback @ClosureAttribute1 - public var flush: TransformerFlushCallback + public var abort: UnderlyingSinkAbortCallback @ReadWriteAttribute - public var readableType: JSValue + public var type: JSValue +} + +public class UnderlyingSource: BridgedDictionary { + public convenience init(start: @escaping UnderlyingSourceStartCallback, pull: @escaping UnderlyingSourcePullCallback, cancel: @escaping UnderlyingSourceCancelCallback, type: ReadableStreamType, autoAllocateChunkSize: UInt64) { + let object = JSObject.global[Strings.Object].function!.new() + ClosureAttribute1[Strings.start, in: object] = start + ClosureAttribute1[Strings.pull, in: object] = pull + ClosureAttribute1[Strings.cancel, in: object] = cancel + object[Strings.type] = type.jsValue + object[Strings.autoAllocateChunkSize] = autoAllocateChunkSize.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _start = ClosureAttribute1(jsObject: object, name: Strings.start) + _pull = ClosureAttribute1(jsObject: object, name: Strings.pull) + _cancel = ClosureAttribute1(jsObject: object, name: Strings.cancel) + _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _autoAllocateChunkSize = ReadWriteAttribute(jsObject: object, name: Strings.autoAllocateChunkSize) + super.init(unsafelyWrapping: object) + } + + @ClosureAttribute1 + public var start: UnderlyingSourceStartCallback + + @ClosureAttribute1 + public var pull: UnderlyingSourcePullCallback + + @ClosureAttribute1 + public var cancel: UnderlyingSourceCancelCallback @ReadWriteAttribute - public var writableType: JSValue + public var type: ReadableStreamType + + @ReadWriteAttribute + public var autoAllocateChunkSize: UInt64 } -public class TreeWalker: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.TreeWalker].function! } +public class ValidityState: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ValidityState].function! } public let jsObject: JSObject public required init(unsafelyWrapping jsObject: JSObject) { - _root = ReadonlyAttribute(jsObject: jsObject, name: Strings.root) - _whatToShow = ReadonlyAttribute(jsObject: jsObject, name: Strings.whatToShow) - _currentNode = ReadWriteAttribute(jsObject: jsObject, name: Strings.currentNode) + _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: Strings.valueMissing) + _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.typeMismatch) + _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.patternMismatch) + _tooLong = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooLong) + _tooShort = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooShort) + _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeUnderflow) + _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeOverflow) + _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.stepMismatch) + _badInput = ReadonlyAttribute(jsObject: jsObject, name: Strings.badInput) + _customError = ReadonlyAttribute(jsObject: jsObject, name: Strings.customError) + _valid = ReadonlyAttribute(jsObject: jsObject, name: Strings.valid) self.jsObject = jsObject } @ReadonlyAttribute - public var root: Node + public var valueMissing: Bool @ReadonlyAttribute - public var whatToShow: UInt32 + public var typeMismatch: Bool - // XXX: member 'filter' is ignored + @ReadonlyAttribute + public var patternMismatch: Bool - @ReadWriteAttribute - public var currentNode: Node + @ReadonlyAttribute + public var tooLong: Bool - @inlinable public func parentNode() -> Node? { - let this = jsObject - return this[Strings.parentNode].function!(this: this, arguments: []).fromJSValue()! - } + @ReadonlyAttribute + public var tooShort: Bool - @inlinable public func firstChild() -> Node? { - let this = jsObject - return this[Strings.firstChild].function!(this: this, arguments: []).fromJSValue()! - } + @ReadonlyAttribute + public var rangeUnderflow: Bool - @inlinable public func lastChild() -> Node? { - let this = jsObject - return this[Strings.lastChild].function!(this: this, arguments: []).fromJSValue()! - } + @ReadonlyAttribute + public var rangeOverflow: Bool - @inlinable public func previousSibling() -> Node? { - let this = jsObject - return this[Strings.previousSibling].function!(this: this, arguments: []).fromJSValue()! - } + @ReadonlyAttribute + public var stepMismatch: Bool - @inlinable public func nextSibling() -> Node? { - let this = jsObject - return this[Strings.nextSibling].function!(this: this, arguments: []).fromJSValue()! - } + @ReadonlyAttribute + public var badInput: Bool - @inlinable public func previousNode() -> Node? { - let this = jsObject - return this[Strings.previousNode].function!(this: this, arguments: []).fromJSValue()! + @ReadonlyAttribute + public var customError: Bool + + @ReadonlyAttribute + public var valid: Bool +} + +public class ValidityStateFlags: BridgedDictionary { + public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.valueMissing] = valueMissing.jsValue + object[Strings.typeMismatch] = typeMismatch.jsValue + object[Strings.patternMismatch] = patternMismatch.jsValue + object[Strings.tooLong] = tooLong.jsValue + object[Strings.tooShort] = tooShort.jsValue + object[Strings.rangeUnderflow] = rangeUnderflow.jsValue + object[Strings.rangeOverflow] = rangeOverflow.jsValue + object[Strings.stepMismatch] = stepMismatch.jsValue + object[Strings.badInput] = badInput.jsValue + object[Strings.customError] = customError.jsValue + self.init(unsafelyWrapping: object) } - @inlinable public func nextNode() -> Node? { - let this = jsObject - return this[Strings.nextNode].function!(this: this, arguments: []).fromJSValue()! + public required init(unsafelyWrapping object: JSObject) { + _valueMissing = ReadWriteAttribute(jsObject: object, name: Strings.valueMissing) + _typeMismatch = ReadWriteAttribute(jsObject: object, name: Strings.typeMismatch) + _patternMismatch = ReadWriteAttribute(jsObject: object, name: Strings.patternMismatch) + _tooLong = ReadWriteAttribute(jsObject: object, name: Strings.tooLong) + _tooShort = ReadWriteAttribute(jsObject: object, name: Strings.tooShort) + _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeUnderflow) + _rangeOverflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeOverflow) + _stepMismatch = ReadWriteAttribute(jsObject: object, name: Strings.stepMismatch) + _badInput = ReadWriteAttribute(jsObject: object, name: Strings.badInput) + _customError = ReadWriteAttribute(jsObject: object, name: Strings.customError) + super.init(unsafelyWrapping: object) } -} -public typealias CanvasFilterInput = [String: JSValue] + @ReadWriteAttribute + public var valueMissing: Bool -public typealias EventHandler = EventHandlerNonNull? -public typealias OnErrorEventHandler = OnErrorEventHandlerNonNull? -public typealias OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull? + @ReadWriteAttribute + public var typeMismatch: Bool -public typealias DOMHighResTimeStamp = Double -public typealias EpochTimeStamp = UInt64 + @ReadWriteAttribute + public var patternMismatch: Bool -public typealias DOMTimeStamp = UInt64 + @ReadWriteAttribute + public var tooLong: Bool -public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void -public typealias BlobCallback = (Blob?) -> Void -public typealias FunctionStringCallback = (String) -> Void -public typealias EventHandlerNonNull = (Event) -> JSValue -public typealias OnErrorEventHandlerNonNull = (Event_or_String, String, UInt32, UInt32, JSValue) -> JSValue -public typealias OnBeforeUnloadEventHandlerNonNull = (Event) -> String? -public typealias FrameRequestCallback = (DOMHighResTimeStamp) -> Void -public typealias VoidFunction = () -> Void -public typealias UnderlyingSourceStartCallback = (ReadableStreamController) -> JSValue -public typealias UnderlyingSourcePullCallback = (ReadableStreamController) -> JSPromise -public typealias UnderlyingSourceCancelCallback = (JSValue) -> JSPromise -public typealias UnderlyingSinkStartCallback = (WritableStreamDefaultController) -> JSValue -public typealias UnderlyingSinkWriteCallback = (JSValue, WritableStreamDefaultController) -> JSPromise -public typealias UnderlyingSinkCloseCallback = () -> JSPromise -public typealias UnderlyingSinkAbortCallback = (JSValue) -> JSPromise -public typealias TransformerStartCallback = (TransformStreamDefaultController) -> JSValue -public typealias TransformerFlushCallback = (TransformStreamDefaultController) -> JSPromise -public typealias TransformerTransformCallback = (JSValue, TransformStreamDefaultController) -> JSPromise -public typealias QueuingStrategySize = (JSValue) -> Double -public typealias NavigatorUserMediaSuccessCallback = (MediaStream) -> Void -public typealias NavigatorUserMediaErrorCallback = (DOMException) -> Void -public class UIEvent: Event { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.UIEvent].function! } + @ReadWriteAttribute + public var tooShort: Bool + + @ReadWriteAttribute + public var rangeUnderflow: Bool + + @ReadWriteAttribute + public var rangeOverflow: Bool + + @ReadWriteAttribute + public var stepMismatch: Bool + + @ReadWriteAttribute + public var badInput: Bool + + @ReadWriteAttribute + public var customError: Bool +} + +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 } +} + +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) { - _view = ReadonlyAttribute(jsObject: jsObject, name: Strings.view) - _detail = ReadonlyAttribute(jsObject: jsObject, name: Strings.detail) - _which = ReadonlyAttribute(jsObject: jsObject, name: Strings.which) - super.init(unsafelyWrapping: 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(type: String, eventInitDict: UIEventInit? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + @inlinable public convenience init(init: VideoColorSpaceInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) } @ReadonlyAttribute - public var view: Window? + public var primaries: VideoColorPrimaries? @ReadonlyAttribute - public var detail: Int32 + public var transfer: VideoTransferCharacteristics? - @inlinable public func initUIEvent(typeArg: String, bubblesArg: Bool? = nil, cancelableArg: Bool? = nil, viewArg: Window? = nil, detailArg: Int32? = nil) { - let this = jsObject - _ = this[Strings.initUIEvent].function!(this: this, arguments: [typeArg.jsValue, bubblesArg?.jsValue ?? .undefined, cancelableArg?.jsValue ?? .undefined, viewArg?.jsValue ?? .undefined, detailArg?.jsValue ?? .undefined]) - } + @ReadonlyAttribute + public var matrix: VideoMatrixCoefficients? @ReadonlyAttribute - public var which: UInt32 + public var fullRange: Bool? + + @inlinable public func toJSON() -> VideoColorSpaceInit { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } } -public class UIEventInit: BridgedDictionary { - public convenience init(view: Window?, detail: Int32, which: UInt32) { +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.view] = view.jsValue - object[Strings.detail] = detail.jsValue - object[Strings.which] = which.jsValue + 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) { - _view = ReadWriteAttribute(jsObject: object, name: Strings.view) - _detail = ReadWriteAttribute(jsObject: object, name: Strings.detail) - _which = ReadWriteAttribute(jsObject: object, name: Strings.which) + _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 view: Window? + public var primaries: VideoColorPrimaries @ReadWriteAttribute - public var detail: Int32 + public var transfer: VideoTransferCharacteristics @ReadWriteAttribute - public var which: UInt32 + public var matrix: VideoMatrixCoefficients + + @ReadWriteAttribute + public var fullRange: Bool } -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 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 } - public required init(unsafelyWrapping object: JSObject) { - _max = ReadWriteAttribute(jsObject: object, name: Strings.max) - _min = ReadWriteAttribute(jsObject: object, name: Strings.min) - super.init(unsafelyWrapping: object) + @inlinable public convenience init(init: VideoDecoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) } - @ReadWriteAttribute - public var max: UInt32 + @ReadonlyAttribute + public var state: CodecState - @ReadWriteAttribute - public var min: UInt32 -} + @ReadonlyAttribute + public var decodeQueueSize: UInt32 -public class URL: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URL].function! } + @inlinable public func configure(config: VideoDecoderConfig) { + let this = jsObject + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) + } - public let jsObject: JSObject + @inlinable public func decode(chunk: EncodedVideoChunk) { + let this = jsObject + _ = this[Strings.decode].function!(this: this, arguments: [chunk.jsValue]) + } - public required init(unsafelyWrapping jsObject: JSObject) { - _href = ReadWriteAttribute(jsObject: jsObject, name: Strings.href) - _origin = ReadonlyAttribute(jsObject: jsObject, name: Strings.origin) - _protocol = ReadWriteAttribute(jsObject: jsObject, name: Strings.protocol) - _username = ReadWriteAttribute(jsObject: jsObject, name: Strings.username) - _password = ReadWriteAttribute(jsObject: jsObject, name: Strings.password) - _host = ReadWriteAttribute(jsObject: jsObject, name: Strings.host) - _hostname = ReadWriteAttribute(jsObject: jsObject, name: Strings.hostname) - _port = ReadWriteAttribute(jsObject: jsObject, name: Strings.port) - _pathname = ReadWriteAttribute(jsObject: jsObject, name: Strings.pathname) - _search = ReadWriteAttribute(jsObject: jsObject, name: Strings.search) - _searchParams = ReadonlyAttribute(jsObject: jsObject, name: Strings.searchParams) - _hash = ReadWriteAttribute(jsObject: jsObject, name: Strings.hash) - self.jsObject = jsObject + @inlinable public func flush() -> JSPromise { + let this = jsObject + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public static func createObjectURL(obj: Blob_or_MediaSource) -> String { + @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.createObjectURL].function!(this: this, arguments: [obj.jsValue]).fromJSValue()! + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! } - @inlinable public static func revokeObjectURL(url: String) { + @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 - _ = this[Strings.revokeObjectURL].function!(this: this, arguments: [url.jsValue]) + let _promise: JSPromise = this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! + return try await _promise.value.fromJSValue()! } +} - @inlinable public convenience init(url: String, base: String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [url.jsValue, base?.jsValue ?? .undefined])) +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) } - @ReadWriteAttribute - public var href: String + 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) + } - @ReadonlyAttribute - public var origin: String + @ReadWriteAttribute + public var codec: String @ReadWriteAttribute - public var `protocol`: String + public var description: BufferSource @ReadWriteAttribute - public var username: String + public var codedWidth: UInt32 @ReadWriteAttribute - public var password: String + public var codedHeight: UInt32 @ReadWriteAttribute - public var host: String + public var displayAspectWidth: UInt32 @ReadWriteAttribute - public var hostname: String + public var displayAspectHeight: UInt32 @ReadWriteAttribute - public var port: String + public var colorSpace: VideoColorSpaceInit @ReadWriteAttribute - public var pathname: String + public var hardwareAcceleration: HardwareAcceleration @ReadWriteAttribute - public var search: String + public var optimizeForLatency: Bool +} - @ReadonlyAttribute - public var searchParams: URLSearchParams +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) + } - @ReadWriteAttribute - public var hash: String + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute1Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } - @inlinable public func toJSON() -> String { - let this = jsObject - return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + @ClosureAttribute1Void + public var output: VideoFrameOutputCallback + + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback +} + +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 } -public class URLSearchParams: JSBridgedClass, Sequence { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.URLSearchParams].function! } +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: String_or_record_String_to_String_or_seq_of_seq_of_String? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`?.jsValue ?? .undefined])) + @inlinable public convenience init(init: VideoEncoderInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [`init`.jsValue])) } - @inlinable public func append(name: String, value: String) { - let this = jsObject - _ = this[Strings.append].function!(this: this, arguments: [name.jsValue, value.jsValue]) - } + @ReadonlyAttribute + public var state: CodecState - @inlinable public func delete(name: String) { + @ReadonlyAttribute + public var encodeQueueSize: UInt32 + + @inlinable public func configure(config: VideoEncoderConfig) { let this = jsObject - _ = this[Strings.delete].function!(this: this, arguments: [name.jsValue]) + _ = this[Strings.configure].function!(this: this, arguments: [config.jsValue]) } - @inlinable public func get(name: String) -> String? { + @inlinable public func encode(frame: VideoFrame, options: VideoEncoderEncodeOptions? = nil) { let this = jsObject - return this[Strings.get].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + _ = this[Strings.encode].function!(this: this, arguments: [frame.jsValue, options?.jsValue ?? .undefined]) } - @inlinable public func getAll(name: String) -> [String] { + @inlinable public func flush() -> JSPromise { let this = jsObject - return this[Strings.getAll].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + return this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! } - @inlinable public func has(name: String) -> Bool { + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func flush() async throws { let this = jsObject - return this[Strings.has].function!(this: this, arguments: [name.jsValue]).fromJSValue()! + let _promise: JSPromise = this[Strings.flush].function!(this: this, arguments: []).fromJSValue()! + _ = try await _promise.value } - @inlinable public func set(name: String, value: String) { + @inlinable public func reset() { let this = jsObject - _ = this[Strings.set].function!(this: this, arguments: [name.jsValue, value.jsValue]) + _ = this[Strings.reset].function!(this: this, arguments: []) } - @inlinable public func sort() { + @inlinable public func close() { let this = jsObject - _ = this[Strings.sort].function!(this: this, arguments: []) + _ = this[Strings.close].function!(this: this, arguments: []) } - public typealias Element = String - public func makeIterator() -> ValueIterableIterator { - ValueIterableIterator(sequence: self) + @inlinable public static func isConfigSupported(config: VideoEncoderConfig) -> JSPromise { + let this = constructor + return this[Strings.isConfigSupported].function!(this: this, arguments: [config.jsValue]).fromJSValue()! } - @inlinable public var description: String { - jsObject[Strings.toString]!().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()! } } -public class UnderlyingSink: BridgedDictionary { - public convenience init(start: @escaping UnderlyingSinkStartCallback, write: @escaping UnderlyingSinkWriteCallback, close: @escaping UnderlyingSinkCloseCallback, abort: @escaping UnderlyingSinkAbortCallback, type: JSValue) { +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() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute2[Strings.write, in: object] = write - ClosureAttribute0[Strings.close, in: object] = close - ClosureAttribute1[Strings.abort, in: object] = abort - object[Strings.type] = type.jsValue + 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 +} + +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) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _write = ClosureAttribute2(jsObject: object, name: Strings.write) - _close = ClosureAttribute0(jsObject: object, name: Strings.close) - _abort = ClosureAttribute1(jsObject: object, name: Strings.abort) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) + _keyFrame = ReadWriteAttribute(jsObject: object, name: Strings.keyFrame) super.init(unsafelyWrapping: object) } - @ClosureAttribute1 - public var start: UnderlyingSinkStartCallback + @ReadWriteAttribute + public var keyFrame: Bool +} - @ClosureAttribute2 - public var write: UnderlyingSinkWriteCallback +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) + } - @ClosureAttribute0 - public var close: UnderlyingSinkCloseCallback + public required init(unsafelyWrapping object: JSObject) { + _output = ClosureAttribute2Void(jsObject: object, name: Strings.output) + _error = ClosureAttribute1Void(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } - @ClosureAttribute1 - public var abort: UnderlyingSinkAbortCallback + @ClosureAttribute2Void + public var output: EncodedVideoChunkOutputCallback - @ReadWriteAttribute - public var type: JSValue + @ClosureAttribute1Void + public var error: WebCodecsErrorCallback } -public class UnderlyingSource: BridgedDictionary { - public convenience init(start: @escaping UnderlyingSourceStartCallback, pull: @escaping UnderlyingSourcePullCallback, cancel: @escaping UnderlyingSourceCancelCallback, type: ReadableStreamType, autoAllocateChunkSize: UInt64) { +public class VideoEncoderSupport: BridgedDictionary { + public convenience init(supported: Bool, config: VideoEncoderConfig) { let object = JSObject.global[Strings.Object].function!.new() - ClosureAttribute1[Strings.start, in: object] = start - ClosureAttribute1[Strings.pull, in: object] = pull - ClosureAttribute1[Strings.cancel, in: object] = cancel - object[Strings.type] = type.jsValue - object[Strings.autoAllocateChunkSize] = autoAllocateChunkSize.jsValue + object[Strings.supported] = supported.jsValue + object[Strings.config] = config.jsValue self.init(unsafelyWrapping: object) } public required init(unsafelyWrapping object: JSObject) { - _start = ClosureAttribute1(jsObject: object, name: Strings.start) - _pull = ClosureAttribute1(jsObject: object, name: Strings.pull) - _cancel = ClosureAttribute1(jsObject: object, name: Strings.cancel) - _type = ReadWriteAttribute(jsObject: object, name: Strings.type) - _autoAllocateChunkSize = ReadWriteAttribute(jsObject: object, name: Strings.autoAllocateChunkSize) + _supported = ReadWriteAttribute(jsObject: object, name: Strings.supported) + _config = ReadWriteAttribute(jsObject: object, name: Strings.config) super.init(unsafelyWrapping: object) } - @ClosureAttribute1 - public var start: UnderlyingSourceStartCallback + @ReadWriteAttribute + public var supported: Bool - @ClosureAttribute1 - public var pull: UnderlyingSourcePullCallback + @ReadWriteAttribute + public var config: VideoEncoderConfig +} - @ClosureAttribute1 - public var cancel: UnderlyingSourceCancelCallback +public enum VideoFacingModeEnum: JSString, JSValueCompatible { + case user = "user" + case environment = "environment" + case left = "left" + case right = "right" - @ReadWriteAttribute - public var type: ReadableStreamType + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } - @ReadWriteAttribute - public var autoAllocateChunkSize: UInt64 + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public class ValidityState: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.ValidityState].function! } +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) { - _valueMissing = ReadonlyAttribute(jsObject: jsObject, name: Strings.valueMissing) - _typeMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.typeMismatch) - _patternMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.patternMismatch) - _tooLong = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooLong) - _tooShort = ReadonlyAttribute(jsObject: jsObject, name: Strings.tooShort) - _rangeUnderflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeUnderflow) - _rangeOverflow = ReadonlyAttribute(jsObject: jsObject, name: Strings.rangeOverflow) - _stepMismatch = ReadonlyAttribute(jsObject: jsObject, name: Strings.stepMismatch) - _badInput = ReadonlyAttribute(jsObject: jsObject, name: Strings.badInput) - _customError = ReadonlyAttribute(jsObject: jsObject, name: Strings.customError) - _valid = ReadonlyAttribute(jsObject: jsObject, name: Strings.valid) + _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 } - @ReadonlyAttribute - public var valueMissing: Bool + @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 typeMismatch: Bool + public var format: VideoPixelFormat? @ReadonlyAttribute - public var patternMismatch: Bool + public var codedWidth: UInt32 @ReadonlyAttribute - public var tooLong: Bool + public var codedHeight: UInt32 @ReadonlyAttribute - public var tooShort: Bool + public var codedRect: DOMRectReadOnly? @ReadonlyAttribute - public var rangeUnderflow: Bool + public var visibleRect: DOMRectReadOnly? @ReadonlyAttribute - public var rangeOverflow: Bool + public var displayWidth: UInt32 @ReadonlyAttribute - public var stepMismatch: Bool + public var displayHeight: UInt32 @ReadonlyAttribute - public var badInput: Bool + public var duration: UInt64? @ReadonlyAttribute - public var customError: Bool + public var timestamp: Int64? @ReadonlyAttribute - public var valid: Bool + 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: []) + } } -public class ValidityStateFlags: BridgedDictionary { - public convenience init(valueMissing: Bool, typeMismatch: Bool, patternMismatch: Bool, tooLong: Bool, tooShort: Bool, rangeUnderflow: Bool, rangeOverflow: Bool, stepMismatch: Bool, badInput: Bool, customError: Bool) { +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.valueMissing] = valueMissing.jsValue - object[Strings.typeMismatch] = typeMismatch.jsValue - object[Strings.patternMismatch] = patternMismatch.jsValue - object[Strings.tooLong] = tooLong.jsValue - object[Strings.tooShort] = tooShort.jsValue - object[Strings.rangeUnderflow] = rangeUnderflow.jsValue - object[Strings.rangeOverflow] = rangeOverflow.jsValue - object[Strings.stepMismatch] = stepMismatch.jsValue - object[Strings.badInput] = badInput.jsValue - object[Strings.customError] = customError.jsValue + 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) { - _valueMissing = ReadWriteAttribute(jsObject: object, name: Strings.valueMissing) - _typeMismatch = ReadWriteAttribute(jsObject: object, name: Strings.typeMismatch) - _patternMismatch = ReadWriteAttribute(jsObject: object, name: Strings.patternMismatch) - _tooLong = ReadWriteAttribute(jsObject: object, name: Strings.tooLong) - _tooShort = ReadWriteAttribute(jsObject: object, name: Strings.tooShort) - _rangeUnderflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeUnderflow) - _rangeOverflow = ReadWriteAttribute(jsObject: object, name: Strings.rangeOverflow) - _stepMismatch = ReadWriteAttribute(jsObject: object, name: Strings.stepMismatch) - _badInput = ReadWriteAttribute(jsObject: object, name: Strings.badInput) - _customError = ReadWriteAttribute(jsObject: object, name: Strings.customError) + _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 valueMissing: Bool + public var format: VideoPixelFormat @ReadWriteAttribute - public var typeMismatch: Bool + public var codedWidth: UInt32 @ReadWriteAttribute - public var patternMismatch: Bool + public var codedHeight: UInt32 @ReadWriteAttribute - public var tooLong: Bool + public var timestamp: Int64 @ReadWriteAttribute - public var tooShort: Bool + public var duration: UInt64 @ReadWriteAttribute - public var rangeUnderflow: Bool + public var layout: [PlaneLayout] @ReadWriteAttribute - public var rangeOverflow: Bool + public var visibleRect: DOMRectInit @ReadWriteAttribute - public var stepMismatch: Bool + public var displayWidth: UInt32 @ReadWriteAttribute - public var badInput: Bool + public var displayHeight: UInt32 @ReadWriteAttribute - public var customError: Bool + public var colorSpace: VideoColorSpaceInit } -public enum VideoFacingModeEnum: JSString, JSValueCompatible { - case user = "user" - case environment = "environment" - case left = "left" - case right = "right" +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] +} + +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 +} + +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 } +} + +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 { @@ -14818,6 +16483,25 @@ public class VideoTrackList: EventTarget { public var onremovetrack: EventHandler } +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 } +} + public class WheelEvent: MouseEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } @@ -16437,6 +18121,9 @@ public enum console { @usableFromInline static let AnimationEffect: JSString = "AnimationEffect" @usableFromInline static let AnimationTimeline: JSString = "AnimationTimeline" @usableFromInline static let Attr: JSString = "Attr" + @usableFromInline static let AudioData: JSString = "AudioData" + @usableFromInline static let AudioDecoder: JSString = "AudioDecoder" + @usableFromInline static let AudioEncoder: JSString = "AudioEncoder" @usableFromInline static let AudioTrack: JSString = "AudioTrack" @usableFromInline static let AudioTrackList: JSString = "AudioTrackList" @usableFromInline static let BarProp: JSString = "BarProp" @@ -16482,6 +18169,8 @@ public enum console { @usableFromInline static let DragEvent: JSString = "DragEvent" @usableFromInline static let Element: JSString = "Element" @usableFromInline static let ElementInternals: JSString = "ElementInternals" + @usableFromInline static let EncodedAudioChunk: JSString = "EncodedAudioChunk" + @usableFromInline static let EncodedVideoChunk: JSString = "EncodedVideoChunk" @usableFromInline static let ErrorEvent: JSString = "ErrorEvent" @usableFromInline static let Event: JSString = "Event" @usableFromInline static let EventSource: JSString = "EventSource" @@ -16574,6 +18263,9 @@ public enum console { @usableFromInline static let ImageBitmap: JSString = "ImageBitmap" @usableFromInline static let ImageBitmapRenderingContext: JSString = "ImageBitmapRenderingContext" @usableFromInline static let ImageData: JSString = "ImageData" + @usableFromInline static let ImageDecoder: JSString = "ImageDecoder" + @usableFromInline static let ImageTrack: JSString = "ImageTrack" + @usableFromInline static let ImageTrackList: JSString = "ImageTrackList" @usableFromInline static let InputDeviceInfo: JSString = "InputDeviceInfo" @usableFromInline static let InputEvent: JSString = "InputEvent" @usableFromInline static let IsSearchProviderInstalled: JSString = "IsSearchProviderInstalled" @@ -16650,6 +18342,10 @@ public enum console { @usableFromInline static let URL: JSString = "URL" @usableFromInline static let URLSearchParams: JSString = "URLSearchParams" @usableFromInline static let ValidityState: JSString = "ValidityState" + @usableFromInline static let VideoColorSpace: JSString = "VideoColorSpace" + @usableFromInline static let VideoDecoder: JSString = "VideoDecoder" + @usableFromInline static let VideoEncoder: JSString = "VideoEncoder" + @usableFromInline static let VideoFrame: JSString = "VideoFrame" @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" @usableFromInline static let WheelEvent: JSString = "WheelEvent" @@ -16700,15 +18396,18 @@ public enum console { @usableFromInline static let align: JSString = "align" @usableFromInline static let alinkColor: JSString = "alinkColor" @usableFromInline static let all: JSString = "all" + @usableFromInline static let allocationSize: JSString = "allocationSize" @usableFromInline static let allow: JSString = "allow" @usableFromInline static let allowFullscreen: JSString = "allowFullscreen" @usableFromInline static let alpha: JSString = "alpha" + @usableFromInline static let alphaSideData: JSString = "alphaSideData" @usableFromInline static let alphabeticBaseline: JSString = "alphabeticBaseline" @usableFromInline static let alt: JSString = "alt" @usableFromInline static let altKey: JSString = "altKey" @usableFromInline static let ancestorOrigins: JSString = "ancestorOrigins" @usableFromInline static let anchors: JSString = "anchors" @usableFromInline static let animate: JSString = "animate" + @usableFromInline static let animated: JSString = "animated" @usableFromInline static let appCodeName: JSString = "appCodeName" @usableFromInline static let appName: JSString = "appName" @usableFromInline static let appVersion: JSString = "appVersion" @@ -16801,6 +18500,8 @@ public enum console { @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" + @usableFromInline static let bitrate: JSString = "bitrate" + @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" @usableFromInline static let blob: JSString = "blob" @usableFromInline static let blocking: JSString = "blocking" @@ -16816,6 +18517,7 @@ public enum console { @usableFromInline static let button: JSString = "button" @usableFromInline static let buttons: JSString = "buttons" @usableFromInline static let byobRequest: JSString = "byobRequest" + @usableFromInline static let byteLength: JSString = "byteLength" @usableFromInline static let c: JSString = "c" @usableFromInline static let cache: JSString = "cache" @usableFromInline static let cacheName: JSString = "cacheName" @@ -16873,6 +18575,10 @@ public enum console { @usableFromInline static let code: JSString = "code" @usableFromInline static let codeBase: JSString = "codeBase" @usableFromInline static let codeType: JSString = "codeType" + @usableFromInline static let codec: JSString = "codec" + @usableFromInline static let codedHeight: JSString = "codedHeight" + @usableFromInline static let codedRect: JSString = "codedRect" + @usableFromInline static let codedWidth: JSString = "codedWidth" @usableFromInline static let colSpan: JSString = "colSpan" @usableFromInline static let collapse: JSString = "collapse" @usableFromInline static let collapsed: JSString = "collapsed" @@ -16890,10 +18596,14 @@ public enum console { @usableFromInline static let comparePoint: JSString = "comparePoint" @usableFromInline static let compatMode: JSString = "compatMode" @usableFromInline static let complete: JSString = "complete" + @usableFromInline static let completeFramesOnly: JSString = "completeFramesOnly" + @usableFromInline static let completed: JSString = "completed" @usableFromInline static let composed: JSString = "composed" @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" @usableFromInline static let computedOffset: JSString = "computedOffset" + @usableFromInline static let config: JSString = "config" + @usableFromInline static let configure: JSString = "configure" @usableFromInline static let confirm: JSString = "confirm" @usableFromInline static let console: JSString = "console" @usableFromInline static let constraint: JSString = "constraint" @@ -16910,6 +18620,7 @@ public enum console { @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let count: JSString = "count" @usableFromInline static let countReset: JSString = "countReset" @usableFromInline static let createAttribute: JSString = "createAttribute" @@ -16958,6 +18669,8 @@ public enum console { @usableFromInline static let debug: JSString = "debug" @usableFromInline static let declare: JSString = "declare" @usableFromInline static let decode: JSString = "decode" + @usableFromInline static let decodeQueueSize: JSString = "decodeQueueSize" + @usableFromInline static let decoderConfig: JSString = "decoderConfig" @usableFromInline static let decoding: JSString = "decoding" @usableFromInline static let `default`: JSString = "default" @usableFromInline static let defaultChecked: JSString = "defaultChecked" @@ -16985,7 +18698,9 @@ public enum console { @usableFromInline static let deltaZ: JSString = "deltaZ" @usableFromInline static let description: JSString = "description" @usableFromInline static let designMode: JSString = "designMode" + @usableFromInline static let desiredHeight: JSString = "desiredHeight" @usableFromInline static let desiredSize: JSString = "desiredSize" + @usableFromInline static let desiredWidth: JSString = "desiredWidth" @usableFromInline static let destination: JSString = "destination" @usableFromInline static let desynchronized: JSString = "desynchronized" @usableFromInline static let detach: JSString = "detach" @@ -16999,6 +18714,10 @@ public enum console { @usableFromInline static let disabled: JSString = "disabled" @usableFromInline static let disconnect: JSString = "disconnect" @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" + @usableFromInline static let displayAspectHeight: JSString = "displayAspectHeight" + @usableFromInline static let displayAspectWidth: JSString = "displayAspectWidth" + @usableFromInline static let displayHeight: JSString = "displayHeight" + @usableFromInline static let displayWidth: JSString = "displayWidth" @usableFromInline static let doctype: JSString = "doctype" @usableFromInline static let document: JSString = "document" @usableFromInline static let documentElement: JSString = "documentElement" @@ -17024,6 +18743,8 @@ public enum console { @usableFromInline static let enable: JSString = "enable" @usableFromInline static let enabled: JSString = "enabled" @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" + @usableFromInline static let encode: JSString = "encode" + @usableFromInline static let encodeQueueSize: JSString = "encodeQueueSize" @usableFromInline static let encoding: JSString = "encoding" @usableFromInline static let enctype: JSString = "enctype" @usableFromInline static let end: JSString = "end" @@ -17080,12 +18801,17 @@ public enum console { @usableFromInline static let formMethod: JSString = "formMethod" @usableFromInline static let formNoValidate: JSString = "formNoValidate" @usableFromInline static let formTarget: JSString = "formTarget" + @usableFromInline static let format: JSString = "format" @usableFromInline static let forms: JSString = "forms" @usableFromInline static let forward: JSString = "forward" @usableFromInline static let frame: JSString = "frame" @usableFromInline static let frameBorder: JSString = "frameBorder" + @usableFromInline static let frameCount: JSString = "frameCount" @usableFromInline static let frameElement: JSString = "frameElement" + @usableFromInline static let frameIndex: JSString = "frameIndex" + @usableFromInline static let frameOffset: JSString = "frameOffset" @usableFromInline static let frameRate: JSString = "frameRate" + @usableFromInline static let framerate: JSString = "framerate" @usableFromInline static let frames: JSString = "frames" @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" @@ -17093,6 +18819,7 @@ public enum console { @usableFromInline static let fromPoint: JSString = "fromPoint" @usableFromInline static let fromQuad: JSString = "fromQuad" @usableFromInline static let fromRect: JSString = "fromRect" + @usableFromInline static let fullRange: JSString = "fullRange" @usableFromInline static let get: JSString = "get" @usableFromInline static let getAll: JSString = "getAll" @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" @@ -17149,6 +18876,7 @@ public enum console { @usableFromInline static let groupId: JSString = "groupId" @usableFromInline static let handled: JSString = "handled" @usableFromInline static let hangingBaseline: JSString = "hangingBaseline" + @usableFromInline static let hardwareAcceleration: JSString = "hardwareAcceleration" @usableFromInline static let hardwareConcurrency: JSString = "hardwareConcurrency" @usableFromInline static let has: JSString = "has" @usableFromInline static let hasAttribute: JSString = "hasAttribute" @@ -17179,6 +18907,7 @@ public enum console { @usableFromInline static let ignoreMethod: JSString = "ignoreMethod" @usableFromInline static let ignoreSearch: JSString = "ignoreSearch" @usableFromInline static let ignoreVary: JSString = "ignoreVary" + @usableFromInline static let image: JSString = "image" @usableFromInline static let imageOrientation: JSString = "imageOrientation" @usableFromInline static let imageSizes: JSString = "imageSizes" @usableFromInline static let imageSmoothingEnabled: JSString = "imageSmoothingEnabled" @@ -17223,6 +18952,7 @@ public enum console { @usableFromInline static let `is`: JSString = "is" @usableFromInline static let is2D: JSString = "is2D" @usableFromInline static let isComposing: JSString = "isComposing" + @usableFromInline static let isConfigSupported: JSString = "isConfigSupported" @usableFromInline static let isConnected: JSString = "isConnected" @usableFromInline static let isContentEditable: JSString = "isContentEditable" @usableFromInline static let isContextLost: JSString = "isContextLost" @@ -17249,6 +18979,7 @@ public enum console { @usableFromInline static let keepalive: JSString = "keepalive" @usableFromInline static let key: JSString = "key" @usableFromInline static let keyCode: JSString = "keyCode" + @usableFromInline static let keyFrame: JSString = "keyFrame" @usableFromInline static let keys: JSString = "keys" @usableFromInline static let kind: JSString = "kind" @usableFromInline static let label: JSString = "label" @@ -17261,6 +18992,8 @@ public enum console { @usableFromInline static let lastEventId: JSString = "lastEventId" @usableFromInline static let lastModified: JSString = "lastModified" @usableFromInline static let latency: JSString = "latency" + @usableFromInline static let latencyMode: JSString = "latencyMode" + @usableFromInline static let layout: JSString = "layout" @usableFromInline static let left: JSString = "left" @usableFromInline static let length: JSString = "length" @usableFromInline static let lengthComputable: JSString = "lengthComputable" @@ -17311,6 +19044,7 @@ public enum console { @usableFromInline static let match: JSString = "match" @usableFromInline static let matchAll: JSString = "matchAll" @usableFromInline static let matches: JSString = "matches" + @usableFromInline static let matrix: JSString = "matrix" @usableFromInline static let matrixTransform: JSString = "matrixTransform" @usableFromInline static let max: JSString = "max" @usableFromInline static let maxLength: JSString = "maxLength" @@ -17368,6 +19102,8 @@ public enum console { @usableFromInline static let nonce: JSString = "nonce" @usableFromInline static let normalize: JSString = "normalize" @usableFromInline static let now: JSString = "now" + @usableFromInline static let numberOfChannels: JSString = "numberOfChannels" + @usableFromInline static let numberOfFrames: JSString = "numberOfFrames" @usableFromInline static let numberValue: JSString = "numberValue" @usableFromInline static let observe: JSString = "observe" @usableFromInline static let offset: JSString = "offset" @@ -17486,6 +19222,7 @@ public enum console { @usableFromInline static let onwheel: JSString = "onwheel" @usableFromInline static let open: JSString = "open" @usableFromInline static let opener: JSString = "opener" + @usableFromInline static let optimizeForLatency: JSString = "optimizeForLatency" @usableFromInline static let optimum: JSString = "optimum" @usableFromInline static let options: JSString = "options" @usableFromInline static let origin: JSString = "origin" @@ -17493,6 +19230,7 @@ public enum console { @usableFromInline static let originTime: JSString = "originTime" @usableFromInline static let oscpu: JSString = "oscpu" @usableFromInline static let outerText: JSString = "outerText" + @usableFromInline static let output: JSString = "output" @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" @usableFromInline static let ownerDocument: JSString = "ownerDocument" @usableFromInline static let ownerElement: JSString = "ownerElement" @@ -17524,6 +19262,7 @@ public enum console { @usableFromInline static let pipeThrough: JSString = "pipeThrough" @usableFromInline static let pipeTo: JSString = "pipeTo" @usableFromInline static let placeholder: JSString = "placeholder" + @usableFromInline static let planeIndex: JSString = "planeIndex" @usableFromInline static let platform: JSString = "platform" @usableFromInline static let play: JSString = "play" @usableFromInline static let playState: JSString = "playState" @@ -17540,6 +19279,7 @@ public enum console { @usableFromInline static let postMessage: JSString = "postMessage" @usableFromInline static let poster: JSString = "poster" @usableFromInline static let preMultiplySelf: JSString = "preMultiplySelf" + @usableFromInline static let preferAnimation: JSString = "preferAnimation" @usableFromInline static let prefix: JSString = "prefix" @usableFromInline static let preload: JSString = "preload" @usableFromInline static let preloadResponse: JSString = "preloadResponse" @@ -17555,6 +19295,7 @@ public enum console { @usableFromInline static let previousElementSibling: JSString = "previousElementSibling" @usableFromInline static let previousNode: JSString = "previousNode" @usableFromInline static let previousSibling: JSString = "previousSibling" + @usableFromInline static let primaries: JSString = "primaries" @usableFromInline static let print: JSString = "print" @usableFromInline static let product: JSString = "product" @usableFromInline static let productSub: JSString = "productSub" @@ -17618,6 +19359,7 @@ public enum console { @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" @usableFromInline static let `repeat`: JSString = "repeat" + @usableFromInline static let repetitionCount: JSString = "repetitionCount" @usableFromInline static let replace: JSString = "replace" @usableFromInline static let replaceChild: JSString = "replaceChild" @usableFromInline static let replaceChildren: JSString = "replaceChildren" @@ -17672,6 +19414,7 @@ public enum console { @usableFromInline static let sampleSize: JSString = "sampleSize" @usableFromInline static let sandbox: JSString = "sandbox" @usableFromInline static let save: JSString = "save" + @usableFromInline static let scalabilityMode: JSString = "scalabilityMode" @usableFromInline static let scale: JSString = "scale" @usableFromInline static let scale3d: JSString = "scale3d" @usableFromInline static let scale3dSelf: JSString = "scale3dSelf" @@ -17700,6 +19443,7 @@ public enum console { @usableFromInline static let selected: JSString = "selected" @usableFromInline static let selectedIndex: JSString = "selectedIndex" @usableFromInline static let selectedOptions: JSString = "selectedOptions" + @usableFromInline static let selectedTrack: JSString = "selectedTrack" @usableFromInline static let selectionDirection: JSString = "selectionDirection" @usableFromInline static let selectionEnd: JSString = "selectionEnd" @usableFromInline static let selectionStart: JSString = "selectionStart" @@ -17788,6 +19532,7 @@ public enum console { @usableFromInline static let stopPropagation: JSString = "stopPropagation" @usableFromInline static let storageArea: JSString = "storageArea" @usableFromInline static let stream: JSString = "stream" + @usableFromInline static let stride: JSString = "stride" @usableFromInline static let stringValue: JSString = "stringValue" @usableFromInline static let stroke: JSString = "stroke" @usableFromInline static let strokeRect: JSString = "strokeRect" @@ -17800,8 +19545,10 @@ public enum console { @usableFromInline static let subtree: JSString = "subtree" @usableFromInline static let suffixes: JSString = "suffixes" @usableFromInline static let summary: JSString = "summary" + @usableFromInline static let supported: JSString = "supported" @usableFromInline static let supports: JSString = "supports" @usableFromInline static let surroundContents: JSString = "surroundContents" + @usableFromInline static let svc: JSString = "svc" @usableFromInline static let systemId: JSString = "systemId" @usableFromInline static let tBodies: JSString = "tBodies" @usableFromInline static let tFoot: JSString = "tFoot" @@ -17814,6 +19561,7 @@ public enum console { @usableFromInline static let target: JSString = "target" @usableFromInline static let targetOrigin: JSString = "targetOrigin" @usableFromInline static let tee: JSString = "tee" + @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" @usableFromInline static let text: JSString = "text" @usableFromInline static let textAlign: JSString = "textAlign" @@ -17831,6 +19579,7 @@ public enum console { @usableFromInline static let timecode: JSString = "timecode" @usableFromInline static let timeline: JSString = "timeline" @usableFromInline static let timeout: JSString = "timeout" + @usableFromInline static let timestamp: JSString = "timestamp" @usableFromInline static let title: JSString = "title" @usableFromInline static let toDataURL: JSString = "toDataURL" @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" @@ -17846,6 +19595,7 @@ public enum console { @usableFromInline static let total: JSString = "total" @usableFromInline static let trace: JSString = "trace" @usableFromInline static let track: JSString = "track" + @usableFromInline static let tracks: JSString = "tracks" @usableFromInline static let transfer: JSString = "transfer" @usableFromInline static let transferControlToOffscreen: JSString = "transferControlToOffscreen" @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" @@ -17893,6 +19643,7 @@ public enum console { @usableFromInline static let view: JSString = "view" @usableFromInline static let visibilityState: JSString = "visibilityState" @usableFromInline static let visible: JSString = "visible" + @usableFromInline static let visibleRect: JSString = "visibleRect" @usableFromInline static let vlinkColor: JSString = "vlinkColor" @usableFromInline static let volume: JSString = "volume" @usableFromInline static let vspace: JSString = "vspace" @@ -19320,6 +21071,48 @@ public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource { } } +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 + } + } +} + public protocol Any_MessageEventSource: ConvertibleToJSValue {} extension MessagePort: Any_MessageEventSource {} extension ServiceWorker: Any_MessageEventSource {} From ee0b3d028b6131393a35dd1ba3e402f6c1fd7120 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:15:27 +0100 Subject: [PATCH 07/21] 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 + parse-idl/parse-all.js | 1 + 21 files changed, 1880 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 + } +} diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 3a3c1f5e..9df63f02 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -26,6 +26,7 @@ console.log( "mediacapture-streams", "mediastream-recording", "webcodecs", + "webgl1", ].map((key) => parsedFiles[key]), null, 2 From 3dac17c7a548fa2da9cf6bb5345bbc1592bf949b Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 11:11:23 +0100 Subject: [PATCH 08/21] Fix merge conflict --- Sources/DOMKit/Generated.swift | 2176 ++++++++++++++++- 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 - 21 files changed, 2071 insertions(+), 1984 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/Generated.swift b/Sources/DOMKit/Generated.swift index 88bb7667..a109f8c2 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -15257,6 +15257,21 @@ public typealias EpochTimeStamp = UInt64 public typealias DOMTimeStamp = UInt64 +public typealias GLenum = UInt32 +public typealias GLboolean = Bool +public typealias GLbitfield = UInt32 +public typealias GLbyte = Int8 +public typealias GLshort = Int16 +public typealias GLint = Int32 +public typealias GLsizei = Int32 +public typealias GLintptr = Int64 +public typealias GLsizeiptr = Int64 +public typealias GLubyte = UInt8 +public typealias GLushort = UInt16 +public typealias GLuint = UInt32 +public typealias GLfloat = Float +public typealias GLclampf = Float + public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void @@ -16353,153 +16368,1756 @@ public class VideoFrameInit: BridgedDictionary { public var displayHeight: UInt32 } -public enum VideoMatrixCoefficients: JSString, JSValueCompatible { - case rgb = "rgb" - case bt709 = "bt709" - case bt470bg = "bt470bg" - case smpte170m = "smpte170m" +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 } +} + +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 } +} + +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 } +} + +public class VideoTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var selected: Bool +} + +public class VideoTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> VideoTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> VideoTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +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 } +} + +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 +} + +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) + } +} + +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 +} + +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 +} + +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 +} + +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) + } +} + +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 + } +} + +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 } +} + +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) + } +} + +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) + } +} + +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 + } +} + +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]) + } +} + +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 public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable func uniform1fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform1fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable func uniform2fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform2fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} + @inlinable func uniform3fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform3fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } -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 func uniform4fv(location: WebGLUniformLocation?, v: Float32List) { + let this = jsObject + _ = this[Strings.uniform4fv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @inlinable func uniform1iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform1iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable func uniform2iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform2iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) } - @inlinable public var jsValue: JSValue { rawValue.jsValue } -} + @inlinable func uniform3iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform3iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } -public enum VideoResizeModeEnum: JSString, JSValueCompatible { - case none = "none" - case cropAndScale = "crop-and-scale" + @inlinable func uniform4iv(location: WebGLUniformLocation?, v: Int32List) { + let this = jsObject + _ = this[Strings.uniform4iv].function!(this: this, arguments: [location.jsValue, v.jsValue]) + } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @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 public init?(string: String) { - self.init(rawValue: JSString(string)) + @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 public var jsValue: JSValue { rawValue.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]) + } } -public class VideoTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } +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) + } +} + +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) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + _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 id: String - - @ReadonlyAttribute - public var kind: String + public var rangeMin: GLint @ReadonlyAttribute - public var label: String + public var rangeMax: GLint @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var selected: Bool + public var precision: GLint } -public class VideoTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } +public class WebGLTexture: WebGLObject { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) super.init(unsafelyWrapping: jsObject) } - - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> VideoTrack { - jsObject[key].fromJSValue()! - } - - @inlinable public func getTrackById(id: String) -> VideoTrack? { - let this = jsObject - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ClosureAttribute1Optional - public var onchange: EventHandler - - @ClosureAttribute1Optional - public var onaddtrack: EventHandler - - @ClosureAttribute1Optional - public var onremovetrack: EventHandler } -public enum VideoTransferCharacteristics: JSString, JSValueCompatible { - case bt709 = "bt709" - case smpte170m = "smpte170m" - case iec6196621 = "iec61966-2-1" +public class WebGLUniformLocation: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil - } + public let jsObject: JSObject - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + public required init(unsafelyWrapping jsObject: JSObject) { + self.jsObject = jsObject } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } } public class WheelEvent: MouseEvent { @@ -18348,6 +19966,18 @@ public enum console { @usableFromInline static let VideoFrame: JSString = "VideoFrame" @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" + @usableFromInline static let WebGLActiveInfo: JSString = "WebGLActiveInfo" + @usableFromInline static let WebGLBuffer: JSString = "WebGLBuffer" + @usableFromInline static let WebGLContextEvent: JSString = "WebGLContextEvent" + @usableFromInline static let WebGLFramebuffer: JSString = "WebGLFramebuffer" + @usableFromInline static let WebGLObject: JSString = "WebGLObject" + @usableFromInline static let WebGLProgram: JSString = "WebGLProgram" + @usableFromInline static let WebGLRenderbuffer: JSString = "WebGLRenderbuffer" + @usableFromInline static let WebGLRenderingContext: JSString = "WebGLRenderingContext" + @usableFromInline static let WebGLShader: JSString = "WebGLShader" + @usableFromInline static let WebGLShaderPrecisionFormat: JSString = "WebGLShaderPrecisionFormat" + @usableFromInline static let WebGLTexture: JSString = "WebGLTexture" + @usableFromInline static let WebGLUniformLocation: JSString = "WebGLUniformLocation" @usableFromInline static let WheelEvent: JSString = "WheelEvent" @usableFromInline static let Window: JSString = "Window" @usableFromInline static let Worker: JSString = "Worker" @@ -18376,6 +20006,7 @@ public enum console { @usableFromInline static let active: JSString = "active" @usableFromInline static let activeCues: JSString = "activeCues" @usableFromInline static let activeElement: JSString = "activeElement" + @usableFromInline static let activeTexture: JSString = "activeTexture" @usableFromInline static let actualBoundingBoxAscent: JSString = "actualBoundingBoxAscent" @usableFromInline static let actualBoundingBoxDescent: JSString = "actualBoundingBoxDescent" @usableFromInline static let actualBoundingBoxLeft: JSString = "actualBoundingBoxLeft" @@ -18408,6 +20039,7 @@ public enum console { @usableFromInline static let anchors: JSString = "anchors" @usableFromInline static let animate: JSString = "animate" @usableFromInline static let animated: JSString = "animated" + @usableFromInline static let antialias: JSString = "antialias" @usableFromInline static let appCodeName: JSString = "appCodeName" @usableFromInline static let appName: JSString = "appName" @usableFromInline static let appVersion: JSString = "appVersion" @@ -18471,6 +20103,7 @@ public enum console { @usableFromInline static let async: JSString = "async" @usableFromInline static let atob: JSString = "atob" @usableFromInline static let attachInternals: JSString = "attachInternals" + @usableFromInline static let attachShader: JSString = "attachShader" @usableFromInline static let attachShadow: JSString = "attachShadow" @usableFromInline static let attrChange: JSString = "attrChange" @usableFromInline static let attrName: JSString = "attrName" @@ -18500,9 +20133,19 @@ public enum console { @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" + @usableFromInline static let bindAttribLocation: JSString = "bindAttribLocation" + @usableFromInline static let bindBuffer: JSString = "bindBuffer" + @usableFromInline static let bindFramebuffer: JSString = "bindFramebuffer" + @usableFromInline static let bindRenderbuffer: JSString = "bindRenderbuffer" + @usableFromInline static let bindTexture: JSString = "bindTexture" @usableFromInline static let bitrate: JSString = "bitrate" @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" + @usableFromInline static let blendColor: JSString = "blendColor" + @usableFromInline static let blendEquation: JSString = "blendEquation" + @usableFromInline static let blendEquationSeparate: JSString = "blendEquationSeparate" + @usableFromInline static let blendFunc: JSString = "blendFunc" + @usableFromInline static let blendFuncSeparate: JSString = "blendFuncSeparate" @usableFromInline static let blob: JSString = "blob" @usableFromInline static let blocking: JSString = "blocking" @usableFromInline static let blur: JSString = "blur" @@ -18513,6 +20156,8 @@ public enum console { @usableFromInline static let bottom: JSString = "bottom" @usableFromInline static let btoa: JSString = "btoa" @usableFromInline static let bubbles: JSString = "bubbles" + @usableFromInline static let bufferData: JSString = "bufferData" + @usableFromInline static let bufferSubData: JSString = "bufferSubData" @usableFromInline static let buffered: JSString = "buffered" @usableFromInline static let button: JSString = "button" @usableFromInline static let buttons: JSString = "buttons" @@ -18543,6 +20188,7 @@ public enum console { @usableFromInline static let characterDataOldValue: JSString = "characterDataOldValue" @usableFromInline static let characterSet: JSString = "characterSet" @usableFromInline static let charset: JSString = "charset" + @usableFromInline static let checkFramebufferStatus: JSString = "checkFramebufferStatus" @usableFromInline static let checkValidity: JSString = "checkValidity" @usableFromInline static let checked: JSString = "checked" @usableFromInline static let childElementCount: JSString = "childElementCount" @@ -18553,10 +20199,13 @@ public enum console { @usableFromInline static let classList: JSString = "classList" @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearColor: JSString = "clearColor" @usableFromInline static let clearData: JSString = "clearData" + @usableFromInline static let clearDepth: JSString = "clearDepth" @usableFromInline static let clearInterval: JSString = "clearInterval" @usableFromInline static let clearParameters: JSString = "clearParameters" @usableFromInline static let clearRect: JSString = "clearRect" + @usableFromInline static let clearStencil: JSString = "clearStencil" @usableFromInline static let clearTimeout: JSString = "clearTimeout" @usableFromInline static let click: JSString = "click" @usableFromInline static let clientId: JSString = "clientId" @@ -18584,6 +20233,7 @@ public enum console { @usableFromInline static let collapsed: JSString = "collapsed" @usableFromInline static let colno: JSString = "colno" @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorMask: JSString = "colorMask" @usableFromInline static let colorSpace: JSString = "colorSpace" @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" @usableFromInline static let cols: JSString = "cols" @@ -18595,12 +20245,15 @@ public enum console { @usableFromInline static let compareDocumentPosition: JSString = "compareDocumentPosition" @usableFromInline static let comparePoint: JSString = "comparePoint" @usableFromInline static let compatMode: JSString = "compatMode" + @usableFromInline static let compileShader: JSString = "compileShader" @usableFromInline static let complete: JSString = "complete" @usableFromInline static let completeFramesOnly: JSString = "completeFramesOnly" @usableFromInline static let completed: JSString = "completed" @usableFromInline static let composed: JSString = "composed" @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" + @usableFromInline static let compressedTexImage2D: JSString = "compressedTexImage2D" + @usableFromInline static let compressedTexSubImage2D: JSString = "compressedTexSubImage2D" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let config: JSString = "config" @usableFromInline static let configure: JSString = "configure" @@ -18620,11 +20273,14 @@ public enum console { @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let copyTexImage2D: JSString = "copyTexImage2D" + @usableFromInline static let copyTexSubImage2D: JSString = "copyTexSubImage2D" @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let count: JSString = "count" @usableFromInline static let countReset: JSString = "countReset" @usableFromInline static let createAttribute: JSString = "createAttribute" @usableFromInline static let createAttributeNS: JSString = "createAttributeNS" + @usableFromInline static let createBuffer: JSString = "createBuffer" @usableFromInline static let createCDATASection: JSString = "createCDATASection" @usableFromInline static let createCaption: JSString = "createCaption" @usableFromInline static let createComment: JSString = "createComment" @@ -18635,6 +20291,7 @@ public enum console { @usableFromInline static let createElement: JSString = "createElement" @usableFromInline static let createElementNS: JSString = "createElementNS" @usableFromInline static let createEvent: JSString = "createEvent" + @usableFromInline static let createFramebuffer: JSString = "createFramebuffer" @usableFromInline static let createHTMLDocument: JSString = "createHTMLDocument" @usableFromInline static let createImageBitmap: JSString = "createImageBitmap" @usableFromInline static let createImageData: JSString = "createImageData" @@ -18642,17 +20299,22 @@ public enum console { @usableFromInline static let createObjectURL: JSString = "createObjectURL" @usableFromInline static let createPattern: JSString = "createPattern" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" + @usableFromInline static let createProgram: JSString = "createProgram" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @usableFromInline static let createRange: JSString = "createRange" + @usableFromInline static let createRenderbuffer: JSString = "createRenderbuffer" + @usableFromInline static let createShader: JSString = "createShader" @usableFromInline static let createTBody: JSString = "createTBody" @usableFromInline static let createTFoot: JSString = "createTFoot" @usableFromInline static let createTHead: JSString = "createTHead" @usableFromInline static let createTextNode: JSString = "createTextNode" + @usableFromInline static let createTexture: JSString = "createTexture" @usableFromInline static let credentials: JSString = "credentials" @usableFromInline static let crossOrigin: JSString = "crossOrigin" @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" @usableFromInline static let ctrlKey: JSString = "ctrlKey" @usableFromInline static let cues: JSString = "cues" + @usableFromInline static let cullFace: JSString = "cullFace" @usableFromInline static let currentIteration: JSString = "currentIteration" @usableFromInline static let currentNode: JSString = "currentNode" @usableFromInline static let currentScript: JSString = "currentScript" @@ -18685,17 +20347,27 @@ public enum console { @usableFromInline static let delay: JSString = "delay" @usableFromInline static let delegatesFocus: JSString = "delegatesFocus" @usableFromInline static let delete: JSString = "delete" + @usableFromInline static let deleteBuffer: JSString = "deleteBuffer" @usableFromInline static let deleteCaption: JSString = "deleteCaption" @usableFromInline static let deleteCell: JSString = "deleteCell" @usableFromInline static let deleteContents: JSString = "deleteContents" @usableFromInline static let deleteData: JSString = "deleteData" + @usableFromInline static let deleteFramebuffer: JSString = "deleteFramebuffer" + @usableFromInline static let deleteProgram: JSString = "deleteProgram" + @usableFromInline static let deleteRenderbuffer: JSString = "deleteRenderbuffer" @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteShader: JSString = "deleteShader" @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" @usableFromInline static let deleteTHead: JSString = "deleteTHead" + @usableFromInline static let deleteTexture: JSString = "deleteTexture" @usableFromInline static let deltaMode: JSString = "deltaMode" @usableFromInline static let deltaX: JSString = "deltaX" @usableFromInline static let deltaY: JSString = "deltaY" @usableFromInline static let deltaZ: JSString = "deltaZ" + @usableFromInline static let depth: JSString = "depth" + @usableFromInline static let depthFunc: JSString = "depthFunc" + @usableFromInline static let depthMask: JSString = "depthMask" + @usableFromInline static let depthRange: JSString = "depthRange" @usableFromInline static let description: JSString = "description" @usableFromInline static let designMode: JSString = "designMode" @usableFromInline static let desiredHeight: JSString = "desiredHeight" @@ -18704,6 +20376,7 @@ public enum console { @usableFromInline static let destination: JSString = "destination" @usableFromInline static let desynchronized: JSString = "desynchronized" @usableFromInline static let detach: JSString = "detach" + @usableFromInline static let detachShader: JSString = "detachShader" @usableFromInline static let detail: JSString = "detail" @usableFromInline static let deviceId: JSString = "deviceId" @usableFromInline static let dir: JSString = "dir" @@ -18711,6 +20384,7 @@ public enum console { @usableFromInline static let direction: JSString = "direction" @usableFromInline static let dirxml: JSString = "dirxml" @usableFromInline static let disable: JSString = "disable" + @usableFromInline static let disableVertexAttribArray: JSString = "disableVertexAttribArray" @usableFromInline static let disabled: JSString = "disabled" @usableFromInline static let disconnect: JSString = "disconnect" @usableFromInline static let dispatchEvent: JSString = "dispatchEvent" @@ -18726,8 +20400,12 @@ public enum console { @usableFromInline static let done: JSString = "done" @usableFromInline static let download: JSString = "download" @usableFromInline static let draggable: JSString = "draggable" + @usableFromInline static let drawArrays: JSString = "drawArrays" + @usableFromInline static let drawElements: JSString = "drawElements" @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let drawingBufferHeight: JSString = "drawingBufferHeight" + @usableFromInline static let drawingBufferWidth: JSString = "drawingBufferWidth" @usableFromInline static let dropEffect: JSString = "dropEffect" @usableFromInline static let duration: JSString = "duration" @usableFromInline static let e: JSString = "e" @@ -18741,6 +20419,7 @@ public enum console { @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" @usableFromInline static let embeds: JSString = "embeds" @usableFromInline static let enable: JSString = "enable" + @usableFromInline static let enableVertexAttribArray: JSString = "enableVertexAttribArray" @usableFromInline static let enabled: JSString = "enabled" @usableFromInline static let enabledPlugin: JSString = "enabledPlugin" @usableFromInline static let encode: JSString = "encode" @@ -18769,6 +20448,7 @@ public enum console { @usableFromInline static let f: JSString = "f" @usableFromInline static let face: JSString = "face" @usableFromInline static let facingMode: JSString = "facingMode" + @usableFromInline static let failIfMajorPerformanceCaveat: JSString = "failIfMajorPerformanceCaveat" @usableFromInline static let fastSeek: JSString = "fastSeek" @usableFromInline static let fetch: JSString = "fetch" @usableFromInline static let fgColor: JSString = "fgColor" @@ -18811,6 +20491,8 @@ public enum console { @usableFromInline static let frameIndex: JSString = "frameIndex" @usableFromInline static let frameOffset: JSString = "frameOffset" @usableFromInline static let frameRate: JSString = "frameRate" + @usableFromInline static let framebufferRenderbuffer: JSString = "framebufferRenderbuffer" + @usableFromInline static let framebufferTexture2D: JSString = "framebufferTexture2D" @usableFromInline static let framerate: JSString = "framerate" @usableFromInline static let frames: JSString = "frames" @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" @@ -18819,12 +20501,18 @@ public enum console { @usableFromInline static let fromPoint: JSString = "fromPoint" @usableFromInline static let fromQuad: JSString = "fromQuad" @usableFromInline static let fromRect: JSString = "fromRect" + @usableFromInline static let frontFace: JSString = "frontFace" @usableFromInline static let fullRange: JSString = "fullRange" + @usableFromInline static let generateMipmap: JSString = "generateMipmap" @usableFromInline static let get: JSString = "get" + @usableFromInline static let getActiveAttrib: JSString = "getActiveAttrib" + @usableFromInline static let getActiveUniform: JSString = "getActiveUniform" @usableFromInline static let getAll: JSString = "getAll" @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" @usableFromInline static let getAnimations: JSString = "getAnimations" @usableFromInline static let getAsFile: JSString = "getAsFile" + @usableFromInline static let getAttachedShaders: JSString = "getAttachedShaders" + @usableFromInline static let getAttribLocation: JSString = "getAttribLocation" @usableFromInline static let getAttribute: JSString = "getAttribute" @usableFromInline static let getAttributeNS: JSString = "getAttributeNS" @usableFromInline static let getAttributeNames: JSString = "getAttributeNames" @@ -18832,6 +20520,7 @@ public enum console { @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" @usableFromInline static let getAudioTracks: JSString = "getAudioTracks" @usableFromInline static let getBounds: JSString = "getBounds" + @usableFromInline static let getBufferParameter: JSString = "getBufferParameter" @usableFromInline static let getCapabilities: JSString = "getCapabilities" @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" @usableFromInline static let getConstraints: JSString = "getConstraints" @@ -18844,27 +20533,43 @@ public enum console { @usableFromInline static let getElementsByName: JSString = "getElementsByName" @usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName" @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" + @usableFromInline static let getError: JSString = "getError" + @usableFromInline static let getExtension: JSString = "getExtension" + @usableFromInline static let getFramebufferAttachmentParameter: JSString = "getFramebufferAttachmentParameter" @usableFromInline static let getImageData: JSString = "getImageData" @usableFromInline static let getKeyframes: JSString = "getKeyframes" @usableFromInline static let getLineDash: JSString = "getLineDash" @usableFromInline static let getModifierState: JSString = "getModifierState" @usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS" @usableFromInline static let getParameter: JSString = "getParameter" + @usableFromInline static let getProgramInfoLog: JSString = "getProgramInfoLog" + @usableFromInline static let getProgramParameter: JSString = "getProgramParameter" @usableFromInline static let getReader: JSString = "getReader" @usableFromInline static let getRegistration: JSString = "getRegistration" @usableFromInline static let getRegistrations: JSString = "getRegistrations" + @usableFromInline static let getRenderbufferParameter: JSString = "getRenderbufferParameter" @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" @usableFromInline static let getRootNode: JSString = "getRootNode" @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" @usableFromInline static let getSettings: JSString = "getSettings" + @usableFromInline static let getShaderInfoLog: JSString = "getShaderInfoLog" + @usableFromInline static let getShaderParameter: JSString = "getShaderParameter" + @usableFromInline static let getShaderPrecisionFormat: JSString = "getShaderPrecisionFormat" + @usableFromInline static let getShaderSource: JSString = "getShaderSource" @usableFromInline static let getStartDate: JSString = "getStartDate" @usableFromInline static let getState: JSString = "getState" @usableFromInline static let getSupportedConstraints: JSString = "getSupportedConstraints" + @usableFromInline static let getSupportedExtensions: JSString = "getSupportedExtensions" + @usableFromInline static let getTexParameter: JSString = "getTexParameter" @usableFromInline static let getTiming: JSString = "getTiming" @usableFromInline static let getTrackById: JSString = "getTrackById" @usableFromInline static let getTracks: JSString = "getTracks" @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getUniform: JSString = "getUniform" + @usableFromInline static let getUniformLocation: JSString = "getUniformLocation" @usableFromInline static let getUserMedia: JSString = "getUserMedia" + @usableFromInline static let getVertexAttrib: JSString = "getVertexAttrib" + @usableFromInline static let getVertexAttribOffset: JSString = "getVertexAttribOffset" @usableFromInline static let getVideoTracks: JSString = "getVideoTracks" @usableFromInline static let getWriter: JSString = "getWriter" @usableFromInline static let globalAlpha: JSString = "globalAlpha" @@ -18893,6 +20598,7 @@ public enum console { @usableFromInline static let hidden: JSString = "hidden" @usableFromInline static let high: JSString = "high" @usableFromInline static let highWaterMark: JSString = "highWaterMark" + @usableFromInline static let hint: JSString = "hint" @usableFromInline static let history: JSString = "history" @usableFromInline static let host: JSString = "host" @usableFromInline static let hostname: JSString = "hostname" @@ -18951,22 +20657,29 @@ public enum console { @usableFromInline static let invertSelf: JSString = "invertSelf" @usableFromInline static let `is`: JSString = "is" @usableFromInline static let is2D: JSString = "is2D" + @usableFromInline static let isBuffer: JSString = "isBuffer" @usableFromInline static let isComposing: JSString = "isComposing" @usableFromInline static let isConfigSupported: JSString = "isConfigSupported" @usableFromInline static let isConnected: JSString = "isConnected" @usableFromInline static let isContentEditable: JSString = "isContentEditable" @usableFromInline static let isContextLost: JSString = "isContextLost" @usableFromInline static let isDefaultNamespace: JSString = "isDefaultNamespace" + @usableFromInline static let isEnabled: JSString = "isEnabled" @usableFromInline static let isEqualNode: JSString = "isEqualNode" + @usableFromInline static let isFramebuffer: JSString = "isFramebuffer" @usableFromInline static let isHistoryNavigation: JSString = "isHistoryNavigation" @usableFromInline static let isIdentity: JSString = "isIdentity" @usableFromInline static let isMap: JSString = "isMap" @usableFromInline static let isPointInPath: JSString = "isPointInPath" @usableFromInline static let isPointInRange: JSString = "isPointInRange" @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" + @usableFromInline static let isProgram: JSString = "isProgram" @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" + @usableFromInline static let isRenderbuffer: JSString = "isRenderbuffer" @usableFromInline static let isSameNode: JSString = "isSameNode" @usableFromInline static let isSecureContext: JSString = "isSecureContext" + @usableFromInline static let isShader: JSString = "isShader" + @usableFromInline static let isTexture: JSString = "isTexture" @usableFromInline static let isTrusted: JSString = "isTrusted" @usableFromInline static let isTypeSupported: JSString = "isTypeSupported" @usableFromInline static let item: JSString = "item" @@ -19006,6 +20719,7 @@ public enum console { @usableFromInline static let lineno: JSString = "lineno" @usableFromInline static let link: JSString = "link" @usableFromInline static let linkColor: JSString = "linkColor" + @usableFromInline static let linkProgram: JSString = "linkProgram" @usableFromInline static let links: JSString = "links" @usableFromInline static let list: JSString = "list" @usableFromInline static let load: JSString = "load" @@ -19261,6 +20975,7 @@ public enum console { @usableFromInline static let ping: JSString = "ping" @usableFromInline static let pipeThrough: JSString = "pipeThrough" @usableFromInline static let pipeTo: JSString = "pipeTo" + @usableFromInline static let pixelStorei: JSString = "pixelStorei" @usableFromInline static let placeholder: JSString = "placeholder" @usableFromInline static let planeIndex: JSString = "planeIndex" @usableFromInline static let platform: JSString = "platform" @@ -19271,6 +20986,7 @@ public enum console { @usableFromInline static let playsInline: JSString = "playsInline" @usableFromInline static let plugins: JSString = "plugins" @usableFromInline static let pointerBeforeReferenceNode: JSString = "pointerBeforeReferenceNode" + @usableFromInline static let polygonOffset: JSString = "polygonOffset" @usableFromInline static let port: JSString = "port" @usableFromInline static let port1: JSString = "port1" @usableFromInline static let port2: JSString = "port2" @@ -19278,13 +20994,17 @@ public enum console { @usableFromInline static let position: JSString = "position" @usableFromInline static let postMessage: JSString = "postMessage" @usableFromInline static let poster: JSString = "poster" + @usableFromInline static let powerPreference: JSString = "powerPreference" @usableFromInline static let preMultiplySelf: JSString = "preMultiplySelf" + @usableFromInline static let precision: JSString = "precision" @usableFromInline static let preferAnimation: JSString = "preferAnimation" @usableFromInline static let prefix: JSString = "prefix" @usableFromInline static let preload: JSString = "preload" @usableFromInline static let preloadResponse: JSString = "preloadResponse" + @usableFromInline static let premultipliedAlpha: JSString = "premultipliedAlpha" @usableFromInline static let premultiplyAlpha: JSString = "premultiplyAlpha" @usableFromInline static let prepend: JSString = "prepend" + @usableFromInline static let preserveDrawingBuffer: JSString = "preserveDrawingBuffer" @usableFromInline static let preservesPitch: JSString = "preservesPitch" @usableFromInline static let prevValue: JSString = "prevValue" @usableFromInline static let preventAbort: JSString = "preventAbort" @@ -19318,6 +21038,8 @@ public enum console { @usableFromInline static let queryCommandValue: JSString = "queryCommandValue" @usableFromInline static let querySelector: JSString = "querySelector" @usableFromInline static let querySelectorAll: JSString = "querySelectorAll" + @usableFromInline static let rangeMax: JSString = "rangeMax" + @usableFromInline static let rangeMin: JSString = "rangeMin" @usableFromInline static let rangeOverflow: JSString = "rangeOverflow" @usableFromInline static let rangeUnderflow: JSString = "rangeUnderflow" @usableFromInline static let read: JSString = "read" @@ -19326,6 +21048,7 @@ public enum console { @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" @usableFromInline static let readAsText: JSString = "readAsText" @usableFromInline static let readOnly: JSString = "readOnly" + @usableFromInline static let readPixels: JSString = "readPixels" @usableFromInline static let readable: JSString = "readable" @usableFromInline static let readableType: JSString = "readableType" @usableFromInline static let ready: JSString = "ready" @@ -19358,6 +21081,7 @@ public enum console { @usableFromInline static let removeParameter: JSString = "removeParameter" @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" + @usableFromInline static let renderbufferStorage: JSString = "renderbufferStorage" @usableFromInline static let `repeat`: JSString = "repeat" @usableFromInline static let repetitionCount: JSString = "repetitionCount" @usableFromInline static let replace: JSString = "replace" @@ -19410,6 +21134,7 @@ public enum console { @usableFromInline static let rowSpan: JSString = "rowSpan" @usableFromInline static let rows: JSString = "rows" @usableFromInline static let rules: JSString = "rules" + @usableFromInline static let sampleCoverage: JSString = "sampleCoverage" @usableFromInline static let sampleRate: JSString = "sampleRate" @usableFromInline static let sampleSize: JSString = "sampleSize" @usableFromInline static let sandbox: JSString = "sandbox" @@ -19421,6 +21146,7 @@ public enum console { @usableFromInline static let scaleNonUniform: JSString = "scaleNonUniform" @usableFromInline static let scaleSelf: JSString = "scaleSelf" @usableFromInline static let scheme: JSString = "scheme" + @usableFromInline static let scissor: JSString = "scissor" @usableFromInline static let scope: JSString = "scope" @usableFromInline static let screenX: JSString = "screenX" @usableFromInline static let screenY: JSString = "screenY" @@ -19479,6 +21205,7 @@ public enum console { @usableFromInline static let setTimeout: JSString = "setTimeout" @usableFromInline static let setTransform: JSString = "setTransform" @usableFromInline static let setValidity: JSString = "setValidity" + @usableFromInline static let shaderSource: JSString = "shaderSource" @usableFromInline static let shadowBlur: JSString = "shadowBlur" @usableFromInline static let shadowColor: JSString = "shadowColor" @usableFromInline static let shadowOffsetX: JSString = "shadowOffsetX" @@ -19521,8 +21248,16 @@ public enum console { @usableFromInline static let startTime: JSString = "startTime" @usableFromInline static let state: JSString = "state" @usableFromInline static let status: JSString = "status" + @usableFromInline static let statusMessage: JSString = "statusMessage" @usableFromInline static let statusText: JSString = "statusText" @usableFromInline static let statusbar: JSString = "statusbar" + @usableFromInline static let stencil: JSString = "stencil" + @usableFromInline static let stencilFunc: JSString = "stencilFunc" + @usableFromInline static let stencilFuncSeparate: JSString = "stencilFuncSeparate" + @usableFromInline static let stencilMask: JSString = "stencilMask" + @usableFromInline static let stencilMaskSeparate: JSString = "stencilMaskSeparate" + @usableFromInline static let stencilOp: JSString = "stencilOp" + @usableFromInline static let stencilOpSeparate: JSString = "stencilOpSeparate" @usableFromInline static let step: JSString = "step" @usableFromInline static let stepDown: JSString = "stepDown" @usableFromInline static let stepMismatch: JSString = "stepMismatch" @@ -19563,6 +21298,10 @@ public enum console { @usableFromInline static let tee: JSString = "tee" @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" + @usableFromInline static let texImage2D: JSString = "texImage2D" + @usableFromInline static let texParameterf: JSString = "texParameterf" + @usableFromInline static let texParameteri: JSString = "texParameteri" + @usableFromInline static let texSubImage2D: JSString = "texSubImage2D" @usableFromInline static let text: JSString = "text" @usableFromInline static let textAlign: JSString = "textAlign" @usableFromInline static let textBaseline: JSString = "textBaseline" @@ -19610,6 +21349,25 @@ public enum console { @usableFromInline static let type: JSString = "type" @usableFromInline static let typeMismatch: JSString = "typeMismatch" @usableFromInline static let types: JSString = "types" + @usableFromInline static let uniform1f: JSString = "uniform1f" + @usableFromInline static let uniform1fv: JSString = "uniform1fv" + @usableFromInline static let uniform1i: JSString = "uniform1i" + @usableFromInline static let uniform1iv: JSString = "uniform1iv" + @usableFromInline static let uniform2f: JSString = "uniform2f" + @usableFromInline static let uniform2fv: JSString = "uniform2fv" + @usableFromInline static let uniform2i: JSString = "uniform2i" + @usableFromInline static let uniform2iv: JSString = "uniform2iv" + @usableFromInline static let uniform3f: JSString = "uniform3f" + @usableFromInline static let uniform3fv: JSString = "uniform3fv" + @usableFromInline static let uniform3i: JSString = "uniform3i" + @usableFromInline static let uniform3iv: JSString = "uniform3iv" + @usableFromInline static let uniform4f: JSString = "uniform4f" + @usableFromInline static let uniform4fv: JSString = "uniform4fv" + @usableFromInline static let uniform4i: JSString = "uniform4i" + @usableFromInline static let uniform4iv: JSString = "uniform4iv" + @usableFromInline static let uniformMatrix2fv: JSString = "uniformMatrix2fv" + @usableFromInline static let uniformMatrix3fv: JSString = "uniformMatrix3fv" + @usableFromInline static let uniformMatrix4fv: JSString = "uniformMatrix4fv" @usableFromInline static let unregister: JSString = "unregister" @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" @usableFromInline static let update: JSString = "update" @@ -19620,11 +21378,13 @@ public enum console { @usableFromInline static let upload: JSString = "upload" @usableFromInline static let url: JSString = "url" @usableFromInline static let useMap: JSString = "useMap" + @usableFromInline static let useProgram: JSString = "useProgram" @usableFromInline static let userAgent: JSString = "userAgent" @usableFromInline static let username: JSString = "username" @usableFromInline static let vAlign: JSString = "vAlign" @usableFromInline static let vLink: JSString = "vLink" @usableFromInline static let valid: JSString = "valid" + @usableFromInline static let validateProgram: JSString = "validateProgram" @usableFromInline static let validationMessage: JSString = "validationMessage" @usableFromInline static let validity: JSString = "validity" @usableFromInline static let value: JSString = "value" @@ -19635,12 +21395,22 @@ public enum console { @usableFromInline static let vendor: JSString = "vendor" @usableFromInline static let vendorSub: JSString = "vendorSub" @usableFromInline static let version: JSString = "version" + @usableFromInline static let vertexAttrib1f: JSString = "vertexAttrib1f" + @usableFromInline static let vertexAttrib1fv: JSString = "vertexAttrib1fv" + @usableFromInline static let vertexAttrib2f: JSString = "vertexAttrib2f" + @usableFromInline static let vertexAttrib2fv: JSString = "vertexAttrib2fv" + @usableFromInline static let vertexAttrib3f: JSString = "vertexAttrib3f" + @usableFromInline static let vertexAttrib3fv: JSString = "vertexAttrib3fv" + @usableFromInline static let vertexAttrib4f: JSString = "vertexAttrib4f" + @usableFromInline static let vertexAttrib4fv: JSString = "vertexAttrib4fv" + @usableFromInline static let vertexAttribPointer: JSString = "vertexAttribPointer" @usableFromInline static let video: JSString = "video" @usableFromInline static let videoBitsPerSecond: JSString = "videoBitsPerSecond" @usableFromInline static let videoHeight: JSString = "videoHeight" @usableFromInline static let videoTracks: JSString = "videoTracks" @usableFromInline static let videoWidth: JSString = "videoWidth" @usableFromInline static let view: JSString = "view" + @usableFromInline static let viewport: JSString = "viewport" @usableFromInline static let visibilityState: JSString = "visibilityState" @usableFromInline static let visible: JSString = "visible" @usableFromInline static let visibleRect: JSString = "visibleRect" @@ -20805,6 +22575,48 @@ public enum File_or_FormData_or_String: JSValueCompatible, Any_File_or_FormData_ } } +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 + } + } +} + public protocol Any_FormDataEntryValue: ConvertibleToJSValue {} extension File: Any_FormDataEntryValue {} extension String: Any_FormDataEntryValue {} @@ -21113,6 +22925,48 @@ public enum ImageBufferSource: JSValueCompatible, Any_ImageBufferSource { } } +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 + } + } +} + public protocol Any_MessageEventSource: ConvertibleToJSValue {} extension MessagePort: Any_MessageEventSource {} extension ServiceWorker: Any_MessageEventSource {} @@ -21561,6 +23415,118 @@ public enum String_or_seq_of_String: JSValueCompatible, Any_String_or_seq_of_Str } } +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 + } + } +} + public protocol Any_TimerHandler: ConvertibleToJSValue {} extension JSFunction: Any_TimerHandler {} extension String: Any_TimerHandler {} 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 f27be284c6dfcce9e9efd65563384d90e4682e3f Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 18:05:58 +0100 Subject: [PATCH 09/21] 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 ed597517eaca1b30194878deb90f12d4e125d8fe Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:07:16 +0100 Subject: [PATCH 10/21] 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 cb5b01177c33a26a33830b347e8338a1340500d7 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:15:27 +0100 Subject: [PATCH 11/21] 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 4842b705db93a7c90b1b21e8935d1842f871ec67 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 16:19:04 +0100 Subject: [PATCH 12/21] 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 + parse-idl/parse-all.js | 1 + 10 files changed, 1600 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) + } +} diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index 9df63f02..fb3e5c55 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -27,6 +27,7 @@ console.log( "mediastream-recording", "webcodecs", "webgl1", + "webgl2", ].map((key) => parsedFiles[key]), null, 2 From a646ea6e2a7274de0a54c60d7d16753668d9a1ae Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 2 May 2022 19:35:13 +0100 Subject: [PATCH 13/21] Add WebGL demo to `DOMKitDemo` --- Sources/DOMKit/RenderingContext.swift | 58 +++--- Sources/DOMKit/WebIDL/BitrateMode.swift | 22 ++ Sources/DOMKit/WebIDL/BlobEvent.swift | 24 +++ Sources/DOMKit/WebIDL/BlobEventInit.swift | 25 +++ .../Bool_or_MediaTrackConstraints.swift | 46 +++++ .../Bool_or_ScrollIntoViewOptions.swift | 46 +++++ Sources/DOMKit/WebIDL/BoxQuadOptions.swift | 25 +++ Sources/DOMKit/WebIDL/CSSBoxType.swift | 24 +++ Sources/DOMKit/WebIDL/CSSPseudoElement.swift | 29 +++ .../WebIDL/CSSPseudoElement_or_Element.swift | 46 +++++ .../CameraDevicePermissionDescriptor.swift | 20 ++ Sources/DOMKit/WebIDL/CaretPosition.swift | 27 +++ Sources/DOMKit/WebIDL/ConstrainBoolean.swift | 46 +++++ .../WebIDL/ConstrainBooleanParameters.swift | 25 +++ .../DOMKit/WebIDL/ConstrainDOMString.swift | 60 ++++++ .../WebIDL/ConstrainDOMStringParameters.swift | 25 +++ Sources/DOMKit/WebIDL/ConstrainDouble.swift | 46 +++++ .../DOMKit/WebIDL/ConstrainDoubleRange.swift | 25 +++ Sources/DOMKit/WebIDL/ConstrainULong.swift | 46 +++++ .../DOMKit/WebIDL/ConstrainULongRange.swift | 25 +++ .../WebIDL/ConvertCoordinateOptions.swift | 25 +++ .../WebIDL/DevicePermissionDescriptor.swift | 20 ++ Sources/DOMKit/WebIDL/DoubleRange.swift | 25 +++ Sources/DOMKit/WebIDL/GeometryNode.swift | 74 +++++++ Sources/DOMKit/WebIDL/GeometryUtils.swift | 27 +++ Sources/DOMKit/WebIDL/InputDeviceInfo.swift | 17 ++ Sources/DOMKit/WebIDL/IsVisibleOptions.swift | 16 ++ Sources/DOMKit/WebIDL/MediaDeviceInfo.swift | 35 ++++ Sources/DOMKit/WebIDL/MediaDeviceKind.swift | 23 +++ Sources/DOMKit/WebIDL/MediaDevices.swift | 45 ++++ Sources/DOMKit/WebIDL/MediaQueryList.swift | 28 +++ .../DOMKit/WebIDL/MediaQueryListEvent.swift | 24 +++ .../WebIDL/MediaQueryListEventInit.swift | 25 +++ Sources/DOMKit/WebIDL/MediaRecorder.swift | 94 +++++++++ .../WebIDL/MediaRecorderErrorEvent.swift | 20 ++ .../WebIDL/MediaRecorderErrorEventInit.swift | 20 ++ .../DOMKit/WebIDL/MediaRecorderOptions.swift | 40 ++++ Sources/DOMKit/WebIDL/MediaStream.swift | 75 +++++++ .../WebIDL/MediaStreamConstraints.swift | 25 +++ Sources/DOMKit/WebIDL/MediaStreamTrack.swift | 85 ++++++++ .../DOMKit/WebIDL/MediaStreamTrackEvent.swift | 20 ++ .../WebIDL/MediaStreamTrackEventInit.swift | 20 ++ .../DOMKit/WebIDL/MediaStreamTrackState.swift | 22 ++ .../WebIDL/MediaTrackCapabilities.swift | 90 ++++++++ .../WebIDL/MediaTrackConstraintSet.swift | 90 ++++++++ .../DOMKit/WebIDL/MediaTrackConstraints.swift | 20 ++ .../DOMKit/WebIDL/MediaTrackSettings.swift | 90 ++++++++ .../MediaTrackSupportedConstraints.swift | 90 ++++++++ .../DOMKit/WebIDL/OverconstrainedError.swift | 20 ++ Sources/DOMKit/WebIDL/RecordingState.swift | 23 +++ Sources/DOMKit/WebIDL/Screen.swift | 38 ++++ Sources/DOMKit/WebIDL/ScrollBehavior.swift | 22 ++ .../DOMKit/WebIDL/ScrollIntoViewOptions.swift | 25 +++ .../DOMKit/WebIDL/ScrollLogicalPosition.swift | 24 +++ Sources/DOMKit/WebIDL/ScrollOptions.swift | 20 ++ Sources/DOMKit/WebIDL/ScrollToOptions.swift | 25 +++ Sources/DOMKit/WebIDL/ULongRange.swift | 25 +++ .../DOMKit/WebIDL/VideoFacingModeEnum.swift | 24 +++ .../DOMKit/WebIDL/VideoResizeModeEnum.swift | 22 ++ Sources/DOMKitDemo/WebGLDemo.swift | 192 ++++++++++++++++++ Sources/DOMKitDemo/main.swift | 7 +- parse-idl/parse-all.js | 2 + 62 files changed, 2314 insertions(+), 30 deletions(-) create mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift create mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift create mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift create mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift create mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift create mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift create mode 100644 Sources/DOMKit/WebIDL/Screen.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift create mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift create mode 100644 Sources/DOMKitDemo/WebGLDemo.swift diff --git a/Sources/DOMKit/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift index ad42b922..13ef65df 100644 --- a/Sources/DOMKit/RenderingContext.swift +++ b/Sources/DOMKit/RenderingContext.swift @@ -5,17 +5,17 @@ import JavaScriptKit public protocol Any_RenderingContext: ConvertibleToJSValue {} extension CanvasRenderingContext2D: Any_RenderingContext {} -//extension GPUCanvasContext: Any_RenderingContext {} +// extension GPUCanvasContext: Any_RenderingContext {} extension ImageBitmapRenderingContext: Any_RenderingContext {} -//extension WebGL2RenderingContext: Any_RenderingContext {} -//extension WebGLRenderingContext: Any_RenderingContext {} +// extension WebGL2RenderingContext: Any_RenderingContext {} +// extension WebGLRenderingContext: Any_RenderingContext {} public enum RenderingContext: JSValueCompatible, Any_RenderingContext { case canvasRenderingContext2D(CanvasRenderingContext2D) // case gpuCanvasContext(GPUCanvasContext) case imageBitmapRenderingContext(ImageBitmapRenderingContext) -// case webGL2RenderingContext(WebGL2RenderingContext) -// case webGLRenderingContext(WebGLRenderingContext) + case webGL2RenderingContext(WebGL2RenderingContext) + case webGLRenderingContext(WebGLRenderingContext) var canvasRenderingContext2D: CanvasRenderingContext2D? { switch self { @@ -31,26 +31,26 @@ public enum RenderingContext: JSValueCompatible, Any_RenderingContext { // } // } - var imageBitmapRenderingContext: ImageBitmapRenderingContext? { + public var imageBitmapRenderingContext: ImageBitmapRenderingContext? { switch self { case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext default: return nil } } -// var webGL2RenderingContext: WebGL2RenderingContext? { -// switch self { -// case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext -// default: return nil -// } -// } -// -// var webGLRenderingContext: WebGLRenderingContext? { -// switch self { -// case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext -// default: return nil -// } -// } + public var webGL2RenderingContext: WebGL2RenderingContext? { + switch self { + case let .webGL2RenderingContext(webGL2RenderingContext): return webGL2RenderingContext + default: return nil + } + } + + public var webGLRenderingContext: WebGLRenderingContext? { + switch self { + case let .webGLRenderingContext(webGLRenderingContext): return webGLRenderingContext + default: return nil + } + } public static func construct(from value: JSValue) -> Self? { if let canvasRenderingContext2D: CanvasRenderingContext2D = value.fromJSValue() { @@ -62,12 +62,12 @@ public enum RenderingContext: JSValueCompatible, Any_RenderingContext { if let imageBitmapRenderingContext: ImageBitmapRenderingContext = value.fromJSValue() { return .imageBitmapRenderingContext(imageBitmapRenderingContext) } -// if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { -// return .webGL2RenderingContext(webGL2RenderingContext) -// } -// if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { -// return .webGLRenderingContext(webGLRenderingContext) -// } + if let webGL2RenderingContext: WebGL2RenderingContext = value.fromJSValue() { + return .webGL2RenderingContext(webGL2RenderingContext) + } + if let webGLRenderingContext: WebGLRenderingContext = value.fromJSValue() { + return .webGLRenderingContext(webGLRenderingContext) + } return nil } @@ -79,10 +79,10 @@ public enum RenderingContext: JSValueCompatible, Any_RenderingContext { // return gpuCanvasContext.jsValue case let .imageBitmapRenderingContext(imageBitmapRenderingContext): return imageBitmapRenderingContext.jsValue -// case let .webGL2RenderingContext(webGL2RenderingContext): -// return webGL2RenderingContext.jsValue -// case let .webGLRenderingContext(webGLRenderingContext): -// return webGLRenderingContext.jsValue + case let .webGL2RenderingContext(webGL2RenderingContext): + return webGL2RenderingContext.jsValue + case let .webGLRenderingContext(webGLRenderingContext): + return webGLRenderingContext.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/ConstrainBoolean.swift b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift new file mode 100644 index 00000000..38559275 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainBoolean.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainBoolean: ConvertibleToJSValue {} +extension Bool: Any_ConstrainBoolean {} +extension ConstrainBooleanParameters: Any_ConstrainBoolean {} + +public enum ConstrainBoolean: JSValueCompatible, Any_ConstrainBoolean { + case bool(Bool) + case constrainBooleanParameters(ConstrainBooleanParameters) + + var bool: Bool? { + switch self { + case let .bool(bool): return bool + default: return nil + } + } + + var constrainBooleanParameters: ConstrainBooleanParameters? { + switch self { + case let .constrainBooleanParameters(constrainBooleanParameters): return constrainBooleanParameters + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let bool: Bool = value.fromJSValue() { + return .bool(bool) + } + if let constrainBooleanParameters: ConstrainBooleanParameters = value.fromJSValue() { + return .constrainBooleanParameters(constrainBooleanParameters) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .bool(bool): + return bool.jsValue + case let .constrainBooleanParameters(constrainBooleanParameters): + return constrainBooleanParameters.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift new file mode 100644 index 00000000..aed2cd3b --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainBooleanParameters: BridgedDictionary { + public convenience init(exact: Bool, ideal: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: Bool + + @ReadWriteAttribute + public var ideal: Bool +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMString.swift b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift new file mode 100644 index 00000000..5c2cb816 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDOMString.swift @@ -0,0 +1,60 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainDOMString: ConvertibleToJSValue {} +extension ConstrainDOMStringParameters: Any_ConstrainDOMString {} +extension String: Any_ConstrainDOMString {} +extension Array: Any_ConstrainDOMString where Element == String {} + +public enum ConstrainDOMString: JSValueCompatible, Any_ConstrainDOMString { + case constrainDOMStringParameters(ConstrainDOMStringParameters) + case string(String) + case seq_of_String([String]) + + var constrainDOMStringParameters: ConstrainDOMStringParameters? { + switch self { + case let .constrainDOMStringParameters(constrainDOMStringParameters): return constrainDOMStringParameters + default: return nil + } + } + + var string: String? { + switch self { + case let .string(string): return string + default: return nil + } + } + + var seq_of_String: [String]? { + switch self { + case let .seq_of_String(seq_of_String): return seq_of_String + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainDOMStringParameters: ConstrainDOMStringParameters = value.fromJSValue() { + return .constrainDOMStringParameters(constrainDOMStringParameters) + } + if let string: String = value.fromJSValue() { + return .string(string) + } + if let seq_of_String: [String] = value.fromJSValue() { + return .seq_of_String(seq_of_String) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainDOMStringParameters(constrainDOMStringParameters): + return constrainDOMStringParameters.jsValue + case let .string(string): + return string.jsValue + case let .seq_of_String(seq_of_String): + return seq_of_String.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift new file mode 100644 index 00000000..8a51b973 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainDOMStringParameters: BridgedDictionary { + public convenience init(exact: String_or_seq_of_String, ideal: String_or_seq_of_String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: String_or_seq_of_String + + @ReadWriteAttribute + public var ideal: String_or_seq_of_String +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDouble.swift b/Sources/DOMKit/WebIDL/ConstrainDouble.swift new file mode 100644 index 00000000..41993e8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDouble.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainDouble: ConvertibleToJSValue {} +extension ConstrainDoubleRange: Any_ConstrainDouble {} +extension Double: Any_ConstrainDouble {} + +public enum ConstrainDouble: JSValueCompatible, Any_ConstrainDouble { + case constrainDoubleRange(ConstrainDoubleRange) + case double(Double) + + var constrainDoubleRange: ConstrainDoubleRange? { + switch self { + case let .constrainDoubleRange(constrainDoubleRange): return constrainDoubleRange + default: return nil + } + } + + var double: Double? { + switch self { + case let .double(double): return double + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainDoubleRange: ConstrainDoubleRange = value.fromJSValue() { + return .constrainDoubleRange(constrainDoubleRange) + } + if let double: Double = value.fromJSValue() { + return .double(double) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainDoubleRange(constrainDoubleRange): + return constrainDoubleRange.jsValue + case let .double(double): + return double.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift new file mode 100644 index 00000000..9ee176e9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainDoubleRange: BridgedDictionary { + public convenience init(exact: Double, ideal: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: Double + + @ReadWriteAttribute + public var ideal: Double +} diff --git a/Sources/DOMKit/WebIDL/ConstrainULong.swift b/Sources/DOMKit/WebIDL/ConstrainULong.swift new file mode 100644 index 00000000..614cf30b --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainULong.swift @@ -0,0 +1,46 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_ConstrainULong: ConvertibleToJSValue {} +extension ConstrainULongRange: Any_ConstrainULong {} +extension UInt32: Any_ConstrainULong {} + +public enum ConstrainULong: JSValueCompatible, Any_ConstrainULong { + case constrainULongRange(ConstrainULongRange) + case uInt32(UInt32) + + var constrainULongRange: ConstrainULongRange? { + switch self { + case let .constrainULongRange(constrainULongRange): return constrainULongRange + default: return nil + } + } + + var uInt32: UInt32? { + switch self { + case let .uInt32(uInt32): return uInt32 + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let constrainULongRange: ConstrainULongRange = value.fromJSValue() { + return .constrainULongRange(constrainULongRange) + } + if let uInt32: UInt32 = value.fromJSValue() { + return .uInt32(uInt32) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .constrainULongRange(constrainULongRange): + return constrainULongRange.jsValue + case let .uInt32(uInt32): + return uInt32.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/ConstrainULongRange.swift b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift new file mode 100644 index 00000000..5a87be30 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConstrainULongRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConstrainULongRange: BridgedDictionary { + public convenience init(exact: UInt32, ideal: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.exact] = exact.jsValue + object[Strings.ideal] = ideal.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _exact = ReadWriteAttribute(jsObject: object, name: Strings.exact) + _ideal = ReadWriteAttribute(jsObject: object, name: Strings.ideal) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var exact: UInt32 + + @ReadWriteAttribute + public var ideal: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift new file mode 100644 index 00000000..e5671dbc --- /dev/null +++ b/Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ConvertCoordinateOptions: BridgedDictionary { + public convenience init(fromBox: CSSBoxType, toBox: CSSBoxType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.fromBox] = fromBox.jsValue + object[Strings.toBox] = toBox.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _fromBox = ReadWriteAttribute(jsObject: object, name: Strings.fromBox) + _toBox = ReadWriteAttribute(jsObject: object, name: Strings.toBox) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var fromBox: CSSBoxType + + @ReadWriteAttribute + public var toBox: CSSBoxType +} diff --git a/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift new file mode 100644 index 00000000..92ae09de --- /dev/null +++ b/Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class DevicePermissionDescriptor: BridgedDictionary { + public convenience init(deviceId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.deviceId] = deviceId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var deviceId: String +} diff --git a/Sources/DOMKit/WebIDL/DoubleRange.swift b/Sources/DOMKit/WebIDL/DoubleRange.swift new file mode 100644 index 00000000..b58107cf --- /dev/null +++ b/Sources/DOMKit/WebIDL/DoubleRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class DoubleRange: BridgedDictionary { + public convenience init(max: Double, min: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.max] = max.jsValue + object[Strings.min] = min.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _max = ReadWriteAttribute(jsObject: object, name: Strings.max) + _min = ReadWriteAttribute(jsObject: object, name: Strings.min) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var max: Double + + @ReadWriteAttribute + public var min: Double +} diff --git a/Sources/DOMKit/WebIDL/GeometryNode.swift b/Sources/DOMKit/WebIDL/GeometryNode.swift new file mode 100644 index 00000000..5554a102 --- /dev/null +++ b/Sources/DOMKit/WebIDL/GeometryNode.swift @@ -0,0 +1,74 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol Any_GeometryNode: ConvertibleToJSValue {} +extension CSSPseudoElement: Any_GeometryNode {} +extension Document: Any_GeometryNode {} +extension Element: Any_GeometryNode {} +extension Text: Any_GeometryNode {} + +public enum GeometryNode: JSValueCompatible, Any_GeometryNode { + case cssPseudoElement(CSSPseudoElement) + case document(Document) + case element(Element) + case text(Text) + + var cssPseudoElement: CSSPseudoElement? { + switch self { + case let .cssPseudoElement(cssPseudoElement): return cssPseudoElement + default: return nil + } + } + + var document: Document? { + switch self { + case let .document(document): return document + default: return nil + } + } + + var element: Element? { + switch self { + case let .element(element): return element + default: return nil + } + } + + var text: Text? { + switch self { + case let .text(text): return text + default: return nil + } + } + + public static func construct(from value: JSValue) -> Self? { + if let cssPseudoElement: CSSPseudoElement = value.fromJSValue() { + return .cssPseudoElement(cssPseudoElement) + } + if let document: Document = value.fromJSValue() { + return .document(document) + } + if let element: Element = value.fromJSValue() { + return .element(element) + } + if let text: Text = value.fromJSValue() { + return .text(text) + } + return nil + } + + public var jsValue: JSValue { + switch self { + case let .cssPseudoElement(cssPseudoElement): + return cssPseudoElement.jsValue + case let .document(document): + return document.jsValue + case let .element(element): + return element.jsValue + case let .text(text): + return text.jsValue + } + } +} diff --git a/Sources/DOMKit/WebIDL/GeometryUtils.swift b/Sources/DOMKit/WebIDL/GeometryUtils.swift new file mode 100644 index 00000000..15114de3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/GeometryUtils.swift @@ -0,0 +1,27 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public protocol GeometryUtils: JSBridgedClass {} +public extension GeometryUtils { + @inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] { + let this = jsObject + return this[Strings.getBoxQuads].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertQuadFromNode(quad: DOMQuadInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { + let this = jsObject + return this[Strings.convertQuadFromNode].function!(this: this, arguments: [quad.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMQuad { + let this = jsObject + return this[Strings.convertRectFromNode].function!(this: this, arguments: [rect.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable func convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions? = nil) -> DOMPoint { + let this = jsObject + return this[Strings.convertPointFromNode].function!(this: this, arguments: [point.jsValue, from.jsValue, options?.jsValue ?? .undefined]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/InputDeviceInfo.swift b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift new file mode 100644 index 00000000..d6170195 --- /dev/null +++ b/Sources/DOMKit/WebIDL/InputDeviceInfo.swift @@ -0,0 +1,17 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class InputDeviceInfo: MediaDeviceInfo { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.InputDeviceInfo].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public func getCapabilities() -> MediaTrackCapabilities { + let this = jsObject + return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/IsVisibleOptions.swift b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift new file mode 100644 index 00000000..2cf015a8 --- /dev/null +++ b/Sources/DOMKit/WebIDL/IsVisibleOptions.swift @@ -0,0 +1,16 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class IsVisibleOptions: BridgedDictionary { + public convenience init() { + let object = JSObject.global[Strings.Object].function!.new() + + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + super.init(unsafelyWrapping: object) + } +} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift new file mode 100644 index 00000000..1f063478 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDeviceInfo.swift @@ -0,0 +1,35 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaDeviceInfo: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.MediaDeviceInfo].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _deviceId = ReadonlyAttribute(jsObject: jsObject, name: Strings.deviceId) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _groupId = ReadonlyAttribute(jsObject: jsObject, name: Strings.groupId) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var deviceId: String + + @ReadonlyAttribute + public var kind: MediaDeviceKind + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var groupId: String + + @inlinable public func toJSON() -> JSObject { + let this = jsObject + return this[Strings.toJSON].function!(this: this, arguments: []).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaDeviceKind.swift b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift new file mode 100644 index 00000000..a19daab0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDeviceKind.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum MediaDeviceKind: JSString, JSValueCompatible { + case audioinput = "audioinput" + case audiooutput = "audiooutput" + case videoinput = "videoinput" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaDevices.swift b/Sources/DOMKit/WebIDL/MediaDevices.swift new file mode 100644 index 00000000..a65b2d59 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaDevices.swift @@ -0,0 +1,45 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaDevices: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaDevices].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _ondevicechange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondevicechange) + super.init(unsafelyWrapping: jsObject) + } + + @ClosureAttribute1Optional + public var ondevicechange: EventHandler + + @inlinable public func enumerateDevices() -> JSPromise { + let this = jsObject + return this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func enumerateDevices() async throws -> [MediaDeviceInfo] { + let this = jsObject + let _promise: JSPromise = this[Strings.enumerateDevices].function!(this: this, arguments: []).fromJSValue()! + return try await _promise.value.fromJSValue()! + } + + @inlinable public func getSupportedConstraints() -> MediaTrackSupportedConstraints { + let this = jsObject + return this[Strings.getSupportedConstraints].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) -> JSPromise { + let this = jsObject + return this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func getUserMedia(constraints: MediaStreamConstraints? = nil) async throws -> MediaStream { + let this = jsObject + let _promise: JSPromise = this[Strings.getUserMedia].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + return try await _promise.value.fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryList.swift b/Sources/DOMKit/WebIDL/MediaQueryList.swift new file mode 100644 index 00000000..e2f6e574 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryList.swift @@ -0,0 +1,28 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) + _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var media: String + + @ReadonlyAttribute + public var matches: Bool + + // XXX: member 'addListener' is ignored + + // XXX: member 'removeListener' is ignored + + @ClosureAttribute1Optional + public var onchange: EventHandler +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift new file mode 100644 index 00000000..e74e5c35 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryListEvent.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryListEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaQueryListEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _media = ReadonlyAttribute(jsObject: jsObject, name: Strings.media) + _matches = ReadonlyAttribute(jsObject: jsObject, name: Strings.matches) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaQueryListEventInit? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var media: String + + @ReadonlyAttribute + public var matches: Bool +} diff --git a/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift new file mode 100644 index 00000000..0f6adc8b --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaQueryListEventInit: BridgedDictionary { + public convenience init(media: String, matches: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.media] = media.jsValue + object[Strings.matches] = matches.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _media = ReadWriteAttribute(jsObject: object, name: Strings.media) + _matches = ReadWriteAttribute(jsObject: object, name: Strings.matches) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var media: String + + @ReadWriteAttribute + public var matches: Bool +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorder.swift b/Sources/DOMKit/WebIDL/MediaRecorder.swift new file mode 100644 index 00000000..9336c57b --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorder.swift @@ -0,0 +1,94 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorder: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _stream = ReadonlyAttribute(jsObject: jsObject, name: Strings.stream) + _mimeType = ReadonlyAttribute(jsObject: jsObject, name: Strings.mimeType) + _state = ReadonlyAttribute(jsObject: jsObject, name: Strings.state) + _onstart = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstart) + _onstop = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onstop) + _ondataavailable = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.ondataavailable) + _onpause = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onpause) + _onresume = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onresume) + _onerror = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onerror) + _videoBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.videoBitsPerSecond) + _audioBitsPerSecond = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitsPerSecond) + _audioBitrateMode = ReadonlyAttribute(jsObject: jsObject, name: Strings.audioBitrateMode) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(stream: MediaStream, options: MediaRecorderOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var stream: MediaStream + + @ReadonlyAttribute + public var mimeType: String + + @ReadonlyAttribute + public var state: RecordingState + + @ClosureAttribute1Optional + public var onstart: EventHandler + + @ClosureAttribute1Optional + public var onstop: EventHandler + + @ClosureAttribute1Optional + public var ondataavailable: EventHandler + + @ClosureAttribute1Optional + public var onpause: EventHandler + + @ClosureAttribute1Optional + public var onresume: EventHandler + + @ClosureAttribute1Optional + public var onerror: EventHandler + + @ReadonlyAttribute + public var videoBitsPerSecond: UInt32 + + @ReadonlyAttribute + public var audioBitsPerSecond: UInt32 + + @ReadonlyAttribute + public var audioBitrateMode: BitrateMode + + @inlinable public func start(timeslice: UInt32? = nil) { + let this = jsObject + _ = this[Strings.start].function!(this: this, arguments: [timeslice?.jsValue ?? .undefined]) + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func pause() { + let this = jsObject + _ = this[Strings.pause].function!(this: this, arguments: []) + } + + @inlinable public func resume() { + let this = jsObject + _ = this[Strings.resume].function!(this: this, arguments: []) + } + + @inlinable public func requestData() { + let this = jsObject + _ = this[Strings.requestData].function!(this: this, arguments: []) + } + + @inlinable public static func isTypeSupported(type: String) -> Bool { + let this = constructor + return this[Strings.isTypeSupported].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift new file mode 100644 index 00000000..c4b4cc09 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderErrorEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorderErrorEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _error = ReadonlyAttribute(jsObject: jsObject, name: Strings.error) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaRecorderErrorEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var error: DOMException +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift new file mode 100644 index 00000000..4c773a67 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderErrorEventInit: BridgedDictionary { + public convenience init(error: DOMException) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.error] = error.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _error = ReadWriteAttribute(jsObject: object, name: Strings.error) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var error: DOMException +} diff --git a/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift new file mode 100644 index 00000000..3a4300b0 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaRecorderOptions.swift @@ -0,0 +1,40 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaRecorderOptions: BridgedDictionary { + public convenience init(mimeType: String, audioBitsPerSecond: UInt32, videoBitsPerSecond: UInt32, bitsPerSecond: UInt32, audioBitrateMode: BitrateMode) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.mimeType] = mimeType.jsValue + object[Strings.audioBitsPerSecond] = audioBitsPerSecond.jsValue + object[Strings.videoBitsPerSecond] = videoBitsPerSecond.jsValue + object[Strings.bitsPerSecond] = bitsPerSecond.jsValue + object[Strings.audioBitrateMode] = audioBitrateMode.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _mimeType = ReadWriteAttribute(jsObject: object, name: Strings.mimeType) + _audioBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.audioBitsPerSecond) + _videoBitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.videoBitsPerSecond) + _bitsPerSecond = ReadWriteAttribute(jsObject: object, name: Strings.bitsPerSecond) + _audioBitrateMode = ReadWriteAttribute(jsObject: object, name: Strings.audioBitrateMode) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var mimeType: String + + @ReadWriteAttribute + public var audioBitsPerSecond: UInt32 + + @ReadWriteAttribute + public var videoBitsPerSecond: UInt32 + + @ReadWriteAttribute + public var bitsPerSecond: UInt32 + + @ReadWriteAttribute + public var audioBitrateMode: BitrateMode +} diff --git a/Sources/DOMKit/WebIDL/MediaStream.swift b/Sources/DOMKit/WebIDL/MediaStream.swift new file mode 100644 index 00000000..819dac5a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStream.swift @@ -0,0 +1,75 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStream: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStream].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _active = ReadonlyAttribute(jsObject: jsObject, name: Strings.active) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init() { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [])) + } + + @inlinable public convenience init(stream: MediaStream) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [stream.jsValue])) + } + + @inlinable public convenience init(tracks: [MediaStreamTrack]) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [tracks.jsValue])) + } + + @ReadonlyAttribute + public var id: String + + @inlinable public func getAudioTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getAudioTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getVideoTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getVideoTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getTracks() -> [MediaStreamTrack] { + let this = jsObject + return this[Strings.getTracks].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getTrackById(trackId: String) -> MediaStreamTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [trackId.jsValue]).fromJSValue()! + } + + @inlinable public func addTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.addTrack].function!(this: this, arguments: [track.jsValue]) + } + + @inlinable public func removeTrack(track: MediaStreamTrack) { + let this = jsObject + _ = this[Strings.removeTrack].function!(this: this, arguments: [track.jsValue]) + } + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @ReadonlyAttribute + public var active: Bool + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift new file mode 100644 index 00000000..b2ee4cce --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamConstraints.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamConstraints: BridgedDictionary { + public convenience init(video: Bool_or_MediaTrackConstraints, audio: Bool_or_MediaTrackConstraints) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.video] = video.jsValue + object[Strings.audio] = audio.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _video = ReadWriteAttribute(jsObject: object, name: Strings.video) + _audio = ReadWriteAttribute(jsObject: object, name: Strings.audio) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var video: Bool_or_MediaTrackConstraints + + @ReadWriteAttribute + public var audio: Bool_or_MediaTrackConstraints +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrack.swift b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift new file mode 100644 index 00000000..450347d9 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrack.swift @@ -0,0 +1,85 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrack: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrack].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _enabled = ReadWriteAttribute(jsObject: jsObject, name: Strings.enabled) + _muted = ReadonlyAttribute(jsObject: jsObject, name: Strings.muted) + _onmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onmute) + _onunmute = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onunmute) + _readyState = ReadonlyAttribute(jsObject: jsObject, name: Strings.readyState) + _onended = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onended) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var label: String + + @ReadWriteAttribute + public var enabled: Bool + + @ReadonlyAttribute + public var muted: Bool + + @ClosureAttribute1Optional + public var onmute: EventHandler + + @ClosureAttribute1Optional + public var onunmute: EventHandler + + @ReadonlyAttribute + public var readyState: MediaStreamTrackState + + @ClosureAttribute1Optional + public var onended: EventHandler + + @inlinable public func clone() -> Self { + let this = jsObject + return this[Strings.clone].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func stop() { + let this = jsObject + _ = this[Strings.stop].function!(this: this, arguments: []) + } + + @inlinable public func getCapabilities() -> MediaTrackCapabilities { + let this = jsObject + return this[Strings.getCapabilities].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getConstraints() -> MediaTrackConstraints { + let this = jsObject + return this[Strings.getConstraints].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getSettings() -> MediaTrackSettings { + let this = jsObject + return this[Strings.getSettings].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) -> JSPromise { + let this = jsObject + return this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + } + + @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) + @inlinable public func applyConstraints(constraints: MediaTrackConstraints? = nil) async throws { + let this = jsObject + let _promise: JSPromise = this[Strings.applyConstraints].function!(this: this, arguments: [constraints?.jsValue ?? .undefined]).fromJSValue()! + _ = try await _promise.value + } +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift new file mode 100644 index 00000000..21d98e5a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrackEvent: Event { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaStreamTrackEvent].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _track = ReadonlyAttribute(jsObject: jsObject, name: Strings.track) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(type: String, eventInitDict: MediaStreamTrackEventInit) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [type.jsValue, eventInitDict.jsValue])) + } + + @ReadonlyAttribute + public var track: MediaStreamTrack +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift new file mode 100644 index 00000000..2bab9838 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaStreamTrackEventInit: BridgedDictionary { + public convenience init(track: MediaStreamTrack) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.track] = track.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _track = ReadWriteAttribute(jsObject: object, name: Strings.track) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var track: MediaStreamTrack +} diff --git a/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift new file mode 100644 index 00000000..d08534a1 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaStreamTrackState.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum MediaStreamTrackState: JSString, JSValueCompatible { + case live = "live" + case ended = "ended" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift new file mode 100644 index 00000000..41982ba3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackCapabilities: BridgedDictionary { + public convenience init(width: ULongRange, height: ULongRange, aspectRatio: DoubleRange, frameRate: DoubleRange, facingMode: [String], resizeMode: [String], sampleRate: ULongRange, sampleSize: ULongRange, echoCancellation: [Bool], autoGainControl: [Bool], noiseSuppression: [Bool], latency: DoubleRange, channelCount: ULongRange, deviceId: String, groupId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: ULongRange + + @ReadWriteAttribute + public var height: ULongRange + + @ReadWriteAttribute + public var aspectRatio: DoubleRange + + @ReadWriteAttribute + public var frameRate: DoubleRange + + @ReadWriteAttribute + public var facingMode: [String] + + @ReadWriteAttribute + public var resizeMode: [String] + + @ReadWriteAttribute + public var sampleRate: ULongRange + + @ReadWriteAttribute + public var sampleSize: ULongRange + + @ReadWriteAttribute + public var echoCancellation: [Bool] + + @ReadWriteAttribute + public var autoGainControl: [Bool] + + @ReadWriteAttribute + public var noiseSuppression: [Bool] + + @ReadWriteAttribute + public var latency: DoubleRange + + @ReadWriteAttribute + public var channelCount: ULongRange + + @ReadWriteAttribute + public var deviceId: String + + @ReadWriteAttribute + public var groupId: String +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift new file mode 100644 index 00000000..1489baaa --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackConstraintSet: BridgedDictionary { + public convenience init(width: ConstrainULong, height: ConstrainULong, aspectRatio: ConstrainDouble, frameRate: ConstrainDouble, facingMode: ConstrainDOMString, resizeMode: ConstrainDOMString, sampleRate: ConstrainULong, sampleSize: ConstrainULong, echoCancellation: ConstrainBoolean, autoGainControl: ConstrainBoolean, noiseSuppression: ConstrainBoolean, latency: ConstrainDouble, channelCount: ConstrainULong, deviceId: ConstrainDOMString, groupId: ConstrainDOMString) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: ConstrainULong + + @ReadWriteAttribute + public var height: ConstrainULong + + @ReadWriteAttribute + public var aspectRatio: ConstrainDouble + + @ReadWriteAttribute + public var frameRate: ConstrainDouble + + @ReadWriteAttribute + public var facingMode: ConstrainDOMString + + @ReadWriteAttribute + public var resizeMode: ConstrainDOMString + + @ReadWriteAttribute + public var sampleRate: ConstrainULong + + @ReadWriteAttribute + public var sampleSize: ConstrainULong + + @ReadWriteAttribute + public var echoCancellation: ConstrainBoolean + + @ReadWriteAttribute + public var autoGainControl: ConstrainBoolean + + @ReadWriteAttribute + public var noiseSuppression: ConstrainBoolean + + @ReadWriteAttribute + public var latency: ConstrainDouble + + @ReadWriteAttribute + public var channelCount: ConstrainULong + + @ReadWriteAttribute + public var deviceId: ConstrainDOMString + + @ReadWriteAttribute + public var groupId: ConstrainDOMString +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift new file mode 100644 index 00000000..5307db8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackConstraints.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackConstraints: BridgedDictionary { + public convenience init(advanced: [MediaTrackConstraintSet]) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.advanced] = advanced.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _advanced = ReadWriteAttribute(jsObject: object, name: Strings.advanced) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var advanced: [MediaTrackConstraintSet] +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSettings.swift b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift new file mode 100644 index 00000000..84d866a3 --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackSettings.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackSettings: BridgedDictionary { + public convenience init(width: Int32, height: Int32, aspectRatio: Double, frameRate: Double, facingMode: String, resizeMode: String, sampleRate: Int32, sampleSize: Int32, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Double, channelCount: Int32, deviceId: String, groupId: String) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: Int32 + + @ReadWriteAttribute + public var height: Int32 + + @ReadWriteAttribute + public var aspectRatio: Double + + @ReadWriteAttribute + public var frameRate: Double + + @ReadWriteAttribute + public var facingMode: String + + @ReadWriteAttribute + public var resizeMode: String + + @ReadWriteAttribute + public var sampleRate: Int32 + + @ReadWriteAttribute + public var sampleSize: Int32 + + @ReadWriteAttribute + public var echoCancellation: Bool + + @ReadWriteAttribute + public var autoGainControl: Bool + + @ReadWriteAttribute + public var noiseSuppression: Bool + + @ReadWriteAttribute + public var latency: Double + + @ReadWriteAttribute + public var channelCount: Int32 + + @ReadWriteAttribute + public var deviceId: String + + @ReadWriteAttribute + public var groupId: String +} diff --git a/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift new file mode 100644 index 00000000..bcbfd4ba --- /dev/null +++ b/Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift @@ -0,0 +1,90 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class MediaTrackSupportedConstraints: BridgedDictionary { + public convenience init(width: Bool, height: Bool, aspectRatio: Bool, frameRate: Bool, facingMode: Bool, resizeMode: Bool, sampleRate: Bool, sampleSize: Bool, echoCancellation: Bool, autoGainControl: Bool, noiseSuppression: Bool, latency: Bool, channelCount: Bool, deviceId: Bool, groupId: Bool) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.width] = width.jsValue + object[Strings.height] = height.jsValue + object[Strings.aspectRatio] = aspectRatio.jsValue + object[Strings.frameRate] = frameRate.jsValue + object[Strings.facingMode] = facingMode.jsValue + object[Strings.resizeMode] = resizeMode.jsValue + object[Strings.sampleRate] = sampleRate.jsValue + object[Strings.sampleSize] = sampleSize.jsValue + object[Strings.echoCancellation] = echoCancellation.jsValue + object[Strings.autoGainControl] = autoGainControl.jsValue + object[Strings.noiseSuppression] = noiseSuppression.jsValue + object[Strings.latency] = latency.jsValue + object[Strings.channelCount] = channelCount.jsValue + object[Strings.deviceId] = deviceId.jsValue + object[Strings.groupId] = groupId.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _width = ReadWriteAttribute(jsObject: object, name: Strings.width) + _height = ReadWriteAttribute(jsObject: object, name: Strings.height) + _aspectRatio = ReadWriteAttribute(jsObject: object, name: Strings.aspectRatio) + _frameRate = ReadWriteAttribute(jsObject: object, name: Strings.frameRate) + _facingMode = ReadWriteAttribute(jsObject: object, name: Strings.facingMode) + _resizeMode = ReadWriteAttribute(jsObject: object, name: Strings.resizeMode) + _sampleRate = ReadWriteAttribute(jsObject: object, name: Strings.sampleRate) + _sampleSize = ReadWriteAttribute(jsObject: object, name: Strings.sampleSize) + _echoCancellation = ReadWriteAttribute(jsObject: object, name: Strings.echoCancellation) + _autoGainControl = ReadWriteAttribute(jsObject: object, name: Strings.autoGainControl) + _noiseSuppression = ReadWriteAttribute(jsObject: object, name: Strings.noiseSuppression) + _latency = ReadWriteAttribute(jsObject: object, name: Strings.latency) + _channelCount = ReadWriteAttribute(jsObject: object, name: Strings.channelCount) + _deviceId = ReadWriteAttribute(jsObject: object, name: Strings.deviceId) + _groupId = ReadWriteAttribute(jsObject: object, name: Strings.groupId) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var width: Bool + + @ReadWriteAttribute + public var height: Bool + + @ReadWriteAttribute + public var aspectRatio: Bool + + @ReadWriteAttribute + public var frameRate: Bool + + @ReadWriteAttribute + public var facingMode: Bool + + @ReadWriteAttribute + public var resizeMode: Bool + + @ReadWriteAttribute + public var sampleRate: Bool + + @ReadWriteAttribute + public var sampleSize: Bool + + @ReadWriteAttribute + public var echoCancellation: Bool + + @ReadWriteAttribute + public var autoGainControl: Bool + + @ReadWriteAttribute + public var noiseSuppression: Bool + + @ReadWriteAttribute + public var latency: Bool + + @ReadWriteAttribute + public var channelCount: Bool + + @ReadWriteAttribute + public var deviceId: Bool + + @ReadWriteAttribute + public var groupId: Bool +} diff --git a/Sources/DOMKit/WebIDL/OverconstrainedError.swift b/Sources/DOMKit/WebIDL/OverconstrainedError.swift new file mode 100644 index 00000000..61499735 --- /dev/null +++ b/Sources/DOMKit/WebIDL/OverconstrainedError.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class OverconstrainedError: DOMException { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.OverconstrainedError].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _constraint = ReadonlyAttribute(jsObject: jsObject, name: Strings.constraint) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(constraint: String, message: String? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [constraint.jsValue, message?.jsValue ?? .undefined])) + } + + @ReadonlyAttribute + public var constraint: String +} diff --git a/Sources/DOMKit/WebIDL/RecordingState.swift b/Sources/DOMKit/WebIDL/RecordingState.swift new file mode 100644 index 00000000..7e057605 --- /dev/null +++ b/Sources/DOMKit/WebIDL/RecordingState.swift @@ -0,0 +1,23 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum RecordingState: JSString, JSValueCompatible { + case inactive = "inactive" + case recording = "recording" + case paused = "paused" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/Screen.swift b/Sources/DOMKit/WebIDL/Screen.swift new file mode 100644 index 00000000..a883fb2f --- /dev/null +++ b/Sources/DOMKit/WebIDL/Screen.swift @@ -0,0 +1,38 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class Screen: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _availWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.availWidth) + _availHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.availHeight) + _width = ReadonlyAttribute(jsObject: jsObject, name: Strings.width) + _height = ReadonlyAttribute(jsObject: jsObject, name: Strings.height) + _colorDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.colorDepth) + _pixelDepth = ReadonlyAttribute(jsObject: jsObject, name: Strings.pixelDepth) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var availWidth: Int32 + + @ReadonlyAttribute + public var availHeight: Int32 + + @ReadonlyAttribute + public var width: Int32 + + @ReadonlyAttribute + public var height: Int32 + + @ReadonlyAttribute + public var colorDepth: UInt32 + + @ReadonlyAttribute + public var pixelDepth: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/ScrollBehavior.swift b/Sources/DOMKit/WebIDL/ScrollBehavior.swift new file mode 100644 index 00000000..a76ba1cb --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollBehavior.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum ScrollBehavior: JSString, JSValueCompatible { + case auto = "auto" + case smooth = "smooth" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift new file mode 100644 index 00000000..23f42432 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollIntoViewOptions: BridgedDictionary { + public convenience init(block: ScrollLogicalPosition, inline: ScrollLogicalPosition) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.block] = block.jsValue + object[Strings.inline] = inline.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _block = ReadWriteAttribute(jsObject: object, name: Strings.block) + _inline = ReadWriteAttribute(jsObject: object, name: Strings.inline) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var block: ScrollLogicalPosition + + @ReadWriteAttribute + public var inline: ScrollLogicalPosition +} diff --git a/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift new file mode 100644 index 00000000..9f11f0bf --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum ScrollLogicalPosition: JSString, JSValueCompatible { + case start = "start" + case center = "center" + case end = "end" + case nearest = "nearest" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/ScrollOptions.swift b/Sources/DOMKit/WebIDL/ScrollOptions.swift new file mode 100644 index 00000000..93ba5ad2 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollOptions.swift @@ -0,0 +1,20 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollOptions: BridgedDictionary { + public convenience init(behavior: ScrollBehavior) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.behavior] = behavior.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _behavior = ReadWriteAttribute(jsObject: object, name: Strings.behavior) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var behavior: ScrollBehavior +} diff --git a/Sources/DOMKit/WebIDL/ScrollToOptions.swift b/Sources/DOMKit/WebIDL/ScrollToOptions.swift new file mode 100644 index 00000000..c48ba4d7 --- /dev/null +++ b/Sources/DOMKit/WebIDL/ScrollToOptions.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ScrollToOptions: BridgedDictionary { + public convenience init(left: Double, top: Double) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.left] = left.jsValue + object[Strings.top] = top.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _left = ReadWriteAttribute(jsObject: object, name: Strings.left) + _top = ReadWriteAttribute(jsObject: object, name: Strings.top) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var left: Double + + @ReadWriteAttribute + public var top: Double +} diff --git a/Sources/DOMKit/WebIDL/ULongRange.swift b/Sources/DOMKit/WebIDL/ULongRange.swift new file mode 100644 index 00000000..cf578d6c --- /dev/null +++ b/Sources/DOMKit/WebIDL/ULongRange.swift @@ -0,0 +1,25 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public class ULongRange: BridgedDictionary { + public convenience init(max: UInt32, min: UInt32) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.max] = max.jsValue + object[Strings.min] = min.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _max = ReadWriteAttribute(jsObject: object, name: Strings.max) + _min = ReadWriteAttribute(jsObject: object, name: Strings.min) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var max: UInt32 + + @ReadWriteAttribute + public var min: UInt32 +} diff --git a/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift new file mode 100644 index 00000000..9d325b8a --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift @@ -0,0 +1,24 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoFacingModeEnum: JSString, JSValueCompatible { + case user = "user" + case environment = "environment" + case left = "left" + case right = "right" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift new file mode 100644 index 00000000..78582a71 --- /dev/null +++ b/Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift @@ -0,0 +1,22 @@ +// This file was auto-generated by WebIDLToSwift. DO NOT EDIT! + +import JavaScriptEventLoop +import JavaScriptKit + +public enum VideoResizeModeEnum: JSString, JSValueCompatible { + case none = "none" + case cropAndScale = "crop-and-scale" + + @inlinable public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil + } + + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/DOMKitDemo/WebGLDemo.swift new file mode 100644 index 00000000..e58be1a2 --- /dev/null +++ b/Sources/DOMKitDemo/WebGLDemo.swift @@ -0,0 +1,192 @@ +// Copyright 2021, GFXFundamentals. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of GFXFundamentals. nor the names of his +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import DOMKit + +let vertexShaderSource = + """ + #version 300 es + + // an attribute is an input (in) to a vertex shader. + // It will receive data from a buffer + in vec4 a_position; + + // all shaders have a main function + void main() { + + // gl_Position is a special variable a vertex shader + // is responsible for setting + gl_Position = a_position; + } + """ + +let fragmentShaderSource = + """ + #version 300 es + + // fragment shaders don't have a default precision so we need + // to pick one. highp is a good default. It means "high precision" + precision highp float; + + // we need to declare an output for the fragment shader + out vec4 outColor; + + void main() { + // Just set the output to a constant redish-purple + outColor = vec4(1, 0, 0.5, 1); + } + """ + +extension WebGL2RenderingContext { + func createShader(type: GLenum, source: String) -> WebGLShader? { + guard let shader = createShader(type: type) else { return nil } + + shaderSource(shader: shader, source: source) + compileShader(shader: shader) + + switch getShaderParameter(shader: shader, pname: Self.COMPILE_STATUS) { + case .undefined, .boolean(false): + if let log = getShaderInfoLog(shader: shader) { + console.log(data: log.jsValue) + } + deleteShader(shader: shader) + return nil + + default: + return shader + } + } + + func createProgram(vShader: WebGLShader, fShader: WebGLShader) -> WebGLProgram? { + guard let program = createProgram() else { return nil } + + attachShader(program: program, shader: vShader) + attachShader(program: program, shader: fShader) + linkProgram(program: program) + + switch getProgramParameter(program: program, pname: Self.LINK_STATUS) { + case .undefined, .boolean(false): + if let log = getProgramInfoLog(program: program) { + console.log(data: log.jsValue) + } + deleteProgram(program: program) + return nil + + default: + return program + } + } +} + +extension HTMLCanvasElement { + func resizeToDisplaySize() { + if width != UInt32(clientWidth) || height != UInt32(clientHeight) { + width = UInt32(clientWidth) + height = UInt32(clientHeight) + } + } +} + +func runWebGLDemo() { + // Get A WebGL context + let canvas = HTMLCanvasElement(from: document.createElement(localName: "canvas"))! + _ = document.body?.appendChild(node: canvas) + let context = canvas.getContext(contextId: "webgl2")!.webGL2RenderingContext! + + // create GLSL shaders, upload the GLSL source, compile the shaders + guard + let vShader = context.createShader(type: WebGL2RenderingContext.VERTEX_SHADER, source: vertexShaderSource), + let fShader = context.createShader(type: WebGL2RenderingContext.FRAGMENT_SHADER, source: fragmentShaderSource), + + // Link the two shaders into a program + let program = context.createProgram(vShader: vShader, fShader: fShader) + else { + console.error(data: "Failed to create or link shaders") + return + } + + // look up where the vertex data needs to go. + let positionAttributeLocation = GLuint(context.getAttribLocation(program: program, name: "a_position")) + + // Create a buffer and put three 2d clip space points in it + let positionBuffer = context.createBuffer() + + // Bind it to ARRAY_BUFFER (think of it as ARRAY_BUFFER = positionBuffer) + context.bindBuffer(target: WebGL2RenderingContext.ARRAY_BUFFER, buffer: positionBuffer) + context.bufferData( + target: WebGL2RenderingContext.ARRAY_BUFFER, + srcData: BufferSource.arrayBuffer( + Float32Array([ + 0.0, 0.0, + 0.0, 0.5, + 0.7, 0.0, + ]).buffer + ), + usage: WebGL2RenderingContext.STATIC_DRAW + ) + + // Create a vertex array object (attribute state) + guard let vao = context.createVertexArray() else { + console.error(data: "Failed to create VAO") + return + } + + // and make it the one we're currently working with + context.bindVertexArray(array: vao) + + // Turn on the attribute + context.enableVertexAttribArray(index: positionAttributeLocation) + + context.vertexAttribPointer( + index: positionAttributeLocation, + size: 2, // 2 components per iteration + type: WebGL2RenderingContext.FLOAT, // the data is 32bit floats + normalized: false, // don't normalize the data + stride: 0, // 0 = move forward size * sizeof(type) each iteration to get the next position + offset: 0 // start at the beginning of the buffer + ) + + canvas.resizeToDisplaySize() + + // Tell WebGL how to convert from clip space to pixels + context.viewport(x: 0, y: 0, width: GLsizei(canvas.width), height: GLsizei(canvas.height)) + + // Clear the canvas + context.clearColor(red: 0, green: 0, blue: 0, alpha: 0) + context.clear(mask: WebGL2RenderingContext.COLOR_BUFFER_BIT) + + // Tell it to use our program (pair of shaders) + context.useProgram(program: program) + + // Bind the attribute/buffer set we want. + context.bindVertexArray(array: vao) + + // draw + context.drawArrays(mode: WebGL2RenderingContext.TRIANGLES, first: 0, count: 3) +} diff --git a/Sources/DOMKitDemo/main.swift b/Sources/DOMKitDemo/main.swift index 82074f78..3777d350 100644 --- a/Sources/DOMKitDemo/main.swift +++ b/Sources/DOMKitDemo/main.swift @@ -1,5 +1,5 @@ -import JavaScriptKit import DOMKit +import JavaScriptKit let document = globalThis.document @@ -8,3 +8,8 @@ header.innerText = "Hello World!" _ = document.body!.appendChild(node: header) console.log(data: "Hello, world!") + +button.onclick = { _ in + runWebGLDemo() + return .undefined +} diff --git a/parse-idl/parse-all.js b/parse-idl/parse-all.js index fb3e5c55..facd1599 100644 --- a/parse-idl/parse-all.js +++ b/parse-idl/parse-all.js @@ -25,6 +25,8 @@ console.log( "streams", "mediacapture-streams", "mediastream-recording", + "css-pseudo", + "cssom-view", "webcodecs", "webgl1", "webgl2", From dfa88a7fe2951829cdab125fb10537fb1e4431ea Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 10:51:51 +0100 Subject: [PATCH 14/21] Update copyrights --- Sources/DOMKitDemo/WebGLDemo.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/DOMKitDemo/WebGLDemo.swift b/Sources/DOMKitDemo/WebGLDemo.swift index e58be1a2..290e1fc0 100644 --- a/Sources/DOMKitDemo/WebGLDemo.swift +++ b/Sources/DOMKitDemo/WebGLDemo.swift @@ -1,4 +1,4 @@ -// Copyright 2021, GFXFundamentals. +// Copyright 2021-2022, GFXFundamentals and DOMKit contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without From f6f0fed2c609dd4f158899ed1139b56e3bee73f2 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 12:41:34 +0100 Subject: [PATCH 15/21] Bump JSKit, fix BigInt support --- Package.resolved | 2 +- Package.swift | 22 +- Sources/DOMKit/Generated.swift | 2531 ++++++++++++++++- 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 + 144 files changed, 2533 insertions(+), 7620 deletions(-) delete mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioData.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift delete mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift delete mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift delete mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift delete mode 100644 Sources/DOMKit/WebIDL/CodecState.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift delete mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift delete mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift delete mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift delete mode 100644 Sources/DOMKit/WebIDL/Float32List.swift delete mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift delete mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift delete mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift delete mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/Int32List.swift delete mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift delete mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift delete mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift delete mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift delete mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift delete mode 100644 Sources/DOMKit/WebIDL/Screen.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift delete mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift delete mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift delete mode 100644 Sources/DOMKit/WebIDL/Uint32List.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift delete mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLQuery.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLSampler.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLSync.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift delete mode 100644 Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift delete mode 100644 Sources/DOMKit/WebIDL/console.swift diff --git a/Package.resolved b/Package.resolved index 60906fdc..2c01643c 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/swiftwasm/JavaScriptKit.git", "state": { "branch": "main", - "revision": "95d0c4cd78b48ffc7e19c618d57c3244917be09a", + "revision": "384ef252c70bd0b9988e1cef95b416e6ed48d82f", "version": null } } diff --git a/Package.swift b/Package.swift index 7157ffdd..090e2373 100644 --- a/Package.swift +++ b/Package.swift @@ -8,35 +8,43 @@ let package = Package( products: [ .executable( name: "DOMKitDemo", - targets: ["DOMKitDemo"]), + targets: ["DOMKitDemo"] + ), .library( name: "DOMKit", - targets: ["DOMKit"]), + targets: ["DOMKit"] + ), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), ], dependencies: [ .package( url: "https://github.com/swiftwasm/JavaScriptKit.git", - .branch("main")), + .branch("main") + ), ], targets: [ .target( name: "DOMKitDemo", - dependencies: ["DOMKit"]), + dependencies: ["DOMKit"] + ), .target( name: "DOMKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", - .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + .product(name: "JavaScriptEventLoop", package: "JavaScriptKit"), + .product(name: "JavaScriptBigIntSupport", package: "JavaScriptKit"), + ]), .target(name: "WebIDL"), .target( name: "WebIDLToSwift", - dependencies: ["WebIDL"]), + dependencies: ["WebIDL"] + ), .testTarget( name: "DOMKitTests", - dependencies: ["DOMKit"]), + dependencies: ["DOMKit"] + ), ] ) diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index a109f8c2..af1c4024 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -1,5 +1,6 @@ // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! +import JavaScriptBigIntSupport import JavaScriptEventLoop import JavaScriptKit @@ -1410,6 +1411,27 @@ public extension Body { } } +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 +} + public class BroadcastChannel: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } @@ -1474,6 +1496,51 @@ public class CDATASection: Text { } } +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 } +} + +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()! + } +} + public class Cache: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } @@ -2515,6 +2582,29 @@ public extension CanvasUserInterface { } } +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()! + } +} + public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } @@ -2850,6 +2940,27 @@ public class ConstrainULongRange: BridgedDictionary { public var ideal: UInt32 } +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 +} + public class CountQueuingStrategy: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } @@ -4269,7 +4380,7 @@ public class DevicePermissionDescriptor: BridgedDictionary { public var deviceId: String } -public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { +public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers, GeometryUtils { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4315,6 +4426,7 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) + _scrollingElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollingElement) super.init(unsafelyWrapping: jsObject) } @@ -4615,6 +4727,24 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN @ReadonlyAttribute public var timeline: DocumentTimeline + + @inlinable public func elementFromPoint(x: Double, y: Double) -> Element? { + let this = jsObject + return this[Strings.elementFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable public func elementsFromPoint(x: Double, y: Double) -> [Element] { + let this = jsObject + return this[Strings.elementsFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable public func caretPositionFromPoint(x: Double, y: Double) -> CaretPosition? { + let this = jsObject + return this[Strings.caretPositionFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var scrollingElement: Element? } public protocol DocumentAndElementEventHandlers: JSBridgedClass {} @@ -4841,7 +4971,7 @@ public class EffectTiming: BridgedDictionary { public var easing: String } -public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable { +public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable, GeometryUtils { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4855,6 +4985,14 @@ public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slo _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + _scrollTop = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollTop) + _scrollLeft = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollLeft) + _scrollWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollWidth) + _scrollHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollHeight) + _clientTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientTop) + _clientLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientLeft) + _clientWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientWidth) + _clientHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientHeight) super.init(unsafelyWrapping: jsObject) } @@ -5012,6 +5150,85 @@ public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slo let this = jsObject _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) } + + @inlinable public func pseudo(type: String) -> CSSPseudoElement? { + let this = jsObject + return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @inlinable public func getClientRects() -> DOMRectList { + let this = jsObject + return this[Strings.getClientRects].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getBoundingClientRect() -> DOMRect { + let this = jsObject + return this[Strings.getBoundingClientRect].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func isVisible(options: IsVisibleOptions? = nil) -> Bool { + let this = jsObject + return this[Strings.isVisible].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scrollIntoView(arg: Bool_or_ScrollIntoViewOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollIntoView].function!(this: this, arguments: [arg?.jsValue ?? .undefined]) + } + + @inlinable public func scroll(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scroll(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollTo(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollBy(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollBy(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @ReadWriteAttribute + public var scrollTop: Double + + @ReadWriteAttribute + public var scrollLeft: Double + + @ReadonlyAttribute + public var scrollWidth: Int32 + + @ReadonlyAttribute + public var scrollHeight: Int32 + + @ReadonlyAttribute + public var clientTop: Int32 + + @ReadonlyAttribute + public var clientLeft: Int32 + + @ReadonlyAttribute + public var clientWidth: Int32 + + @ReadonlyAttribute + public var clientHeight: Int32 } public protocol ElementContentEditable: JSBridgedClass {} @@ -6117,6 +6334,29 @@ public extension GenericTransformStream { @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } } +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()! + } +} + public class GetAnimationsOptions: BridgedDictionary { public convenience init(subtree: Bool) { let object = JSObject.global[Strings.Object].function!.new() @@ -7013,6 +7253,11 @@ public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventH _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) + _offsetParent = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetParent) + _offsetTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetTop) + _offsetLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetLeft) + _offsetWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetWidth) + _offsetHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetHeight) super.init(unsafelyWrapping: jsObject) } @@ -7068,6 +7313,21 @@ public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventH let this = jsObject return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! } + + @ReadonlyAttribute + public var offsetParent: Element? + + @ReadonlyAttribute + public var offsetTop: Int32 + + @ReadonlyAttribute + public var offsetLeft: Int32 + + @ReadonlyAttribute + public var offsetWidth: Int32 + + @ReadonlyAttribute + public var offsetHeight: Int32 } public class HTMLEmbedElement: HTMLElement { @@ -7622,6 +7882,8 @@ public class HTMLImageElement: HTMLElement { _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) super.init(unsafelyWrapping: jsObject) } @@ -7709,6 +7971,12 @@ public class HTMLImageElement: HTMLElement { @ReadWriteAttribute public var border: String + + @ReadonlyAttribute + public var x: Int32 + + @ReadonlyAttribute + public var y: Int32 } public class HTMLInputElement: HTMLElement { @@ -10493,6 +10761,18 @@ public class InputEventInit: BridgedDictionary { public var inputType: String } +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) + } +} + public class KeyboardEvent: UIEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } @@ -10903,6 +11183,71 @@ public class MediaError: JSBridgedClass { public var message: String } +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 +} + +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 +} + +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 +} + public class MediaRecorder: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } @@ -11846,6 +12191,12 @@ public class MouseEvent: UIEvent { _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) + _pageX = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageX) + _pageY = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageY) + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) + _offsetX = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetX) + _offsetY = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetY) super.init(unsafelyWrapping: jsObject) } @@ -11910,6 +12261,24 @@ public class MouseEvent: UIEvent { let this = jsObject _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) } + + @ReadonlyAttribute + public var pageX: Double + + @ReadonlyAttribute + public var pageY: Double + + @ReadonlyAttribute + public var x: Double + + @ReadonlyAttribute + public var y: Double + + @ReadonlyAttribute + public var offsetX: Double + + @ReadonlyAttribute + public var offsetY: Double } public class MouseEventInit: BridgedDictionary { @@ -13334,6 +13703,16 @@ public class Range: AbstractRange { @inlinable public var description: String { jsObject[Strings.toString]!().fromJSValue()! } + + @inlinable public func getClientRects() -> DOMRectList { + let this = jsObject + return this[Strings.getClientRects].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getBoundingClientRect() -> DOMRect { + let this = jsObject + return this[Strings.getBoundingClientRect].function!(this: this, arguments: []).fromJSValue()! + } } public class ReadableByteStreamController: JSBridgedClass { @@ -14159,15 +14538,124 @@ public enum ResponseType: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public enum ScrollRestoration: JSString, JSValueCompatible { - case auto = "auto" - case manual = "manual" +public class Screen: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + 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 +} + +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 } +} + +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 +} + +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 } +} + +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 +} + +public enum ScrollRestoration: JSString, JSValueCompatible { + case auto = "auto" + case manual = "manual" + + @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) { @@ -14177,6 +14665,27 @@ public enum ScrollRestoration: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } +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 +} + public enum SelectionMode: JSString, JSValueCompatible { case select = "select" case start = "start" @@ -14759,7 +15268,7 @@ public class SvcOutputMetadata: BridgedDictionary { public var temporalLayerId: UInt32 } -public class Text: CharacterData, Slottable { +public class Text: CharacterData, Slottable, GeometryUtils { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -15272,6 +15781,9 @@ public typealias GLuint = UInt32 public typealias GLfloat = Float public typealias GLclampf = Float +public typealias GLint64 = Int64 +public typealias GLuint64 = UInt64 + public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void @@ -16510,11 +17022,1492 @@ public enum VideoTransferCharacteristics: JSString, JSValueCompatible { return nil } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +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 + } +} + +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]) + } +} + +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]) } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } } public class WebGLActiveInfo: JSBridgedClass { @@ -16680,6 +18673,14 @@ public class WebGLProgram: WebGLObject { } } +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) + } +} + public class WebGLRenderbuffer: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } @@ -18072,6 +20073,14 @@ public extension WebGLRenderingContextOverloads { } } +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) + } +} + public class WebGLShader: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } @@ -18102,6 +20111,14 @@ public class WebGLShaderPrecisionFormat: JSBridgedClass { public var precision: GLint } +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) + } +} + public class WebGLTexture: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } @@ -18110,6 +20127,14 @@ public class WebGLTexture: WebGLObject { } } +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) + } +} + public class WebGLUniformLocation: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } @@ -18120,6 +20145,14 @@ public class WebGLUniformLocation: JSBridgedClass { } } +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) + } +} + public class WheelEvent: MouseEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } @@ -18215,6 +20248,20 @@ public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, Wind _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) + _screen = ReadonlyAttribute(jsObject: jsObject, name: Strings.screen) + _innerWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.innerWidth) + _innerHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.innerHeight) + _scrollX = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollX) + _pageXOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageXOffset) + _scrollY = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollY) + _pageYOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageYOffset) + _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) + _screenLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenLeft) + _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) + _screenTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenTop) + _outerWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.outerWidth) + _outerHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.outerHeight) + _devicePixelRatio = ReadonlyAttribute(jsObject: jsObject, name: Strings.devicePixelRatio) super.init(unsafelyWrapping: jsObject) } @@ -18369,6 +20416,103 @@ public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, Wind @ReadonlyAttribute public var external: External + + @inlinable public func matchMedia(query: String) -> MediaQueryList { + let this = jsObject + return this[Strings.matchMedia].function!(this: this, arguments: [query.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var screen: Screen + + @inlinable public func moveTo(x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func moveBy(x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.moveBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func resizeTo(width: Int32, height: Int32) { + let this = jsObject + _ = this[Strings.resizeTo].function!(this: this, arguments: [width.jsValue, height.jsValue]) + } + + @inlinable public func resizeBy(x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.resizeBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var innerWidth: Int32 + + @ReadonlyAttribute + public var innerHeight: Int32 + + @ReadonlyAttribute + public var scrollX: Double + + @ReadonlyAttribute + public var pageXOffset: Double + + @ReadonlyAttribute + public var scrollY: Double + + @ReadonlyAttribute + public var pageYOffset: Double + + @inlinable public func scroll(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scroll(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollTo(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollBy(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollBy(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var screenX: Int32 + + @ReadonlyAttribute + public var screenLeft: Int32 + + @ReadonlyAttribute + public var screenY: Int32 + + @ReadonlyAttribute + public var screenTop: Int32 + + @ReadonlyAttribute + public var outerWidth: Int32 + + @ReadonlyAttribute + public var outerHeight: Int32 + + @ReadonlyAttribute + public var devicePixelRatio: Double } public protocol WindowEventHandlers: JSBridgedClass {} @@ -19751,12 +21895,14 @@ public enum console { @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" @usableFromInline static let CDATASection: JSString = "CDATASection" + @usableFromInline static let CSSPseudoElement: JSString = "CSSPseudoElement" @usableFromInline static let Cache: JSString = "Cache" @usableFromInline static let CacheStorage: JSString = "CacheStorage" @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" + @usableFromInline static let CaretPosition: JSString = "CaretPosition" @usableFromInline static let CharacterData: JSString = "CharacterData" @usableFromInline static let Comment: JSString = "Comment" @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" @@ -19893,6 +22039,8 @@ public enum console { @usableFromInline static let MediaDeviceInfo: JSString = "MediaDeviceInfo" @usableFromInline static let MediaDevices: JSString = "MediaDevices" @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MediaQueryList: JSString = "MediaQueryList" + @usableFromInline static let MediaQueryListEvent: JSString = "MediaQueryListEvent" @usableFromInline static let MediaRecorder: JSString = "MediaRecorder" @usableFromInline static let MediaRecorderErrorEvent: JSString = "MediaRecorderErrorEvent" @usableFromInline static let MediaStream: JSString = "MediaStream" @@ -19936,6 +22084,7 @@ public enum console { @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" @usableFromInline static let Request: JSString = "Request" @usableFromInline static let Response: JSString = "Response" + @usableFromInline static let Screen: JSString = "Screen" @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" @@ -19966,18 +22115,24 @@ public enum console { @usableFromInline static let VideoFrame: JSString = "VideoFrame" @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" + @usableFromInline static let WebGL2RenderingContext: JSString = "WebGL2RenderingContext" @usableFromInline static let WebGLActiveInfo: JSString = "WebGLActiveInfo" @usableFromInline static let WebGLBuffer: JSString = "WebGLBuffer" @usableFromInline static let WebGLContextEvent: JSString = "WebGLContextEvent" @usableFromInline static let WebGLFramebuffer: JSString = "WebGLFramebuffer" @usableFromInline static let WebGLObject: JSString = "WebGLObject" @usableFromInline static let WebGLProgram: JSString = "WebGLProgram" + @usableFromInline static let WebGLQuery: JSString = "WebGLQuery" @usableFromInline static let WebGLRenderbuffer: JSString = "WebGLRenderbuffer" @usableFromInline static let WebGLRenderingContext: JSString = "WebGLRenderingContext" + @usableFromInline static let WebGLSampler: JSString = "WebGLSampler" @usableFromInline static let WebGLShader: JSString = "WebGLShader" @usableFromInline static let WebGLShaderPrecisionFormat: JSString = "WebGLShaderPrecisionFormat" + @usableFromInline static let WebGLSync: JSString = "WebGLSync" @usableFromInline static let WebGLTexture: JSString = "WebGLTexture" + @usableFromInline static let WebGLTransformFeedback: JSString = "WebGLTransformFeedback" @usableFromInline static let WebGLUniformLocation: JSString = "WebGLUniformLocation" + @usableFromInline static let WebGLVertexArrayObject: JSString = "WebGLVertexArrayObject" @usableFromInline static let WheelEvent: JSString = "WheelEvent" @usableFromInline static let Window: JSString = "Window" @usableFromInline static let Worker: JSString = "Worker" @@ -20122,6 +22277,8 @@ public enum console { @usableFromInline static let autocomplete: JSString = "autocomplete" @usableFromInline static let autofocus: JSString = "autofocus" @usableFromInline static let autoplay: JSString = "autoplay" + @usableFromInline static let availHeight: JSString = "availHeight" + @usableFromInline static let availWidth: JSString = "availWidth" @usableFromInline static let axis: JSString = "axis" @usableFromInline static let b: JSString = "b" @usableFromInline static let back: JSString = "back" @@ -20130,14 +22287,21 @@ public enum console { @usableFromInline static let baseURI: JSString = "baseURI" @usableFromInline static let before: JSString = "before" @usableFromInline static let beginPath: JSString = "beginPath" + @usableFromInline static let beginQuery: JSString = "beginQuery" + @usableFromInline static let beginTransformFeedback: JSString = "beginTransformFeedback" @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" @usableFromInline static let bindAttribLocation: JSString = "bindAttribLocation" @usableFromInline static let bindBuffer: JSString = "bindBuffer" + @usableFromInline static let bindBufferBase: JSString = "bindBufferBase" + @usableFromInline static let bindBufferRange: JSString = "bindBufferRange" @usableFromInline static let bindFramebuffer: JSString = "bindFramebuffer" @usableFromInline static let bindRenderbuffer: JSString = "bindRenderbuffer" + @usableFromInline static let bindSampler: JSString = "bindSampler" @usableFromInline static let bindTexture: JSString = "bindTexture" + @usableFromInline static let bindTransformFeedback: JSString = "bindTransformFeedback" + @usableFromInline static let bindVertexArray: JSString = "bindVertexArray" @usableFromInline static let bitrate: JSString = "bitrate" @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" @@ -20146,7 +22310,9 @@ public enum console { @usableFromInline static let blendEquationSeparate: JSString = "blendEquationSeparate" @usableFromInline static let blendFunc: JSString = "blendFunc" @usableFromInline static let blendFuncSeparate: JSString = "blendFuncSeparate" + @usableFromInline static let blitFramebuffer: JSString = "blitFramebuffer" @usableFromInline static let blob: JSString = "blob" + @usableFromInline static let block: JSString = "block" @usableFromInline static let blocking: JSString = "blocking" @usableFromInline static let blur: JSString = "blur" @usableFromInline static let body: JSString = "body" @@ -20154,6 +22320,7 @@ public enum console { @usableFromInline static let booleanValue: JSString = "booleanValue" @usableFromInline static let border: JSString = "border" @usableFromInline static let bottom: JSString = "bottom" + @usableFromInline static let box: JSString = "box" @usableFromInline static let btoa: JSString = "btoa" @usableFromInline static let bubbles: JSString = "bubbles" @usableFromInline static let bufferData: JSString = "bufferData" @@ -20176,6 +22343,7 @@ public enum console { @usableFromInline static let caption: JSString = "caption" @usableFromInline static let capture: JSString = "capture" @usableFromInline static let captureEvents: JSString = "captureEvents" + @usableFromInline static let caretPositionFromPoint: JSString = "caretPositionFromPoint" @usableFromInline static let cellIndex: JSString = "cellIndex" @usableFromInline static let cellPadding: JSString = "cellPadding" @usableFromInline static let cellSpacing: JSString = "cellSpacing" @@ -20199,6 +22367,10 @@ public enum console { @usableFromInline static let classList: JSString = "classList" @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearBufferfi: JSString = "clearBufferfi" + @usableFromInline static let clearBufferfv: JSString = "clearBufferfv" + @usableFromInline static let clearBufferiv: JSString = "clearBufferiv" + @usableFromInline static let clearBufferuiv: JSString = "clearBufferuiv" @usableFromInline static let clearColor: JSString = "clearColor" @usableFromInline static let clearData: JSString = "clearData" @usableFromInline static let clearDepth: JSString = "clearDepth" @@ -20208,8 +22380,13 @@ public enum console { @usableFromInline static let clearStencil: JSString = "clearStencil" @usableFromInline static let clearTimeout: JSString = "clearTimeout" @usableFromInline static let click: JSString = "click" + @usableFromInline static let clientHeight: JSString = "clientHeight" @usableFromInline static let clientId: JSString = "clientId" @usableFromInline static let clientInformation: JSString = "clientInformation" + @usableFromInline static let clientLeft: JSString = "clientLeft" + @usableFromInline static let clientTop: JSString = "clientTop" + @usableFromInline static let clientWaitSync: JSString = "clientWaitSync" + @usableFromInline static let clientWidth: JSString = "clientWidth" @usableFromInline static let clientX: JSString = "clientX" @usableFromInline static let clientY: JSString = "clientY" @usableFromInline static let clip: JSString = "clip" @@ -20233,6 +22410,7 @@ public enum console { @usableFromInline static let collapsed: JSString = "collapsed" @usableFromInline static let colno: JSString = "colno" @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorDepth: JSString = "colorDepth" @usableFromInline static let colorMask: JSString = "colorMask" @usableFromInline static let colorSpace: JSString = "colorSpace" @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" @@ -20253,7 +22431,9 @@ public enum console { @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" @usableFromInline static let compressedTexImage2D: JSString = "compressedTexImage2D" + @usableFromInline static let compressedTexImage3D: JSString = "compressedTexImage3D" @usableFromInline static let compressedTexSubImage2D: JSString = "compressedTexSubImage2D" + @usableFromInline static let compressedTexSubImage3D: JSString = "compressedTexSubImage3D" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let config: JSString = "config" @usableFromInline static let configure: JSString = "configure" @@ -20269,12 +22449,17 @@ public enum console { @usableFromInline static let control: JSString = "control" @usableFromInline static let controller: JSString = "controller" @usableFromInline static let controls: JSString = "controls" + @usableFromInline static let convertPointFromNode: JSString = "convertPointFromNode" + @usableFromInline static let convertQuadFromNode: JSString = "convertQuadFromNode" + @usableFromInline static let convertRectFromNode: JSString = "convertRectFromNode" @usableFromInline static let convertToBlob: JSString = "convertToBlob" @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let copyBufferSubData: JSString = "copyBufferSubData" @usableFromInline static let copyTexImage2D: JSString = "copyTexImage2D" @usableFromInline static let copyTexSubImage2D: JSString = "copyTexSubImage2D" + @usableFromInline static let copyTexSubImage3D: JSString = "copyTexSubImage3D" @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let count: JSString = "count" @usableFromInline static let countReset: JSString = "countReset" @@ -20300,15 +22485,19 @@ public enum console { @usableFromInline static let createPattern: JSString = "createPattern" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" @usableFromInline static let createProgram: JSString = "createProgram" + @usableFromInline static let createQuery: JSString = "createQuery" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @usableFromInline static let createRange: JSString = "createRange" @usableFromInline static let createRenderbuffer: JSString = "createRenderbuffer" + @usableFromInline static let createSampler: JSString = "createSampler" @usableFromInline static let createShader: JSString = "createShader" @usableFromInline static let createTBody: JSString = "createTBody" @usableFromInline static let createTFoot: JSString = "createTFoot" @usableFromInline static let createTHead: JSString = "createTHead" @usableFromInline static let createTextNode: JSString = "createTextNode" @usableFromInline static let createTexture: JSString = "createTexture" + @usableFromInline static let createTransformFeedback: JSString = "createTransformFeedback" + @usableFromInline static let createVertexArray: JSString = "createVertexArray" @usableFromInline static let credentials: JSString = "credentials" @usableFromInline static let crossOrigin: JSString = "crossOrigin" @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" @@ -20354,12 +22543,17 @@ public enum console { @usableFromInline static let deleteData: JSString = "deleteData" @usableFromInline static let deleteFramebuffer: JSString = "deleteFramebuffer" @usableFromInline static let deleteProgram: JSString = "deleteProgram" + @usableFromInline static let deleteQuery: JSString = "deleteQuery" @usableFromInline static let deleteRenderbuffer: JSString = "deleteRenderbuffer" @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteSampler: JSString = "deleteSampler" @usableFromInline static let deleteShader: JSString = "deleteShader" + @usableFromInline static let deleteSync: JSString = "deleteSync" @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" @usableFromInline static let deleteTHead: JSString = "deleteTHead" @usableFromInline static let deleteTexture: JSString = "deleteTexture" + @usableFromInline static let deleteTransformFeedback: JSString = "deleteTransformFeedback" + @usableFromInline static let deleteVertexArray: JSString = "deleteVertexArray" @usableFromInline static let deltaMode: JSString = "deltaMode" @usableFromInline static let deltaX: JSString = "deltaX" @usableFromInline static let deltaY: JSString = "deltaY" @@ -20379,6 +22573,7 @@ public enum console { @usableFromInline static let detachShader: JSString = "detachShader" @usableFromInline static let detail: JSString = "detail" @usableFromInline static let deviceId: JSString = "deviceId" + @usableFromInline static let devicePixelRatio: JSString = "devicePixelRatio" @usableFromInline static let dir: JSString = "dir" @usableFromInline static let dirName: JSString = "dirName" @usableFromInline static let direction: JSString = "direction" @@ -20401,9 +22596,13 @@ public enum console { @usableFromInline static let download: JSString = "download" @usableFromInline static let draggable: JSString = "draggable" @usableFromInline static let drawArrays: JSString = "drawArrays" + @usableFromInline static let drawArraysInstanced: JSString = "drawArraysInstanced" + @usableFromInline static let drawBuffers: JSString = "drawBuffers" @usableFromInline static let drawElements: JSString = "drawElements" + @usableFromInline static let drawElementsInstanced: JSString = "drawElementsInstanced" @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let drawRangeElements: JSString = "drawRangeElements" @usableFromInline static let drawingBufferHeight: JSString = "drawingBufferHeight" @usableFromInline static let drawingBufferWidth: JSString = "drawingBufferWidth" @usableFromInline static let dropEffect: JSString = "dropEffect" @@ -20413,7 +22612,10 @@ public enum console { @usableFromInline static let echoCancellation: JSString = "echoCancellation" @usableFromInline static let effect: JSString = "effect" @usableFromInline static let effectAllowed: JSString = "effectAllowed" + @usableFromInline static let element: JSString = "element" + @usableFromInline static let elementFromPoint: JSString = "elementFromPoint" @usableFromInline static let elements: JSString = "elements" + @usableFromInline static let elementsFromPoint: JSString = "elementsFromPoint" @usableFromInline static let ellipse: JSString = "ellipse" @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" @@ -20430,7 +22632,9 @@ public enum console { @usableFromInline static let endContainer: JSString = "endContainer" @usableFromInline static let endDelay: JSString = "endDelay" @usableFromInline static let endOffset: JSString = "endOffset" + @usableFromInline static let endQuery: JSString = "endQuery" @usableFromInline static let endTime: JSString = "endTime" + @usableFromInline static let endTransformFeedback: JSString = "endTransformFeedback" @usableFromInline static let ended: JSString = "ended" @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @@ -20450,6 +22654,7 @@ public enum console { @usableFromInline static let facingMode: JSString = "facingMode" @usableFromInline static let failIfMajorPerformanceCaveat: JSString = "failIfMajorPerformanceCaveat" @usableFromInline static let fastSeek: JSString = "fastSeek" + @usableFromInline static let fenceSync: JSString = "fenceSync" @usableFromInline static let fetch: JSString = "fetch" @usableFromInline static let fgColor: JSString = "fgColor" @usableFromInline static let filename: JSString = "filename" @@ -20493,8 +22698,10 @@ public enum console { @usableFromInline static let frameRate: JSString = "frameRate" @usableFromInline static let framebufferRenderbuffer: JSString = "framebufferRenderbuffer" @usableFromInline static let framebufferTexture2D: JSString = "framebufferTexture2D" + @usableFromInline static let framebufferTextureLayer: JSString = "framebufferTextureLayer" @usableFromInline static let framerate: JSString = "framerate" @usableFromInline static let frames: JSString = "frames" + @usableFromInline static let fromBox: JSString = "fromBox" @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" @usableFromInline static let fromMatrix: JSString = "fromMatrix" @@ -20507,6 +22714,9 @@ public enum console { @usableFromInline static let get: JSString = "get" @usableFromInline static let getActiveAttrib: JSString = "getActiveAttrib" @usableFromInline static let getActiveUniform: JSString = "getActiveUniform" + @usableFromInline static let getActiveUniformBlockName: JSString = "getActiveUniformBlockName" + @usableFromInline static let getActiveUniformBlockParameter: JSString = "getActiveUniformBlockParameter" + @usableFromInline static let getActiveUniforms: JSString = "getActiveUniforms" @usableFromInline static let getAll: JSString = "getAll" @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" @usableFromInline static let getAnimations: JSString = "getAnimations" @@ -20519,9 +22729,14 @@ public enum console { @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" @usableFromInline static let getAudioTracks: JSString = "getAudioTracks" + @usableFromInline static let getBoundingClientRect: JSString = "getBoundingClientRect" @usableFromInline static let getBounds: JSString = "getBounds" + @usableFromInline static let getBoxQuads: JSString = "getBoxQuads" @usableFromInline static let getBufferParameter: JSString = "getBufferParameter" + @usableFromInline static let getBufferSubData: JSString = "getBufferSubData" @usableFromInline static let getCapabilities: JSString = "getCapabilities" + @usableFromInline static let getClientRect: JSString = "getClientRect" + @usableFromInline static let getClientRects: JSString = "getClientRects" @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" @usableFromInline static let getConstraints: JSString = "getConstraints" @usableFromInline static let getContext: JSString = "getContext" @@ -20535,8 +22750,11 @@ public enum console { @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" @usableFromInline static let getError: JSString = "getError" @usableFromInline static let getExtension: JSString = "getExtension" + @usableFromInline static let getFragDataLocation: JSString = "getFragDataLocation" @usableFromInline static let getFramebufferAttachmentParameter: JSString = "getFramebufferAttachmentParameter" @usableFromInline static let getImageData: JSString = "getImageData" + @usableFromInline static let getIndexedParameter: JSString = "getIndexedParameter" + @usableFromInline static let getInternalformatParameter: JSString = "getInternalformatParameter" @usableFromInline static let getKeyframes: JSString = "getKeyframes" @usableFromInline static let getLineDash: JSString = "getLineDash" @usableFromInline static let getModifierState: JSString = "getModifierState" @@ -20544,6 +22762,8 @@ public enum console { @usableFromInline static let getParameter: JSString = "getParameter" @usableFromInline static let getProgramInfoLog: JSString = "getProgramInfoLog" @usableFromInline static let getProgramParameter: JSString = "getProgramParameter" + @usableFromInline static let getQuery: JSString = "getQuery" + @usableFromInline static let getQueryParameter: JSString = "getQueryParameter" @usableFromInline static let getReader: JSString = "getReader" @usableFromInline static let getRegistration: JSString = "getRegistration" @usableFromInline static let getRegistrations: JSString = "getRegistrations" @@ -20551,6 +22771,7 @@ public enum console { @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" @usableFromInline static let getRootNode: JSString = "getRootNode" @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getSamplerParameter: JSString = "getSamplerParameter" @usableFromInline static let getSettings: JSString = "getSettings" @usableFromInline static let getShaderInfoLog: JSString = "getShaderInfoLog" @usableFromInline static let getShaderParameter: JSString = "getShaderParameter" @@ -20560,12 +22781,16 @@ public enum console { @usableFromInline static let getState: JSString = "getState" @usableFromInline static let getSupportedConstraints: JSString = "getSupportedConstraints" @usableFromInline static let getSupportedExtensions: JSString = "getSupportedExtensions" + @usableFromInline static let getSyncParameter: JSString = "getSyncParameter" @usableFromInline static let getTexParameter: JSString = "getTexParameter" @usableFromInline static let getTiming: JSString = "getTiming" @usableFromInline static let getTrackById: JSString = "getTrackById" @usableFromInline static let getTracks: JSString = "getTracks" @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getTransformFeedbackVarying: JSString = "getTransformFeedbackVarying" @usableFromInline static let getUniform: JSString = "getUniform" + @usableFromInline static let getUniformBlockIndex: JSString = "getUniformBlockIndex" + @usableFromInline static let getUniformIndices: JSString = "getUniformIndices" @usableFromInline static let getUniformLocation: JSString = "getUniformLocation" @usableFromInline static let getUserMedia: JSString = "getUserMedia" @usableFromInline static let getVertexAttrib: JSString = "getVertexAttrib" @@ -20638,7 +22863,10 @@ public enum console { @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" @usableFromInline static let initUIEvent: JSString = "initUIEvent" + @usableFromInline static let inline: JSString = "inline" + @usableFromInline static let innerHeight: JSString = "innerHeight" @usableFromInline static let innerText: JSString = "innerText" + @usableFromInline static let innerWidth: JSString = "innerWidth" @usableFromInline static let inputEncoding: JSString = "inputEncoding" @usableFromInline static let inputMode: JSString = "inputMode" @usableFromInline static let inputType: JSString = "inputType" @@ -20653,6 +22881,8 @@ public enum console { @usableFromInline static let integrity: JSString = "integrity" @usableFromInline static let intersectsNode: JSString = "intersectsNode" @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" + @usableFromInline static let invalidateFramebuffer: JSString = "invalidateFramebuffer" + @usableFromInline static let invalidateSubFramebuffer: JSString = "invalidateSubFramebuffer" @usableFromInline static let inverse: JSString = "inverse" @usableFromInline static let invertSelf: JSString = "invertSelf" @usableFromInline static let `is`: JSString = "is" @@ -20674,14 +22904,20 @@ public enum console { @usableFromInline static let isPointInRange: JSString = "isPointInRange" @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" @usableFromInline static let isProgram: JSString = "isProgram" + @usableFromInline static let isQuery: JSString = "isQuery" @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" @usableFromInline static let isRenderbuffer: JSString = "isRenderbuffer" @usableFromInline static let isSameNode: JSString = "isSameNode" + @usableFromInline static let isSampler: JSString = "isSampler" @usableFromInline static let isSecureContext: JSString = "isSecureContext" @usableFromInline static let isShader: JSString = "isShader" + @usableFromInline static let isSync: JSString = "isSync" @usableFromInline static let isTexture: JSString = "isTexture" + @usableFromInline static let isTransformFeedback: JSString = "isTransformFeedback" @usableFromInline static let isTrusted: JSString = "isTrusted" @usableFromInline static let isTypeSupported: JSString = "isTypeSupported" + @usableFromInline static let isVertexArray: JSString = "isVertexArray" + @usableFromInline static let isVisible: JSString = "isVisible" @usableFromInline static let item: JSString = "item" @usableFromInline static let items: JSString = "items" @usableFromInline static let iterateNext: JSString = "iterateNext" @@ -20757,6 +22993,7 @@ public enum console { @usableFromInline static let marginWidth: JSString = "marginWidth" @usableFromInline static let match: JSString = "match" @usableFromInline static let matchAll: JSString = "matchAll" + @usableFromInline static let matchMedia: JSString = "matchMedia" @usableFromInline static let matches: JSString = "matches" @usableFromInline static let matrix: JSString = "matrix" @usableFromInline static let matrixTransform: JSString = "matrixTransform" @@ -20785,6 +23022,7 @@ public enum console { @usableFromInline static let modifierSuper: JSString = "modifierSuper" @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" + @usableFromInline static let moveBy: JSString = "moveBy" @usableFromInline static let moveTo: JSString = "moveTo" @usableFromInline static let multiple: JSString = "multiple" @usableFromInline static let multiply: JSString = "multiply" @@ -20821,6 +23059,14 @@ public enum console { @usableFromInline static let numberValue: JSString = "numberValue" @usableFromInline static let observe: JSString = "observe" @usableFromInline static let offset: JSString = "offset" + @usableFromInline static let offsetHeight: JSString = "offsetHeight" + @usableFromInline static let offsetLeft: JSString = "offsetLeft" + @usableFromInline static let offsetNode: JSString = "offsetNode" + @usableFromInline static let offsetParent: JSString = "offsetParent" + @usableFromInline static let offsetTop: JSString = "offsetTop" + @usableFromInline static let offsetWidth: JSString = "offsetWidth" + @usableFromInline static let offsetX: JSString = "offsetX" + @usableFromInline static let offsetY: JSString = "offsetY" @usableFromInline static let ok: JSString = "ok" @usableFromInline static let oldURL: JSString = "oldURL" @usableFromInline static let oldValue: JSString = "oldValue" @@ -20943,7 +23189,9 @@ public enum console { @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" @usableFromInline static let originTime: JSString = "originTime" @usableFromInline static let oscpu: JSString = "oscpu" + @usableFromInline static let outerHeight: JSString = "outerHeight" @usableFromInline static let outerText: JSString = "outerText" + @usableFromInline static let outerWidth: JSString = "outerWidth" @usableFromInline static let output: JSString = "output" @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" @usableFromInline static let ownerDocument: JSString = "ownerDocument" @@ -20952,6 +23200,10 @@ public enum console { @usableFromInline static let p2: JSString = "p2" @usableFromInline static let p3: JSString = "p3" @usableFromInline static let p4: JSString = "p4" + @usableFromInline static let pageX: JSString = "pageX" + @usableFromInline static let pageXOffset: JSString = "pageXOffset" + @usableFromInline static let pageY: JSString = "pageY" + @usableFromInline static let pageYOffset: JSString = "pageYOffset" @usableFromInline static let panTiltZoom: JSString = "panTiltZoom" @usableFromInline static let parent: JSString = "parent" @usableFromInline static let parentElement: JSString = "parentElement" @@ -20964,6 +23216,7 @@ public enum console { @usableFromInline static let patternMismatch: JSString = "patternMismatch" @usableFromInline static let pause: JSString = "pause" @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" + @usableFromInline static let pauseTransformFeedback: JSString = "pauseTransformFeedback" @usableFromInline static let paused: JSString = "paused" @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" @usableFromInline static let pending: JSString = "pending" @@ -20975,6 +23228,7 @@ public enum console { @usableFromInline static let ping: JSString = "ping" @usableFromInline static let pipeThrough: JSString = "pipeThrough" @usableFromInline static let pipeTo: JSString = "pipeTo" + @usableFromInline static let pixelDepth: JSString = "pixelDepth" @usableFromInline static let pixelStorei: JSString = "pixelStorei" @usableFromInline static let placeholder: JSString = "placeholder" @usableFromInline static let planeIndex: JSString = "planeIndex" @@ -21023,6 +23277,7 @@ public enum console { @usableFromInline static let promise: JSString = "promise" @usableFromInline static let prompt: JSString = "prompt" @usableFromInline static let `protocol`: JSString = "protocol" + @usableFromInline static let pseudo: JSString = "pseudo" @usableFromInline static let pseudoElement: JSString = "pseudoElement" @usableFromInline static let publicId: JSString = "publicId" @usableFromInline static let pull: JSString = "pull" @@ -21047,6 +23302,7 @@ public enum console { @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" @usableFromInline static let readAsText: JSString = "readAsText" + @usableFromInline static let readBuffer: JSString = "readBuffer" @usableFromInline static let readOnly: JSString = "readOnly" @usableFromInline static let readPixels: JSString = "readPixels" @usableFromInline static let readable: JSString = "readable" @@ -21067,6 +23323,7 @@ public enum console { @usableFromInline static let relList: JSString = "relList" @usableFromInline static let relatedNode: JSString = "relatedNode" @usableFromInline static let relatedTarget: JSString = "relatedTarget" + @usableFromInline static let relativeTo: JSString = "relativeTo" @usableFromInline static let releaseEvents: JSString = "releaseEvents" @usableFromInline static let releaseLock: JSString = "releaseLock" @usableFromInline static let reload: JSString = "reload" @@ -21082,6 +23339,7 @@ public enum console { @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" @usableFromInline static let renderbufferStorage: JSString = "renderbufferStorage" + @usableFromInline static let renderbufferStorageMultisample: JSString = "renderbufferStorageMultisample" @usableFromInline static let `repeat`: JSString = "repeat" @usableFromInline static let repetitionCount: JSString = "repetitionCount" @usableFromInline static let replace: JSString = "replace" @@ -21099,9 +23357,11 @@ public enum console { @usableFromInline static let required: JSString = "required" @usableFromInline static let reset: JSString = "reset" @usableFromInline static let resetTransform: JSString = "resetTransform" + @usableFromInline static let resizeBy: JSString = "resizeBy" @usableFromInline static let resizeHeight: JSString = "resizeHeight" @usableFromInline static let resizeMode: JSString = "resizeMode" @usableFromInline static let resizeQuality: JSString = "resizeQuality" + @usableFromInline static let resizeTo: JSString = "resizeTo" @usableFromInline static let resizeWidth: JSString = "resizeWidth" @usableFromInline static let respond: JSString = "respond" @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" @@ -21115,6 +23375,7 @@ public enum console { @usableFromInline static let resultType: JSString = "resultType" @usableFromInline static let resultingClientId: JSString = "resultingClientId" @usableFromInline static let resume: JSString = "resume" + @usableFromInline static let resumeTransformFeedback: JSString = "resumeTransformFeedback" @usableFromInline static let returnValue: JSString = "returnValue" @usableFromInline static let rev: JSString = "rev" @usableFromInline static let reverse: JSString = "reverse" @@ -21137,6 +23398,8 @@ public enum console { @usableFromInline static let sampleCoverage: JSString = "sampleCoverage" @usableFromInline static let sampleRate: JSString = "sampleRate" @usableFromInline static let sampleSize: JSString = "sampleSize" + @usableFromInline static let samplerParameterf: JSString = "samplerParameterf" + @usableFromInline static let samplerParameteri: JSString = "samplerParameteri" @usableFromInline static let sandbox: JSString = "sandbox" @usableFromInline static let save: JSString = "save" @usableFromInline static let scalabilityMode: JSString = "scalabilityMode" @@ -21148,16 +23411,30 @@ public enum console { @usableFromInline static let scheme: JSString = "scheme" @usableFromInline static let scissor: JSString = "scissor" @usableFromInline static let scope: JSString = "scope" + @usableFromInline static let screen: JSString = "screen" + @usableFromInline static let screenLeft: JSString = "screenLeft" + @usableFromInline static let screenTop: JSString = "screenTop" @usableFromInline static let screenX: JSString = "screenX" @usableFromInline static let screenY: JSString = "screenY" @usableFromInline static let scriptURL: JSString = "scriptURL" @usableFromInline static let scripts: JSString = "scripts" + @usableFromInline static let scroll: JSString = "scroll" @usableFromInline static let scrollAmount: JSString = "scrollAmount" + @usableFromInline static let scrollBy: JSString = "scrollBy" @usableFromInline static let scrollDelay: JSString = "scrollDelay" + @usableFromInline static let scrollHeight: JSString = "scrollHeight" + @usableFromInline static let scrollIntoView: JSString = "scrollIntoView" + @usableFromInline static let scrollLeft: JSString = "scrollLeft" @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" + @usableFromInline static let scrollTo: JSString = "scrollTo" + @usableFromInline static let scrollTop: JSString = "scrollTop" + @usableFromInline static let scrollWidth: JSString = "scrollWidth" + @usableFromInline static let scrollX: JSString = "scrollX" + @usableFromInline static let scrollY: JSString = "scrollY" @usableFromInline static let scrollbars: JSString = "scrollbars" @usableFromInline static let scrolling: JSString = "scrolling" + @usableFromInline static let scrollingElement: JSString = "scrollingElement" @usableFromInline static let search: JSString = "search" @usableFromInline static let searchParams: JSString = "searchParams" @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" @@ -21299,9 +23576,13 @@ public enum console { @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" @usableFromInline static let texImage2D: JSString = "texImage2D" + @usableFromInline static let texImage3D: JSString = "texImage3D" @usableFromInline static let texParameterf: JSString = "texParameterf" @usableFromInline static let texParameteri: JSString = "texParameteri" + @usableFromInline static let texStorage2D: JSString = "texStorage2D" + @usableFromInline static let texStorage3D: JSString = "texStorage3D" @usableFromInline static let texSubImage2D: JSString = "texSubImage2D" + @usableFromInline static let texSubImage3D: JSString = "texSubImage3D" @usableFromInline static let text: JSString = "text" @usableFromInline static let textAlign: JSString = "textAlign" @usableFromInline static let textBaseline: JSString = "textBaseline" @@ -21320,6 +23601,7 @@ public enum console { @usableFromInline static let timeout: JSString = "timeout" @usableFromInline static let timestamp: JSString = "timestamp" @usableFromInline static let title: JSString = "title" + @usableFromInline static let toBox: JSString = "toBox" @usableFromInline static let toDataURL: JSString = "toDataURL" @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" @@ -21340,6 +23622,7 @@ public enum console { @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" @usableFromInline static let transform: JSString = "transform" + @usableFromInline static let transformFeedbackVaryings: JSString = "transformFeedbackVaryings" @usableFromInline static let transformPoint: JSString = "transformPoint" @usableFromInline static let transformToDocument: JSString = "transformToDocument" @usableFromInline static let transformToFragment: JSString = "transformToFragment" @@ -21353,21 +23636,36 @@ public enum console { @usableFromInline static let uniform1fv: JSString = "uniform1fv" @usableFromInline static let uniform1i: JSString = "uniform1i" @usableFromInline static let uniform1iv: JSString = "uniform1iv" + @usableFromInline static let uniform1ui: JSString = "uniform1ui" + @usableFromInline static let uniform1uiv: JSString = "uniform1uiv" @usableFromInline static let uniform2f: JSString = "uniform2f" @usableFromInline static let uniform2fv: JSString = "uniform2fv" @usableFromInline static let uniform2i: JSString = "uniform2i" @usableFromInline static let uniform2iv: JSString = "uniform2iv" + @usableFromInline static let uniform2ui: JSString = "uniform2ui" + @usableFromInline static let uniform2uiv: JSString = "uniform2uiv" @usableFromInline static let uniform3f: JSString = "uniform3f" @usableFromInline static let uniform3fv: JSString = "uniform3fv" @usableFromInline static let uniform3i: JSString = "uniform3i" @usableFromInline static let uniform3iv: JSString = "uniform3iv" + @usableFromInline static let uniform3ui: JSString = "uniform3ui" + @usableFromInline static let uniform3uiv: JSString = "uniform3uiv" @usableFromInline static let uniform4f: JSString = "uniform4f" @usableFromInline static let uniform4fv: JSString = "uniform4fv" @usableFromInline static let uniform4i: JSString = "uniform4i" @usableFromInline static let uniform4iv: JSString = "uniform4iv" + @usableFromInline static let uniform4ui: JSString = "uniform4ui" + @usableFromInline static let uniform4uiv: JSString = "uniform4uiv" + @usableFromInline static let uniformBlockBinding: JSString = "uniformBlockBinding" @usableFromInline static let uniformMatrix2fv: JSString = "uniformMatrix2fv" + @usableFromInline static let uniformMatrix2x3fv: JSString = "uniformMatrix2x3fv" + @usableFromInline static let uniformMatrix2x4fv: JSString = "uniformMatrix2x4fv" @usableFromInline static let uniformMatrix3fv: JSString = "uniformMatrix3fv" + @usableFromInline static let uniformMatrix3x2fv: JSString = "uniformMatrix3x2fv" + @usableFromInline static let uniformMatrix3x4fv: JSString = "uniformMatrix3x4fv" @usableFromInline static let uniformMatrix4fv: JSString = "uniformMatrix4fv" + @usableFromInline static let uniformMatrix4x2fv: JSString = "uniformMatrix4x2fv" + @usableFromInline static let uniformMatrix4x3fv: JSString = "uniformMatrix4x3fv" @usableFromInline static let unregister: JSString = "unregister" @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" @usableFromInline static let update: JSString = "update" @@ -21403,6 +23701,12 @@ public enum console { @usableFromInline static let vertexAttrib3fv: JSString = "vertexAttrib3fv" @usableFromInline static let vertexAttrib4f: JSString = "vertexAttrib4f" @usableFromInline static let vertexAttrib4fv: JSString = "vertexAttrib4fv" + @usableFromInline static let vertexAttribDivisor: JSString = "vertexAttribDivisor" + @usableFromInline static let vertexAttribI4i: JSString = "vertexAttribI4i" + @usableFromInline static let vertexAttribI4iv: JSString = "vertexAttribI4iv" + @usableFromInline static let vertexAttribI4ui: JSString = "vertexAttribI4ui" + @usableFromInline static let vertexAttribI4uiv: JSString = "vertexAttribI4uiv" + @usableFromInline static let vertexAttribIPointer: JSString = "vertexAttribIPointer" @usableFromInline static let vertexAttribPointer: JSString = "vertexAttribPointer" @usableFromInline static let video: JSString = "video" @usableFromInline static let videoBitsPerSecond: JSString = "videoBitsPerSecond" @@ -21418,6 +23722,7 @@ public enum console { @usableFromInline static let volume: JSString = "volume" @usableFromInline static let vspace: JSString = "vspace" @usableFromInline static let w: JSString = "w" + @usableFromInline static let waitSync: JSString = "waitSync" @usableFromInline static let waiting: JSString = "waiting" @usableFromInline static let warn: JSString = "warn" @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" @@ -21637,6 +23942,48 @@ public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaT } } +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 + } + } +} + public protocol Any_BufferSource: ConvertibleToJSValue {} extension ArrayBuffer: Any_BufferSource {} extension ArrayBufferView: Any_BufferSource {} @@ -21679,6 +24026,48 @@ public enum BufferSource: JSValueCompatible, Any_BufferSource { } } +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 + } + } +} + public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} @@ -22659,6 +25048,76 @@ public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { } } +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 + } + } +} + public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} @@ -23569,6 +26028,48 @@ public enum TimerHandler: JSValueCompatible, Any_TimerHandler { } } +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 + } + } +} + public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} extension Blob: Any_XMLHttpRequestBodyInit {} extension BufferSource: Any_XMLHttpRequestBodyInit {} 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 925e3c1d..6311cac9 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 9cdaf3781c85bf43afc924fb363884aa436159fa Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 12:48:11 +0100 Subject: [PATCH 16/21] Update main.swift --- Sources/DOMKitDemo/main.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/DOMKitDemo/main.swift b/Sources/DOMKitDemo/main.swift index 3777d350..dfe47211 100644 --- a/Sources/DOMKitDemo/main.swift +++ b/Sources/DOMKitDemo/main.swift @@ -3,9 +3,9 @@ import JavaScriptKit let document = globalThis.document -let header = HTMLElement(from: document.createElement(localName: "h1"))! -header.innerText = "Hello World!" -_ = document.body!.appendChild(node: header) +let button = HTMLElement(from: document.createElement(localName: "button"))! +button.innerText = "Hello World!" +_ = document.body!.appendChild(node: button) console.log(data: "Hello, world!") From 3a6d5f43921fc7323015c46278327b458bff4718 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:08:54 +0100 Subject: [PATCH 17/21] Revert "Bump JSKit, fix BigInt support" This reverts commit f6f0fed2c609dd4f158899ed1139b56e3bee73f2. --- Package.resolved | 2 +- Package.swift | 22 +- Sources/DOMKit/Generated.swift | 2543 +---------------- 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 - 144 files changed, 7626 insertions(+), 2539 deletions(-) create mode 100644 Sources/DOMKit/WebIDL/AlphaOption.swift create mode 100644 Sources/DOMKit/WebIDL/AudioData.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDataInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/AudioEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/AudioSampleFormat.swift create mode 100644 Sources/DOMKit/WebIDL/BitrateMode.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEvent.swift create mode 100644 Sources/DOMKit/WebIDL/BlobEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/Bool_or_ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/BoxQuadOptions.swift create mode 100644 Sources/DOMKit/WebIDL/CSSBoxType.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement.swift create mode 100644 Sources/DOMKit/WebIDL/CSSPseudoElement_or_Element.swift create mode 100644 Sources/DOMKit/WebIDL/CameraDevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/CaretPosition.swift create mode 100644 Sources/DOMKit/WebIDL/CodecState.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBoolean.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainBooleanParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMString.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDOMStringParameters.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDouble.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainDoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULong.swift create mode 100644 Sources/DOMKit/WebIDL/ConstrainULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/ConvertCoordinateOptions.swift create mode 100644 Sources/DOMKit/WebIDL/DevicePermissionDescriptor.swift create mode 100644 Sources/DOMKit/WebIDL/DoubleRange.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedAudioChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunk.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkInit.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/EncodedVideoChunkType.swift create mode 100644 Sources/DOMKit/WebIDL/Float32List.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryNode.swift create mode 100644 Sources/DOMKit/WebIDL/GeometryUtils.swift create mode 100644 Sources/DOMKit/WebIDL/HardwareAcceleration.swift create mode 100644 Sources/DOMKit/WebIDL/ImageBufferSource.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecodeResult.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/ImageDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrack.swift create mode 100644 Sources/DOMKit/WebIDL/ImageTrackList.swift create mode 100644 Sources/DOMKit/WebIDL/InputDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/Int32List.swift create mode 100644 Sources/DOMKit/WebIDL/IsVisibleOptions.swift create mode 100644 Sources/DOMKit/WebIDL/LatencyMode.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceInfo.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDeviceKind.swift create mode 100644 Sources/DOMKit/WebIDL/MediaDevices.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryList.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaQueryListEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorder.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderErrorEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaRecorderOptions.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStream.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrack.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEvent.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/MediaStreamTrackState.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackCapabilities.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraintSet.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSettings.swift create mode 100644 Sources/DOMKit/WebIDL/MediaTrackSupportedConstraints.swift create mode 100644 Sources/DOMKit/WebIDL/OverconstrainedError.swift create mode 100644 Sources/DOMKit/WebIDL/PlaneLayout.swift create mode 100644 Sources/DOMKit/WebIDL/RecordingState.swift create mode 100644 Sources/DOMKit/WebIDL/Screen.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollBehavior.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollIntoViewOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollLogicalPosition.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollOptions.swift create mode 100644 Sources/DOMKit/WebIDL/ScrollToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/SvcOutputMetadata.swift create mode 100644 Sources/DOMKit/WebIDL/TexImageSource.swift create mode 100644 Sources/DOMKit/WebIDL/ULongRange.swift create mode 100644 Sources/DOMKit/WebIDL/Uint32List.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorPrimaries.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpace.swift create mode 100644 Sources/DOMKit/WebIDL/VideoColorSpaceInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoDecoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoder.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderConfig.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderEncodeOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoEncoderSupport.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFacingModeEnum.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrame.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameBufferInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameCopyToOptions.swift create mode 100644 Sources/DOMKit/WebIDL/VideoFrameInit.swift create mode 100644 Sources/DOMKit/WebIDL/VideoMatrixCoefficients.swift create mode 100644 Sources/DOMKit/WebIDL/VideoPixelFormat.swift create mode 100644 Sources/DOMKit/WebIDL/VideoResizeModeEnum.swift create mode 100644 Sources/DOMKit/WebIDL/VideoTransferCharacteristics.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGL2RenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLActiveInfo.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLBuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextAttributes.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEvent.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLContextEventInit.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLFramebuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLObject.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLPowerPreference.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLProgram.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLQuery.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderbuffer.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContext.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextBase.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLRenderingContextOverloads.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLSampler.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShader.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLShaderPrecisionFormat.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLSync.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTexture.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLTransformFeedback.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLUniformLocation.swift create mode 100644 Sources/DOMKit/WebIDL/WebGLVertexArrayObject.swift create mode 100644 Sources/DOMKit/WebIDL/console.swift diff --git a/Package.resolved b/Package.resolved index 2c01643c..60906fdc 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/swiftwasm/JavaScriptKit.git", "state": { "branch": "main", - "revision": "384ef252c70bd0b9988e1cef95b416e6ed48d82f", + "revision": "95d0c4cd78b48ffc7e19c618d57c3244917be09a", "version": null } } diff --git a/Package.swift b/Package.swift index 090e2373..7157ffdd 100644 --- a/Package.swift +++ b/Package.swift @@ -8,43 +8,35 @@ let package = Package( products: [ .executable( name: "DOMKitDemo", - targets: ["DOMKitDemo"] - ), + targets: ["DOMKitDemo"]), .library( name: "DOMKit", - targets: ["DOMKit"] - ), + targets: ["DOMKit"]), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), ], dependencies: [ .package( url: "https://github.com/swiftwasm/JavaScriptKit.git", - .branch("main") - ), + .branch("main")), ], targets: [ .target( name: "DOMKitDemo", - dependencies: ["DOMKit"] - ), + dependencies: ["DOMKit"]), .target( name: "DOMKit", dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", - .product(name: "JavaScriptEventLoop", package: "JavaScriptKit"), - .product(name: "JavaScriptBigIntSupport", package: "JavaScriptKit"), - ]), + .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), .target(name: "WebIDL"), .target( name: "WebIDLToSwift", - dependencies: ["WebIDL"] - ), + dependencies: ["WebIDL"]), .testTarget( name: "DOMKitTests", - dependencies: ["DOMKit"] - ), + dependencies: ["DOMKit"]), ] ) diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index af1c4024..a109f8c2 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -1,6 +1,5 @@ // This file was auto-generated by WebIDLToSwift. DO NOT EDIT! -import JavaScriptBigIntSupport import JavaScriptEventLoop import JavaScriptKit @@ -1411,27 +1410,6 @@ public extension Body { } } -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 -} - public class BroadcastChannel: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } @@ -1496,51 +1474,6 @@ public class CDATASection: Text { } } -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 } -} - -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()! - } -} - public class Cache: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } @@ -2582,29 +2515,6 @@ public extension CanvasUserInterface { } } -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()! - } -} - public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } @@ -2940,27 +2850,6 @@ public class ConstrainULongRange: BridgedDictionary { public var ideal: UInt32 } -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 -} - public class CountQueuingStrategy: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } @@ -4380,7 +4269,7 @@ public class DevicePermissionDescriptor: BridgedDictionary { public var deviceId: String } -public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers, GeometryUtils { +public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4426,7 +4315,6 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) - _scrollingElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollingElement) super.init(unsafelyWrapping: jsObject) } @@ -4727,24 +4615,6 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN @ReadonlyAttribute public var timeline: DocumentTimeline - - @inlinable public func elementFromPoint(x: Double, y: Double) -> Element? { - let this = jsObject - return this[Strings.elementFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable public func elementsFromPoint(x: Double, y: Double) -> [Element] { - let this = jsObject - return this[Strings.elementsFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! - } - - @inlinable public func caretPositionFromPoint(x: Double, y: Double) -> CaretPosition? { - let this = jsObject - return this[Strings.caretPositionFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var scrollingElement: Element? } public protocol DocumentAndElementEventHandlers: JSBridgedClass {} @@ -4971,7 +4841,7 @@ public class EffectTiming: BridgedDictionary { public var easing: String } -public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable, GeometryUtils { +public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4985,14 +4855,6 @@ public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slo _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) - _scrollTop = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollTop) - _scrollLeft = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollLeft) - _scrollWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollWidth) - _scrollHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollHeight) - _clientTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientTop) - _clientLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientLeft) - _clientWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientWidth) - _clientHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientHeight) super.init(unsafelyWrapping: jsObject) } @@ -5150,85 +5012,6 @@ public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slo let this = jsObject _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) } - - @inlinable public func pseudo(type: String) -> CSSPseudoElement? { - let this = jsObject - return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! - } - - @inlinable public func getClientRects() -> DOMRectList { - let this = jsObject - return this[Strings.getClientRects].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getBoundingClientRect() -> DOMRect { - let this = jsObject - return this[Strings.getBoundingClientRect].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func isVisible(options: IsVisibleOptions? = nil) -> Bool { - let this = jsObject - return this[Strings.isVisible].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! - } - - @inlinable public func scrollIntoView(arg: Bool_or_ScrollIntoViewOptions? = nil) { - let this = jsObject - _ = this[Strings.scrollIntoView].function!(this: this, arguments: [arg?.jsValue ?? .undefined]) - } - - @inlinable public func scroll(options: ScrollToOptions? = nil) { - let this = jsObject - _ = this[Strings.scroll].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable public func scroll(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scroll].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable public func scrollTo(options: ScrollToOptions? = nil) { - let this = jsObject - _ = this[Strings.scrollTo].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable public func scrollTo(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scrollTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable public func scrollBy(options: ScrollToOptions? = nil) { - let this = jsObject - _ = this[Strings.scrollBy].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable public func scrollBy(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scrollBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @ReadWriteAttribute - public var scrollTop: Double - - @ReadWriteAttribute - public var scrollLeft: Double - - @ReadonlyAttribute - public var scrollWidth: Int32 - - @ReadonlyAttribute - public var scrollHeight: Int32 - - @ReadonlyAttribute - public var clientTop: Int32 - - @ReadonlyAttribute - public var clientLeft: Int32 - - @ReadonlyAttribute - public var clientWidth: Int32 - - @ReadonlyAttribute - public var clientHeight: Int32 } public protocol ElementContentEditable: JSBridgedClass {} @@ -6334,29 +6117,6 @@ public extension GenericTransformStream { @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } } -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()! - } -} - public class GetAnimationsOptions: BridgedDictionary { public convenience init(subtree: Bool) { let object = JSObject.global[Strings.Object].function!.new() @@ -7253,11 +7013,6 @@ public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventH _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) - _offsetParent = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetParent) - _offsetTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetTop) - _offsetLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetLeft) - _offsetWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetWidth) - _offsetHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetHeight) super.init(unsafelyWrapping: jsObject) } @@ -7313,21 +7068,6 @@ public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventH let this = jsObject return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! } - - @ReadonlyAttribute - public var offsetParent: Element? - - @ReadonlyAttribute - public var offsetTop: Int32 - - @ReadonlyAttribute - public var offsetLeft: Int32 - - @ReadonlyAttribute - public var offsetWidth: Int32 - - @ReadonlyAttribute - public var offsetHeight: Int32 } public class HTMLEmbedElement: HTMLElement { @@ -7882,8 +7622,6 @@ public class HTMLImageElement: HTMLElement { _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) - _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) super.init(unsafelyWrapping: jsObject) } @@ -7971,12 +7709,6 @@ public class HTMLImageElement: HTMLElement { @ReadWriteAttribute public var border: String - - @ReadonlyAttribute - public var x: Int32 - - @ReadonlyAttribute - public var y: Int32 } public class HTMLInputElement: HTMLElement { @@ -10761,18 +10493,6 @@ public class InputEventInit: BridgedDictionary { public var inputType: String } -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) - } -} - public class KeyboardEvent: UIEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } @@ -11183,71 +10903,6 @@ public class MediaError: JSBridgedClass { public var message: String } -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 -} - -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 -} - -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 -} - public class MediaRecorder: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } @@ -12191,12 +11846,6 @@ public class MouseEvent: UIEvent { _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) - _pageX = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageX) - _pageY = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageY) - _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) - _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) - _offsetX = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetX) - _offsetY = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetY) super.init(unsafelyWrapping: jsObject) } @@ -12261,24 +11910,6 @@ public class MouseEvent: UIEvent { let this = jsObject _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) } - - @ReadonlyAttribute - public var pageX: Double - - @ReadonlyAttribute - public var pageY: Double - - @ReadonlyAttribute - public var x: Double - - @ReadonlyAttribute - public var y: Double - - @ReadonlyAttribute - public var offsetX: Double - - @ReadonlyAttribute - public var offsetY: Double } public class MouseEventInit: BridgedDictionary { @@ -13703,16 +13334,6 @@ public class Range: AbstractRange { @inlinable public var description: String { jsObject[Strings.toString]!().fromJSValue()! } - - @inlinable public func getClientRects() -> DOMRectList { - let this = jsObject - return this[Strings.getClientRects].function!(this: this, arguments: []).fromJSValue()! - } - - @inlinable public func getBoundingClientRect() -> DOMRect { - let this = jsObject - return this[Strings.getBoundingClientRect].function!(this: this, arguments: []).fromJSValue()! - } } public class ReadableByteStreamController: JSBridgedClass { @@ -14538,124 +14159,15 @@ public enum ResponseType: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public class Screen: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } - - public let jsObject: JSObject +public enum ScrollRestoration: JSString, JSValueCompatible { + case auto = "auto" + case manual = "manual" - 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 -} - -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 } -} - -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 -} - -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 } -} - -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 -} - -public enum ScrollRestoration: JSString, JSValueCompatible { - case auto = "auto" - case manual = "manual" - - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @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) { @@ -14665,27 +14177,6 @@ public enum ScrollRestoration: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -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 -} - public enum SelectionMode: JSString, JSValueCompatible { case select = "select" case start = "start" @@ -15268,7 +14759,7 @@ public class SvcOutputMetadata: BridgedDictionary { public var temporalLayerId: UInt32 } -public class Text: CharacterData, Slottable, GeometryUtils { +public class Text: CharacterData, Slottable { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -15781,9 +15272,6 @@ public typealias GLuint = UInt32 public typealias GLfloat = Float public typealias GLclampf = Float -public typealias GLint64 = Int64 -public typealias GLuint64 = UInt64 - public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void @@ -17014,1500 +16502,19 @@ 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 } -} - -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 - } -} - -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]) - } -} - -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 public static func construct(from jsValue: JSValue) -> Self? { + if let string = jsValue.jsString { + return Self(rawValue: string) + } + return nil } - @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]) + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } } public class WebGLActiveInfo: JSBridgedClass { @@ -18673,14 +16680,6 @@ public class WebGLProgram: WebGLObject { } } -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) - } -} - public class WebGLRenderbuffer: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } @@ -20073,14 +18072,6 @@ public extension WebGLRenderingContextOverloads { } } -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) - } -} - public class WebGLShader: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } @@ -20111,14 +18102,6 @@ public class WebGLShaderPrecisionFormat: JSBridgedClass { public var precision: GLint } -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) - } -} - public class WebGLTexture: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } @@ -20127,14 +18110,6 @@ public class WebGLTexture: WebGLObject { } } -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) - } -} - public class WebGLUniformLocation: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } @@ -20145,14 +18120,6 @@ public class WebGLUniformLocation: JSBridgedClass { } } -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) - } -} - public class WheelEvent: MouseEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } @@ -20248,20 +18215,6 @@ public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, Wind _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) - _screen = ReadonlyAttribute(jsObject: jsObject, name: Strings.screen) - _innerWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.innerWidth) - _innerHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.innerHeight) - _scrollX = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollX) - _pageXOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageXOffset) - _scrollY = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollY) - _pageYOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageYOffset) - _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) - _screenLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenLeft) - _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) - _screenTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenTop) - _outerWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.outerWidth) - _outerHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.outerHeight) - _devicePixelRatio = ReadonlyAttribute(jsObject: jsObject, name: Strings.devicePixelRatio) super.init(unsafelyWrapping: jsObject) } @@ -20416,103 +18369,6 @@ public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, Wind @ReadonlyAttribute public var external: External - - @inlinable public func matchMedia(query: String) -> MediaQueryList { - let this = jsObject - return this[Strings.matchMedia].function!(this: this, arguments: [query.jsValue]).fromJSValue()! - } - - @ReadonlyAttribute - public var screen: Screen - - @inlinable public func moveTo(x: Int32, y: Int32) { - let this = jsObject - _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable public func moveBy(x: Int32, y: Int32) { - let this = jsObject - _ = this[Strings.moveBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable public func resizeTo(width: Int32, height: Int32) { - let this = jsObject - _ = this[Strings.resizeTo].function!(this: this, arguments: [width.jsValue, height.jsValue]) - } - - @inlinable public func resizeBy(x: Int32, y: Int32) { - let this = jsObject - _ = this[Strings.resizeBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @ReadonlyAttribute - public var innerWidth: Int32 - - @ReadonlyAttribute - public var innerHeight: Int32 - - @ReadonlyAttribute - public var scrollX: Double - - @ReadonlyAttribute - public var pageXOffset: Double - - @ReadonlyAttribute - public var scrollY: Double - - @ReadonlyAttribute - public var pageYOffset: Double - - @inlinable public func scroll(options: ScrollToOptions? = nil) { - let this = jsObject - _ = this[Strings.scroll].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable public func scroll(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scroll].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable public func scrollTo(options: ScrollToOptions? = nil) { - let this = jsObject - _ = this[Strings.scrollTo].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable public func scrollTo(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scrollTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @inlinable public func scrollBy(options: ScrollToOptions? = nil) { - let this = jsObject - _ = this[Strings.scrollBy].function!(this: this, arguments: [options?.jsValue ?? .undefined]) - } - - @inlinable public func scrollBy(x: Double, y: Double) { - let this = jsObject - _ = this[Strings.scrollBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) - } - - @ReadonlyAttribute - public var screenX: Int32 - - @ReadonlyAttribute - public var screenLeft: Int32 - - @ReadonlyAttribute - public var screenY: Int32 - - @ReadonlyAttribute - public var screenTop: Int32 - - @ReadonlyAttribute - public var outerWidth: Int32 - - @ReadonlyAttribute - public var outerHeight: Int32 - - @ReadonlyAttribute - public var devicePixelRatio: Double } public protocol WindowEventHandlers: JSBridgedClass {} @@ -21895,14 +19751,12 @@ public enum console { @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" @usableFromInline static let CDATASection: JSString = "CDATASection" - @usableFromInline static let CSSPseudoElement: JSString = "CSSPseudoElement" @usableFromInline static let Cache: JSString = "Cache" @usableFromInline static let CacheStorage: JSString = "CacheStorage" @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" - @usableFromInline static let CaretPosition: JSString = "CaretPosition" @usableFromInline static let CharacterData: JSString = "CharacterData" @usableFromInline static let Comment: JSString = "Comment" @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" @@ -22039,8 +19893,6 @@ public enum console { @usableFromInline static let MediaDeviceInfo: JSString = "MediaDeviceInfo" @usableFromInline static let MediaDevices: JSString = "MediaDevices" @usableFromInline static let MediaError: JSString = "MediaError" - @usableFromInline static let MediaQueryList: JSString = "MediaQueryList" - @usableFromInline static let MediaQueryListEvent: JSString = "MediaQueryListEvent" @usableFromInline static let MediaRecorder: JSString = "MediaRecorder" @usableFromInline static let MediaRecorderErrorEvent: JSString = "MediaRecorderErrorEvent" @usableFromInline static let MediaStream: JSString = "MediaStream" @@ -22084,7 +19936,6 @@ public enum console { @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" @usableFromInline static let Request: JSString = "Request" @usableFromInline static let Response: JSString = "Response" - @usableFromInline static let Screen: JSString = "Screen" @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" @@ -22115,24 +19966,18 @@ public enum console { @usableFromInline static let VideoFrame: JSString = "VideoFrame" @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" - @usableFromInline static let WebGL2RenderingContext: JSString = "WebGL2RenderingContext" @usableFromInline static let WebGLActiveInfo: JSString = "WebGLActiveInfo" @usableFromInline static let WebGLBuffer: JSString = "WebGLBuffer" @usableFromInline static let WebGLContextEvent: JSString = "WebGLContextEvent" @usableFromInline static let WebGLFramebuffer: JSString = "WebGLFramebuffer" @usableFromInline static let WebGLObject: JSString = "WebGLObject" @usableFromInline static let WebGLProgram: JSString = "WebGLProgram" - @usableFromInline static let WebGLQuery: JSString = "WebGLQuery" @usableFromInline static let WebGLRenderbuffer: JSString = "WebGLRenderbuffer" @usableFromInline static let WebGLRenderingContext: JSString = "WebGLRenderingContext" - @usableFromInline static let WebGLSampler: JSString = "WebGLSampler" @usableFromInline static let WebGLShader: JSString = "WebGLShader" @usableFromInline static let WebGLShaderPrecisionFormat: JSString = "WebGLShaderPrecisionFormat" - @usableFromInline static let WebGLSync: JSString = "WebGLSync" @usableFromInline static let WebGLTexture: JSString = "WebGLTexture" - @usableFromInline static let WebGLTransformFeedback: JSString = "WebGLTransformFeedback" @usableFromInline static let WebGLUniformLocation: JSString = "WebGLUniformLocation" - @usableFromInline static let WebGLVertexArrayObject: JSString = "WebGLVertexArrayObject" @usableFromInline static let WheelEvent: JSString = "WheelEvent" @usableFromInline static let Window: JSString = "Window" @usableFromInline static let Worker: JSString = "Worker" @@ -22277,8 +20122,6 @@ public enum console { @usableFromInline static let autocomplete: JSString = "autocomplete" @usableFromInline static let autofocus: JSString = "autofocus" @usableFromInline static let autoplay: JSString = "autoplay" - @usableFromInline static let availHeight: JSString = "availHeight" - @usableFromInline static let availWidth: JSString = "availWidth" @usableFromInline static let axis: JSString = "axis" @usableFromInline static let b: JSString = "b" @usableFromInline static let back: JSString = "back" @@ -22287,21 +20130,14 @@ public enum console { @usableFromInline static let baseURI: JSString = "baseURI" @usableFromInline static let before: JSString = "before" @usableFromInline static let beginPath: JSString = "beginPath" - @usableFromInline static let beginQuery: JSString = "beginQuery" - @usableFromInline static let beginTransformFeedback: JSString = "beginTransformFeedback" @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" @usableFromInline static let bindAttribLocation: JSString = "bindAttribLocation" @usableFromInline static let bindBuffer: JSString = "bindBuffer" - @usableFromInline static let bindBufferBase: JSString = "bindBufferBase" - @usableFromInline static let bindBufferRange: JSString = "bindBufferRange" @usableFromInline static let bindFramebuffer: JSString = "bindFramebuffer" @usableFromInline static let bindRenderbuffer: JSString = "bindRenderbuffer" - @usableFromInline static let bindSampler: JSString = "bindSampler" @usableFromInline static let bindTexture: JSString = "bindTexture" - @usableFromInline static let bindTransformFeedback: JSString = "bindTransformFeedback" - @usableFromInline static let bindVertexArray: JSString = "bindVertexArray" @usableFromInline static let bitrate: JSString = "bitrate" @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" @@ -22310,9 +20146,7 @@ public enum console { @usableFromInline static let blendEquationSeparate: JSString = "blendEquationSeparate" @usableFromInline static let blendFunc: JSString = "blendFunc" @usableFromInline static let blendFuncSeparate: JSString = "blendFuncSeparate" - @usableFromInline static let blitFramebuffer: JSString = "blitFramebuffer" @usableFromInline static let blob: JSString = "blob" - @usableFromInline static let block: JSString = "block" @usableFromInline static let blocking: JSString = "blocking" @usableFromInline static let blur: JSString = "blur" @usableFromInline static let body: JSString = "body" @@ -22320,7 +20154,6 @@ public enum console { @usableFromInline static let booleanValue: JSString = "booleanValue" @usableFromInline static let border: JSString = "border" @usableFromInline static let bottom: JSString = "bottom" - @usableFromInline static let box: JSString = "box" @usableFromInline static let btoa: JSString = "btoa" @usableFromInline static let bubbles: JSString = "bubbles" @usableFromInline static let bufferData: JSString = "bufferData" @@ -22343,7 +20176,6 @@ public enum console { @usableFromInline static let caption: JSString = "caption" @usableFromInline static let capture: JSString = "capture" @usableFromInline static let captureEvents: JSString = "captureEvents" - @usableFromInline static let caretPositionFromPoint: JSString = "caretPositionFromPoint" @usableFromInline static let cellIndex: JSString = "cellIndex" @usableFromInline static let cellPadding: JSString = "cellPadding" @usableFromInline static let cellSpacing: JSString = "cellSpacing" @@ -22367,10 +20199,6 @@ public enum console { @usableFromInline static let classList: JSString = "classList" @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" - @usableFromInline static let clearBufferfi: JSString = "clearBufferfi" - @usableFromInline static let clearBufferfv: JSString = "clearBufferfv" - @usableFromInline static let clearBufferiv: JSString = "clearBufferiv" - @usableFromInline static let clearBufferuiv: JSString = "clearBufferuiv" @usableFromInline static let clearColor: JSString = "clearColor" @usableFromInline static let clearData: JSString = "clearData" @usableFromInline static let clearDepth: JSString = "clearDepth" @@ -22380,13 +20208,8 @@ public enum console { @usableFromInline static let clearStencil: JSString = "clearStencil" @usableFromInline static let clearTimeout: JSString = "clearTimeout" @usableFromInline static let click: JSString = "click" - @usableFromInline static let clientHeight: JSString = "clientHeight" @usableFromInline static let clientId: JSString = "clientId" @usableFromInline static let clientInformation: JSString = "clientInformation" - @usableFromInline static let clientLeft: JSString = "clientLeft" - @usableFromInline static let clientTop: JSString = "clientTop" - @usableFromInline static let clientWaitSync: JSString = "clientWaitSync" - @usableFromInline static let clientWidth: JSString = "clientWidth" @usableFromInline static let clientX: JSString = "clientX" @usableFromInline static let clientY: JSString = "clientY" @usableFromInline static let clip: JSString = "clip" @@ -22410,7 +20233,6 @@ public enum console { @usableFromInline static let collapsed: JSString = "collapsed" @usableFromInline static let colno: JSString = "colno" @usableFromInline static let color: JSString = "color" - @usableFromInline static let colorDepth: JSString = "colorDepth" @usableFromInline static let colorMask: JSString = "colorMask" @usableFromInline static let colorSpace: JSString = "colorSpace" @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" @@ -22431,9 +20253,7 @@ public enum console { @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" @usableFromInline static let compressedTexImage2D: JSString = "compressedTexImage2D" - @usableFromInline static let compressedTexImage3D: JSString = "compressedTexImage3D" @usableFromInline static let compressedTexSubImage2D: JSString = "compressedTexSubImage2D" - @usableFromInline static let compressedTexSubImage3D: JSString = "compressedTexSubImage3D" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let config: JSString = "config" @usableFromInline static let configure: JSString = "configure" @@ -22449,17 +20269,12 @@ public enum console { @usableFromInline static let control: JSString = "control" @usableFromInline static let controller: JSString = "controller" @usableFromInline static let controls: JSString = "controls" - @usableFromInline static let convertPointFromNode: JSString = "convertPointFromNode" - @usableFromInline static let convertQuadFromNode: JSString = "convertQuadFromNode" - @usableFromInline static let convertRectFromNode: JSString = "convertRectFromNode" @usableFromInline static let convertToBlob: JSString = "convertToBlob" @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" - @usableFromInline static let copyBufferSubData: JSString = "copyBufferSubData" @usableFromInline static let copyTexImage2D: JSString = "copyTexImage2D" @usableFromInline static let copyTexSubImage2D: JSString = "copyTexSubImage2D" - @usableFromInline static let copyTexSubImage3D: JSString = "copyTexSubImage3D" @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let count: JSString = "count" @usableFromInline static let countReset: JSString = "countReset" @@ -22485,19 +20300,15 @@ public enum console { @usableFromInline static let createPattern: JSString = "createPattern" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" @usableFromInline static let createProgram: JSString = "createProgram" - @usableFromInline static let createQuery: JSString = "createQuery" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @usableFromInline static let createRange: JSString = "createRange" @usableFromInline static let createRenderbuffer: JSString = "createRenderbuffer" - @usableFromInline static let createSampler: JSString = "createSampler" @usableFromInline static let createShader: JSString = "createShader" @usableFromInline static let createTBody: JSString = "createTBody" @usableFromInline static let createTFoot: JSString = "createTFoot" @usableFromInline static let createTHead: JSString = "createTHead" @usableFromInline static let createTextNode: JSString = "createTextNode" @usableFromInline static let createTexture: JSString = "createTexture" - @usableFromInline static let createTransformFeedback: JSString = "createTransformFeedback" - @usableFromInline static let createVertexArray: JSString = "createVertexArray" @usableFromInline static let credentials: JSString = "credentials" @usableFromInline static let crossOrigin: JSString = "crossOrigin" @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" @@ -22543,17 +20354,12 @@ public enum console { @usableFromInline static let deleteData: JSString = "deleteData" @usableFromInline static let deleteFramebuffer: JSString = "deleteFramebuffer" @usableFromInline static let deleteProgram: JSString = "deleteProgram" - @usableFromInline static let deleteQuery: JSString = "deleteQuery" @usableFromInline static let deleteRenderbuffer: JSString = "deleteRenderbuffer" @usableFromInline static let deleteRow: JSString = "deleteRow" - @usableFromInline static let deleteSampler: JSString = "deleteSampler" @usableFromInline static let deleteShader: JSString = "deleteShader" - @usableFromInline static let deleteSync: JSString = "deleteSync" @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" @usableFromInline static let deleteTHead: JSString = "deleteTHead" @usableFromInline static let deleteTexture: JSString = "deleteTexture" - @usableFromInline static let deleteTransformFeedback: JSString = "deleteTransformFeedback" - @usableFromInline static let deleteVertexArray: JSString = "deleteVertexArray" @usableFromInline static let deltaMode: JSString = "deltaMode" @usableFromInline static let deltaX: JSString = "deltaX" @usableFromInline static let deltaY: JSString = "deltaY" @@ -22573,7 +20379,6 @@ public enum console { @usableFromInline static let detachShader: JSString = "detachShader" @usableFromInline static let detail: JSString = "detail" @usableFromInline static let deviceId: JSString = "deviceId" - @usableFromInline static let devicePixelRatio: JSString = "devicePixelRatio" @usableFromInline static let dir: JSString = "dir" @usableFromInline static let dirName: JSString = "dirName" @usableFromInline static let direction: JSString = "direction" @@ -22596,13 +20401,9 @@ public enum console { @usableFromInline static let download: JSString = "download" @usableFromInline static let draggable: JSString = "draggable" @usableFromInline static let drawArrays: JSString = "drawArrays" - @usableFromInline static let drawArraysInstanced: JSString = "drawArraysInstanced" - @usableFromInline static let drawBuffers: JSString = "drawBuffers" @usableFromInline static let drawElements: JSString = "drawElements" - @usableFromInline static let drawElementsInstanced: JSString = "drawElementsInstanced" @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" @usableFromInline static let drawImage: JSString = "drawImage" - @usableFromInline static let drawRangeElements: JSString = "drawRangeElements" @usableFromInline static let drawingBufferHeight: JSString = "drawingBufferHeight" @usableFromInline static let drawingBufferWidth: JSString = "drawingBufferWidth" @usableFromInline static let dropEffect: JSString = "dropEffect" @@ -22612,10 +20413,7 @@ public enum console { @usableFromInline static let echoCancellation: JSString = "echoCancellation" @usableFromInline static let effect: JSString = "effect" @usableFromInline static let effectAllowed: JSString = "effectAllowed" - @usableFromInline static let element: JSString = "element" - @usableFromInline static let elementFromPoint: JSString = "elementFromPoint" @usableFromInline static let elements: JSString = "elements" - @usableFromInline static let elementsFromPoint: JSString = "elementsFromPoint" @usableFromInline static let ellipse: JSString = "ellipse" @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" @@ -22632,9 +20430,7 @@ public enum console { @usableFromInline static let endContainer: JSString = "endContainer" @usableFromInline static let endDelay: JSString = "endDelay" @usableFromInline static let endOffset: JSString = "endOffset" - @usableFromInline static let endQuery: JSString = "endQuery" @usableFromInline static let endTime: JSString = "endTime" - @usableFromInline static let endTransformFeedback: JSString = "endTransformFeedback" @usableFromInline static let ended: JSString = "ended" @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @@ -22654,7 +20450,6 @@ public enum console { @usableFromInline static let facingMode: JSString = "facingMode" @usableFromInline static let failIfMajorPerformanceCaveat: JSString = "failIfMajorPerformanceCaveat" @usableFromInline static let fastSeek: JSString = "fastSeek" - @usableFromInline static let fenceSync: JSString = "fenceSync" @usableFromInline static let fetch: JSString = "fetch" @usableFromInline static let fgColor: JSString = "fgColor" @usableFromInline static let filename: JSString = "filename" @@ -22698,10 +20493,8 @@ public enum console { @usableFromInline static let frameRate: JSString = "frameRate" @usableFromInline static let framebufferRenderbuffer: JSString = "framebufferRenderbuffer" @usableFromInline static let framebufferTexture2D: JSString = "framebufferTexture2D" - @usableFromInline static let framebufferTextureLayer: JSString = "framebufferTextureLayer" @usableFromInline static let framerate: JSString = "framerate" @usableFromInline static let frames: JSString = "frames" - @usableFromInline static let fromBox: JSString = "fromBox" @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" @usableFromInline static let fromMatrix: JSString = "fromMatrix" @@ -22714,9 +20507,6 @@ public enum console { @usableFromInline static let get: JSString = "get" @usableFromInline static let getActiveAttrib: JSString = "getActiveAttrib" @usableFromInline static let getActiveUniform: JSString = "getActiveUniform" - @usableFromInline static let getActiveUniformBlockName: JSString = "getActiveUniformBlockName" - @usableFromInline static let getActiveUniformBlockParameter: JSString = "getActiveUniformBlockParameter" - @usableFromInline static let getActiveUniforms: JSString = "getActiveUniforms" @usableFromInline static let getAll: JSString = "getAll" @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" @usableFromInline static let getAnimations: JSString = "getAnimations" @@ -22729,14 +20519,9 @@ public enum console { @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" @usableFromInline static let getAudioTracks: JSString = "getAudioTracks" - @usableFromInline static let getBoundingClientRect: JSString = "getBoundingClientRect" @usableFromInline static let getBounds: JSString = "getBounds" - @usableFromInline static let getBoxQuads: JSString = "getBoxQuads" @usableFromInline static let getBufferParameter: JSString = "getBufferParameter" - @usableFromInline static let getBufferSubData: JSString = "getBufferSubData" @usableFromInline static let getCapabilities: JSString = "getCapabilities" - @usableFromInline static let getClientRect: JSString = "getClientRect" - @usableFromInline static let getClientRects: JSString = "getClientRects" @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" @usableFromInline static let getConstraints: JSString = "getConstraints" @usableFromInline static let getContext: JSString = "getContext" @@ -22750,11 +20535,8 @@ public enum console { @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" @usableFromInline static let getError: JSString = "getError" @usableFromInline static let getExtension: JSString = "getExtension" - @usableFromInline static let getFragDataLocation: JSString = "getFragDataLocation" @usableFromInline static let getFramebufferAttachmentParameter: JSString = "getFramebufferAttachmentParameter" @usableFromInline static let getImageData: JSString = "getImageData" - @usableFromInline static let getIndexedParameter: JSString = "getIndexedParameter" - @usableFromInline static let getInternalformatParameter: JSString = "getInternalformatParameter" @usableFromInline static let getKeyframes: JSString = "getKeyframes" @usableFromInline static let getLineDash: JSString = "getLineDash" @usableFromInline static let getModifierState: JSString = "getModifierState" @@ -22762,8 +20544,6 @@ public enum console { @usableFromInline static let getParameter: JSString = "getParameter" @usableFromInline static let getProgramInfoLog: JSString = "getProgramInfoLog" @usableFromInline static let getProgramParameter: JSString = "getProgramParameter" - @usableFromInline static let getQuery: JSString = "getQuery" - @usableFromInline static let getQueryParameter: JSString = "getQueryParameter" @usableFromInline static let getReader: JSString = "getReader" @usableFromInline static let getRegistration: JSString = "getRegistration" @usableFromInline static let getRegistrations: JSString = "getRegistrations" @@ -22771,7 +20551,6 @@ public enum console { @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" @usableFromInline static let getRootNode: JSString = "getRootNode" @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" - @usableFromInline static let getSamplerParameter: JSString = "getSamplerParameter" @usableFromInline static let getSettings: JSString = "getSettings" @usableFromInline static let getShaderInfoLog: JSString = "getShaderInfoLog" @usableFromInline static let getShaderParameter: JSString = "getShaderParameter" @@ -22781,16 +20560,12 @@ public enum console { @usableFromInline static let getState: JSString = "getState" @usableFromInline static let getSupportedConstraints: JSString = "getSupportedConstraints" @usableFromInline static let getSupportedExtensions: JSString = "getSupportedExtensions" - @usableFromInline static let getSyncParameter: JSString = "getSyncParameter" @usableFromInline static let getTexParameter: JSString = "getTexParameter" @usableFromInline static let getTiming: JSString = "getTiming" @usableFromInline static let getTrackById: JSString = "getTrackById" @usableFromInline static let getTracks: JSString = "getTracks" @usableFromInline static let getTransform: JSString = "getTransform" - @usableFromInline static let getTransformFeedbackVarying: JSString = "getTransformFeedbackVarying" @usableFromInline static let getUniform: JSString = "getUniform" - @usableFromInline static let getUniformBlockIndex: JSString = "getUniformBlockIndex" - @usableFromInline static let getUniformIndices: JSString = "getUniformIndices" @usableFromInline static let getUniformLocation: JSString = "getUniformLocation" @usableFromInline static let getUserMedia: JSString = "getUserMedia" @usableFromInline static let getVertexAttrib: JSString = "getVertexAttrib" @@ -22863,10 +20638,7 @@ public enum console { @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" @usableFromInline static let initUIEvent: JSString = "initUIEvent" - @usableFromInline static let inline: JSString = "inline" - @usableFromInline static let innerHeight: JSString = "innerHeight" @usableFromInline static let innerText: JSString = "innerText" - @usableFromInline static let innerWidth: JSString = "innerWidth" @usableFromInline static let inputEncoding: JSString = "inputEncoding" @usableFromInline static let inputMode: JSString = "inputMode" @usableFromInline static let inputType: JSString = "inputType" @@ -22881,8 +20653,6 @@ public enum console { @usableFromInline static let integrity: JSString = "integrity" @usableFromInline static let intersectsNode: JSString = "intersectsNode" @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" - @usableFromInline static let invalidateFramebuffer: JSString = "invalidateFramebuffer" - @usableFromInline static let invalidateSubFramebuffer: JSString = "invalidateSubFramebuffer" @usableFromInline static let inverse: JSString = "inverse" @usableFromInline static let invertSelf: JSString = "invertSelf" @usableFromInline static let `is`: JSString = "is" @@ -22904,20 +20674,14 @@ public enum console { @usableFromInline static let isPointInRange: JSString = "isPointInRange" @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" @usableFromInline static let isProgram: JSString = "isProgram" - @usableFromInline static let isQuery: JSString = "isQuery" @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" @usableFromInline static let isRenderbuffer: JSString = "isRenderbuffer" @usableFromInline static let isSameNode: JSString = "isSameNode" - @usableFromInline static let isSampler: JSString = "isSampler" @usableFromInline static let isSecureContext: JSString = "isSecureContext" @usableFromInline static let isShader: JSString = "isShader" - @usableFromInline static let isSync: JSString = "isSync" @usableFromInline static let isTexture: JSString = "isTexture" - @usableFromInline static let isTransformFeedback: JSString = "isTransformFeedback" @usableFromInline static let isTrusted: JSString = "isTrusted" @usableFromInline static let isTypeSupported: JSString = "isTypeSupported" - @usableFromInline static let isVertexArray: JSString = "isVertexArray" - @usableFromInline static let isVisible: JSString = "isVisible" @usableFromInline static let item: JSString = "item" @usableFromInline static let items: JSString = "items" @usableFromInline static let iterateNext: JSString = "iterateNext" @@ -22993,7 +20757,6 @@ public enum console { @usableFromInline static let marginWidth: JSString = "marginWidth" @usableFromInline static let match: JSString = "match" @usableFromInline static let matchAll: JSString = "matchAll" - @usableFromInline static let matchMedia: JSString = "matchMedia" @usableFromInline static let matches: JSString = "matches" @usableFromInline static let matrix: JSString = "matrix" @usableFromInline static let matrixTransform: JSString = "matrixTransform" @@ -23022,7 +20785,6 @@ public enum console { @usableFromInline static let modifierSuper: JSString = "modifierSuper" @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" - @usableFromInline static let moveBy: JSString = "moveBy" @usableFromInline static let moveTo: JSString = "moveTo" @usableFromInline static let multiple: JSString = "multiple" @usableFromInline static let multiply: JSString = "multiply" @@ -23059,14 +20821,6 @@ public enum console { @usableFromInline static let numberValue: JSString = "numberValue" @usableFromInline static let observe: JSString = "observe" @usableFromInline static let offset: JSString = "offset" - @usableFromInline static let offsetHeight: JSString = "offsetHeight" - @usableFromInline static let offsetLeft: JSString = "offsetLeft" - @usableFromInline static let offsetNode: JSString = "offsetNode" - @usableFromInline static let offsetParent: JSString = "offsetParent" - @usableFromInline static let offsetTop: JSString = "offsetTop" - @usableFromInline static let offsetWidth: JSString = "offsetWidth" - @usableFromInline static let offsetX: JSString = "offsetX" - @usableFromInline static let offsetY: JSString = "offsetY" @usableFromInline static let ok: JSString = "ok" @usableFromInline static let oldURL: JSString = "oldURL" @usableFromInline static let oldValue: JSString = "oldValue" @@ -23189,9 +20943,7 @@ public enum console { @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" @usableFromInline static let originTime: JSString = "originTime" @usableFromInline static let oscpu: JSString = "oscpu" - @usableFromInline static let outerHeight: JSString = "outerHeight" @usableFromInline static let outerText: JSString = "outerText" - @usableFromInline static let outerWidth: JSString = "outerWidth" @usableFromInline static let output: JSString = "output" @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" @usableFromInline static let ownerDocument: JSString = "ownerDocument" @@ -23200,10 +20952,6 @@ public enum console { @usableFromInline static let p2: JSString = "p2" @usableFromInline static let p3: JSString = "p3" @usableFromInline static let p4: JSString = "p4" - @usableFromInline static let pageX: JSString = "pageX" - @usableFromInline static let pageXOffset: JSString = "pageXOffset" - @usableFromInline static let pageY: JSString = "pageY" - @usableFromInline static let pageYOffset: JSString = "pageYOffset" @usableFromInline static let panTiltZoom: JSString = "panTiltZoom" @usableFromInline static let parent: JSString = "parent" @usableFromInline static let parentElement: JSString = "parentElement" @@ -23216,7 +20964,6 @@ public enum console { @usableFromInline static let patternMismatch: JSString = "patternMismatch" @usableFromInline static let pause: JSString = "pause" @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" - @usableFromInline static let pauseTransformFeedback: JSString = "pauseTransformFeedback" @usableFromInline static let paused: JSString = "paused" @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" @usableFromInline static let pending: JSString = "pending" @@ -23228,7 +20975,6 @@ public enum console { @usableFromInline static let ping: JSString = "ping" @usableFromInline static let pipeThrough: JSString = "pipeThrough" @usableFromInline static let pipeTo: JSString = "pipeTo" - @usableFromInline static let pixelDepth: JSString = "pixelDepth" @usableFromInline static let pixelStorei: JSString = "pixelStorei" @usableFromInline static let placeholder: JSString = "placeholder" @usableFromInline static let planeIndex: JSString = "planeIndex" @@ -23277,7 +21023,6 @@ public enum console { @usableFromInline static let promise: JSString = "promise" @usableFromInline static let prompt: JSString = "prompt" @usableFromInline static let `protocol`: JSString = "protocol" - @usableFromInline static let pseudo: JSString = "pseudo" @usableFromInline static let pseudoElement: JSString = "pseudoElement" @usableFromInline static let publicId: JSString = "publicId" @usableFromInline static let pull: JSString = "pull" @@ -23302,7 +21047,6 @@ public enum console { @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" @usableFromInline static let readAsText: JSString = "readAsText" - @usableFromInline static let readBuffer: JSString = "readBuffer" @usableFromInline static let readOnly: JSString = "readOnly" @usableFromInline static let readPixels: JSString = "readPixels" @usableFromInline static let readable: JSString = "readable" @@ -23323,7 +21067,6 @@ public enum console { @usableFromInline static let relList: JSString = "relList" @usableFromInline static let relatedNode: JSString = "relatedNode" @usableFromInline static let relatedTarget: JSString = "relatedTarget" - @usableFromInline static let relativeTo: JSString = "relativeTo" @usableFromInline static let releaseEvents: JSString = "releaseEvents" @usableFromInline static let releaseLock: JSString = "releaseLock" @usableFromInline static let reload: JSString = "reload" @@ -23339,7 +21082,6 @@ public enum console { @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" @usableFromInline static let renderbufferStorage: JSString = "renderbufferStorage" - @usableFromInline static let renderbufferStorageMultisample: JSString = "renderbufferStorageMultisample" @usableFromInline static let `repeat`: JSString = "repeat" @usableFromInline static let repetitionCount: JSString = "repetitionCount" @usableFromInline static let replace: JSString = "replace" @@ -23357,11 +21099,9 @@ public enum console { @usableFromInline static let required: JSString = "required" @usableFromInline static let reset: JSString = "reset" @usableFromInline static let resetTransform: JSString = "resetTransform" - @usableFromInline static let resizeBy: JSString = "resizeBy" @usableFromInline static let resizeHeight: JSString = "resizeHeight" @usableFromInline static let resizeMode: JSString = "resizeMode" @usableFromInline static let resizeQuality: JSString = "resizeQuality" - @usableFromInline static let resizeTo: JSString = "resizeTo" @usableFromInline static let resizeWidth: JSString = "resizeWidth" @usableFromInline static let respond: JSString = "respond" @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" @@ -23375,7 +21115,6 @@ public enum console { @usableFromInline static let resultType: JSString = "resultType" @usableFromInline static let resultingClientId: JSString = "resultingClientId" @usableFromInline static let resume: JSString = "resume" - @usableFromInline static let resumeTransformFeedback: JSString = "resumeTransformFeedback" @usableFromInline static let returnValue: JSString = "returnValue" @usableFromInline static let rev: JSString = "rev" @usableFromInline static let reverse: JSString = "reverse" @@ -23398,8 +21137,6 @@ public enum console { @usableFromInline static let sampleCoverage: JSString = "sampleCoverage" @usableFromInline static let sampleRate: JSString = "sampleRate" @usableFromInline static let sampleSize: JSString = "sampleSize" - @usableFromInline static let samplerParameterf: JSString = "samplerParameterf" - @usableFromInline static let samplerParameteri: JSString = "samplerParameteri" @usableFromInline static let sandbox: JSString = "sandbox" @usableFromInline static let save: JSString = "save" @usableFromInline static let scalabilityMode: JSString = "scalabilityMode" @@ -23411,30 +21148,16 @@ public enum console { @usableFromInline static let scheme: JSString = "scheme" @usableFromInline static let scissor: JSString = "scissor" @usableFromInline static let scope: JSString = "scope" - @usableFromInline static let screen: JSString = "screen" - @usableFromInline static let screenLeft: JSString = "screenLeft" - @usableFromInline static let screenTop: JSString = "screenTop" @usableFromInline static let screenX: JSString = "screenX" @usableFromInline static let screenY: JSString = "screenY" @usableFromInline static let scriptURL: JSString = "scriptURL" @usableFromInline static let scripts: JSString = "scripts" - @usableFromInline static let scroll: JSString = "scroll" @usableFromInline static let scrollAmount: JSString = "scrollAmount" - @usableFromInline static let scrollBy: JSString = "scrollBy" @usableFromInline static let scrollDelay: JSString = "scrollDelay" - @usableFromInline static let scrollHeight: JSString = "scrollHeight" - @usableFromInline static let scrollIntoView: JSString = "scrollIntoView" - @usableFromInline static let scrollLeft: JSString = "scrollLeft" @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" - @usableFromInline static let scrollTo: JSString = "scrollTo" - @usableFromInline static let scrollTop: JSString = "scrollTop" - @usableFromInline static let scrollWidth: JSString = "scrollWidth" - @usableFromInline static let scrollX: JSString = "scrollX" - @usableFromInline static let scrollY: JSString = "scrollY" @usableFromInline static let scrollbars: JSString = "scrollbars" @usableFromInline static let scrolling: JSString = "scrolling" - @usableFromInline static let scrollingElement: JSString = "scrollingElement" @usableFromInline static let search: JSString = "search" @usableFromInline static let searchParams: JSString = "searchParams" @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" @@ -23576,13 +21299,9 @@ public enum console { @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" @usableFromInline static let texImage2D: JSString = "texImage2D" - @usableFromInline static let texImage3D: JSString = "texImage3D" @usableFromInline static let texParameterf: JSString = "texParameterf" @usableFromInline static let texParameteri: JSString = "texParameteri" - @usableFromInline static let texStorage2D: JSString = "texStorage2D" - @usableFromInline static let texStorage3D: JSString = "texStorage3D" @usableFromInline static let texSubImage2D: JSString = "texSubImage2D" - @usableFromInline static let texSubImage3D: JSString = "texSubImage3D" @usableFromInline static let text: JSString = "text" @usableFromInline static let textAlign: JSString = "textAlign" @usableFromInline static let textBaseline: JSString = "textBaseline" @@ -23601,7 +21320,6 @@ public enum console { @usableFromInline static let timeout: JSString = "timeout" @usableFromInline static let timestamp: JSString = "timestamp" @usableFromInline static let title: JSString = "title" - @usableFromInline static let toBox: JSString = "toBox" @usableFromInline static let toDataURL: JSString = "toDataURL" @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" @@ -23622,7 +21340,6 @@ public enum console { @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" @usableFromInline static let transform: JSString = "transform" - @usableFromInline static let transformFeedbackVaryings: JSString = "transformFeedbackVaryings" @usableFromInline static let transformPoint: JSString = "transformPoint" @usableFromInline static let transformToDocument: JSString = "transformToDocument" @usableFromInline static let transformToFragment: JSString = "transformToFragment" @@ -23636,36 +21353,21 @@ public enum console { @usableFromInline static let uniform1fv: JSString = "uniform1fv" @usableFromInline static let uniform1i: JSString = "uniform1i" @usableFromInline static let uniform1iv: JSString = "uniform1iv" - @usableFromInline static let uniform1ui: JSString = "uniform1ui" - @usableFromInline static let uniform1uiv: JSString = "uniform1uiv" @usableFromInline static let uniform2f: JSString = "uniform2f" @usableFromInline static let uniform2fv: JSString = "uniform2fv" @usableFromInline static let uniform2i: JSString = "uniform2i" @usableFromInline static let uniform2iv: JSString = "uniform2iv" - @usableFromInline static let uniform2ui: JSString = "uniform2ui" - @usableFromInline static let uniform2uiv: JSString = "uniform2uiv" @usableFromInline static let uniform3f: JSString = "uniform3f" @usableFromInline static let uniform3fv: JSString = "uniform3fv" @usableFromInline static let uniform3i: JSString = "uniform3i" @usableFromInline static let uniform3iv: JSString = "uniform3iv" - @usableFromInline static let uniform3ui: JSString = "uniform3ui" - @usableFromInline static let uniform3uiv: JSString = "uniform3uiv" @usableFromInline static let uniform4f: JSString = "uniform4f" @usableFromInline static let uniform4fv: JSString = "uniform4fv" @usableFromInline static let uniform4i: JSString = "uniform4i" @usableFromInline static let uniform4iv: JSString = "uniform4iv" - @usableFromInline static let uniform4ui: JSString = "uniform4ui" - @usableFromInline static let uniform4uiv: JSString = "uniform4uiv" - @usableFromInline static let uniformBlockBinding: JSString = "uniformBlockBinding" @usableFromInline static let uniformMatrix2fv: JSString = "uniformMatrix2fv" - @usableFromInline static let uniformMatrix2x3fv: JSString = "uniformMatrix2x3fv" - @usableFromInline static let uniformMatrix2x4fv: JSString = "uniformMatrix2x4fv" @usableFromInline static let uniformMatrix3fv: JSString = "uniformMatrix3fv" - @usableFromInline static let uniformMatrix3x2fv: JSString = "uniformMatrix3x2fv" - @usableFromInline static let uniformMatrix3x4fv: JSString = "uniformMatrix3x4fv" @usableFromInline static let uniformMatrix4fv: JSString = "uniformMatrix4fv" - @usableFromInline static let uniformMatrix4x2fv: JSString = "uniformMatrix4x2fv" - @usableFromInline static let uniformMatrix4x3fv: JSString = "uniformMatrix4x3fv" @usableFromInline static let unregister: JSString = "unregister" @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" @usableFromInline static let update: JSString = "update" @@ -23701,12 +21403,6 @@ public enum console { @usableFromInline static let vertexAttrib3fv: JSString = "vertexAttrib3fv" @usableFromInline static let vertexAttrib4f: JSString = "vertexAttrib4f" @usableFromInline static let vertexAttrib4fv: JSString = "vertexAttrib4fv" - @usableFromInline static let vertexAttribDivisor: JSString = "vertexAttribDivisor" - @usableFromInline static let vertexAttribI4i: JSString = "vertexAttribI4i" - @usableFromInline static let vertexAttribI4iv: JSString = "vertexAttribI4iv" - @usableFromInline static let vertexAttribI4ui: JSString = "vertexAttribI4ui" - @usableFromInline static let vertexAttribI4uiv: JSString = "vertexAttribI4uiv" - @usableFromInline static let vertexAttribIPointer: JSString = "vertexAttribIPointer" @usableFromInline static let vertexAttribPointer: JSString = "vertexAttribPointer" @usableFromInline static let video: JSString = "video" @usableFromInline static let videoBitsPerSecond: JSString = "videoBitsPerSecond" @@ -23722,7 +21418,6 @@ public enum console { @usableFromInline static let volume: JSString = "volume" @usableFromInline static let vspace: JSString = "vspace" @usableFromInline static let w: JSString = "w" - @usableFromInline static let waitSync: JSString = "waitSync" @usableFromInline static let waiting: JSString = "waiting" @usableFromInline static let warn: JSString = "warn" @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" @@ -23942,48 +21637,6 @@ public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaT } } -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 - } - } -} - public protocol Any_BufferSource: ConvertibleToJSValue {} extension ArrayBuffer: Any_BufferSource {} extension ArrayBufferView: Any_BufferSource {} @@ -24026,48 +21679,6 @@ public enum BufferSource: JSValueCompatible, Any_BufferSource { } } -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 - } - } -} - public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} @@ -25048,76 +22659,6 @@ public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { } } -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 - } - } -} - public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} @@ -26028,48 +23569,6 @@ public enum TimerHandler: JSValueCompatible, Any_TimerHandler { } } -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 - } - } -} - public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} extension Blob: Any_XMLHttpRequestBodyInit {} extension BufferSource: Any_XMLHttpRequestBodyInit {} 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 6311cac9..925e3c1d 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 168b2456b049cd9c1f68a7491d06ef54da39842f Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:10:01 +0100 Subject: [PATCH 18/21] Regenerate with older JSKit --- Sources/DOMKit/Generated.swift | 2530 ++++++++++++++++- 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 - 141 files changed, 2515 insertions(+), 7612 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/Generated.swift b/Sources/DOMKit/Generated.swift index a109f8c2..9a33d3b2 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -1410,6 +1410,27 @@ public extension Body { } } +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 +} + public class BroadcastChannel: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.BroadcastChannel].function! } @@ -1474,6 +1495,51 @@ public class CDATASection: Text { } } +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 } +} + +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()! + } +} + public class Cache: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Cache].function! } @@ -2515,6 +2581,29 @@ public extension CanvasUserInterface { } } +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()! + } +} + public class CharacterData: Node, NonDocumentTypeChildNode, ChildNode { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.CharacterData].function! } @@ -2850,6 +2939,27 @@ public class ConstrainULongRange: BridgedDictionary { public var ideal: UInt32 } +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 +} + public class CountQueuingStrategy: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.CountQueuingStrategy].function! } @@ -4269,7 +4379,7 @@ public class DevicePermissionDescriptor: BridgedDictionary { public var deviceId: String } -public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers { +public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers, GeometryUtils { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Document].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4315,6 +4425,7 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN _applets = ReadonlyAttribute(jsObject: jsObject, name: Strings.applets) _all = ReadonlyAttribute(jsObject: jsObject, name: Strings.all) _timeline = ReadonlyAttribute(jsObject: jsObject, name: Strings.timeline) + _scrollingElement = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollingElement) super.init(unsafelyWrapping: jsObject) } @@ -4615,6 +4726,24 @@ public class Document: Node, NonElementParentNode, DocumentOrShadowRoot, ParentN @ReadonlyAttribute public var timeline: DocumentTimeline + + @inlinable public func elementFromPoint(x: Double, y: Double) -> Element? { + let this = jsObject + return this[Strings.elementFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable public func elementsFromPoint(x: Double, y: Double) -> [Element] { + let this = jsObject + return this[Strings.elementsFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @inlinable public func caretPositionFromPoint(x: Double, y: Double) -> CaretPosition? { + let this = jsObject + return this[Strings.caretPositionFromPoint].function!(this: this, arguments: [x.jsValue, y.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var scrollingElement: Element? } public protocol DocumentAndElementEventHandlers: JSBridgedClass {} @@ -4841,7 +4970,7 @@ public class EffectTiming: BridgedDictionary { public var easing: String } -public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable { +public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slottable, ARIAMixin, Animatable, GeometryUtils { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Element].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -4855,6 +4984,14 @@ public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slo _slot = ReadWriteAttribute(jsObject: jsObject, name: Strings.slot) _attributes = ReadonlyAttribute(jsObject: jsObject, name: Strings.attributes) _shadowRoot = ReadonlyAttribute(jsObject: jsObject, name: Strings.shadowRoot) + _scrollTop = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollTop) + _scrollLeft = ReadWriteAttribute(jsObject: jsObject, name: Strings.scrollLeft) + _scrollWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollWidth) + _scrollHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollHeight) + _clientTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientTop) + _clientLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientLeft) + _clientWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientWidth) + _clientHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientHeight) super.init(unsafelyWrapping: jsObject) } @@ -5012,6 +5149,85 @@ public class Element: Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slo let this = jsObject _ = this[Strings.insertAdjacentText].function!(this: this, arguments: [`where`.jsValue, data.jsValue]) } + + @inlinable public func pseudo(type: String) -> CSSPseudoElement? { + let this = jsObject + return this[Strings.pseudo].function!(this: this, arguments: [type.jsValue]).fromJSValue()! + } + + @inlinable public func getClientRects() -> DOMRectList { + let this = jsObject + return this[Strings.getClientRects].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getBoundingClientRect() -> DOMRect { + let this = jsObject + return this[Strings.getBoundingClientRect].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func isVisible(options: IsVisibleOptions? = nil) -> Bool { + let this = jsObject + return this[Strings.isVisible].function!(this: this, arguments: [options?.jsValue ?? .undefined]).fromJSValue()! + } + + @inlinable public func scrollIntoView(arg: Bool_or_ScrollIntoViewOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollIntoView].function!(this: this, arguments: [arg?.jsValue ?? .undefined]) + } + + @inlinable public func scroll(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scroll(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollTo(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollBy(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollBy(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @ReadWriteAttribute + public var scrollTop: Double + + @ReadWriteAttribute + public var scrollLeft: Double + + @ReadonlyAttribute + public var scrollWidth: Int32 + + @ReadonlyAttribute + public var scrollHeight: Int32 + + @ReadonlyAttribute + public var clientTop: Int32 + + @ReadonlyAttribute + public var clientLeft: Int32 + + @ReadonlyAttribute + public var clientWidth: Int32 + + @ReadonlyAttribute + public var clientHeight: Int32 } public protocol ElementContentEditable: JSBridgedClass {} @@ -6117,6 +6333,29 @@ public extension GenericTransformStream { @inlinable var writable: WritableStream { ReadonlyAttribute[Strings.writable, in: jsObject] } } +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()! + } +} + public class GetAnimationsOptions: BridgedDictionary { public convenience init(subtree: Bool) { let object = JSObject.global[Strings.Object].function!.new() @@ -7013,6 +7252,11 @@ public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventH _autocapitalize = ReadWriteAttribute(jsObject: jsObject, name: Strings.autocapitalize) _innerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.innerText) _outerText = ReadWriteAttribute(jsObject: jsObject, name: Strings.outerText) + _offsetParent = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetParent) + _offsetTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetTop) + _offsetLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetLeft) + _offsetWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetWidth) + _offsetHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetHeight) super.init(unsafelyWrapping: jsObject) } @@ -7068,6 +7312,21 @@ public class HTMLElement: Element, GlobalEventHandlers, DocumentAndElementEventH let this = jsObject return this[Strings.attachInternals].function!(this: this, arguments: []).fromJSValue()! } + + @ReadonlyAttribute + public var offsetParent: Element? + + @ReadonlyAttribute + public var offsetTop: Int32 + + @ReadonlyAttribute + public var offsetLeft: Int32 + + @ReadonlyAttribute + public var offsetWidth: Int32 + + @ReadonlyAttribute + public var offsetHeight: Int32 } public class HTMLEmbedElement: HTMLElement { @@ -7622,6 +7881,8 @@ public class HTMLImageElement: HTMLElement { _vspace = ReadWriteAttribute(jsObject: jsObject, name: Strings.vspace) _longDesc = ReadWriteAttribute(jsObject: jsObject, name: Strings.longDesc) _border = ReadWriteAttribute(jsObject: jsObject, name: Strings.border) + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) super.init(unsafelyWrapping: jsObject) } @@ -7709,6 +7970,12 @@ public class HTMLImageElement: HTMLElement { @ReadWriteAttribute public var border: String + + @ReadonlyAttribute + public var x: Int32 + + @ReadonlyAttribute + public var y: Int32 } public class HTMLInputElement: HTMLElement { @@ -10493,6 +10760,18 @@ public class InputEventInit: BridgedDictionary { public var inputType: String } +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) + } +} + public class KeyboardEvent: UIEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.KeyboardEvent].function! } @@ -10903,6 +11182,71 @@ public class MediaError: JSBridgedClass { public var message: String } +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 +} + +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 +} + +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 +} + public class MediaRecorder: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.MediaRecorder].function! } @@ -11846,6 +12190,12 @@ public class MouseEvent: UIEvent { _button = ReadonlyAttribute(jsObject: jsObject, name: Strings.button) _buttons = ReadonlyAttribute(jsObject: jsObject, name: Strings.buttons) _relatedTarget = ReadonlyAttribute(jsObject: jsObject, name: Strings.relatedTarget) + _pageX = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageX) + _pageY = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageY) + _x = ReadonlyAttribute(jsObject: jsObject, name: Strings.x) + _y = ReadonlyAttribute(jsObject: jsObject, name: Strings.y) + _offsetX = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetX) + _offsetY = ReadonlyAttribute(jsObject: jsObject, name: Strings.offsetY) super.init(unsafelyWrapping: jsObject) } @@ -11910,6 +12260,24 @@ public class MouseEvent: UIEvent { let this = jsObject _ = this[Strings.initMouseEvent].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14]) } + + @ReadonlyAttribute + public var pageX: Double + + @ReadonlyAttribute + public var pageY: Double + + @ReadonlyAttribute + public var x: Double + + @ReadonlyAttribute + public var y: Double + + @ReadonlyAttribute + public var offsetX: Double + + @ReadonlyAttribute + public var offsetY: Double } public class MouseEventInit: BridgedDictionary { @@ -13334,6 +13702,16 @@ public class Range: AbstractRange { @inlinable public var description: String { jsObject[Strings.toString]!().fromJSValue()! } + + @inlinable public func getClientRects() -> DOMRectList { + let this = jsObject + return this[Strings.getClientRects].function!(this: this, arguments: []).fromJSValue()! + } + + @inlinable public func getBoundingClientRect() -> DOMRect { + let this = jsObject + return this[Strings.getBoundingClientRect].function!(this: this, arguments: []).fromJSValue()! + } } public class ReadableByteStreamController: JSBridgedClass { @@ -14159,15 +14537,124 @@ public enum ResponseType: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } -public enum ScrollRestoration: JSString, JSValueCompatible { - case auto = "auto" - case manual = "manual" +public class Screen: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.Screen].function! } - @inlinable public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + 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 +} + +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 } +} + +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 +} + +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 } +} + +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 +} + +public enum ScrollRestoration: JSString, JSValueCompatible { + case auto = "auto" + case manual = "manual" + + @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) { @@ -14177,6 +14664,27 @@ public enum ScrollRestoration: JSString, JSValueCompatible { @inlinable public var jsValue: JSValue { rawValue.jsValue } } +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 +} + public enum SelectionMode: JSString, JSValueCompatible { case select = "select" case start = "start" @@ -14759,7 +15267,7 @@ public class SvcOutputMetadata: BridgedDictionary { public var temporalLayerId: UInt32 } -public class Text: CharacterData, Slottable { +public class Text: CharacterData, Slottable, GeometryUtils { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.Text].function! } public required init(unsafelyWrapping jsObject: JSObject) { @@ -15272,6 +15780,9 @@ public typealias GLuint = UInt32 public typealias GLfloat = Float public typealias GLclampf = Float +public typealias GLint64 = Int64 +public typealias GLuint64 = UInt64 + public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void @@ -16510,11 +17021,1492 @@ public enum VideoTransferCharacteristics: JSString, JSValueCompatible { return nil } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +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 + } +} + +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]) + } +} + +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]) } - - @inlinable public var jsValue: JSValue { rawValue.jsValue } } public class WebGLActiveInfo: JSBridgedClass { @@ -16680,6 +18672,14 @@ public class WebGLProgram: WebGLObject { } } +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) + } +} + public class WebGLRenderbuffer: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } @@ -18072,6 +20072,14 @@ public extension WebGLRenderingContextOverloads { } } +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) + } +} + public class WebGLShader: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } @@ -18102,6 +20110,14 @@ public class WebGLShaderPrecisionFormat: JSBridgedClass { public var precision: GLint } +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) + } +} + public class WebGLTexture: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } @@ -18110,6 +20126,14 @@ public class WebGLTexture: WebGLObject { } } +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) + } +} + public class WebGLUniformLocation: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } @@ -18120,6 +20144,14 @@ public class WebGLUniformLocation: JSBridgedClass { } } +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) + } +} + public class WheelEvent: MouseEvent { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WheelEvent].function! } @@ -18215,6 +20247,20 @@ public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, Wind _clientInformation = ReadonlyAttribute(jsObject: jsObject, name: Strings.clientInformation) _originAgentCluster = ReadonlyAttribute(jsObject: jsObject, name: Strings.originAgentCluster) _external = ReadonlyAttribute(jsObject: jsObject, name: Strings.external) + _screen = ReadonlyAttribute(jsObject: jsObject, name: Strings.screen) + _innerWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.innerWidth) + _innerHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.innerHeight) + _scrollX = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollX) + _pageXOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageXOffset) + _scrollY = ReadonlyAttribute(jsObject: jsObject, name: Strings.scrollY) + _pageYOffset = ReadonlyAttribute(jsObject: jsObject, name: Strings.pageYOffset) + _screenX = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenX) + _screenLeft = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenLeft) + _screenY = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenY) + _screenTop = ReadonlyAttribute(jsObject: jsObject, name: Strings.screenTop) + _outerWidth = ReadonlyAttribute(jsObject: jsObject, name: Strings.outerWidth) + _outerHeight = ReadonlyAttribute(jsObject: jsObject, name: Strings.outerHeight) + _devicePixelRatio = ReadonlyAttribute(jsObject: jsObject, name: Strings.devicePixelRatio) super.init(unsafelyWrapping: jsObject) } @@ -18369,6 +20415,103 @@ public class Window: EventTarget, GlobalEventHandlers, WindowEventHandlers, Wind @ReadonlyAttribute public var external: External + + @inlinable public func matchMedia(query: String) -> MediaQueryList { + let this = jsObject + return this[Strings.matchMedia].function!(this: this, arguments: [query.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var screen: Screen + + @inlinable public func moveTo(x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.moveTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func moveBy(x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.moveBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func resizeTo(width: Int32, height: Int32) { + let this = jsObject + _ = this[Strings.resizeTo].function!(this: this, arguments: [width.jsValue, height.jsValue]) + } + + @inlinable public func resizeBy(x: Int32, y: Int32) { + let this = jsObject + _ = this[Strings.resizeBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var innerWidth: Int32 + + @ReadonlyAttribute + public var innerHeight: Int32 + + @ReadonlyAttribute + public var scrollX: Double + + @ReadonlyAttribute + public var pageXOffset: Double + + @ReadonlyAttribute + public var scrollY: Double + + @ReadonlyAttribute + public var pageYOffset: Double + + @inlinable public func scroll(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scroll(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scroll].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollTo(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollTo(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollTo].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @inlinable public func scrollBy(options: ScrollToOptions? = nil) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [options?.jsValue ?? .undefined]) + } + + @inlinable public func scrollBy(x: Double, y: Double) { + let this = jsObject + _ = this[Strings.scrollBy].function!(this: this, arguments: [x.jsValue, y.jsValue]) + } + + @ReadonlyAttribute + public var screenX: Int32 + + @ReadonlyAttribute + public var screenLeft: Int32 + + @ReadonlyAttribute + public var screenY: Int32 + + @ReadonlyAttribute + public var screenTop: Int32 + + @ReadonlyAttribute + public var outerWidth: Int32 + + @ReadonlyAttribute + public var outerHeight: Int32 + + @ReadonlyAttribute + public var devicePixelRatio: Double } public protocol WindowEventHandlers: JSBridgedClass {} @@ -19751,12 +21894,14 @@ public enum console { @usableFromInline static let BroadcastChannel: JSString = "BroadcastChannel" @usableFromInline static let ByteLengthQueuingStrategy: JSString = "ByteLengthQueuingStrategy" @usableFromInline static let CDATASection: JSString = "CDATASection" + @usableFromInline static let CSSPseudoElement: JSString = "CSSPseudoElement" @usableFromInline static let Cache: JSString = "Cache" @usableFromInline static let CacheStorage: JSString = "CacheStorage" @usableFromInline static let CanvasFilter: JSString = "CanvasFilter" @usableFromInline static let CanvasGradient: JSString = "CanvasGradient" @usableFromInline static let CanvasPattern: JSString = "CanvasPattern" @usableFromInline static let CanvasRenderingContext2D: JSString = "CanvasRenderingContext2D" + @usableFromInline static let CaretPosition: JSString = "CaretPosition" @usableFromInline static let CharacterData: JSString = "CharacterData" @usableFromInline static let Comment: JSString = "Comment" @usableFromInline static let CompositionEvent: JSString = "CompositionEvent" @@ -19893,6 +22038,8 @@ public enum console { @usableFromInline static let MediaDeviceInfo: JSString = "MediaDeviceInfo" @usableFromInline static let MediaDevices: JSString = "MediaDevices" @usableFromInline static let MediaError: JSString = "MediaError" + @usableFromInline static let MediaQueryList: JSString = "MediaQueryList" + @usableFromInline static let MediaQueryListEvent: JSString = "MediaQueryListEvent" @usableFromInline static let MediaRecorder: JSString = "MediaRecorder" @usableFromInline static let MediaRecorderErrorEvent: JSString = "MediaRecorderErrorEvent" @usableFromInline static let MediaStream: JSString = "MediaStream" @@ -19936,6 +22083,7 @@ public enum console { @usableFromInline static let ReadableStreamDefaultReader: JSString = "ReadableStreamDefaultReader" @usableFromInline static let Request: JSString = "Request" @usableFromInline static let Response: JSString = "Response" + @usableFromInline static let Screen: JSString = "Screen" @usableFromInline static let ServiceWorker: JSString = "ServiceWorker" @usableFromInline static let ServiceWorkerContainer: JSString = "ServiceWorkerContainer" @usableFromInline static let ServiceWorkerRegistration: JSString = "ServiceWorkerRegistration" @@ -19966,18 +22114,24 @@ public enum console { @usableFromInline static let VideoFrame: JSString = "VideoFrame" @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" + @usableFromInline static let WebGL2RenderingContext: JSString = "WebGL2RenderingContext" @usableFromInline static let WebGLActiveInfo: JSString = "WebGLActiveInfo" @usableFromInline static let WebGLBuffer: JSString = "WebGLBuffer" @usableFromInline static let WebGLContextEvent: JSString = "WebGLContextEvent" @usableFromInline static let WebGLFramebuffer: JSString = "WebGLFramebuffer" @usableFromInline static let WebGLObject: JSString = "WebGLObject" @usableFromInline static let WebGLProgram: JSString = "WebGLProgram" + @usableFromInline static let WebGLQuery: JSString = "WebGLQuery" @usableFromInline static let WebGLRenderbuffer: JSString = "WebGLRenderbuffer" @usableFromInline static let WebGLRenderingContext: JSString = "WebGLRenderingContext" + @usableFromInline static let WebGLSampler: JSString = "WebGLSampler" @usableFromInline static let WebGLShader: JSString = "WebGLShader" @usableFromInline static let WebGLShaderPrecisionFormat: JSString = "WebGLShaderPrecisionFormat" + @usableFromInline static let WebGLSync: JSString = "WebGLSync" @usableFromInline static let WebGLTexture: JSString = "WebGLTexture" + @usableFromInline static let WebGLTransformFeedback: JSString = "WebGLTransformFeedback" @usableFromInline static let WebGLUniformLocation: JSString = "WebGLUniformLocation" + @usableFromInline static let WebGLVertexArrayObject: JSString = "WebGLVertexArrayObject" @usableFromInline static let WheelEvent: JSString = "WheelEvent" @usableFromInline static let Window: JSString = "Window" @usableFromInline static let Worker: JSString = "Worker" @@ -20122,6 +22276,8 @@ public enum console { @usableFromInline static let autocomplete: JSString = "autocomplete" @usableFromInline static let autofocus: JSString = "autofocus" @usableFromInline static let autoplay: JSString = "autoplay" + @usableFromInline static let availHeight: JSString = "availHeight" + @usableFromInline static let availWidth: JSString = "availWidth" @usableFromInline static let axis: JSString = "axis" @usableFromInline static let b: JSString = "b" @usableFromInline static let back: JSString = "back" @@ -20130,14 +22286,21 @@ public enum console { @usableFromInline static let baseURI: JSString = "baseURI" @usableFromInline static let before: JSString = "before" @usableFromInline static let beginPath: JSString = "beginPath" + @usableFromInline static let beginQuery: JSString = "beginQuery" + @usableFromInline static let beginTransformFeedback: JSString = "beginTransformFeedback" @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" @usableFromInline static let bindAttribLocation: JSString = "bindAttribLocation" @usableFromInline static let bindBuffer: JSString = "bindBuffer" + @usableFromInline static let bindBufferBase: JSString = "bindBufferBase" + @usableFromInline static let bindBufferRange: JSString = "bindBufferRange" @usableFromInline static let bindFramebuffer: JSString = "bindFramebuffer" @usableFromInline static let bindRenderbuffer: JSString = "bindRenderbuffer" + @usableFromInline static let bindSampler: JSString = "bindSampler" @usableFromInline static let bindTexture: JSString = "bindTexture" + @usableFromInline static let bindTransformFeedback: JSString = "bindTransformFeedback" + @usableFromInline static let bindVertexArray: JSString = "bindVertexArray" @usableFromInline static let bitrate: JSString = "bitrate" @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" @@ -20146,7 +22309,9 @@ public enum console { @usableFromInline static let blendEquationSeparate: JSString = "blendEquationSeparate" @usableFromInline static let blendFunc: JSString = "blendFunc" @usableFromInline static let blendFuncSeparate: JSString = "blendFuncSeparate" + @usableFromInline static let blitFramebuffer: JSString = "blitFramebuffer" @usableFromInline static let blob: JSString = "blob" + @usableFromInline static let block: JSString = "block" @usableFromInline static let blocking: JSString = "blocking" @usableFromInline static let blur: JSString = "blur" @usableFromInline static let body: JSString = "body" @@ -20154,6 +22319,7 @@ public enum console { @usableFromInline static let booleanValue: JSString = "booleanValue" @usableFromInline static let border: JSString = "border" @usableFromInline static let bottom: JSString = "bottom" + @usableFromInline static let box: JSString = "box" @usableFromInline static let btoa: JSString = "btoa" @usableFromInline static let bubbles: JSString = "bubbles" @usableFromInline static let bufferData: JSString = "bufferData" @@ -20176,6 +22342,7 @@ public enum console { @usableFromInline static let caption: JSString = "caption" @usableFromInline static let capture: JSString = "capture" @usableFromInline static let captureEvents: JSString = "captureEvents" + @usableFromInline static let caretPositionFromPoint: JSString = "caretPositionFromPoint" @usableFromInline static let cellIndex: JSString = "cellIndex" @usableFromInline static let cellPadding: JSString = "cellPadding" @usableFromInline static let cellSpacing: JSString = "cellSpacing" @@ -20199,6 +22366,10 @@ public enum console { @usableFromInline static let classList: JSString = "classList" @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearBufferfi: JSString = "clearBufferfi" + @usableFromInline static let clearBufferfv: JSString = "clearBufferfv" + @usableFromInline static let clearBufferiv: JSString = "clearBufferiv" + @usableFromInline static let clearBufferuiv: JSString = "clearBufferuiv" @usableFromInline static let clearColor: JSString = "clearColor" @usableFromInline static let clearData: JSString = "clearData" @usableFromInline static let clearDepth: JSString = "clearDepth" @@ -20208,8 +22379,13 @@ public enum console { @usableFromInline static let clearStencil: JSString = "clearStencil" @usableFromInline static let clearTimeout: JSString = "clearTimeout" @usableFromInline static let click: JSString = "click" + @usableFromInline static let clientHeight: JSString = "clientHeight" @usableFromInline static let clientId: JSString = "clientId" @usableFromInline static let clientInformation: JSString = "clientInformation" + @usableFromInline static let clientLeft: JSString = "clientLeft" + @usableFromInline static let clientTop: JSString = "clientTop" + @usableFromInline static let clientWaitSync: JSString = "clientWaitSync" + @usableFromInline static let clientWidth: JSString = "clientWidth" @usableFromInline static let clientX: JSString = "clientX" @usableFromInline static let clientY: JSString = "clientY" @usableFromInline static let clip: JSString = "clip" @@ -20233,6 +22409,7 @@ public enum console { @usableFromInline static let collapsed: JSString = "collapsed" @usableFromInline static let colno: JSString = "colno" @usableFromInline static let color: JSString = "color" + @usableFromInline static let colorDepth: JSString = "colorDepth" @usableFromInline static let colorMask: JSString = "colorMask" @usableFromInline static let colorSpace: JSString = "colorSpace" @usableFromInline static let colorSpaceConversion: JSString = "colorSpaceConversion" @@ -20253,7 +22430,9 @@ public enum console { @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" @usableFromInline static let compressedTexImage2D: JSString = "compressedTexImage2D" + @usableFromInline static let compressedTexImage3D: JSString = "compressedTexImage3D" @usableFromInline static let compressedTexSubImage2D: JSString = "compressedTexSubImage2D" + @usableFromInline static let compressedTexSubImage3D: JSString = "compressedTexSubImage3D" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let config: JSString = "config" @usableFromInline static let configure: JSString = "configure" @@ -20269,12 +22448,17 @@ public enum console { @usableFromInline static let control: JSString = "control" @usableFromInline static let controller: JSString = "controller" @usableFromInline static let controls: JSString = "controls" + @usableFromInline static let convertPointFromNode: JSString = "convertPointFromNode" + @usableFromInline static let convertQuadFromNode: JSString = "convertQuadFromNode" + @usableFromInline static let convertRectFromNode: JSString = "convertRectFromNode" @usableFromInline static let convertToBlob: JSString = "convertToBlob" @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let copyBufferSubData: JSString = "copyBufferSubData" @usableFromInline static let copyTexImage2D: JSString = "copyTexImage2D" @usableFromInline static let copyTexSubImage2D: JSString = "copyTexSubImage2D" + @usableFromInline static let copyTexSubImage3D: JSString = "copyTexSubImage3D" @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let count: JSString = "count" @usableFromInline static let countReset: JSString = "countReset" @@ -20300,15 +22484,19 @@ public enum console { @usableFromInline static let createPattern: JSString = "createPattern" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" @usableFromInline static let createProgram: JSString = "createProgram" + @usableFromInline static let createQuery: JSString = "createQuery" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @usableFromInline static let createRange: JSString = "createRange" @usableFromInline static let createRenderbuffer: JSString = "createRenderbuffer" + @usableFromInline static let createSampler: JSString = "createSampler" @usableFromInline static let createShader: JSString = "createShader" @usableFromInline static let createTBody: JSString = "createTBody" @usableFromInline static let createTFoot: JSString = "createTFoot" @usableFromInline static let createTHead: JSString = "createTHead" @usableFromInline static let createTextNode: JSString = "createTextNode" @usableFromInline static let createTexture: JSString = "createTexture" + @usableFromInline static let createTransformFeedback: JSString = "createTransformFeedback" + @usableFromInline static let createVertexArray: JSString = "createVertexArray" @usableFromInline static let credentials: JSString = "credentials" @usableFromInline static let crossOrigin: JSString = "crossOrigin" @usableFromInline static let crossOriginIsolated: JSString = "crossOriginIsolated" @@ -20354,12 +22542,17 @@ public enum console { @usableFromInline static let deleteData: JSString = "deleteData" @usableFromInline static let deleteFramebuffer: JSString = "deleteFramebuffer" @usableFromInline static let deleteProgram: JSString = "deleteProgram" + @usableFromInline static let deleteQuery: JSString = "deleteQuery" @usableFromInline static let deleteRenderbuffer: JSString = "deleteRenderbuffer" @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteSampler: JSString = "deleteSampler" @usableFromInline static let deleteShader: JSString = "deleteShader" + @usableFromInline static let deleteSync: JSString = "deleteSync" @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" @usableFromInline static let deleteTHead: JSString = "deleteTHead" @usableFromInline static let deleteTexture: JSString = "deleteTexture" + @usableFromInline static let deleteTransformFeedback: JSString = "deleteTransformFeedback" + @usableFromInline static let deleteVertexArray: JSString = "deleteVertexArray" @usableFromInline static let deltaMode: JSString = "deltaMode" @usableFromInline static let deltaX: JSString = "deltaX" @usableFromInline static let deltaY: JSString = "deltaY" @@ -20379,6 +22572,7 @@ public enum console { @usableFromInline static let detachShader: JSString = "detachShader" @usableFromInline static let detail: JSString = "detail" @usableFromInline static let deviceId: JSString = "deviceId" + @usableFromInline static let devicePixelRatio: JSString = "devicePixelRatio" @usableFromInline static let dir: JSString = "dir" @usableFromInline static let dirName: JSString = "dirName" @usableFromInline static let direction: JSString = "direction" @@ -20401,9 +22595,13 @@ public enum console { @usableFromInline static let download: JSString = "download" @usableFromInline static let draggable: JSString = "draggable" @usableFromInline static let drawArrays: JSString = "drawArrays" + @usableFromInline static let drawArraysInstanced: JSString = "drawArraysInstanced" + @usableFromInline static let drawBuffers: JSString = "drawBuffers" @usableFromInline static let drawElements: JSString = "drawElements" + @usableFromInline static let drawElementsInstanced: JSString = "drawElementsInstanced" @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let drawRangeElements: JSString = "drawRangeElements" @usableFromInline static let drawingBufferHeight: JSString = "drawingBufferHeight" @usableFromInline static let drawingBufferWidth: JSString = "drawingBufferWidth" @usableFromInline static let dropEffect: JSString = "dropEffect" @@ -20413,7 +22611,10 @@ public enum console { @usableFromInline static let echoCancellation: JSString = "echoCancellation" @usableFromInline static let effect: JSString = "effect" @usableFromInline static let effectAllowed: JSString = "effectAllowed" + @usableFromInline static let element: JSString = "element" + @usableFromInline static let elementFromPoint: JSString = "elementFromPoint" @usableFromInline static let elements: JSString = "elements" + @usableFromInline static let elementsFromPoint: JSString = "elementsFromPoint" @usableFromInline static let ellipse: JSString = "ellipse" @usableFromInline static let emHeightAscent: JSString = "emHeightAscent" @usableFromInline static let emHeightDescent: JSString = "emHeightDescent" @@ -20430,7 +22631,9 @@ public enum console { @usableFromInline static let endContainer: JSString = "endContainer" @usableFromInline static let endDelay: JSString = "endDelay" @usableFromInline static let endOffset: JSString = "endOffset" + @usableFromInline static let endQuery: JSString = "endQuery" @usableFromInline static let endTime: JSString = "endTime" + @usableFromInline static let endTransformFeedback: JSString = "endTransformFeedback" @usableFromInline static let ended: JSString = "ended" @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @@ -20450,6 +22653,7 @@ public enum console { @usableFromInline static let facingMode: JSString = "facingMode" @usableFromInline static let failIfMajorPerformanceCaveat: JSString = "failIfMajorPerformanceCaveat" @usableFromInline static let fastSeek: JSString = "fastSeek" + @usableFromInline static let fenceSync: JSString = "fenceSync" @usableFromInline static let fetch: JSString = "fetch" @usableFromInline static let fgColor: JSString = "fgColor" @usableFromInline static let filename: JSString = "filename" @@ -20493,8 +22697,10 @@ public enum console { @usableFromInline static let frameRate: JSString = "frameRate" @usableFromInline static let framebufferRenderbuffer: JSString = "framebufferRenderbuffer" @usableFromInline static let framebufferTexture2D: JSString = "framebufferTexture2D" + @usableFromInline static let framebufferTextureLayer: JSString = "framebufferTextureLayer" @usableFromInline static let framerate: JSString = "framerate" @usableFromInline static let frames: JSString = "frames" + @usableFromInline static let fromBox: JSString = "fromBox" @usableFromInline static let fromFloat32Array: JSString = "fromFloat32Array" @usableFromInline static let fromFloat64Array: JSString = "fromFloat64Array" @usableFromInline static let fromMatrix: JSString = "fromMatrix" @@ -20507,6 +22713,9 @@ public enum console { @usableFromInline static let get: JSString = "get" @usableFromInline static let getActiveAttrib: JSString = "getActiveAttrib" @usableFromInline static let getActiveUniform: JSString = "getActiveUniform" + @usableFromInline static let getActiveUniformBlockName: JSString = "getActiveUniformBlockName" + @usableFromInline static let getActiveUniformBlockParameter: JSString = "getActiveUniformBlockParameter" + @usableFromInline static let getActiveUniforms: JSString = "getActiveUniforms" @usableFromInline static let getAll: JSString = "getAll" @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" @usableFromInline static let getAnimations: JSString = "getAnimations" @@ -20519,9 +22728,14 @@ public enum console { @usableFromInline static let getAttributeNode: JSString = "getAttributeNode" @usableFromInline static let getAttributeNodeNS: JSString = "getAttributeNodeNS" @usableFromInline static let getAudioTracks: JSString = "getAudioTracks" + @usableFromInline static let getBoundingClientRect: JSString = "getBoundingClientRect" @usableFromInline static let getBounds: JSString = "getBounds" + @usableFromInline static let getBoxQuads: JSString = "getBoxQuads" @usableFromInline static let getBufferParameter: JSString = "getBufferParameter" + @usableFromInline static let getBufferSubData: JSString = "getBufferSubData" @usableFromInline static let getCapabilities: JSString = "getCapabilities" + @usableFromInline static let getClientRect: JSString = "getClientRect" + @usableFromInline static let getClientRects: JSString = "getClientRects" @usableFromInline static let getComputedTiming: JSString = "getComputedTiming" @usableFromInline static let getConstraints: JSString = "getConstraints" @usableFromInline static let getContext: JSString = "getContext" @@ -20535,8 +22749,11 @@ public enum console { @usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS" @usableFromInline static let getError: JSString = "getError" @usableFromInline static let getExtension: JSString = "getExtension" + @usableFromInline static let getFragDataLocation: JSString = "getFragDataLocation" @usableFromInline static let getFramebufferAttachmentParameter: JSString = "getFramebufferAttachmentParameter" @usableFromInline static let getImageData: JSString = "getImageData" + @usableFromInline static let getIndexedParameter: JSString = "getIndexedParameter" + @usableFromInline static let getInternalformatParameter: JSString = "getInternalformatParameter" @usableFromInline static let getKeyframes: JSString = "getKeyframes" @usableFromInline static let getLineDash: JSString = "getLineDash" @usableFromInline static let getModifierState: JSString = "getModifierState" @@ -20544,6 +22761,8 @@ public enum console { @usableFromInline static let getParameter: JSString = "getParameter" @usableFromInline static let getProgramInfoLog: JSString = "getProgramInfoLog" @usableFromInline static let getProgramParameter: JSString = "getProgramParameter" + @usableFromInline static let getQuery: JSString = "getQuery" + @usableFromInline static let getQueryParameter: JSString = "getQueryParameter" @usableFromInline static let getReader: JSString = "getReader" @usableFromInline static let getRegistration: JSString = "getRegistration" @usableFromInline static let getRegistrations: JSString = "getRegistrations" @@ -20551,6 +22770,7 @@ public enum console { @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" @usableFromInline static let getRootNode: JSString = "getRootNode" @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getSamplerParameter: JSString = "getSamplerParameter" @usableFromInline static let getSettings: JSString = "getSettings" @usableFromInline static let getShaderInfoLog: JSString = "getShaderInfoLog" @usableFromInline static let getShaderParameter: JSString = "getShaderParameter" @@ -20560,12 +22780,16 @@ public enum console { @usableFromInline static let getState: JSString = "getState" @usableFromInline static let getSupportedConstraints: JSString = "getSupportedConstraints" @usableFromInline static let getSupportedExtensions: JSString = "getSupportedExtensions" + @usableFromInline static let getSyncParameter: JSString = "getSyncParameter" @usableFromInline static let getTexParameter: JSString = "getTexParameter" @usableFromInline static let getTiming: JSString = "getTiming" @usableFromInline static let getTrackById: JSString = "getTrackById" @usableFromInline static let getTracks: JSString = "getTracks" @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getTransformFeedbackVarying: JSString = "getTransformFeedbackVarying" @usableFromInline static let getUniform: JSString = "getUniform" + @usableFromInline static let getUniformBlockIndex: JSString = "getUniformBlockIndex" + @usableFromInline static let getUniformIndices: JSString = "getUniformIndices" @usableFromInline static let getUniformLocation: JSString = "getUniformLocation" @usableFromInline static let getUserMedia: JSString = "getUserMedia" @usableFromInline static let getVertexAttrib: JSString = "getVertexAttrib" @@ -20638,7 +22862,10 @@ public enum console { @usableFromInline static let initMutationEvent: JSString = "initMutationEvent" @usableFromInline static let initStorageEvent: JSString = "initStorageEvent" @usableFromInline static let initUIEvent: JSString = "initUIEvent" + @usableFromInline static let inline: JSString = "inline" + @usableFromInline static let innerHeight: JSString = "innerHeight" @usableFromInline static let innerText: JSString = "innerText" + @usableFromInline static let innerWidth: JSString = "innerWidth" @usableFromInline static let inputEncoding: JSString = "inputEncoding" @usableFromInline static let inputMode: JSString = "inputMode" @usableFromInline static let inputType: JSString = "inputType" @@ -20653,6 +22880,8 @@ public enum console { @usableFromInline static let integrity: JSString = "integrity" @usableFromInline static let intersectsNode: JSString = "intersectsNode" @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" + @usableFromInline static let invalidateFramebuffer: JSString = "invalidateFramebuffer" + @usableFromInline static let invalidateSubFramebuffer: JSString = "invalidateSubFramebuffer" @usableFromInline static let inverse: JSString = "inverse" @usableFromInline static let invertSelf: JSString = "invertSelf" @usableFromInline static let `is`: JSString = "is" @@ -20674,14 +22903,20 @@ public enum console { @usableFromInline static let isPointInRange: JSString = "isPointInRange" @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" @usableFromInline static let isProgram: JSString = "isProgram" + @usableFromInline static let isQuery: JSString = "isQuery" @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" @usableFromInline static let isRenderbuffer: JSString = "isRenderbuffer" @usableFromInline static let isSameNode: JSString = "isSameNode" + @usableFromInline static let isSampler: JSString = "isSampler" @usableFromInline static let isSecureContext: JSString = "isSecureContext" @usableFromInline static let isShader: JSString = "isShader" + @usableFromInline static let isSync: JSString = "isSync" @usableFromInline static let isTexture: JSString = "isTexture" + @usableFromInline static let isTransformFeedback: JSString = "isTransformFeedback" @usableFromInline static let isTrusted: JSString = "isTrusted" @usableFromInline static let isTypeSupported: JSString = "isTypeSupported" + @usableFromInline static let isVertexArray: JSString = "isVertexArray" + @usableFromInline static let isVisible: JSString = "isVisible" @usableFromInline static let item: JSString = "item" @usableFromInline static let items: JSString = "items" @usableFromInline static let iterateNext: JSString = "iterateNext" @@ -20757,6 +22992,7 @@ public enum console { @usableFromInline static let marginWidth: JSString = "marginWidth" @usableFromInline static let match: JSString = "match" @usableFromInline static let matchAll: JSString = "matchAll" + @usableFromInline static let matchMedia: JSString = "matchMedia" @usableFromInline static let matches: JSString = "matches" @usableFromInline static let matrix: JSString = "matrix" @usableFromInline static let matrixTransform: JSString = "matrixTransform" @@ -20785,6 +23021,7 @@ public enum console { @usableFromInline static let modifierSuper: JSString = "modifierSuper" @usableFromInline static let modifierSymbol: JSString = "modifierSymbol" @usableFromInline static let modifierSymbolLock: JSString = "modifierSymbolLock" + @usableFromInline static let moveBy: JSString = "moveBy" @usableFromInline static let moveTo: JSString = "moveTo" @usableFromInline static let multiple: JSString = "multiple" @usableFromInline static let multiply: JSString = "multiply" @@ -20821,6 +23058,14 @@ public enum console { @usableFromInline static let numberValue: JSString = "numberValue" @usableFromInline static let observe: JSString = "observe" @usableFromInline static let offset: JSString = "offset" + @usableFromInline static let offsetHeight: JSString = "offsetHeight" + @usableFromInline static let offsetLeft: JSString = "offsetLeft" + @usableFromInline static let offsetNode: JSString = "offsetNode" + @usableFromInline static let offsetParent: JSString = "offsetParent" + @usableFromInline static let offsetTop: JSString = "offsetTop" + @usableFromInline static let offsetWidth: JSString = "offsetWidth" + @usableFromInline static let offsetX: JSString = "offsetX" + @usableFromInline static let offsetY: JSString = "offsetY" @usableFromInline static let ok: JSString = "ok" @usableFromInline static let oldURL: JSString = "oldURL" @usableFromInline static let oldValue: JSString = "oldValue" @@ -20943,7 +23188,9 @@ public enum console { @usableFromInline static let originAgentCluster: JSString = "originAgentCluster" @usableFromInline static let originTime: JSString = "originTime" @usableFromInline static let oscpu: JSString = "oscpu" + @usableFromInline static let outerHeight: JSString = "outerHeight" @usableFromInline static let outerText: JSString = "outerText" + @usableFromInline static let outerWidth: JSString = "outerWidth" @usableFromInline static let output: JSString = "output" @usableFromInline static let overrideMimeType: JSString = "overrideMimeType" @usableFromInline static let ownerDocument: JSString = "ownerDocument" @@ -20952,6 +23199,10 @@ public enum console { @usableFromInline static let p2: JSString = "p2" @usableFromInline static let p3: JSString = "p3" @usableFromInline static let p4: JSString = "p4" + @usableFromInline static let pageX: JSString = "pageX" + @usableFromInline static let pageXOffset: JSString = "pageXOffset" + @usableFromInline static let pageY: JSString = "pageY" + @usableFromInline static let pageYOffset: JSString = "pageYOffset" @usableFromInline static let panTiltZoom: JSString = "panTiltZoom" @usableFromInline static let parent: JSString = "parent" @usableFromInline static let parentElement: JSString = "parentElement" @@ -20964,6 +23215,7 @@ public enum console { @usableFromInline static let patternMismatch: JSString = "patternMismatch" @usableFromInline static let pause: JSString = "pause" @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" + @usableFromInline static let pauseTransformFeedback: JSString = "pauseTransformFeedback" @usableFromInline static let paused: JSString = "paused" @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" @usableFromInline static let pending: JSString = "pending" @@ -20975,6 +23227,7 @@ public enum console { @usableFromInline static let ping: JSString = "ping" @usableFromInline static let pipeThrough: JSString = "pipeThrough" @usableFromInline static let pipeTo: JSString = "pipeTo" + @usableFromInline static let pixelDepth: JSString = "pixelDepth" @usableFromInline static let pixelStorei: JSString = "pixelStorei" @usableFromInline static let placeholder: JSString = "placeholder" @usableFromInline static let planeIndex: JSString = "planeIndex" @@ -21023,6 +23276,7 @@ public enum console { @usableFromInline static let promise: JSString = "promise" @usableFromInline static let prompt: JSString = "prompt" @usableFromInline static let `protocol`: JSString = "protocol" + @usableFromInline static let pseudo: JSString = "pseudo" @usableFromInline static let pseudoElement: JSString = "pseudoElement" @usableFromInline static let publicId: JSString = "publicId" @usableFromInline static let pull: JSString = "pull" @@ -21047,6 +23301,7 @@ public enum console { @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" @usableFromInline static let readAsText: JSString = "readAsText" + @usableFromInline static let readBuffer: JSString = "readBuffer" @usableFromInline static let readOnly: JSString = "readOnly" @usableFromInline static let readPixels: JSString = "readPixels" @usableFromInline static let readable: JSString = "readable" @@ -21067,6 +23322,7 @@ public enum console { @usableFromInline static let relList: JSString = "relList" @usableFromInline static let relatedNode: JSString = "relatedNode" @usableFromInline static let relatedTarget: JSString = "relatedTarget" + @usableFromInline static let relativeTo: JSString = "relativeTo" @usableFromInline static let releaseEvents: JSString = "releaseEvents" @usableFromInline static let releaseLock: JSString = "releaseLock" @usableFromInline static let reload: JSString = "reload" @@ -21082,6 +23338,7 @@ public enum console { @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" @usableFromInline static let renderbufferStorage: JSString = "renderbufferStorage" + @usableFromInline static let renderbufferStorageMultisample: JSString = "renderbufferStorageMultisample" @usableFromInline static let `repeat`: JSString = "repeat" @usableFromInline static let repetitionCount: JSString = "repetitionCount" @usableFromInline static let replace: JSString = "replace" @@ -21099,9 +23356,11 @@ public enum console { @usableFromInline static let required: JSString = "required" @usableFromInline static let reset: JSString = "reset" @usableFromInline static let resetTransform: JSString = "resetTransform" + @usableFromInline static let resizeBy: JSString = "resizeBy" @usableFromInline static let resizeHeight: JSString = "resizeHeight" @usableFromInline static let resizeMode: JSString = "resizeMode" @usableFromInline static let resizeQuality: JSString = "resizeQuality" + @usableFromInline static let resizeTo: JSString = "resizeTo" @usableFromInline static let resizeWidth: JSString = "resizeWidth" @usableFromInline static let respond: JSString = "respond" @usableFromInline static let respondWithNewView: JSString = "respondWithNewView" @@ -21115,6 +23374,7 @@ public enum console { @usableFromInline static let resultType: JSString = "resultType" @usableFromInline static let resultingClientId: JSString = "resultingClientId" @usableFromInline static let resume: JSString = "resume" + @usableFromInline static let resumeTransformFeedback: JSString = "resumeTransformFeedback" @usableFromInline static let returnValue: JSString = "returnValue" @usableFromInline static let rev: JSString = "rev" @usableFromInline static let reverse: JSString = "reverse" @@ -21137,6 +23397,8 @@ public enum console { @usableFromInline static let sampleCoverage: JSString = "sampleCoverage" @usableFromInline static let sampleRate: JSString = "sampleRate" @usableFromInline static let sampleSize: JSString = "sampleSize" + @usableFromInline static let samplerParameterf: JSString = "samplerParameterf" + @usableFromInline static let samplerParameteri: JSString = "samplerParameteri" @usableFromInline static let sandbox: JSString = "sandbox" @usableFromInline static let save: JSString = "save" @usableFromInline static let scalabilityMode: JSString = "scalabilityMode" @@ -21148,16 +23410,30 @@ public enum console { @usableFromInline static let scheme: JSString = "scheme" @usableFromInline static let scissor: JSString = "scissor" @usableFromInline static let scope: JSString = "scope" + @usableFromInline static let screen: JSString = "screen" + @usableFromInline static let screenLeft: JSString = "screenLeft" + @usableFromInline static let screenTop: JSString = "screenTop" @usableFromInline static let screenX: JSString = "screenX" @usableFromInline static let screenY: JSString = "screenY" @usableFromInline static let scriptURL: JSString = "scriptURL" @usableFromInline static let scripts: JSString = "scripts" + @usableFromInline static let scroll: JSString = "scroll" @usableFromInline static let scrollAmount: JSString = "scrollAmount" + @usableFromInline static let scrollBy: JSString = "scrollBy" @usableFromInline static let scrollDelay: JSString = "scrollDelay" + @usableFromInline static let scrollHeight: JSString = "scrollHeight" + @usableFromInline static let scrollIntoView: JSString = "scrollIntoView" + @usableFromInline static let scrollLeft: JSString = "scrollLeft" @usableFromInline static let scrollPathIntoView: JSString = "scrollPathIntoView" @usableFromInline static let scrollRestoration: JSString = "scrollRestoration" + @usableFromInline static let scrollTo: JSString = "scrollTo" + @usableFromInline static let scrollTop: JSString = "scrollTop" + @usableFromInline static let scrollWidth: JSString = "scrollWidth" + @usableFromInline static let scrollX: JSString = "scrollX" + @usableFromInline static let scrollY: JSString = "scrollY" @usableFromInline static let scrollbars: JSString = "scrollbars" @usableFromInline static let scrolling: JSString = "scrolling" + @usableFromInline static let scrollingElement: JSString = "scrollingElement" @usableFromInline static let search: JSString = "search" @usableFromInline static let searchParams: JSString = "searchParams" @usableFromInline static let sectionRowIndex: JSString = "sectionRowIndex" @@ -21299,9 +23575,13 @@ public enum console { @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" @usableFromInline static let texImage2D: JSString = "texImage2D" + @usableFromInline static let texImage3D: JSString = "texImage3D" @usableFromInline static let texParameterf: JSString = "texParameterf" @usableFromInline static let texParameteri: JSString = "texParameteri" + @usableFromInline static let texStorage2D: JSString = "texStorage2D" + @usableFromInline static let texStorage3D: JSString = "texStorage3D" @usableFromInline static let texSubImage2D: JSString = "texSubImage2D" + @usableFromInline static let texSubImage3D: JSString = "texSubImage3D" @usableFromInline static let text: JSString = "text" @usableFromInline static let textAlign: JSString = "textAlign" @usableFromInline static let textBaseline: JSString = "textBaseline" @@ -21320,6 +23600,7 @@ public enum console { @usableFromInline static let timeout: JSString = "timeout" @usableFromInline static let timestamp: JSString = "timestamp" @usableFromInline static let title: JSString = "title" + @usableFromInline static let toBox: JSString = "toBox" @usableFromInline static let toDataURL: JSString = "toDataURL" @usableFromInline static let toFloat32Array: JSString = "toFloat32Array" @usableFromInline static let toFloat64Array: JSString = "toFloat64Array" @@ -21340,6 +23621,7 @@ public enum console { @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" @usableFromInline static let transform: JSString = "transform" + @usableFromInline static let transformFeedbackVaryings: JSString = "transformFeedbackVaryings" @usableFromInline static let transformPoint: JSString = "transformPoint" @usableFromInline static let transformToDocument: JSString = "transformToDocument" @usableFromInline static let transformToFragment: JSString = "transformToFragment" @@ -21353,21 +23635,36 @@ public enum console { @usableFromInline static let uniform1fv: JSString = "uniform1fv" @usableFromInline static let uniform1i: JSString = "uniform1i" @usableFromInline static let uniform1iv: JSString = "uniform1iv" + @usableFromInline static let uniform1ui: JSString = "uniform1ui" + @usableFromInline static let uniform1uiv: JSString = "uniform1uiv" @usableFromInline static let uniform2f: JSString = "uniform2f" @usableFromInline static let uniform2fv: JSString = "uniform2fv" @usableFromInline static let uniform2i: JSString = "uniform2i" @usableFromInline static let uniform2iv: JSString = "uniform2iv" + @usableFromInline static let uniform2ui: JSString = "uniform2ui" + @usableFromInline static let uniform2uiv: JSString = "uniform2uiv" @usableFromInline static let uniform3f: JSString = "uniform3f" @usableFromInline static let uniform3fv: JSString = "uniform3fv" @usableFromInline static let uniform3i: JSString = "uniform3i" @usableFromInline static let uniform3iv: JSString = "uniform3iv" + @usableFromInline static let uniform3ui: JSString = "uniform3ui" + @usableFromInline static let uniform3uiv: JSString = "uniform3uiv" @usableFromInline static let uniform4f: JSString = "uniform4f" @usableFromInline static let uniform4fv: JSString = "uniform4fv" @usableFromInline static let uniform4i: JSString = "uniform4i" @usableFromInline static let uniform4iv: JSString = "uniform4iv" + @usableFromInline static let uniform4ui: JSString = "uniform4ui" + @usableFromInline static let uniform4uiv: JSString = "uniform4uiv" + @usableFromInline static let uniformBlockBinding: JSString = "uniformBlockBinding" @usableFromInline static let uniformMatrix2fv: JSString = "uniformMatrix2fv" + @usableFromInline static let uniformMatrix2x3fv: JSString = "uniformMatrix2x3fv" + @usableFromInline static let uniformMatrix2x4fv: JSString = "uniformMatrix2x4fv" @usableFromInline static let uniformMatrix3fv: JSString = "uniformMatrix3fv" + @usableFromInline static let uniformMatrix3x2fv: JSString = "uniformMatrix3x2fv" + @usableFromInline static let uniformMatrix3x4fv: JSString = "uniformMatrix3x4fv" @usableFromInline static let uniformMatrix4fv: JSString = "uniformMatrix4fv" + @usableFromInline static let uniformMatrix4x2fv: JSString = "uniformMatrix4x2fv" + @usableFromInline static let uniformMatrix4x3fv: JSString = "uniformMatrix4x3fv" @usableFromInline static let unregister: JSString = "unregister" @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" @usableFromInline static let update: JSString = "update" @@ -21403,6 +23700,12 @@ public enum console { @usableFromInline static let vertexAttrib3fv: JSString = "vertexAttrib3fv" @usableFromInline static let vertexAttrib4f: JSString = "vertexAttrib4f" @usableFromInline static let vertexAttrib4fv: JSString = "vertexAttrib4fv" + @usableFromInline static let vertexAttribDivisor: JSString = "vertexAttribDivisor" + @usableFromInline static let vertexAttribI4i: JSString = "vertexAttribI4i" + @usableFromInline static let vertexAttribI4iv: JSString = "vertexAttribI4iv" + @usableFromInline static let vertexAttribI4ui: JSString = "vertexAttribI4ui" + @usableFromInline static let vertexAttribI4uiv: JSString = "vertexAttribI4uiv" + @usableFromInline static let vertexAttribIPointer: JSString = "vertexAttribIPointer" @usableFromInline static let vertexAttribPointer: JSString = "vertexAttribPointer" @usableFromInline static let video: JSString = "video" @usableFromInline static let videoBitsPerSecond: JSString = "videoBitsPerSecond" @@ -21418,6 +23721,7 @@ public enum console { @usableFromInline static let volume: JSString = "volume" @usableFromInline static let vspace: JSString = "vspace" @usableFromInline static let w: JSString = "w" + @usableFromInline static let waitSync: JSString = "waitSync" @usableFromInline static let waiting: JSString = "waiting" @usableFromInline static let warn: JSString = "warn" @usableFromInline static let webkitMatchesSelector: JSString = "webkitMatchesSelector" @@ -21637,6 +23941,48 @@ public enum Bool_or_MediaTrackConstraints: JSValueCompatible, Any_Bool_or_MediaT } } +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 + } + } +} + public protocol Any_BufferSource: ConvertibleToJSValue {} extension ArrayBuffer: Any_BufferSource {} extension ArrayBufferView: Any_BufferSource {} @@ -21679,6 +24025,48 @@ public enum BufferSource: JSValueCompatible, Any_BufferSource { } } +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 + } + } +} + public protocol Any_CanvasFilterInput_or_seq_of_CanvasFilterInput: ConvertibleToJSValue {} extension CanvasFilterInput: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput {} extension Array: Any_CanvasFilterInput_or_seq_of_CanvasFilterInput where Element == CanvasFilterInput {} @@ -22659,6 +25047,76 @@ public enum FormDataEntryValue: JSValueCompatible, Any_FormDataEntryValue { } } +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 + } + } +} + public protocol Any_HTMLCanvasElement_or_OffscreenCanvas: ConvertibleToJSValue {} extension HTMLCanvasElement: Any_HTMLCanvasElement_or_OffscreenCanvas {} extension OffscreenCanvas: Any_HTMLCanvasElement_or_OffscreenCanvas {} @@ -23569,6 +26027,48 @@ public enum TimerHandler: JSValueCompatible, Any_TimerHandler { } } +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 + } + } +} + public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} extension Blob: Any_XMLHttpRequestBodyInit {} extension BufferSource: Any_XMLHttpRequestBodyInit {} 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 652cb2666974de4b6a034335f895ffb423a5a658 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 13:11:16 +0100 Subject: [PATCH 19/21] Use revision requirement --- Package.swift | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Package.swift b/Package.swift index 7157ffdd..891b5951 100644 --- a/Package.swift +++ b/Package.swift @@ -8,35 +8,43 @@ let package = Package( products: [ .executable( name: "DOMKitDemo", - targets: ["DOMKitDemo"]), + targets: ["DOMKitDemo"] + ), .library( name: "DOMKit", - targets: ["DOMKit"]), + targets: ["DOMKit"] + ), .library(name: "WebIDL", targets: ["WebIDL"]), .executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]), ], dependencies: [ .package( url: "https://github.com/swiftwasm/JavaScriptKit.git", - .branch("main")), + .revision("95d0c4cd78b48ffc7e19c618d57c3244917be09a") + ), ], targets: [ .target( name: "DOMKitDemo", - dependencies: ["DOMKit"]), + dependencies: ["DOMKit"] + ), .target( name: "DOMKit", - dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + dependencies: ["ECMAScript", "JavaScriptKit", .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")] + ), // This support library should be moved to JavaScriptKit .target(name: "ECMAScript", dependencies: [ "JavaScriptKit", - .product(name: "JavaScriptEventLoop", package: "JavaScriptKit")]), + .product(name: "JavaScriptEventLoop", package: "JavaScriptKit"), + ]), .target(name: "WebIDL"), .target( name: "WebIDLToSwift", - dependencies: ["WebIDL"]), + dependencies: ["WebIDL"] + ), .testTarget( name: "DOMKitTests", - dependencies: ["DOMKit"]), + dependencies: ["DOMKit"] + ), ] ) From 1b0bf31370e925d45fb0b732f937791fbbaa566a Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 16:34:03 +0100 Subject: [PATCH 20/21] Regenerate Swift code --- Sources/DOMKit/Generated.swift | 1860 ++++++++++++++++++++++++++++++-- 1 file changed, 1760 insertions(+), 100 deletions(-) diff --git a/Sources/DOMKit/Generated.swift b/Sources/DOMKit/Generated.swift index d607201c..22b3eff4 100644 --- a/Sources/DOMKit/Generated.swift +++ b/Sources/DOMKit/Generated.swift @@ -17883,6 +17883,9 @@ public typealias GLuint = UInt32 public typealias GLfloat = Float public typealias GLclampf = Float +public typealias GLint64 = Int64 +public typealias GLuint64 = UInt64 + public typealias MutationCallback = ([MutationRecord], MutationObserver) -> Void public typealias BlobCallback = (Blob?) -> Void public typealias FunctionStringCallback = (String) -> Void @@ -19038,138 +19041,1619 @@ public enum VideoResizeModeEnum: JSString, JSValueCompatible { return nil } - @inlinable public init?(string: String) { - self.init(rawValue: JSString(string)) + @inlinable public init?(string: String) { + self.init(rawValue: JSString(string)) + } + + @inlinable public var jsValue: JSValue { rawValue.jsValue } +} + +public class VideoTrack: JSBridgedClass { + @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } + + public let jsObject: JSObject + + public required init(unsafelyWrapping jsObject: JSObject) { + _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) + _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) + _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) + _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) + _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) + self.jsObject = jsObject + } + + @ReadonlyAttribute + public var id: String + + @ReadonlyAttribute + public var kind: String + + @ReadonlyAttribute + public var label: String + + @ReadonlyAttribute + public var language: String + + @ReadWriteAttribute + public var selected: Bool +} + +public class VideoTrackList: EventTarget { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) + _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) + _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) + _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) + _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) + super.init(unsafelyWrapping: jsObject) + } + + @ReadonlyAttribute + public var length: UInt32 + + @inlinable public subscript(key: Int) -> VideoTrack { + jsObject[key].fromJSValue()! + } + + @inlinable public func getTrackById(id: String) -> VideoTrack? { + let this = jsObject + return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + } + + @ReadonlyAttribute + public var selectedIndex: Int32 + + @ClosureAttribute1Optional + public var onchange: EventHandler + + @ClosureAttribute1Optional + public var onaddtrack: EventHandler + + @ClosureAttribute1Optional + public var onremovetrack: EventHandler +} + +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 } +} + +public class WaveShaperNode: AudioNode { + @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WaveShaperNode].function! } + + public required init(unsafelyWrapping jsObject: JSObject) { + _curve = ReadWriteAttribute(jsObject: jsObject, name: Strings.curve) + _oversample = ReadWriteAttribute(jsObject: jsObject, name: Strings.oversample) + super.init(unsafelyWrapping: jsObject) + } + + @inlinable public convenience init(context: BaseAudioContext, options: WaveShaperOptions? = nil) { + self.init(unsafelyWrapping: Self.constructor.new(arguments: [context.jsValue, options?.jsValue ?? .undefined])) + } + + @ReadWriteAttribute + public var curve: Float32Array? + + @ReadWriteAttribute + public var oversample: OverSampleType +} + +public class WaveShaperOptions: BridgedDictionary { + public convenience init(curve: [Float], oversample: OverSampleType) { + let object = JSObject.global[Strings.Object].function!.new() + object[Strings.curve] = curve.jsValue + object[Strings.oversample] = oversample.jsValue + self.init(unsafelyWrapping: object) + } + + public required init(unsafelyWrapping object: JSObject) { + _curve = ReadWriteAttribute(jsObject: object, name: Strings.curve) + _oversample = ReadWriteAttribute(jsObject: object, name: Strings.oversample) + super.init(unsafelyWrapping: object) + } + + @ReadWriteAttribute + public var curve: [Float] + + @ReadWriteAttribute + public var oversample: OverSampleType +} + +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 + } +} + +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]) + } +} + +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 public var jsValue: JSValue { rawValue.jsValue } -} - -public class VideoTrack: JSBridgedClass { - @inlinable public class var constructor: JSFunction { JSObject.global[Strings.VideoTrack].function! } - - public let jsObject: JSObject - - public required init(unsafelyWrapping jsObject: JSObject) { - _id = ReadonlyAttribute(jsObject: jsObject, name: Strings.id) - _kind = ReadonlyAttribute(jsObject: jsObject, name: Strings.kind) - _label = ReadonlyAttribute(jsObject: jsObject, name: Strings.label) - _language = ReadonlyAttribute(jsObject: jsObject, name: Strings.language) - _selected = ReadWriteAttribute(jsObject: jsObject, name: Strings.selected) - self.jsObject = jsObject + @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]) } - @ReadonlyAttribute - public var id: String - - @ReadonlyAttribute - public var kind: String - - @ReadonlyAttribute - public var label: String - - @ReadonlyAttribute - public var language: String - - @ReadWriteAttribute - public var selected: Bool -} - -public class VideoTrackList: EventTarget { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.VideoTrackList].function! } - - public required init(unsafelyWrapping jsObject: JSObject) { - _length = ReadonlyAttribute(jsObject: jsObject, name: Strings.length) - _selectedIndex = ReadonlyAttribute(jsObject: jsObject, name: Strings.selectedIndex) - _onchange = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onchange) - _onaddtrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onaddtrack) - _onremovetrack = ClosureAttribute1Optional(jsObject: jsObject, name: Strings.onremovetrack) - super.init(unsafelyWrapping: jsObject) + @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]) } - @ReadonlyAttribute - public var length: UInt32 - - @inlinable public subscript(key: Int) -> VideoTrack { - jsObject[key].fromJSValue()! + @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 public func getTrackById(id: String) -> VideoTrack? { + @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 - return this[Strings.getTrackById].function!(this: this, arguments: [id.jsValue]).fromJSValue()! + _ = this[Strings.compressedTexImage2D].function!(this: this, arguments: [_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8]) } - @ReadonlyAttribute - public var selectedIndex: Int32 - - @ClosureAttribute1Optional - public var onchange: EventHandler + @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]) + } - @ClosureAttribute1Optional - public var onaddtrack: EventHandler + @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]) + } - @ClosureAttribute1Optional - public var onremovetrack: EventHandler -} + @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]) + } -public enum VideoTransferCharacteristics: JSString, JSValueCompatible { - case bt709 = "bt709" - case smpte170m = "smpte170m" - case iec6196621 = "iec61966-2-1" + @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 public static func construct(from jsValue: JSValue) -> Self? { - if let string = jsValue.jsString { - return Self(rawValue: string) - } - return nil + @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 public init?(string: String) { - self.init(rawValue: JSString(string)) + @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 public var jsValue: JSValue { rawValue.jsValue } -} + @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]) + } -public class WaveShaperNode: AudioNode { - @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WaveShaperNode].function! } + @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]) + } - public required init(unsafelyWrapping jsObject: JSObject) { - _curve = ReadWriteAttribute(jsObject: jsObject, name: Strings.curve) - _oversample = ReadWriteAttribute(jsObject: jsObject, name: Strings.oversample) - super.init(unsafelyWrapping: jsObject) + @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 public convenience init(context: BaseAudioContext, options: WaveShaperOptions? = nil) { - self.init(unsafelyWrapping: Self.constructor.new(arguments: [context.jsValue, options?.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]) } - @ReadWriteAttribute - public var curve: Float32Array? + @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]) + } - @ReadWriteAttribute - public var oversample: OverSampleType -} + @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]) + } -public class WaveShaperOptions: BridgedDictionary { - public convenience init(curve: [Float], oversample: OverSampleType) { - let object = JSObject.global[Strings.Object].function!.new() - object[Strings.curve] = curve.jsValue - object[Strings.oversample] = oversample.jsValue - self.init(unsafelyWrapping: object) + @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]) } - public required init(unsafelyWrapping object: JSObject) { - _curve = ReadWriteAttribute(jsObject: object, name: Strings.curve) - _oversample = ReadWriteAttribute(jsObject: object, name: Strings.oversample) - super.init(unsafelyWrapping: object) + @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]) } - @ReadWriteAttribute - public var curve: [Float] + @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]) + } - @ReadWriteAttribute - public var oversample: OverSampleType + @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]) + } } public class WebGLActiveInfo: JSBridgedClass { @@ -19335,6 +20819,14 @@ public class WebGLProgram: WebGLObject { } } +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) + } +} + public class WebGLRenderbuffer: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLRenderbuffer].function! } @@ -20727,6 +22219,14 @@ public extension WebGLRenderingContextOverloads { } } +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) + } +} + public class WebGLShader: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLShader].function! } @@ -20757,6 +22257,14 @@ public class WebGLShaderPrecisionFormat: JSBridgedClass { public var precision: GLint } +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) + } +} + public class WebGLTexture: WebGLObject { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebGLTexture].function! } @@ -20765,6 +22273,14 @@ public class WebGLTexture: WebGLObject { } } +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) + } +} + public class WebGLUniformLocation: JSBridgedClass { @inlinable public class var constructor: JSFunction { JSObject.global[Strings.WebGLUniformLocation].function! } @@ -20775,6 +22291,14 @@ public class WebGLUniformLocation: JSBridgedClass { } } +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) + } +} + public class WebSocket: EventTarget { @inlinable override public class var constructor: JSFunction { JSObject.global[Strings.WebSocket].function! } @@ -22908,18 +24432,24 @@ public enum console { @usableFromInline static let VideoTrack: JSString = "VideoTrack" @usableFromInline static let VideoTrackList: JSString = "VideoTrackList" @usableFromInline static let WaveShaperNode: JSString = "WaveShaperNode" + @usableFromInline static let WebGL2RenderingContext: JSString = "WebGL2RenderingContext" @usableFromInline static let WebGLActiveInfo: JSString = "WebGLActiveInfo" @usableFromInline static let WebGLBuffer: JSString = "WebGLBuffer" @usableFromInline static let WebGLContextEvent: JSString = "WebGLContextEvent" @usableFromInline static let WebGLFramebuffer: JSString = "WebGLFramebuffer" @usableFromInline static let WebGLObject: JSString = "WebGLObject" @usableFromInline static let WebGLProgram: JSString = "WebGLProgram" + @usableFromInline static let WebGLQuery: JSString = "WebGLQuery" @usableFromInline static let WebGLRenderbuffer: JSString = "WebGLRenderbuffer" @usableFromInline static let WebGLRenderingContext: JSString = "WebGLRenderingContext" + @usableFromInline static let WebGLSampler: JSString = "WebGLSampler" @usableFromInline static let WebGLShader: JSString = "WebGLShader" @usableFromInline static let WebGLShaderPrecisionFormat: JSString = "WebGLShaderPrecisionFormat" + @usableFromInline static let WebGLSync: JSString = "WebGLSync" @usableFromInline static let WebGLTexture: JSString = "WebGLTexture" + @usableFromInline static let WebGLTransformFeedback: JSString = "WebGLTransformFeedback" @usableFromInline static let WebGLUniformLocation: JSString = "WebGLUniformLocation" + @usableFromInline static let WebGLVertexArrayObject: JSString = "WebGLVertexArrayObject" @usableFromInline static let WebSocket: JSString = "WebSocket" @usableFromInline static let WheelEvent: JSString = "WheelEvent" @usableFromInline static let Window: JSString = "Window" @@ -23079,15 +24609,22 @@ public enum console { @usableFromInline static let baseURI: JSString = "baseURI" @usableFromInline static let before: JSString = "before" @usableFromInline static let beginPath: JSString = "beginPath" + @usableFromInline static let beginQuery: JSString = "beginQuery" + @usableFromInline static let beginTransformFeedback: JSString = "beginTransformFeedback" @usableFromInline static let behavior: JSString = "behavior" @usableFromInline static let bezierCurveTo: JSString = "bezierCurveTo" @usableFromInline static let bgColor: JSString = "bgColor" @usableFromInline static let binaryType: JSString = "binaryType" @usableFromInline static let bindAttribLocation: JSString = "bindAttribLocation" @usableFromInline static let bindBuffer: JSString = "bindBuffer" + @usableFromInline static let bindBufferBase: JSString = "bindBufferBase" + @usableFromInline static let bindBufferRange: JSString = "bindBufferRange" @usableFromInline static let bindFramebuffer: JSString = "bindFramebuffer" @usableFromInline static let bindRenderbuffer: JSString = "bindRenderbuffer" + @usableFromInline static let bindSampler: JSString = "bindSampler" @usableFromInline static let bindTexture: JSString = "bindTexture" + @usableFromInline static let bindTransformFeedback: JSString = "bindTransformFeedback" + @usableFromInline static let bindVertexArray: JSString = "bindVertexArray" @usableFromInline static let bitrate: JSString = "bitrate" @usableFromInline static let bitrateMode: JSString = "bitrateMode" @usableFromInline static let bitsPerSecond: JSString = "bitsPerSecond" @@ -23096,6 +24633,7 @@ public enum console { @usableFromInline static let blendEquationSeparate: JSString = "blendEquationSeparate" @usableFromInline static let blendFunc: JSString = "blendFunc" @usableFromInline static let blendFuncSeparate: JSString = "blendFuncSeparate" + @usableFromInline static let blitFramebuffer: JSString = "blitFramebuffer" @usableFromInline static let blob: JSString = "blob" @usableFromInline static let block: JSString = "block" @usableFromInline static let blocking: JSString = "blocking" @@ -23159,6 +24697,10 @@ public enum console { @usableFromInline static let classList: JSString = "classList" @usableFromInline static let className: JSString = "className" @usableFromInline static let clear: JSString = "clear" + @usableFromInline static let clearBufferfi: JSString = "clearBufferfi" + @usableFromInline static let clearBufferfv: JSString = "clearBufferfv" + @usableFromInline static let clearBufferiv: JSString = "clearBufferiv" + @usableFromInline static let clearBufferuiv: JSString = "clearBufferuiv" @usableFromInline static let clearColor: JSString = "clearColor" @usableFromInline static let clearData: JSString = "clearData" @usableFromInline static let clearDepth: JSString = "clearDepth" @@ -23173,6 +24715,7 @@ public enum console { @usableFromInline static let clientInformation: JSString = "clientInformation" @usableFromInline static let clientLeft: JSString = "clientLeft" @usableFromInline static let clientTop: JSString = "clientTop" + @usableFromInline static let clientWaitSync: JSString = "clientWaitSync" @usableFromInline static let clientWidth: JSString = "clientWidth" @usableFromInline static let clientX: JSString = "clientX" @usableFromInline static let clientY: JSString = "clientY" @@ -23218,7 +24761,9 @@ public enum console { @usableFromInline static let composedPath: JSString = "composedPath" @usableFromInline static let composite: JSString = "composite" @usableFromInline static let compressedTexImage2D: JSString = "compressedTexImage2D" + @usableFromInline static let compressedTexImage3D: JSString = "compressedTexImage3D" @usableFromInline static let compressedTexSubImage2D: JSString = "compressedTexSubImage2D" + @usableFromInline static let compressedTexSubImage3D: JSString = "compressedTexSubImage3D" @usableFromInline static let computedOffset: JSString = "computedOffset" @usableFromInline static let coneInnerAngle: JSString = "coneInnerAngle" @usableFromInline static let coneOuterAngle: JSString = "coneOuterAngle" @@ -23247,9 +24792,11 @@ public enum console { @usableFromInline static let cookie: JSString = "cookie" @usableFromInline static let cookieEnabled: JSString = "cookieEnabled" @usableFromInline static let coords: JSString = "coords" + @usableFromInline static let copyBufferSubData: JSString = "copyBufferSubData" @usableFromInline static let copyFromChannel: JSString = "copyFromChannel" @usableFromInline static let copyTexImage2D: JSString = "copyTexImage2D" @usableFromInline static let copyTexSubImage2D: JSString = "copyTexSubImage2D" + @usableFromInline static let copyTexSubImage3D: JSString = "copyTexSubImage3D" @usableFromInline static let copyTo: JSString = "copyTo" @usableFromInline static let copyToChannel: JSString = "copyToChannel" @usableFromInline static let count: JSString = "count" @@ -23294,9 +24841,11 @@ public enum console { @usableFromInline static let createPeriodicWave: JSString = "createPeriodicWave" @usableFromInline static let createProcessingInstruction: JSString = "createProcessingInstruction" @usableFromInline static let createProgram: JSString = "createProgram" + @usableFromInline static let createQuery: JSString = "createQuery" @usableFromInline static let createRadialGradient: JSString = "createRadialGradient" @usableFromInline static let createRange: JSString = "createRange" @usableFromInline static let createRenderbuffer: JSString = "createRenderbuffer" + @usableFromInline static let createSampler: JSString = "createSampler" @usableFromInline static let createScriptProcessor: JSString = "createScriptProcessor" @usableFromInline static let createShader: JSString = "createShader" @usableFromInline static let createStereoPanner: JSString = "createStereoPanner" @@ -23305,6 +24854,8 @@ public enum console { @usableFromInline static let createTHead: JSString = "createTHead" @usableFromInline static let createTextNode: JSString = "createTextNode" @usableFromInline static let createTexture: JSString = "createTexture" + @usableFromInline static let createTransformFeedback: JSString = "createTransformFeedback" + @usableFromInline static let createVertexArray: JSString = "createVertexArray" @usableFromInline static let createWaveShaper: JSString = "createWaveShaper" @usableFromInline static let credentials: JSString = "credentials" @usableFromInline static let crossOrigin: JSString = "crossOrigin" @@ -23353,12 +24904,17 @@ public enum console { @usableFromInline static let deleteData: JSString = "deleteData" @usableFromInline static let deleteFramebuffer: JSString = "deleteFramebuffer" @usableFromInline static let deleteProgram: JSString = "deleteProgram" + @usableFromInline static let deleteQuery: JSString = "deleteQuery" @usableFromInline static let deleteRenderbuffer: JSString = "deleteRenderbuffer" @usableFromInline static let deleteRow: JSString = "deleteRow" + @usableFromInline static let deleteSampler: JSString = "deleteSampler" @usableFromInline static let deleteShader: JSString = "deleteShader" + @usableFromInline static let deleteSync: JSString = "deleteSync" @usableFromInline static let deleteTFoot: JSString = "deleteTFoot" @usableFromInline static let deleteTHead: JSString = "deleteTHead" @usableFromInline static let deleteTexture: JSString = "deleteTexture" + @usableFromInline static let deleteTransformFeedback: JSString = "deleteTransformFeedback" + @usableFromInline static let deleteVertexArray: JSString = "deleteVertexArray" @usableFromInline static let deltaMode: JSString = "deltaMode" @usableFromInline static let deltaX: JSString = "deltaX" @usableFromInline static let deltaY: JSString = "deltaY" @@ -23404,9 +24960,13 @@ public enum console { @usableFromInline static let download: JSString = "download" @usableFromInline static let draggable: JSString = "draggable" @usableFromInline static let drawArrays: JSString = "drawArrays" + @usableFromInline static let drawArraysInstanced: JSString = "drawArraysInstanced" + @usableFromInline static let drawBuffers: JSString = "drawBuffers" @usableFromInline static let drawElements: JSString = "drawElements" + @usableFromInline static let drawElementsInstanced: JSString = "drawElementsInstanced" @usableFromInline static let drawFocusIfNeeded: JSString = "drawFocusIfNeeded" @usableFromInline static let drawImage: JSString = "drawImage" + @usableFromInline static let drawRangeElements: JSString = "drawRangeElements" @usableFromInline static let drawingBufferHeight: JSString = "drawingBufferHeight" @usableFromInline static let drawingBufferWidth: JSString = "drawingBufferWidth" @usableFromInline static let dropEffect: JSString = "dropEffect" @@ -23436,7 +24996,9 @@ public enum console { @usableFromInline static let endContainer: JSString = "endContainer" @usableFromInline static let endDelay: JSString = "endDelay" @usableFromInline static let endOffset: JSString = "endOffset" + @usableFromInline static let endQuery: JSString = "endQuery" @usableFromInline static let endTime: JSString = "endTime" + @usableFromInline static let endTransformFeedback: JSString = "endTransformFeedback" @usableFromInline static let ended: JSString = "ended" @usableFromInline static let endings: JSString = "endings" @usableFromInline static let enqueue: JSString = "enqueue" @@ -23460,6 +25022,7 @@ public enum console { @usableFromInline static let fastSeek: JSString = "fastSeek" @usableFromInline static let feedback: JSString = "feedback" @usableFromInline static let feedforward: JSString = "feedforward" + @usableFromInline static let fenceSync: JSString = "fenceSync" @usableFromInline static let fetch: JSString = "fetch" @usableFromInline static let fftSize: JSString = "fftSize" @usableFromInline static let fgColor: JSString = "fgColor" @@ -23507,6 +25070,7 @@ public enum console { @usableFromInline static let frameRate: JSString = "frameRate" @usableFromInline static let framebufferRenderbuffer: JSString = "framebufferRenderbuffer" @usableFromInline static let framebufferTexture2D: JSString = "framebufferTexture2D" + @usableFromInline static let framebufferTextureLayer: JSString = "framebufferTextureLayer" @usableFromInline static let framerate: JSString = "framerate" @usableFromInline static let frames: JSString = "frames" @usableFromInline static let frequency: JSString = "frequency" @@ -23525,6 +25089,9 @@ public enum console { @usableFromInline static let get: JSString = "get" @usableFromInline static let getActiveAttrib: JSString = "getActiveAttrib" @usableFromInline static let getActiveUniform: JSString = "getActiveUniform" + @usableFromInline static let getActiveUniformBlockName: JSString = "getActiveUniformBlockName" + @usableFromInline static let getActiveUniformBlockParameter: JSString = "getActiveUniformBlockParameter" + @usableFromInline static let getActiveUniforms: JSString = "getActiveUniforms" @usableFromInline static let getAll: JSString = "getAll" @usableFromInline static let getAllResponseHeaders: JSString = "getAllResponseHeaders" @usableFromInline static let getAnimations: JSString = "getAnimations" @@ -23541,6 +25108,7 @@ public enum console { @usableFromInline static let getBounds: JSString = "getBounds" @usableFromInline static let getBoxQuads: JSString = "getBoxQuads" @usableFromInline static let getBufferParameter: JSString = "getBufferParameter" + @usableFromInline static let getBufferSubData: JSString = "getBufferSubData" @usableFromInline static let getByteFrequencyData: JSString = "getByteFrequencyData" @usableFromInline static let getByteTimeDomainData: JSString = "getByteTimeDomainData" @usableFromInline static let getCapabilities: JSString = "getCapabilities" @@ -23562,9 +25130,12 @@ public enum console { @usableFromInline static let getExtension: JSString = "getExtension" @usableFromInline static let getFloatFrequencyData: JSString = "getFloatFrequencyData" @usableFromInline static let getFloatTimeDomainData: JSString = "getFloatTimeDomainData" + @usableFromInline static let getFragDataLocation: JSString = "getFragDataLocation" @usableFromInline static let getFramebufferAttachmentParameter: JSString = "getFramebufferAttachmentParameter" @usableFromInline static let getFrequencyResponse: JSString = "getFrequencyResponse" @usableFromInline static let getImageData: JSString = "getImageData" + @usableFromInline static let getIndexedParameter: JSString = "getIndexedParameter" + @usableFromInline static let getInternalformatParameter: JSString = "getInternalformatParameter" @usableFromInline static let getKeyframes: JSString = "getKeyframes" @usableFromInline static let getLineDash: JSString = "getLineDash" @usableFromInline static let getModifierState: JSString = "getModifierState" @@ -23573,6 +25144,8 @@ public enum console { @usableFromInline static let getParameter: JSString = "getParameter" @usableFromInline static let getProgramInfoLog: JSString = "getProgramInfoLog" @usableFromInline static let getProgramParameter: JSString = "getProgramParameter" + @usableFromInline static let getQuery: JSString = "getQuery" + @usableFromInline static let getQueryParameter: JSString = "getQueryParameter" @usableFromInline static let getReader: JSString = "getReader" @usableFromInline static let getRegistration: JSString = "getRegistration" @usableFromInline static let getRegistrations: JSString = "getRegistrations" @@ -23580,6 +25153,7 @@ public enum console { @usableFromInline static let getResponseHeader: JSString = "getResponseHeader" @usableFromInline static let getRootNode: JSString = "getRootNode" @usableFromInline static let getSVGDocument: JSString = "getSVGDocument" + @usableFromInline static let getSamplerParameter: JSString = "getSamplerParameter" @usableFromInline static let getSettings: JSString = "getSettings" @usableFromInline static let getShaderInfoLog: JSString = "getShaderInfoLog" @usableFromInline static let getShaderParameter: JSString = "getShaderParameter" @@ -23589,12 +25163,16 @@ public enum console { @usableFromInline static let getState: JSString = "getState" @usableFromInline static let getSupportedConstraints: JSString = "getSupportedConstraints" @usableFromInline static let getSupportedExtensions: JSString = "getSupportedExtensions" + @usableFromInline static let getSyncParameter: JSString = "getSyncParameter" @usableFromInline static let getTexParameter: JSString = "getTexParameter" @usableFromInline static let getTiming: JSString = "getTiming" @usableFromInline static let getTrackById: JSString = "getTrackById" @usableFromInline static let getTracks: JSString = "getTracks" @usableFromInline static let getTransform: JSString = "getTransform" + @usableFromInline static let getTransformFeedbackVarying: JSString = "getTransformFeedbackVarying" @usableFromInline static let getUniform: JSString = "getUniform" + @usableFromInline static let getUniformBlockIndex: JSString = "getUniformBlockIndex" + @usableFromInline static let getUniformIndices: JSString = "getUniformIndices" @usableFromInline static let getUniformLocation: JSString = "getUniformLocation" @usableFromInline static let getUserMedia: JSString = "getUserMedia" @usableFromInline static let getVertexAttrib: JSString = "getVertexAttrib" @@ -23687,6 +25265,8 @@ public enum console { @usableFromInline static let integrity: JSString = "integrity" @usableFromInline static let intersectsNode: JSString = "intersectsNode" @usableFromInline static let invalidIteratorState: JSString = "invalidIteratorState" + @usableFromInline static let invalidateFramebuffer: JSString = "invalidateFramebuffer" + @usableFromInline static let invalidateSubFramebuffer: JSString = "invalidateSubFramebuffer" @usableFromInline static let inverse: JSString = "inverse" @usableFromInline static let invertSelf: JSString = "invertSelf" @usableFromInline static let `is`: JSString = "is" @@ -23708,14 +25288,19 @@ public enum console { @usableFromInline static let isPointInRange: JSString = "isPointInRange" @usableFromInline static let isPointInStroke: JSString = "isPointInStroke" @usableFromInline static let isProgram: JSString = "isProgram" + @usableFromInline static let isQuery: JSString = "isQuery" @usableFromInline static let isReloadNavigation: JSString = "isReloadNavigation" @usableFromInline static let isRenderbuffer: JSString = "isRenderbuffer" @usableFromInline static let isSameNode: JSString = "isSameNode" + @usableFromInline static let isSampler: JSString = "isSampler" @usableFromInline static let isSecureContext: JSString = "isSecureContext" @usableFromInline static let isShader: JSString = "isShader" + @usableFromInline static let isSync: JSString = "isSync" @usableFromInline static let isTexture: JSString = "isTexture" + @usableFromInline static let isTransformFeedback: JSString = "isTransformFeedback" @usableFromInline static let isTrusted: JSString = "isTrusted" @usableFromInline static let isTypeSupported: JSString = "isTypeSupported" + @usableFromInline static let isVertexArray: JSString = "isVertexArray" @usableFromInline static let isVisible: JSString = "isVisible" @usableFromInline static let item: JSString = "item" @usableFromInline static let items: JSString = "items" @@ -24047,6 +25632,7 @@ public enum console { @usableFromInline static let patternMismatch: JSString = "patternMismatch" @usableFromInline static let pause: JSString = "pause" @usableFromInline static let pauseOnExit: JSString = "pauseOnExit" + @usableFromInline static let pauseTransformFeedback: JSString = "pauseTransformFeedback" @usableFromInline static let paused: JSString = "paused" @usableFromInline static let pdfViewerEnabled: JSString = "pdfViewerEnabled" @usableFromInline static let pending: JSString = "pending" @@ -24140,6 +25726,7 @@ public enum console { @usableFromInline static let readAsBinaryString: JSString = "readAsBinaryString" @usableFromInline static let readAsDataURL: JSString = "readAsDataURL" @usableFromInline static let readAsText: JSString = "readAsText" + @usableFromInline static let readBuffer: JSString = "readBuffer" @usableFromInline static let readOnly: JSString = "readOnly" @usableFromInline static let readPixels: JSString = "readPixels" @usableFromInline static let readable: JSString = "readable" @@ -24180,6 +25767,7 @@ public enum console { @usableFromInline static let removeTrack: JSString = "removeTrack" @usableFromInline static let removedNodes: JSString = "removedNodes" @usableFromInline static let renderbufferStorage: JSString = "renderbufferStorage" + @usableFromInline static let renderbufferStorageMultisample: JSString = "renderbufferStorageMultisample" @usableFromInline static let renderedBuffer: JSString = "renderedBuffer" @usableFromInline static let `repeat`: JSString = "repeat" @usableFromInline static let repetitionCount: JSString = "repetitionCount" @@ -24216,6 +25804,7 @@ public enum console { @usableFromInline static let resultType: JSString = "resultType" @usableFromInline static let resultingClientId: JSString = "resultingClientId" @usableFromInline static let resume: JSString = "resume" + @usableFromInline static let resumeTransformFeedback: JSString = "resumeTransformFeedback" @usableFromInline static let returnValue: JSString = "returnValue" @usableFromInline static let rev: JSString = "rev" @usableFromInline static let reverse: JSString = "reverse" @@ -24239,6 +25828,8 @@ public enum console { @usableFromInline static let sampleCoverage: JSString = "sampleCoverage" @usableFromInline static let sampleRate: JSString = "sampleRate" @usableFromInline static let sampleSize: JSString = "sampleSize" + @usableFromInline static let samplerParameterf: JSString = "samplerParameterf" + @usableFromInline static let samplerParameteri: JSString = "samplerParameteri" @usableFromInline static let sandbox: JSString = "sandbox" @usableFromInline static let save: JSString = "save" @usableFromInline static let scalabilityMode: JSString = "scalabilityMode" @@ -24424,9 +26015,13 @@ public enum console { @usableFromInline static let temporalLayerId: JSString = "temporalLayerId" @usableFromInline static let terminate: JSString = "terminate" @usableFromInline static let texImage2D: JSString = "texImage2D" + @usableFromInline static let texImage3D: JSString = "texImage3D" @usableFromInline static let texParameterf: JSString = "texParameterf" @usableFromInline static let texParameteri: JSString = "texParameteri" + @usableFromInline static let texStorage2D: JSString = "texStorage2D" + @usableFromInline static let texStorage3D: JSString = "texStorage3D" @usableFromInline static let texSubImage2D: JSString = "texSubImage2D" + @usableFromInline static let texSubImage3D: JSString = "texSubImage3D" @usableFromInline static let text: JSString = "text" @usableFromInline static let textAlign: JSString = "textAlign" @usableFromInline static let textBaseline: JSString = "textBaseline" @@ -24467,6 +26062,7 @@ public enum console { @usableFromInline static let transferFromImageBitmap: JSString = "transferFromImageBitmap" @usableFromInline static let transferToImageBitmap: JSString = "transferToImageBitmap" @usableFromInline static let transform: JSString = "transform" + @usableFromInline static let transformFeedbackVaryings: JSString = "transformFeedbackVaryings" @usableFromInline static let transformPoint: JSString = "transformPoint" @usableFromInline static let transformToDocument: JSString = "transformToDocument" @usableFromInline static let transformToFragment: JSString = "transformToFragment" @@ -24480,21 +26076,36 @@ public enum console { @usableFromInline static let uniform1fv: JSString = "uniform1fv" @usableFromInline static let uniform1i: JSString = "uniform1i" @usableFromInline static let uniform1iv: JSString = "uniform1iv" + @usableFromInline static let uniform1ui: JSString = "uniform1ui" + @usableFromInline static let uniform1uiv: JSString = "uniform1uiv" @usableFromInline static let uniform2f: JSString = "uniform2f" @usableFromInline static let uniform2fv: JSString = "uniform2fv" @usableFromInline static let uniform2i: JSString = "uniform2i" @usableFromInline static let uniform2iv: JSString = "uniform2iv" + @usableFromInline static let uniform2ui: JSString = "uniform2ui" + @usableFromInline static let uniform2uiv: JSString = "uniform2uiv" @usableFromInline static let uniform3f: JSString = "uniform3f" @usableFromInline static let uniform3fv: JSString = "uniform3fv" @usableFromInline static let uniform3i: JSString = "uniform3i" @usableFromInline static let uniform3iv: JSString = "uniform3iv" + @usableFromInline static let uniform3ui: JSString = "uniform3ui" + @usableFromInline static let uniform3uiv: JSString = "uniform3uiv" @usableFromInline static let uniform4f: JSString = "uniform4f" @usableFromInline static let uniform4fv: JSString = "uniform4fv" @usableFromInline static let uniform4i: JSString = "uniform4i" @usableFromInline static let uniform4iv: JSString = "uniform4iv" + @usableFromInline static let uniform4ui: JSString = "uniform4ui" + @usableFromInline static let uniform4uiv: JSString = "uniform4uiv" + @usableFromInline static let uniformBlockBinding: JSString = "uniformBlockBinding" @usableFromInline static let uniformMatrix2fv: JSString = "uniformMatrix2fv" + @usableFromInline static let uniformMatrix2x3fv: JSString = "uniformMatrix2x3fv" + @usableFromInline static let uniformMatrix2x4fv: JSString = "uniformMatrix2x4fv" @usableFromInline static let uniformMatrix3fv: JSString = "uniformMatrix3fv" + @usableFromInline static let uniformMatrix3x2fv: JSString = "uniformMatrix3x2fv" + @usableFromInline static let uniformMatrix3x4fv: JSString = "uniformMatrix3x4fv" @usableFromInline static let uniformMatrix4fv: JSString = "uniformMatrix4fv" + @usableFromInline static let uniformMatrix4x2fv: JSString = "uniformMatrix4x2fv" + @usableFromInline static let uniformMatrix4x3fv: JSString = "uniformMatrix4x3fv" @usableFromInline static let unregister: JSString = "unregister" @usableFromInline static let unregisterProtocolHandler: JSString = "unregisterProtocolHandler" @usableFromInline static let upX: JSString = "upX" @@ -24533,6 +26144,12 @@ public enum console { @usableFromInline static let vertexAttrib3fv: JSString = "vertexAttrib3fv" @usableFromInline static let vertexAttrib4f: JSString = "vertexAttrib4f" @usableFromInline static let vertexAttrib4fv: JSString = "vertexAttrib4fv" + @usableFromInline static let vertexAttribDivisor: JSString = "vertexAttribDivisor" + @usableFromInline static let vertexAttribI4i: JSString = "vertexAttribI4i" + @usableFromInline static let vertexAttribI4iv: JSString = "vertexAttribI4iv" + @usableFromInline static let vertexAttribI4ui: JSString = "vertexAttribI4ui" + @usableFromInline static let vertexAttribI4uiv: JSString = "vertexAttribI4uiv" + @usableFromInline static let vertexAttribIPointer: JSString = "vertexAttribIPointer" @usableFromInline static let vertexAttribPointer: JSString = "vertexAttribPointer" @usableFromInline static let video: JSString = "video" @usableFromInline static let videoBitsPerSecond: JSString = "videoBitsPerSecond" @@ -24548,6 +26165,7 @@ public enum console { @usableFromInline static let volume: JSString = "volume" @usableFromInline static let vspace: JSString = "vspace" @usableFromInline static let w: JSString = "w" + @usableFromInline static let waitSync: JSString = "waitSync" @usableFromInline static let waiting: JSString = "waiting" @usableFromInline static let warn: JSString = "warn" @usableFromInline static let wasClean: JSString = "wasClean" @@ -26994,6 +28612,48 @@ public enum TimerHandler: JSValueCompatible, Any_TimerHandler { } } +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 + } + } +} + public protocol Any_XMLHttpRequestBodyInit: ConvertibleToJSValue {} extension Blob: Any_XMLHttpRequestBodyInit {} extension BufferSource: Any_XMLHttpRequestBodyInit {} From a1eea273009188f642c4f9d6dcf38221e7006e95 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 3 May 2022 16:43:21 +0100 Subject: [PATCH 21/21] Uncomment compatible code --- Sources/DOMKit/RenderingContext.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/DOMKit/RenderingContext.swift b/Sources/DOMKit/RenderingContext.swift index 13ef65df..6e493665 100644 --- a/Sources/DOMKit/RenderingContext.swift +++ b/Sources/DOMKit/RenderingContext.swift @@ -7,8 +7,8 @@ public protocol Any_RenderingContext: ConvertibleToJSValue {} extension CanvasRenderingContext2D: Any_RenderingContext {} // extension GPUCanvasContext: Any_RenderingContext {} extension ImageBitmapRenderingContext: Any_RenderingContext {} -// extension WebGL2RenderingContext: Any_RenderingContext {} -// extension WebGLRenderingContext: Any_RenderingContext {} +extension WebGL2RenderingContext: Any_RenderingContext {} +extension WebGLRenderingContext: Any_RenderingContext {} public enum RenderingContext: JSValueCompatible, Any_RenderingContext { case canvasRenderingContext2D(CanvasRenderingContext2D)