Added Window, Clipboard and Mouse methods
Added: - IsWindowResized - IsWindowHidden - UnhideWindow - HideWindow - GetClipboardText - SetClipboardText - SetMouseOffset
This commit is contained in:
parent
468adaa7ec
commit
3d5822db48
1 changed files with 44 additions and 0 deletions
|
@ -76,11 +76,34 @@ func IsWindowMinimized() bool {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsWindowResized - Check if window has been resized
|
||||||
|
func IsWindowResized() bool {
|
||||||
|
ret := C.IsWindowResized()
|
||||||
|
v := bool(ret)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsWindowHidden - Check if window is currently hidden
|
||||||
|
func IsWindowHidden() bool {
|
||||||
|
ret := C.IsWindowHidden()
|
||||||
|
v := bool(ret)
|
||||||
|
return v
|
||||||
|
}
|
||||||
// ToggleFullscreen - Fullscreen toggle (only PLATFORM_DESKTOP)
|
// ToggleFullscreen - Fullscreen toggle (only PLATFORM_DESKTOP)
|
||||||
func ToggleFullscreen() {
|
func ToggleFullscreen() {
|
||||||
C.ToggleFullscreen()
|
C.ToggleFullscreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnhideWindow - Show the window
|
||||||
|
func UnhideWindow() {
|
||||||
|
C.UnhideWindow()
|
||||||
|
}
|
||||||
|
|
||||||
|
// HideWindow - Hide the window
|
||||||
|
func HideWindow() {
|
||||||
|
C.HideWindow()
|
||||||
|
}
|
||||||
|
|
||||||
// SetWindowIcon - Set icon for window (only PLATFORM_DESKTOP)
|
// SetWindowIcon - Set icon for window (only PLATFORM_DESKTOP)
|
||||||
func SetWindowIcon(image Image) {
|
func SetWindowIcon(image Image) {
|
||||||
cimage := image.cptr()
|
cimage := image.cptr()
|
||||||
|
@ -182,6 +205,20 @@ func GetMonitorName(monitor int) string {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetClipboardText - Get clipboard text content
|
||||||
|
func GetClipboardText() string {
|
||||||
|
ret := C.GetClipboardText()
|
||||||
|
v := C.GoString(ret)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClipboardText - Set clipboard text content
|
||||||
|
func SetClipboardText(data string) {
|
||||||
|
cdata := C.CString(data)
|
||||||
|
defer C.free(unsafe.Pointer(cdata))
|
||||||
|
C.SetClipboardText(cdata)
|
||||||
|
}
|
||||||
|
|
||||||
// ClearBackground - Sets Background Color
|
// ClearBackground - Sets Background Color
|
||||||
func ClearBackground(color Color) {
|
func ClearBackground(color Color) {
|
||||||
ccolor := color.cptr()
|
ccolor := color.cptr()
|
||||||
|
@ -591,6 +628,13 @@ func SetMousePosition(x, y int) {
|
||||||
C.SetMousePosition(cx, cy)
|
C.SetMousePosition(cx, cy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetMouseOffset - Set mouse offset
|
||||||
|
func SetMouseOffset(offsetX, offsetY int) {
|
||||||
|
ox := (C.int)(offsetX)
|
||||||
|
oy := (C.int)(offsetY)
|
||||||
|
C.SetMouseOffset(ox, oy)
|
||||||
|
}
|
||||||
|
|
||||||
// SetMouseScale - Set mouse scaling
|
// SetMouseScale - Set mouse scaling
|
||||||
func SetMouseScale(scaleX, scaleY float32) {
|
func SetMouseScale(scaleX, scaleY float32) {
|
||||||
cscaleX := (C.float)(scaleX)
|
cscaleX := (C.float)(scaleX)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue