func (s *screenImpl) NewWindow(opts *screen.NewWindowOptions) (screen.Window, error) { // TODO: look at opts. const width, height = 1024, 768 id := C.newWindow(width, height) w := &windowImpl{ s: s, id: uintptr(id), pump: pump.Make(), endPaint: make(chan paint.Event, 1), draw: make(chan struct{}), drawDone: make(chan struct{}), } s.mu.Lock() s.windows[uintptr(id)] = w s.mu.Unlock() go w.drawLoop(uintptr(C.showWindow(id))) return w, nil }
func (w *Window) Show() { onMainThread(func() { C.showWindow(w.cw) }) }
func (w *Window) Show() { w.oplock.Lock() defer w.oplock.Unlock() C.showWindow(w.cw) }
func (w *Window) Show() { C.showWindow(w.cw) }
func (w *Window) showWindow() { C.showWindow(w.w) }