clap_sys/ext/
note_name.rs

1use crate::{cstr, host::*, plugin::*, string_sizes::*};
2
3use std::ffi::{c_char, CStr};
4
5pub const CLAP_EXT_NOTE_NAME: &CStr = cstr!("clap.note-name");
6
7#[repr(C)]
8#[derive(Debug, Copy, Clone)]
9pub struct clap_note_name {
10    pub name: [c_char; CLAP_NAME_SIZE],
11    pub port: i16,
12    pub key: i16,
13    pub channel: i16,
14}
15
16#[repr(C)]
17#[derive(Debug, Copy, Clone)]
18pub struct clap_plugin_note_name {
19    pub count: Option<unsafe extern "C" fn(plugin: *const clap_plugin) -> u32>,
20    pub get: Option<
21        unsafe extern "C" fn(
22            plugin: *const clap_plugin,
23            index: u32,
24            note_name: *mut clap_note_name,
25        ) -> bool,
26    >,
27}
28
29#[repr(C)]
30#[derive(Debug, Copy, Clone)]
31pub struct clap_host_note_name {
32    pub changed: Option<unsafe extern "C" fn(host: *const clap_host)>,
33}