mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
io/clipboard,app: add WriteOp, ReadOp
Previously, the only way to manipulate the clipboard (read or write) is using the `app.Window`. The new `clipboard.ReadOp` and `clipboard.WriteOp`makes possible to read/write from the widget. Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -168,6 +168,12 @@ func (w *Window) processFrame(frameStart time.Time, size image.Point, frame *op.
|
||||
case router.TextInputClose:
|
||||
w.driver.ShowTextInput(false)
|
||||
}
|
||||
if txt, ok := w.queue.q.WriteClipboard(); ok {
|
||||
go w.WriteClipboard(txt)
|
||||
}
|
||||
if w.queue.q.ReadClipboard() {
|
||||
go w.ReadClipboard()
|
||||
}
|
||||
if w.queue.q.Profiling() {
|
||||
frameDur := time.Since(frameStart)
|
||||
frameDur = frameDur.Truncate(100 * time.Microsecond)
|
||||
|
||||
Reference in New Issue
Block a user