host.h (1262B)
1 #pragma once 2 3 #include "version.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 typedef struct clap_host { 10 clap_version_t clap_version; // initialized to CLAP_VERSION 11 12 void *host_data; // reserved pointer for the host 13 14 // name and version are mandatory. 15 const char *name; // eg: "Bitwig Studio" 16 const char *vendor; // eg: "Bitwig GmbH" 17 const char *url; // eg: "https://bitwig.com" 18 const char *version; // eg: "4.3" 19 20 // Query an extension. 21 // [thread-safe] 22 const void *(CLAP_ABI *get_extension)(const struct clap_host *host, const char *extension_id); 23 24 // Request the host to deactivate and then reactivate the plugin. 25 // The operation may be delayed by the host. 26 // [thread-safe] 27 void(CLAP_ABI *request_restart)(const struct clap_host *host); 28 29 // Request the host to activate and start processing the plugin. 30 // This is useful if you have external IO and need to wake up the plugin from "sleep". 31 // [thread-safe] 32 void(CLAP_ABI *request_process)(const struct clap_host *host); 33 34 // Request the host to schedule a call to plugin->on_main_thread(plugin) on the main thread. 35 // [thread-safe] 36 void(CLAP_ABI *request_callback)(const struct clap_host *host); 37 } clap_host_t; 38 39 #ifdef __cplusplus 40 } 41 #endif