Add initial bits for Qt6 support
[carla.git] / source / includes / clap / plugin-factory.h
blobdab0bdc895ce47547e5d223d156593a04f776fd4
1 #pragma once
3 #include "plugin.h"
5 static const CLAP_CONSTEXPR char CLAP_PLUGIN_FACTORY_ID[] = "clap.plugin-factory";
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 // Every method must be thread-safe.
12 // It is very important to be able to scan the plugin as quickly as possible.
14 // If the content of the factory may change due to external events, like the user installed
15 typedef struct clap_plugin_factory {
16 // Get the number of plugins available.
17 // [thread-safe]
18 uint32_t (CLAP_ABI *get_plugin_count)(const struct clap_plugin_factory *factory);
20 // Retrieves a plugin descriptor by its index.
21 // Returns null in case of error.
22 // The descriptor must not be freed.
23 // [thread-safe]
24 const clap_plugin_descriptor_t *(CLAP_ABI *get_plugin_descriptor)(
25 const struct clap_plugin_factory *factory, uint32_t index);
27 // Create a clap_plugin by its plugin_id.
28 // The returned pointer must be freed by calling plugin->destroy(plugin);
29 // The plugin is not allowed to use the host callbacks in the create method.
30 // Returns null in case of error.
31 // [thread-safe]
32 const clap_plugin_t *(CLAP_ABI *create_plugin)(const struct clap_plugin_factory *factory,
33 const clap_host_t *host,
34 const char *plugin_id);
35 } clap_plugin_factory_t;
37 #ifdef __cplusplus
39 #endif