gotomation: github.com/shibukawa/gotomation Index | Files | Directories

package gotomation

import "github.com/shibukawa/gotomation"

Package gotomation is cross-platform system automation library.

Index

Package Files

keyboard.go mouse.go screen.go x11.go

type KeyCode Uses

type KeyCode uint16

type KeyModifier Uses

type KeyModifier uint16
const (
    SHIFT   KeyModifier = 0x0001
    ALT                 = 0x0002
    CONTROL             = 0x0004
    META                = 0x0008
    WIN                 = META
    COMMAND             = META
)

type Keyboard Uses

type Keyboard interface {
    SetTypeSpeed(charPerMin int)
    TypeSpeed() int
    KeyPress(code KeyCode, modifiers ...KeyModifier) error
    KeyDown(code KeyCode, modifiers ...KeyModifier) error
    KeyUp(code KeyCode, modifiers ...KeyModifier) error
    Type(str string) error
    TypeQuickly(str string) error
}

type Mouse Uses

type Mouse interface {
    GetPosition() (x, y int)
    Move(x, y int, duration time.Duration) error
    MoveQuickly(x, y int) error
    Click() error
    ClickWith(button MouseButton) error
    DoubleClick() error
    DoubleClickWith(button MouseButton) error
    Drag(x, y int) error
    DragWith(button MouseButton, x, y int) error
    Scroll(x, y int, duration time.Duration) error
}

type MouseButton Uses

type MouseButton int
const (
    MouseLeft   MouseButton = 1
    MouseCenter             = 2
    MouseRight              = 3
)

type Screen Uses

type Screen struct {
    // contains filtered or unexported fields
}

func (Screen) Capture Uses

func (s Screen) Capture() (image.Image, error)

func (Screen) CaptureRegion Uses

func (s Screen) CaptureRegion(rect image.Rectangle) (image.Image, error)

func (Screen) Close Uses

func (s Screen) Close()

func (Screen) H Uses

func (s Screen) H() int

func (Screen) ID Uses

func (s Screen) ID() int

func (Screen) Keyboard Uses

func (s Screen) Keyboard() Keyboard

func (Screen) Mouse Uses

func (s Screen) Mouse() Mouse

func (Screen) RawCapture Uses

func (s Screen) RawCapture() (image.Image, error)

func (Screen) RawCaptureRegion Uses

func (s Screen) RawCaptureRegion(rect image.Rectangle) (image.Image, error)

func (Screen) W Uses

func (s Screen) W() int

func (Screen) X Uses

func (s Screen) X() int

func (Screen) Y Uses

func (s Screen) Y() int

Directories

PathSynopsis
example

Package gotomation imports 6 packages (graph) and is imported by 1 packages. Updated 2017-04-29. Refresh now. Tools for package owners.