Example #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)
}
Example #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")

}
Example #3
0
File: gmdgo.go Project: waxcorp/gmd
func init() {
	if DoItTheRightWay {
		runtime.LockOSThread()
	}
	C.initMacDraw()
	if !DoItTheRightWay {
		go func() {
			runtime.LockOSThread()
			<-appChanStart
			C.NSAppRun()
			appChanFinish <- true
		}()
	}
}
Example #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")
}
Example #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"
}
Example #6
0
func init() {
	runtime.LockOSThread()
	C.initMacDraw()
}