LMMS
Loading...
Searching...
No Matches
entry.h
Go to the documentation of this file.
1#pragma once
2
3#include "version.h"
4#include "private/macros.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10// This interface is the entry point of the dynamic library.
11//
12// CLAP plugins standard search path:
13//
14// Linux
15// - ~/.clap
16// - /usr/lib/clap
17//
18// Windows
19// - %CommonFilesFolder%/CLAP/
20// - %LOCALAPPDATA%/Programs/Common/CLAP/
21//
22// MacOS
23// - /Library/Audio/Plug-Ins/CLAP
24// - ~/Library/Audio/Plug-Ins/CLAP
25//
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).
30//
31// Each directory should be recursively searched for files and/or bundles as appropriate in your OS
32// ending with the extension `.clap`.
33//
34// Every method must be thread-safe.
35typedef struct clap_plugin_entry {
36 clap_version_t clap_version; // initialized to CLAP_VERSION
37
38 // This function must be called first, and can only be called once.
39 //
40 // It should be as fast as possible, in order to perform a very quick scan of the plugin
41 // descriptors.
42 //
43 // It is forbidden to display graphical user interface in this call.
44 // It is forbidden to perform user interaction in this call.
45 //
46 // If the initialization depends upon expensive computation, maybe try to do them ahead of time
47 // and cache the result.
48 //
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);
52
53 // No more calls into the DSO must be made after calling deinit().
54 void (CLAP_ABI *deinit)(void);
55
56 // Get the pointer to a factory. See plugin-factory.h for an example.
57 //
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);
62
63/* Entry point */
65
66#ifdef __cplusplus
67}
68#endif
struct clap_plugin_entry clap_plugin_entry_t
CLAP_EXPORT const clap_plugin_entry_t clap_entry
#define CLAP_EXPORT
Definition macros.h:15
#define CLAP_ABI
Definition macros.h:24
Definition entry.h:35
clap_version_t clap_version
Definition entry.h:36
const void *CLAP_ABI * get_factory(const char *factory_id)
void(CLAP_ABI *deinit)(void)
bool(CLAP_ABI *init)(const char *plugin_path)
ZCONST uch * init
Definition extract.c:2392
struct clap_version clap_version_t