remove support for 'trait' keyword

This commit is contained in:
Dmitry Jemerov
2015-09-18 16:17:02 +02:00
parent 86833c1a74
commit 4ca434da54
217 changed files with 705 additions and 821 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
package kotlin.js
// https://developer.mozilla.org/en/DOM/console
@native public trait Console {
@native public interface Console {
@native public fun dir(o: Any): Unit = noImpl
@native public fun error(vararg o: Any?): Unit = noImpl
@native public fun info(vararg o: Any?): Unit = noImpl
+1 -1
View File
@@ -1,6 +1,6 @@
package org.w3c.dom.views
@Deprecated("Use declarations from org.w3c.dom instead")
@native public trait AbstractView {
@native public interface AbstractView {
}
+70 -70
View File
@@ -11,15 +11,15 @@ public val window: Window = noImpl
public var document: HTMLDocument = noImpl
@Deprecated("Do not use it")
public @native trait Object {
public @native interface Object {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Image : HTMLImageElement {
public @native interface Image : HTMLImageElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Navigator {
public @native interface Navigator {
public @native var userAgent: String
public @native var product: String
public @native var appVersion: String
@@ -35,7 +35,7 @@ public @native trait Navigator {
public @native fun preference(prefName: String): String
}
public @native trait Screen {
public @native interface Screen {
public @native var width: Double
public @native var height: Double
public @native var availHeight: Double
@@ -45,7 +45,7 @@ public @native trait Screen {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Option {
public @native interface Option {
public @native var defaultSelected: Boolean
public @native var selected: Boolean
public @native var text: String
@@ -53,7 +53,7 @@ public @native trait Option {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Location {
public @native interface Location {
public @native var href: String
public @native var hash: String
public @native var port: String
@@ -68,7 +68,7 @@ public @native trait Location {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Event {
public @native interface Event {
public @native var data: Array<Any>
public @native var height: Double
public @native var screenX: Double
@@ -89,31 +89,31 @@ public @native trait Event {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Selection {
public @native interface Selection {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait CSSRule {
public @native interface CSSRule {
public @native var selectorText: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Stylesheet {
public @native interface Stylesheet {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait History {
public @native interface History {
public @native fun back(): Unit
public @native fun forward(): Unit
public @native fun go(count: Number): Unit
}
public @native trait Console {
public @native interface Console {
public @native fun log(message: Any): Unit
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait Window {
public @native interface Window {
public @native val document: HTMLDocument
public @native val event: Event
public @native val navigator: Navigator
@@ -164,7 +164,7 @@ public @native trait Window {
public @native var onunload: () -> Unit
}
public @native trait Global {
public @native interface Global {
public @native val window: Window
public @native fun escape(str: String): Unit
public @native fun escape(): Unit
@@ -173,14 +173,14 @@ public @native trait Global {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLCollection {
public @native interface HTMLCollection {
public @native val length: Double
public @native fun item(index: Number): Node?
public @native fun namedItem(name: String): Node?
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLOptionsCollection {
public @native interface HTMLOptionsCollection {
public @native val length: Double
public @native fun item(index: Number): Node?
public @native fun namedItem(name: String): Node?
@@ -195,7 +195,7 @@ public @native class HTMLDocument : Document() {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLElement : Element {
public @native interface HTMLElement : Element {
public @native var title: String
public @native var lang: String
public @native var dir: String
@@ -221,7 +221,7 @@ public @native trait HTMLElement : Element {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait CSSStyleDeclaration {
public @native interface CSSStyleDeclaration {
public @native var cssText: String
public @native var length: Double
public @native var parentRule: CSSRule
@@ -233,17 +233,17 @@ public @native trait CSSStyleDeclaration {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLHtmlElement : HTMLElement {
public @native interface HTMLHtmlElement : HTMLElement {
public @native var version: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLHeadElement : HTMLElement {
public @native interface HTMLHeadElement : HTMLElement {
public @native var profile: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLLinkElement : HTMLElement {
public @native interface HTMLLinkElement : HTMLElement {
public @native var disabled: Boolean
public @native var charset: String
public @native var href: String
@@ -256,12 +256,12 @@ public @native trait HTMLLinkElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTitleElement : HTMLElement {
public @native interface HTMLTitleElement : HTMLElement {
public @native var text: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLMetaElement : HTMLElement {
public @native interface HTMLMetaElement : HTMLElement {
public @native var content: String
public @native var httpEquiv: String
public @native var name: String
@@ -269,26 +269,26 @@ public @native trait HTMLMetaElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLBaseElement : HTMLElement {
public @native interface HTMLBaseElement : HTMLElement {
public @native var href: String
public @native var target: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLIsIndexElement : HTMLElement {
public @native interface HTMLIsIndexElement : HTMLElement {
public @native val form: HTMLFormElement
public @native var prompt: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLStyleElement : HTMLElement {
public @native interface HTMLStyleElement : HTMLElement {
public @native var disabled: Boolean
public @native var media: String
public @native var type: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLBodyElement : HTMLElement {
public @native interface HTMLBodyElement : HTMLElement {
public @native var aLink: String
public @native var background: String
public @native var bgColor: String
@@ -300,7 +300,7 @@ public @native trait HTMLBodyElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLFormElement {
public @native interface HTMLFormElement {
public @native val elements: HTMLCollection
public @native val length: Double
public @native var name: String
@@ -314,7 +314,7 @@ public @native trait HTMLFormElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLSelectElement : HTMLElement {
public @native interface HTMLSelectElement : HTMLElement {
public @native val type: String
public @native var selectedIndex: Double
public @native var value: String
@@ -333,13 +333,13 @@ public @native trait HTMLSelectElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLOptGroupElement : HTMLElement {
public @native interface HTMLOptGroupElement : HTMLElement {
public @native var disabled: Boolean
public @native var label: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLOptionElement : HTMLElement {
public @native interface HTMLOptionElement : HTMLElement {
public @native val form: HTMLFormElement
public @native var defaultSelected: Boolean
public @native var text: String
@@ -351,7 +351,7 @@ public @native trait HTMLOptionElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLInputElement : HTMLElement {
public @native interface HTMLInputElement : HTMLElement {
public @native var defaultValue: String
public @native var defaultChecked: Boolean
public @native val form: HTMLFormElement
@@ -379,7 +379,7 @@ public @native trait HTMLInputElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTextAreaElement : HTMLElement {
public @native interface HTMLTextAreaElement : HTMLElement {
public @native var defaultValue: String
public @native val form: HTMLFormElement
public @native var accessKey: String
@@ -397,7 +397,7 @@ public @native trait HTMLTextAreaElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLButtonElement : HTMLElement {
public @native interface HTMLButtonElement : HTMLElement {
public @native val form: HTMLFormElement
public @native var accessKey: String
public @native var disabled: Boolean
@@ -408,104 +408,104 @@ public @native trait HTMLButtonElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLLabelElement : HTMLElement {
public @native interface HTMLLabelElement : HTMLElement {
public @native val form: HTMLFormElement
public @native var accessKey: String
public @native var htmlFor: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLFieldSetElement : HTMLElement {
public @native interface HTMLFieldSetElement : HTMLElement {
public @native val form: HTMLFormElement
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLLegendElement : HTMLElement {
public @native interface HTMLLegendElement : HTMLElement {
public @native val form: HTMLFormElement
public @native var accessKey: String
public @native var align: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLUListElement : HTMLElement {
public @native interface HTMLUListElement : HTMLElement {
public @native var compact: Boolean
public @native var type: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLOListElement : HTMLElement {
public @native interface HTMLOListElement : HTMLElement {
public @native var compact: Boolean
public @native var start: Double
public @native var type: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLDListElement : HTMLElement {
public @native interface HTMLDListElement : HTMLElement {
public @native var compact: Boolean
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLDirectoryElement : HTMLElement {
public @native interface HTMLDirectoryElement : HTMLElement {
public @native var compact: Boolean
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLMenuElement : HTMLElement {
public @native interface HTMLMenuElement : HTMLElement {
public @native var compact: Boolean
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLLIElement : HTMLElement {
public @native interface HTMLLIElement : HTMLElement {
public @native var type: String
public @native var value: Double
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLDivElement : HTMLElement {
public @native interface HTMLDivElement : HTMLElement {
public @native var align: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLParagraphElement : HTMLElement {
public @native interface HTMLParagraphElement : HTMLElement {
public @native var align: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLHeadingElement : HTMLElement {
public @native interface HTMLHeadingElement : HTMLElement {
public @native var align: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLQuoteElement : HTMLElement {
public @native interface HTMLQuoteElement : HTMLElement {
public @native var cite: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLPreElement : HTMLElement {
public @native interface HTMLPreElement : HTMLElement {
public @native var width: Double
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLBRElement : HTMLElement {
public @native interface HTMLBRElement : HTMLElement {
public @native var clear: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLBaseFontElement : HTMLElement {
public @native interface HTMLBaseFontElement : HTMLElement {
public @native var color: String
public @native var face: String
public @native var size: Double
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLFontElement : HTMLElement {
public @native interface HTMLFontElement : HTMLElement {
public @native var color: String
public @native var face: String
public @native var size: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLHRElement : HTMLElement {
public @native interface HTMLHRElement : HTMLElement {
public @native var align: String
public @native var noShade: Boolean
public @native var size: String
@@ -513,13 +513,13 @@ public @native trait HTMLHRElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLModElement : HTMLElement {
public @native interface HTMLModElement : HTMLElement {
public @native var cite: String
public @native var dateTime: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLAnchorElement : HTMLElement {
public @native interface HTMLAnchorElement : HTMLElement {
public @native var accessKey: String
public @native var charset: String
public @native var coords: String
@@ -537,7 +537,7 @@ public @native trait HTMLAnchorElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLImageElement : HTMLElement {
public @native interface HTMLImageElement : HTMLElement {
public @native var name: String
public @native var align: String
public @native var alt: String
@@ -555,7 +555,7 @@ public @native trait HTMLImageElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLObjectElement : HTMLElement {
public @native interface HTMLObjectElement : HTMLElement {
public @native val form: HTMLFormElement
public @native var code: String
public @native var align: String
@@ -578,7 +578,7 @@ public @native trait HTMLObjectElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLParamElement : HTMLElement {
public @native interface HTMLParamElement : HTMLElement {
public @native var name: String
public @native var type: String
public @native var value: String
@@ -586,7 +586,7 @@ public @native trait HTMLParamElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLAppletElement : HTMLElement {
public @native interface HTMLAppletElement : HTMLElement {
public @native var align: String
public @native var alt: String
public @native var archive: String
@@ -601,13 +601,13 @@ public @native trait HTMLAppletElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLMapElement : HTMLElement {
public @native interface HTMLMapElement : HTMLElement {
public @native val areas: HTMLCollection
public @native var name: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLAreaElement : HTMLElement {
public @native interface HTMLAreaElement : HTMLElement {
public @native var accessKey: String
public @native var alt: String
public @native var coords: String
@@ -619,7 +619,7 @@ public @native trait HTMLAreaElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLScriptElement : HTMLElement {
public @native interface HTMLScriptElement : HTMLElement {
public @native var text: String
public @native var htmlFor: String
public @native var event: String
@@ -630,7 +630,7 @@ public @native trait HTMLScriptElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTableElement : HTMLElement {
public @native interface HTMLTableElement : HTMLElement {
public @native var caption: HTMLTableCaptionElement
public @native var tHead: HTMLTableSectionElement
public @native var tFoot: HTMLTableSectionElement
@@ -656,12 +656,12 @@ public @native trait HTMLTableElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTableCaptionElement : HTMLElement {
public @native interface HTMLTableCaptionElement : HTMLElement {
public @native var align: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTableColElement : HTMLElement {
public @native interface HTMLTableColElement : HTMLElement {
public @native var align: String
public @native var ch: String
public @native var chOff: String
@@ -671,7 +671,7 @@ public @native trait HTMLTableColElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTableSectionElement : HTMLElement {
public @native interface HTMLTableSectionElement : HTMLElement {
public @native var align: String
public @native var ch: String
public @native var chOff: String
@@ -682,7 +682,7 @@ public @native trait HTMLTableSectionElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTableRowElement : HTMLElement {
public @native interface HTMLTableRowElement : HTMLElement {
public @native val rowIndex: Double
public @native val sectionRowIndex: Double
public @native val cells: HTMLCollection
@@ -696,7 +696,7 @@ public @native trait HTMLTableRowElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLTableCellElement : HTMLElement {
public @native interface HTMLTableCellElement : HTMLElement {
public @native val cellIndex: Double
public @native var abbr: String
public @native var align: String
@@ -715,13 +715,13 @@ public @native trait HTMLTableCellElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLFrameSetElement : HTMLElement {
public @native interface HTMLFrameSetElement : HTMLElement {
public @native var cols: String
public @native var rows: String
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLFrameElement : HTMLElement {
public @native interface HTMLFrameElement : HTMLElement {
public @native var frameBorder: String
public @native var longDesc: String
public @native var marginHeight: String
@@ -733,7 +733,7 @@ public @native trait HTMLFrameElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLIFrameElement : HTMLElement {
public @native interface HTMLIFrameElement : HTMLElement {
public @native var align: String
public @native var frameBorder: String
public @native var height: String
+2 -2
View File
@@ -4,8 +4,8 @@ package java.io
public class IOException(message: String = "") : Exception() {}
@library
public trait Closeable {
public interface Closeable {
public open fun close() : Unit;
}
trait Serializable
interface Serializable
+2 -2
View File
@@ -28,7 +28,7 @@ public class NumberFormatException(message: String? = null) : RuntimeException(m
public class NullPointerException(message: String? = null) : RuntimeException(message) {}
@library
public trait Runnable {
public interface Runnable {
public open fun run() : Unit;
}
@@ -37,7 +37,7 @@ public fun Runnable(action: () -> Unit): Runnable = object : Runnable {
}
@library
public trait Appendable {
public interface Appendable {
public open fun append(csq: CharSequence?): Appendable
public open fun append(csq: CharSequence?, start: Int, end: Int): Appendable
public open fun append(c: Char): Appendable
+3 -3
View File
@@ -7,7 +7,7 @@ private val DEFAULT_INITIAL_CAPACITY = 16
private val DEFAULT_LOAD_FACTOR = 0.75f
@library
public trait Comparator<T> {
public interface Comparator<T> {
public fun compare(obj1: T, obj2: T): Int;
}
@@ -85,7 +85,7 @@ public open class HashSet<E>(
}
@library
public trait SortedSet<E> : Set<E> {
public interface SortedSet<E> : Set<E> {
}
@library
@@ -128,7 +128,7 @@ public open class LinkedHashMap<K, V>(
public open class NoSuchElementException(message: String? = null) : Exception() {}
@library
public trait Enumeration<E> {
public interface Enumeration<E> {
public fun hasMoreElements(): Boolean
public fun nextElement(): E
}
+1 -1
View File
@@ -17,7 +17,7 @@ public fun json(vararg pairs: Pair<String, Any?>): Json {
public fun Json.add(other: Json): Json = noImpl
@native
public trait JsonClass {
public interface JsonClass {
public fun stringify(o: Any): String
public fun stringify(o: Any, replacer: (key: String, value: Any?)->Any?): String
public fun stringify(o: Any, replacer: (key: String, value: Any?)->Any?, space: Int): String
+1 -1
View File
@@ -40,7 +40,7 @@ public fun RegExp.reset() {
}
@native public trait RegExpMatch {
@native public interface RegExpMatch {
public val index: Int
public val input: String
}
+6 -6
View File
@@ -4,7 +4,7 @@ import kotlin.js.dom.html.HTMLElement
import org.w3c.dom.Element
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait HTMLCanvasElement : HTMLElement {
public @native interface HTMLCanvasElement : HTMLElement {
public var width: Double
public var height: Double
public fun getContext(contextId: String, vararg attributes: Any): CanvasContext?
@@ -14,7 +14,7 @@ public @native trait HTMLCanvasElement : HTMLElement {
}
@Deprecated("Use declarations from org.w3c.dom instead. See CanvasRenderingContext2D")
public @native trait CanvasContext {
public @native interface CanvasContext {
public var canvas: HTMLCanvasElement
public fun save(): Unit
public fun restore(): Unit
@@ -79,23 +79,23 @@ public @native trait CanvasContext {
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait CanvasGradient {
public @native interface CanvasGradient {
public fun addColorStop(offset: Number, color: String): Unit
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait ImageData {
public @native interface ImageData {
public var data: CanvasPixelArray
public var width: Double
public var height: Double
}
public @native trait CanvasPixelArray {
public @native interface CanvasPixelArray {
public var length: Double
}
@Deprecated("Use declarations from org.w3c.dom instead")
public @native trait TextMetrics {
public @native interface TextMetrics {
public var width: Double
}
+1 -1
View File
@@ -41,6 +41,6 @@ public open class Blob(blobParts: Array<Any>? = undefined, options: BlobProperty
@native
@Deprecated("Use org.w3c.dom")
public trait BlobPropertyBag {
public interface BlobPropertyBag {
public val type: String
}