mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-30 22:13:54 +00:00
Update sequence
This commit is contained in:
parent
bb213e0dfe
commit
cc0d7f76b7
28
robotgo.go
28
robotgo.go
@ -84,14 +84,6 @@ func GetScreenSize() (int, int) {
|
||||
return int(size.width), int(size.height)
|
||||
}
|
||||
|
||||
//GetXDisplayName Get XDisplay Name
|
||||
func GetXDisplayName() string {
|
||||
name := C.aGetXDisplayName()
|
||||
gname := C.GoString(name)
|
||||
defer C.free(unsafe.Pointer(name))
|
||||
return gname
|
||||
}
|
||||
|
||||
//SetXDisplayName Set XDisplay Name
|
||||
func SetXDisplayName(name string) string {
|
||||
cname := C.CString(name)
|
||||
@ -100,6 +92,14 @@ func SetXDisplayName(name string) string {
|
||||
return gstr
|
||||
}
|
||||
|
||||
//GetXDisplayName Get XDisplay Name
|
||||
func GetXDisplayName() string {
|
||||
name := C.aGetXDisplayName()
|
||||
gname := C.GoString(name)
|
||||
defer C.free(unsafe.Pointer(name))
|
||||
return gname
|
||||
}
|
||||
|
||||
//CaptureScreen Capture the Screen
|
||||
func CaptureScreen(args ...int) C.MMBitmapRef {
|
||||
var x C.size_t
|
||||
@ -740,6 +740,12 @@ func CloseWindow() {
|
||||
C.aCloseWindow()
|
||||
}
|
||||
|
||||
//SetHandle Set the Window Handle
|
||||
func SetHandle(hwnd int) {
|
||||
chwnd := C.uintptr(hwnd)
|
||||
C.aSetHandle(chwnd)
|
||||
}
|
||||
|
||||
//GetHandle Get the Window Handle
|
||||
func GetHandle() int {
|
||||
hwnd := C.aGetHandle()
|
||||
@ -748,12 +754,6 @@ func GetHandle() int {
|
||||
return ghwnd
|
||||
}
|
||||
|
||||
//SetHandle Set the Window Handle
|
||||
func SetHandle(hwnd int) {
|
||||
chwnd := C.uintptr(hwnd)
|
||||
C.aSetHandle(chwnd)
|
||||
}
|
||||
|
||||
//GetTitle Get the Window Title
|
||||
func GetTitle() string {
|
||||
title := C.aGetTitle()
|
||||
|
@ -56,6 +56,15 @@ MMSize aGetScreenSize(){
|
||||
return displaySize;
|
||||
}
|
||||
|
||||
char* aSetXDisplayName(char* name){
|
||||
#if defined(USE_X11)
|
||||
setXDisplay(name);
|
||||
return "success";
|
||||
#else
|
||||
return "setXDisplayName is only supported on Linux";
|
||||
#endif
|
||||
}
|
||||
|
||||
char* aGetXDisplayName(){
|
||||
#if defined(USE_X11)
|
||||
const char* display = getXDisplay();
|
||||
@ -68,15 +77,6 @@ char* aGetXDisplayName(){
|
||||
#endif
|
||||
}
|
||||
|
||||
char* aSetXDisplayName(char* name){
|
||||
#if defined(USE_X11)
|
||||
setXDisplay(name);
|
||||
return "success";
|
||||
#else
|
||||
return "setXDisplayName is only supported on Linux";
|
||||
#endif
|
||||
}
|
||||
|
||||
MMBitmapRef aCaptureScreen(size_t x,size_t y,size_t w,size_t h){
|
||||
// if (){
|
||||
// x = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user