Documentation
¶
Overview ¶
Package input maps BUSY Bar physical controls to core-owned interaction state.
Index ¶
Constants ¶
const InputQueueCapacity = 64
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackAttempt ¶
type BackAttempt struct {
Consumed func(context.Context) error
Fallback func(context.Context, string) error
}
BackAttempt binds the eventual callback result to the presentation context that existed when the physical Back press was accepted.
type BackHandling ¶
type BackHandling struct {
Publish SessionInputResultPublisher
Begin func() BackAttempt
}
BackHandling is a required dependency because Back has synchronous first-refusal semantics that ordinary input does not share.
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator is the single ordered decision point for physical input. Switch transitions are handled first; START then activates the exact rendered card before input falls back to the APPS menu or one foreground session token.
func NewCoordinator ¶
func NewCoordinator( launcher *Router, activate ObservationActivator, sessions SessionController, publish SessionInputPublisher, back BackHandling, invalidate func(), reconcile func(context.Context) error, now func() time.Time, ) *Coordinator
func (*Coordinator) Handle ¶
func (c *Coordinator) Handle(ctx context.Context, event *inputpb.InputEvent) error
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher isolates the device stream from all input-triggered core work. Submit is non-blocking; one Run call owns ordered handler execution.
func NewDispatcherWithClearCapture ¶
func NewDispatcherWithClearCapture(handle func(context.Context, *inputpb.InputEvent) error, captureClear func() func(context.Context)) *Dispatcher
NewDispatcherWithClearCapture snapshots the exact foreground cleanup target at overflow time so delayed recovery cannot clear a later session.
func (*Dispatcher) InvalidateContext ¶
func (d *Dispatcher) InvalidateContext()
InvalidateContext atomically retires every queued event accepted before the foreground transition. Inputs submitted after it returns use a fresh epoch.
func (*Dispatcher) Status ¶
func (d *Dispatcher) Status() DispatcherStatus
func (*Dispatcher) Submit ¶
func (d *Dispatcher) Submit(event *inputpb.InputEvent) bool
type DispatcherStatus ¶
type ObservationActivator ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}