1use crate::{cstr, host::*};
2
3use std::ffi::{c_char, CStr};
4
5pub const CLAP_EXT_LOG: &CStr = cstr!("clap.log");
6
7pub const CLAP_LOG_DEBUG: clap_log_severity = 0;
8pub const CLAP_LOG_INFO: clap_log_severity = 1;
9pub const CLAP_LOG_WARNING: clap_log_severity = 2;
10pub const CLAP_LOG_ERROR: clap_log_severity = 3;
11pub const CLAP_LOG_FATAL: clap_log_severity = 4;
12pub const CLAP_LOG_HOST_MISBEHAVING: clap_log_severity = 5;
13pub const CLAP_LOG_PLUGIN_MISBEHAVING: clap_log_severity = 6;
14
15pub type clap_log_severity = i32;
16
17#[repr(C)]
18#[derive(Debug, Copy, Clone)]
19pub struct clap_host_log {
20 pub log: Option<
21 unsafe extern "C" fn(
22 host: *const clap_host,
23 severity: clap_log_severity,
24 msg: *const c_char,
25 ),
26 >,
27}