changes to jslib and TestConfig
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package js;
|
||||
|
||||
native
|
||||
annotation class native(name : String = "") {}
|
||||
native
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package js
|
||||
|
||||
native
|
||||
class Date() {
|
||||
fun getTime() : Int = js.noImpl
|
||||
}
|
||||
@@ -5,10 +5,9 @@ import js.library
|
||||
|
||||
library
|
||||
trait Iterable<T> {
|
||||
fun iterator() : java.util.Iterator<T> {}
|
||||
fun iterator() : java.util.Iterator<T> = js.noImpl
|
||||
}
|
||||
|
||||
library("splitString")
|
||||
public fun String.split(regex : String) : Array<String> {
|
||||
}
|
||||
public fun String.split(regex : String) : Array<String> = js.noImpl
|
||||
|
||||
|
||||
+57
-57
@@ -4,7 +4,7 @@ import js.*;
|
||||
|
||||
|
||||
library("collectionsMax")
|
||||
public fun max<T>(col : Collection<T>, comp : Comparator<T>) : T {}
|
||||
public fun max<T>(col : Collection<T>, comp : Comparator<T>) : T = js.noImpl
|
||||
|
||||
library
|
||||
public trait Comparator<T> {
|
||||
@@ -12,13 +12,13 @@ public trait Comparator<T> {
|
||||
}
|
||||
|
||||
library("comparator")
|
||||
public fun comparator<T>(f : (T, T) -> Int) : Comparator<T> {}
|
||||
public fun comparator<T>(f : (T, T) -> Int) : Comparator<T> = js.noImpl
|
||||
|
||||
|
||||
library
|
||||
public open class Iterator<T>() {
|
||||
open fun next() : T {}
|
||||
open fun hasNext() : Boolean {}
|
||||
open fun next() : T = js.noImpl
|
||||
open fun hasNext() : Boolean = js.noImpl
|
||||
}
|
||||
|
||||
library
|
||||
@@ -29,23 +29,23 @@ val Collections = object {
|
||||
|
||||
library
|
||||
public open class ArrayList<erased E>() : java.util.List<E> {
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun iterator() : Iterator<E> {}
|
||||
// override public fun indexOf(o : Any?) : Int {}
|
||||
// override public fun lastIndexOf(o : Any?) : Int {}
|
||||
// override public fun toArray() : Array<Any?> {}
|
||||
// override public fun toArray<erased T>(a : Array<out T>) : Array<T> {}
|
||||
override public fun get(index : Int) : E {}
|
||||
override public fun set(index : Int, element : E) : E {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun add(index : Int, element : E) : Unit {}
|
||||
override public fun remove(index : Int) : E {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean {}
|
||||
// override public fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun size() : Int = js.noImpl
|
||||
override public fun isEmpty() : Boolean = js.noImpl
|
||||
override public fun contains(o : Any?) : Boolean = js.noImpl
|
||||
override public fun iterator() : Iterator<E> = js.noImpl
|
||||
// override public fun indexOf(o : Any?) : Int = js.noImpl
|
||||
// override public fun lastIndexOf(o : Any?) : Int = js.noImpl
|
||||
// override public fun toArray() : Array<Any?> = js.noImpl
|
||||
// override public fun toArray<erased T>(a : Array<out T>) : Array<T> = js.noImpl
|
||||
override public fun get(index : Int) : E = js.noImpl
|
||||
override public fun set(index : Int, element : E) : E = js.noImpl
|
||||
override public fun add(e : E) : Boolean = js.noImpl
|
||||
override public fun add(index : Int, element : E) : Unit = js.noImpl
|
||||
override public fun remove(index : Int) : E = js.noImpl
|
||||
override public fun remove(o : Any?) : Boolean = js.noImpl
|
||||
override public fun clear() : Unit = js.noImpl
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean = js.noImpl
|
||||
// override public fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean = js.noImpl
|
||||
}
|
||||
|
||||
library
|
||||
@@ -109,14 +109,14 @@ public trait Set<erased E> : Collection<E> {
|
||||
|
||||
library
|
||||
public open class HashSet<erased E>() : java.util.Set<E> {
|
||||
override public fun iterator() : java.util.Iterator<E> {}
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
override fun addAll(c : java.util.Collection<out E>) : Boolean
|
||||
override public fun iterator() : java.util.Iterator<E> = js.noImpl
|
||||
override public fun size() : Int = js.noImpl
|
||||
override public fun isEmpty() : Boolean = js.noImpl
|
||||
override public fun contains(o : Any?) : Boolean = js.noImpl
|
||||
override public fun add(e : E) : Boolean = js.noImpl
|
||||
override public fun remove(o : Any?) : Boolean = js.noImpl
|
||||
override public fun clear() : Unit = js.noImpl
|
||||
override fun addAll(c : java.util.Collection<out E>) : Boolean = js.noImpl
|
||||
}
|
||||
|
||||
library
|
||||
@@ -136,40 +136,40 @@ public trait Map<erased K, erased V> {
|
||||
|
||||
library
|
||||
public open class HashMap<erased K, erased V>() : java.util.Map<K, V> {
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun get(key : Any?) : V {}
|
||||
override public fun containsKey(key : Any?) : Boolean {}
|
||||
override public fun put(key : K, value : V) : V {}
|
||||
override public fun putAll(m : java.util.Map<out K, out V>) : Unit {}
|
||||
override public fun remove(key : Any?) : V? {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun containsValue(value : Any?) : Boolean {}
|
||||
override public fun keySet() : java.util.Set<K> {}
|
||||
override public fun values() : java.util.Collection<V> {}
|
||||
override public fun size() : Int = js.noImpl
|
||||
override public fun isEmpty() : Boolean = js.noImpl
|
||||
override public fun get(key : Any?) : V = js.noImpl
|
||||
override public fun containsKey(key : Any?) : Boolean = js.noImpl
|
||||
override public fun put(key : K, value : V) : V = js.noImpl
|
||||
override public fun putAll(m : java.util.Map<out K, out V>) : Unit = js.noImpl
|
||||
override public fun remove(key : Any?) : V? = js.noImpl
|
||||
override public fun clear() : Unit = js.noImpl
|
||||
override public fun containsValue(value : Any?) : Boolean = js.noImpl
|
||||
override public fun keySet() : java.util.Set<K> = js.noImpl
|
||||
override public fun values() : java.util.Collection<V> = js.noImpl
|
||||
}
|
||||
|
||||
library
|
||||
public open class LinkedList<erased E>() : List<E> {
|
||||
override public fun iterator() : java.util.Iterator<E> {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun size() : Int {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun get(index : Int) : E {}
|
||||
override public fun set(index : Int, element : E) : E {}
|
||||
override public fun add(index : Int, element : E) : Unit {}
|
||||
override public fun remove(index : Int) : E {}
|
||||
public fun poll() : E? {}
|
||||
public fun peek() : E? {}
|
||||
public fun offer(e : E) : Boolean {}
|
||||
override public fun iterator() : java.util.Iterator<E> = js.noImpl
|
||||
override public fun isEmpty() : Boolean = js.noImpl
|
||||
override public fun contains(o : Any?) : Boolean = js.noImpl
|
||||
override public fun size() : Int = js.noImpl
|
||||
override public fun add(e : E) : Boolean = js.noImpl
|
||||
override public fun remove(o : Any?) : Boolean = js.noImpl
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean = js.noImpl
|
||||
override public fun clear() : Unit = js.noImpl
|
||||
override public fun get(index : Int) : E = js.noImpl
|
||||
override public fun set(index : Int, element : E) : E = js.noImpl
|
||||
override public fun add(index : Int, element : E) : Unit = js.noImpl
|
||||
override public fun remove(index : Int) : E = js.noImpl
|
||||
public fun poll() : E? = js.noImpl
|
||||
public fun peek() : E? = js.noImpl
|
||||
public fun offer(e : E) : Boolean = js.noImpl
|
||||
}
|
||||
|
||||
library
|
||||
public class StringBuilder() {
|
||||
public fun append(obj : Any) : StringBuilder
|
||||
public fun toString() : String
|
||||
public fun append(obj : Any) : StringBuilder = js.noImpl
|
||||
public fun toString() : String = js.noImpl
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package ip.helper
|
||||
|
||||
import html5.HTMLInputElement
|
||||
import js.native
|
||||
|
||||
native
|
||||
fun getInputElement() : HTMLInputElement = js.noImpl
|
||||
@@ -75,12 +75,14 @@ class Context() {
|
||||
fun drawImage(image : HTMLImageElement, dx: Double, dy: Double, dw: Double, dh: Double) {
|
||||
}
|
||||
fun drawImage(image : HTMLImageElement, sx: Double, sy: Double,
|
||||
sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) {
|
||||
sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double) {
|
||||
}
|
||||
|
||||
fun createLinearGradient(x0 : Double, y0 : Double, x1 : Double, y1 : Double) : CanvasGradient = CanvasGradient()
|
||||
fun createRadialGradient(x0 : Double, y0 : Double, r0 : Double, x1 : Double, y1 : Double, r1 : Double) : CanvasGradient = CanvasGradient();
|
||||
|
||||
fun getImageData(sx : Int, sy : Int, sw : Int, sh : Int) : ImageData = js.noImpl
|
||||
fun putImageData(data : ImageData, dx : Int, dy : Int) : Unit = js.noImpl
|
||||
}
|
||||
|
||||
native
|
||||
@@ -89,14 +91,25 @@ open class HTMLImageElement() : DomElement() {
|
||||
|
||||
native
|
||||
class CanvasGradient() {
|
||||
fun addColorStop(offset : Double, color : String) {}
|
||||
fun addColorStop(offset : Double, color : String) {
|
||||
}
|
||||
}
|
||||
|
||||
native
|
||||
class ImageData() {
|
||||
// readonly attribute unsigned long width;
|
||||
// readonly attribute unsigned long height;
|
||||
// readonly attribute Uint8ClampedArray data;
|
||||
val width : Int = js.noImpl
|
||||
val height : Int = js.noImpl
|
||||
val data : Array<Int> = js.noImpl
|
||||
}
|
||||
|
||||
|
||||
native
|
||||
class Canvas() : DomElement() {
|
||||
var width = 0.0;
|
||||
var height = 0.0;
|
||||
var width : Int = js.noImpl;
|
||||
var height : Int = js.noImpl;
|
||||
|
||||
//DOMString toDataURL(in optional DOMString type, in any... args);
|
||||
fun toDataURL() : String = js.noImpl
|
||||
|
||||
@@ -4,6 +4,7 @@ package jquery.ui
|
||||
//jquery UI
|
||||
import jquery.JQuery
|
||||
import js.native
|
||||
import js.Json
|
||||
|
||||
native
|
||||
fun JQuery.buttonset() : JQuery = js.noImpl;
|
||||
@@ -13,3 +14,7 @@ native
|
||||
fun JQuery.button() : JQuery = js.noImpl;
|
||||
native
|
||||
fun JQuery.accordion() : JQuery = js.noImpl
|
||||
native
|
||||
fun JQuery.draggable(params : Json) : JQuery = js.noImpl
|
||||
native
|
||||
fun JQuery.selectable() : JQuery = js.noImpl
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package jquery.pixastic
|
||||
|
||||
import jquery.JQuery
|
||||
import js.native
|
||||
|
||||
native
|
||||
fun JQuery.pixastic(actionName : String) = js.noImpl
|
||||
|
||||
native
|
||||
fun addAction(actionName : String,
|
||||
process : (oldData : Array<Int>, newData : Array<Int>, width : Int, height : Int)->Unit) = js.noImpl
|
||||
@@ -16,17 +16,17 @@ open class Element() {
|
||||
|
||||
|
||||
fun getTotalLength() : Double = 0.0
|
||||
fun getPointAtLength(length : Double) : Point {}
|
||||
fun getPointAtLength(length : Double) : Point = js.noImpl
|
||||
|
||||
fun animate(params : Json, ms : Int, callback : ()-> Unit) : Element {}
|
||||
fun animate(params : Json, ms : Int, s : String) : Element {}
|
||||
fun animate(params : Json, ms : Int) : Element {}
|
||||
fun animate(params : Json, ms : Int, callback : ()-> Unit) : Element = js.noImpl
|
||||
fun animate(params : Json, ms : Int, s : String) : Element = js.noImpl
|
||||
fun animate(params : Json, ms : Int) : Element = js.noImpl
|
||||
//fun mouse
|
||||
}
|
||||
|
||||
native
|
||||
class Set() : Element() {
|
||||
fun push(el : Element) {}
|
||||
fun push(el : Element) = js.noImpl
|
||||
}
|
||||
|
||||
native
|
||||
@@ -34,9 +34,9 @@ class Paper() {
|
||||
fun path(pathString : String) : Element = Element();
|
||||
fun path() : Element = Element();
|
||||
|
||||
fun ellipse(x : Int, y : Int, rx : Int, ry : Int) : Element {}
|
||||
fun circle(x : Int, y : Int, r : Int) : Element {}
|
||||
fun set() : Set {}
|
||||
fun ellipse(x : Int, y : Int, rx : Int, ry : Int) : Element = js.noImpl
|
||||
fun circle(x : Int, y : Int, r : Int) : Element = js.noImpl
|
||||
fun set() : Set = js.noImpl
|
||||
|
||||
val customAttributes : Json = Json();
|
||||
}
|
||||
@@ -44,15 +44,16 @@ class Paper() {
|
||||
native("Raphael")
|
||||
fun Raphael(elementId : String, width : Int, height : Int) : Paper = Paper();
|
||||
native("Raphael")
|
||||
fun Raphael(elementId : String, width : Int, height : Int, initFun : Paper.() -> Unit) : Unit {}
|
||||
fun Raphael(elementId : String, width : Int, height : Int, initFun : Paper.() -> Unit) : Unit = js.noImpl
|
||||
|
||||
native
|
||||
fun getColor() : Color {}
|
||||
fun getColor() : Color = js.noImpl
|
||||
native
|
||||
fun resetColors() {}
|
||||
fun resetColors() = js.noImpl
|
||||
|
||||
native
|
||||
class Color() {}
|
||||
class Color() {
|
||||
}
|
||||
|
||||
native
|
||||
class Point() {
|
||||
|
||||
@@ -53,8 +53,7 @@ public final class TestConfig extends Config {
|
||||
"/raphael/raphael.kt",
|
||||
"/html5/canvas.kt",
|
||||
"/html5/files.kt",
|
||||
"/html5/image.kt",
|
||||
"/helper/ip.kt"
|
||||
"/html5/image.kt"
|
||||
);
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user