clap_sys/ext/
timer_support.rs1use crate::{cstr, host::*, id::*, plugin::*};
2
3use std::ffi::CStr;
4
5pub const CLAP_EXT_TIMER_SUPPORT: &CStr = cstr!("clap.timer-support");
6
7#[repr(C)]
8#[derive(Debug, Copy, Clone)]
9pub struct clap_plugin_timer_support {
10 pub on_timer: Option<unsafe extern "C" fn(plugin: *const clap_plugin, timer_id: clap_id)>,
11}
12
13#[repr(C)]
14#[derive(Debug, Copy, Clone)]
15pub struct clap_host_timer_support {
16 pub register_timer: Option<
17 unsafe extern "C" fn(
18 host: *const clap_host,
19 period_ms: u32,
20 timer_id: *mut clap_id,
21 ) -> bool,
22 >,
23 pub unregister_timer:
24 Option<unsafe extern "C" fn(host: *const clap_host, timer_id: clap_id) -> bool>,
25}