mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
Add GetBHandle
This commit is contained in:
parent
97e20fce9d
commit
06659511d2
@ -32,6 +32,7 @@ import "C"
|
||||
|
||||
import (
|
||||
// . "fmt"
|
||||
|
||||
"reflect"
|
||||
"unsafe"
|
||||
// "runtime"
|
||||
@ -763,6 +764,14 @@ func GetHandle() int {
|
||||
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
|
||||
func GetTitle() string {
|
||||
title := C.aGetTitle()
|
||||
|
@ -42,6 +42,17 @@ uintptr aGetHandle(){
|
||||
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){
|
||||
SetActive(win);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user