LF_GetGlobalInfo

LuaFAR 3

LF_GetGlobalInfo


int LF_GetGlobalInfo (lua_State* L, struct GlobalInfo *Info, const wchar_t *PluginDir)

Parameters:

  L:         Lua state
  Info:      Pointer to a GlobalInfo struct
  PluginDir: Plugin directory

Returns:

  TRUE on success, FALSE otherwise

Description:

First, the function tries to require a module with the predefined name <_globalinfo. If package.preload["<_globalinfo"] contains a function, then it is run.

Else, the file _globalinfo.lua is searched in the plugin’s directory and run if found.

Then, if Lua function export.GetGlobalInfo exists, it is called.