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 }
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 }
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 }