mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
fix mouse type
This commit is contained in:
parent
33c461bc15
commit
01f8b8701d
@ -29,7 +29,7 @@ int mouseDelay = 10;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
int amoveMouse(int x, int y){
|
||||
int amoveMouse(size_t x, size_t y){
|
||||
MMPoint point;
|
||||
//int x =103;
|
||||
//int y =104;
|
||||
@ -39,7 +39,7 @@ int amoveMouse(int x, int y){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int adragMouse(int x, int y){
|
||||
int adragMouse(size_t x, size_t y){
|
||||
// const size_t x=10;
|
||||
// const size_t y=20;
|
||||
MMMouseButton button = LEFT_BUTTON;
|
||||
@ -53,7 +53,7 @@ int adragMouse(int x, int y){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int amoveMouseSmooth(int x, int y){
|
||||
int amoveMouseSmooth(size_t x, size_t y){
|
||||
MMPoint point;
|
||||
point = MMPointMake(x, y);
|
||||
smoothlyMoveMouse(point);
|
||||
@ -93,14 +93,14 @@ int amouseToggle(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int asetMouseDelay(int val){
|
||||
int asetMouseDelay(size_t val){
|
||||
// int val=10;
|
||||
mouseDelay = val;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ascrollMouse(int scrollMagnitude,char *s){
|
||||
int ascrollMouse(size_t scrollMagnitude,char *s){
|
||||
// int scrollMagnitude = 20;
|
||||
|
||||
MMMouseWheelDirection scrollDirection;
|
||||
|
10
robotgo.go
10
robotgo.go
@ -98,15 +98,15 @@ type MPoint struct {
|
||||
}
|
||||
|
||||
//C.size_t int
|
||||
func MoveMouse(x, y C.int) {
|
||||
func MoveMouse(x, y C.size_t) {
|
||||
C.amoveMouse(x, y)
|
||||
}
|
||||
|
||||
func DragMouse(x, y C.int) {
|
||||
func DragMouse(x, y C.size_t) {
|
||||
C.adragMouse(x, y)
|
||||
}
|
||||
|
||||
func MoveMouseSmooth(x, y C.int) {
|
||||
func MoveMouseSmooth(x, y C.size_t) {
|
||||
C.amoveMouseSmooth(x, y)
|
||||
}
|
||||
|
||||
@ -124,11 +124,11 @@ func MouseToggle() {
|
||||
C.amouseToggle()
|
||||
}
|
||||
|
||||
func SetMouseDelay(x C.int) {
|
||||
func SetMouseDelay(x C.size_t) {
|
||||
C.asetMouseDelay(x)
|
||||
}
|
||||
|
||||
func ScrollMouse(x C.int, y string) {
|
||||
func ScrollMouse(x C.size_t, y string) {
|
||||
z := C.CString(y)
|
||||
C.ascrollMouse(x, z)
|
||||
defer C.free(unsafe.Pointer(z))
|
||||
|
Loading…
Reference in New Issue
Block a user