mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
update close_window() allow by pid
This commit is contained in:
parent
338a8b9292
commit
727ab062fb
17
robotgo.go
17
robotgo.go
@ -1358,8 +1358,21 @@ func MaxWindow(pid int32, args ...interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CloseWindow close the window
|
// CloseWindow close the window
|
||||||
func CloseWindow() {
|
func CloseWindow(args ...int32) {
|
||||||
C.close_window()
|
if len(args) <= 0 {
|
||||||
|
C.close_main_window()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var hwnd, isHwnd int32
|
||||||
|
if len(args) > 0 {
|
||||||
|
hwnd = args[0]
|
||||||
|
}
|
||||||
|
if len(args) > 1 {
|
||||||
|
isHwnd = args[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
C.close_window(C.uintptr(hwnd), C.uintptr(isHwnd))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHandle set the window handle
|
// SetHandle set the window handle
|
||||||
|
@ -75,8 +75,8 @@ void max_window(uintptr pid, bool state, uintptr isHwnd){
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void close_window(void){
|
void close_window(uintptr pid, uintptr isHwnd){
|
||||||
CloseWin();
|
close_window_by_PId(pid, isHwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool set_handle(uintptr handle){
|
bool set_handle(uintptr handle){
|
||||||
|
Loading…
Reference in New Issue
Block a user