master
Leonardo Domingues 2021-12-03 10:50:47 -03:00
parent 6c1c483496
commit ade994dac8
1 changed files with 17 additions and 17 deletions

View File

@ -275,91 +275,91 @@ func (c *Cli) DrawCLear() error {
} }
func (c *Cli) DrawBox(x, y, w, h, t int) error { func (c *Cli) DrawBox(x, y, w, h, t int) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/draw/addbox?x=%d&y=%d&w=%d&h=%d&t=%d", x, y, w, h, t), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/draw/addbox?x=%d&y=%d&w=%d&h=%d&t=%d", x, y, w, h, t), nil)
return err return err
} }
func (c *Cli) DrawRect(x, y, w, h int) error { func (c *Cli) DrawRect(x, y, w, h int) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/draw/addrect?x=%d&y=%d&w=%d&h=%d", x, y, w, h), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/draw/addrect?x=%d&y=%d&w=%d&h=%d", x, y, w, h), nil)
return err return err
} }
func (c *Cli) DrawAddText(t string, x, y, w, h int) error { func (c *Cli) DrawAddText(t string, x, y, w, h int) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/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&w=%d&h=%d", t, x, y, w, h), nil)
return err return err
} }
/***************** Notify Functions *****************/ /***************** Notify Functions *****************/
func (c *Cli) NotifyAlert(msg, title string) error { func (c *Cli) NotifyAlert(msg, title string) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/notify/alert?msg=%s&title=%s", msg, title), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/notify/alert?msg=%s&title=%s", msg, title), nil)
return err return err
} }
func (c *Cli) NotifyBeep(msg, title string) error { func (c *Cli) NotifyBeep(msg, title string) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/notify/notify?msg=%s&title=%s", msg, title), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/notify/notify?msg=%s&title=%s", msg, title), nil)
return err return err
} }
/***************** Window Functions *****************/ /***************** Window Functions *****************/
func (c *Cli) WindowList(s string) (ret []map[string]interface{}, err error) { func (c *Cli) WindowList(s string) (ret []map[string]interface{}, err error) {
err = c.HttpCli().JsonGet("/ipc/window/list?s="+s, &ret) err = c.HttpCli().JsonGet("/ipc/wingui/window/list?s="+s, &ret)
return ret, err return ret, err
} }
func (c *Cli) WindowHwnd(s string) (ret []int, err error) { func (c *Cli) WindowHwnd(s string) (ret []int, err error) {
err = c.HttpCli().JsonGet("/ipc/window/hwnd?s="+s, &ret) err = c.HttpCli().JsonGet("/ipc/wingui/window/hwnd?s="+s, &ret)
return ret, err return ret, err
} }
func (c *Cli) WindowActivate(Hwnd string) error { func (c *Cli) WindowActivate(Hwnd string) error {
err := c.HttpCli().JsonGet("/ipc/window/activate?Hwnd="+Hwnd, nil) err := c.HttpCli().JsonGet("/ipc/wingui/window/activate?Hwnd="+Hwnd, nil)
return err return err
} }
func (c *Cli) WindowClose(Hwnd string) error { func (c *Cli) WindowClose(Hwnd string) error {
err := c.HttpCli().JsonGet("/ipc/window/close?Hwnd="+Hwnd, nil) err := c.HttpCli().JsonGet("/ipc/wingui/window/close?Hwnd="+Hwnd, nil)
return err return err
} }
func (c *Cli) WindowMax(Hwnd string) error { func (c *Cli) WindowMax(Hwnd string) error {
err := c.HttpCli().JsonGet("/ipc/window/max?Hwnd="+Hwnd, nil) err := c.HttpCli().JsonGet("/ipc/wingui/window/max?Hwnd="+Hwnd, nil)
return err return err
} }
func (c *Cli) WindowMin(Hwnd string) error { func (c *Cli) WindowMin(Hwnd string) error {
err := c.HttpCli().JsonGet("/ipc/window/min?Hwnd="+Hwnd, nil) err := c.HttpCli().JsonGet("/ipc/wingui/window/min?Hwnd="+Hwnd, nil)
return err return err
} }
func (c *Cli) WindowActiveHwnd() (ret int, err error) { func (c *Cli) WindowActiveHwnd() (ret int, err error) {
err = c.HttpCli().JsonGet("/ipc/window/activehwnd", &ret) err = c.HttpCli().JsonGet("/ipc/wingui/window/activehwnd", &ret)
return ret, err return ret, err
} }
func (c *Cli) WindowWaitActiveTitle(t string, m int) (ret map[string]interface{}, err error) { func (c *Cli) WindowWaitActiveTitle(t string, m int) (ret map[string]interface{}, err error) {
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/window/waitactivetitle?t=%s&m=%d", t, m), &ret) err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/window/waitactivetitle?t=%s&m=%d", t, m), &ret)
return ret, err return ret, err
} }
func (c *Cli) WindowActiveTitle() (ret string, err error) { func (c *Cli) WindowActiveTitle() (ret string, err error) {
err = c.HttpCli().JsonGet("/ipc/window/activetitle", &ret) err = c.HttpCli().JsonGet("/ipc/wingui/window/activetitle", &ret)
return ret, err return ret, err
} }
/*func (c *Cli) WindowWinfo(w int) (ret interface{}, err error) { /*func (c *Cli) WindowWinfo(w int) (ret interface{}, err error) {
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/window/winfo?w=%d", w), &ret) err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/window/winfo?w=%d", w), &ret)
return ret, err return ret, err
} }
func (c *Cli) WindowSendMsg(w, m string) error { func (c *Cli) WindowSendMsg(w, m string) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/window/sendmsg?w=%s&m=%s", w, m), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/window/sendmsg?w=%s&m=%s", w, m), nil)
return err return err
} }
func (c *Cli) WindowPostMsg(w, m string) error { func (c *Cli) WindowPostMsg(w, m string) error {
err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/window/postmsg?w=%s&m=%s", w, m), nil) err := c.HttpCli().JsonGet(fmt.Sprintf("/ipc/wingui/window/postmsg?w=%s&m=%s", w, m), nil)
return err return err
}*/ }*/