1use lv2_raw::*;type LV2_URID_Map = LV2UridMap; type LV2_Feature = LV2Feature;type LV2_Handle = LV2Handle; type LV2_Descriptor = LV2Descriptor; type LV2_URID_Unmap = ::std::os::raw::c_void;
2pub const LILV_NS_DOAP: &'static [u8; 30usize] = b"http://usefulinc.com/ns/doap#\0";
5pub const LILV_NS_FOAF: &'static [u8; 27usize] = b"http://xmlns.com/foaf/0.1/\0";
6pub const LILV_NS_LILV: &'static [u8; 29usize] = b"http://drobilla.net/ns/lilv#\0";
7pub const LILV_NS_LV2: &'static [u8; 30usize] = b"http://lv2plug.in/ns/lv2core#\0";
8pub const LILV_NS_OWL: &'static [u8; 31usize] = b"http://www.w3.org/2002/07/owl#\0";
9pub const LILV_NS_RDF: &'static [u8; 44usize] = b"http://www.w3.org/1999/02/22-rdf-syntax-ns#\0";
10pub const LILV_NS_RDFS: &'static [u8; 38usize] = b"http://www.w3.org/2000/01/rdf-schema#\0";
11pub const LILV_NS_XSD: &'static [u8; 34usize] = b"http://www.w3.org/2001/XMLSchema#\0";
12pub const LILV_URI_ATOM_PORT: &'static [u8; 39usize] = b"http://lv2plug.in/ns/ext/atom#AtomPort\0";
13pub const LILV_URI_AUDIO_PORT: &'static [u8; 39usize] = b"http://lv2plug.in/ns/lv2core#AudioPort\0";
14pub const LILV_URI_CONTROL_PORT: &'static [u8; 41usize] =
15 b"http://lv2plug.in/ns/lv2core#ControlPort\0";
16pub const LILV_URI_CV_PORT: &'static [u8; 36usize] = b"http://lv2plug.in/ns/lv2core#CVPort\0";
17pub const LILV_URI_EVENT_PORT: &'static [u8; 41usize] =
18 b"http://lv2plug.in/ns/ext/event#EventPort\0";
19pub const LILV_URI_INPUT_PORT: &'static [u8; 39usize] = b"http://lv2plug.in/ns/lv2core#InputPort\0";
20pub const LILV_URI_MIDI_EVENT: &'static [u8; 40usize] =
21 b"http://lv2plug.in/ns/ext/midi#MidiEvent\0";
22pub const LILV_URI_OUTPUT_PORT: &'static [u8; 40usize] =
23 b"http://lv2plug.in/ns/lv2core#OutputPort\0";
24pub const LILV_URI_PORT: &'static [u8; 34usize] = b"http://lv2plug.in/ns/lv2core#Port\0";
25pub const LILV_OPTION_FILTER_LANG: &'static [u8; 40usize] =
26 b"http://drobilla.net/ns/lilv#filter-lang\0";
27pub const LILV_OPTION_DYN_MANIFEST: &'static [u8; 41usize] =
28 b"http://drobilla.net/ns/lilv#dyn-manifest\0";
29pub type va_list = __builtin_va_list;
30pub type __uint32_t = ::std::os::raw::c_uint;
31pub type __off_t = ::std::os::raw::c_long;
32pub type __off64_t = ::std::os::raw::c_long;
33pub type FILE = _IO_FILE;
34#[repr(C)]
35#[derive(Debug, Copy, Clone)]
36pub struct _IO_marker {
37 _unused: [u8; 0],
38}
39#[repr(C)]
40#[derive(Debug, Copy, Clone)]
41pub struct _IO_codecvt {
42 _unused: [u8; 0],
43}
44#[repr(C)]
45#[derive(Debug, Copy, Clone)]
46pub struct _IO_wide_data {
47 _unused: [u8; 0],
48}
49pub type _IO_lock_t = ::std::os::raw::c_void;
50#[repr(C)]
51#[derive(Debug, Copy, Clone)]
52pub struct _IO_FILE {
53 pub _flags: ::std::os::raw::c_int,
54 pub _IO_read_ptr: *mut ::std::os::raw::c_char,
55 pub _IO_read_end: *mut ::std::os::raw::c_char,
56 pub _IO_read_base: *mut ::std::os::raw::c_char,
57 pub _IO_write_base: *mut ::std::os::raw::c_char,
58 pub _IO_write_ptr: *mut ::std::os::raw::c_char,
59 pub _IO_write_end: *mut ::std::os::raw::c_char,
60 pub _IO_buf_base: *mut ::std::os::raw::c_char,
61 pub _IO_buf_end: *mut ::std::os::raw::c_char,
62 pub _IO_save_base: *mut ::std::os::raw::c_char,
63 pub _IO_backup_base: *mut ::std::os::raw::c_char,
64 pub _IO_save_end: *mut ::std::os::raw::c_char,
65 pub _markers: *mut _IO_marker,
66 pub _chain: *mut _IO_FILE,
67 pub _fileno: ::std::os::raw::c_int,
68 pub _flags2: ::std::os::raw::c_int,
69 pub _old_offset: __off_t,
70 pub _cur_column: ::std::os::raw::c_ushort,
71 pub _vtable_offset: ::std::os::raw::c_schar,
72 pub _shortbuf: [::std::os::raw::c_char; 1usize],
73 pub _lock: *mut _IO_lock_t,
74 pub _offset: __off64_t,
75 pub _codecvt: *mut _IO_codecvt,
76 pub _wide_data: *mut _IO_wide_data,
77 pub _freeres_list: *mut _IO_FILE,
78 pub _freeres_buf: *mut ::std::os::raw::c_void,
79 pub __pad5: usize,
80 pub _mode: ::std::os::raw::c_int,
81 pub _unused2: [::std::os::raw::c_char; 20usize],
82}
83#[test]
84fn bindgen_test_layout__IO_FILE() {
85 assert_eq!(
86 ::std::mem::size_of::<_IO_FILE>(),
87 216usize,
88 concat!("Size of: ", stringify!(_IO_FILE))
89 );
90 assert_eq!(
91 ::std::mem::align_of::<_IO_FILE>(),
92 8usize,
93 concat!("Alignment of ", stringify!(_IO_FILE))
94 );
95 assert_eq!(
96 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
97 0usize,
98 concat!(
99 "Offset of field: ",
100 stringify!(_IO_FILE),
101 "::",
102 stringify!(_flags)
103 )
104 );
105 assert_eq!(
106 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
107 8usize,
108 concat!(
109 "Offset of field: ",
110 stringify!(_IO_FILE),
111 "::",
112 stringify!(_IO_read_ptr)
113 )
114 );
115 assert_eq!(
116 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
117 16usize,
118 concat!(
119 "Offset of field: ",
120 stringify!(_IO_FILE),
121 "::",
122 stringify!(_IO_read_end)
123 )
124 );
125 assert_eq!(
126 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
127 24usize,
128 concat!(
129 "Offset of field: ",
130 stringify!(_IO_FILE),
131 "::",
132 stringify!(_IO_read_base)
133 )
134 );
135 assert_eq!(
136 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
137 32usize,
138 concat!(
139 "Offset of field: ",
140 stringify!(_IO_FILE),
141 "::",
142 stringify!(_IO_write_base)
143 )
144 );
145 assert_eq!(
146 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
147 40usize,
148 concat!(
149 "Offset of field: ",
150 stringify!(_IO_FILE),
151 "::",
152 stringify!(_IO_write_ptr)
153 )
154 );
155 assert_eq!(
156 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
157 48usize,
158 concat!(
159 "Offset of field: ",
160 stringify!(_IO_FILE),
161 "::",
162 stringify!(_IO_write_end)
163 )
164 );
165 assert_eq!(
166 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
167 56usize,
168 concat!(
169 "Offset of field: ",
170 stringify!(_IO_FILE),
171 "::",
172 stringify!(_IO_buf_base)
173 )
174 );
175 assert_eq!(
176 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
177 64usize,
178 concat!(
179 "Offset of field: ",
180 stringify!(_IO_FILE),
181 "::",
182 stringify!(_IO_buf_end)
183 )
184 );
185 assert_eq!(
186 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
187 72usize,
188 concat!(
189 "Offset of field: ",
190 stringify!(_IO_FILE),
191 "::",
192 stringify!(_IO_save_base)
193 )
194 );
195 assert_eq!(
196 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
197 80usize,
198 concat!(
199 "Offset of field: ",
200 stringify!(_IO_FILE),
201 "::",
202 stringify!(_IO_backup_base)
203 )
204 );
205 assert_eq!(
206 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
207 88usize,
208 concat!(
209 "Offset of field: ",
210 stringify!(_IO_FILE),
211 "::",
212 stringify!(_IO_save_end)
213 )
214 );
215 assert_eq!(
216 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
217 96usize,
218 concat!(
219 "Offset of field: ",
220 stringify!(_IO_FILE),
221 "::",
222 stringify!(_markers)
223 )
224 );
225 assert_eq!(
226 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
227 104usize,
228 concat!(
229 "Offset of field: ",
230 stringify!(_IO_FILE),
231 "::",
232 stringify!(_chain)
233 )
234 );
235 assert_eq!(
236 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
237 112usize,
238 concat!(
239 "Offset of field: ",
240 stringify!(_IO_FILE),
241 "::",
242 stringify!(_fileno)
243 )
244 );
245 assert_eq!(
246 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
247 116usize,
248 concat!(
249 "Offset of field: ",
250 stringify!(_IO_FILE),
251 "::",
252 stringify!(_flags2)
253 )
254 );
255 assert_eq!(
256 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
257 120usize,
258 concat!(
259 "Offset of field: ",
260 stringify!(_IO_FILE),
261 "::",
262 stringify!(_old_offset)
263 )
264 );
265 assert_eq!(
266 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
267 128usize,
268 concat!(
269 "Offset of field: ",
270 stringify!(_IO_FILE),
271 "::",
272 stringify!(_cur_column)
273 )
274 );
275 assert_eq!(
276 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
277 130usize,
278 concat!(
279 "Offset of field: ",
280 stringify!(_IO_FILE),
281 "::",
282 stringify!(_vtable_offset)
283 )
284 );
285 assert_eq!(
286 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
287 131usize,
288 concat!(
289 "Offset of field: ",
290 stringify!(_IO_FILE),
291 "::",
292 stringify!(_shortbuf)
293 )
294 );
295 assert_eq!(
296 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
297 136usize,
298 concat!(
299 "Offset of field: ",
300 stringify!(_IO_FILE),
301 "::",
302 stringify!(_lock)
303 )
304 );
305 assert_eq!(
306 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
307 144usize,
308 concat!(
309 "Offset of field: ",
310 stringify!(_IO_FILE),
311 "::",
312 stringify!(_offset)
313 )
314 );
315 assert_eq!(
316 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
317 152usize,
318 concat!(
319 "Offset of field: ",
320 stringify!(_IO_FILE),
321 "::",
322 stringify!(_codecvt)
323 )
324 );
325 assert_eq!(
326 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
327 160usize,
328 concat!(
329 "Offset of field: ",
330 stringify!(_IO_FILE),
331 "::",
332 stringify!(_wide_data)
333 )
334 );
335 assert_eq!(
336 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
337 168usize,
338 concat!(
339 "Offset of field: ",
340 stringify!(_IO_FILE),
341 "::",
342 stringify!(_freeres_list)
343 )
344 );
345 assert_eq!(
346 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
347 176usize,
348 concat!(
349 "Offset of field: ",
350 stringify!(_IO_FILE),
351 "::",
352 stringify!(_freeres_buf)
353 )
354 );
355 assert_eq!(
356 unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
357 184usize,
358 concat!(
359 "Offset of field: ",
360 stringify!(_IO_FILE),
361 "::",
362 stringify!(__pad5)
363 )
364 );
365 assert_eq!(
366 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
367 192usize,
368 concat!(
369 "Offset of field: ",
370 stringify!(_IO_FILE),
371 "::",
372 stringify!(_mode)
373 )
374 );
375 assert_eq!(
376 unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
377 196usize,
378 concat!(
379 "Offset of field: ",
380 stringify!(_IO_FILE),
381 "::",
382 stringify!(_unused2)
383 )
384 );
385}
386#[repr(C)]
387#[derive(Debug, Copy, Clone)]
388pub struct LilvPluginImpl {
389 _unused: [u8; 0],
390}
391pub type LilvPlugin = LilvPluginImpl;
392#[repr(C)]
393#[derive(Debug, Copy, Clone)]
394pub struct LilvPluginClassImpl {
395 _unused: [u8; 0],
396}
397pub type LilvPluginClass = LilvPluginClassImpl;
398#[repr(C)]
399#[derive(Debug, Copy, Clone)]
400pub struct LilvPortImpl {
401 _unused: [u8; 0],
402}
403pub type LilvPort = LilvPortImpl;
404#[repr(C)]
405#[derive(Debug, Copy, Clone)]
406pub struct LilvScalePointImpl {
407 _unused: [u8; 0],
408}
409pub type LilvScalePoint = LilvScalePointImpl;
410#[repr(C)]
411#[derive(Debug, Copy, Clone)]
412pub struct LilvUIImpl {
413 _unused: [u8; 0],
414}
415pub type LilvUI = LilvUIImpl;
416#[repr(C)]
417#[derive(Debug, Copy, Clone)]
418pub struct LilvNodeImpl {
419 _unused: [u8; 0],
420}
421pub type LilvNode = LilvNodeImpl;
422#[repr(C)]
423#[derive(Debug, Copy, Clone)]
424pub struct LilvWorldImpl {
425 _unused: [u8; 0],
426}
427pub type LilvWorld = LilvWorldImpl;
428pub type LilvInstance = LilvInstanceImpl;
429#[repr(C)]
430#[derive(Debug, Copy, Clone)]
431pub struct LilvStateImpl {
432 _unused: [u8; 0],
433}
434pub type LilvState = LilvStateImpl;
435pub type LilvIter = ::std::os::raw::c_void;
436pub type LilvPluginClasses = ::std::os::raw::c_void;
437pub type LilvPlugins = ::std::os::raw::c_void;
438pub type LilvScalePoints = ::std::os::raw::c_void;
439pub type LilvUIs = ::std::os::raw::c_void;
440pub type LilvNodes = ::std::os::raw::c_void;
441extern "C" {
442 #[doc = "Free memory allocated by Lilv."]
443 #[doc = ""]
444 #[doc = "This function exists because some systems require memory allocated by a"]
445 #[doc = "library to be freed by code in the same library. It is otherwise equivalent"]
446 #[doc = "to the standard C free() function."]
447 pub fn lilv_free(ptr: *mut ::std::os::raw::c_void);
448}
449extern "C" {
450 #[doc = "Convert a file URI string to a local path string."]
451 #[doc = "For example, \"file://foo/bar/baz.ttl\" returns \"/foo/bar/baz.ttl\"."]
452 #[doc = "Return value is shared and must not be deleted by caller."]
453 #[doc = "This function does not handle escaping correctly and should not be used for"]
454 #[doc = "general file URIs. Use lilv_file_uri_parse() instead."]
455 #[doc = "@return `uri` converted to a path, or NULL on failure (URI is not local)."]
456 pub fn lilv_uri_to_path(uri: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
457}
458extern "C" {
459 #[doc = "Convert a file URI string to a local path string."]
460 #[doc = "For example, \"file://foo/bar%20one/baz.ttl\" returns \"/foo/bar one/baz.ttl\"."]
461 #[doc = "Return value must be freed by caller with lilv_free()."]
462 #[doc = "@param uri The file URI to parse."]
463 #[doc = "@param hostname If non-NULL, set to the hostname in the URI, if any."]
464 #[doc = "@return `uri` converted to a path, or NULL on failure (URI is not local)."]
465 pub fn lilv_file_uri_parse(
466 uri: *const ::std::os::raw::c_char,
467 hostname: *mut *mut ::std::os::raw::c_char,
468 ) -> *mut ::std::os::raw::c_char;
469}
470extern "C" {
471 #[doc = "Create a new URI value."]
472 #[doc = "Returned value must be freed by caller with lilv_node_free()."]
473 pub fn lilv_new_uri(world: *mut LilvWorld, uri: *const ::std::os::raw::c_char)
474 -> *mut LilvNode;
475}
476extern "C" {
477 #[doc = "Create a new file URI value."]
478 #[doc = "@param world The world."]
479 #[doc = "@param host Host name, or NULL."]
480 #[doc = "@param path Path on host."]
481 #[doc = "@return A new node that must be freed by caller."]
482 #[doc = ""]
483 #[doc = "Relative paths are resolved against the current working directory. Note"]
484 #[doc = "that this may yield unexpected results if `host` is another machine."]
485 pub fn lilv_new_file_uri(
486 world: *mut LilvWorld,
487 host: *const ::std::os::raw::c_char,
488 path: *const ::std::os::raw::c_char,
489 ) -> *mut LilvNode;
490}
491extern "C" {
492 #[doc = "Create a new string value (with no language)."]
493 #[doc = "Returned value must be freed by caller with lilv_node_free()."]
494 pub fn lilv_new_string(
495 world: *mut LilvWorld,
496 str: *const ::std::os::raw::c_char,
497 ) -> *mut LilvNode;
498}
499extern "C" {
500 #[doc = "Create a new integer value."]
501 #[doc = "Returned value must be freed by caller with lilv_node_free()."]
502 pub fn lilv_new_int(world: *mut LilvWorld, val: ::std::os::raw::c_int) -> *mut LilvNode;
503}
504extern "C" {
505 #[doc = "Create a new floating point value."]
506 #[doc = "Returned value must be freed by caller with lilv_node_free()."]
507 pub fn lilv_new_float(world: *mut LilvWorld, val: f32) -> *mut LilvNode;
508}
509extern "C" {
510 #[doc = "Create a new boolean value."]
511 #[doc = "Returned value must be freed by caller with lilv_node_free()."]
512 pub fn lilv_new_bool(world: *mut LilvWorld, val: bool) -> *mut LilvNode;
513}
514extern "C" {
515 #[doc = "Free a LilvNode."]
516 #[doc = "It is safe to call this function on NULL."]
517 pub fn lilv_node_free(val: *mut LilvNode);
518}
519extern "C" {
520 #[doc = "Duplicate a LilvNode."]
521 pub fn lilv_node_duplicate(val: *const LilvNode) -> *mut LilvNode;
522}
523extern "C" {
524 #[doc = "Return whether two values are equivalent."]
525 pub fn lilv_node_equals(value: *const LilvNode, other: *const LilvNode) -> bool;
526}
527extern "C" {
528 #[doc = "Return this value as a Turtle/SPARQL token."]
529 #[doc = "Returned value must be freed by caller with lilv_free()."]
530 #[doc = "<table>"]
531 #[doc = "<caption>Example Turtle Tokens</caption>"]
532 #[doc = "<tr><th>URI</th><td><http://example.org/foo ></td></tr>"]
533 #[doc = "<tr><th>QName</th><td>doap:name</td></tr>"]
534 #[doc = "<tr><th>String</th><td>\"this is a string\"</td></tr>"]
535 #[doc = "<tr><th>Float</th><td>1.0</td></tr>"]
536 #[doc = "<tr><th>Integer</th><td>1</td></tr>"]
537 #[doc = "<tr><th>Boolean</th><td>true</td></tr>"]
538 #[doc = "</table>"]
539 pub fn lilv_node_get_turtle_token(value: *const LilvNode) -> *mut ::std::os::raw::c_char;
540}
541extern "C" {
542 #[doc = "Return whether the value is a URI (resource)."]
543 pub fn lilv_node_is_uri(value: *const LilvNode) -> bool;
544}
545extern "C" {
546 #[doc = "Return this value as a URI string, e.g. \"http://example.org/foo\"."]
547 #[doc = "Valid to call only if `lilv_node_is_uri(value)` returns true."]
548 #[doc = "Returned value is owned by `value` and must not be freed by caller."]
549 pub fn lilv_node_as_uri(value: *const LilvNode) -> *const ::std::os::raw::c_char;
550}
551extern "C" {
552 #[doc = "Return whether the value is a blank node (resource with no URI)."]
553 pub fn lilv_node_is_blank(value: *const LilvNode) -> bool;
554}
555extern "C" {
556 #[doc = "Return this value as a blank node identifier, e.g. \"genid03\"."]
557 #[doc = "Valid to call only if `lilv_node_is_blank(value)` returns true."]
558 #[doc = "Returned value is owned by `value` and must not be freed by caller."]
559 pub fn lilv_node_as_blank(value: *const LilvNode) -> *const ::std::os::raw::c_char;
560}
561extern "C" {
562 #[doc = "Return whether this value is a literal (i.e. not a URI)."]
563 #[doc = "Returns true if `value` is a string or numeric value."]
564 pub fn lilv_node_is_literal(value: *const LilvNode) -> bool;
565}
566extern "C" {
567 #[doc = "Return whether this value is a string literal."]
568 #[doc = "Returns true if `value` is a string value (and not numeric)."]
569 pub fn lilv_node_is_string(value: *const LilvNode) -> bool;
570}
571extern "C" {
572 #[doc = "Return `value` as a string."]
573 pub fn lilv_node_as_string(value: *const LilvNode) -> *const ::std::os::raw::c_char;
574}
575extern "C" {
576 #[doc = "Return the path of a file URI node."]
577 #[doc = "Returns NULL if `value` is not a file URI."]
578 #[doc = "Returned value must be freed by caller with lilv_free()."]
579 pub fn lilv_node_get_path(
580 value: *const LilvNode,
581 hostname: *mut *mut ::std::os::raw::c_char,
582 ) -> *mut ::std::os::raw::c_char;
583}
584extern "C" {
585 #[doc = "Return whether this value is a decimal literal."]
586 pub fn lilv_node_is_float(value: *const LilvNode) -> bool;
587}
588extern "C" {
589 #[doc = "Return `value` as a float."]
590 #[doc = "Valid to call only if `lilv_node_is_float(value)` or"]
591 #[doc = "`lilv_node_is_int(value)` returns true."]
592 pub fn lilv_node_as_float(value: *const LilvNode) -> f32;
593}
594extern "C" {
595 #[doc = "Return whether this value is an integer literal."]
596 pub fn lilv_node_is_int(value: *const LilvNode) -> bool;
597}
598extern "C" {
599 #[doc = "Return `value` as an integer."]
600 #[doc = "Valid to call only if `lilv_node_is_int(value)` returns true."]
601 pub fn lilv_node_as_int(value: *const LilvNode) -> ::std::os::raw::c_int;
602}
603extern "C" {
604 #[doc = "Return whether this value is a boolean."]
605 pub fn lilv_node_is_bool(value: *const LilvNode) -> bool;
606}
607extern "C" {
608 #[doc = "Return `value` as a bool."]
609 #[doc = "Valid to call only if `lilv_node_is_bool(value)` returns true."]
610 pub fn lilv_node_as_bool(value: *const LilvNode) -> bool;
611}
612extern "C" {
613 pub fn lilv_plugin_classes_free(collection: *mut LilvPluginClasses);
614}
615extern "C" {
616 pub fn lilv_plugin_classes_size(collection: *const LilvPluginClasses)
617 -> ::std::os::raw::c_uint;
618}
619extern "C" {
620 pub fn lilv_plugin_classes_begin(collection: *const LilvPluginClasses) -> *mut LilvIter;
621}
622extern "C" {
623 pub fn lilv_plugin_classes_get(
624 collection: *const LilvPluginClasses,
625 i: *mut LilvIter,
626 ) -> *const LilvPluginClass;
627}
628extern "C" {
629 pub fn lilv_plugin_classes_next(
630 collection: *const LilvPluginClasses,
631 i: *mut LilvIter,
632 ) -> *mut LilvIter;
633}
634extern "C" {
635 pub fn lilv_plugin_classes_is_end(
636 collection: *const LilvPluginClasses,
637 i: *mut LilvIter,
638 ) -> bool;
639}
640extern "C" {
641 #[doc = "Get a plugin class from `classes` by URI."]
642 #[doc = "Return value is shared (stored in `classes`) and must not be freed or"]
643 #[doc = "modified by the caller in any way."]
644 #[doc = "@return NULL if no plugin class with `uri` is found in `classes`."]
645 pub fn lilv_plugin_classes_get_by_uri(
646 classes: *const LilvPluginClasses,
647 uri: *const LilvNode,
648 ) -> *const LilvPluginClass;
649}
650extern "C" {
651 pub fn lilv_scale_points_free(collection: *mut LilvScalePoints);
652}
653extern "C" {
654 pub fn lilv_scale_points_size(collection: *const LilvScalePoints) -> ::std::os::raw::c_uint;
655}
656extern "C" {
657 pub fn lilv_scale_points_begin(collection: *const LilvScalePoints) -> *mut LilvIter;
658}
659extern "C" {
660 pub fn lilv_scale_points_get(
661 collection: *const LilvScalePoints,
662 i: *mut LilvIter,
663 ) -> *const LilvScalePoint;
664}
665extern "C" {
666 pub fn lilv_scale_points_next(
667 collection: *const LilvScalePoints,
668 i: *mut LilvIter,
669 ) -> *mut LilvIter;
670}
671extern "C" {
672 pub fn lilv_scale_points_is_end(collection: *const LilvScalePoints, i: *mut LilvIter) -> bool;
673}
674extern "C" {
675 pub fn lilv_uis_free(collection: *mut LilvUIs);
676}
677extern "C" {
678 pub fn lilv_uis_size(collection: *const LilvUIs) -> ::std::os::raw::c_uint;
679}
680extern "C" {
681 pub fn lilv_uis_begin(collection: *const LilvUIs) -> *mut LilvIter;
682}
683extern "C" {
684 pub fn lilv_uis_get(collection: *const LilvUIs, i: *mut LilvIter) -> *const LilvUI;
685}
686extern "C" {
687 pub fn lilv_uis_next(collection: *const LilvUIs, i: *mut LilvIter) -> *mut LilvIter;
688}
689extern "C" {
690 pub fn lilv_uis_is_end(collection: *const LilvUIs, i: *mut LilvIter) -> bool;
691}
692extern "C" {
693 #[doc = "Get a UI from `uis` by URI."]
694 #[doc = "Return value is shared (stored in `uis`) and must not be freed or"]
695 #[doc = "modified by the caller in any way."]
696 #[doc = "@return NULL if no UI with `uri` is found in `list`."]
697 pub fn lilv_uis_get_by_uri(uis: *const LilvUIs, uri: *const LilvNode) -> *const LilvUI;
698}
699extern "C" {
700 pub fn lilv_nodes_free(collection: *mut LilvNodes);
701}
702extern "C" {
703 pub fn lilv_nodes_size(collection: *const LilvNodes) -> ::std::os::raw::c_uint;
704}
705extern "C" {
706 pub fn lilv_nodes_begin(collection: *const LilvNodes) -> *mut LilvIter;
707}
708extern "C" {
709 pub fn lilv_nodes_get(collection: *const LilvNodes, i: *mut LilvIter) -> *const LilvNode;
710}
711extern "C" {
712 pub fn lilv_nodes_next(collection: *const LilvNodes, i: *mut LilvIter) -> *mut LilvIter;
713}
714extern "C" {
715 pub fn lilv_nodes_is_end(collection: *const LilvNodes, i: *mut LilvIter) -> bool;
716}
717extern "C" {
718 pub fn lilv_nodes_get_first(collection: *const LilvNodes) -> *mut LilvNode;
719}
720extern "C" {
721 #[doc = "Return whether `values` contains `value`."]
722 pub fn lilv_nodes_contains(nodes: *const LilvNodes, value: *const LilvNode) -> bool;
723}
724extern "C" {
725 #[doc = "Return a new LilvNodes that contains all nodes from both `a` and `b`."]
726 pub fn lilv_nodes_merge(a: *const LilvNodes, b: *const LilvNodes) -> *mut LilvNodes;
727}
728extern "C" {
729 pub fn lilv_plugins_size(collection: *const LilvPlugins) -> ::std::os::raw::c_uint;
730}
731extern "C" {
732 pub fn lilv_plugins_begin(collection: *const LilvPlugins) -> *mut LilvIter;
733}
734extern "C" {
735 pub fn lilv_plugins_get(collection: *const LilvPlugins, i: *mut LilvIter) -> *const LilvPlugin;
736}
737extern "C" {
738 pub fn lilv_plugins_next(collection: *const LilvPlugins, i: *mut LilvIter) -> *mut LilvIter;
739}
740extern "C" {
741 pub fn lilv_plugins_is_end(collection: *const LilvPlugins, i: *mut LilvIter) -> bool;
742}
743extern "C" {
744 #[doc = "Get a plugin from `plugins` by URI."]
745 #[doc = "Return value is shared (stored in `plugins`) and must not be freed or"]
746 #[doc = "modified by the caller in any way."]
747 #[doc = "@return NULL if no plugin with `uri` is found in `plugins`."]
748 pub fn lilv_plugins_get_by_uri(
749 plugins: *const LilvPlugins,
750 uri: *const LilvNode,
751 ) -> *const LilvPlugin;
752}
753extern "C" {
754 #[doc = "Initialize a new, empty world."]
755 #[doc = "If initialization fails, NULL is returned."]
756 pub fn lilv_world_new() -> *mut LilvWorld;
757}
758extern "C" {
759 #[doc = "Set an option option for `world`."]
760 #[doc = ""]
761 #[doc = "Currently recognized options:"]
762 #[doc = "@ref LILV_OPTION_FILTER_LANG"]
763 #[doc = "@ref LILV_OPTION_DYN_MANIFEST"]
764 pub fn lilv_world_set_option(
765 world: *mut LilvWorld,
766 uri: *const ::std::os::raw::c_char,
767 value: *const LilvNode,
768 );
769}
770extern "C" {
771 #[doc = "Destroy the world, mwahaha."]
772 #[doc = "It is safe to call this function on NULL."]
773 #[doc = "Note that destroying `world` will destroy all the objects it contains"]
774 #[doc = "(e.g. instances of LilvPlugin). Do not destroy the world until you are"]
775 #[doc = "finished with all objects that came from it."]
776 pub fn lilv_world_free(world: *mut LilvWorld);
777}
778extern "C" {
779 #[doc = "Load all installed LV2 bundles on the system."]
780 #[doc = "This is the recommended way for hosts to load LV2 data. It implements the"]
781 #[doc = "established/standard best practice for discovering all LV2 data on the"]
782 #[doc = "system. The environment variable LV2_PATH may be used to control where"]
783 #[doc = "this function will look for bundles."]
784 #[doc = ""]
785 #[doc = "Hosts should use this function rather than explicitly load bundles, except"]
786 #[doc = "in special circumstances (e.g. development utilities, or hosts that ship"]
787 #[doc = "with special plugin bundles which are installed to a known location)."]
788 pub fn lilv_world_load_all(world: *mut LilvWorld);
789}
790extern "C" {
791 #[doc = "Load a specific bundle."]
792 #[doc = "`bundle_uri` must be a fully qualified URI to the bundle directory,"]
793 #[doc = "with the trailing slash, eg. file:///usr/lib/lv2/foo.lv2/"]
794 #[doc = ""]
795 #[doc = "Normal hosts should not need this function (use lilv_world_load_all())."]
796 #[doc = ""]
797 #[doc = "Hosts MUST NOT attach any long-term significance to bundle paths"]
798 #[doc = "(e.g. in save files), since there are no guarantees they will remain"]
799 #[doc = "unchanged between (or even during) program invocations. Plugins (among"]
800 #[doc = "other things) MUST be identified by URIs (not paths) in save files."]
801 pub fn lilv_world_load_bundle(world: *mut LilvWorld, bundle_uri: *const LilvNode);
802}
803extern "C" {
804 #[doc = "Load all specifications from currently loaded bundles."]
805 #[doc = ""]
806 #[doc = "This is for hosts that explicitly load specific bundles, its use is not"]
807 #[doc = "necessary when using lilv_world_load_all(). This function parses the"]
808 #[doc = "specifications and adds them to the model."]
809 pub fn lilv_world_load_specifications(world: *mut LilvWorld);
810}
811extern "C" {
812 #[doc = "Load all plugin classes from currently loaded specifications."]
813 #[doc = ""]
814 #[doc = "Must be called after lilv_world_load_specifications(). This is for hosts"]
815 #[doc = "that explicitly load specific bundles, its use is not necessary when using"]
816 #[doc = "lilv_world_load_all()."]
817 pub fn lilv_world_load_plugin_classes(world: *mut LilvWorld);
818}
819extern "C" {
820 #[doc = "Unload a specific bundle."]
821 #[doc = ""]
822 #[doc = "This unloads statements loaded by lilv_world_load_bundle(). Note that this"]
823 #[doc = "is not necessarily all information loaded from the bundle. If any resources"]
824 #[doc = "have been separately loaded with lilv_world_load_resource(), they must be"]
825 #[doc = "separately unloaded with lilv_world_unload_resource()."]
826 pub fn lilv_world_unload_bundle(
827 world: *mut LilvWorld,
828 bundle_uri: *const LilvNode,
829 ) -> ::std::os::raw::c_int;
830}
831extern "C" {
832 #[doc = "Load all the data associated with the given `resource`."]
833 #[doc = "@param world The world."]
834 #[doc = "@param resource Must be a subject (i.e. a URI or a blank node)."]
835 #[doc = "@return The number of files parsed, or -1 on error"]
836 #[doc = ""]
837 #[doc = "All accessible data files linked to `resource` with rdfs:seeAlso will be"]
838 #[doc = "loaded into the world model."]
839 pub fn lilv_world_load_resource(
840 world: *mut LilvWorld,
841 resource: *const LilvNode,
842 ) -> ::std::os::raw::c_int;
843}
844extern "C" {
845 #[doc = "Unload all the data associated with the given `resource`."]
846 #[doc = "@param world The world."]
847 #[doc = "@param resource Must be a subject (i.e. a URI or a blank node)."]
848 #[doc = ""]
849 #[doc = "This unloads all data loaded by a previous call to"]
850 #[doc = "lilv_world_load_resource() with the given `resource`."]
851 pub fn lilv_world_unload_resource(
852 world: *mut LilvWorld,
853 resource: *const LilvNode,
854 ) -> ::std::os::raw::c_int;
855}
856extern "C" {
857 #[doc = "Get the parent of all other plugin classes, lv2:Plugin."]
858 pub fn lilv_world_get_plugin_class(world: *const LilvWorld) -> *const LilvPluginClass;
859}
860extern "C" {
861 #[doc = "Return a list of all found plugin classes."]
862 #[doc = "Returned list is owned by world and must not be freed by the caller."]
863 pub fn lilv_world_get_plugin_classes(world: *const LilvWorld) -> *const LilvPluginClasses;
864}
865extern "C" {
866 #[doc = "Return a list of all found plugins."]
867 #[doc = "The returned list contains just enough references to query"]
868 #[doc = "or instantiate plugins. The data for a particular plugin will not be"]
869 #[doc = "loaded into memory until a call to an lilv_plugin_* function results in"]
870 #[doc = "a query (at which time the data is cached with the LilvPlugin so future"]
871 #[doc = "queries are very fast)."]
872 #[doc = ""]
873 #[doc = "The returned list and the plugins it contains are owned by `world`"]
874 #[doc = "and must not be freed by caller."]
875 pub fn lilv_world_get_all_plugins(world: *const LilvWorld) -> *const LilvPlugins;
876}
877extern "C" {
878 #[doc = "Find nodes matching a triple pattern."]
879 #[doc = "Either `subject` or `object` may be NULL (i.e. a wildcard), but not both."]
880 #[doc = "@return All matches for the wildcard field, or NULL."]
881 pub fn lilv_world_find_nodes(
882 world: *mut LilvWorld,
883 subject: *const LilvNode,
884 predicate: *const LilvNode,
885 object: *const LilvNode,
886 ) -> *mut LilvNodes;
887}
888extern "C" {
889 #[doc = "Find a single node that matches a pattern."]
890 #[doc = "Exactly one of `subject`, `predicate`, `object` must be NULL."]
891 #[doc = "This function is equivalent to"]
892 #[doc = "lilv_nodes_get_first(lilv_world_find_nodes(...)) but simplifies the common"]
893 #[doc = "case of only wanting a single value."]
894 #[doc = "@return the first matching node, or NULL if no matches are found."]
895 pub fn lilv_world_get(
896 world: *mut LilvWorld,
897 subject: *const LilvNode,
898 predicate: *const LilvNode,
899 object: *const LilvNode,
900 ) -> *mut LilvNode;
901}
902extern "C" {
903 #[doc = "Return true iff a statement matching a certain pattern exists."]
904 #[doc = ""]
905 #[doc = "This is useful for checking if particular statement exists without having to"]
906 #[doc = "bother with collections and memory management."]
907 #[doc = ""]
908 #[doc = "@param world The world."]
909 #[doc = "@param subject Subject of statement, or NULL for anything."]
910 #[doc = "@param predicate Predicate (key) of statement, or NULL for anything."]
911 #[doc = "@param object Object (value) of statement, or NULL for anything."]
912 pub fn lilv_world_ask(
913 world: *mut LilvWorld,
914 subject: *const LilvNode,
915 predicate: *const LilvNode,
916 object: *const LilvNode,
917 ) -> bool;
918}
919extern "C" {
920 #[doc = "Get an LV2 symbol for some subject."]
921 #[doc = ""]
922 #[doc = "This will return the lv2:symbol property of the subject if it is given"]
923 #[doc = "explicitly, and otherwise will attempt to derive a symbol from the URI."]
924 #[doc = "@return A string node that is a valid LV2 symbol, or NULL on error."]
925 pub fn lilv_world_get_symbol(world: *mut LilvWorld, subject: *const LilvNode) -> *mut LilvNode;
926}
927extern "C" {
928 #[doc = "Check if `plugin` is valid."]
929 #[doc = "This is not a rigorous validator, but can be used to reject some malformed"]
930 #[doc = "plugins that could cause bugs (e.g. plugins with missing required fields)."]
931 #[doc = ""]
932 #[doc = "Note that normal hosts do NOT need to use this - lilv does not"]
933 #[doc = "load invalid plugins into plugin lists. This is included for plugin"]
934 #[doc = "testing utilities, etc."]
935 #[doc = "@return true iff `plugin` is valid."]
936 pub fn lilv_plugin_verify(plugin: *const LilvPlugin) -> bool;
937}
938extern "C" {
939 #[doc = "Get the URI of `plugin`."]
940 #[doc = "Any serialization that refers to plugins should refer to them by this."]
941 #[doc = "Hosts SHOULD NOT save any filesystem paths, plugin indexes, etc. in saved"]
942 #[doc = "files; save only the URI."]
943 #[doc = ""]
944 #[doc = "The URI is a globally unique identifier for one specific plugin. Two"]
945 #[doc = "plugins with the same URI are compatible in port signature, and should"]
946 #[doc = "be guaranteed to work in a compatible and consistent way. If a plugin"]
947 #[doc = "is upgraded in an incompatible way (eg if it has different ports), it"]
948 #[doc = "MUST have a different URI than it's predecessor."]
949 #[doc = ""]
950 #[doc = "@return A shared URI value which must not be modified or freed."]
951 pub fn lilv_plugin_get_uri(plugin: *const LilvPlugin) -> *const LilvNode;
952}
953extern "C" {
954 #[doc = "Get the (resolvable) URI of the plugin's \"main\" bundle."]
955 #[doc = "This returns the URI of the bundle where the plugin itself was found. Note"]
956 #[doc = "that the data for a plugin may be spread over many bundles, that is,"]
957 #[doc = "lilv_plugin_get_data_uris() may return URIs which are not within this"]
958 #[doc = "bundle."]
959 #[doc = ""]
960 #[doc = "Typical hosts should not need to use this function."]
961 #[doc = "Note this always returns a fully qualified URI. If you want a local"]
962 #[doc = "filesystem path, use lilv_file_uri_parse()."]
963 #[doc = "@return a shared string which must not be modified or freed."]
964 pub fn lilv_plugin_get_bundle_uri(plugin: *const LilvPlugin) -> *const LilvNode;
965}
966extern "C" {
967 #[doc = "Get the (resolvable) URIs of the RDF data files that define a plugin."]
968 #[doc = "Typical hosts should not need to use this function."]
969 #[doc = "Note this always returns fully qualified URIs. If you want local"]
970 #[doc = "filesystem paths, use lilv_file_uri_parse()."]
971 #[doc = "@return a list of complete URLs eg. \"file:///foo/ABundle.lv2/aplug.ttl\","]
972 #[doc = "which is shared and must not be modified or freed."]
973 pub fn lilv_plugin_get_data_uris(plugin: *const LilvPlugin) -> *const LilvNodes;
974}
975extern "C" {
976 #[doc = "Get the (resolvable) URI of the shared library for `plugin`."]
977 #[doc = "Note this always returns a fully qualified URI. If you want a local"]
978 #[doc = "filesystem path, use lilv_file_uri_parse()."]
979 #[doc = "@return a shared string which must not be modified or freed."]
980 pub fn lilv_plugin_get_library_uri(plugin: *const LilvPlugin) -> *const LilvNode;
981}
982extern "C" {
983 #[doc = "Get the name of `plugin`."]
984 #[doc = "This returns the name (doap:name) of the plugin. The name may be"]
985 #[doc = "translated according to the current locale, this value MUST NOT be used"]
986 #[doc = "as a plugin identifier (use the URI for that)."]
987 #[doc = "Returned value must be freed by the caller."]
988 pub fn lilv_plugin_get_name(plugin: *const LilvPlugin) -> *mut LilvNode;
989}
990extern "C" {
991 #[doc = "Get the class this plugin belongs to (e.g. Filters)."]
992 pub fn lilv_plugin_get_class(plugin: *const LilvPlugin) -> *const LilvPluginClass;
993}
994extern "C" {
995 #[doc = "Get a value associated with the plugin in a plugin's data files."]
996 #[doc = "`predicate` must be either a URI or a QName."]
997 #[doc = ""]
998 #[doc = "Returns the ?object of all triples found of the form:"]
999 #[doc = ""]
1000 #[doc = "<code><plugin-uri> predicate ?object</code>"]
1001 #[doc = ""]
1002 #[doc = "May return NULL if the property was not found, or if object(s) is not"]
1003 #[doc = "sensibly represented as a LilvNodes (e.g. blank nodes)."]
1004 #[doc = "Return value must be freed by caller with lilv_nodes_free()."]
1005 pub fn lilv_plugin_get_value(
1006 plugin: *const LilvPlugin,
1007 predicate: *const LilvNode,
1008 ) -> *mut LilvNodes;
1009}
1010extern "C" {
1011 #[doc = "Return whether a feature is supported by a plugin."]
1012 #[doc = "This will return true if the feature is an optional or required feature"]
1013 #[doc = "of the plugin."]
1014 pub fn lilv_plugin_has_feature(plugin: *const LilvPlugin, feature: *const LilvNode) -> bool;
1015}
1016extern "C" {
1017 #[doc = "Get the LV2 Features supported (required or optionally) by a plugin."]
1018 #[doc = "A feature is \"supported\" by a plugin if it is required OR optional."]
1019 #[doc = ""]
1020 #[doc = "Since required features have special rules the host must obey, this function"]
1021 #[doc = "probably shouldn't be used by normal hosts. Using lilv_plugin_get_optional_features()"]
1022 #[doc = "and lilv_plugin_get_required_features() separately is best in most cases."]
1023 #[doc = ""]
1024 #[doc = "Returned value must be freed by caller with lilv_nodes_free()."]
1025 pub fn lilv_plugin_get_supported_features(plugin: *const LilvPlugin) -> *mut LilvNodes;
1026}
1027extern "C" {
1028 #[doc = "Get the LV2 Features required by a plugin."]
1029 #[doc = "If a feature is required by a plugin, hosts MUST NOT use the plugin if they do not"]
1030 #[doc = "understand (or are unable to support) that feature."]
1031 #[doc = ""]
1032 #[doc = "All values returned here MUST be passed to the plugin's instantiate method"]
1033 #[doc = "(along with data, if necessary, as defined by the feature specification)"]
1034 #[doc = "or plugin instantiation will fail."]
1035 #[doc = ""]
1036 #[doc = "Return value must be freed by caller with lilv_nodes_free()."]
1037 pub fn lilv_plugin_get_required_features(plugin: *const LilvPlugin) -> *mut LilvNodes;
1038}
1039extern "C" {
1040 #[doc = "Get the LV2 Features optionally supported by a plugin."]
1041 #[doc = "Hosts MAY ignore optional plugin features for whatever reasons. Plugins"]
1042 #[doc = "MUST operate (at least somewhat) if they are instantiated without being"]
1043 #[doc = "passed optional features."]
1044 #[doc = ""]
1045 #[doc = "Return value must be freed by caller with lilv_nodes_free()."]
1046 pub fn lilv_plugin_get_optional_features(plugin: *const LilvPlugin) -> *mut LilvNodes;
1047}
1048extern "C" {
1049 #[doc = "Return whether or not a plugin provides a specific extension data."]
1050 pub fn lilv_plugin_has_extension_data(plugin: *const LilvPlugin, uri: *const LilvNode) -> bool;
1051}
1052extern "C" {
1053 #[doc = "Get a sequence of all extension data provided by a plugin."]
1054 #[doc = "This can be used to find which URIs lilv_instance_get_extension_data()"]
1055 #[doc = "will return a value for without instantiating the plugin."]
1056 pub fn lilv_plugin_get_extension_data(plugin: *const LilvPlugin) -> *mut LilvNodes;
1057}
1058extern "C" {
1059 #[doc = "Get the number of ports on this plugin."]
1060 pub fn lilv_plugin_get_num_ports(plugin: *const LilvPlugin) -> u32;
1061}
1062extern "C" {
1063 #[doc = "Get the port ranges (minimum, maximum and default values) for all ports."]
1064 #[doc = "`min_values`, `max_values` and `def_values` must either point to an array"]
1065 #[doc = "of N floats, where N is the value returned by lilv_plugin_get_num_ports()"]
1066 #[doc = "for this plugin, or NULL. The elements of the array will be set to the"]
1067 #[doc = "the minimum, maximum and default values of the ports on this plugin,"]
1068 #[doc = "with array index corresponding to port index. If a port doesn't have a"]
1069 #[doc = "minimum, maximum or default value, or the port's type is not float, the"]
1070 #[doc = "corresponding array element will be set to NAN."]
1071 #[doc = ""]
1072 #[doc = "This is a convenience method for the common case of getting the range of"]
1073 #[doc = "all float ports on a plugin, and may be significantly faster than"]
1074 #[doc = "repeated calls to lilv_port_get_range()."]
1075 pub fn lilv_plugin_get_port_ranges_float(
1076 plugin: *const LilvPlugin,
1077 min_values: *mut f32,
1078 max_values: *mut f32,
1079 def_values: *mut f32,
1080 );
1081}
1082extern "C" {
1083 #[doc = "Get the number of ports on this plugin that are members of some class(es)."]
1084 #[doc = "Note that this is a varargs function so ports fitting any type 'profile'"]
1085 #[doc = "desired can be found quickly. REMEMBER TO TERMINATE THE PARAMETER LIST"]
1086 #[doc = "OF THIS FUNCTION WITH NULL OR VERY NASTY THINGS WILL HAPPEN."]
1087 pub fn lilv_plugin_get_num_ports_of_class(
1088 plugin: *const LilvPlugin,
1089 class_1: *const LilvNode,
1090 ...
1091 ) -> u32;
1092}
1093extern "C" {
1094 #[doc = "Variant of lilv_plugin_get_num_ports_of_class() that takes a va_list."]
1095 #[doc = ""]
1096 #[doc = "This function calls va_arg() on `args` but does not call va_end()."]
1097 pub fn lilv_plugin_get_num_ports_of_class_va(
1098 plugin: *const LilvPlugin,
1099 class_1: *const LilvNode,
1100 args: *mut __va_list_tag,
1101 ) -> u32;
1102}
1103extern "C" {
1104 #[doc = "Return whether or not the plugin introduces (and reports) latency."]
1105 #[doc = "The index of the latency port can be found with"]
1106 #[doc = "lilv_plugin_get_latency_port() ONLY if this function returns true."]
1107 pub fn lilv_plugin_has_latency(plugin: *const LilvPlugin) -> bool;
1108}
1109extern "C" {
1110 #[doc = "Return the index of the plugin's latency port."]
1111 #[doc = "It is a fatal error to call this on a plugin without checking if the port"]
1112 #[doc = "exists by first calling lilv_plugin_has_latency()."]
1113 #[doc = ""]
1114 #[doc = "Any plugin that introduces unwanted latency that should be compensated for"]
1115 #[doc = "(by hosts with the ability/need) MUST provide this port, which is a control"]
1116 #[doc = "rate output port that reports the latency for each cycle in frames."]
1117 pub fn lilv_plugin_get_latency_port_index(plugin: *const LilvPlugin) -> u32;
1118}
1119extern "C" {
1120 #[doc = "Get a port on `plugin` by `index`."]
1121 pub fn lilv_plugin_get_port_by_index(plugin: *const LilvPlugin, index: u32) -> *const LilvPort;
1122}
1123extern "C" {
1124 #[doc = "Get a port on `plugin` by `symbol`."]
1125 #[doc = "Note this function is slower than lilv_plugin_get_port_by_index(),"]
1126 #[doc = "especially on plugins with a very large number of ports."]
1127 pub fn lilv_plugin_get_port_by_symbol(
1128 plugin: *const LilvPlugin,
1129 symbol: *const LilvNode,
1130 ) -> *const LilvPort;
1131}
1132extern "C" {
1133 #[doc = "Get a port on `plugin` by its lv2:designation."]
1134 #[doc = ""]
1135 #[doc = "The designation of a port describes the meaning, assignment, allocation or"]
1136 #[doc = "role of the port, e.g. \"left channel\" or \"gain\". If found, the port with"]
1137 #[doc = "matching `port_class` and `designation` is be returned, otherwise NULL is"]
1138 #[doc = "returned. The `port_class` can be used to distinguish the input and output"]
1139 #[doc = "ports for a particular designation. If `port_class` is NULL, any port with"]
1140 #[doc = "the given designation will be returned."]
1141 pub fn lilv_plugin_get_port_by_designation(
1142 plugin: *const LilvPlugin,
1143 port_class: *const LilvNode,
1144 designation: *const LilvNode,
1145 ) -> *const LilvPort;
1146}
1147extern "C" {
1148 #[doc = "Get the project the plugin is a part of."]
1149 #[doc = ""]
1150 #[doc = "More information about the project can be read via lilv_world_find_nodes(),"]
1151 #[doc = "typically using properties from DOAP (e.g. doap:name)."]
1152 pub fn lilv_plugin_get_project(plugin: *const LilvPlugin) -> *mut LilvNode;
1153}
1154extern "C" {
1155 #[doc = "Get the full name of the plugin's author."]
1156 #[doc = "Returns NULL if author name is not present."]
1157 #[doc = "Returned value must be freed by caller."]
1158 pub fn lilv_plugin_get_author_name(plugin: *const LilvPlugin) -> *mut LilvNode;
1159}
1160extern "C" {
1161 #[doc = "Get the email address of the plugin's author."]
1162 #[doc = "Returns NULL if author email address is not present."]
1163 #[doc = "Returned value must be freed by caller."]
1164 pub fn lilv_plugin_get_author_email(plugin: *const LilvPlugin) -> *mut LilvNode;
1165}
1166extern "C" {
1167 #[doc = "Get the address of the plugin author's home page."]
1168 #[doc = "Returns NULL if author homepage is not present."]
1169 #[doc = "Returned value must be freed by caller."]
1170 pub fn lilv_plugin_get_author_homepage(plugin: *const LilvPlugin) -> *mut LilvNode;
1171}
1172extern "C" {
1173 #[doc = "Return true iff `plugin` has been replaced by another plugin."]
1174 #[doc = ""]
1175 #[doc = "The plugin will still be usable, but hosts should hide them from their"]
1176 #[doc = "user interfaces to prevent users from using deprecated plugins."]
1177 pub fn lilv_plugin_is_replaced(plugin: *const LilvPlugin) -> bool;
1178}
1179extern "C" {
1180 #[doc = "Write the Turtle description of `plugin` to `plugin_file`."]
1181 #[doc = ""]
1182 #[doc = "This function is particularly useful for porting plugins in conjunction with"]
1183 #[doc = "an LV2 bridge such as NASPRO."]
1184 pub fn lilv_plugin_write_description(
1185 world: *mut LilvWorld,
1186 plugin: *const LilvPlugin,
1187 base_uri: *const LilvNode,
1188 plugin_file: *mut FILE,
1189 );
1190}
1191extern "C" {
1192 #[doc = "Write a manifest entry for `plugin` to `manifest_file`."]
1193 #[doc = ""]
1194 #[doc = "This function is intended for use with lilv_plugin_write_description() to"]
1195 #[doc = "write a complete description of a plugin to a bundle."]
1196 pub fn lilv_plugin_write_manifest_entry(
1197 world: *mut LilvWorld,
1198 plugin: *const LilvPlugin,
1199 base_uri: *const LilvNode,
1200 manifest_file: *mut FILE,
1201 plugin_file_path: *const ::std::os::raw::c_char,
1202 );
1203}
1204extern "C" {
1205 #[doc = "Get the resources related to `plugin` with lv2:appliesTo."]
1206 #[doc = ""]
1207 #[doc = "Some plugin-related resources are not linked directly to the plugin with"]
1208 #[doc = "rdfs:seeAlso and thus will not be automatically loaded along with the plugin"]
1209 #[doc = "data (usually for performance reasons). All such resources of the given @c"]
1210 #[doc = "type related to `plugin` can be accessed with this function."]
1211 #[doc = ""]
1212 #[doc = "If `type` is NULL, all such resources will be returned, regardless of type."]
1213 #[doc = ""]
1214 #[doc = "To actually load the data for each returned resource, use"]
1215 #[doc = "lilv_world_load_resource()."]
1216 pub fn lilv_plugin_get_related(
1217 plugin: *const LilvPlugin,
1218 type_: *const LilvNode,
1219 ) -> *mut LilvNodes;
1220}
1221extern "C" {
1222 #[doc = "Get the RDF node of `port`."]
1223 #[doc = ""]
1224 #[doc = "Ports nodes may be may be URIs or blank nodes."]
1225 #[doc = ""]
1226 #[doc = "@return A shared node which must not be modified or freed."]
1227 pub fn lilv_port_get_node(plugin: *const LilvPlugin, port: *const LilvPort) -> *const LilvNode;
1228}
1229extern "C" {
1230 #[doc = "Port analog of lilv_plugin_get_value()."]
1231 pub fn lilv_port_get_value(
1232 plugin: *const LilvPlugin,
1233 port: *const LilvPort,
1234 predicate: *const LilvNode,
1235 ) -> *mut LilvNodes;
1236}
1237extern "C" {
1238 #[doc = "Get a single property value of a port."]
1239 #[doc = ""]
1240 #[doc = "This is equivalent to lilv_nodes_get_first(lilv_port_get_value(...)) but is"]
1241 #[doc = "simpler to use in the common case of only caring about one value. The"]
1242 #[doc = "caller is responsible for freeing the returned node."]
1243 pub fn lilv_port_get(
1244 plugin: *const LilvPlugin,
1245 port: *const LilvPort,
1246 predicate: *const LilvNode,
1247 ) -> *mut LilvNode;
1248}
1249extern "C" {
1250 #[doc = "Return the LV2 port properties of a port."]
1251 pub fn lilv_port_get_properties(
1252 plugin: *const LilvPlugin,
1253 port: *const LilvPort,
1254 ) -> *mut LilvNodes;
1255}
1256extern "C" {
1257 #[doc = "Return whether a port has a certain property."]
1258 pub fn lilv_port_has_property(
1259 plugin: *const LilvPlugin,
1260 port: *const LilvPort,
1261 property: *const LilvNode,
1262 ) -> bool;
1263}
1264extern "C" {
1265 #[doc = "Return whether a port supports a certain event type."]
1266 #[doc = ""]
1267 #[doc = "More precisely, this returns true iff the port has an atom:supports or an"]
1268 #[doc = "ev:supportsEvent property with `event_type` as the value."]
1269 pub fn lilv_port_supports_event(
1270 plugin: *const LilvPlugin,
1271 port: *const LilvPort,
1272 event_type: *const LilvNode,
1273 ) -> bool;
1274}
1275extern "C" {
1276 #[doc = "Get the index of a port."]
1277 #[doc = "The index is only valid for the life of the plugin and may change between"]
1278 #[doc = "versions. For a stable identifier, use the symbol."]
1279 pub fn lilv_port_get_index(plugin: *const LilvPlugin, port: *const LilvPort) -> u32;
1280}
1281extern "C" {
1282 #[doc = "Get the symbol of a port."]
1283 #[doc = "The 'symbol' is a short string, a valid C identifier."]
1284 #[doc = "Returned value is owned by `port` and must not be freed."]
1285 pub fn lilv_port_get_symbol(
1286 plugin: *const LilvPlugin,
1287 port: *const LilvPort,
1288 ) -> *const LilvNode;
1289}
1290extern "C" {
1291 #[doc = "Get the name of a port."]
1292 #[doc = "This is guaranteed to return the untranslated name (the doap:name in the"]
1293 #[doc = "data file without a language tag). Returned value must be freed by"]
1294 #[doc = "the caller."]
1295 pub fn lilv_port_get_name(plugin: *const LilvPlugin, port: *const LilvPort) -> *mut LilvNode;
1296}
1297extern "C" {
1298 #[doc = "Get all the classes of a port."]
1299 #[doc = "This can be used to determine if a port is an input, output, audio,"]
1300 #[doc = "control, midi, etc, etc, though it's simpler to use lilv_port_is_a()."]
1301 #[doc = "The returned list does not include lv2:Port, which is implied."]
1302 #[doc = "Returned value is shared and must not be destroyed by caller."]
1303 pub fn lilv_port_get_classes(
1304 plugin: *const LilvPlugin,
1305 port: *const LilvPort,
1306 ) -> *const LilvNodes;
1307}
1308extern "C" {
1309 #[doc = "Determine if a port is of a given class (input, output, audio, etc)."]
1310 #[doc = "For convenience/performance/extensibility reasons, hosts are expected to"]
1311 #[doc = "create a LilvNode for each port class they \"care about\". Well-known type"]
1312 #[doc = "URI strings are defined (e.g. LILV_URI_INPUT_PORT) for convenience, but"]
1313 #[doc = "this function is designed so that Lilv is usable with any port types"]
1314 #[doc = "without requiring explicit support in Lilv."]
1315 pub fn lilv_port_is_a(
1316 plugin: *const LilvPlugin,
1317 port: *const LilvPort,
1318 port_class: *const LilvNode,
1319 ) -> bool;
1320}
1321extern "C" {
1322 #[doc = "Get the default, minimum, and maximum values of a port."]
1323 #[doc = ""]
1324 #[doc = "`def`, `min`, and `max` are outputs, pass pointers to uninitialized"]
1325 #[doc = "LilvNode* variables. These will be set to point at new values (which must"]
1326 #[doc = "be freed by the caller using lilv_node_free()), or NULL if the value does"]
1327 #[doc = "not exist."]
1328 pub fn lilv_port_get_range(
1329 plugin: *const LilvPlugin,
1330 port: *const LilvPort,
1331 def: *mut *mut LilvNode,
1332 min: *mut *mut LilvNode,
1333 max: *mut *mut LilvNode,
1334 );
1335}
1336extern "C" {
1337 #[doc = "Get the scale points (enumeration values) of a port."]
1338 #[doc = "This returns a collection of 'interesting' named values of a port"]
1339 #[doc = "(e.g. appropriate entries for a UI selector associated with this port)."]
1340 #[doc = "Returned value may be NULL if `port` has no scale points, otherwise it"]
1341 #[doc = "must be freed by caller with lilv_scale_points_free()."]
1342 pub fn lilv_port_get_scale_points(
1343 plugin: *const LilvPlugin,
1344 port: *const LilvPort,
1345 ) -> *mut LilvScalePoints;
1346}
1347extern "C" {
1348 #[doc = "Load a state snapshot from the world RDF model."]
1349 #[doc = "This function can be used to load the default state of a plugin by passing"]
1350 #[doc = "the plugin URI as the `subject` parameter."]
1351 #[doc = "@param world The world."]
1352 #[doc = "@param map URID mapper."]
1353 #[doc = "@param node The subject of the state description (e.g. a preset URI)."]
1354 #[doc = "@return A new LilvState which must be freed with lilv_state_free(), or NULL."]
1355 pub fn lilv_state_new_from_world(
1356 world: *mut LilvWorld,
1357 map: *mut LV2_URID_Map,
1358 node: *const LilvNode,
1359 ) -> *mut LilvState;
1360}
1361extern "C" {
1362 #[doc = "Load a state snapshot from a file."]
1363 #[doc = "@param world The world."]
1364 #[doc = "@param map URID mapper."]
1365 #[doc = "@param subject The subject of the state description (e.g. a preset URI)."]
1366 #[doc = "@param path The path of the file containing the state description."]
1367 #[doc = "@return A new LilvState which must be freed with lilv_state_free()."]
1368 #[doc = ""]
1369 #[doc = "If `subject` is NULL, it is taken to be the URI of the file (i.e."]
1370 #[doc = "\"<>\" in Turtle)."]
1371 #[doc = ""]
1372 #[doc = "This function parses the file separately to create the state, it does not"]
1373 #[doc = "parse the file into the world model, i.e. the returned state is the only"]
1374 #[doc = "new memory consumed once this function returns."]
1375 pub fn lilv_state_new_from_file(
1376 world: *mut LilvWorld,
1377 map: *mut LV2_URID_Map,
1378 subject: *const LilvNode,
1379 path: *const ::std::os::raw::c_char,
1380 ) -> *mut LilvState;
1381}
1382extern "C" {
1383 #[doc = "Load a state snapshot from a string made by lilv_state_to_string()."]
1384 pub fn lilv_state_new_from_string(
1385 world: *mut LilvWorld,
1386 map: *mut LV2_URID_Map,
1387 str: *const ::std::os::raw::c_char,
1388 ) -> *mut LilvState;
1389}
1390#[doc = "Function to get a port value."]
1391#[doc = "@param port_symbol The symbol of the port."]
1392#[doc = "@param user_data The user_data passed to lilv_state_new_from_instance()."]
1393#[doc = "@param size (Output) The size of the returned value."]
1394#[doc = "@param type (Output) The URID of the type of the returned value."]
1395#[doc = "@return A pointer to the port value."]
1396#[doc = ""]
1397#[doc = "This function MUST set `size` and `type` appropriately."]
1398pub type LilvGetPortValueFunc = ::std::option::Option<
1399 unsafe extern "C" fn(
1400 port_symbol: *const ::std::os::raw::c_char,
1401 user_data: *mut ::std::os::raw::c_void,
1402 size: *mut u32,
1403 type_: *mut u32,
1404 ) -> *const ::std::os::raw::c_void,
1405>;
1406extern "C" {
1407 #[doc = "Create a new state snapshot from a plugin instance."]
1408 #[doc = ""]
1409 #[doc = "@param plugin The plugin this state applies to."]
1410 #[doc = ""]
1411 #[doc = "@param instance An instance of `plugin`."]
1412 #[doc = ""]
1413 #[doc = "@param map The map to use for mapping URIs in state."]
1414 #[doc = ""]
1415 #[doc = "@param file_dir Directory of files created by the plugin earlier (or NULL)."]
1416 #[doc = "This is for hosts that support file creation at any time with state"]
1417 #[doc = "state:makePath. These files will be copied as necessary to `copy_dir` and"]
1418 #[doc = "not be referred to directly in state (a temporary directory is appropriate)."]
1419 #[doc = ""]
1420 #[doc = "@param copy_dir Directory of copies of files in `file_dir` (or NULL). This"]
1421 #[doc = "directory will have the same structure as `file_dir` but with possibly"]
1422 #[doc = "modified file names to distinguish different revisions. If you only care"]
1423 #[doc = "about saving one state snapshot, it can be the same as `save_dir`. Plugin"]
1424 #[doc = "state will refer to files in this directory."]
1425 #[doc = ""]
1426 #[doc = "@param save_dir Directory of files created by plugin during save (or NULL)."]
1427 #[doc = "If the state will be saved, this should be the bundle directory later passed"]
1428 #[doc = "to lilv_state_save()."]
1429 #[doc = ""]
1430 #[doc = "@param get_value Function to get port values (or NULL). If NULL, the"]
1431 #[doc = "returned state will not represent port values. This should only be NULL in"]
1432 #[doc = "hosts that save and restore port values via some other mechanism."]
1433 #[doc = ""]
1434 #[doc = "@param user_data User data to pass to `get_value`."]
1435 #[doc = ""]
1436 #[doc = "@param link_dir Directory of links to external files (or NULL). A link will"]
1437 #[doc = "be made in this directory to any external files referred to in plugin state."]
1438 #[doc = "In turn, links will be created in the save directory to these links (e.g."]
1439 #[doc = "save_dir/file => link_dir/file => /foo/bar/file). This allows many state"]
1440 #[doc = "snapshots to share a single link to an external file, so archival"]
1441 #[doc = "(e.g. with tar -h) will not create several copies of the file. If this is"]
1442 #[doc = "not required, it can be the same as save_dir."]
1443 #[doc = ""]
1444 #[doc = "@param flags Bitwise OR of LV2_State_Flags values."]
1445 #[doc = ""]
1446 #[doc = "@param features Features to pass LV2_State_Interface.save()."]
1447 #[doc = ""]
1448 #[doc = "@return A new LilvState which must be freed with lilv_state_free()."]
1449 #[doc = ""]
1450 #[doc = "This function may be called simultaneously with any instance function"]
1451 #[doc = "(except discovery functions) unless the threading class of that function"]
1452 #[doc = "explicitly disallows this."]
1453 #[doc = ""]
1454 #[doc = "To support advanced file functionality, there are several directory"]
1455 #[doc = "parameters. Simple hosts that only wish to save a single plugins state once"]
1456 #[doc = "may simply use the same directory for all of them (or pass NULL to not"]
1457 #[doc = "support files at all). The multiple parameters are necessary to support"]
1458 #[doc = "saving an instances state many times while avoiding any duplication of data."]
1459 #[doc = ""]
1460 #[doc = "If supported (via state:makePath passed to LV2_Descriptor::instantiate()),"]
1461 #[doc = "`file_dir` should be the directory where any files created by the plugin"]
1462 #[doc = "(not during save time, e.g. during instantiation) are stored. These files"]
1463 #[doc = "will be copied to preserve their state at this time.plugin-created files are stored."]
1464 #[doc = "Lilv will assume any files within this directory (recursively) are created"]
1465 #[doc = "by the plugin and all other files are immutable. Note that this function"]
1466 #[doc = "does not save the state, use lilv_state_save() for that."]
1467 #[doc = ""]
1468 #[doc = "See <a href=\"http://lv2plug.in/ns/ext/state/state.h\">state.h</a> from the"]
1469 #[doc = "LV2 State extension for details on the `flags` and `features` parameters."]
1470 pub fn lilv_state_new_from_instance(
1471 plugin: *const LilvPlugin,
1472 instance: *mut LilvInstance,
1473 map: *mut LV2_URID_Map,
1474 file_dir: *const ::std::os::raw::c_char,
1475 copy_dir: *const ::std::os::raw::c_char,
1476 link_dir: *const ::std::os::raw::c_char,
1477 save_dir: *const ::std::os::raw::c_char,
1478 get_value: LilvGetPortValueFunc,
1479 user_data: *mut ::std::os::raw::c_void,
1480 flags: u32,
1481 features: *const *const LV2_Feature,
1482 ) -> *mut LilvState;
1483}
1484extern "C" {
1485 #[doc = "Free `state`."]
1486 pub fn lilv_state_free(state: *mut LilvState);
1487}
1488extern "C" {
1489 #[doc = "Return true iff `a` is equivalent to `b`."]
1490 pub fn lilv_state_equals(a: *const LilvState, b: *const LilvState) -> bool;
1491}
1492extern "C" {
1493 #[doc = "Return the number of properties in `state`."]
1494 pub fn lilv_state_get_num_properties(state: *const LilvState) -> ::std::os::raw::c_uint;
1495}
1496extern "C" {
1497 #[doc = "Get the URI of the plugin `state` applies to."]
1498 pub fn lilv_state_get_plugin_uri(state: *const LilvState) -> *const LilvNode;
1499}
1500extern "C" {
1501 #[doc = "Get the URI of `state`."]
1502 #[doc = ""]
1503 #[doc = "This may return NULL if the state has not been saved and has no URI."]
1504 pub fn lilv_state_get_uri(state: *const LilvState) -> *const LilvNode;
1505}
1506extern "C" {
1507 #[doc = "Get the label of `state`."]
1508 pub fn lilv_state_get_label(state: *const LilvState) -> *const ::std::os::raw::c_char;
1509}
1510extern "C" {
1511 #[doc = "Set the label of `state`."]
1512 pub fn lilv_state_set_label(state: *mut LilvState, label: *const ::std::os::raw::c_char);
1513}
1514extern "C" {
1515 #[doc = "Set a metadata property on `state`."]
1516 #[doc = "@param state The state to set the metadata for."]
1517 #[doc = "@param key The key to store `value` under (URID)."]
1518 #[doc = "@param value Pointer to the value to be stored."]
1519 #[doc = "@param size The size of `value` in bytes."]
1520 #[doc = "@param type The type of `value` (URID)."]
1521 #[doc = "@param flags LV2_State_Flags for `value`."]
1522 #[doc = "@return 0 on success."]
1523 #[doc = ""]
1524 #[doc = "This is a generic version of lilv_state_set_label(), which sets metadata"]
1525 #[doc = "properties visible to hosts, but not plugins. This allows storing useful"]
1526 #[doc = "information such as comments or preset banks."]
1527 pub fn lilv_state_set_metadata(
1528 state: *mut LilvState,
1529 key: u32,
1530 value: *const ::std::os::raw::c_void,
1531 size: usize,
1532 type_: u32,
1533 flags: u32,
1534 ) -> ::std::os::raw::c_int;
1535}
1536#[doc = "Function to set a port value."]
1537#[doc = "@param port_symbol The symbol of the port."]
1538#[doc = "@param user_data The user_data passed to lilv_state_restore()."]
1539#[doc = "@param size The size of `value`."]
1540#[doc = "@param type The URID of the type of `value`."]
1541#[doc = "@param value A pointer to the port value."]
1542pub type LilvSetPortValueFunc = ::std::option::Option<
1543 unsafe extern "C" fn(
1544 port_symbol: *const ::std::os::raw::c_char,
1545 user_data: *mut ::std::os::raw::c_void,
1546 value: *const ::std::os::raw::c_void,
1547 size: u32,
1548 type_: u32,
1549 ),
1550>;
1551extern "C" {
1552 #[doc = "Enumerate the port values in a state snapshot."]
1553 #[doc = "@param state The state to retrieve port values from."]
1554 #[doc = "@param set_value A function to receive port values."]
1555 #[doc = "@param user_data User data to pass to `set_value`."]
1556 #[doc = ""]
1557 #[doc = "This function is a subset of lilv_state_restore() that only fires the"]
1558 #[doc = "`set_value` callback and does not directly affect a plugin instance. This"]
1559 #[doc = "is useful in hosts that need to retrieve the port values in a state snapshot"]
1560 #[doc = "for special handling."]
1561 pub fn lilv_state_emit_port_values(
1562 state: *const LilvState,
1563 set_value: LilvSetPortValueFunc,
1564 user_data: *mut ::std::os::raw::c_void,
1565 );
1566}
1567extern "C" {
1568 #[doc = "Restore a plugin instance from a state snapshot."]
1569 #[doc = "@param state The state to restore, which must apply to the correct plugin."]
1570 #[doc = "@param instance An instance of the plugin `state` applies to, or NULL."]
1571 #[doc = "@param set_value A function to set a port value (may be NULL)."]
1572 #[doc = "@param user_data User data to pass to `set_value`."]
1573 #[doc = "@param flags Bitwise OR of LV2_State_Flags values."]
1574 #[doc = "@param features Features to pass LV2_State_Interface.restore()."]
1575 #[doc = ""]
1576 #[doc = "This will set all the properties of `instance`, if given, to the values"]
1577 #[doc = "stored in `state`. If `set_value` is provided, it will be called (with the"]
1578 #[doc = "given `user_data`) to restore each port value, otherwise the host must"]
1579 #[doc = "restore the port values itself (using lilv_state_get_port_value()) in order"]
1580 #[doc = "to completely restore `state`."]
1581 #[doc = ""]
1582 #[doc = "If the state has properties and `instance` is given, this function is in"]
1583 #[doc = "the \"instantiation\" threading class, i.e. it MUST NOT be called"]
1584 #[doc = "simultaneously with any function on the same plugin instance. If the state"]
1585 #[doc = "has no properties, only port values are set via `set_value`."]
1586 #[doc = ""]
1587 #[doc = "See <a href=\"http://lv2plug.in/ns/ext/state/state.h\">state.h</a> from the"]
1588 #[doc = "LV2 State extension for details on the `flags` and `features` parameters."]
1589 pub fn lilv_state_restore(
1590 state: *const LilvState,
1591 instance: *mut LilvInstance,
1592 set_value: LilvSetPortValueFunc,
1593 user_data: *mut ::std::os::raw::c_void,
1594 flags: u32,
1595 features: *const *const LV2_Feature,
1596 );
1597}
1598extern "C" {
1599 #[doc = "Save state to a file."]
1600 #[doc = "@param world The world."]
1601 #[doc = "@param map URID mapper."]
1602 #[doc = "@param unmap URID unmapper."]
1603 #[doc = "@param state State to save."]
1604 #[doc = "@param uri URI of state, may be NULL."]
1605 #[doc = "@param dir Path of the bundle directory to save into."]
1606 #[doc = "@param filename Path of the state file relative to `dir`."]
1607 #[doc = ""]
1608 #[doc = "The format of state on disk is compatible with that defined in the LV2"]
1609 #[doc = "preset extension, i.e. this function may be used to save presets which can"]
1610 #[doc = "be loaded by any host."]
1611 #[doc = ""]
1612 #[doc = "If `uri` is NULL, the preset URI will be a file URI, but the bundle"]
1613 #[doc = "can safely be moved (i.e. the state file will use \"<>\" as the subject)."]
1614 pub fn lilv_state_save(
1615 world: *mut LilvWorld,
1616 map: *mut LV2_URID_Map,
1617 unmap: *mut LV2_URID_Unmap,
1618 state: *const LilvState,
1619 uri: *const ::std::os::raw::c_char,
1620 dir: *const ::std::os::raw::c_char,
1621 filename: *const ::std::os::raw::c_char,
1622 ) -> ::std::os::raw::c_int;
1623}
1624extern "C" {
1625 #[doc = "Save state to a string. This function does not use the filesystem."]
1626 #[doc = ""]
1627 #[doc = "@param world The world."]
1628 #[doc = "@param map URID mapper."]
1629 #[doc = "@param unmap URID unmapper."]
1630 #[doc = "@param state The state to serialize."]
1631 #[doc = "@param uri URI for the state description (mandatory)."]
1632 #[doc = "@param base_uri Base URI for serialisation. Unless you know what you are"]
1633 #[doc = "doing, pass NULL for this, otherwise the state may not be restorable via"]
1634 #[doc = "lilv_state_new_from_string()."]
1635 pub fn lilv_state_to_string(
1636 world: *mut LilvWorld,
1637 map: *mut LV2_URID_Map,
1638 unmap: *mut LV2_URID_Unmap,
1639 state: *const LilvState,
1640 uri: *const ::std::os::raw::c_char,
1641 base_uri: *const ::std::os::raw::c_char,
1642 ) -> *mut ::std::os::raw::c_char;
1643}
1644extern "C" {
1645 #[doc = "Unload a state from the world and delete all associated files."]
1646 #[doc = "@param world The world."]
1647 #[doc = "@param state State to remove from the system."]
1648 #[doc = ""]
1649 #[doc = "This function DELETES FILES/DIRECTORIES FROM THE FILESYSTEM! It is intended"]
1650 #[doc = "for removing user-saved presets, but can delete any state the user has"]
1651 #[doc = "permission to delete, including presets shipped with plugins."]
1652 #[doc = ""]
1653 #[doc = "The rdfs:seeAlso file for the state will be removed. The entry in the"]
1654 #[doc = "bundle's manifest.ttl is removed, and if this results in an empty manifest,"]
1655 #[doc = "then the manifest file is removed. If this results in an empty bundle, then"]
1656 #[doc = "the bundle directory is removed as well."]
1657 pub fn lilv_state_delete(
1658 world: *mut LilvWorld,
1659 state: *const LilvState,
1660 ) -> ::std::os::raw::c_int;
1661}
1662extern "C" {
1663 #[doc = "Get the label of this scale point (enumeration value)"]
1664 #[doc = "Returned value is owned by `point` and must not be freed."]
1665 pub fn lilv_scale_point_get_label(point: *const LilvScalePoint) -> *const LilvNode;
1666}
1667extern "C" {
1668 #[doc = "Get the value of this scale point (enumeration value)"]
1669 #[doc = "Returned value is owned by `point` and must not be freed."]
1670 pub fn lilv_scale_point_get_value(point: *const LilvScalePoint) -> *const LilvNode;
1671}
1672extern "C" {
1673 #[doc = "Get the URI of this class' superclass."]
1674 #[doc = "Returned value is owned by `plugin_class` and must not be freed by caller."]
1675 #[doc = "Returned value may be NULL, if class has no parent."]
1676 pub fn lilv_plugin_class_get_parent_uri(
1677 plugin_class: *const LilvPluginClass,
1678 ) -> *const LilvNode;
1679}
1680extern "C" {
1681 #[doc = "Get the URI of this plugin class."]
1682 #[doc = "Returned value is owned by `plugin_class` and must not be freed by caller."]
1683 pub fn lilv_plugin_class_get_uri(plugin_class: *const LilvPluginClass) -> *const LilvNode;
1684}
1685extern "C" {
1686 #[doc = "Get the label of this plugin class, ie \"Oscillators\"."]
1687 #[doc = "Returned value is owned by `plugin_class` and must not be freed by caller."]
1688 pub fn lilv_plugin_class_get_label(plugin_class: *const LilvPluginClass) -> *const LilvNode;
1689}
1690extern "C" {
1691 #[doc = "Get the subclasses of this plugin class."]
1692 #[doc = "Returned value must be freed by caller with lilv_plugin_classes_free()."]
1693 pub fn lilv_plugin_class_get_children(
1694 plugin_class: *const LilvPluginClass,
1695 ) -> *mut LilvPluginClasses;
1696}
1697#[doc = "@cond LILV_DOCUMENT_INSTANCE_IMPL"]
1698#[repr(C)]
1699pub struct LilvInstanceImpl {
1700 pub lv2_descriptor: *const LV2_Descriptor,
1701 pub lv2_handle: LV2_Handle,
1702 pub pimpl: *mut ::std::os::raw::c_void,
1703}
1704#[test]
1705fn bindgen_test_layout_LilvInstanceImpl() {
1706 assert_eq!(
1707 ::std::mem::size_of::<LilvInstanceImpl>(),
1708 24usize,
1709 concat!("Size of: ", stringify!(LilvInstanceImpl))
1710 );
1711 assert_eq!(
1712 ::std::mem::align_of::<LilvInstanceImpl>(),
1713 8usize,
1714 concat!("Alignment of ", stringify!(LilvInstanceImpl))
1715 );
1716 assert_eq!(
1717 unsafe { &(*(::std::ptr::null::<LilvInstanceImpl>())).lv2_descriptor as *const _ as usize },
1718 0usize,
1719 concat!(
1720 "Offset of field: ",
1721 stringify!(LilvInstanceImpl),
1722 "::",
1723 stringify!(lv2_descriptor)
1724 )
1725 );
1726 assert_eq!(
1727 unsafe { &(*(::std::ptr::null::<LilvInstanceImpl>())).lv2_handle as *const _ as usize },
1728 8usize,
1729 concat!(
1730 "Offset of field: ",
1731 stringify!(LilvInstanceImpl),
1732 "::",
1733 stringify!(lv2_handle)
1734 )
1735 );
1736 assert_eq!(
1737 unsafe { &(*(::std::ptr::null::<LilvInstanceImpl>())).pimpl as *const _ as usize },
1738 16usize,
1739 concat!(
1740 "Offset of field: ",
1741 stringify!(LilvInstanceImpl),
1742 "::",
1743 stringify!(pimpl)
1744 )
1745 );
1746}
1747extern "C" {
1748 #[doc = "Instantiate a plugin."]
1749 #[doc = "The returned value is a lightweight handle for an LV2 plugin instance,"]
1750 #[doc = "it does not refer to `plugin`, or any other Lilv state. The caller must"]
1751 #[doc = "eventually free it with lilv_instance_free()."]
1752 #[doc = "`features` is a NULL-terminated array of features the host supports."]
1753 #[doc = "NULL may be passed if the host supports no additional features."]
1754 #[doc = "@return NULL if instantiation failed."]
1755 pub fn lilv_plugin_instantiate(
1756 plugin: *const LilvPlugin,
1757 sample_rate: f64,
1758 features: *const *const LV2_Feature,
1759 ) -> *mut LilvInstance;
1760}
1761extern "C" {
1762 #[doc = "Free a plugin instance."]
1763 #[doc = "It is safe to call this function on NULL."]
1764 #[doc = "`instance` is invalid after this call."]
1765 pub fn lilv_instance_free(instance: *mut LilvInstance);
1766}
1767extern "C" {
1768 #[doc = "Get all UIs for `plugin`."]
1769 #[doc = "Returned value must be freed by caller using lilv_uis_free()."]
1770 pub fn lilv_plugin_get_uis(plugin: *const LilvPlugin) -> *mut LilvUIs;
1771}
1772extern "C" {
1773 #[doc = "Get the URI of a Plugin UI."]
1774 #[doc = "@param ui The Plugin UI"]
1775 #[doc = "@return a shared value which must not be modified or freed."]
1776 pub fn lilv_ui_get_uri(ui: *const LilvUI) -> *const LilvNode;
1777}
1778extern "C" {
1779 #[doc = "Get the types (URIs of RDF classes) of a Plugin UI."]
1780 #[doc = "@param ui The Plugin UI"]
1781 #[doc = "@return a shared value which must not be modified or freed."]
1782 #[doc = ""]
1783 #[doc = "Note that in most cases lilv_ui_is_supported() should be used, which avoids"]
1784 #[doc = "the need to use this function (and type specific logic)."]
1785 pub fn lilv_ui_get_classes(ui: *const LilvUI) -> *const LilvNodes;
1786}
1787extern "C" {
1788 #[doc = "Check whether a plugin UI has a given type."]
1789 #[doc = "@param ui The Plugin UI"]
1790 #[doc = "@param class_uri The URI of the LV2 UI type to check this UI against"]
1791 pub fn lilv_ui_is_a(ui: *const LilvUI, class_uri: *const LilvNode) -> bool;
1792}
1793#[doc = "Function to determine whether a UI type is supported."]
1794#[doc = ""]
1795#[doc = "This is provided by the user and must return non-zero iff using a UI of type"]
1796#[doc = "`ui_type_uri` in a container of type `container_type_uri` is supported."]
1797pub type LilvUISupportedFunc = ::std::option::Option<
1798 unsafe extern "C" fn(
1799 container_type_uri: *const ::std::os::raw::c_char,
1800 ui_type_uri: *const ::std::os::raw::c_char,
1801 ) -> ::std::os::raw::c_uint,
1802>;
1803extern "C" {
1804 #[doc = "Return true iff a Plugin UI is supported as a given widget type."]
1805 #[doc = "@param ui The Plugin UI"]
1806 #[doc = "@param supported_func User provided supported predicate."]
1807 #[doc = "@param container_type The widget type to host the UI within."]
1808 #[doc = "@param ui_type (Output) If non-NULL, set to the native type of the UI"]
1809 #[doc = "which is owned by `ui` and must not be freed by the caller."]
1810 #[doc = "@return The embedding quality level returned by `supported_func`."]
1811 pub fn lilv_ui_is_supported(
1812 ui: *const LilvUI,
1813 supported_func: LilvUISupportedFunc,
1814 container_type: *const LilvNode,
1815 ui_type: *mut *const LilvNode,
1816 ) -> ::std::os::raw::c_uint;
1817}
1818extern "C" {
1819 #[doc = "Get the URI for a Plugin UI's bundle."]
1820 #[doc = "@param ui The Plugin UI"]
1821 #[doc = "@return a shared value which must not be modified or freed."]
1822 pub fn lilv_ui_get_bundle_uri(ui: *const LilvUI) -> *const LilvNode;
1823}
1824extern "C" {
1825 #[doc = "Get the URI for a Plugin UI's shared library."]
1826 #[doc = "@param ui The Plugin UI"]
1827 #[doc = "@return a shared value which must not be modified or freed."]
1828 pub fn lilv_ui_get_binary_uri(ui: *const LilvUI) -> *const LilvNode;
1829}
1830pub type __builtin_va_list = [__va_list_tag; 1usize];
1831#[repr(C)]
1832#[derive(Debug, Copy, Clone)]
1833pub struct __va_list_tag {
1834 pub gp_offset: ::std::os::raw::c_uint,
1835 pub fp_offset: ::std::os::raw::c_uint,
1836 pub overflow_arg_area: *mut ::std::os::raw::c_void,
1837 pub reg_save_area: *mut ::std::os::raw::c_void,
1838}
1839#[test]
1840fn bindgen_test_layout___va_list_tag() {
1841 assert_eq!(
1842 ::std::mem::size_of::<__va_list_tag>(),
1843 24usize,
1844 concat!("Size of: ", stringify!(__va_list_tag))
1845 );
1846 assert_eq!(
1847 ::std::mem::align_of::<__va_list_tag>(),
1848 8usize,
1849 concat!("Alignment of ", stringify!(__va_list_tag))
1850 );
1851 assert_eq!(
1852 unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize },
1853 0usize,
1854 concat!(
1855 "Offset of field: ",
1856 stringify!(__va_list_tag),
1857 "::",
1858 stringify!(gp_offset)
1859 )
1860 );
1861 assert_eq!(
1862 unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize },
1863 4usize,
1864 concat!(
1865 "Offset of field: ",
1866 stringify!(__va_list_tag),
1867 "::",
1868 stringify!(fp_offset)
1869 )
1870 );
1871 assert_eq!(
1872 unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize },
1873 8usize,
1874 concat!(
1875 "Offset of field: ",
1876 stringify!(__va_list_tag),
1877 "::",
1878 stringify!(overflow_arg_area)
1879 )
1880 );
1881 assert_eq!(
1882 unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize },
1883 16usize,
1884 concat!(
1885 "Offset of field: ",
1886 stringify!(__va_list_tag),
1887 "::",
1888 stringify!(reg_save_area)
1889 )
1890 );
1891}