Generate Kotlin/JS stdlib dependencies via dukat

This commit is contained in:
Alexey Trilis
2019-10-12 01:39:25 +02:00
committed by Shagen Ogandzhanian
parent 83bb07e5ac
commit b30537de0e
63 changed files with 6806 additions and 6192 deletions
@@ -0,0 +1 @@
*.kt eol=lf
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.khronos.webgl
import kotlin.js.*
@@ -57,7 +56,6 @@ public external interface WebGLContextAttributes {
@kotlin.internal.InlineOnly
public inline fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean? = true, stencil: Boolean? = false, antialias: Boolean? = true, premultipliedAlpha: Boolean? = true, preserveDrawingBuffer: Boolean? = false, preferLowPowerToHighPerformance: Boolean? = false, failIfMajorPerformanceCaveat: Boolean? = false): WebGLContextAttributes {
val o = js("({})")
o["alpha"] = alpha
o["depth"] = depth
o["stencil"] = stencil
@@ -66,54 +64,45 @@ public inline fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean?
o["preserveDrawingBuffer"] = preserveDrawingBuffer
o["preferLowPowerToHighPerformance"] = preferLowPowerToHighPerformance
o["failIfMajorPerformanceCaveat"] = failIfMajorPerformanceCaveat
return o
}
public external abstract class WebGLObject {
}
public external abstract class WebGLObject
/**
* Exposes the JavaScript [WebGLBuffer](https://developer.mozilla.org/en/docs/Web/API/WebGLBuffer) to Kotlin
*/
public external abstract class WebGLBuffer : WebGLObject {
}
public external abstract class WebGLBuffer : WebGLObject
/**
* Exposes the JavaScript [WebGLFramebuffer](https://developer.mozilla.org/en/docs/Web/API/WebGLFramebuffer) to Kotlin
*/
public external abstract class WebGLFramebuffer : WebGLObject {
}
public external abstract class WebGLFramebuffer : WebGLObject
/**
* Exposes the JavaScript [WebGLProgram](https://developer.mozilla.org/en/docs/Web/API/WebGLProgram) to Kotlin
*/
public external abstract class WebGLProgram : WebGLObject {
}
public external abstract class WebGLProgram : WebGLObject
/**
* Exposes the JavaScript [WebGLRenderbuffer](https://developer.mozilla.org/en/docs/Web/API/WebGLRenderbuffer) to Kotlin
*/
public external abstract class WebGLRenderbuffer : WebGLObject {
}
public external abstract class WebGLRenderbuffer : WebGLObject
/**
* Exposes the JavaScript [WebGLShader](https://developer.mozilla.org/en/docs/Web/API/WebGLShader) to Kotlin
*/
public external abstract class WebGLShader : WebGLObject {
}
public external abstract class WebGLShader : WebGLObject
/**
* Exposes the JavaScript [WebGLTexture](https://developer.mozilla.org/en/docs/Web/API/WebGLTexture) to Kotlin
*/
public external abstract class WebGLTexture : WebGLObject {
}
public external abstract class WebGLTexture : WebGLObject
/**
* Exposes the JavaScript [WebGLUniformLocation](https://developer.mozilla.org/en/docs/Web/API/WebGLUniformLocation) to Kotlin
*/
public external abstract class WebGLUniformLocation {
}
public external abstract class WebGLUniformLocation
/**
* Exposes the JavaScript [WebGLActiveInfo](https://developer.mozilla.org/en/docs/Web/API/WebGLActiveInfo) to Kotlin
@@ -133,6 +122,7 @@ public external abstract class WebGLShaderPrecisionFormat {
open val precision: Int
}
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface WebGLRenderingContextBase {
val canvas: HTMLCanvasElement
val drawingBufferWidth: Int
@@ -141,61 +131,61 @@ public external interface WebGLRenderingContextBase {
fun isContextLost(): Boolean
fun getSupportedExtensions(): Array<String>?
fun getExtension(name: String): dynamic
fun activeTexture(texture: Int): Unit
fun attachShader(program: WebGLProgram?, shader: WebGLShader?): Unit
fun bindAttribLocation(program: WebGLProgram?, index: Int, name: String): Unit
fun bindBuffer(target: Int, buffer: WebGLBuffer?): Unit
fun bindFramebuffer(target: Int, framebuffer: WebGLFramebuffer?): Unit
fun bindRenderbuffer(target: Int, renderbuffer: WebGLRenderbuffer?): Unit
fun bindTexture(target: Int, texture: WebGLTexture?): Unit
fun blendColor(red: Float, green: Float, blue: Float, alpha: Float): Unit
fun blendEquation(mode: Int): Unit
fun blendEquationSeparate(modeRGB: Int, modeAlpha: Int): Unit
fun blendFunc(sfactor: Int, dfactor: Int): Unit
fun blendFuncSeparate(srcRGB: Int, dstRGB: Int, srcAlpha: Int, dstAlpha: Int): Unit
fun bufferData(target: Int, size: Int, usage: Int): Unit
fun bufferData(target: Int, data: BufferDataSource?, usage: Int): Unit
fun bufferSubData(target: Int, offset: Int, data: BufferDataSource?): Unit
fun activeTexture(texture: Int)
fun attachShader(program: WebGLProgram?, shader: WebGLShader?)
fun bindAttribLocation(program: WebGLProgram?, index: Int, name: String)
fun bindBuffer(target: Int, buffer: WebGLBuffer?)
fun bindFramebuffer(target: Int, framebuffer: WebGLFramebuffer?)
fun bindRenderbuffer(target: Int, renderbuffer: WebGLRenderbuffer?)
fun bindTexture(target: Int, texture: WebGLTexture?)
fun blendColor(red: Float, green: Float, blue: Float, alpha: Float)
fun blendEquation(mode: Int)
fun blendEquationSeparate(modeRGB: Int, modeAlpha: Int)
fun blendFunc(sfactor: Int, dfactor: Int)
fun blendFuncSeparate(srcRGB: Int, dstRGB: Int, srcAlpha: Int, dstAlpha: Int)
fun bufferData(target: Int, size: Int, usage: Int)
fun bufferData(target: Int, data: BufferDataSource?, usage: Int)
fun bufferSubData(target: Int, offset: Int, data: BufferDataSource?)
fun checkFramebufferStatus(target: Int): Int
fun clear(mask: Int): Unit
fun clearColor(red: Float, green: Float, blue: Float, alpha: Float): Unit
fun clearDepth(depth: Float): Unit
fun clearStencil(s: Int): Unit
fun colorMask(red: Boolean, green: Boolean, blue: Boolean, alpha: Boolean): Unit
fun compileShader(shader: WebGLShader?): Unit
fun compressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, data: ArrayBufferView): Unit
fun compressedTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, data: ArrayBufferView): Unit
fun copyTexImage2D(target: Int, level: Int, internalformat: Int, x: Int, y: Int, width: Int, height: Int, border: Int): Unit
fun copyTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, x: Int, y: Int, width: Int, height: Int): Unit
fun clear(mask: Int)
fun clearColor(red: Float, green: Float, blue: Float, alpha: Float)
fun clearDepth(depth: Float)
fun clearStencil(s: Int)
fun colorMask(red: Boolean, green: Boolean, blue: Boolean, alpha: Boolean)
fun compileShader(shader: WebGLShader?)
fun compressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, data: ArrayBufferView)
fun compressedTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, data: ArrayBufferView)
fun copyTexImage2D(target: Int, level: Int, internalformat: Int, x: Int, y: Int, width: Int, height: Int, border: Int)
fun copyTexSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, x: Int, y: Int, width: Int, height: Int)
fun createBuffer(): WebGLBuffer?
fun createFramebuffer(): WebGLFramebuffer?
fun createProgram(): WebGLProgram?
fun createRenderbuffer(): WebGLRenderbuffer?
fun createShader(type: Int): WebGLShader?
fun createTexture(): WebGLTexture?
fun cullFace(mode: Int): Unit
fun deleteBuffer(buffer: WebGLBuffer?): Unit
fun deleteFramebuffer(framebuffer: WebGLFramebuffer?): Unit
fun deleteProgram(program: WebGLProgram?): Unit
fun deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?): Unit
fun deleteShader(shader: WebGLShader?): Unit
fun deleteTexture(texture: WebGLTexture?): Unit
fun depthFunc(func: Int): Unit
fun depthMask(flag: Boolean): Unit
fun depthRange(zNear: Float, zFar: Float): Unit
fun detachShader(program: WebGLProgram?, shader: WebGLShader?): Unit
fun disable(cap: Int): Unit
fun disableVertexAttribArray(index: Int): Unit
fun drawArrays(mode: Int, first: Int, count: Int): Unit
fun drawElements(mode: Int, count: Int, type: Int, offset: Int): Unit
fun enable(cap: Int): Unit
fun enableVertexAttribArray(index: Int): Unit
fun finish(): Unit
fun flush(): Unit
fun framebufferRenderbuffer(target: Int, attachment: Int, renderbuffertarget: Int, renderbuffer: WebGLRenderbuffer?): Unit
fun framebufferTexture2D(target: Int, attachment: Int, textarget: Int, texture: WebGLTexture?, level: Int): Unit
fun frontFace(mode: Int): Unit
fun generateMipmap(target: Int): Unit
fun cullFace(mode: Int)
fun deleteBuffer(buffer: WebGLBuffer?)
fun deleteFramebuffer(framebuffer: WebGLFramebuffer?)
fun deleteProgram(program: WebGLProgram?)
fun deleteRenderbuffer(renderbuffer: WebGLRenderbuffer?)
fun deleteShader(shader: WebGLShader?)
fun deleteTexture(texture: WebGLTexture?)
fun depthFunc(func: Int)
fun depthMask(flag: Boolean)
fun depthRange(zNear: Float, zFar: Float)
fun detachShader(program: WebGLProgram?, shader: WebGLShader?)
fun disable(cap: Int)
fun disableVertexAttribArray(index: Int)
fun drawArrays(mode: Int, first: Int, count: Int)
fun drawElements(mode: Int, count: Int, type: Int, offset: Int)
fun enable(cap: Int)
fun enableVertexAttribArray(index: Int)
fun finish()
fun flush()
fun framebufferRenderbuffer(target: Int, attachment: Int, renderbuffertarget: Int, renderbuffer: WebGLRenderbuffer?)
fun framebufferTexture2D(target: Int, attachment: Int, textarget: Int, texture: WebGLTexture?, level: Int)
fun frontFace(mode: Int)
fun generateMipmap(target: Int)
fun getActiveAttrib(program: WebGLProgram?, index: Int): WebGLActiveInfo?
fun getActiveUniform(program: WebGLProgram?, index: Int): WebGLActiveInfo?
fun getAttachedShaders(program: WebGLProgram?): Array<WebGLShader>?
@@ -216,7 +206,7 @@ public external interface WebGLRenderingContextBase {
fun getUniformLocation(program: WebGLProgram?, name: String): WebGLUniformLocation?
fun getVertexAttrib(index: Int, pname: Int): Any?
fun getVertexAttribOffset(index: Int, pname: Int): Int
fun hint(target: Int, mode: Int): Unit
fun hint(target: Int, mode: Int)
fun isBuffer(buffer: WebGLBuffer?): Boolean
fun isEnabled(cap: Int): Boolean
fun isFramebuffer(framebuffer: WebGLFramebuffer?): Boolean
@@ -224,69 +214,69 @@ public external interface WebGLRenderingContextBase {
fun isRenderbuffer(renderbuffer: WebGLRenderbuffer?): Boolean
fun isShader(shader: WebGLShader?): Boolean
fun isTexture(texture: WebGLTexture?): Boolean
fun lineWidth(width: Float): Unit
fun linkProgram(program: WebGLProgram?): Unit
fun pixelStorei(pname: Int, param: Int): Unit
fun polygonOffset(factor: Float, units: Float): Unit
fun readPixels(x: Int, y: Int, width: Int, height: Int, format: Int, type: Int, pixels: ArrayBufferView?): Unit
fun renderbufferStorage(target: Int, internalformat: Int, width: Int, height: Int): Unit
fun sampleCoverage(value: Float, invert: Boolean): Unit
fun scissor(x: Int, y: Int, width: Int, height: Int): Unit
fun shaderSource(shader: WebGLShader?, source: String): Unit
fun stencilFunc(func: Int, ref: Int, mask: Int): Unit
fun stencilFuncSeparate(face: Int, func: Int, ref: Int, mask: Int): Unit
fun stencilMask(mask: Int): Unit
fun stencilMaskSeparate(face: Int, mask: Int): Unit
fun stencilOp(fail: Int, zfail: Int, zpass: Int): Unit
fun stencilOpSeparate(face: Int, fail: Int, zfail: Int, zpass: Int): Unit
fun texImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, format: Int, type: Int, pixels: ArrayBufferView?): Unit
fun texImage2D(target: Int, level: Int, internalformat: Int, format: Int, type: Int, source: TexImageSource?): Unit
fun texParameterf(target: Int, pname: Int, param: Float): Unit
fun texParameteri(target: Int, pname: Int, param: Int): Unit
fun texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, type: Int, pixels: ArrayBufferView?): Unit
fun texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, source: TexImageSource?): Unit
fun uniform1f(location: WebGLUniformLocation?, x: Float): Unit
fun uniform1fv(location: WebGLUniformLocation?, v: Float32Array): Unit
fun uniform1fv(location: WebGLUniformLocation?, v: Array<Float>): Unit
fun uniform1i(location: WebGLUniformLocation?, x: Int): Unit
fun uniform1iv(location: WebGLUniformLocation?, v: Int32Array): Unit
fun uniform1iv(location: WebGLUniformLocation?, v: Array<Int>): Unit
fun uniform2f(location: WebGLUniformLocation?, x: Float, y: Float): Unit
fun uniform2fv(location: WebGLUniformLocation?, v: Float32Array): Unit
fun uniform2fv(location: WebGLUniformLocation?, v: Array<Float>): Unit
fun uniform2i(location: WebGLUniformLocation?, x: Int, y: Int): Unit
fun uniform2iv(location: WebGLUniformLocation?, v: Int32Array): Unit
fun uniform2iv(location: WebGLUniformLocation?, v: Array<Int>): Unit
fun uniform3f(location: WebGLUniformLocation?, x: Float, y: Float, z: Float): Unit
fun uniform3fv(location: WebGLUniformLocation?, v: Float32Array): Unit
fun uniform3fv(location: WebGLUniformLocation?, v: Array<Float>): Unit
fun uniform3i(location: WebGLUniformLocation?, x: Int, y: Int, z: Int): Unit
fun uniform3iv(location: WebGLUniformLocation?, v: Int32Array): Unit
fun uniform3iv(location: WebGLUniformLocation?, v: Array<Int>): Unit
fun uniform4f(location: WebGLUniformLocation?, x: Float, y: Float, z: Float, w: Float): Unit
fun uniform4fv(location: WebGLUniformLocation?, v: Float32Array): Unit
fun uniform4fv(location: WebGLUniformLocation?, v: Array<Float>): Unit
fun uniform4i(location: WebGLUniformLocation?, x: Int, y: Int, z: Int, w: Int): Unit
fun uniform4iv(location: WebGLUniformLocation?, v: Int32Array): Unit
fun uniform4iv(location: WebGLUniformLocation?, v: Array<Int>): Unit
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array): Unit
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>): Unit
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array): Unit
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>): Unit
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array): Unit
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>): Unit
fun useProgram(program: WebGLProgram?): Unit
fun validateProgram(program: WebGLProgram?): Unit
fun vertexAttrib1f(index: Int, x: Float): Unit
fun vertexAttrib1fv(index: Int, values: dynamic): Unit
fun vertexAttrib2f(index: Int, x: Float, y: Float): Unit
fun vertexAttrib2fv(index: Int, values: dynamic): Unit
fun vertexAttrib3f(index: Int, x: Float, y: Float, z: Float): Unit
fun vertexAttrib3fv(index: Int, values: dynamic): Unit
fun vertexAttrib4f(index: Int, x: Float, y: Float, z: Float, w: Float): Unit
fun vertexAttrib4fv(index: Int, values: dynamic): Unit
fun vertexAttribPointer(index: Int, size: Int, type: Int, normalized: Boolean, stride: Int, offset: Int): Unit
fun viewport(x: Int, y: Int, width: Int, height: Int): Unit
fun lineWidth(width: Float)
fun linkProgram(program: WebGLProgram?)
fun pixelStorei(pname: Int, param: Int)
fun polygonOffset(factor: Float, units: Float)
fun readPixels(x: Int, y: Int, width: Int, height: Int, format: Int, type: Int, pixels: ArrayBufferView?)
fun renderbufferStorage(target: Int, internalformat: Int, width: Int, height: Int)
fun sampleCoverage(value: Float, invert: Boolean)
fun scissor(x: Int, y: Int, width: Int, height: Int)
fun shaderSource(shader: WebGLShader?, source: String)
fun stencilFunc(func: Int, ref: Int, mask: Int)
fun stencilFuncSeparate(face: Int, func: Int, ref: Int, mask: Int)
fun stencilMask(mask: Int)
fun stencilMaskSeparate(face: Int, mask: Int)
fun stencilOp(fail: Int, zfail: Int, zpass: Int)
fun stencilOpSeparate(face: Int, fail: Int, zfail: Int, zpass: Int)
fun texImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, format: Int, type: Int, pixels: ArrayBufferView?)
fun texImage2D(target: Int, level: Int, internalformat: Int, format: Int, type: Int, source: TexImageSource?)
fun texParameterf(target: Int, pname: Int, param: Float)
fun texParameteri(target: Int, pname: Int, param: Int)
fun texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, width: Int, height: Int, format: Int, type: Int, pixels: ArrayBufferView?)
fun texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, source: TexImageSource?)
fun uniform1f(location: WebGLUniformLocation?, x: Float)
fun uniform1fv(location: WebGLUniformLocation?, v: Float32Array)
fun uniform1fv(location: WebGLUniformLocation?, v: Array<Float>)
fun uniform1i(location: WebGLUniformLocation?, x: Int)
fun uniform1iv(location: WebGLUniformLocation?, v: Int32Array)
fun uniform1iv(location: WebGLUniformLocation?, v: Array<Int>)
fun uniform2f(location: WebGLUniformLocation?, x: Float, y: Float)
fun uniform2fv(location: WebGLUniformLocation?, v: Float32Array)
fun uniform2fv(location: WebGLUniformLocation?, v: Array<Float>)
fun uniform2i(location: WebGLUniformLocation?, x: Int, y: Int)
fun uniform2iv(location: WebGLUniformLocation?, v: Int32Array)
fun uniform2iv(location: WebGLUniformLocation?, v: Array<Int>)
fun uniform3f(location: WebGLUniformLocation?, x: Float, y: Float, z: Float)
fun uniform3fv(location: WebGLUniformLocation?, v: Float32Array)
fun uniform3fv(location: WebGLUniformLocation?, v: Array<Float>)
fun uniform3i(location: WebGLUniformLocation?, x: Int, y: Int, z: Int)
fun uniform3iv(location: WebGLUniformLocation?, v: Int32Array)
fun uniform3iv(location: WebGLUniformLocation?, v: Array<Int>)
fun uniform4f(location: WebGLUniformLocation?, x: Float, y: Float, z: Float, w: Float)
fun uniform4fv(location: WebGLUniformLocation?, v: Float32Array)
fun uniform4fv(location: WebGLUniformLocation?, v: Array<Float>)
fun uniform4i(location: WebGLUniformLocation?, x: Int, y: Int, z: Int, w: Int)
fun uniform4iv(location: WebGLUniformLocation?, v: Int32Array)
fun uniform4iv(location: WebGLUniformLocation?, v: Array<Int>)
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array)
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>)
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array)
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>)
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array)
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>)
fun useProgram(program: WebGLProgram?)
fun validateProgram(program: WebGLProgram?)
fun vertexAttrib1f(index: Int, x: Float)
fun vertexAttrib1fv(index: Int, values: dynamic)
fun vertexAttrib2f(index: Int, x: Float, y: Float)
fun vertexAttrib2fv(index: Int, values: dynamic)
fun vertexAttrib3f(index: Int, x: Float, y: Float, z: Float)
fun vertexAttrib3fv(index: Int, values: dynamic)
fun vertexAttrib4f(index: Int, x: Float, y: Float, z: Float, w: Float)
fun vertexAttrib4fv(index: Int, values: dynamic)
fun vertexAttribPointer(index: Int, size: Int, type: Int, normalized: Boolean, stride: Int, offset: Int)
fun viewport(x: Int, y: Int, width: Int, height: Int)
companion object {
val DEPTH_BUFFER_BIT: Int
@@ -593,7 +583,6 @@ public external interface WebGLRenderingContextBase {
* Exposes the JavaScript [WebGLRenderingContext](https://developer.mozilla.org/en/docs/Web/API/WebGLRenderingContext) to Kotlin
*/
public external abstract class WebGLRenderingContext : WebGLRenderingContextBase, RenderingContext {
companion object {
val DEPTH_BUFFER_BIT: Int
val STENCIL_BUFFER_BIT: Int
@@ -900,6 +889,13 @@ public external abstract class WebGLRenderingContext : WebGLRenderingContextBase
*/
public external open class WebGLContextEvent(type: String, eventInit: WebGLContextEventInit = definedExternally) : Event {
open val statusMessage: String
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface WebGLContextEventInit : EventInit {
@@ -911,12 +907,10 @@ public external interface WebGLContextEventInit : EventInit {
@kotlin.internal.InlineOnly
public inline fun WebGLContextEventInit(statusMessage: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WebGLContextEventInit {
val o = js("({})")
o["statusMessage"] = statusMessage
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -953,16 +947,20 @@ public external open class Int8Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Int8Array, offset: Int = definedExternally): Unit
fun set(array: Array<Byte>, offset: Int = definedExternally): Unit
fun set(array: Int8Array, offset: Int = definedExternally)
fun set(array: Array<Byte>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Int8Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Int8Array.get(index: Int): Byte = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Int8Array.set(index: Int, value: Byte): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Int8Array.get(index: Int): Byte = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Int8Array.set(index: Int, value: Byte) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Uint8Array](https://developer.mozilla.org/en/docs/Web/API/Uint8Array) to Kotlin
@@ -976,16 +974,20 @@ public external open class Uint8Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Uint8Array, offset: Int = definedExternally): Unit
fun set(array: Array<Byte>, offset: Int = definedExternally): Unit
fun set(array: Uint8Array, offset: Int = definedExternally)
fun set(array: Array<Byte>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Uint8Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Uint8Array.get(index: Int): Byte = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Uint8Array.set(index: Int, value: Byte): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Uint8Array.get(index: Int): Byte = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Uint8Array.set(index: Int, value: Byte) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Uint8ClampedArray](https://developer.mozilla.org/en/docs/Web/API/Uint8ClampedArray) to Kotlin
@@ -999,16 +1001,20 @@ public external open class Uint8ClampedArray : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Uint8ClampedArray, offset: Int = definedExternally): Unit
fun set(array: Array<Byte>, offset: Int = definedExternally): Unit
fun set(array: Uint8ClampedArray, offset: Int = definedExternally)
fun set(array: Array<Byte>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Uint8ClampedArray
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Uint8ClampedArray.get(index: Int): Byte = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Uint8ClampedArray.set(index: Int, value: Byte): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Uint8ClampedArray.get(index: Int): Byte = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Uint8ClampedArray.set(index: Int, value: Byte) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Int16Array](https://developer.mozilla.org/en/docs/Web/API/Int16Array) to Kotlin
@@ -1022,16 +1028,20 @@ public external open class Int16Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Int16Array, offset: Int = definedExternally): Unit
fun set(array: Array<Short>, offset: Int = definedExternally): Unit
fun set(array: Int16Array, offset: Int = definedExternally)
fun set(array: Array<Short>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Int16Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Int16Array.get(index: Int): Short = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Int16Array.set(index: Int, value: Short): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Int16Array.get(index: Int): Short = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Int16Array.set(index: Int, value: Short) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Uint16Array](https://developer.mozilla.org/en/docs/Web/API/Uint16Array) to Kotlin
@@ -1045,16 +1055,20 @@ public external open class Uint16Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Uint16Array, offset: Int = definedExternally): Unit
fun set(array: Array<Short>, offset: Int = definedExternally): Unit
fun set(array: Uint16Array, offset: Int = definedExternally)
fun set(array: Array<Short>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Uint16Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Uint16Array.get(index: Int): Short = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Uint16Array.set(index: Int, value: Short): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Uint16Array.get(index: Int): Short = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Uint16Array.set(index: Int, value: Short) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Int32Array](https://developer.mozilla.org/en/docs/Web/API/Int32Array) to Kotlin
@@ -1068,16 +1082,20 @@ public external open class Int32Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Int32Array, offset: Int = definedExternally): Unit
fun set(array: Array<Int>, offset: Int = definedExternally): Unit
fun set(array: Int32Array, offset: Int = definedExternally)
fun set(array: Array<Int>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Int32Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Int32Array.get(index: Int): Int = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Int32Array.set(index: Int, value: Int): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Int32Array.get(index: Int): Int = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Int32Array.set(index: Int, value: Int) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Uint32Array](https://developer.mozilla.org/en/docs/Web/API/Uint32Array) to Kotlin
@@ -1091,16 +1109,20 @@ public external open class Uint32Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Uint32Array, offset: Int = definedExternally): Unit
fun set(array: Array<Int>, offset: Int = definedExternally): Unit
fun set(array: Uint32Array, offset: Int = definedExternally)
fun set(array: Array<Int>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Uint32Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Uint32Array.get(index: Int): Int = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Uint32Array.set(index: Int, value: Int): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Uint32Array.get(index: Int): Int = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Uint32Array.set(index: Int, value: Int) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Float32Array](https://developer.mozilla.org/en/docs/Web/API/Float32Array) to Kotlin
@@ -1114,16 +1136,20 @@ public external open class Float32Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Float32Array, offset: Int = definedExternally): Unit
fun set(array: Array<Float>, offset: Int = definedExternally): Unit
fun set(array: Float32Array, offset: Int = definedExternally)
fun set(array: Array<Float>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Float32Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Float32Array.get(index: Int): Float = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Float32Array.set(index: Int, value: Float): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Float32Array.get(index: Int): Float = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Float32Array.set(index: Int, value: Float) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [Float64Array](https://developer.mozilla.org/en/docs/Web/API/Float64Array) to Kotlin
@@ -1137,16 +1163,20 @@ public external open class Float64Array : ArrayBufferView {
override val buffer: ArrayBuffer
override val byteOffset: Int
override val byteLength: Int
fun set(array: Float64Array, offset: Int = definedExternally): Unit
fun set(array: Array<Double>, offset: Int = definedExternally): Unit
fun set(array: Float64Array, offset: Int = definedExternally)
fun set(array: Array<Double>, offset: Int = definedExternally)
fun subarray(start: Int, end: Int): Float64Array
companion object {
val BYTES_PER_ELEMENT: Int
}
}
@kotlin.internal.InlineOnly inline operator fun Float64Array.get(index: Int): Double = asDynamic()[index]
@kotlin.internal.InlineOnly inline operator fun Float64Array.set(index: Int, value: Double): Unit { asDynamic()[index] = value; }
@kotlin.internal.InlineOnly
public inline operator fun Float64Array.get(index: Int): Double = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun Float64Array.set(index: Int, value: Double) { asDynamic()[index] = value }
/**
* Exposes the JavaScript [DataView](https://developer.mozilla.org/en/docs/Web/API/DataView) to Kotlin
@@ -1163,19 +1193,16 @@ public external open class DataView(buffer: ArrayBuffer, byteOffset: Int = defin
fun getUint32(byteOffset: Int, littleEndian: Boolean = definedExternally): Int
fun getFloat32(byteOffset: Int, littleEndian: Boolean = definedExternally): Float
fun getFloat64(byteOffset: Int, littleEndian: Boolean = definedExternally): Double
fun setInt8(byteOffset: Int, value: Byte): Unit
fun setUint8(byteOffset: Int, value: Byte): Unit
fun setInt16(byteOffset: Int, value: Short, littleEndian: Boolean = definedExternally): Unit
fun setUint16(byteOffset: Int, value: Short, littleEndian: Boolean = definedExternally): Unit
fun setInt32(byteOffset: Int, value: Int, littleEndian: Boolean = definedExternally): Unit
fun setUint32(byteOffset: Int, value: Int, littleEndian: Boolean = definedExternally): Unit
fun setFloat32(byteOffset: Int, value: Float, littleEndian: Boolean = definedExternally): Unit
fun setFloat64(byteOffset: Int, value: Double, littleEndian: Boolean = definedExternally): Unit
fun setInt8(byteOffset: Int, value: Byte)
fun setUint8(byteOffset: Int, value: Byte)
fun setInt16(byteOffset: Int, value: Short, littleEndian: Boolean = definedExternally)
fun setUint16(byteOffset: Int, value: Short, littleEndian: Boolean = definedExternally)
fun setInt32(byteOffset: Int, value: Int, littleEndian: Boolean = definedExternally)
fun setUint32(byteOffset: Int, value: Int, littleEndian: Boolean = definedExternally)
fun setFloat32(byteOffset: Int, value: Float, littleEndian: Boolean = definedExternally)
fun setFloat64(byteOffset: Int, value: Double, littleEndian: Boolean = definedExternally)
}
public external @marker interface BufferDataSource {
}
public external @marker interface TexImageSource {
}
public external interface BufferDataSource
public external interface TexImageSource
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.css.masking
import kotlin.js.*
@@ -38,6 +37,24 @@ public external abstract class SVGClipPathElement : SVGElement, SVGUnitTypes {
val SVG_UNIT_TYPE_UNKNOWN: Short
val SVG_UNIT_TYPE_USERSPACEONUSE: Short
val SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: Short
val ELEMENT_NODE: Short
val ATTRIBUTE_NODE: Short
val TEXT_NODE: Short
val CDATA_SECTION_NODE: Short
val ENTITY_REFERENCE_NODE: Short
val ENTITY_NODE: Short
val PROCESSING_INSTRUCTION_NODE: Short
val COMMENT_NODE: Short
val DOCUMENT_NODE: Short
val DOCUMENT_TYPE_NODE: Short
val DOCUMENT_FRAGMENT_NODE: Short
val NOTATION_NODE: Short
val DOCUMENT_POSITION_DISCONNECTED: Short
val DOCUMENT_POSITION_PRECEDING: Short
val DOCUMENT_POSITION_FOLLOWING: Short
val DOCUMENT_POSITION_CONTAINS: Short
val DOCUMENT_POSITION_CONTAINED_BY: Short
val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short
}
}
@@ -56,6 +73,23 @@ public external abstract class SVGMaskElement : SVGElement, SVGUnitTypes {
val SVG_UNIT_TYPE_UNKNOWN: Short
val SVG_UNIT_TYPE_USERSPACEONUSE: Short
val SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: Short
val ELEMENT_NODE: Short
val ATTRIBUTE_NODE: Short
val TEXT_NODE: Short
val CDATA_SECTION_NODE: Short
val ENTITY_REFERENCE_NODE: Short
val ENTITY_NODE: Short
val PROCESSING_INSTRUCTION_NODE: Short
val COMMENT_NODE: Short
val DOCUMENT_NODE: Short
val DOCUMENT_TYPE_NODE: Short
val DOCUMENT_FRAGMENT_NODE: Short
val NOTATION_NODE: Short
val DOCUMENT_POSITION_DISCONNECTED: Short
val DOCUMENT_POSITION_PRECEDING: Short
val DOCUMENT_POSITION_FOLLOWING: Short
val DOCUMENT_POSITION_CONTAINS: Short
val DOCUMENT_POSITION_CONTAINED_BY: Short
val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short
}
}
}
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.clipboard
import kotlin.js.*
@@ -36,12 +35,10 @@ public external interface ClipboardEventInit : EventInit {
@kotlin.internal.InlineOnly
public inline fun ClipboardEventInit(clipboardData: DataTransfer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ClipboardEventInit {
val o = js("({})")
o["clipboardData"] = clipboardData
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -50,6 +47,13 @@ public inline fun ClipboardEventInit(clipboardData: DataTransfer? = null, bubble
*/
public external open class ClipboardEvent(type: String, eventInitDict: ClipboardEventInit = definedExternally) : Event {
open val clipboardData: DataTransfer?
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
/**
@@ -71,9 +75,6 @@ public external interface ClipboardPermissionDescriptor {
@kotlin.internal.InlineOnly
public inline fun ClipboardPermissionDescriptor(allowWithoutGesture: Boolean? = false): ClipboardPermissionDescriptor {
val o = js("({})")
o["allowWithoutGesture"] = allowWithoutGesture
return o
}
}
+222 -141
View File
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.css
import kotlin.js.*
@@ -27,17 +26,223 @@ import org.w3c.performance.*
import org.w3c.workers.*
import org.w3c.xhr.*
public external abstract class MediaList : ItemArrayLike<String> {
open var mediaText: String
fun appendMedium(medium: String)
fun deleteMedium(medium: String)
override fun item(index: Int): String?
}
@kotlin.internal.InlineOnly
public inline operator fun MediaList.get(index: Int): String? = asDynamic()[index]
/**
* Exposes the JavaScript [StyleSheet](https://developer.mozilla.org/en/docs/Web/API/StyleSheet) to Kotlin
*/
public external abstract class StyleSheet {
open val type: String
open val href: String?
open val ownerNode: UnionElementOrProcessingInstruction?
open val parentStyleSheet: StyleSheet?
open val title: String?
open val media: MediaList
open var disabled: Boolean
}
/**
* Exposes the JavaScript [CSSStyleSheet](https://developer.mozilla.org/en/docs/Web/API/CSSStyleSheet) to Kotlin
*/
public external abstract class CSSStyleSheet : StyleSheet {
open val ownerRule: CSSRule?
open val cssRules: CSSRuleList
fun insertRule(rule: String, index: Int): Int
fun deleteRule(index: Int)
}
/**
* Exposes the JavaScript [StyleSheetList](https://developer.mozilla.org/en/docs/Web/API/StyleSheetList) to Kotlin
*/
public external abstract class StyleSheetList : ItemArrayLike<StyleSheet> {
override fun item(index: Int): StyleSheet?
}
@kotlin.internal.InlineOnly
public inline operator fun StyleSheetList.get(index: Int): StyleSheet? = asDynamic()[index]
/**
* Exposes the JavaScript [LinkStyle](https://developer.mozilla.org/en/docs/Web/API/LinkStyle) to Kotlin
*/
public external interface LinkStyle {
val sheet: StyleSheet?
get() = definedExternally
}
/**
* Exposes the JavaScript [CSSRuleList](https://developer.mozilla.org/en/docs/Web/API/CSSRuleList) to Kotlin
*/
public external abstract class CSSRuleList : ItemArrayLike<CSSRule> {
override fun item(index: Int): CSSRule?
}
@kotlin.internal.InlineOnly
public inline operator fun CSSRuleList.get(index: Int): CSSRule? = asDynamic()[index]
/**
* Exposes the JavaScript [CSSRule](https://developer.mozilla.org/en/docs/Web/API/CSSRule) to Kotlin
*/
public external abstract class CSSRule {
open val type: Short
open var cssText: String
open val parentRule: CSSRule?
open val parentStyleSheet: CSSStyleSheet?
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSStyleRule](https://developer.mozilla.org/en/docs/Web/API/CSSStyleRule) to Kotlin
*/
public external abstract class CSSStyleRule : CSSRule {
open var selectorText: String
open val style: CSSStyleDeclaration
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
public external abstract class CSSImportRule : CSSRule {
open val href: String
open val media: MediaList
open val styleSheet: CSSStyleSheet
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSGroupingRule](https://developer.mozilla.org/en/docs/Web/API/CSSGroupingRule) to Kotlin
*/
public external abstract class CSSGroupingRule : CSSRule {
open val cssRules: CSSRuleList
fun insertRule(rule: String, index: Int): Int
fun deleteRule(index: Int)
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSMediaRule](https://developer.mozilla.org/en/docs/Web/API/CSSMediaRule) to Kotlin
*/
public external abstract class CSSMediaRule : CSSGroupingRule {
open val media: MediaList
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSPageRule](https://developer.mozilla.org/en/docs/Web/API/CSSPageRule) to Kotlin
*/
public external abstract class CSSPageRule : CSSGroupingRule {
open var selectorText: String
open val style: CSSStyleDeclaration
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
public external abstract class CSSMarginRule : CSSRule {
open val name: String
open val style: CSSStyleDeclaration
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSNamespaceRule](https://developer.mozilla.org/en/docs/Web/API/CSSNamespaceRule) to Kotlin
*/
public external abstract class CSSNamespaceRule : CSSRule {
open val namespaceURI: String
open val prefix: String
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSStyleDeclaration](https://developer.mozilla.org/en/docs/Web/API/CSSStyleDeclaration) to Kotlin
*/
public external abstract class CSSStyleDeclaration : ItemArrayLike<String> {
open var cssText: String
override val length: Int
open val parentRule: CSSRule?
open var cssFloat: String
open var _dashed_attribute: String
open var _camel_cased_attribute: String
open var _webkit_cased_attribute: String
open var alignContent: String
open var alignItems: String
open var alignSelf: String
@@ -261,144 +466,20 @@ public external abstract class CSSStyleDeclaration : ItemArrayLike<String> {
open var wordWrap: String
open var writingMode: String
open var zIndex: String
override fun item(index: Int): String
open var _dashed_attribute: String
open var _camel_cased_attribute: String
open var _webkit_cased_attribute: String
fun getPropertyValue(property: String): String
fun getPropertyPriority(property: String): String
fun setProperty(property: String, value: String, priority: String = definedExternally): Unit
fun setPropertyValue(property: String, value: String): Unit
fun setPropertyPriority(property: String, priority: String): Unit
fun setProperty(property: String, value: String, priority: String = definedExternally)
fun setPropertyValue(property: String, value: String)
fun setPropertyPriority(property: String, priority: String)
fun removeProperty(property: String): String
}
@kotlin.internal.InlineOnly inline operator fun CSSStyleDeclaration.get(index: Int): String? = asDynamic()[index]
public external abstract class MediaList : ItemArrayLike<String> {
open var mediaText: String
override val length: Int
override fun item(index: Int): String?
fun appendMedium(medium: String): Unit
fun deleteMedium(medium: String): Unit
}
@kotlin.internal.InlineOnly inline operator fun MediaList.get(index: Int): String? = asDynamic()[index]
/**
* Exposes the JavaScript [StyleSheet](https://developer.mozilla.org/en/docs/Web/API/StyleSheet) to Kotlin
*/
public external abstract class StyleSheet {
open val type: String
open val href: String?
open val ownerNode: UnionElementOrProcessingInstruction?
open val parentStyleSheet: StyleSheet?
open val title: String?
open val media: MediaList
open var disabled: Boolean
override fun item(index: Int): String
}
/**
* Exposes the JavaScript [CSSStyleSheet](https://developer.mozilla.org/en/docs/Web/API/CSSStyleSheet) to Kotlin
*/
public external abstract class CSSStyleSheet : StyleSheet {
open val ownerRule: CSSRule?
open val cssRules: CSSRuleList
fun insertRule(rule: String, index: Int): Int
fun deleteRule(index: Int): Unit
}
/**
* Exposes the JavaScript [StyleSheetList](https://developer.mozilla.org/en/docs/Web/API/StyleSheetList) to Kotlin
*/
public external abstract class StyleSheetList : ItemArrayLike<StyleSheet> {
override val length: Int
override fun item(index: Int): StyleSheet?
}
@kotlin.internal.InlineOnly inline operator fun StyleSheetList.get(index: Int): StyleSheet? = asDynamic()[index]
/**
* Exposes the JavaScript [LinkStyle](https://developer.mozilla.org/en/docs/Web/API/LinkStyle) to Kotlin
*/
public external interface LinkStyle {
val sheet: StyleSheet?
}
/**
* Exposes the JavaScript [CSSRuleList](https://developer.mozilla.org/en/docs/Web/API/CSSRuleList) to Kotlin
*/
public external abstract class CSSRuleList : ItemArrayLike<CSSRule> {
override val length: Int
override fun item(index: Int): CSSRule?
}
@kotlin.internal.InlineOnly inline operator fun CSSRuleList.get(index: Int): CSSRule? = asDynamic()[index]
/**
* Exposes the JavaScript [CSSRule](https://developer.mozilla.org/en/docs/Web/API/CSSRule) to Kotlin
*/
public external abstract class CSSRule {
open val type: Short
open var cssText: String
open val parentRule: CSSRule?
open val parentStyleSheet: CSSStyleSheet?
companion object {
val STYLE_RULE: Short
val CHARSET_RULE: Short
val IMPORT_RULE: Short
val MEDIA_RULE: Short
val FONT_FACE_RULE: Short
val PAGE_RULE: Short
val MARGIN_RULE: Short
val NAMESPACE_RULE: Short
}
}
/**
* Exposes the JavaScript [CSSStyleRule](https://developer.mozilla.org/en/docs/Web/API/CSSStyleRule) to Kotlin
*/
public external abstract class CSSStyleRule : CSSRule {
open var selectorText: String
open val style: CSSStyleDeclaration
}
public external abstract class CSSImportRule : CSSRule {
open val href: String
open val media: MediaList
open val styleSheet: CSSStyleSheet
}
/**
* Exposes the JavaScript [CSSGroupingRule](https://developer.mozilla.org/en/docs/Web/API/CSSGroupingRule) to Kotlin
*/
public external abstract class CSSGroupingRule : CSSRule {
open val cssRules: CSSRuleList
fun insertRule(rule: String, index: Int): Int
fun deleteRule(index: Int): Unit
}
/**
* Exposes the JavaScript [CSSMediaRule](https://developer.mozilla.org/en/docs/Web/API/CSSMediaRule) to Kotlin
*/
public external abstract class CSSMediaRule : CSSGroupingRule {
open val media: MediaList
}
/**
* Exposes the JavaScript [CSSPageRule](https://developer.mozilla.org/en/docs/Web/API/CSSPageRule) to Kotlin
*/
public external abstract class CSSPageRule : CSSGroupingRule {
open var selectorText: String
open val style: CSSStyleDeclaration
}
public external abstract class CSSMarginRule : CSSRule {
open val name: String
open val style: CSSStyleDeclaration
}
/**
* Exposes the JavaScript [CSSNamespaceRule](https://developer.mozilla.org/en/docs/Web/API/CSSNamespaceRule) to Kotlin
*/
public external abstract class CSSNamespaceRule : CSSRule {
open val namespaceURI: String
open val prefix: String
}
@kotlin.internal.InlineOnly
public inline operator fun CSSStyleDeclaration.get(index: Int): String? = asDynamic()[index]
public external interface ElementCSSInlineStyle {
val style: CSSStyleDeclaration
@@ -408,9 +489,9 @@ public external interface ElementCSSInlineStyle {
* Exposes the JavaScript [CSS](https://developer.mozilla.org/en/docs/Web/API/CSS) to Kotlin
*/
public external abstract class CSS {
companion object {
fun escape(ident: String): String
}
}
public external interface UnionElementOrProcessingInstruction
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.events
import kotlin.js.*
@@ -33,6 +32,13 @@ import org.w3c.xhr.*
public external open class UIEvent(type: String, eventInitDict: UIEventInit = definedExternally) : Event {
open val view: Window?
open val detail: Int
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface UIEventInit : EventInit {
@@ -47,13 +53,11 @@ public external interface UIEventInit : EventInit {
@kotlin.internal.InlineOnly
public inline fun UIEventInit(view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): UIEventInit {
val o = js("({})")
o["view"] = view
o["detail"] = detail
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -62,6 +66,13 @@ public inline fun UIEventInit(view: Window? = null, detail: Int? = 0, bubbles: B
*/
public external open class FocusEvent(type: String, eventInitDict: FocusEventInit = definedExternally) : UIEvent {
open val relatedTarget: EventTarget?
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface FocusEventInit : UIEventInit {
@@ -73,14 +84,12 @@ public external interface FocusEventInit : UIEventInit {
@kotlin.internal.InlineOnly
public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FocusEventInit {
val o = js("({})")
o["relatedTarget"] = relatedTarget
o["view"] = view
o["detail"] = detail
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -88,15 +97,10 @@ public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Windo
* Exposes the JavaScript [MouseEvent](https://developer.mozilla.org/en/docs/Web/API/MouseEvent) to Kotlin
*/
public external open class MouseEvent(type: String, eventInitDict: MouseEventInit = definedExternally) : UIEvent, UnionElementOrMouseEvent {
open val region: String?
open val screenX: Int
open val screenY: Int
open val pageX: Double
open val pageY: Double
open val clientX: Int
open val clientY: Int
open val offsetX: Double
open val offsetY: Double
open val ctrlKey: Boolean
open val shiftKey: Boolean
open val altKey: Boolean
@@ -104,7 +108,21 @@ public external open class MouseEvent(type: String, eventInitDict: MouseEventIni
open val button: Short
open val buttons: Short
open val relatedTarget: EventTarget?
open val region: String?
open val pageX: Double
open val pageY: Double
open val x: Double
open val y: Double
open val offsetX: Double
open val offsetY: Double
fun getModifierState(keyArg: String): Boolean
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface MouseEventInit : EventModifierInit {
@@ -129,12 +147,14 @@ public external interface MouseEventInit : EventModifierInit {
var relatedTarget: EventTarget? /* = null */
get() = definedExternally
set(value) = definedExternally
var region: String? /* = null */
get() = definedExternally
set(value) = definedExternally
}
@kotlin.internal.InlineOnly
public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MouseEventInit {
public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MouseEventInit {
val o = js("({})")
o["screenX"] = screenX
o["screenY"] = screenY
o["clientX"] = clientX
@@ -142,6 +162,7 @@ public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX:
o["button"] = button
o["buttons"] = buttons
o["relatedTarget"] = relatedTarget
o["region"] = region
o["ctrlKey"] = ctrlKey
o["shiftKey"] = shiftKey
o["altKey"] = altKey
@@ -161,7 +182,6 @@ public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -213,7 +233,6 @@ public external interface EventModifierInit : UIEventInit {
@kotlin.internal.InlineOnly
public inline fun EventModifierInit(ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): EventModifierInit {
val o = js("({})")
o["ctrlKey"] = ctrlKey
o["shiftKey"] = shiftKey
o["altKey"] = altKey
@@ -233,7 +252,6 @@ public inline fun EventModifierInit(ctrlKey: Boolean? = false, shiftKey: Boolean
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -250,6 +268,10 @@ public external open class WheelEvent(type: String, eventInitDict: WheelEventIni
val DOM_DELTA_PIXEL: Int
val DOM_DELTA_LINE: Int
val DOM_DELTA_PAGE: Int
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
@@ -269,9 +291,8 @@ public external interface WheelEventInit : MouseEventInit {
}
@kotlin.internal.InlineOnly
public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, deltaZ: Double? = 0.0, deltaMode: Int? = 0, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WheelEventInit {
public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, deltaZ: Double? = 0.0, deltaMode: Int? = 0, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WheelEventInit {
val o = js("({})")
o["deltaX"] = deltaX
o["deltaY"] = deltaY
o["deltaZ"] = deltaZ
@@ -283,6 +304,7 @@ public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, d
o["button"] = button
o["buttons"] = buttons
o["relatedTarget"] = relatedTarget
o["region"] = region
o["ctrlKey"] = ctrlKey
o["shiftKey"] = shiftKey
o["altKey"] = altKey
@@ -302,7 +324,6 @@ public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, d
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -312,6 +333,13 @@ public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, d
public external open class InputEvent(type: String, eventInitDict: InputEventInit = definedExternally) : UIEvent {
open val data: String
open val isComposing: Boolean
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface InputEventInit : UIEventInit {
@@ -326,7 +354,6 @@ public external interface InputEventInit : UIEventInit {
@kotlin.internal.InlineOnly
public inline fun InputEventInit(data: String? = "", isComposing: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): InputEventInit {
val o = js("({})")
o["data"] = data
o["isComposing"] = isComposing
o["view"] = view
@@ -334,7 +361,6 @@ public inline fun InputEventInit(data: String? = "", isComposing: Boolean? = fal
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -361,6 +387,10 @@ public external open class KeyboardEvent(type: String, eventInitDict: KeyboardEv
val DOM_KEY_LOCATION_LEFT: Int
val DOM_KEY_LOCATION_RIGHT: Int
val DOM_KEY_LOCATION_NUMPAD: Int
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
@@ -385,7 +415,6 @@ public external interface KeyboardEventInit : EventModifierInit {
@kotlin.internal.InlineOnly
public inline fun KeyboardEventInit(key: String? = "", code: String? = "", location: Int? = 0, repeat: Boolean? = false, isComposing: Boolean? = false, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): KeyboardEventInit {
val o = js("({})")
o["key"] = key
o["code"] = code
o["location"] = location
@@ -410,7 +439,6 @@ public inline fun KeyboardEventInit(key: String? = "", code: String? = "", locat
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -419,6 +447,13 @@ public inline fun KeyboardEventInit(key: String? = "", code: String? = "", locat
*/
public external open class CompositionEvent(type: String, eventInitDict: CompositionEventInit = definedExternally) : UIEvent {
open val data: String
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface CompositionEventInit : UIEventInit {
@@ -430,14 +465,12 @@ public external interface CompositionEventInit : UIEventInit {
@kotlin.internal.InlineOnly
public inline fun CompositionEventInit(data: String? = "", view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): CompositionEventInit {
val o = js("({})")
o["data"] = data
o["view"] = view
o["detail"] = detail
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -456,10 +489,10 @@ public external open class Event(type: String, eventInitDict: EventInit = define
open val isTrusted: Boolean
open val timeStamp: Number
fun composedPath(): Array<EventTarget>
fun stopPropagation(): Unit
fun stopImmediatePropagation(): Unit
fun preventDefault(): Unit
fun initEvent(type: String, bubbles: Boolean, cancelable: Boolean): Unit
fun stopPropagation()
fun stopImmediatePropagation()
fun preventDefault()
fun initEvent(type: String, bubbles: Boolean, cancelable: Boolean)
companion object {
val NONE: Short
@@ -473,10 +506,10 @@ public external open class Event(type: String, eventInitDict: EventInit = define
* Exposes the JavaScript [EventTarget](https://developer.mozilla.org/en/docs/Web/API/EventTarget) to Kotlin
*/
public external abstract class EventTarget {
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally): Unit
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: dynamic = definedExternally): Unit
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally): Unit
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: dynamic = definedExternally): Unit
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: dynamic = definedExternally)
fun dispatchEvent(event: Event): Boolean
}
@@ -484,6 +517,5 @@ public external abstract class EventTarget {
* Exposes the JavaScript [EventListener](https://developer.mozilla.org/en/docs/Web/API/EventListener) to Kotlin
*/
public external interface EventListener {
fun handleEvent(event: Event): Unit
}
fun handleEvent(event: Event)
}
File diff suppressed because it is too large Load Diff
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.mediacapture
import kotlin.js.*
@@ -41,8 +40,8 @@ public external open class MediaStream() : EventTarget {
fun getVideoTracks(): Array<MediaStreamTrack>
fun getTracks(): Array<MediaStreamTrack>
fun getTrackById(trackId: String): MediaStreamTrack?
fun addTrack(track: MediaStreamTrack): Unit
fun removeTrack(track: MediaStreamTrack): Unit
fun addTrack(track: MediaStreamTrack)
fun removeTrack(track: MediaStreamTrack)
fun clone(): MediaStream
}
@@ -61,7 +60,7 @@ public external abstract class MediaStreamTrack : EventTarget {
open var onended: ((Event) -> dynamic)?
open var onoverconstrained: ((Event) -> dynamic)?
fun clone(): MediaStreamTrack
fun stop(): Unit
fun stop()
fun getCapabilities(): MediaTrackCapabilities
fun getConstraints(): MediaTrackConstraints
fun getSettings(): MediaTrackSettings
@@ -125,7 +124,6 @@ public external interface MediaTrackSupportedConstraints {
@kotlin.internal.InlineOnly
public inline fun MediaTrackSupportedConstraints(width: Boolean? = true, height: Boolean? = true, aspectRatio: Boolean? = true, frameRate: Boolean? = true, facingMode: Boolean? = true, resizeMode: Boolean? = true, volume: Boolean? = true, sampleRate: Boolean? = true, sampleSize: Boolean? = true, echoCancellation: Boolean? = true, autoGainControl: Boolean? = true, noiseSuppression: Boolean? = true, latency: Boolean? = true, channelCount: Boolean? = true, deviceId: Boolean? = true, groupId: Boolean? = true): MediaTrackSupportedConstraints {
val o = js("({})")
o["width"] = width
o["height"] = height
o["aspectRatio"] = aspectRatio
@@ -142,7 +140,6 @@ public inline fun MediaTrackSupportedConstraints(width: Boolean? = true, height:
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
return o
}
@@ -200,7 +197,6 @@ public external interface MediaTrackCapabilities {
@kotlin.internal.InlineOnly
public inline fun MediaTrackCapabilities(width: ULongRange? = undefined, height: ULongRange? = undefined, aspectRatio: DoubleRange? = undefined, frameRate: DoubleRange? = undefined, facingMode: Array<String>? = undefined, resizeMode: Array<String>? = undefined, volume: DoubleRange? = undefined, sampleRate: ULongRange? = undefined, sampleSize: ULongRange? = undefined, echoCancellation: Array<Boolean>? = undefined, autoGainControl: Array<Boolean>? = undefined, noiseSuppression: Array<Boolean>? = undefined, latency: DoubleRange? = undefined, channelCount: ULongRange? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackCapabilities {
val o = js("({})")
o["width"] = width
o["height"] = height
o["aspectRatio"] = aspectRatio
@@ -217,7 +213,6 @@ public inline fun MediaTrackCapabilities(width: ULongRange? = undefined, height:
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
return o
}
@@ -233,7 +228,6 @@ public external interface MediaTrackConstraints : MediaTrackConstraintSet {
@kotlin.internal.InlineOnly
public inline fun MediaTrackConstraints(advanced: Array<MediaTrackConstraintSet>? = undefined, width: dynamic = undefined, height: dynamic = undefined, aspectRatio: dynamic = undefined, frameRate: dynamic = undefined, facingMode: dynamic = undefined, resizeMode: dynamic = undefined, volume: dynamic = undefined, sampleRate: dynamic = undefined, sampleSize: dynamic = undefined, echoCancellation: dynamic = undefined, autoGainControl: dynamic = undefined, noiseSuppression: dynamic = undefined, latency: dynamic = undefined, channelCount: dynamic = undefined, deviceId: dynamic = undefined, groupId: dynamic = undefined): MediaTrackConstraints {
val o = js("({})")
o["advanced"] = advanced
o["width"] = width
o["height"] = height
@@ -251,7 +245,6 @@ public inline fun MediaTrackConstraints(advanced: Array<MediaTrackConstraintSet>
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
return o
}
@@ -309,7 +302,6 @@ public external interface MediaTrackConstraintSet {
@kotlin.internal.InlineOnly
public inline fun MediaTrackConstraintSet(width: dynamic = undefined, height: dynamic = undefined, aspectRatio: dynamic = undefined, frameRate: dynamic = undefined, facingMode: dynamic = undefined, resizeMode: dynamic = undefined, volume: dynamic = undefined, sampleRate: dynamic = undefined, sampleSize: dynamic = undefined, echoCancellation: dynamic = undefined, autoGainControl: dynamic = undefined, noiseSuppression: dynamic = undefined, latency: dynamic = undefined, channelCount: dynamic = undefined, deviceId: dynamic = undefined, groupId: dynamic = undefined): MediaTrackConstraintSet {
val o = js("({})")
o["width"] = width
o["height"] = height
o["aspectRatio"] = aspectRatio
@@ -326,7 +318,6 @@ public inline fun MediaTrackConstraintSet(width: dynamic = undefined, height: dy
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
return o
}
@@ -387,7 +378,6 @@ public external interface MediaTrackSettings {
@kotlin.internal.InlineOnly
public inline fun MediaTrackSettings(width: Int? = undefined, height: Int? = undefined, aspectRatio: Double? = undefined, frameRate: Double? = undefined, facingMode: String? = undefined, resizeMode: String? = undefined, volume: Double? = undefined, sampleRate: Int? = undefined, sampleSize: Int? = undefined, echoCancellation: Boolean? = undefined, autoGainControl: Boolean? = undefined, noiseSuppression: Boolean? = undefined, latency: Double? = undefined, channelCount: Int? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackSettings {
val o = js("({})")
o["width"] = width
o["height"] = height
o["aspectRatio"] = aspectRatio
@@ -404,7 +394,6 @@ public inline fun MediaTrackSettings(width: Int? = undefined, height: Int? = und
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
return o
}
@@ -413,6 +402,13 @@ public inline fun MediaTrackSettings(width: Int? = undefined, height: Int? = und
*/
public external open class MediaStreamTrackEvent(type: String, eventInitDict: MediaStreamTrackEventInit) : Event {
open val track: MediaStreamTrack
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface MediaStreamTrackEventInit : EventInit {
@@ -424,17 +420,22 @@ public external interface MediaStreamTrackEventInit : EventInit {
@kotlin.internal.InlineOnly
public inline fun MediaStreamTrackEventInit(track: MediaStreamTrack?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaStreamTrackEventInit {
val o = js("({})")
o["track"] = track
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
public external open class OverconstrainedErrorEvent(type: String, eventInitDict: OverconstrainedErrorEventInit) : Event {
open val error: dynamic
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface OverconstrainedErrorEventInit : EventInit {
@@ -446,12 +447,10 @@ public external interface OverconstrainedErrorEventInit : EventInit {
@kotlin.internal.InlineOnly
public inline fun OverconstrainedErrorEventInit(error: dynamic = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): OverconstrainedErrorEventInit {
val o = js("({})")
o["error"] = error
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -460,7 +459,7 @@ public inline fun OverconstrainedErrorEventInit(error: dynamic = null, bubbles:
*/
public external abstract class MediaDevices : EventTarget {
open var ondevicechange: ((Event) -> dynamic)?
fun enumerateDevices(): Promise<dynamic>
fun enumerateDevices(): Promise<Array<MediaDeviceInfo>>
fun getSupportedConstraints(): MediaTrackSupportedConstraints
fun getUserMedia(constraints: MediaStreamConstraints = definedExternally): Promise<MediaStream>
}
@@ -495,15 +494,15 @@ public external interface MediaStreamConstraints {
@kotlin.internal.InlineOnly
public inline fun MediaStreamConstraints(video: dynamic = false, audio: dynamic = false): MediaStreamConstraints {
val o = js("({})")
o["video"] = video
o["audio"] = audio
return o
}
public external interface ConstrainablePattern {
var onoverconstrained: ((Event) -> dynamic)?
get() = definedExternally
set(value) = definedExternally
fun getCapabilities(): Capabilities
fun getConstraints(): Constraints
fun getSettings(): Settings
@@ -525,10 +524,8 @@ public external interface DoubleRange {
@kotlin.internal.InlineOnly
public inline fun DoubleRange(max: Double? = undefined, min: Double? = undefined): DoubleRange {
val o = js("({})")
o["max"] = max
o["min"] = min
return o
}
@@ -544,12 +541,10 @@ public external interface ConstrainDoubleRange : DoubleRange {
@kotlin.internal.InlineOnly
public inline fun ConstrainDoubleRange(exact: Double? = undefined, ideal: Double? = undefined, max: Double? = undefined, min: Double? = undefined): ConstrainDoubleRange {
val o = js("({})")
o["exact"] = exact
o["ideal"] = ideal
o["max"] = max
o["min"] = min
return o
}
@@ -565,10 +560,8 @@ public external interface ULongRange {
@kotlin.internal.InlineOnly
public inline fun ULongRange(max: Int? = undefined, min: Int? = undefined): ULongRange {
val o = js("({})")
o["max"] = max
o["min"] = min
return o
}
@@ -584,12 +577,10 @@ public external interface ConstrainULongRange : ULongRange {
@kotlin.internal.InlineOnly
public inline fun ConstrainULongRange(exact: Int? = undefined, ideal: Int? = undefined, max: Int? = undefined, min: Int? = undefined): ConstrainULongRange {
val o = js("({})")
o["exact"] = exact
o["ideal"] = ideal
o["max"] = max
o["min"] = min
return o
}
@@ -608,10 +599,8 @@ public external interface ConstrainBooleanParameters {
@kotlin.internal.InlineOnly
public inline fun ConstrainBooleanParameters(exact: Boolean? = undefined, ideal: Boolean? = undefined): ConstrainBooleanParameters {
val o = js("({})")
o["exact"] = exact
o["ideal"] = ideal
return o
}
@@ -630,43 +619,32 @@ public external interface ConstrainDOMStringParameters {
@kotlin.internal.InlineOnly
public inline fun ConstrainDOMStringParameters(exact: dynamic = undefined, ideal: dynamic = undefined): ConstrainDOMStringParameters {
val o = js("({})")
o["exact"] = exact
o["ideal"] = ideal
return o
}
public external interface Capabilities {
}
public external interface Capabilities
@kotlin.internal.InlineOnly
public inline fun Capabilities(): Capabilities {
val o = js("({})")
return o
}
public external interface Settings {
}
public external interface Settings
@kotlin.internal.InlineOnly
public inline fun Settings(): Settings {
val o = js("({})")
return o
}
public external interface ConstraintSet {
}
public external interface ConstraintSet
@kotlin.internal.InlineOnly
public inline fun ConstraintSet(): ConstraintSet {
val o = js("({})")
return o
}
@@ -679,40 +657,52 @@ public external interface Constraints : ConstraintSet {
@kotlin.internal.InlineOnly
public inline fun Constraints(advanced: Array<ConstraintSet>? = undefined): Constraints {
val o = js("({})")
o["advanced"] = advanced
return o
}
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface MediaStreamTrackState {
companion object
}
public inline val MediaStreamTrackState.Companion.LIVE: MediaStreamTrackState get() = "live".asDynamic().unsafeCast<MediaStreamTrackState>()
public inline val MediaStreamTrackState.Companion.ENDED: MediaStreamTrackState get() = "ended".asDynamic().unsafeCast<MediaStreamTrackState>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface VideoFacingModeEnum {
companion object
}
public inline val VideoFacingModeEnum.Companion.USER: VideoFacingModeEnum get() = "user".asDynamic().unsafeCast<VideoFacingModeEnum>()
public inline val VideoFacingModeEnum.Companion.ENVIRONMENT: VideoFacingModeEnum get() = "environment".asDynamic().unsafeCast<VideoFacingModeEnum>()
public inline val VideoFacingModeEnum.Companion.LEFT: VideoFacingModeEnum get() = "left".asDynamic().unsafeCast<VideoFacingModeEnum>()
public inline val VideoFacingModeEnum.Companion.RIGHT: VideoFacingModeEnum get() = "right".asDynamic().unsafeCast<VideoFacingModeEnum>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface VideoResizeModeEnum {
companion object
}
public inline val VideoResizeModeEnum.Companion.NONE: VideoResizeModeEnum get() = "none".asDynamic().unsafeCast<VideoResizeModeEnum>()
public inline val VideoResizeModeEnum.Companion.CROP_AND_SCALE: VideoResizeModeEnum get() = "crop-and-scale".asDynamic().unsafeCast<VideoResizeModeEnum>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface MediaDeviceKind {
companion object
}
public inline val MediaDeviceKind.Companion.AUDIOINPUT: MediaDeviceKind get() = "audioinput".asDynamic().unsafeCast<MediaDeviceKind>()
public inline val MediaDeviceKind.Companion.AUDIOOUTPUT: MediaDeviceKind get() = "audiooutput".asDynamic().unsafeCast<MediaDeviceKind>()
public inline val MediaDeviceKind.Companion.VIDEOINPUT: MediaDeviceKind get() = "videoinput".asDynamic().unsafeCast<MediaDeviceKind>()
public inline val MediaDeviceKind.Companion.AUDIOINPUT: MediaDeviceKind get() = "audioinput".asDynamic().unsafeCast<MediaDeviceKind>()
public inline val MediaDeviceKind.Companion.AUDIOOUTPUT: MediaDeviceKind get() = "audiooutput".asDynamic().unsafeCast<MediaDeviceKind>()
public inline val MediaDeviceKind.Companion.VIDEOINPUT: MediaDeviceKind get() = "videoinput".asDynamic().unsafeCast<MediaDeviceKind>()
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.parsing
import kotlin.js.*
@@ -39,5 +38,4 @@ public external open class DOMParser {
*/
public external open class XMLSerializer {
fun serializeToString(root: Node): String
}
}
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.pointerevents
import kotlin.js.*
@@ -61,9 +60,8 @@ public external interface PointerEventInit : MouseEventInit {
}
@kotlin.internal.InlineOnly
public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, height: Double? = 1.0, pressure: Float? = 0f, tangentialPressure: Float? = 0f, tiltX: Int? = 0, tiltY: Int? = 0, twist: Int? = 0, pointerType: String? = "", isPrimary: Boolean? = false, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): PointerEventInit {
public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, height: Double? = 1.0, pressure: Float? = 0f, tangentialPressure: Float? = 0f, tiltX: Int? = 0, tiltY: Int? = 0, twist: Int? = 0, pointerType: String? = "", isPrimary: Boolean? = false, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): PointerEventInit {
val o = js("({})")
o["pointerId"] = pointerId
o["width"] = width
o["height"] = height
@@ -81,6 +79,7 @@ public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, he
o["button"] = button
o["buttons"] = buttons
o["relatedTarget"] = relatedTarget
o["region"] = region
o["ctrlKey"] = ctrlKey
o["shiftKey"] = shiftKey
o["altKey"] = altKey
@@ -100,7 +99,6 @@ public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, he
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -118,5 +116,11 @@ public external open class PointerEvent(type: String, eventInitDict: PointerEven
open val twist: Int
open val pointerType: String
open val isPrimary: Boolean
}
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
File diff suppressed because it is too large Load Diff
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.dom.url
import kotlin.js.*
@@ -45,11 +44,11 @@ public external open class URL(url: String, base: String = definedExternally) {
var hash: String
companion object {
fun createObjectURL(blob: Blob): String
fun createFor(blob: Blob): String
fun revokeObjectURL(url: String): Unit
fun domainToASCII(domain: String): String
fun domainToUnicode(domain: String): String
fun createObjectURL(blob: Blob): String
fun createFor(blob: Blob): String
fun revokeObjectURL(url: String)
}
}
@@ -57,11 +56,10 @@ public external open class URL(url: String, base: String = definedExternally) {
* Exposes the JavaScript [URLSearchParams](https://developer.mozilla.org/en/docs/Web/API/URLSearchParams) to Kotlin
*/
public external open class URLSearchParams(init: dynamic = definedExternally) {
fun append(name: String, value: String): Unit
fun delete(name: String): Unit
fun append(name: String, value: String)
fun delete(name: String)
fun get(name: String): String?
fun getAll(name: String): Array<String>
fun has(name: String): Boolean
fun set(name: String, value: String): Unit
}
fun set(name: String, value: String)
}
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.fetch
import kotlin.js.*
@@ -31,11 +30,11 @@ import org.w3c.xhr.*
* Exposes the JavaScript [Headers](https://developer.mozilla.org/en/docs/Web/API/Headers) to Kotlin
*/
public external open class Headers(init: dynamic = definedExternally) {
fun append(name: String, value: String): Unit
fun delete(name: String): Unit
fun append(name: String, value: String)
fun delete(name: String)
fun get(name: String): String?
fun has(name: String): Boolean
fun set(name: String, value: String): Unit
fun set(name: String, value: String)
}
/**
@@ -118,7 +117,6 @@ public external interface RequestInit {
@kotlin.internal.InlineOnly
public inline fun RequestInit(method: String? = undefined, headers: dynamic = undefined, body: dynamic = undefined, referrer: String? = undefined, referrerPolicy: dynamic = undefined, mode: RequestMode? = undefined, credentials: RequestCredentials? = undefined, cache: RequestCache? = undefined, redirect: RequestRedirect? = undefined, integrity: String? = undefined, keepalive: Boolean? = undefined, window: Any? = undefined): RequestInit {
val o = js("({})")
o["method"] = method
o["headers"] = headers
o["body"] = body
@@ -131,7 +129,6 @@ public inline fun RequestInit(method: String? = undefined, headers: dynamic = un
o["integrity"] = integrity
o["keepalive"] = keepalive
o["window"] = window
return o
}
@@ -177,91 +174,140 @@ public external interface ResponseInit {
@kotlin.internal.InlineOnly
public inline fun ResponseInit(status: Short? = 200, statusText: String? = "OK", headers: dynamic = undefined): ResponseInit {
val o = js("({})")
o["status"] = status
o["statusText"] = statusText
o["headers"] = headers
return o
}
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface RequestType {
companion object
}
public inline val RequestType.Companion.EMPTY: RequestType get() = "".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.AUDIO: RequestType get() = "audio".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.FONT: RequestType get() = "font".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.IMAGE: RequestType get() = "image".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.SCRIPT: RequestType get() = "script".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.STYLE: RequestType get() = "style".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.TRACK: RequestType get() = "track".asDynamic().unsafeCast<RequestType>()
public inline val RequestType.Companion.VIDEO: RequestType get() = "video".asDynamic().unsafeCast<RequestType>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface RequestDestination {
companion object
}
public inline val RequestDestination.Companion.EMPTY: RequestDestination get() = "".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.DOCUMENT: RequestDestination get() = "document".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.EMBED: RequestDestination get() = "embed".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.FONT: RequestDestination get() = "font".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.IMAGE: RequestDestination get() = "image".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.MANIFEST: RequestDestination get() = "manifest".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.MEDIA: RequestDestination get() = "media".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.OBJECT: RequestDestination get() = "object".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.REPORT: RequestDestination get() = "report".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.SCRIPT: RequestDestination get() = "script".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.SERVICEWORKER: RequestDestination get() = "serviceworker".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.SHAREDWORKER: RequestDestination get() = "sharedworker".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.STYLE: RequestDestination get() = "style".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.WORKER: RequestDestination get() = "worker".asDynamic().unsafeCast<RequestDestination>()
public inline val RequestDestination.Companion.XSLT: RequestDestination get() = "xslt".asDynamic().unsafeCast<RequestDestination>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface RequestMode {
companion object
}
public inline val RequestMode.Companion.NAVIGATE: RequestMode get() = "navigate".asDynamic().unsafeCast<RequestMode>()
public inline val RequestMode.Companion.SAME_ORIGIN: RequestMode get() = "same-origin".asDynamic().unsafeCast<RequestMode>()
public inline val RequestMode.Companion.NO_CORS: RequestMode get() = "no-cors".asDynamic().unsafeCast<RequestMode>()
public inline val RequestMode.Companion.CORS: RequestMode get() = "cors".asDynamic().unsafeCast<RequestMode>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface RequestCredentials {
companion object
}
public inline val RequestCredentials.Companion.OMIT: RequestCredentials get() = "omit".asDynamic().unsafeCast<RequestCredentials>()
public inline val RequestCredentials.Companion.SAME_ORIGIN: RequestCredentials get() = "same-origin".asDynamic().unsafeCast<RequestCredentials>()
public inline val RequestCredentials.Companion.INCLUDE: RequestCredentials get() = "include".asDynamic().unsafeCast<RequestCredentials>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface RequestCache {
companion object
}
public inline val RequestCache.Companion.DEFAULT: RequestCache get() = "default".asDynamic().unsafeCast<RequestCache>()
public inline val RequestCache.Companion.NO_STORE: RequestCache get() = "no-store".asDynamic().unsafeCast<RequestCache>()
public inline val RequestCache.Companion.RELOAD: RequestCache get() = "reload".asDynamic().unsafeCast<RequestCache>()
public inline val RequestCache.Companion.NO_CACHE: RequestCache get() = "no-cache".asDynamic().unsafeCast<RequestCache>()
public inline val RequestCache.Companion.FORCE_CACHE: RequestCache get() = "force-cache".asDynamic().unsafeCast<RequestCache>()
public inline val RequestCache.Companion.ONLY_IF_CACHED: RequestCache get() = "only-if-cached".asDynamic().unsafeCast<RequestCache>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface RequestRedirect {
companion object
}
public inline val RequestRedirect.Companion.FOLLOW: RequestRedirect get() = "follow".asDynamic().unsafeCast<RequestRedirect>()
public inline val RequestRedirect.Companion.ERROR: RequestRedirect get() = "error".asDynamic().unsafeCast<RequestRedirect>()
public inline val RequestRedirect.Companion.MANUAL: RequestRedirect get() = "manual".asDynamic().unsafeCast<RequestRedirect>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface ResponseType {
companion object
}
public inline val ResponseType.Companion.BASIC: ResponseType get() = "basic".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.CORS: ResponseType get() = "cors".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.DEFAULT: ResponseType get() = "default".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.ERROR: ResponseType get() = "error".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.OPAQUE: ResponseType get() = "opaque".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.OPAQUEREDIRECT: ResponseType get() = "opaqueredirect".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.BASIC: ResponseType get() = "basic".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.CORS: ResponseType get() = "cors".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.DEFAULT: ResponseType get() = "default".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.ERROR: ResponseType get() = "error".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.OPAQUE: ResponseType get() = "opaque".asDynamic().unsafeCast<ResponseType>()
public inline val ResponseType.Companion.OPAQUEREDIRECT: ResponseType get() = "opaqueredirect".asDynamic().unsafeCast<ResponseType>()
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.files
import kotlin.js.*
@@ -30,12 +29,12 @@ import org.w3c.xhr.*
/**
* Exposes the JavaScript [Blob](https://developer.mozilla.org/en/docs/Web/API/Blob) to Kotlin
*/
public external open class Blob(blobParts: Array<dynamic> = definedExternally, options: BlobPropertyBag = definedExternally) {
open val size: Int
public external open class Blob(blobParts: Array<dynamic> = definedExternally, options: BlobPropertyBag = definedExternally) : ImageBitmapSource {
open val size: Number
open val type: String
open val isClosed: Boolean
fun slice(start: Int = definedExternally, end: Int = definedExternally, contentType: String = definedExternally): Blob
fun close(): Unit
fun close()
}
public external interface BlobPropertyBag {
@@ -47,9 +46,7 @@ public external interface BlobPropertyBag {
@kotlin.internal.InlineOnly
public inline fun BlobPropertyBag(type: String? = ""): BlobPropertyBag {
val o = js("({})")
o["type"] = type
return o
}
@@ -70,10 +67,8 @@ public external interface FilePropertyBag : BlobPropertyBag {
@kotlin.internal.InlineOnly
public inline fun FilePropertyBag(lastModified: Int? = undefined, type: String? = ""): FilePropertyBag {
val o = js("({})")
o["lastModified"] = lastModified
o["type"] = type
return o
}
@@ -81,10 +76,11 @@ public inline fun FilePropertyBag(lastModified: Int? = undefined, type: String?
* Exposes the JavaScript [FileList](https://developer.mozilla.org/en/docs/Web/API/FileList) to Kotlin
*/
public external abstract class FileList : ItemArrayLike<File> {
override val length: Int
override fun item(index: Int): File?
}
@kotlin.internal.InlineOnly inline operator fun FileList.get(index: Int): File? = asDynamic()[index]
@kotlin.internal.InlineOnly
public inline operator fun FileList.get(index: Int): File? = asDynamic()[index]
/**
* Exposes the JavaScript [FileReader](https://developer.mozilla.org/en/docs/Web/API/FileReader) to Kotlin
@@ -99,11 +95,11 @@ public external open class FileReader : EventTarget {
var onabort: ((Event) -> dynamic)?
var onerror: ((Event) -> dynamic)?
var onloadend: ((Event) -> dynamic)?
fun readAsArrayBuffer(blob: Blob): Unit
fun readAsBinaryString(blob: Blob): Unit
fun readAsText(blob: Blob, label: String = definedExternally): Unit
fun readAsDataURL(blob: Blob): Unit
fun abort(): Unit
fun readAsArrayBuffer(blob: Blob)
fun readAsBinaryString(blob: Blob)
fun readAsText(blob: Blob, label: String = definedExternally)
fun readAsDataURL(blob: Blob)
fun abort()
companion object {
val EMPTY: Short
@@ -120,5 +116,4 @@ public external open class FileReaderSync {
fun readAsBinaryString(blob: Blob): String
fun readAsText(blob: Blob, label: String = definedExternally): String
fun readAsDataURL(blob: Blob): String
}
}
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.notifications
import kotlin.js.*
@@ -51,11 +50,11 @@ public external open class Notification(title: String, options: NotificationOpti
open val sticky: Boolean
open val data: Any?
open val actions: Array<out NotificationAction>
fun close(): Unit
fun close()
companion object {
var permission: NotificationPermission
var maxActions: Int
val permission: NotificationPermission
val maxActions: Int
fun requestPermission(deprecatedCallback: (NotificationPermission) -> Unit = definedExternally): Promise<NotificationPermission>
}
}
@@ -117,7 +116,6 @@ public external interface NotificationOptions {
@kotlin.internal.InlineOnly
public inline fun NotificationOptions(dir: NotificationDirection? = NotificationDirection.AUTO, lang: String? = "", body: String? = "", tag: String? = "", image: String? = undefined, icon: String? = undefined, badge: String? = undefined, sound: String? = undefined, vibrate: dynamic = undefined, timestamp: Number? = undefined, renotify: Boolean? = false, silent: Boolean? = false, noscreen: Boolean? = false, requireInteraction: Boolean? = false, sticky: Boolean? = false, data: Any? = null, actions: Array<NotificationAction>? = arrayOf()): NotificationOptions {
val o = js("({})")
o["dir"] = dir
o["lang"] = lang
o["body"] = body
@@ -135,7 +133,6 @@ public inline fun NotificationOptions(dir: NotificationDirection? = Notification
o["sticky"] = sticky
o["data"] = data
o["actions"] = actions
return o
}
@@ -154,11 +151,9 @@ public external interface NotificationAction {
@kotlin.internal.InlineOnly
public inline fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction {
val o = js("({})")
o["action"] = action
o["title"] = title
o["icon"] = icon
return o
}
@@ -171,9 +166,7 @@ public external interface GetNotificationOptions {
@kotlin.internal.InlineOnly
public inline fun GetNotificationOptions(tag: String? = ""): GetNotificationOptions {
val o = js("({})")
o["tag"] = tag
return o
}
@@ -183,6 +176,13 @@ public inline fun GetNotificationOptions(tag: String? = ""): GetNotificationOpti
public external open class NotificationEvent(type: String, eventInitDict: NotificationEventInit) : ExtendableEvent {
open val notification: Notification
open val action: String
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface NotificationEventInit : ExtendableEventInit {
@@ -197,29 +197,34 @@ public external interface NotificationEventInit : ExtendableEventInit {
@kotlin.internal.InlineOnly
public inline fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit {
val o = js("({})")
o["notification"] = notification
o["action"] = action
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface NotificationPermission {
companion object
}
public inline val NotificationPermission.Companion.DEFAULT: NotificationPermission get() = "default".asDynamic().unsafeCast<NotificationPermission>()
public inline val NotificationPermission.Companion.DENIED: NotificationPermission get() = "denied".asDynamic().unsafeCast<NotificationPermission>()
public inline val NotificationPermission.Companion.GRANTED: NotificationPermission get() = "granted".asDynamic().unsafeCast<NotificationPermission>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface NotificationDirection {
companion object
}
public inline val NotificationDirection.Companion.AUTO: NotificationDirection get() = "auto".asDynamic().unsafeCast<NotificationDirection>()
public inline val NotificationDirection.Companion.LTR: NotificationDirection get() = "ltr".asDynamic().unsafeCast<NotificationDirection>()
public inline val NotificationDirection.Companion.RTL: NotificationDirection get() = "rtl".asDynamic().unsafeCast<NotificationDirection>()
public inline val NotificationDirection.Companion.AUTO: NotificationDirection get() = "auto".asDynamic().unsafeCast<NotificationDirection>()
public inline val NotificationDirection.Companion.LTR: NotificationDirection get() = "ltr".asDynamic().unsafeCast<NotificationDirection>()
public inline val NotificationDirection.Companion.RTL: NotificationDirection get() = "rtl".asDynamic().unsafeCast<NotificationDirection>()
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.performance
import kotlin.js.*
@@ -44,27 +43,27 @@ public external interface GlobalPerformance {
* Exposes the JavaScript [PerformanceTiming](https://developer.mozilla.org/en/docs/Web/API/PerformanceTiming) to Kotlin
*/
public external abstract class PerformanceTiming {
open val navigationStart: Int
open val unloadEventStart: Int
open val unloadEventEnd: Int
open val redirectStart: Int
open val redirectEnd: Int
open val fetchStart: Int
open val domainLookupStart: Int
open val domainLookupEnd: Int
open val connectStart: Int
open val connectEnd: Int
open val secureConnectionStart: Int
open val requestStart: Int
open val responseStart: Int
open val responseEnd: Int
open val domLoading: Int
open val domInteractive: Int
open val domContentLoadedEventStart: Int
open val domContentLoadedEventEnd: Int
open val domComplete: Int
open val loadEventStart: Int
open val loadEventEnd: Int
open val navigationStart: Number
open val unloadEventStart: Number
open val unloadEventEnd: Number
open val redirectStart: Number
open val redirectEnd: Number
open val fetchStart: Number
open val domainLookupStart: Number
open val domainLookupEnd: Number
open val connectStart: Number
open val connectEnd: Number
open val secureConnectionStart: Number
open val requestStart: Number
open val responseStart: Number
open val responseEnd: Number
open val domLoading: Number
open val domInteractive: Number
open val domContentLoadedEventStart: Number
open val domContentLoadedEventEnd: Number
open val domComplete: Number
open val loadEventStart: Number
open val loadEventEnd: Number
}
/**
@@ -80,5 +79,4 @@ public external abstract class PerformanceNavigation {
val TYPE_BACK_FORWARD: Short
val TYPE_RESERVED: Short
}
}
}
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.workers
import kotlin.js.*
@@ -27,6 +26,16 @@ import org.w3c.notifications.*
import org.w3c.performance.*
import org.w3c.xhr.*
/**
* Exposes the JavaScript [ServiceWorker](https://developer.mozilla.org/en/docs/Web/API/ServiceWorker) to Kotlin
*/
public external abstract class ServiceWorker : EventTarget, AbstractWorker, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
open val scriptURL: String
open val state: ServiceWorkerState
open var onstatechange: ((Event) -> dynamic)?
fun postMessage(message: Any?, transfer: Array<dynamic> = definedExternally)
}
/**
* Exposes the JavaScript [ServiceWorkerRegistration](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerRegistration) to Kotlin
*/
@@ -39,36 +48,9 @@ public external abstract class ServiceWorkerRegistration : EventTarget {
open val APISpace: dynamic
fun update(): Promise<Unit>
fun unregister(): Promise<Boolean>
fun methodName(): Promise<dynamic>
fun showNotification(title: String, options: NotificationOptions = definedExternally): Promise<Unit>
fun getNotifications(filter: GetNotificationOptions = definedExternally): Promise<dynamic>
}
/**
* Exposes the JavaScript [ServiceWorkerGlobalScope](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerGlobalScope) to Kotlin
*/
public external abstract class ServiceWorkerGlobalScope : WorkerGlobalScope {
open val clients: Clients
open val registration: ServiceWorkerRegistration
open var oninstall: ((Event) -> dynamic)?
open var onactivate: ((Event) -> dynamic)?
open var onfetch: ((FetchEvent) -> dynamic)?
open var onforeignfetch: ((Event) -> dynamic)?
open var onmessage: ((MessageEvent) -> dynamic)?
open var onfunctionalevent: ((Event) -> dynamic)?
open var onnotificationclick: ((NotificationEvent) -> dynamic)?
open var onnotificationclose: ((NotificationEvent) -> dynamic)?
fun skipWaiting(): Promise<Unit>
}
/**
* Exposes the JavaScript [ServiceWorker](https://developer.mozilla.org/en/docs/Web/API/ServiceWorker) to Kotlin
*/
public external abstract class ServiceWorker : EventTarget, AbstractWorker, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
open val scriptURL: String
open val state: ServiceWorkerState
open var onstatechange: ((Event) -> dynamic)?
fun postMessage(message: Any?, transfer: Array<dynamic> = definedExternally): Unit
fun getNotifications(filter: GetNotificationOptions = definedExternally): Promise<Array<Notification>>
fun methodName(): Promise<dynamic>
}
/**
@@ -81,8 +63,8 @@ public external abstract class ServiceWorkerContainer : EventTarget {
open var onmessage: ((MessageEvent) -> dynamic)?
fun register(scriptURL: String, options: RegistrationOptions = definedExternally): Promise<ServiceWorkerRegistration>
fun getRegistration(clientURL: String = definedExternally): Promise<Any?>
fun getRegistrations(): Promise<dynamic>
fun startMessages(): Unit
fun getRegistrations(): Promise<Array<ServiceWorkerRegistration>>
fun startMessages()
}
public external interface RegistrationOptions {
@@ -97,10 +79,8 @@ public external interface RegistrationOptions {
@kotlin.internal.InlineOnly
public inline fun RegistrationOptions(scope: String? = undefined, type: WorkerType? = WorkerType.CLASSIC): RegistrationOptions {
val o = js("({})")
o["scope"] = scope
o["type"] = type
return o
}
@@ -113,6 +93,13 @@ public external open class ServiceWorkerMessageEvent(type: String, eventInitDict
open val lastEventId: String
open val source: UnionMessagePortOrServiceWorker?
open val ports: Array<out MessagePort>?
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface ServiceWorkerMessageEventInit : EventInit {
@@ -136,7 +123,6 @@ public external interface ServiceWorkerMessageEventInit : EventInit {
@kotlin.internal.InlineOnly
public inline fun ServiceWorkerMessageEventInit(data: Any? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionMessagePortOrServiceWorker? = undefined, ports: Array<MessagePort>? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ServiceWorkerMessageEventInit {
val o = js("({})")
o["data"] = data
o["origin"] = origin
o["lastEventId"] = lastEventId
@@ -145,10 +131,26 @@ public inline fun ServiceWorkerMessageEventInit(data: Any? = undefined, origin:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
/**
* Exposes the JavaScript [ServiceWorkerGlobalScope](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerGlobalScope) to Kotlin
*/
public external abstract class ServiceWorkerGlobalScope : WorkerGlobalScope {
open val clients: Clients
open val registration: ServiceWorkerRegistration
open var oninstall: ((Event) -> dynamic)?
open var onactivate: ((Event) -> dynamic)?
open var onfetch: ((FetchEvent) -> dynamic)?
open var onforeignfetch: ((Event) -> dynamic)?
open var onmessage: ((MessageEvent) -> dynamic)?
open var onnotificationclick: ((NotificationEvent) -> dynamic)?
open var onnotificationclose: ((NotificationEvent) -> dynamic)?
open var onfunctionalevent: ((Event) -> dynamic)?
fun skipWaiting(): Promise<Unit>
}
/**
* Exposes the JavaScript [Client](https://developer.mozilla.org/en/docs/Web/API/Client) to Kotlin
*/
@@ -156,7 +158,7 @@ public external abstract class Client : UnionClientOrMessagePortOrServiceWorker
open val url: String
open val frameType: FrameType
open val id: String
fun postMessage(message: Any?, transfer: Array<dynamic> = definedExternally): Unit
fun postMessage(message: Any?, transfer: Array<dynamic> = definedExternally)
}
/**
@@ -174,7 +176,7 @@ public external abstract class WindowClient : Client {
*/
public external abstract class Clients {
fun get(id: String): Promise<Any?>
fun matchAll(options: ClientQueryOptions = definedExternally): Promise<dynamic>
fun matchAll(options: ClientQueryOptions = definedExternally): Promise<Array<Client>>
fun openWindow(url: String): Promise<WindowClient?>
fun claim(): Promise<Unit>
}
@@ -191,10 +193,8 @@ public external interface ClientQueryOptions {
@kotlin.internal.InlineOnly
public inline fun ClientQueryOptions(includeUncontrolled: Boolean? = false, type: ClientType? = ClientType.WINDOW): ClientQueryOptions {
val o = js("({})")
o["includeUncontrolled"] = includeUncontrolled
o["type"] = type
return o
}
@@ -202,20 +202,24 @@ public inline fun ClientQueryOptions(includeUncontrolled: Boolean? = false, type
* Exposes the JavaScript [ExtendableEvent](https://developer.mozilla.org/en/docs/Web/API/ExtendableEvent) to Kotlin
*/
public external open class ExtendableEvent(type: String, eventInitDict: ExtendableEventInit = definedExternally) : Event {
fun waitUntil(f: Promise<Any?>): Unit
fun waitUntil(f: Promise<Any?>)
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface ExtendableEventInit : EventInit {
}
public external interface ExtendableEventInit : EventInit
@kotlin.internal.InlineOnly
public inline fun ExtendableEventInit(bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableEventInit {
val o = js("({})")
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -223,7 +227,14 @@ public inline fun ExtendableEventInit(bubbles: Boolean? = false, cancelable: Boo
* Exposes the JavaScript [InstallEvent](https://developer.mozilla.org/en/docs/Web/API/InstallEvent) to Kotlin
*/
public external open class InstallEvent(type: String, eventInitDict: ExtendableEventInit = definedExternally) : ExtendableEvent {
fun registerForeignFetch(options: ForeignFetchOptions): Unit
fun registerForeignFetch(options: ForeignFetchOptions)
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface ForeignFetchOptions {
@@ -238,10 +249,8 @@ public external interface ForeignFetchOptions {
@kotlin.internal.InlineOnly
public inline fun ForeignFetchOptions(scopes: Array<String>?, origins: Array<String>?): ForeignFetchOptions {
val o = js("({})")
o["scopes"] = scopes
o["origins"] = origins
return o
}
@@ -252,7 +261,14 @@ public external open class FetchEvent(type: String, eventInitDict: FetchEventIni
open val request: Request
open val clientId: String?
open val isReload: Boolean
fun respondWith(r: Promise<Response>): Unit
fun respondWith(r: Promise<Response>)
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface FetchEventInit : ExtendableEventInit {
@@ -270,21 +286,26 @@ public external interface FetchEventInit : ExtendableEventInit {
@kotlin.internal.InlineOnly
public inline fun FetchEventInit(request: Request?, clientId: String? = null, isReload: Boolean? = false, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FetchEventInit {
val o = js("({})")
o["request"] = request
o["clientId"] = clientId
o["isReload"] = isReload
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
public external open class ForeignFetchEvent(type: String, eventInitDict: ForeignFetchEventInit) : ExtendableEvent {
open val request: Request
open val origin: String
fun respondWith(r: Promise<ForeignFetchResponse>): Unit
fun respondWith(r: Promise<ForeignFetchResponse>)
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface ForeignFetchEventInit : ExtendableEventInit {
@@ -299,13 +320,11 @@ public external interface ForeignFetchEventInit : ExtendableEventInit {
@kotlin.internal.InlineOnly
public inline fun ForeignFetchEventInit(request: Request?, origin: String? = "null", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ForeignFetchEventInit {
val o = js("({})")
o["request"] = request
o["origin"] = origin
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -324,11 +343,9 @@ public external interface ForeignFetchResponse {
@kotlin.internal.InlineOnly
public inline fun ForeignFetchResponse(response: Response?, origin: String? = undefined, headers: Array<String>? = undefined): ForeignFetchResponse {
val o = js("({})")
o["response"] = response
o["origin"] = origin
o["headers"] = headers
return o
}
@@ -341,6 +358,13 @@ public external open class ExtendableMessageEvent(type: String, eventInitDict: E
open val lastEventId: String
open val source: UnionClientOrMessagePortOrServiceWorker?
open val ports: Array<out MessagePort>?
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface ExtendableMessageEventInit : ExtendableEventInit {
@@ -364,7 +388,6 @@ public external interface ExtendableMessageEventInit : ExtendableEventInit {
@kotlin.internal.InlineOnly
public inline fun ExtendableMessageEventInit(data: Any? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionClientOrMessagePortOrServiceWorker? = undefined, ports: Array<MessagePort>? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableMessageEventInit {
val o = js("({})")
o["data"] = data
o["origin"] = origin
o["lastEventId"] = lastEventId
@@ -373,7 +396,6 @@ public inline fun ExtendableMessageEventInit(data: Any? = undefined, origin: Str
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
@@ -382,12 +404,12 @@ public inline fun ExtendableMessageEventInit(data: Any? = undefined, origin: Str
*/
public external abstract class Cache {
fun match(request: dynamic, options: CacheQueryOptions = definedExternally): Promise<Any?>
fun matchAll(request: dynamic = definedExternally, options: CacheQueryOptions = definedExternally): Promise<dynamic>
fun matchAll(request: dynamic = definedExternally, options: CacheQueryOptions = definedExternally): Promise<Array<Response>>
fun add(request: dynamic): Promise<Unit>
fun addAll(requests: Array<dynamic>): Promise<Unit>
fun put(request: dynamic, response: Response): Promise<Unit>
fun delete(request: dynamic, options: CacheQueryOptions = definedExternally): Promise<Boolean>
fun keys(request: dynamic = definedExternally, options: CacheQueryOptions = definedExternally): Promise<dynamic>
fun keys(request: dynamic = definedExternally, options: CacheQueryOptions = definedExternally): Promise<Array<Request>>
}
public external interface CacheQueryOptions {
@@ -408,12 +430,10 @@ public external interface CacheQueryOptions {
@kotlin.internal.InlineOnly
public inline fun CacheQueryOptions(ignoreSearch: Boolean? = false, ignoreMethod: Boolean? = false, ignoreVary: Boolean? = false, cacheName: String? = undefined): CacheQueryOptions {
val o = js("({})")
o["ignoreSearch"] = ignoreSearch
o["ignoreMethod"] = ignoreMethod
o["ignoreVary"] = ignoreVary
o["cacheName"] = cacheName
return o
}
@@ -435,12 +455,10 @@ public external interface CacheBatchOperation {
@kotlin.internal.InlineOnly
public inline fun CacheBatchOperation(type: String? = undefined, request: Request? = undefined, response: Response? = undefined, options: CacheQueryOptions? = undefined): CacheBatchOperation {
val o = js("({})")
o["type"] = type
o["request"] = request
o["response"] = response
o["options"] = options
return o
}
@@ -452,40 +470,62 @@ public external abstract class CacheStorage {
fun has(cacheName: String): Promise<Boolean>
fun open(cacheName: String): Promise<Cache>
fun delete(cacheName: String): Promise<Boolean>
fun keys(): Promise<dynamic>
fun keys(): Promise<Array<String>>
}
public external open class FunctionalEvent : ExtendableEvent {
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external @marker interface UnionClientOrMessagePortOrServiceWorker {
}
public external interface UnionMessagePortOrServiceWorker
public external interface UnionClientOrMessagePortOrServiceWorker
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface ServiceWorkerState {
companion object
}
public inline val ServiceWorkerState.Companion.INSTALLING: ServiceWorkerState get() = "installing".asDynamic().unsafeCast<ServiceWorkerState>()
public inline val ServiceWorkerState.Companion.INSTALLED: ServiceWorkerState get() = "installed".asDynamic().unsafeCast<ServiceWorkerState>()
public inline val ServiceWorkerState.Companion.ACTIVATING: ServiceWorkerState get() = "activating".asDynamic().unsafeCast<ServiceWorkerState>()
public inline val ServiceWorkerState.Companion.ACTIVATED: ServiceWorkerState get() = "activated".asDynamic().unsafeCast<ServiceWorkerState>()
public inline val ServiceWorkerState.Companion.REDUNDANT: ServiceWorkerState get() = "redundant".asDynamic().unsafeCast<ServiceWorkerState>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface FrameType {
companion object
}
public inline val FrameType.Companion.AUXILIARY: FrameType get() = "auxiliary".asDynamic().unsafeCast<FrameType>()
public inline val FrameType.Companion.TOP_LEVEL: FrameType get() = "top-level".asDynamic().unsafeCast<FrameType>()
public inline val FrameType.Companion.NESTED: FrameType get() = "nested".asDynamic().unsafeCast<FrameType>()
public inline val FrameType.Companion.NONE: FrameType get() = "none".asDynamic().unsafeCast<FrameType>()
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface ClientType {
companion object
}
public inline val ClientType.Companion.WINDOW: ClientType get() = "window".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.WORKER: ClientType get() = "worker".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.SHAREDWORKER: ClientType get() = "sharedworker".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.ALL: ClientType get() = "all".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.WINDOW: ClientType get() = "window".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.WORKER: ClientType get() = "worker".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.SHAREDWORKER: ClientType get() = "sharedworker".asDynamic().unsafeCast<ClientType>()
public inline val ClientType.Companion.ALL: ClientType get() = "all".asDynamic().unsafeCast<ClientType>()
+38 -29
View File
@@ -1,12 +1,11 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// NOTE: THIS FILE IS AUTO-GENERATED, DO NOT EDIT!
// See libraries/tools/idl2k for details
// See github.com/kotlin/dukat for details
@file:Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
package org.w3c.xhr
import kotlin.js.*
@@ -40,8 +39,7 @@ public external abstract class XMLHttpRequestEventTarget : EventTarget {
open var onloadend: ((Event) -> dynamic)?
}
public external abstract class XMLHttpRequestUpload : XMLHttpRequestEventTarget {
}
public external abstract class XMLHttpRequestUpload : XMLHttpRequestEventTarget
/**
* Exposes the JavaScript [XMLHttpRequest](https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest) to Kotlin
@@ -59,14 +57,14 @@ public external open class XMLHttpRequest : XMLHttpRequestEventTarget {
open val response: Any?
open val responseText: String
open val responseXML: Document?
fun open(method: String, url: String): Unit
fun open(method: String, url: String, async: Boolean, username: String? = definedExternally, password: String? = definedExternally): Unit
fun setRequestHeader(name: String, value: String): Unit
fun send(body: dynamic = definedExternally): Unit
fun abort(): Unit
fun open(method: String, url: String)
fun open(method: String, url: String, async: Boolean, username: String? = definedExternally, password: String? = definedExternally)
fun setRequestHeader(name: String, value: String)
fun send(body: dynamic = definedExternally)
fun abort()
fun getResponseHeader(name: String): String?
fun getAllResponseHeaders(): String
fun overrideMimeType(mime: String): Unit
fun overrideMimeType(mime: String)
companion object {
val UNSENT: Short
@@ -81,14 +79,14 @@ public external open class XMLHttpRequest : XMLHttpRequestEventTarget {
* Exposes the JavaScript [FormData](https://developer.mozilla.org/en/docs/Web/API/FormData) to Kotlin
*/
public external open class FormData(form: HTMLFormElement = definedExternally) {
fun append(name: String, value: String): Unit
fun append(name: String, value: Blob, filename: String = definedExternally): Unit
fun delete(name: String): Unit
fun append(name: String, value: String)
fun append(name: String, value: Blob, filename: String = definedExternally)
fun delete(name: String)
fun get(name: String): dynamic
fun getAll(name: String): Array<dynamic>
fun has(name: String): Boolean
fun set(name: String, value: String): Unit
fun set(name: String, value: Blob, filename: String = definedExternally): Unit
fun set(name: String, value: String)
fun set(name: String, value: Blob, filename: String = definedExternally)
}
/**
@@ -96,44 +94,55 @@ public external open class FormData(form: HTMLFormElement = definedExternally) {
*/
public external open class ProgressEvent(type: String, eventInitDict: ProgressEventInit = definedExternally) : Event {
open val lengthComputable: Boolean
open val loaded: Int
open val total: Int
open val loaded: Number
open val total: Number
companion object {
val NONE: Short
val CAPTURING_PHASE: Short
val AT_TARGET: Short
val BUBBLING_PHASE: Short
}
}
public external interface ProgressEventInit : EventInit {
var lengthComputable: Boolean? /* = false */
get() = definedExternally
set(value) = definedExternally
var loaded: Int? /* = 0 */
var loaded: Number? /* = 0 */
get() = definedExternally
set(value) = definedExternally
var total: Int? /* = 0 */
var total: Number? /* = 0 */
get() = definedExternally
set(value) = definedExternally
}
@kotlin.internal.InlineOnly
public inline fun ProgressEventInit(lengthComputable: Boolean? = false, loaded: Int? = 0, total: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ProgressEventInit {
public inline fun ProgressEventInit(lengthComputable: Boolean? = false, loaded: Number? = 0, total: Number? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ProgressEventInit {
val o = js("({})")
o["lengthComputable"] = lengthComputable
o["loaded"] = loaded
o["total"] = total
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
return o
}
/* please, don't implement this interface! */
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
public external interface XMLHttpRequestResponseType {
companion object
}
public inline val XMLHttpRequestResponseType.Companion.EMPTY: XMLHttpRequestResponseType get() = "".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.ARRAYBUFFER: XMLHttpRequestResponseType get() = "arraybuffer".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.BLOB: XMLHttpRequestResponseType get() = "blob".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.DOCUMENT: XMLHttpRequestResponseType get() = "document".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.JSON: XMLHttpRequestResponseType get() = "json".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.TEXT: XMLHttpRequestResponseType get() = "text".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.EMPTY: XMLHttpRequestResponseType get() = "".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.ARRAYBUFFER: XMLHttpRequestResponseType get() = "arraybuffer".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.BLOB: XMLHttpRequestResponseType get() = "blob".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.DOCUMENT: XMLHttpRequestResponseType get() = "document".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.JSON: XMLHttpRequestResponseType get() = "json".asDynamic().unsafeCast<XMLHttpRequestResponseType>()
public inline val XMLHttpRequestResponseType.Companion.TEXT: XMLHttpRequestResponseType get() = "text".asDynamic().unsafeCast<XMLHttpRequestResponseType>()