mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Merge branch 'develop' into mesh-ui_emb_ctl
This commit is contained in:
commit
90a2f61e59
19 changed files with 945 additions and 602 deletions
24
contrib/ui/mesh-ui/webview_windows.go
Executable file
24
contrib/ui/mesh-ui/webview_windows.go
Executable file
|
@ -0,0 +1,24 @@
|
|||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Console(show bool) {
|
||||
var getWin = syscall.NewLazyDLL("kernel32.dll").NewProc("GetConsoleWindow")
|
||||
var showWin = syscall.NewLazyDLL("user32.dll").NewProc("ShowWindow")
|
||||
hwnd, _, _ := getWin.Call()
|
||||
if hwnd == 0 {
|
||||
return
|
||||
}
|
||||
if show {
|
||||
var SW_RESTORE uintptr = 9
|
||||
showWin.Call(hwnd, SW_RESTORE)
|
||||
} else {
|
||||
var SW_HIDE uintptr = 0
|
||||
showWin.Call(hwnd, SW_HIDE)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue