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

33 lines
410 B
Go

8 years ago
package ui
import (
"log"
8 years ago
"runtime"
)
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#include "ui_darwin.h"
*/
import "C"
func NewDesktop() (UI, error) {
runtime.LockOSThread()
log.Println("Creating new cocoaUI")
8 years ago
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
}