Package-level declarations

Types

Link copied to clipboard
data class DraggableCloseable(val onMouseDragCloseable: Closeable) : Closeable
Link copied to clipboard
open class DraggableInfo(val view: View) : MouseDragInfo
Link copied to clipboard
Link copied to clipboard
data class GamePadButtonEvent @JvmOverloads constructor(var type: GamePadButtonEvent.Type = Type.DOWN, var gamepad: Int = 0, var button: GameButton = GameButton.BUTTON_SOUTH, var value: Float = 0.0f) : Event, TEvent<GamePadButtonEvent>
Link copied to clipboard
class GamePadEvents(val view: View)
Link copied to clipboard
data class GamePadStickEvent(var gamepad: Int = 0, var stick: GameStick = GameStick.LEFT, var pos: Point = Point.ZERO) : TypedEvent<GamePadStickEvent>
Link copied to clipboard
class GestureEvents(val view: BaseView)
Link copied to clipboard
class Input : Extra
Link copied to clipboard
class InputKeys
Link copied to clipboard
class KeysEvents(val view: View) : Closeable
Link copied to clipboard
open class MouseDragInfo(val view: View, var dx: Double = 0.0, var dy: Double = 0.0, var start: Boolean = false, var end: Boolean = false, var startTime: DateTime = DateTime.EPOCH, var time: DateTime = DateTime.EPOCH, var sx: Double = 0.0, var sy: Double = 0.0, var cx: Double = 0.0, var cy: Double = 0.0)
Link copied to clipboard
Link copied to clipboard
class MouseEvents(val view: View) : Extra, Closeable
Link copied to clipboard
data class OnMouseDragCloseable(val onDownCloseable: Closeable, val onUpAnywhereCloseable: Closeable, val onMoveAnywhereCloseable: Closeable) : Closeable
Link copied to clipboard
data class RotationRecognizerInfo(var started: Boolean = false, var completed: Boolean = false, var start: Angle = 0.degrees, var current: Angle = 0.degrees)
Link copied to clipboard
data class ScaleRecognizerInfo(var started: Boolean = false, var completed: Boolean = true, var start: Double = 0.0, var current: Double = 0.0)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class SwipeInfo(var delta: Vector2F = Vector2F.ZERO, var direction: SwipeDirection)
Link copied to clipboard
class TouchEvents(val view: View)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun <T : View> T.draggable(selector: View = this, autoMove: Boolean = true, onDrag: (DraggableInfo) -> Unit? = null): T
Link copied to clipboard
fun <T : View> T.draggableCloseable(selector: View = this, autoMove: Boolean = true, onDrag: (DraggableInfo) -> Unit? = null): DraggableCloseable
Link copied to clipboard
inline fun <T> View.gamepad(callback: GamePadEvents.() -> T): T
Link copied to clipboard
inline fun <T> View.gestures(callback: GestureEvents.() -> T): T
Link copied to clipboard
inline fun <T> View.keys(callback: KeysEvents.() -> T): T
Link copied to clipboard
inline fun <T : View> T.mouse(callback: MouseEvents.() -> Unit): T
Link copied to clipboard
fun MouseEvents.multiClick(count: Int, callback: (MouseEvents) -> Unit): Closeable
Link copied to clipboard
inline fun View.newKeys(callback: KeysEvents.() -> Unit): KeysEvents
Link copied to clipboard
inline fun View.newMouse(callback: MouseEvents.() -> Unit): MouseEvents
Link copied to clipboard
inline fun <T : View?> T.onClick(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onDown(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onDownFromOutside(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard

Handles a DropFileEvent. The event happens when a drag&drop file over the window happens.

Link copied to clipboard
inline fun <T : View?> T.onMagnify(noinline handler: suspend (GestureEvents) -> Unit): T?

Trackpad pinch zooming. Only implemented on MacOS for now

Link copied to clipboard
fun <T : View> T.onMouseDrag(timeProvider: TimeProvider = TimeProvider, info: MouseDragInfo = MouseDragInfo(this), callback: Views.(MouseDragInfo) -> Unit): T
Link copied to clipboard
fun <T : View> T.onMouseDragCloseable(timeProvider: TimeProvider = TimeProvider, info: MouseDragInfo = MouseDragInfo(this), callback: Views.(MouseDragInfo) -> Unit): OnMouseDragCloseable
Link copied to clipboard
inline fun <T : View?> T.onMove(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onOut(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View> T.onOutOnOver(noinline out: (MouseEvents) -> Unit, noinline over: (MouseEvents) -> Unit): T
Link copied to clipboard
inline fun <T : View?> T.onOver(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onRotate(noinline handler: suspend (GestureEvents) -> Unit): T?

Trackpad pinch rotation. Only implemented on MacOS for now

Link copied to clipboard
inline fun <T : View?> T.onScroll(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onSmartZoom(noinline handler: suspend (GestureEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onSwipe(noinline handler: suspend (GestureEvents) -> Unit): T?

fun <T : View> T.onSwipe(threshold: Double = -1.0, direction: SwipeDirection? = null, callback: suspend Views.(SwipeInfo) -> Unit): T

This methods lets you specify a callback to execute when swipe event is triggered.

Link copied to clipboard
inline fun <T : View?> T.onUp(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onUpAnywhere(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
inline fun <T : View?> T.onUpOutside(noinline handler: suspend (MouseEvents) -> Unit): T?
Link copied to clipboard
Link copied to clipboard
fun TouchEvents.scaleRecognizer(start: ScaleRecognizerInfo.() -> Unit = {}, end: ScaleRecognizerInfo.(ratio: Double) -> Unit = {}, block: ScaleRecognizerInfo.(ratio: Double) -> Unit)
Link copied to clipboard
fun View.singleTouch(removeTouch: Boolean = false, supportStartAnywhere: Boolean = false, block: SingleTouchHandler.(id: Int) -> Unit)
Link copied to clipboard
fun TouchEvents.swipeRecognizer(thresold: Double = 32.0, block: (direction: SwipeRecognizerDirection) -> Unit)
Link copied to clipboard
fun View.touch(block: TouchEvents.() -> Unit)
Link copied to clipboard
suspend fun KeysEvents.waitUp(key: Key): KeyEvent
suspend fun KeysEvents.waitUp(filter: (key: KeyEvent) -> Boolean = { true }): KeyEvent