clipboard.go 436 B

123456789101112131415161718192021222324
  1. // SPDX-License-Identifier: Unlicense OR MIT
  2. package clipboard
  3. import (
  4. "io"
  5. "gioui.org/io/event"
  6. )
  7. // WriteCmd copies Text to the clipboard.
  8. type WriteCmd struct {
  9. Type string
  10. Data io.ReadCloser
  11. }
  12. // ReadCmd requests the text of the clipboard, delivered to
  13. // the handler through an [io/transfer.DataEvent].
  14. type ReadCmd struct {
  15. Tag event.Tag
  16. }
  17. func (WriteCmd) ImplementsCommand() {}
  18. func (ReadCmd) ImplementsCommand() {}