41 lines
1.8 KiB
Lua
41 lines
1.8 KiB
Lua
local ffi = require "ffi"
|
|
local lv2 = ffi.load("liblilv-0.so.0")
|
|
|
|
|
|
ffi.cdef [[
|
|
typedef struct LilvPluginImpl LilvPlugin; /**< LV2 Plugin. */
|
|
typedef struct LilvPluginClassImpl LilvPluginClass; /**< Plugin Class. */
|
|
typedef struct LilvPortImpl LilvPort; /**< Port. */
|
|
typedef struct LilvScalePointImpl LilvScalePoint; /**< Scale Point. */
|
|
typedef struct LilvUIImpl LilvUI; /**< Plugin UI. */
|
|
typedef struct LilvNodeImpl LilvNode; /**< Typed Value. */
|
|
typedef struct LilvWorldImpl LilvWorld; /**< Lilv World. */
|
|
typedef struct LilvInstanceImpl LilvInstance; /**< Plugin instance. */
|
|
typedef struct LilvStateImpl LilvState; /**< Plugin state. */
|
|
|
|
typedef void LilvIter; /**< Collection iterator */
|
|
typedef void LilvPluginClasses; /**< A set of #LilvPluginClass. */
|
|
typedef void LilvPlugins; /**< A set of #LilvPlugin. */
|
|
typedef void LilvScalePoints; /**< A set of #LilvScalePoint. */
|
|
typedef void LilvUIs; /**< A set of #LilvUI. */
|
|
typedef void LilvNodes; /**< A set of #LilvNode. */
|
|
|
|
LilvWorld* lilv_world_new();
|
|
void lilv_world_load_all(LilvWorld*);
|
|
LilvPlugins* lilv_world_get_all_plugins(LilvWorld*);
|
|
|
|
unsigned lilv_plugins_size(const LilvPlugins*);
|
|
LilvIter* lilv_plugins_begin(const LilvPlugins*);
|
|
const LilvPlugin* lilv_plugins_get(const LilvPlugins*, LilvIter*);
|
|
LilvIter* lilv_plugins_next(const LilvPlugins*, LilvIter*);
|
|
bool lilv_plugins_is_end(const LilvPlugins*, LilvIter*);
|
|
|
|
const LilvNode* lilv_plugin_get_uri(const LilvPlugin*);
|
|
const LilvNode* lilv_plugin_get_bundle_uri(const LilvPlugin*);
|
|
const LilvNode* lilv_plugin_get_library_uri(const LilvPlugin*);
|
|
|
|
const char* lilv_node_as_uri(const LilvNode*);
|
|
]]
|
|
|
|
return lv2
|