Esempio n. 1
0
func init() {
	wde.BackendNewWindow = func(width, height int) (w wde.Window, err error) {
		w, err = NewWindow(width, height)
		return
	}
	wde.BackendRun = Run
	wde.BackendStop = Stop
	runtime.LockOSThread()
	C.initMacDraw()
	tasks = make(chan func(), 16)
}
Esempio n. 2
0
func init() {
	wde.BackendNewWindow = func(width, height int) (w wde.Window, err error) {
		w, err = NewWindow(width, height)
		return
	}
	wde.BackendRun = Run
	wde.BackendStop = Stop
	runtime.LockOSThread()
	C.initMacDraw()
	SetAppName("go")

}
Esempio n. 3
0
File: gmdgo.go Progetto: waxcorp/gmd
func init() {
	if DoItTheRightWay {
		runtime.LockOSThread()
	}
	C.initMacDraw()
	if !DoItTheRightWay {
		go func() {
			runtime.LockOSThread()
			<-appChanStart
			C.NSAppRun()
			appChanFinish <- true
		}()
	}
}
Esempio n. 4
0
func init() {
	wde.BackendNewWindow = func(width, height int) (w wde.Window, err error) {
		w, err = NewWindow(width, height)
		return
	}
	wde.BackendRun = Run
	wde.BackendStop = Stop
	runtime.LockOSThread()
	mdata, wdata := setupNibs()
	C.initMacDraw(
		unsafe.Pointer(&mdata[0]),
		C.int(len(mdata)),
		unsafe.Pointer(&wdata[0]),
		C.int(len(wdata)),
	)
	tasks = make(chan func(), 16)

	SetAppName("go")
}
Esempio n. 5
0
func init() {
	wde.BackendNewWindow = func(width, height int) (w wde.Window, err error) {
		w, err = NewWindow(width, height)
		return
	}
	wde.BackendRun = Run
	wde.BackendStop = Stop
	wde.BackendGetClipboardText = GetClipboardText
	wde.BackendSetClipboardText = SetClipboardText

	runtime.LockOSThread()
	C.initMacDraw()
	SetAppName("go")

	// I'll uncomment these once the 'super' key glitch is fixed
	// wde.PasteChord = "super+v"
	// wde.CopyChord = "super+c"
	// wde.CutChord = "super+x"
}
Esempio n. 6
0
func init() {
	runtime.LockOSThread()
	C.initMacDraw()
}