Created
December 31, 2017 16:59
-
-
Save alediaferia/f57cb2f5a56757662e5c3ac3ab87c737 to your computer and use it in GitHub Desktop.
How to implement Gogoa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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