rustsynth_sys/
lib.rs

1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![allow(clippy::approx_constant)]
5#![allow(clippy::missing_safety_doc)]
6#![allow(clippy::redundant_static_lifetimes)]
7#![allow(clippy::too_many_arguments)]
8#![allow(clippy::type_complexity)]
9#![allow(deref_nullptr)]
10
11include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
12
13/// Makes a VS compatible version integer
14///
15/// # Example
16/// If wanting to represent the version with major 2 and minor 1
17/// ```
18/// use rustsynth_sys::version;
19/// let v = version!(2,1);
20/// assert!(v == 0x20001);
21/// ```
22#[macro_export]
23macro_rules! version {
24    ($major:expr, $minor:expr) => {
25        (($major) << 16) | ($minor)
26    };
27}
28
29pub const VAPOURSYNTH_API_VERSION: i32 =
30    version!(VAPOURSYNTH_API_MAJOR as i32, VAPOURSYNTH_API_MINOR as i32);
31pub const VSSCRIPT_API_VERSION: i32 =
32    version!(VSSCRIPT_API_MAJOR as i32, VSSCRIPT_API_MINOR as i32);