Skip to content

Commit

Permalink
remove undo_state, it was unclear
Browse files Browse the repository at this point in the history
  • Loading branch information
abique committed Sep 18, 2024
1 parent 6c75329 commit 0278396
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions include/clap/ext/draft/undo.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
static CLAP_CONSTEXPR const char CLAP_EXT_UNDO[] = "clap.undo/3";
static CLAP_CONSTEXPR const char CLAP_EXT_UNDO_CONTEXT[] = "clap.undo_context/3";
static CLAP_CONSTEXPR const char CLAP_EXT_UNDO_DELTA[] = "clap.undo_delta/3";
static CLAP_CONSTEXPR const char CLAP_EXT_UNDO_STATE[] = "clap.undo_state/3";

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -98,27 +97,6 @@ typedef struct clap_plugin_undo_delta {
size_t delta_size);
} clap_plugin_undo_delta_t;

// Use CLAP_EXT_UNDO_STATE
// This is an optional interface.
// When the plugin didn't provide a delta, then the host will perform a plugin state snapshot.
// This interface should only be implemented if the plugin can provide a lighter state for the undo
// history.
// A state saved using this interface must be restored using this interface.
//
// TODO: give precise assumptions that can be made by the plugin in order to make its state smaller.
// TODO: give an example
typedef struct clap_plugin_undo_state {
// Saves the plugin state into stream.
// Returns true if the state was correctly saved.
// [main-thread]
bool(CLAP_ABI *save)(const clap_plugin_t *plugin, const clap_ostream_t *stream);

// Loads the plugin state from stream.
// Returns true if the state was correctly restored.
// [main-thread]
bool(CLAP_ABI *load)(const clap_plugin_t *plugin, const clap_istream_t *stream);
} clap_plugin_undo_state_t;

// Use CLAP_EXT_UNDO_CONTEXT
// This is an optional interface, that the plugin can implement in order to know about
// the current undo context.
Expand Down

0 comments on commit 0278396

Please sign in to comment.