10#ifndef __UNDO_UNDO_MANAGER_H__
11#define __UNDO_UNDO_MANAGER_H__
25#define UNDO_MANAGER (PROJECT->undo_manager)
87#define UNDO_MANAGER_PERFORM_AND_PROPAGATE_ERR(action, err, ...) \
89 g_return_val_if_fail ( \
90 router_is_processing_thread (ROUTER) == false, false); \
91 UndoableAction * ua = action (__VA_ARGS__); \
94 int ret = undo_manager_perform (UNDO_MANAGER, ua, err); \
87#define UNDO_MANAGER_PERFORM_AND_PROPAGATE_ERR(action, err, ...) \ …
NONNULL void undo_manager_get_plugins(UndoManager *self, GPtrArray *arr)
Returns all plugins in the undo stacks.
NONNULL bool undo_manager_contains_clip(UndoManager *self, AudioClip *clip)
Returns whether the given clip is used by any stack.
int undo_manager_perform(UndoManager *self, UndoableAction *action, GError **error)
Performs the action and pushes it to the undo stack.
WARN_UNUSED_RESULT UndoManager * undo_manager_new(void)
Inits the undo manager by creating the undo/redo stacks.
NONNULL void undo_manager_clear_stacks(UndoManager *self, bool free)
Clears the undo and redo stacks.
NONNULL UndoableAction * undo_manager_get_last_action(UndoManager *self)
Returns the last performed action, or NULL if the stack is empty.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
NONNULL void undo_manager_init_loaded(UndoManager *self)
Inits the undo manager by populating the undo/redo stacks.
Audio clips for the pool.
bool redo_stack_locked
Whether the redo stack is currently locked.
ZixSem action_sem
Semaphore for performing actions.
Serializable stack for undoable actions.
Base struct to be inherited by implementing undoable actions.