19 lines
379 B
Go
19 lines
379 B
Go
package zencmd
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"git.bigun.dev/evan/zenity/internal/win"
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
// ParseWindowId is internal.
|
|
func ParseWindowId(id string) windows.HWND {
|
|
hwnd, _ := strconv.ParseUint(id, 0, 64)
|
|
return windows.HWND(uintptr(hwnd))
|
|
}
|
|
|
|
// GetParentWindowId is internal.
|
|
func GetParentWindowId(pid int) windows.HWND {
|
|
return win.GetConsoleWindow()
|
|
}
|