aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/windows/syscall_windows.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-09-30 06:45:24 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-09-30 06:45:24 -0400
commitfe3c91d581ed8044fdd0cf07542965b5daed255b (patch)
tree2ecc9d29cb45c708885fd06217d308df2bf81221 /vendor/golang.org/x/sys/windows/syscall_windows.go
parentd88acd83a1bdd260fc69e0ff115ff99d55bb7760 (diff)
downloadpodman-fe3c91d581ed8044fdd0cf07542965b5daed255b.tar.gz
podman-fe3c91d581ed8044fdd0cf07542965b5daed255b.tar.bz2
podman-fe3c91d581ed8044fdd0cf07542965b5daed255b.zip
Update vendor containers/(common,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/golang.org/x/sys/windows/syscall_windows.go')
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go21
1 files changed, 14 insertions, 7 deletions
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index e27913817..3f2cbb638 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -138,13 +138,7 @@ func UTF16PtrToString(p *uint16) string {
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
}
- var s []uint16
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(utf16.Decode(s))
+ return string(utf16.Decode(unsafe.Slice(p, n)))
}
func Getpagesize() int { return 4096 }
@@ -364,6 +358,15 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
+//sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows
+//sys EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows
+//sys GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW
+//sys GetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow
+//sys GetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow
+//sys IsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow
+//sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode
+//sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible
+//sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -439,6 +442,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
+// Desktop Window Manager API (Dwmapi)
+//sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute
+//sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute
+
// syscall interface implementation for other packages
// GetCurrentProcess returns the handle for the current process.