inline fun <reified T : Widget> T.onEvent(noinline block: SnOn<T>.() -> Unit): Int
An extension function for defining event handlers.