LMMS
Loading...
Searching...
No Matches
state.h
Go to the documentation of this file.
1#pragma once
2
3#include "../plugin.h"
4#include "../stream.h"
5
6static CLAP_CONSTEXPR const char CLAP_EXT_STATE[] = "clap.state";
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct clap_plugin_state {
13 // Saves the plugin state into stream.
14 // Returns true if the state was correctly saved.
15 // [main-thread]
17
18 // Loads the plugin state from stream.
19 // Returns true if the state was correctly restored.
20 // [main-thread]
21 bool (CLAP_ABI *load)(const clap_plugin_t *plugin, const clap_istream_t *stream);
23
24typedef struct clap_host_state {
25 // Tell the host that the plugin state has changed and should be saved again.
26 // If a parameter value changes, then it is implicit that the state is dirty.
27 // [main-thread]
28 void (CLAP_ABI *mark_dirty)(const clap_host_t *host);
30
31#ifdef __cplusplus
32}
33#endif
struct clap_host clap_host_t
struct clap_host_state clap_host_state_t
static CLAP_CONSTEXPR const char CLAP_EXT_STATE[]
Definition state.h:6
struct clap_plugin_state clap_plugin_state_t
#define CLAP_ABI
Definition macros.h:24
#define CLAP_CONSTEXPR
Definition macros.h:32
struct clap_plugin clap_plugin_t
struct clap_istream clap_istream_t
struct clap_ostream clap_ostream_t
Definition state.h:24
void(CLAP_ABI *mark_dirty)(const clap_host_t *host)
Definition state.h:12
bool(CLAP_ABI *save)(const clap_plugin_t *plugin
const clap_ostream_t * stream
Definition state.h:16
bool(CLAP_ABI *load)(const clap_plugin_t *plugin
static LV2_State_Status save(LV2_Handle instance, LV2_State_Store_Function store, void *callback_data, uint32_t flags, const LV2_Feature *const *features)
Definition test.c:161