Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
interface BEvent
Link copied to clipboard
data class ChangeEvent(var oldValue: Any? = null, var newValue: Any? = null) : TypedEvent<ChangeEvent>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class DropFileEvent(var type: DropFileEvent.Type = Type.START, var files: List<VfsFile>? = null) : Event, TEvent<DropFileEvent>
Link copied to clipboard
abstract class Event
Link copied to clipboard
interface EventListener

Supports registering for Event of EventType and dispatching events.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class EventResult(var iterationCount: Int = 0, var resultCount: Int = 0)
Link copied to clipboard
interface EventType<T : BEvent>
Link copied to clipboard
data class FocusEvent(var type: FocusEvent.Type = Type.FOCUS) : Event, TEvent<FocusEvent>
Link copied to clipboard
data class FullScreenEvent(var fullscreen: Boolean = false) : TypedEvent<FullScreenEvent>
Link copied to clipboard
Link copied to clipboard
data class GamePadConnectionEvent(var type: GamePadConnectionEvent.Type = Type.CONNECTED, var gamepad: Int = 0) : Event, TEvent<GamePadConnectionEvent>
Link copied to clipboard
class GamepadInfo(var index: Int = 0, var connected: Boolean = false, var name: String? = null, var rawButtons: FloatArray = FloatArray(GameButton.MAX), var batteryLevel: Float = 1.0f, var name2: String = DEFAULT_NAME2, var batteryStatus: GamepadInfo.BatteryStatus = BatteryStatus.UNKNOWN)
Link copied to clipboard
class GamepadInfoEmitter(val dispatcher: EventListener)
Link copied to clipboard
data class GamePadUpdateEvent @JvmOverloads constructor(var gamepadsLength: Int = 0, val gamepads: Array<GamepadInfo> = Array(GamepadInfo.MAX_CONTROLLERS) { GamepadInfo(it) }) : Event, TEvent<GamePadUpdateEvent>
Link copied to clipboard
Link copied to clipboard
data class GestureEvent(var type: GestureEvent.Type = Type.MAGNIFY, var id: Int = 0, var amountX: Float = 0.0f, var amountY: Float = 0.0f) : Event, TEvent<GestureEvent>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
enum Key : Enum<Key>
Link copied to clipboard
data class KeyEvent(var type: KeyEvent.Type = Type.UP, var id: Int = 0, var key: Key = Key.UP, var keyCode: Int = 0, var character: Char = '\u0000', var shift: Boolean = false, var ctrl: Boolean = false, var alt: Boolean = false, var meta: Boolean = false, var str: String? = null) : Event, TEvent<KeyEvent>
Link copied to clipboard
Link copied to clipboard
data class MouseEvent(var type: MouseEvent.Type = Type.MOVE, var id: Int = 0, var x: Int = 0, var y: Int = 0, var button: MouseButton = MouseButton.NONE, var buttons: Int = 0, var scrollDeltaX: Float = 0.0f, var scrollDeltaY: Float = 0.0f, var scrollDeltaZ: Float = 0.0f, var isShiftDown: Boolean = false, var isCtrlDown: Boolean = false, var isAltDown: Boolean = false, var isMetaDown: Boolean = false, var scaleCoords: Boolean = true, var emulated: Boolean = false, var scrollDeltaMode: MouseEvent.ScrollDeltaMode = ScrollDeltaMode.LINE) : Event, TEvent<MouseEvent>

x and y positions are window-based where 0,0 is the top-left position in the window client area

Link copied to clipboard
Link copied to clipboard
class PreventDefaultException(val reason: Any? = null) : Exception
Link copied to clipboard
Link copied to clipboard
data class ReshapeEvent(var x: Int = 0, var y: Int = 0, var width: Int = 0, var height: Int = 0) : TypedEvent<ReshapeEvent>
Link copied to clipboard
Link copied to clipboard
data class SoftKeyboardConfig(var softKeyboardType: SoftKeyboardType = SoftKeyboardType.DEFAULT, var softKeyboardSmartDashes: Boolean? = null, var softKeyboardSmartQuotes: Boolean? = null, var softKeyboardSpellChecking: Boolean? = null, var softKeyboardTextContentType: String? = null, var softKeyboardSmartInsertDelete: Boolean? = null, var softKeyboardPassword: Boolean = false, var softKeyboardReturnKeyType: SoftKeyboardReturnKeyType = SoftKeyboardReturnKeyType.DEFAULT, var softKeyboardAutocapitalization: Boolean? = null, var softKeyboardAutocorrection: Boolean? = null, var softKeyboardEnablesReturnKeyAutomatically: Boolean = false) : ISoftKeyboardConfig
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class StopPropagatingException(val reason: Any? = null) : Exception
Link copied to clipboard
interface TEvent<T : BEvent> : BEvent
Link copied to clipboard
data class Touch(val index: Int = -1, var id: Int = -1, var p: Point = Point.ZERO, var force: Float = 1.0f, var status: Touch.Status = Status.KEEP, var kind: Touch.Kind = Kind.FINGER, var button: MouseButton = MouseButton.LEFT) : Extra
Link copied to clipboard
Link copied to clipboard
data class TouchEvent(var type: TouchEvent.Type = Type.START, var screen: Int = 0, var currentTime: DateTime = DateTime.EPOCH, var scaleCoords: Boolean = true, var emulated: Boolean = false) : Event, TEvent<TouchEvent>
Link copied to clipboard
open class TypedEvent<T : BEvent>(var type: EventType<T>) : Event, TEvent<T>

Functions

Link copied to clipboard
fun awtKeyCodeToKey(keyCode: Int): Key
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun <T : Event> T.invoke(block: T.() -> Unit): T
Link copied to clipboard
fun preventDefault(reason: Any? = null): Nothing
Link copied to clipboard
fun Event.preventDefault(reason: Any? = null): Nothing
Link copied to clipboard
inline fun <T : Event> T.reset(block: T.() -> Unit = {}): T