From e67a923c73c26dfd335cfb325511c831996952ab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 1 Jul 2007 19:44:19 +0000 Subject: Fix a couple memory leaks/errors. Add proper bundle path finding (support plugins with binaries not immediately under their bundle paths, though none exist). Add slv2_plugin_get_bundle_uri. Add stub for loading plugin GUIs. git-svn-id: http://svn.drobilla.net/lad/slv2@553 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/plugin.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'slv2/plugin.h') diff --git a/slv2/plugin.h b/slv2/plugin.h index 36add35..f77ca16 100644 --- a/slv2/plugin.h +++ b/slv2/plugin.h @@ -80,7 +80,28 @@ const char* slv2_plugin_get_uri(SLV2Plugin plugin); +/** Get the (resolvable) URI of the plugins "main" bundle. + * + * This returns the URI of the bundle where the plugin itself was found. + * Note that the data for a plugin may be spread over many bundles, that is, + * slv2_plugin_get_data_uris may returns URIs which are not below this one. + * + * Typical hosts should not need to use this function. + * + * Note this always returns a fully qualified URI. If you want a local + * filesystem path, use slv2_uri_to_path. + * + * \return a shared string which must not be modified or freed. + * + * Time = O(1) + */ +const char* +slv2_plugin_get_bundle_uri(SLV2Plugin plugin); + + /** Get the (resolvable) URIs of the RDF data files that define a plugin. + * + * Typical hosts should not need to use this function. * * Note this always returns fully qualified URIs. If you want local * filesystem paths, use slv2_uri_to_path. @@ -340,6 +361,9 @@ slv2_plugin_get_guis(SLV2Plugin plugin); * \param plugin The plugin that the GUI is for. * \param gui A GUI identifier as returned by slv2_plugin_get_guis() (with type SLV2_VALUE_GUI). * + * This function if provided for completeness, but if you want to load a GUI + * as easily as possible, use slv2_plugin_load_gui. + * * Time = Query */ SLV2Value @@ -347,6 +371,20 @@ slv2_plugin_get_gui_library_uri(SLV2Plugin plugin, SLV2Value gui); +/** Load and instantiate a plugin GUI. + * + * The type returned depends on the type of the GUI. For SLV2_GTK2_GUI, the + * return value must be cast to LV2UI_Handle. + * + * NULL returned on error. + * + * Time = Query + O(# of GUIs in GUI shared library) + */ +void* +slv2_plugin_load_gui(SLV2Plugin plugin, + SLV2Value gui); + + /** @} */ #ifdef __cplusplus -- cgit v1.2.1