Adição da função Capture

master
Leonardo Domingues 2021-12-03 11:44:32 -03:00
parent 69d0bdf3e8
commit 64d94b13f7
1 changed files with 9 additions and 2 deletions

View File

@ -284,8 +284,8 @@ func (c *Cli) DrawRect(x, y, w, h int) error {
return err return err
} }
func (c *Cli) DrawAddText(t string, x, y, w, h int) error { func (c *Cli) DrawAddText(t string, x, y int) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/draw/addtext?t=%s&x=%d&y=%d&w=%d&h=%d", t, x, y, w, h), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/draw/addtext?t=%s&x=%d&y=%d", t, x, y), nil)
return err return err
} }
@ -363,6 +363,13 @@ func (c *Cli) WindowPostMsg(w, m string) error {
return err return err
}*/ }*/
/***************** Notify Functions *****************/
func (c *Cli) ScreenCapture(x, y, w, h int, f string) (ret interface{}, err error) {
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/screen/capture?x=%d&y=%d&w=%d&h=%d&f=%s", x, y, w, h, f), &ret)
return ret, err
}
func NewCli() *Cli { func NewCli() *Cli {
ret := &Cli{ApiCli: api.NewApiCli()} ret := &Cli{ApiCli: api.NewApiCli()}
return ret return ret