类型 AttachmentData
API 文档由 Go 源码生成,内容为英文。
type AttachmentData struct {
Name string
Description string
Kind AttachmentKind
ResourceID uint64
// Icon, when it has any commands, is painted in the media square instead of the
// placeholder shape of Kind: a file-type or brand glyph the application owns.
Icon ui.Icon
State AttachmentState
Size AttachmentSize
Orientation AttachmentOrientation
// Progress is the fraction, 0 to 1, of an Uploading attachment that has been sent;
// it draws the bar along the bottom edge. The zero value draws no bar, and the
// other states have no determinate progress to show.
Progress float32
}AttachmentData is the typed source boundary for one attachment. ResourceID is caller-owned and intentionally unresolved until Canvas exposes images.