scoop:scoop.surface:0.1.0
src/shared/input/events.scoop
Selected production source · src/shared/input/events.scoop
1
package scoop.surface3
import scoop.window.*5
/** Native state is retained; time can describe a later geometry-driven hover transition. */6
public struct InputPointer(val state: PointerState, val time: InputTime)8
public enum InputCancelReason {9
Window(10
PointerCancelReason11
), AreaChanged, BoundaryChanged, ScrollInterrupted, GestureInterrupted, ContactInterrupted, Claimed, ClaimCancelled, Closed12
}14
/** Pixel distances are logical; line distances retain their native unit. */15
public enum InputScrollDelta {16
Lines(Double, Double), Pixels(Double, Double)17
}19
public enum InputPointerEvent {20
Entered(InputPointer), Left(InputTime), Moved(InputPointer),21
Button(InputPointer, MouseButton, ElementState, Int),22
Wheel(InputPointer, InputScrollDelta, ScrollPhase, ScrollPhase),23
Cancelled(InputCancelReason, InputTime), ScrollCancelled(InputCancelReason, InputTime)24
}26
/** Native recognition and route cancellation share the ordinary input path. */27
public enum InputGestureEvent {28
Native(GestureEvent), Cancelled(GestureKind, InputCancelReason, InputTime)29
}31
public enum InputContactEvent {32
Began(ContactState), Moved(ContactState), Ended(ContactState),33
Cancelled(ContactId, InputCancelReason, InputTime)34
}36
public enum InputPressSource {37
Mouse(InputPointer, MouseButton, Int), Contact(ContactState)38
}40
/** Snapshot before the current input domain starts delivering a press. */41
public struct InputPress(val target: InputScope, val source: InputPressSource)43
/** Text transactions and focus/hover transitions are delivered directly to their owner. */44
public enum InputEvent {45
Pointer(InputPointerEvent), Contact(InputContactEvent), Gesture(InputGestureEvent), Keyboard(46
KeyEvent47
), TextCommand(TextEditCommand), ModifiersChanged(Modifiers),48
TextInput(TextInputEvent), FocusChanged(Boolean), FocusVisibilityChanged(Boolean)49
}51
public enum FocusOrigin {52
Pointer, Keyboard, Programmatic53
}55
public enum FocusVisibility {56
Automatic, Always, Never57
}59
public enum RoutedPhase {60
Capture, Target, Bubble, Default, Notification61
}