mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
io/input,io/clipboard: [API] replace WriteOp with command
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-9
@@ -316,8 +316,8 @@ func (w *Window) processFrame(d driver) {
|
||||
if hint, ok := q.TextInputHint(); ok {
|
||||
d.SetInputHint(hint)
|
||||
}
|
||||
if txt, ok := q.WriteClipboard(); ok {
|
||||
d.WriteClipboard(txt)
|
||||
if mime, txt, ok := q.WriteClipboard(); ok {
|
||||
d.WriteClipboard(mime, txt)
|
||||
}
|
||||
if q.ReadClipboard() {
|
||||
d.ReadClipboard()
|
||||
@@ -372,13 +372,6 @@ func (w *Window) Option(opts ...Option) {
|
||||
}
|
||||
}
|
||||
|
||||
// WriteClipboard writes a string to the clipboard.
|
||||
func (w *Window) WriteClipboard(s string) {
|
||||
w.driverDefer(func(d driver) {
|
||||
d.WriteClipboard(s)
|
||||
})
|
||||
}
|
||||
|
||||
// Run f in the same thread as the native window event loop, and wait for f to
|
||||
// return or the window to close. Run is guaranteed not to deadlock if it is
|
||||
// invoked during the handling of a ViewEvent, system.FrameEvent,
|
||||
|
||||
Reference in New Issue
Block a user