summaryrefslogtreecommitdiffstats
path: root/slv2/plugin.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-01 19:44:19 +0000
committerDavid Robillard <d@drobilla.net>2007-07-01 19:44:19 +0000
commite67a923c73c26dfd335cfb325511c831996952ab (patch)
tree9f33af93a0ec3d8e20ad475495f4e5811bfcc660 /slv2/plugin.h
parent34eff8deba278aebe01b50fec879ab5d3d2335dc (diff)
downloadlilv-e67a923c73c26dfd335cfb325511c831996952ab.tar.gz
lilv-e67a923c73c26dfd335cfb325511c831996952ab.tar.bz2
lilv-e67a923c73c26dfd335cfb325511c831996952ab.zip
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
Diffstat (limited to 'slv2/plugin.h')
-rw-r--r--slv2/plugin.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 36add35..f77ca16 100644
--- a/slv2/plugin.h
+++ b/slv2/plugin.h
@@ -80,8 +80,29 @@ 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