Adding Clipboard get/set functions to window

This commit is contained in:
Allen Ray 2021-06-21 08:42:27 -04:00
parent 842ae8d470
commit 063b8952f9
1 changed files with 11 additions and 0 deletions

View File

@ -205,6 +205,17 @@ func (w *Window) Update() {
w.UpdateInput()
}
// ClipboardText returns the current value of the systems clipboard.
func (w *Window) ClipboardText() string {
return w.window.GetClipboardString()
}
// SetClipboardText passes the given string to the underlying glfw window to set the
// systems clipboard.
func (w *Window) SetClipboardText(text string) {
w.window.SetClipboardString(text)
}
// SwapBuffers swaps buffers. Call this to swap buffers without polling window events.
// Note that Update invokes SwapBuffers.
func (w *Window) SwapBuffers() {