mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
fix mouse type
This commit is contained in:
parent
93d93b946f
commit
e09b189c71
@ -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