go mod vendor pins onnxruntime_go v1.12.1, Gio and the rest into v2/vendor so go run/build work without hitting proxy.golang.org (blocked/slow in China). Verified: CGO_ENABLED=1 go build -mod=vendor ./internal/spike and GOOS=windows go build -mod=vendor ./internal/ui both pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
758 B
Go
34 lines
758 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
// Package event contains types for event handling.
|
|
package event
|
|
|
|
import (
|
|
"gioui.org/internal/ops"
|
|
"gioui.org/op"
|
|
)
|
|
|
|
// Tag is the stable identifier for an event handler.
|
|
// For a handler h, the tag is typically &h.
|
|
type Tag any
|
|
|
|
// Event is the marker interface for events.
|
|
type Event interface {
|
|
ImplementsEvent()
|
|
}
|
|
|
|
// Filter represents a filter for [Event] types.
|
|
type Filter interface {
|
|
ImplementsFilter()
|
|
}
|
|
|
|
// Op declares a tag for input routing at the current transformation
|
|
// and clip area hierarchy. It panics if tag is nil.
|
|
func Op(o *op.Ops, tag Tag) {
|
|
if tag == nil {
|
|
panic("Tag must be non-nil")
|
|
}
|
|
data := ops.Write1(&o.Internal, ops.TypeInputLen, tag)
|
|
data[0] = byte(ops.TypeInput)
|
|
}
|