mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-04 16:03:54 +00:00
update and fmt code
This commit is contained in:
parent
3454d35f35
commit
453375cb59
10
robotgo.go
10
robotgo.go
@ -24,12 +24,16 @@ package robotgo
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
//#if defined(IS_MACOSX)
|
//#if defined(IS_MACOSX)
|
||||||
#cgo darwin CFLAGS: -x objective-c -Wno-deprecated-declarations -I/usr/local/opt/libpng/include -I/usr/local/opt/zlib/include
|
#cgo darwin CFLAGS: -x objective-c -Wno-deprecated-declarations
|
||||||
#cgo darwin LDFLAGS: -framework Cocoa -framework OpenGL -framework IOKit -framework Carbon -framework CoreFoundation -L/usr/local/opt/libpng/lib -lpng -L/usr/local/opt/zlib/lib -lz
|
#cgo darwin CFLAGS: -I/usr/local/opt/libpng/include -I/usr/local/opt/zlib/include
|
||||||
|
#cgo darwin LDFLAGS: -framework Cocoa -framework OpenGL -framework IOKit
|
||||||
|
#cgo darwin LDFLAGS: -framework Carbon -framework CoreFoundation
|
||||||
|
#cgo darwin LDFLAGS: -L/usr/local/opt/libpng/lib -lpng -L/usr/local/opt/zlib/lib -lz
|
||||||
//#elif defined(USE_X11)
|
//#elif defined(USE_X11)
|
||||||
// drop -std=c11
|
// drop -std=c11
|
||||||
#cgo linux CFLAGS: -I/usr/src
|
#cgo linux CFLAGS: -I/usr/src
|
||||||
#cgo linux LDFLAGS:-L/usr/src -lpng -lz -lX11 -lXtst -lX11-xcb -lxcb -lxcb-xkb -lxkbcommon -lxkbcommon-x11 -lm
|
#cgo linux LDFLAGS: -L/usr/src -lpng -lz -lX11 -lXtst -lX11-xcb -lxcb
|
||||||
|
#cgo linux LDFLAGS: -lxcb-xkb -lxkbcommon -lxkbcommon-x11 -lm
|
||||||
//#endif
|
//#endif
|
||||||
// #cgo windows LDFLAGS: -lgdi32 -luser32 -lpng -lz
|
// #cgo windows LDFLAGS: -lgdi32 -luser32 -lpng -lz
|
||||||
#cgo windows LDFLAGS: -lgdi32 -luser32
|
#cgo windows LDFLAGS: -lgdi32 -luser32
|
||||||
|
@ -825,7 +825,7 @@ char *GetTitle(){
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "null";
|
return "";
|
||||||
|
|
||||||
#elif defined(USE_X11)
|
#elif defined(USE_X11)
|
||||||
|
|
||||||
@ -855,11 +855,12 @@ char *GetTitle(){
|
|||||||
XFree (result); return name;
|
XFree (result); return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "null";
|
return "";
|
||||||
|
|
||||||
#elif defined(IS_WINDOWS)
|
#elif defined(IS_WINDOWS)
|
||||||
|
|
||||||
return GetWindowText(mData.HWnd, mData.Title, 512) > 0 ? mData.Title : "null";
|
return GetWindowText
|
||||||
|
(mData.HWnd, mData.Title, 512) > 0 ? mData.Title : "";
|
||||||
// return GetWindowText
|
// return GetWindowText
|
||||||
// (mData.HWnd, name, 512) > 0 ?
|
// (mData.HWnd, name, 512) > 0 ?
|
||||||
// _UTF8Encode (name) : "null";
|
// _UTF8Encode (name) : "null";
|
||||||
|
Loading…
Reference in New Issue
Block a user