Update godoc and test

This commit is contained in:
vcaesar 2021-11-28 13:12:06 -04:00
parent 34fc3ffb38
commit c466829ded
2 changed files with 5 additions and 2 deletions

View File

@ -289,12 +289,14 @@ func OpenBitmap(gpath string, args ...int) C.MMBitmapRef {
return bit return bit
} }
// Deprecated: use the BitmapFromStr(),
//
// BitmapStr bitmap from string // BitmapStr bitmap from string
func BitmapStr(str string) C.MMBitmapRef { func BitmapStr(str string) C.MMBitmapRef {
return BitmapFromStr(str) return BitmapFromStr(str)
} }
// BitmapFromStr bitmap from string // BitmapFromStr read bitmap from the string
func BitmapFromStr(str string) C.MMBitmapRef { func BitmapFromStr(str string) C.MMBitmapRef {
cs := C.CString(str) cs := C.CString(str)
bit := C.bitmap_from_string(cs) bit := C.bitmap_from_string(cs)

View File

@ -29,7 +29,8 @@ func aRobotgo() {
robotgo.Move(x, y) robotgo.Move(x, y)
robotgo.Move(100, 200) robotgo.Move(100, 200)
robotgo.MouseToggle("up") robotgo.Toggle("left")
robotgo.Toggle("left", "up")
for i := 0; i < 1080; i += 1000 { for i := 0; i < 1080; i += 1000 {
fmt.Println(i) fmt.Println(i)