You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
474 B
Kotlin
14 lines
474 B
Kotlin
package me.eater.threedom.dom
|
|
|
|
import me.eater.threedom.event.Event
|
|
import me.eater.threedom.event.EventDispatcher
|
|
import kotlin.reflect.KClass
|
|
|
|
interface IDocument : EventDispatcher, INodeContainer {
|
|
fun <T : INode<T>> createNode(nodeType: KClass<T>): T
|
|
fun deleteNode(refNode: INode<*>)
|
|
fun <T> addEventListener(eventName: String, refNode: INode<*>, block: (Event<T>) -> Unit)
|
|
}
|
|
|
|
inline fun <reified T : INode<T>> IDocument.createNode() = createNode(T::class)
|