diff options
author | Aditya R <arajan@redhat.com> | 2022-01-20 12:40:07 +0530 |
---|---|---|
committer | Aditya R <arajan@redhat.com> | 2022-01-20 12:40:11 +0530 |
commit | 2c492be00a13bfbc389d2b1b97c6bf91520e280e (patch) | |
tree | a0603d66b29dcc9ab91354ef583ba5e349f8409f /vendor/github.com/Microsoft/hcsshim/internal/winapi/console.go | |
parent | f46478c1e9af601759e341de76d4c655b4a66068 (diff) | |
download | podman-2c492be00a13bfbc389d2b1b97c6bf91520e280e.tar.gz podman-2c492be00a13bfbc389d2b1b97c6bf91520e280e.tar.bz2 podman-2c492be00a13bfbc389d2b1b97c6bf91520e280e.zip |
vendor: bump c/common and other vendors
This commit bumps majorly c/common so netavark features could be synced
with podman.
But there are some other vendor bumps as well
[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]
Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/internal/winapi/console.go')
-rw-r--r-- | vendor/github.com/Microsoft/hcsshim/internal/winapi/console.go | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/console.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/console.go new file mode 100644 index 000000000..def952541 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/console.go @@ -0,0 +1,44 @@ +package winapi + +import ( + "unsafe" + + "golang.org/x/sys/windows" +) + +const PSEUDOCONSOLE_INHERIT_CURSOR = 0x1 + +// CreatePseudoConsole creates a windows pseudo console. +func CreatePseudoConsole(size windows.Coord, hInput windows.Handle, hOutput windows.Handle, dwFlags uint32, hpcon *windows.Handle) error { + // We need this wrapper as the function takes a COORD struct and not a pointer to one, so we need to cast to something beforehand. + return createPseudoConsole(*((*uint32)(unsafe.Pointer(&size))), hInput, hOutput, 0, hpcon) +} + +// ResizePseudoConsole resizes the internal buffers of the pseudo console to the width and height specified in `size`. +func ResizePseudoConsole(hpcon windows.Handle, size windows.Coord) error { + // We need this wrapper as the function takes a COORD struct and not a pointer to one, so we need to cast to something beforehand. + return resizePseudoConsole(hpcon, *((*uint32)(unsafe.Pointer(&size)))) +} + +// HRESULT WINAPI CreatePseudoConsole( +// _In_ COORD size, +// _In_ HANDLE hInput, +// _In_ HANDLE hOutput, +// _In_ DWORD dwFlags, +// _Out_ HPCON* phPC +// ); +// +//sys createPseudoConsole(size uint32, hInput windows.Handle, hOutput windows.Handle, dwFlags uint32, hpcon *windows.Handle) (hr error) = kernel32.CreatePseudoConsole + +// void WINAPI ClosePseudoConsole( +// _In_ HPCON hPC +// ); +// +//sys ClosePseudoConsole(hpc windows.Handle) = kernel32.ClosePseudoConsole + +// HRESULT WINAPI ResizePseudoConsole( +// _In_ HPCON hPC , +// _In_ COORD size +// ); +// +//sys resizePseudoConsole(hPc windows.Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole |