summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-22 16:54:26 +0000
committerDavid Robillard <d@drobilla.net>2007-09-22 16:54:26 +0000
commit106b0784b8c8347bbbebcedc421030effdc26fd0 (patch)
tree55dbdd438de387b630a78e837ed23db12e9920cb /src
parentd8fb10e4246b6804e2283e4f83d2bfdccad8ad58 (diff)
downloadlilv-106b0784b8c8347bbbebcedc421030effdc26fd0.tar.gz
lilv-106b0784b8c8347bbbebcedc421030effdc26fd0.tar.bz2
lilv-106b0784b8c8347bbbebcedc421030effdc26fd0.zip
Updates LV2 and LV2 UI specs.
git-svn-id: http://svn.drobilla.net/lad/slv2@762 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/pluginguiinstance.c26
-rw-r--r--src/slv2_internal.h4
2 files changed, 18 insertions, 12 deletions
diff --git a/src/pluginguiinstance.c b/src/pluginguiinstance.c
index c115751..a29e64d 100644
--- a/src/pluginguiinstance.c
+++ b/src/pluginguiinstance.c
@@ -32,11 +32,14 @@
SLV2GUIInstance
-slv2_plugin_gtk2_gui_instantiate(SLV2Plugin plugin,
- SLV2Value gui,
- LV2UI_Set_Control_Function control_function,
- LV2UI_Controller controller,
- const LV2_Host_Feature** host_features)
+slv2_plugin_gtk2_gui_instantiate(SLV2Plugin plugin,
+ SLV2Value gui,
+ LV2UI_Write_Function write_function,
+ LV2UI_Command_Function command_function,
+ LV2UI_Program_Change_Function program_function,
+ LV2UI_Program_Save_Function save_function,
+ LV2UI_Controller controller,
+ const LV2_Host_Feature* const* host_features)
{
assert(gui->type == SLV2_VALUE_GUI);
@@ -48,7 +51,7 @@ slv2_plugin_gtk2_gui_instantiate(SLV2Plugin plugin,
bool local_host_features = (host_features == NULL);
if (local_host_features) {
host_features = malloc(sizeof(LV2_Host_Feature));
- host_features[0] = NULL;
+ ((LV2_Host_Feature**)host_features)[0] = NULL;
}
const char* const lib_uri = slv2_value_as_uri(slv2_plugin_get_gui_library_uri(plugin, gui));
@@ -101,9 +104,12 @@ slv2_plugin_gtk2_gui_instantiate(SLV2Plugin plugin,
impl->lv2ui_handle = ld->instantiate(ld,
slv2_plugin_get_uri(plugin),
(char*)bundle_path,
- control_function,
+ write_function,
+ command_function,
+ program_function,
+ save_function,
controller,
- (struct _GtkWidget**)&impl->widget,
+ &impl->widget,
host_features);
impl->lib_handle = lib;
result->pimpl = impl;
@@ -130,7 +136,7 @@ slv2_plugin_gtk2_gui_instantiate(SLV2Plugin plugin,
}
if (local_host_features)
- free(host_features);
+ free((LV2_Host_Feature**)host_features);
return result;
}
@@ -150,7 +156,7 @@ slv2_gtk2_gui_instance_free(SLV2GUIInstance instance)
}
-struct _GtkWidget*
+LV2UI_Widget
slv2_gtk2_gui_instance_get_widget(SLV2GUIInstance instance) {
return instance->pimpl->widget;
}
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index d2296cf..1dedc50 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -28,7 +28,7 @@ extern "C" {
#include <inttypes.h>
#include <librdf.h>
#include <slv2/types.h>
-#include <slv2/lv2-gtk2gui.h>
+#include <slv2/lv2_gui.h>
@@ -103,7 +103,7 @@ struct _SLV2GUIInstanceImpl {
void* lib_handle;
const LV2UI_Descriptor* lv2ui_descriptor;
LV2UI_Handle lv2ui_handle;
- void* widget;
+ LV2UI_Widget widget;
};