Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrArgs = errors.New("argument error")
Functions ¶
func NewArgsErr ¶
Types ¶
type ApiImg ¶
type ApiImg interface {
// 查找元素
FindE(e string) (image.Point, float32, error)
// 返回范围内的文字识别结果
Ocr(x1, y1, x2, y2 int) (string, error)
OcrE(e string) (string, error)
// 锁定与解锁当前 Find 函数的对象
Lock() error
Unlock() error
}
“Element” 类型参数是指在 lua 中以 “click(E.main.start)” 的形式调用
type ImgHandler ¶
type InputHandler ¶
type InputHandler interface {
// 按下一个元素或坐标,duration 单位是 ms。duration 为 0 时,将会自动把 duration 赋值为 100
Press(x, y, duration int) error
// 滑动
Swipe(x, y int) InputHandlerSwipeTo
}
type InputHandlerSwipeAction ¶
type InputHandlerSwipeTo ¶
type InputHandlerSwipeTo interface {
To(x, y int) InputHandlerSwipeAction
}
type ScreencapTool ¶
type SwipeHandler ¶
type SwipeHandler struct {
// contains filtered or unexported fields
}
func (*SwipeHandler) To ¶
func (h *SwipeHandler) To(x, y int) InputHandlerSwipeAction
Click to show internal directories.
Click to hide internal directories.