Skip to content

net.kernelpanicsoft.archie.gui.modifiers.input

Types

BasicPointerEvent

class BasicPointerEvent(
    type: PointerEventType, 
    mouseX: Double, 
    mouseY: Double, 
    button: Int = MouseButton.NONE
) : PointerEvent

A basic pointer event carrying position, type and, for a press or release, the MouseButton it came from.

CharEvent

data class CharEvent(val codePoint: Char, val modifiers: Int) : InputEvent

An event generated when a printable character is typed.

DragEvent

class DragEvent(
    type: PointerEventType = PointerEventType.DRAG, 
    mouseX: Double, 
    mouseY: Double, 
    button: Int, 
    val dragX: Double, 
    val dragY: Double
) : PointerEvent

A pointer event generated by click-dragging the mouse.

DraggableState

fun interface DraggableState

Reports drag deltas to a single callback - the net.kernelpanicsoft.archie equivalent of Compose Foundation's DraggableState. Create one with rememberDraggableState rather than implementing this directly.

InputEvent

sealed class InputEvent

Base class for all events dispatched through the composable input system.

KeyEvent

data class KeyEvent(
    val keyCode: Int, 
    val scanCode: Int, 
    val modifiers: Int
) : InputEvent

An event generated by a keyboard key press.

MouseButton

object MouseButton

GLFW mouse button numbers, plus the value events that no button produced carry.

OnCharTypedModifier

A Modifier.Element that registers a character-typed handler on a composable node.

OnKeyEventModifier

A Modifier.Element that registers a keyboard key-press handler on a composable node.

OnPointerEventModifier

A Modifier.Element that registers a callback for a specific PointerEventType.

Orientation

Which axis a draggable gesture tracks - the net.kernelpanicsoft.archie equivalent of Compose Foundation's Orientation.

PointerEvent

sealed class PointerEvent : InputEvent

Base class for all pointer (mouse) events.

PointerEventType

Identifies the type of pointer (mouse) interaction that triggers an event handler.

ScrollEvent

class ScrollEvent(
    type: PointerEventType = PointerEventType.SCROLL, 
    mouseX: Double, 
    mouseY: Double, 
    val scrollX: Double, 
    val scrollY: Double
) : PointerEvent

A pointer event generated by mouse wheel movement.

Properties

DOUBLE_CLICK_THRESHOLD

const val DOUBLE_CLICK_THRESHOLD: Int = 300

Milliseconds within which two successive presses qualify as a double-click.

LONG_CLICK_THRESHOLD

const val LONG_CLICK_THRESHOLD: Int = 500

Milliseconds a press must be held to qualify as a long-click.

Functions

rememberDraggableState

@Composable



fun rememberDraggableState(onDelta: (Float) -> Unit): DraggableState

Remembers a DraggableState that forwards each delta to the latest onDelta.