Exemple #1
0
func (e *editor) onFullscreen(this *window.Window, c *transport.Command) error {
	e.isFullscreen = !e.isFullscreen
	this.Fullscreen(e.isFullscreen)

	if !e.isFullscreen {
		this.Maximize()
	}

	return nil
}
Exemple #2
0
func (e *editor) onDevtools(this *window.Window, c *transport.Command) error {
	e.isDevtools = !e.isDevtools

	if e.isDevtools {
		this.OpenDevtools()
	} else {
		this.CloseDevtools()
	}

	return nil
}
Exemple #3
0
func NewRpc(win *thrwin.Window, logger log.Logger) (*Rpc, error) {
	rpc := &Rpc{
		win:      win,
		pending:  make(map[uint32]*call),
		handlers: make(map[string]*handler),
		logger:   logger,
	}

	_, err := win.HandleRemote(rpc.Handle)
	return rpc, err
}