gboolean dt_history_snapshot_repository_restore(const int snap_id, const int32_t imgid)
Copy snapshot snap_id of imgid back over the live history tables.
void dt_history_snapshot_repository_clear(const int snap_id, const int32_t imgid)
Drop snapshot snap_id of imgid from all three undo tables.
gboolean dt_history_snapshot_repository_create(const int snap_id, const int32_t imgid, const gboolean empty_history)
Copy imgid's history, masks history and module order into the undo tables.
int dt_history_snapshot_repository_next_id(const int32_t imgid)
The id the next snapshot of imgid should use: one past the highest taken.
static gboolean _run_snap_imgid(const char *query, const int snap_id, const int32_t imgid, const int expected)
memory.undo_history, memory.undo_masks_history, memory.undo_module_order.