mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
update godoc and deprecated GetBHandle
This commit is contained in:
parent
5957e315c9
commit
722b2b07e0
@ -1318,7 +1318,7 @@ func GetHandle() int {
|
||||
return ghwnd
|
||||
}
|
||||
|
||||
// GetBHandle get the window handle
|
||||
// GetBHandle get the window handle, Wno-deprecated
|
||||
func GetBHandle() int {
|
||||
hwnd := C.bget_handle()
|
||||
ghwnd := int(hwnd)
|
||||
@ -1437,7 +1437,7 @@ func FindNames() ([]string, error) {
|
||||
return strArr, err
|
||||
}
|
||||
|
||||
// FindIds find the process id by the process name
|
||||
// FindIds find the all process id by the process name
|
||||
func FindIds(name string) ([]int32, error) {
|
||||
var pids []int32
|
||||
nps, err := Process()
|
||||
@ -1457,7 +1457,7 @@ func FindIds(name string) ([]int32, error) {
|
||||
return pids, err
|
||||
}
|
||||
|
||||
// ActivePID active window by PID,
|
||||
// ActivePID active window by PID,
|
||||
// If args[0] > 0 on the Windows platform via a window handle to active
|
||||
func ActivePID(pid int32, args ...int) {
|
||||
var hwnd int
|
||||
|
@ -38,11 +38,6 @@ bool set_handle(uintptr handle){
|
||||
}
|
||||
|
||||
uintptr get_handle(){
|
||||
uintptr hwnd = getHandle();
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
uintptr bget_handle(){
|
||||
MData mData = GetActive();
|
||||
#if defined(IS_MACOSX)
|
||||
return (uintptr)mData.CgID;
|
||||
@ -53,6 +48,11 @@ uintptr bget_handle(){
|
||||
#endif
|
||||
}
|
||||
|
||||
uintptr bget_handle(){
|
||||
uintptr hwnd = getHandle();
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
void set_active(const MData win){
|
||||
SetActive(win);
|
||||
}
|
||||
|
@ -475,17 +475,14 @@ bool setHandle(uintptr handle){
|
||||
#endif
|
||||
}
|
||||
|
||||
//uint32 uintptr
|
||||
// uint32 uintptr
|
||||
uintptr getHandle(){
|
||||
#if defined(IS_MACOSX)
|
||||
return (uintptr)mData.CgID;
|
||||
|
||||
#elif defined(USE_X11)
|
||||
return (uintptr)mData.XWin;
|
||||
|
||||
#elif defined(IS_WINDOWS)
|
||||
return (uintptr)mData.HWnd;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user