Actions module
User action implementations.
Classes
- struct ArrangerSelectionsAction
- The action.
- struct ChannelSendAction
- Action for channel send changes.
- struct MidiMappingAction
- MIDI mapping action.
- struct TracklistSelectionsAction
- Tracklist selections (tracks) action.
- struct TransportAction
- Transport action.
- struct UndoManager
- Undo manager.
- struct UndoStack
- Serializable stack for undoable actions.
- struct UndoableAction
- Base struct to be inherited by implementing undoable actions.
Enums
- enum ArrangerSelectionsActionResizeType { ARRANGER_SELECTIONS_ACTION_RESIZE_L, ARRANGER_SELECTIONS_ACTION_RESIZE_R, ARRANGER_SELECTIONS_ACTION_RESIZE_L_LOOP, ARRANGER_SELECTIONS_ACTION_RESIZE_R_LOOP, ARRANGER_SELECTIONS_ACTION_RESIZE_L_FADE, ARRANGER_SELECTIONS_ACTION_RESIZE_R_FADE, ARRANGER_SELECTIONS_ACTION_STRETCH_L, ARRANGER_SELECTIONS_ACTION_STRETCH_R }
- Type used when the action is a RESIZE action.
- enum ArrangerSelectionsActionEditType { ARRANGER_SELECTIONS_ACTION_EDIT_NAME, ARRANGER_SELECTIONS_ACTION_EDIT_POS, ARRANGER_SELECTIONS_ACTION_EDIT_PRIMITIVE, ARRANGER_SELECTIONS_ACTION_EDIT_SCALE, ARRANGER_SELECTIONS_ACTION_EDIT_FADES, ARRANGER_SELECTIONS_ACTION_EDIT_MUTE, ARRANGER_SELECTIONS_ACTION_EDIT_EDITOR_FUNCTION }
- Type used when the action is an EDIT action.
- enum PortActionType { PORT_ACTION_SET_CONTROL_VAL }
- enum EditTracksActionType { EDIT_TRACK_ACTION_TYPE_SOLO, EDIT_TRACK_ACTION_TYPE_MUTE, EDIT_TRACK_ACTION_TYPE_LISTEN, EDIT_TRACK_ACTION_TYPE_ENABLE, EDIT_TRACK_ACTION_TYPE_FOLD, EDIT_TRACK_ACTION_TYPE_VOLUME, EDIT_TRACK_ACTION_TYPE_PAN, EDIT_TRACK_ACTION_TYPE_DIRECT_OUT, EDIT_TRACK_ACTION_TYPE_RENAME, EDIT_TRACK_ACTION_TYPE_RENAME_LANE, EDIT_TRACK_ACTION_TYPE_COLOR, EDIT_TRACK_ACTION_TYPE_COMMENT, EDIT_TRACK_ACTION_TYPE_ICON, EDIT_TRACK_ACTION_TYPE_MIDI_FADER_MODE }
- Action type.
- enum UndoableActionType { UA_TRACKLIST_SELECTIONS, UA_CHANNEL_SEND, UA_MIXER_SELECTIONS, UA_ARRANGER_SELECTIONS, UA_MIDI_MAPPING, UA_PORT_CONNECTION, UA_PORT, UA_RANGE, UA_TRANSPORT }
- Type of UndoableAction.
Typedefs
- using ArrangerSelectionsActionResizeType = enum ArrangerSelectionsActionResizeType
- Type used when the action is a RESIZE action.
- using ArrangerSelectionsActionEditType = enum ArrangerSelectionsActionEditType
- Type used when the action is an EDIT action.
- using ArrangerSelectionsAction = struct ArrangerSelectionsAction
- The action.
- using ChannelSendAction = struct ChannelSendAction
- Action for channel send changes.
- using MidiMappingAction = struct MidiMappingAction
- MIDI mapping action.
- using EditTracksActionType = enum EditTracksActionType
- Action type.
- using TracklistSelectionsAction = struct TracklistSelectionsAction
- Tracklist selections (tracks) action.
- using TransportAction = struct TransportAction
- Transport action.
- using UndoManager = struct UndoManager
- Undo manager.
- using UndoStack = struct UndoStack
- Serializable stack for undoable actions.
- using UndoableActionType = enum UndoableActionType
- Type of UndoableAction.
- using UndoableAction = struct UndoableAction
- Base struct to be inherited by implementing undoable actions.
Functions
- void activate_preferences(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Show preferences window.
- void activate_log(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Show preferences window.
- void activate_scripting_interface(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Show preferences window.
- void activate_audition_mode(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Activate audition mode.
- void activate_select_mode(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Activate select mode.
- void activate_edit_mode(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Activate edit mode.
- void activate_cut_mode(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Activate cut mode.
- void activate_eraser_mode(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Activate eraser mode.
- void activate_ramp_mode(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Activate ramp mode.
- void activate_toggle_top_panel(GSimpleAction* action, GVariant* variant, gpointer user_data)
- Toggle timeline visibility.
- void activate_bind_midi_cc(GSimpleAction* action, GVariant* _variant, gpointer user_data)
- All purpose menuitem callback for binding MIDI CC to a port.
- DECLARE_SIMPLE(activate_app_action_wrapper)
- Used as a workaround for GTK bug 4422.
- auto arranger_selections_action_new_create_or_delete(ArrangerSelections* sel, const bool create, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for creating/deleting objects.
- auto arranger_selections_action_new_move_or_duplicate(ArrangerSelections* sel, const bool move, const double ticks, const int delta_chords, const int delta_pitch, const int delta_tracks, const int delta_lanes, const double delta_normalized_amount, const bool already_moved, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for moving or duplicating objects.
- auto arranger_selections_action_new_link(ArrangerSelections* sel_before, ArrangerSelections* sel_after, const double ticks, const int delta_tracks, const int delta_lanes, const bool already_moved, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for linking regions.
- auto arranger_selections_action_new_edit(ArrangerSelections* sel_before, ArrangerSelections* sel_after, ArrangerSelectionsActionEditType type, bool already_edited, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for editing properties of an object.
- auto arranger_selections_action_new_edit_midi_function(ArrangerSelections* sel_before, MidiFunctionType midi_func_type, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Wrapper over arranger_
selections_ action_ new_ edit() for MIDI functions. - auto arranger_selections_action_new_edit_automation_function(ArrangerSelections* sel_before, AutomationFunctionType automation_func_type, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Wrapper over arranger_
selections_ action_ new_ edit() for automation functions. - auto arranger_selections_action_new_edit_audio_function(ArrangerSelections* sel_before, AudioFunctionType audio_func_type, const char* uri, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Wrapper over arranger_
selections_ action_ new_ edit() for automation functions. - auto arranger_selections_action_new_automation_fill(ZRegion* region_before, ZRegion* region_after, bool already_changed, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for automation autofill.
- auto arranger_selections_action_new_split(ArrangerSelections* sel, const Position* pos, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for splitting ArrangerObject's.
- auto arranger_selections_action_new_merge(ArrangerSelections* sel, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for merging ArrangerObject's.
- auto arranger_selections_action_new_resize(ArrangerSelections* sel, ArrangerSelectionsActionResizeType type, const double ticks, const bool already_resized, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action for resizing ArrangerObject's.
- auto arranger_selections_action_new_quantize(ArrangerSelections* sel, QuantizeOptions* opts, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action fro quantizing ArrangerObject's.
- auto channel_send_action_new(ChannelSend* send, ChannelSendActionType type, Port* port, StereoPorts* stereo, float amount, const PortConnectionsManager* port_connections_mgr, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action.
- auto channel_send_action_perform(ChannelSend* send, ChannelSendActionType type, Port* port, StereoPorts* stereo, float amount, const PortConnectionsManager* port_connections_mgr, GError** error) -> bool
- Wrapper to create action and perform it.
- auto midi_mapping_action_new_enable(int idx, bool enable, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action.
-
auto midi_mapping_action_new_bind(midi_
byte_ t* buf, ExtPort* device_port, Port* dest_port, GError** error) -> WARN_UNUSED_RESULT UndoableAction* - Creates a new action.
- auto midi_mapping_action_new_unbind(int idx, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action.
- auto midi_mapping_action_perform_enable(int idx, bool enable, GError** error) -> bool
- Wrapper of midi_
mapping_ action_ new_ enable(). -
auto midi_mapping_action_perform_bind(midi_
byte_ t* buf, ExtPort* device_port, Port* dest_port, GError** error) -> bool - Wrapper of midi_
mapping_ action_ new_ bind(). - auto midi_mapping_action_perform_unbind(int idx, GError** error) -> bool
- Wrapper of midi_
mapping_ action_ new_ unbind(). - auto port_action_new(PortActionType type, PortIdentifier* port_id, float val, bool is_normalized, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Create a new action.
- auto port_action_new_reset_control(PortIdentifier* port_id, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Create a new action.
- auto port_connection_action_new(PortConnectionActionType type, PortIdentifier* src_id, PortIdentifier* dest_id, float new_val, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Create a new action.
- auto range_action_new(RangeActionType type, Position* start_pos, Position* end_pos, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new action.
- auto tracklist_selections_action_new(TracklistSelectionsActionType type, TracklistSelections* tls_before, TracklistSelections* tls_after, const PortConnectionsManager* port_connections_mgr, Track* track, TrackType track_type, PluginSetting* pl_setting, SupportedFile* file_descr, int track_pos, const Position* pos, int num_tracks, EditTracksActionType edit_type, int ival_after, const GdkRGBA* color_new, float val_before, float val_after, const char* new_txt, bool already_edited, GError** error) -> WARN_UNUSED_RESULT UndoableAction*
- Creates a new TracklistSelectionsAction.
- auto tracklist_selections_action_perform_set_direct_out(TracklistSelections* self, PortConnectionsManager* port_connections_mgr, Track* direct_out, GError** error) -> bool
- Edit or remove direct out.
- auto undo_manager_init_loaded(UndoManager* self) -> NONNULL void
- Inits the undo manager by populating the undo/redo stacks.
- auto undo_manager_new(void) -> WARN_UNUSED_RESULT UndoManager*
- Inits the undo manager by creating the undo/redo stacks.
- auto undo_manager_undo(UndoManager* self, GError** error) -> int
- Undo last action.
- auto undo_manager_redo(UndoManager* self, GError** error) -> int
- Redo last undone action.
- auto undo_manager_perform(UndoManager* self, UndoableAction* action, GError** error) -> int
- Performs the action and pushes it to the undo stack.
- auto undo_manager_contains_clip(UndoManager* self, AudioClip* clip) -> NONNULL bool
- Returns whether the given clip is used by any stack.
- auto undo_manager_get_last_action(UndoManager* self) -> NONNULL UndoableAction*
- Returns the last performed action, or NULL if the stack is empty.
- auto undo_manager_clear_stacks(UndoManager* self, bool free) -> NONNULL void
- Clears the undo and redo stacks.
- auto undo_stack_new(void) -> UndoStack*
- Creates a new stack for undoable actions.
- auto undo_stack_get_as_string(UndoStack* self, int limit) -> char*
- Gets the list of actions as a string.
- auto undo_stack_get_total_cached_actions(UndoStack* self) -> NONNULL size_t
- Returns the total cached actions.
- auto undo_stack_pop_last(UndoStack* self) -> UndoableAction*
- Pops the last element and moves everything back.
- auto undo_stack_contains_action(UndoStack* self, UndoableAction* ua) -> bool
- Checks if the undo stack contains the given action pointer.
- void undo_stack_clear(UndoStack* self, bool free)
- Clears the stack, optionally freeing all the elements.
- auto undoable_action_init(UndoableAction* self, UndoableActionType type) -> NONNULL void
- Initializer to be used by implementing actions.
- auto undoable_action_needs_pause(UndoableAction* self) -> NONNULL bool
- Returns whether the action requires pausing the engine.
- auto undoable_action_can_contain_clip(UndoableAction* self) -> NONNULL bool
- Checks whether the action can contain an audio clip.
- auto undoable_action_contains_clip(UndoableAction* self, AudioClip* clip) -> NONNULL bool
- Checks whether the action actually contains or refers to the given audio clip.
- auto undoable_action_set_num_actions(UndoableAction* self, int num_actions) -> NONNULL void
- 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.
- auto undoable_action_do(UndoableAction* self, GError** error) -> int
- Performs the action.
- auto undoable_action_undo(UndoableAction* self, GError** error) -> int
- Undoes the action.
- auto undoable_action_to_string(UndoableAction* ua) -> NONNULL char*
- Stringizes the action to be used in Undo/Redo buttons.
Defines
- #define tracklist_selections_action_new_create_audio_fx(pl_setting, track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for an audio FX track.
- #define tracklist_selections_action_new_create_midi_fx(pl_setting, track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for a MIDI FX track.
- #define tracklist_selections_action_new_create_instrument(pl_setting, track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for an instrument track.
- #define tracklist_selections_action_new_create_audio_group(track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for an audio group track.
- #define tracklist_selections_action_new_create_midi_group(track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for a MIDI group track.
- #define tracklist_selections_action_new_create_midi(track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for a MIDI track.
- #define tracklist_selections_action_new_create_folder(track_pos, num_tracks, err)
- Creates a new TracklistSelectionsAction for a folder track.
- #define tracklist_selections_action_new_edit_generic(type, tls_before, tls_after, already_edited, err)
- Generic edit action.
- #define tracklist_selections_action_new_edit_single_float(type, track, val_before, val_after, already_edited, err)
- Convenience wrapper over tracklist_
selections_ action_ new() for single-track float edit changes. - #define tracklist_selections_action_new_edit_single_int(type, track, val_after, already_edited, err)
- Convenience wrapper over tracklist_
selections_ action_ new() for single-track int edit changes. - #define tracklist_selections_action_new_move(tls, port_connections_mgr, track_pos, err)
- Move tls to track_pos.
- #define tracklist_selections_action_new_move_inside(tls, port_connections_mgr, track_pos, err)
- Move inside a foldable track.
- #define tracklist_selections_action_new_pin(tls, port_connections_mgr, err)
- Toggle the current pin status of the track.
- #define tracklist_selections_action_new_unpin(tls, port_connections_mgr, err)
- Toggle the current pin status of the track.
- #define tracklist_selections_action_perform_create_audio_fx(pl_setting, track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for an audio FX track.
- #define tracklist_selections_action_perform_create_midi_fx(pl_setting, track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for a MIDI FX track.
- #define tracklist_selections_action_perform_create_instrument(pl_setting, track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for an instrument track.
- #define tracklist_selections_action_perform_create_audio_group(track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for an audio group track.
- #define tracklist_selections_action_perform_create_midi_group(track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for a MIDI group track.
- #define tracklist_selections_action_perform_create_midi(track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for a MIDI track.
- #define tracklist_selections_action_perform_create_folder(track_pos, num_tracks, err)
- Creates a perform TracklistSelectionsAction for a folder track.
- #define tracklist_selections_action_perform_edit_generic(type, tls_before, tls_after, already_edited, err)
- Generic edit action.
- #define tracklist_selections_action_perform_edit_single_float(type, track, val_before, val_after, already_edited, err)
- Convenience wrapper over tracklist_selections_action_perform() for single-track float edit changes.
- #define tracklist_selections_action_perform_edit_single_int(type, track, val_after, already_edited, err)
- Convenience wrapper over tracklist_selections_action_perform() for single-track int edit changes.
- #define tracklist_selections_action_perform_move(tls, port_connections_mgr, track_pos, err)
- Move tls to track_pos.
- #define tracklist_selections_action_perform_move_inside(tls, port_connections_mgr, track_pos, err)
- Move inside a foldable track.
- #define tracklist_selections_action_perform_pin(tls, port_connections_mgr, err)
- Toggle the current pin status of the track.
- #define tracklist_selections_action_perform_unpin(tls, port_connections_mgr, err)
- Toggle the current pin status of the track.
- #define UNDO_MANAGER_PERFORM_AND_PROPAGATE_ERR(action, err, ...)
- Second and last argument given must be a GError **.
Enum documentation
enum ArrangerSelectionsActionResizeType
#include <actions/arranger_selections.h>
Type used when the action is a RESIZE action.
enum ArrangerSelectionsActionEditType
#include <actions/arranger_selections.h>
Type used when the action is an EDIT action.
Enumerators | |
---|---|
ARRANGER_SELECTIONS_ACTION_EDIT_NAME |
Edit the name of the ArrangerObject's in the selection. |
ARRANGER_SELECTIONS_ACTION_EDIT_POS |
Edit a Position of the ArrangerObject's in the selection. This will just set all of the positions on the object. |
ARRANGER_SELECTIONS_ACTION_EDIT_PRIMITIVE |
Edit a primitive (int, etc) member of ArrangerObject's in the selection. This will simply set all relevant primitive values in an ArrangerObject when doing/undoing. |
ARRANGER_SELECTIONS_ACTION_EDIT_SCALE |
For editing the MusicalScale inside ScaleObject's. |
ARRANGER_SELECTIONS_ACTION_EDIT_FADES |
Editing fade positions or curve options. |
ARRANGER_SELECTIONS_ACTION_EDIT_MUTE |
Change mute status. |
ARRANGER_SELECTIONS_ACTION_EDIT_EDITOR_FUNCTION |
For ramping MidiNote velocities or AutomationPoint values. (this is handled by EDIT_PRIMITIVE) MIDI function. |
enum PortActionType
Enumerators | |
---|---|
PORT_ACTION_SET_CONTROL_VAL |
Set control port value. |
enum EditTracksActionType
Action type.
enum UndoableActionType
#include <actions/undoable_action.h>
Type of UndoableAction.
Typedef documentation
typedef enum ArrangerSelectionsActionResizeType ArrangerSelectionsActionResizeType
#include <actions/arranger_selections.h>
Type used when the action is a RESIZE action.
typedef enum ArrangerSelectionsActionEditType ArrangerSelectionsActionEditType
#include <actions/arranger_selections.h>
Type used when the action is an EDIT action.
typedef struct ArrangerSelectionsAction ArrangerSelectionsAction
#include <actions/arranger_selections.h>
The action.
typedef struct TransportAction TransportAction
#include <actions/transport_action.h>
Transport action.
typedef enum UndoableActionType UndoableActionType
#include <actions/undoable_action.h>
Type of UndoableAction.
typedef struct UndoableAction UndoableAction
#include <actions/undoable_action.h>
Base struct to be inherited by implementing undoable actions.
Function documentation
void activate_preferences(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Show preferences window.
void activate_log(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Show preferences window.
void activate_scripting_interface(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Show preferences window.
void activate_audition_mode(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Activate audition mode.
void activate_select_mode(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Activate select mode.
void activate_edit_mode(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Activate edit mode.
void activate_cut_mode(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Activate cut mode.
void activate_eraser_mode(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Activate eraser mode.
void activate_ramp_mode(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Activate ramp mode.
void activate_toggle_top_panel(GSimpleAction* action,
GVariant* variant,
gpointer user_data)
#include <actions/actions.h>
Toggle timeline visibility.
void activate_bind_midi_cc(GSimpleAction* action,
GVariant* _variant,
gpointer user_data)
#include <actions/actions.h>
All purpose menuitem callback for binding MIDI CC to a port.
An action will be performed if bound.
DECLARE_SIMPLE(activate_app_action_wrapper)
#include <actions/actions.h>
Used as a workaround for GTK bug 4422.
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_create_or_delete(ArrangerSelections* sel,
const bool create,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for creating/deleting objects.
Parameters | |
---|---|
sel | |
create | 1 to create 0 to delte. |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_move_or_duplicate(ArrangerSelections* sel,
const bool move,
const double ticks,
const int delta_chords,
const int delta_pitch,
const int delta_tracks,
const int delta_lanes,
const double delta_normalized_amount,
const bool already_moved,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for moving or duplicating objects.
Parameters | |
---|---|
sel | |
move | True to move, false to duplicate. |
ticks | |
delta_chords | |
delta_pitch | |
delta_tracks | |
delta_lanes | |
delta_normalized_amount | Difference in a normalized amount, such as automation point normalized value. |
already_moved | If this is true, the first DO will do nothing. |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_link(ArrangerSelections* sel_before,
ArrangerSelections* sel_after,
const double ticks,
const int delta_tracks,
const int delta_lanes,
const bool already_moved,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for linking regions.
Parameters | |
---|---|
sel_before | Original selections. |
sel_after | Selections after duplication. |
ticks | |
delta_tracks | |
delta_lanes | |
already_moved | If this is true, the first DO will do nothing. |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_edit(ArrangerSelections* sel_before,
ArrangerSelections* sel_after,
ArrangerSelectionsActionEditType type,
bool already_edited,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for editing properties of an object.
Parameters | |
---|---|
sel_before | The selections before the change. |
sel_after | The selections after the change. |
type | Indication of which field has changed. |
already_edited | |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_edit_midi_function(ArrangerSelections* sel_before,
MidiFunctionType midi_func_type,
GError** error)
#include <actions/arranger_selections.h>
Wrapper over arranger_
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_edit_automation_function(ArrangerSelections* sel_before,
AutomationFunctionType automation_func_type,
GError** error)
#include <actions/arranger_selections.h>
Wrapper over arranger_
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_edit_audio_function(ArrangerSelections* sel_before,
AudioFunctionType audio_func_type,
const char* uri,
GError** error)
#include <actions/arranger_selections.h>
Wrapper over arranger_
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_automation_fill(ZRegion* region_before,
ZRegion* region_after,
bool already_changed,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for automation autofill.
Parameters | |
---|---|
region_before | The region before the change. |
region_after | The region after the change. |
already_changed | Whether the change was already made. |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_split(ArrangerSelections* sel,
const Position* pos,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for splitting ArrangerObject's.
Parameters | |
---|---|
sel | |
pos | Global position to split at. |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_merge(ArrangerSelections* sel,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for merging ArrangerObject's.
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_resize(ArrangerSelections* sel,
ArrangerSelectionsActionResizeType type,
const double ticks,
const bool already_resized,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action for resizing ArrangerObject's.
Parameters | |
---|---|
sel | |
type | |
ticks | How many ticks to add to the resizing edge. |
already_resized | |
error |
WARN_UNUSED_RESULT UndoableAction* arranger_selections_action_new_quantize(ArrangerSelections* sel,
QuantizeOptions* opts,
GError** error)
#include <actions/arranger_selections.h>
Creates a new action fro quantizing ArrangerObject's.
Parameters | |
---|---|
sel | |
opts | Quantize options. |
error |
WARN_UNUSED_RESULT UndoableAction* channel_send_action_new(ChannelSend* send, ChannelSendActionType type, Port* port, StereoPorts* stereo, float amount, const PortConnectionsManager* port_connections_mgr, GError** error)
Creates a new action.
Parameters | |
---|---|
send | |
type | |
port | MIDI port, if connecting MIDI. |
stereo | Stereo ports, if connecting audio. |
amount | |
port_connections_mgr | Port connections manager at the start of the action, if needed. |
error |
bool channel_send_action_perform(ChannelSend* send, ChannelSendActionType type, Port* port, StereoPorts* stereo, float amount, const PortConnectionsManager* port_connections_mgr, GError** error)
Wrapper to create action and perform it.
Parameters | |
---|---|
send | |
type | |
port | |
stereo | |
amount | |
port_connections_mgr | Port connections manager at the start of the action, if needed. |
error |
WARN_UNUSED_RESULT UndoableAction* range_action_new(RangeActionType type, Position* start_pos, Position* end_pos, GError** error)
Creates a new action.
Parameters | |
---|---|
type | |
start_pos | Range start. |
end_pos | Range end. |
error |
WARN_UNUSED_RESULT UndoableAction* tracklist_selections_action_new(TracklistSelectionsActionType type, TracklistSelections* tls_before, TracklistSelections* tls_after, const PortConnectionsManager* port_connections_mgr, Track* track, TrackType track_type, PluginSetting* pl_setting, SupportedFile* file_descr, int track_pos, const Position* pos, int num_tracks, EditTracksActionType edit_type, int ival_after, const GdkRGBA* color_new, float val_before, float val_after, const char* new_txt, bool already_edited, GError** error)
Creates a new TracklistSelectionsAction.
Parameters | |
---|---|
type | |
tls_before | Tracklist selections to act upon. |
tls_after | |
port_connections_mgr | Port connections manager at the start of the action. |
track | Track, if single-track action. Used if tls_before and tls_after are NULL. |
track_type | |
pl_setting | Plugin setting, if any. |
file_descr | |
track_pos | |
pos | Position to make the tracks at. |
num_tracks | |
edit_type | |
ival_after | |
color_new | |
val_before | |
val_after | |
new_txt | |
already_edited | |
error | To be filled in if an error occured. |
bool tracklist_selections_action_perform_set_direct_out(TracklistSelections* self, PortConnectionsManager* port_connections_mgr, Track* direct_out, GError** error)
Edit or remove direct out.
Parameters | |
---|---|
self | |
port_connections_mgr | |
direct_out | A track to route the selections to, or NULL to route nowhere. |
error | |
Returns | Whether successful. |
int undo_manager_perform(UndoManager* self, UndoableAction* action, GError** error)
Performs the action and pushes it to the undo stack.
Returns | Non-zero if error. |
---|
NONNULL size_t undo_stack_get_total_cached_actions(UndoStack* self)
Returns the total cached actions.
Used when loading projects and for error checking.
NONNULL void undoable_action_init(UndoableAction* self,
UndoableActionType type)
#include <actions/undoable_action.h>
Initializer to be used by implementing actions.
NONNULL bool undoable_action_needs_pause(UndoableAction* self)
#include <actions/undoable_action.h>
Returns whether the action requires pausing the engine.
NONNULL bool undoable_action_can_contain_clip(UndoableAction* self)
#include <actions/undoable_action.h>
Checks whether the action can contain an audio clip.
No attempt is made to remove unnused files from the pool for actions that can't contain audio clips.
NONNULL bool undoable_action_contains_clip(UndoableAction* self,
AudioClip* clip)
#include <actions/undoable_action.h>
Checks whether the action actually contains or refers to the given audio clip.
NONNULL void undoable_action_set_num_actions(UndoableAction* self,
int num_actions)
#include <actions/undoable_action.h>
Sets the number of actions for this action.
This should be set on the last action to be performed.
void undoable_action_save_or_load_port_connections(UndoableAction* self,
bool _do,
PortConnectionsManager** before,
PortConnectionsManager** after)
#include <actions/undoable_action.h>
To be used by actions that save/load port connections.
Parameters | |
---|---|
self | |
_do | True if doing/performing, false if undoing. |
before | Pointer to the connections before. |
after | Pointer to the connections after. |
int undoable_action_do(UndoableAction* self,
GError** error)
#include <actions/undoable_action.h>
Performs the action.
Returns | Non-zero if errors occurred. |
---|
int undoable_action_undo(UndoableAction* self,
GError** error)
#include <actions/undoable_action.h>
Undoes the action.
Returns | Non-zero if errors occurred. |
---|
NONNULL char* undoable_action_to_string(UndoableAction* ua)
#include <actions/undoable_action.h>
Stringizes the action to be used in Undo/Redo buttons.
The string MUST be free'd using g_free().
Define documentation
#define tracklist_selections_action_new_move(tls, port_connections_mgr, track_pos, err)
Move tls to track_pos.
Parameters | |
---|---|
tls | |
port_connections_mgr | |
track_pos | Track position indicating the track to push down and insert the selections above. This is the track position before the move will be executed. |
err |
Tracks starting at track_pos will be pushed down.
#define tracklist_selections_action_new_move_inside(tls, port_connections_mgr, track_pos, err)
Move inside a foldable track.
Parameters | |
---|---|
tls | |
port_connections_mgr | |
track_pos | Foldable track index. |
err |
When foldable tracks are included in tls, all their children must be marked as selected as well before calling this.
#define tracklist_selections_action_perform_move(tls, port_connections_mgr, track_pos, err)
Move tls to track_pos.
Parameters | |
---|---|
tls | |
port_connections_mgr | |
track_pos | Track position indicating the track to push down and insert the selections above. This is the track position before the move will be executed. |
err |
Tracks starting at track_pos will be pushed down.
#define tracklist_selections_action_perform_move_inside(tls, port_connections_mgr, track_pos, err)
Move inside a foldable track.
Parameters | |
---|---|
tls | |
port_connections_mgr | |
track_pos | Foldable track index. |
err |
When foldable tracks are included in tls, all their children must be marked as selected as well before calling this.