From 409c2361f3f07b02d21ec7dde2eaa6a1db129cd4 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 29 Jul 2018 23:56:28 +0800 Subject: [PATCH] add max and min go func --- robotgo.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/robotgo.go b/robotgo.go index 83acb42..c4fb2b0 100644 --- a/robotgo.go +++ b/robotgo.go @@ -1286,6 +1286,26 @@ func GetActive() C.MData { return mdata } +// MinWindow set the window min +func MinWindow(pid int32, state bool, args ...int) { + var hwnd int + if len(args) > 0 { + hwnd = args[0] + } + + C.min_window(C.uintptr(pid), C.bool(state), C.uintptr(hwnd)) +} + +// MaxWindow set the window max +func MaxWindow(pid int32, state bool, args ...int) { + var hwnd int + if len(args) > 0 { + hwnd = args[0] + } + + C.max_window(C.uintptr(pid), C.bool(state), C.uintptr(hwnd)) +} + // CloseWindow close the window func CloseWindow() { C.close_window()