10#ifndef __UNDO_UNDOABLE_ACTION_H__
11#define __UNDO_UNDOABLE_ACTION_H__
27#define UNDOABLE_ACTION_SCHEMA_VERSION 2
35 UA_TRACKLIST_SELECTIONS,
42 UA_ARRANGER_SELECTIONS,
64static const cyaml_strval_t undoable_action_type_strings[] = {
65 {
"Tracklist selections", UA_TRACKLIST_SELECTIONS},
66 {
"Channel send", UA_CHANNEL_SEND },
67 {
"Mixer selections", UA_MIXER_SELECTIONS },
68 {
"Arranger selections", UA_ARRANGER_SELECTIONS },
69 {
"MIDI mapping", UA_MIDI_MAPPING },
70 {
"Port connection", UA_PORT_CONNECTION },
72 {
"Range", UA_RANGE },
73 {
"Transport", UA_TRANSPORT },
74 {
"Chord", UA_CHORD },
119static const cyaml_schema_field_t undoable_action_fields_schema[] = {
124 undoable_action_type_strings),
133static const cyaml_schema_value_t undoable_action_schema = {
134 CYAML_VALUE_MAPPING (
137 undoable_action_fields_schema),
179undoable_action_get_plugins (
int undoable_action_undo(UndoableAction *self, GError **error)
Undoes the action.
NONNULL char * undoable_action_to_string(UndoableAction *ua)
Stringizes the action to be used in Undo/Redo buttons.
NONNULL void undoable_action_set_num_actions(UndoableAction *self, int num_actions)
Sets the number of actions for this action.
void undoable_action_save_or_load_port_connections(UndoableAction *self, bool _do, PortConnectionsManager **before, PortConnectionsManager **after)
To be used by actions that save/load port connections.
NONNULL bool undoable_action_needs_pause(UndoableAction *self)
Returns whether the action requires pausing the engine.
UndoableActionType
Type of UndoableAction.
NONNULL void undoable_action_init(UndoableAction *self, UndoableActionType type)
Initializer to be used by implementing actions.
NONNULL bool undoable_action_contains_clip(UndoableAction *self, AudioClip *clip)
Checks whether the action actually contains or refers to the given audio clip.
NONNULL bool undoable_action_can_contain_clip(UndoableAction *self)
Checks whether the action can contain an audio clip.
int undoable_action_do(UndoableAction *self, GError **error)
Performs the action.
COLD NONNULL_ARGS(1) void automation_track_init_loaded(AutomationTrack *self
Inits a loaded AutomationTracklist.
uint32_t sample_rate_t
Sample rate.
Audio clips for the pool.
Port connections manager.
Base struct to be inherited by implementing undoable actions.
int num_actions
Number of actions to perform.
UndoableActionType type
Undoable action type.
int stack_idx
Index in the stack.
double frames_per_tick
A snapshot of AudioEngine.frames_per_tick when the action is executed.
sample_rate_t sample_rate
Sample rate of this action.