plugins

package
v0.0.0-...-3257b51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountPlugins

func CountPlugins() int

func DisablePlugin

func DisablePlugin(id PluginId)

func EnableFeature

func EnableFeature(featureName string, enabled bool)

func EnablePlugin

func EnablePlugin(id PluginId) bool

func EnumerateFeatures

func EnumerateFeatures(enumerator FeatureEnumerator, ref unsafe.Pointer)

func GetPluginInfo

func GetPluginInfo(id PluginId) (name, filePath, signature, description string)

func HasFeature

func HasFeature(featureName string) bool

func IsFeatureEnabled

func IsFeatureEnabled(featureName string) bool

func IsPluginEnabled

func IsPluginEnabled(id PluginId) bool

func ReloadPlugins

func ReloadPlugins(id PluginId)

func SendMessageToPlugin

func SendMessageToPlugin(msg Message)

Types

type FeatureEnumerator

type FeatureEnumerator func(string, unsafe.Pointer)

type Message

type Message struct {
	PluginId  PluginId
	MessageId MessageId
	Data      unsafe.Pointer
}

type MessageHandler

type MessageHandler func(Message)

type MessageId

type MessageId C.int
const (
	MSG_PLANE_CRASHED          MessageId = 101
	MSG_PLANE_LOADED           MessageId = 102
	MSG_AIRPORT_LOADED         MessageId = 103
	MSG_SCENERY_LOADED         MessageId = 104
	MSG_AIRPLANE_COUNT_CHANGED MessageId = 105
	MSG_PLANE_UNLOADED         MessageId = 106
	MSG_WILL_WRITE_PREFS       MessageId = 107
	MSG_LIVERY_LOADED          MessageId = 108
)

type PluginId

type PluginId C.int
const (
	NO_PLUGIN_ID  PluginId = -1
	PLUGIN_XPLANE PluginId = 0
)

func FindPluginByPath

func FindPluginByPath(path string) PluginId

func FindPluginBySignature

func FindPluginBySignature(signature string) PluginId

func GetMyId

func GetMyId() PluginId

func GetNthPlugin

func GetNthPlugin(index int) PluginId

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL