mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
Add GetBHandle
This commit is contained in:
parent
97e20fce9d
commit
06659511d2
@ -32,6 +32,7 @@ import "C"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
// . "fmt"
|
// . "fmt"
|
||||||
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
// "runtime"
|
// "runtime"
|
||||||
@ -763,6 +764,14 @@ func GetHandle() int {
|
|||||||
return ghwnd
|
return ghwnd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GetBHandle Get the window handle
|
||||||
|
func GetBHandle() int {
|
||||||
|
hwnd := C.bGetHandle()
|
||||||
|
ghwnd := int(hwnd)
|
||||||
|
//Println("gethwnd---", ghwnd)
|
||||||
|
return ghwnd
|
||||||
|
}
|
||||||
|
|
||||||
//GetTitle Get the window title
|
//GetTitle Get the window title
|
||||||
func GetTitle() string {
|
func GetTitle() string {
|
||||||
title := C.aGetTitle()
|
title := C.aGetTitle()
|
||||||
|
@ -42,6 +42,17 @@ uintptr aGetHandle(){
|
|||||||
return hwnd;
|
return hwnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uintptr bGetHandle(){
|
||||||
|
MData mData=GetActive();
|
||||||
|
#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
|
||||||
|
}
|
||||||
|
|
||||||
void aSetActive(const MData win){
|
void aSetActive(const MData win){
|
||||||
SetActive(win);
|
SetActive(win);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user