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