mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-30 22:13:54 +00:00
add more win32 function export
This commit is contained in:
parent
af1d0d2d00
commit
e26e811e6d
@ -14,6 +14,7 @@ package robotgo
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/lxn/win"
|
||||
)
|
||||
@ -31,3 +32,23 @@ func GetHWND() win.HWND {
|
||||
|
||||
return hwnd
|
||||
}
|
||||
|
||||
// SendInput send n input event
|
||||
func SendInput(nInputs uint32, pInputs unsafe.Pointer, cbSize int32) uint32 {
|
||||
return win.SendInput(nInputs, pInputs, cbSize)
|
||||
}
|
||||
|
||||
// SendMsg send a message with hwnd
|
||||
func SendMsg(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr {
|
||||
return win.SendMessage(hwnd, msg, wParam, lParam)
|
||||
}
|
||||
|
||||
// SetActiveWindow set window active with hwnd
|
||||
func SetActiveWindow(hwnd win.HWND) win.HWND {
|
||||
return win.SetActiveWindow(hwnd)
|
||||
}
|
||||
|
||||
// SetFocus set window focus with hwnd
|
||||
func SetFocus(hWnd win.HWND) win.HWND {
|
||||
return win.SetFocus(hWnd)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user