clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 6fd8a86adcebe953a370c0ab942452da0c18f60d
parent 3c378f39505184bd0faefeaf9f0cbdefa6b384b8
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Sun, 26 Dec 2021 18:18:22 +0100

Initial draft of an event registry

Diffstat:
Ainclude/clap/ext/event-registry.h | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/clap/ext/event-registry.h b/include/clap/ext/event-registry.h @@ -0,0 +1,27 @@ +#pragma once + +#include "../plugin.h" + +static CLAP_CONSTEXPR const char CLAP_EXT_EVENT_REGISTRY[] = "clap.event-registry"; + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma pack(push, CLAP_ALIGN) + +typedef struct clap_host_event_registry { + // Queries an event space id. + // + // The first 1024 space_ids are reserved. + // + // Return false and sets *space_id to UINT16_MAX if the space name is unknown to the host. + // [main-thread] + bool (*query)(const clap_host_t *host, const char *space_name, uint16_t *space_id); +} clap_host_event_registry_t; + +#pragma pack(pop) + +#ifdef __cplusplus +} +#endif