Esempio n. 1
0
func GetPluginInfo(id PluginId) (name, filePath, signature, description string) {
	nameBuf := (*C.char)(C.malloc(255))
	defer C.free(unsafe.Pointer(nameBuf))
	pathBuf := (*C.char)(C.malloc(255))
	defer C.free(unsafe.Pointer(pathBuf))
	sigBuf := (*C.char)(C.malloc(255))
	defer C.free(unsafe.Pointer(sigBuf))
	descBuf := (*C.char)(C.malloc(255))
	defer C.free(unsafe.Pointer(descBuf))
	C.XPLMGetPluginInfo(C.XPLMPluginID(id), nameBuf, pathBuf, sigBuf, descBuf)
	name = C.GoString(nameBuf)
	filePath = C.GoString(pathBuf)
	signature = C.GoString(sigBuf)
	description = C.GoString(descBuf)
	return
}
Esempio n. 2
0
func DisablePlugin(id PluginId) {
	C.XPLMDisablePlugin(C.XPLMPluginID(id))
}
Esempio n. 3
0
func EnablePlugin(id PluginId) bool {
	return C.XPLMEnablePlugin(C.XPLMPluginID(id)) == 1
}
Esempio n. 4
0
func IsPluginEnabled(id PluginId) bool {
	return C.XPLMIsPluginEnabled(C.XPLMPluginID(id)) == 1
}