You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dws/ui/ui_darwin.go

31 lines
366 B
Go

8 years ago
package ui
import (
"runtime"
)
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#include "ui_darwin.h"
*/
import "C"
func NewDesktop() (UI, error) {
runtime.LockOSThread()
return new(cocoaUI), nil
}
type cocoaUI struct {
}
func (ui *cocoaUI) Init() error {
C.Initialize()
return nil
}
func (ui *cocoaUI) Run() error {
C.Run()
return nil
}