summaryrefslogtreecommitdiffstats
path: root/bindings/lilv.i
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/lilv.i')
-rw-r--r--bindings/lilv.i24
1 files changed, 24 insertions, 0 deletions
diff --git a/bindings/lilv.i b/bindings/lilv.i
index 958f9f0..6b2df7e 100644
--- a/bindings/lilv.i
+++ b/bindings/lilv.i
@@ -1,9 +1,25 @@
%module lilv
+%typedef unsigned uint32_t;
%{
+#define SWIG_FILE_WITH_INIT
#include "lilv/lilv.h"
#include "lilv/lilvmm.hpp"
%}
+%include "numpy.i"
+%init %{
+ import_array();
+%}
+%apply (float* INPLACE_ARRAY1) {(void* data_location)}
+
+%feature("compactdefaultargs") %{
+ lilv_plugin_get_num_ports_of_class;
+ get_num_ports_of_class;
+%}
+%varargs(3, LilvNode* node = NULL) lilv_plugin_get_num_ports_of_class;
+%varargs(3, LilvNode* node = NULL) get_num_ports_of_class;
+%typemap(in, numinputs=0) LilvNode *node3 ""; // Make sure it's NULL terminated
+
%include "lilv/lilv.h"
%include "lilv/lilvmm.hpp"
@@ -25,6 +41,14 @@ namespace Lilv {
raise StopIteration
return Iterator(self)
+
+ def get_by_uri(self, *args):
+ """get_by_uri(self, LilvNode uri) -> PluginClass"""
+ ret = _lilv.Plugins_get_by_uri(self, *args)
+ if ret.me is None:
+ return None
+ else:
+ return ret
%}
};