clap_sys/
version.rs

1// Instead of providing the `CLAP_VERSION_LT`, `CLAP_VERSION_EQ`, and `CLAP_VERSION_GE` macros,
2// we'll derive `Eq` and `Ord` so you can make readable inline comparisons to `CLAP_VERSION`
3#[repr(C)]
4#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
5pub struct clap_version {
6    pub major: u32,
7    pub minor: u32,
8    pub revision: u32,
9}
10
11pub const CLAP_VERSION_MAJOR: u32 = 1;
12pub const CLAP_VERSION_MINOR: u32 = 2;
13pub const CLAP_VERSION_REVISION: u32 = 2;
14
15pub const CLAP_VERSION: clap_version = clap_version {
16    major: CLAP_VERSION_MAJOR,
17    minor: CLAP_VERSION_MINOR,
18    revision: CLAP_VERSION_REVISION,
19};
20
21pub const fn clap_version_is_compatible(version: clap_version) -> bool {
22    version.major >= 1
23}