Commit ed04a604 authored by Amos Wenger's avatar Amos Wenger

Remove GetWindowLongPtr

parent 6f219e85
Pipeline #11882 passed with stage
in 24 seconds
......@@ -15,23 +15,6 @@ var (
procSetForegroundWindow = moduser32.NewProc("SetForegroundWindow")
procShowWindow = moduser32.NewProc("ShowWindow")
procIsWindowVisible = moduser32.NewProc("IsWindowVisible")
procGetWindowLongPtr = moduser32.NewProc("GetWindowLongPtr")
)
// GetWindowLong and GetWindowLongPtr constants
const (
GWL_EXSTYLE = -20
GWL_STYLE = -16
GWL_WNDPROC = -4
GWLP_WNDPROC = -4
GWL_HINSTANCE = -6
GWLP_HINSTANCE = -6
GWL_HWNDPARENT = -8
GWLP_HWNDPARENT = -8
GWL_ID = -12
GWLP_ID = -12
GWL_USERDATA = -21
GWLP_USERDATA = -21
)
func EnumWindows(
......@@ -114,7 +97,7 @@ func IsWindowVisible(
hwnd syscall.Handle,
) bool {
ret, _, _ := syscall.Syscall(
procGetWindowLongPtr.Addr(),
procIsWindowVisible.Addr(),
1,
uintptr(hwnd),
0,
......@@ -123,18 +106,3 @@ func IsWindowVisible(
return ret != 0
}
func GetWindowLongPtr(
hwnd syscall.Handle,
index int32,
) uintptr {
ret, _, _ := syscall.Syscall(
procGetWindowLongPtr.Addr(),
2,
uintptr(hwnd),
uintptr(index),
0,
)
return ret
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment