-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from robbert-vdh/update/clap-1.1.7
Update for CLAP 1.1.7
- Loading branch information
Showing
22 changed files
with
638 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use crate::plugin::*; | ||
|
||
use std::ffi::CStr; | ||
|
||
pub const CLAP_EXT_AUDIO_PORTS_ACTIVATION: &CStr = | ||
unsafe { CStr::from_bytes_with_nul_unchecked(b"clap.audio-ports-activation/draft-1\0") }; | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_plugin_audio_ports_activation { | ||
pub can_activate_while_processing: | ||
Option<unsafe extern "C" fn(plugin: *const clap_plugin) -> bool>, | ||
pub set_active: Option< | ||
unsafe extern "C" fn( | ||
plugin: *const clap_plugin, | ||
is_input: bool, | ||
port_index: u32, | ||
is_active: bool, | ||
) -> bool, | ||
>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
use crate::{host::*, id::*, plugin::*}; | ||
|
||
use std::ffi::{c_void, CStr}; | ||
use std::os::raw::c_char; | ||
|
||
pub const CLAP_EXT_CONTEXT_MENU: &CStr = | ||
unsafe { CStr::from_bytes_with_nul_unchecked(b"clap.context-menu.draft/0\0") }; | ||
|
||
pub const CLAP_CONTEXT_MENU_TARGET_KIND_GLOBAL: u32 = 0; | ||
pub const CLAP_CONTEXT_MENU_TARGET_KIND_PARAM: u32 = 1; | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_context_menu_target { | ||
pub kind: u32, | ||
pub id: clap_id, | ||
} | ||
|
||
pub const CLAP_CONTEXT_MENU_ITEM_ENTRY: clap_context_menu_item_kind = 0; | ||
pub const CLAP_CONTEXT_MENU_ITEM_CHECK_ENTRY: clap_context_menu_item_kind = 1; | ||
pub const CLAP_CONTEXT_MENU_ITEM_SEPARATOR: clap_context_menu_item_kind = 2; | ||
pub const CLAP_CONTEXT_MENU_ITEM_BEGIN_SUBMENU: clap_context_menu_item_kind = 3; | ||
pub const CLAP_CONTEXT_MENU_ITEM_END_SUBMENU: clap_context_menu_item_kind = 4; | ||
pub const CLAP_CONTEXT_MENU_ITEM_TITLE: clap_context_menu_item_kind = 5; | ||
pub type clap_context_menu_item_kind = u32; | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_context_menu_entry { | ||
pub label: *const c_char, | ||
pub is_enabled: bool, | ||
pub action_id: clap_id, | ||
} | ||
|
||
unsafe impl Send for clap_context_menu_entry {} | ||
unsafe impl Sync for clap_context_menu_entry {} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_context_menu_check_entry { | ||
pub label: *const c_char, | ||
pub is_enabled: bool, | ||
pub is_checked: bool, | ||
pub action_id: clap_id, | ||
} | ||
|
||
unsafe impl Send for clap_context_menu_check_entry {} | ||
unsafe impl Sync for clap_context_menu_check_entry {} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_context_menu_item_title { | ||
pub title: *const c_char, | ||
pub is_enabled: bool, | ||
} | ||
|
||
unsafe impl Send for clap_context_menu_item_title {} | ||
unsafe impl Sync for clap_context_menu_item_title {} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_context_menu_submenu { | ||
pub label: *const c_char, | ||
pub is_enabled: bool, | ||
} | ||
|
||
unsafe impl Send for clap_context_menu_submenu {} | ||
unsafe impl Sync for clap_context_menu_submenu {} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_context_menu_builder { | ||
pub ctx: *mut c_void, | ||
pub add_item: Option< | ||
unsafe extern "C" fn( | ||
builder: *const clap_context_menu_builder, | ||
item_kind: clap_context_menu_item_kind, | ||
item_data: *const c_void, | ||
) -> bool, | ||
>, | ||
pub supports: Option< | ||
unsafe extern "C" fn( | ||
builder: *const clap_context_menu_builder, | ||
item_kind: clap_context_menu_item_kind, | ||
) -> bool, | ||
>, | ||
} | ||
|
||
unsafe impl Send for clap_context_menu_builder {} | ||
unsafe impl Sync for clap_context_menu_builder {} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_plugin_context_menu { | ||
pub populate: Option< | ||
unsafe extern "C" fn( | ||
plugin: *const clap_plugin, | ||
target: *const clap_context_menu_target, | ||
builder: *const clap_context_menu_builder, | ||
) -> bool, | ||
>, | ||
pub perform: Option< | ||
unsafe extern "C" fn( | ||
plugin: *const clap_plugin, | ||
target: *const clap_context_menu_target, | ||
action_id: clap_id, | ||
) -> bool, | ||
>, | ||
} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_host_context_menu { | ||
pub populate: Option< | ||
unsafe extern "C" fn( | ||
host: *const clap_host, | ||
target: *const clap_context_menu_target, | ||
builder: *const clap_context_menu_builder, | ||
) -> bool, | ||
>, | ||
pub perform: Option< | ||
unsafe extern "C" fn( | ||
host: *const clap_host, | ||
target: *const clap_context_menu_target, | ||
action_id: clap_id, | ||
) -> bool, | ||
>, | ||
pub can_popup: Option<unsafe extern "C" fn(host: *const clap_host) -> bool>, | ||
pub popup: Option< | ||
unsafe extern "C" fn( | ||
host: *const clap_host, | ||
target: *const clap_context_menu_target, | ||
screen_index: i32, | ||
x: i32, | ||
y: i32, | ||
) -> bool, | ||
>, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
pub mod ambisonic; | ||
pub mod audio_ports_activation; | ||
pub mod check_for_update; | ||
pub mod context_menu; | ||
pub mod cv; | ||
pub mod file_reference; | ||
pub mod midi_mappings; | ||
pub mod param_indication; | ||
pub mod preset_load; | ||
pub mod quick_controls; | ||
pub mod remote_controls; | ||
pub mod resource_directory; | ||
pub mod state_context; | ||
pub mod surround; | ||
pub mod track_info; | ||
pub mod transport_control; | ||
pub mod triggers; | ||
pub mod tuning; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use crate::{color::*, id::*, plugin::*}; | ||
|
||
use std::ffi::CStr; | ||
use std::os::raw::c_char; | ||
|
||
pub const CLAP_EXT_PARAM_INDICATION: &CStr = | ||
unsafe { CStr::from_bytes_with_nul_unchecked(b"clap.param-indication.draft/4\0") }; | ||
|
||
pub const CLAP_PARAM_INDICATION_AUTOMATION_NONE: u32 = 0; | ||
pub const CLAP_PARAM_INDICATION_AUTOMATION_PRESENT: u32 = 1; | ||
pub const CLAP_PARAM_INDICATION_AUTOMATION_PLAYING: u32 = 2; | ||
pub const CLAP_PARAM_INDICATION_AUTOMATION_RECORDING: u32 = 3; | ||
pub const CLAP_PARAM_INDICATION_AUTOMATION_OVERRIDING: u32 = 4; | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_plugin_param_indication { | ||
pub set_mapping: Option< | ||
unsafe extern "C" fn( | ||
plugin: *const clap_plugin, | ||
param_id: clap_id, | ||
has_mapping: bool, | ||
color: *const clap_color, | ||
label: *const c_char, | ||
description: *const c_char, | ||
), | ||
>, | ||
pub set_automation: Option< | ||
unsafe extern "C" fn( | ||
plugin: *const clap_plugin, | ||
param_id: clap_id, | ||
automation_state: u32, | ||
color: *const clap_color, | ||
), | ||
>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
use crate::plugin::*; | ||
use crate::{host::*, plugin::*}; | ||
|
||
use std::ffi::CStr; | ||
use std::os::raw::c_char; | ||
|
||
pub const CLAP_EXT_PRESET_LOAD: &CStr = | ||
unsafe { CStr::from_bytes_with_nul_unchecked(b"clap.preset-load.draft/0\0") }; | ||
unsafe { CStr::from_bytes_with_nul_unchecked(b"clap.preset-load.draft/1\0") }; | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_plugin_preset_load { | ||
pub from_file: | ||
Option<unsafe extern "C" fn(plugin: *const clap_plugin, path: *const c_char) -> bool>, | ||
pub from_uri: Option< | ||
unsafe extern "C" fn( | ||
plugin: *const clap_plugin, | ||
uri: *const c_char, | ||
load_key: *const c_char, | ||
) -> bool, | ||
>, | ||
} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone)] | ||
pub struct clap_host_preset_load { | ||
pub on_error: Option< | ||
unsafe extern "C" fn( | ||
host: *const clap_host, | ||
uri: *const c_char, | ||
os_error: i32, | ||
msg: *const c_char, | ||
), | ||
>, | ||
pub loaded: Option< | ||
unsafe extern "C" fn(host: *const clap_host, uri: *const c_char, load_key: *const c_char), | ||
>, | ||
} |
Oops, something went wrong.