Skip to content

Commit

Permalink
Merge pull request #390 from go-vgo/bitmap-pr
Browse files Browse the repository at this point in the history
Fixed windows warning and update godoc
  • Loading branch information
vcaesar authored Nov 9, 2021
2 parents 956dcaf + 39e066c commit 267670f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions robotgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,14 @@ func Move(x, y int) {
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) {
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) {
var button C.MMMouseButton = C.LEFT_BUTTON
cx := C.int32_t(x)
Expand All @@ -466,6 +468,7 @@ func Drag(x, y int, args ...string) {
// DragSmooth drag the mouse smooth
func DragSmooth(x, y int, args ...interface{}) {
MouseToggle("down")
MilliSleep(50)
MoveSmooth(x, y, args...)
MouseToggle("up")
}
Expand Down
1 change: 1 addition & 0 deletions screen/goScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../base/rgb.h"
#include "screengrab_c.h"
#include "screen_c.h"
#include <stdio.h>
// #include "../MMBitmap_c.h"

void padHex(MMRGBHex color, char* hex){
Expand Down

0 comments on commit 267670f

Please sign in to comment.