mirror of
https://github.com/akiyosi/goneovim.git
synced 2025-08-05 02:24:44 +02:00
25 lines
459 B
Go
25 lines
459 B
Go
package editor
|
|
|
|
/*
|
|
#cgo CFLAGS: -x objective-c
|
|
#cgo LDFLAGS: -framework Cocoa
|
|
#include "objcbridge.h"
|
|
#include <stdlib.h>
|
|
*/
|
|
import "C"
|
|
import "unsafe"
|
|
|
|
//export GetOpeningFilepath
|
|
func GetOpeningFilepath(str *C.char) {
|
|
goStr := C.GoString(str)
|
|
C.free(unsafe.Pointer(str))
|
|
|
|
if editor.openingFileCh == nil {
|
|
editor.openingFileCh = make(chan string, 2)
|
|
}
|
|
editor.openingFileCh <- goStr
|
|
}
|
|
|
|
func setMyApplicationDelegate() {
|
|
C.SetMyApplicationDelegate()
|
|
}
|