clipboard
clipboard copied to clipboard
Multi clipboard format support for Windows
Add 4 new interface function for clipboard package:
-
func ReadAllWithFormat(cf uintptr) (string, error)
-
func WriteAllWithFormat(text string, cf uintptr) error
-
func ClearClipboard() error
-
func getClipboardFormat(_ string)
With those, we can set and get multiple data type from clipboard. One example is in Windows, we can set HTML clipboard and text clipboard simultaneously, application can choose to render which data depends on its needs. The newly add utility goclip is using the new interface to implement copy and paste multiple clipboard data type too.
Please refer to this https://msdn.microsoft.com/en-us/library/windows/desktop/ms649015(v=vs.85).aspx