mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Fixed windows warning and update godoc
This commit is contained in:
parent
19e5617166
commit
39e066c5f7
@ -444,12 +444,14 @@ func Move(x, y int) {
|
|||||||
MilliSleep(MouseSleep)
|
MilliSleep(MouseSleep)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DragMouse drag the mouse to (x, y)
|
// DragMouse drag the mouse to (x, y),
|
||||||
|
// It's not valid now, use the DragSmooth()
|
||||||
func DragMouse(x, y int, args ...string) {
|
func DragMouse(x, y int, args ...string) {
|
||||||
Drag(x, y, args...)
|
Drag(x, y, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drag drag the mouse to (x, y)
|
// Drag drag the mouse to (x, y),
|
||||||
|
// It's not valid now, use the DragSmooth()
|
||||||
func Drag(x, y int, args ...string) {
|
func Drag(x, y int, args ...string) {
|
||||||
var button C.MMMouseButton = C.LEFT_BUTTON
|
var button C.MMMouseButton = C.LEFT_BUTTON
|
||||||
cx := C.int32_t(x)
|
cx := C.int32_t(x)
|
||||||
@ -466,6 +468,7 @@ func Drag(x, y int, args ...string) {
|
|||||||
// DragSmooth drag the mouse smooth
|
// DragSmooth drag the mouse smooth
|
||||||
func DragSmooth(x, y int, args ...interface{}) {
|
func DragSmooth(x, y int, args ...interface{}) {
|
||||||
MouseToggle("down")
|
MouseToggle("down")
|
||||||
|
MilliSleep(50)
|
||||||
MoveSmooth(x, y, args...)
|
MoveSmooth(x, y, args...)
|
||||||
MouseToggle("up")
|
MouseToggle("up")
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "../base/rgb.h"
|
#include "../base/rgb.h"
|
||||||
#include "screengrab_c.h"
|
#include "screengrab_c.h"
|
||||||
#include "screen_c.h"
|
#include "screen_c.h"
|
||||||
|
#include <stdio.h>
|
||||||
// #include "../MMBitmap_c.h"
|
// #include "../MMBitmap_c.h"
|
||||||
|
|
||||||
void padHex(MMRGBHex color, char* hex){
|
void padHex(MMRGBHex color, char* hex){
|
||||||
|
Loading…
Reference in New Issue
Block a user