Example #1
0
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
}
Example #2
0
func (w *Window) Show() {
	onMainThread(func() {
		C.showWindow(w.cw)
	})
}
Example #3
0
func (w *Window) Show() {
	w.oplock.Lock()
	defer w.oplock.Unlock()

	C.showWindow(w.cw)
}
Example #4
0
File: gmdgo.go Project: waxcorp/gmd
func (w *Window) Show() {
	C.showWindow(w.cw)
}
Example #5
0
func (w *Window) showWindow() {
	C.showWindow(w.w)
}