zenity/internal/zencmd/window_windows.go

20 lines
379 B
Go
Raw Normal View History

2022-06-28 09:25:19 -04:00
package zencmd
2022-06-09 08:35:02 -04:00
2022-06-18 07:37:39 -04:00
import (
"strconv"
2022-06-28 09:52:02 -04:00
"github.com/ncruces/zenity/internal/win"
2022-06-18 07:37:39 -04:00
"golang.org/x/sys/windows"
)
2022-06-09 08:35:02 -04:00
// ParseWindowId is internal.
2022-06-18 07:37:39 -04:00
func ParseWindowId(id string) windows.HWND {
2022-06-09 08:35:02 -04:00
hwnd, _ := strconv.ParseUint(id, 0, 64)
2022-06-18 07:37:39 -04:00
return windows.HWND(uintptr(hwnd))
2022-06-09 08:35:02 -04:00
}
// GetParentWindowId is internal.
2022-06-28 09:52:02 -04:00
func GetParentWindowId(pid int) windows.HWND {
return win.GetConsoleWindow()
2022-06-09 08:35:02 -04:00
}