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