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) }
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") }
func init() { if DoItTheRightWay { runtime.LockOSThread() } C.initMacDraw() if !DoItTheRightWay { go func() { runtime.LockOSThread() <-appChanStart C.NSAppRun() appChanFinish <- true }() } }
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") }
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" }
func init() { runtime.LockOSThread() C.initMacDraw() }