func newWindow(opts *screen.NewWindowOptions) (uintptr, error) { w, err := win32.NewWindow(opts) if err != nil { return 0, err } return uintptr(w), nil }
func (s *screenImpl) NewWindow(opts *screen.NewWindowOptions) (screen.Window, error) { w := &windowImpl{} var err error w.hwnd, err = win32.NewWindow(opts) if err != nil { return nil, err } s.mu.Lock() s.windows[w.hwnd] = w s.mu.Unlock() win32.Show(w.hwnd) return w, nil }