Update godoc

This commit is contained in:
vcaesar 2021-11-25 16:03:39 -04:00
parent d725cdc6f2
commit 8a7d6a1306
3 changed files with 40 additions and 20 deletions

View File

@ -183,7 +183,8 @@ func FreeMMPointArr(pointArray C.MMPointArrayRef) {
C.destroyMMPointArray(pointArray) C.destroyMMPointArray(pointArray)
} }
// Deprecated: use the FindAllBitmap() // Deprecated: use the FindAllBitmap(),
//
// FindEveryBitmap find the every bitmap, same with the FindAllBitmap() // FindEveryBitmap find the every bitmap, same with the FindAllBitmap()
func FindEveryBitmap(bit C.MMBitmapRef, args ...interface{}) []Point { func FindEveryBitmap(bit C.MMBitmapRef, args ...interface{}) []Point {
return FindAllBitmap(bit, args...) return FindAllBitmap(bit, args...)
@ -433,7 +434,8 @@ func FindColorCS(color CHex, x, y, w, h int, args ...float64) (int, int) {
return rx, ry return rx, ry
} }
// Deprecated: use the FindAllColor() // Deprecated: use the FindAllColor(),
//
// FindEveryColor find the every color, same with the FindAllColor() // FindEveryColor find the every color, same with the FindAllColor()
func FindEveryColor(color CHex, args ...interface{}) []Point { func FindEveryColor(color CHex, args ...interface{}) []Point {
return FindAllColor(color, args...) return FindAllColor(color, args...)

View File

@ -36,14 +36,16 @@ func EventEnd() {
hook.End() hook.End()
} }
// Deprecated: use the EventStart() // Deprecated: use the EventStart(),
//
// Start start global event hook // Start start global event hook
// return event channel // return event channel
func Start() chan hook.Event { func Start() chan hook.Event {
return hook.Start() return hook.Start()
} }
// Deprecated: use the EventEnd() // Deprecated: use the EventEnd(),
//
// End removes global event hook // End removes global event hook
func End() { func End() {
hook.End() hook.End()

View File

@ -359,19 +359,22 @@ func GetXDisplayName() string {
return gname return gname
} }
// Deprecated: use the ScaledF() // Deprecated: use the ScaledF(),
//
// ScaleX get the primary display horizontal DPI scale factor, drop // ScaleX get the primary display horizontal DPI scale factor, drop
func ScaleX() int { func ScaleX() int {
return int(C.scale_x()) return int(C.scale_x())
} }
// Deprecated: use the ScaledF() // Deprecated: use the ScaledF(),
//
// ScaleY get primary display vertical DPI scale factor, drop // ScaleY get primary display vertical DPI scale factor, drop
func ScaleY() int { func ScaleY() int {
return int(C.scale_y()) return int(C.scale_y())
} }
// Deprecated: use the ScaledF() // Deprecated: use the ScaledF(),
//
// Scale get the screen scale (only windows old), drop // Scale get the screen scale (only windows old), drop
func Scale() int { func Scale() int {
dpi := map[int]int{ dpi := map[int]int{
@ -394,13 +397,15 @@ func Scale() int {
return dpi[x] return dpi[x]
} }
// Deprecated: use the ScaledF() // Deprecated: use the ScaledF(),
//
// Scale0 return ScaleX() / 0.96, drop // Scale0 return ScaleX() / 0.96, drop
func Scale0() int { func Scale0() int {
return int(float64(ScaleX()) / 0.96) return int(float64(ScaleX()) / 0.96)
} }
// Deprecated: use the ScaledF() // Deprecated: use the ScaledF(),
//
// Mul mul the scale, drop // Mul mul the scale, drop
func Mul(x int) int { func Mul(x int) int {
s := Scale() s := Scale()
@ -436,7 +441,8 @@ func CheckMouse(btn string) C.MMMouseButton {
return C.LEFT_BUTTON return C.LEFT_BUTTON
} }
// Deprecated: use the Move() // Deprecated: use the Move(),
//
// MoveMouse move the mouse // MoveMouse move the mouse
func MoveMouse(x, y int) { func MoveMouse(x, y int) {
Move(x, y) Move(x, y)
@ -460,7 +466,8 @@ func Move(x, y int) {
MilliSleep(MouseSleep) MilliSleep(MouseSleep)
} }
// Deprecated: use the DragSmooth() // Deprecated: use the DragSmooth(),
//
// DragMouse drag the mouse to (x, y), // DragMouse drag the mouse to (x, y),
// It's same with the DragSmooth() now // It's same with the DragSmooth() now
func DragMouse(x, y int, args ...interface{}) { func DragMouse(x, y int, args ...interface{}) {
@ -471,7 +478,8 @@ func DragMouse(x, y int, args ...interface{}) {
Toggle("left", "up") Toggle("left", "up")
} }
// Deprecated: use the DragSmooth() // Deprecated: use the DragSmooth(),
//
// Drag drag the mouse to (x, y), // Drag drag the mouse to (x, y),
// It's not valid now, use the DragSmooth() // It's not valid now, use the DragSmooth()
func Drag(x, y int, args ...string) { func Drag(x, y int, args ...string) {
@ -498,7 +506,8 @@ func DragSmooth(x, y int, args ...interface{}) {
Toggle("left", "up") Toggle("left", "up")
} }
// Deprecated: use the MoveSmooth() // Deprecated: use the MoveSmooth(),
//
// MoveMouseSmooth move the mouse smooth, // MoveMouseSmooth move the mouse smooth,
// moves mouse to x, y human like, with the mouse button up. // moves mouse to x, y human like, with the mouse button up.
func MoveMouseSmooth(x, y int, args ...interface{}) bool { func MoveMouseSmooth(x, y int, args ...interface{}) bool {
@ -575,7 +584,8 @@ func GetMousePos() (int, int) {
return x, y return x, y
} }
// Deprecated: use the Click() // Deprecated: use the Click(),
//
// MouseClick click the mouse // MouseClick click the mouse
// //
// robotgo.MouseClick(button string, double bool) // robotgo.MouseClick(button string, double bool)
@ -653,7 +663,8 @@ func Toggle(key ...string) int {
return int(i) return int(i)
} }
// Deprecated: use the Toggle() // Deprecated: use the Toggle(),
//
// MouseToggle toggle the mouse // MouseToggle toggle the mouse
// //
// Examples: // Examples:
@ -674,7 +685,8 @@ func MouseToggle(togKey string, args ...interface{}) int {
return int(i) return int(i)
} }
// Deprecated: use the Scroll() // Deprecated: use the Scroll(),
//
// ScrollMouse scroll the mouse to (x, "up") // ScrollMouse scroll the mouse to (x, "up")
// //
// Examples: // Examples:
@ -1074,7 +1086,8 @@ func PasteStr(str string) string {
return KeyTap("v", "control") return KeyTap("v", "control")
} }
// Deprecated: use the TypeStr() // Deprecated: use the TypeStr(),
//
// TypeString send a string, support unicode(no linux support) // TypeString send a string, support unicode(no linux support)
// TypeStr(string: The string to send), Wno-deprecated // TypeStr(string: The string to send), Wno-deprecated
// //
@ -1098,7 +1111,8 @@ func TypeStrDelay(str string, delay int) {
Sleep(delay) Sleep(delay)
} }
// Deprecated: use the TypeStr() // Deprecated: use the TypeStr(),
//
// TypeStringDelayed type string delayed, Wno-deprecated // TypeStringDelayed type string delayed, Wno-deprecated
// //
// This function will be removed in version v1.0.0 // This function will be removed in version v1.0.0
@ -1112,7 +1126,8 @@ func SetKeyDelay(delay int) {
C.set_keyboard_delay(C.size_t(delay)) C.set_keyboard_delay(C.size_t(delay))
} }
// Deprecated: use the SetKeyDelay() // Deprecated: use the SetKeyDelay(),
//
// SetKeyboardDelay set keyboard delay, Wno-deprecated, // SetKeyboardDelay set keyboard delay, Wno-deprecated,
// //
// This function will be removed in version v1.0.0 // This function will be removed in version v1.0.0
@ -1288,7 +1303,8 @@ func GetHandle() int {
return ghwnd return ghwnd
} }
// Deprecated: use the GetHandle() // Deprecated: use the GetHandle(),
//
// GetBHandle get the window handle, Wno-deprecated // GetBHandle get the window handle, Wno-deprecated
// //
// This function will be removed in version v1.0.0 // This function will be removed in version v1.0.0