Add initial bits for Qt6 support
[carla.git] / source / includes / clap / entry.h
blob0beaeed958d83e6a81797704c88a7ada396e80c1
1 #pragma once
3 #include "version.h"
4 #include "private/macros.h"
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 // This interface is the entry point of the dynamic library.
12 // CLAP plugins standard search path:
14 // Linux
15 // - ~/.clap
16 // - /usr/lib/clap
18 // Windows
19 // - %CommonFilesFolder%/CLAP/
20 // - %LOCALAPPDATA%/Programs/Common/CLAP/
22 // MacOS
23 // - /Library/Audio/Plug-Ins/CLAP
24 // - ~/Library/Audio/Plug-Ins/CLAP
26 // In addition to the OS-specific default locations above, a CLAP host must query the environment
27 // for a CLAP_PATH variable, which is a list of directories formatted in the same manner as the host
28 // OS binary search path (PATH on Unix, separated by `:` and Path on Windows, separated by ';', as
29 // of this writing).
31 // Each directory should be recursively searched for files and/or bundles as appropriate in your OS
32 // ending with the extension `.clap`.
34 // Every method must be thread-safe.
35 typedef struct clap_plugin_entry {
36 clap_version_t clap_version; // initialized to CLAP_VERSION
38 // This function must be called first, and can only be called once.
40 // It should be as fast as possible, in order to perform a very quick scan of the plugin
41 // descriptors.
43 // It is forbidden to display graphical user interface in this call.
44 // It is forbidden to perform user interaction in this call.
46 // If the initialization depends upon expensive computation, maybe try to do them ahead of time
47 // and cache the result.
49 // If init() returns false, then the host must not call deinit() nor any other clap
50 // related symbols from the DSO.
51 bool (CLAP_ABI *init)(const char *plugin_path);
53 // No more calls into the DSO must be made after calling deinit().
54 void (CLAP_ABI *deinit)(void);
56 // Get the pointer to a factory. See plugin-factory.h for an example.
58 // Returns null if the factory is not provided.
59 // The returned pointer must *not* be freed by the caller.
60 const void *(CLAP_ABI *get_factory)(const char *factory_id);
61 } clap_plugin_entry_t;
63 /* Entry point */
64 CLAP_EXPORT extern const clap_plugin_entry_t clap_entry;
66 #ifdef __cplusplus
68 #endif