-
Notifications
You must be signed in to change notification settings - Fork 84
/
default_desktop.go
59 lines (49 loc) · 1.4 KB
/
default_desktop.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//go:build (windows || linux || osx) && !js && !android && !nooswindow
// +build windows linux osx
// +build !js
// +build !android
// +build !nooswindow
package oak
import (
"image"
)
// MoveWindow calls MoveWindow on the default window.
func MoveWindow(x, y, w, h int) error {
initDefaultWindow()
return defaultWindow.MoveWindow(x, y, w, h)
}
// SetFullScreen calls SetFullScreen on the default window.
func SetFullScreen(fs bool) error {
initDefaultWindow()
return defaultWindow.SetFullScreen(fs)
}
// SetBorderless calls SetBorderless on the default window.
func SetBorderless(bs bool) error {
initDefaultWindow()
return defaultWindow.SetBorderless(bs)
}
// SetTopMost calls SetTopMost on the default window.
func SetTopMost(on bool) error {
initDefaultWindow()
return defaultWindow.SetTopMost(on)
}
// SetTitle calls SetTitle on the default window.
func SetTitle(title string) error {
initDefaultWindow()
return defaultWindow.SetTitle(title)
}
// SetIcon calls SetIcon on the default window.
func SetIcon(icon image.Image) error {
initDefaultWindow()
return defaultWindow.SetIcon(icon)
}
// HideCursor calls HideCursor on the default window.
func HideCursor() error {
initDefaultWindow()
return defaultWindow.HideCursor()
}
// GetCursorPosition calls GetCursorPosition on the default window.
func GetCursorPosition() (x, y float64) {
initDefaultWindow()
return defaultWindow.GetCursorPosition()
}