Skip to content

Instantly share code, notes, and snippets.

@alediaferia
Created December 31, 2017 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alediaferia/f57cb2f5a56757662e5c3ac3ab87c737 to your computer and use it in GitHub Desktop.
Save alediaferia/f57cb2f5a56757662e5c3ac3ab87c737 to your computer and use it in GitHub Desktop.
How to implement Gogoa
package gogoa
// #cgo CFLAGS: -x objective-c
// #cgo LDFLAGS: -framework Cocoa
//#include "g_application.h"
import "C"
import "unsafe"
type Application struct {
ptr unsafe.Pointer
}
func SharedApplication() (*Application) {
app := new(Application)
app.ptr = C.SharedApplication()
return app
}
func (this *Application) Run() {
C.Run(this.ptr)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment