Files
launcher/gesture/pkg.generated.mbti
nandi 2fa7bd745b
Launcher / test (push) Successful in 1m20s
Launcher / apk (push) Successful in 37s
Rewrite the launcher in MoonBit (old code moves to legacy/) (#1)
2026-11-23 01:57:10 +00:00

58 lines
1.1 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "experiments/launcher/gesture"
import {
"moonbitlang/core/debug",
}
// Values
pub fn classify_swipe(Double, Double, Int32) -> Swipe?
pub let hold_ms : Int32
pub let slop : Double
// Errors
// Types and methods
#derive(Eq, @debug.Debug)
pub(all) enum Input {
Down(x~ : Double, y~ : Double, chain~ : Array[Int32])
Move(x~ : Double, y~ : Double)
Up(x~ : Double, y~ : Double)
Cancel
Hold(Int32)
}
#derive(Eq, @debug.Debug)
pub(all) enum Out {
Schedule(Int32, Int32)
Began(chain~ : Array[Int32], x~ : Double, y~ : Double)
Tap(chain~ : Array[Int32])
Press(chain~ : Array[Int32])
Drag(x~ : Double, y~ : Double, x0~ : Double, y0~ : Double)
Release(moved~ : Bool, held~ : Bool)
}
pub(all) struct State {
mut down : Bool
mut x0 : Double
mut y0 : Double
mut moved : Bool
mut held : Bool
mut chain : Array[Int32]
mut token : Int32
}
pub fn State::new() -> Self
pub fn State::step(Self, Input) -> Array[Out]
#derive(Eq, @debug.Debug)
pub(all) enum Swipe {
Down
Up
}
// Type aliases
// Traits