gclip-gui

command
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 18 Imported by: 0

README

gclip-gui

This is a very basic example for verification purpose that demonstrates how the golang.design/x/clipboard can interact with macOS/Linux/Windows/Android/iOS system clipboard.

The gclip GUI application writes a string to the system clipboard periodically then reads it back and renders it if possible.

Because of the system limitation, on mobile devices, only string data is supported at the moment. Hence, one must use clipboard.FmtText. Other supplied formats result in a panic.

This example is intentded as cross platform application. To build it, one must use gomobile. You may follow the instructions provided in the GoMobile wiki page.

  • For desktop: go build -o gclip-gui
  • For Android: gomobile build -v -target=android -o gclip-gui.apk
  • For iOS: gomobile build -v -target=ios -bundleid design.golang.gclip-gui.app

Screenshots

macOS iOS Windows Android Linux

License

MIT | © 2021 The golang.design Initiative Authors, written by Changkun Ou.

Documentation

Overview

This is a very basic example for verification purpose that demonstrates how the golang.design/x/clipboard can interact with macOS/Linux/Windows/Android/iOS system clipboard.

The gclip GUI application writes a string to the system clipboard periodically then reads it back and renders it if possible.

Because of the system limitation, on mobile devices, only string data is supported at the moment. Hence, one must use clipboard.FmtText. Other supplied formats result in a panic.

This example is intentded as cross platform application. To build it, one must use gomobile (https://golang.org/x/mobile). You may follow the instructions provided in the GoMobile's wiki page: https://github.com/golang/go/wiki/Mobile.

- For desktop:

go build -o gclip-gui

- For Android:

gomobile build -v -target=android -o gclip-gui.apk

- For iOS:

gomobile build -v -target=ios -bundleid design.golang.gclip-gui.app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL