Alteração nas variáveis de retorno
parent
6c981f4196
commit
c03689b9fc
|
@ -304,14 +304,14 @@ func (c *Cli) NotifyBeep(msg, title string) error {
|
||||||
|
|
||||||
/***************** Window Functions *****************/
|
/***************** Window Functions *****************/
|
||||||
|
|
||||||
func (c *Cli) WindowList(s string) error {
|
func (c *Cli) WindowList(s string) (ret []map[string]interface{}, err error) {
|
||||||
err := c.HttpCli().JsonGet("/ipc/window/list?s="+s, nil)
|
err = c.HttpCli().JsonGet("/ipc/window/list?s="+s, &ret)
|
||||||
return err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) WindowHwnd(s string) error {
|
func (c *Cli) WindowHwnd(s string) (ret []int, err error) {
|
||||||
err := c.HttpCli().JsonGet("/ipc/window/hwnd?s="+s, nil)
|
err = c.HttpCli().JsonGet("/ipc/window/hwnd?s="+s, &ret)
|
||||||
return err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) WindowActivate(Hwnd string) error {
|
func (c *Cli) WindowActivate(Hwnd string) error {
|
||||||
|
@ -334,23 +334,23 @@ func (c *Cli) WindowMin(Hwnd string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) WindowActiveHwnd() (ret interface{}, err error) {
|
func (c *Cli) WindowActiveHwnd() (ret int, err error) {
|
||||||
err = c.HttpCli().JsonGet("/ipc/window/activehwnd", &ret)
|
err = c.HttpCli().JsonGet("/ipc/window/activehwnd", &ret)
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) WindowWaitActiveTitle(t string, m int) (ret 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/window/waitactivetitle?t=%s&m=%d", t, m), &ret)
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) WindowActiveTitle() (ret interface{}, err error) {
|
func (c *Cli) WindowActiveTitle() (ret string, err error) {
|
||||||
err = c.HttpCli().JsonGet("/ipc/window/activetitle", &ret)
|
err = c.HttpCli().JsonGet("/ipc/window/activetitle", &ret)
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cli) WindowWinfo(w string) (ret interface{}, err error) {
|
/*func (c *Cli) WindowWinfo(w int) (ret interface{}, err error) {
|
||||||
err = c.HttpCli().JsonGet("/ipc/window/winfo?w="+w, &ret)
|
err = c.HttpCli().JsonGet(fmt.Sprintf("/ipc/window/winfo?w=%d", w), &ret)
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ func (c *Cli) WindowSendMsg(w, m string) error {
|
||||||
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/window/postmsg?w=%s&m=%s", w, m), nil)
|
||||||
return err
|
return err
|
||||||
}
|
}*/
|
||||||
|
|
||||||
func NewCli() *Cli {
|
func NewCli() *Cli {
|
||||||
ret := &Cli{ApiCli: api.NewApiCli()}
|
ret := &Cli{ApiCli: api.NewApiCli()}
|
||||||
|
|
Loading…
Reference in New Issue