clipboard/clipboard.go
2025-11-10 10:17:06 +08:00

30 lines
509 B
Go

//go:build windows
package clipboard
import (
"errors"
)
func Init() error {
return nil
}
func Set(types FileType, data []byte) error {
switch types {
case Text:
return AutoSetter("CF_UNICODETEXT", data)
case File:
return AutoSetter("CF_HDROP", data)
case Image:
return AutoSetter("PNG", data)
case HTML:
return AutoSetter("HTML format", data)
}
return errors.New("not support type:" + string(types))
}
func SetOrigin(types string, data []byte) error {
return AutoSetter(types, data)
}