1 #ifndef UNDO_HISTORY_H_
2 #define UNDO_HISTORY_H_
4 #include "ring_buffer.h"
6 typedef void (*RevertAction)(void *context, size_t context_size);
13 UndoHistory *create_undo_history_from_memory(Memory *memory);
15 void undo_history_push(UndoHistory *undo_history,
18 size_t context_data_size);
19 void undo_history_pop(UndoHistory *undo_history);
21 void undo_history_clean(UndoHistory *undo_history);
24 int undo_history_empty(UndoHistory *undo_history)
26 return undo_history->actions.count == 0;
29 #endif // UNDO_HISTORY_H_