![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "database/history_snapshot_repository.h"#include "database/database.h"#include "database/sql_debug.h"#include "system/macros.h"#include <sqlite3.h>
Include dependency graph for history_snapshot_repository.c:Go to the source code of this file.
Functions | |
| static gboolean | _run_snap_imgid (const char *query, const int snap_id, const int32_t imgid, const int expected) |
| 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. | |
| 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. | |
| 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. | |
|
static |
Definition at line 29 of file history_snapshot_repository.c.
References dt_database_get_sqlite3_global(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, and L.
Referenced by dt_history_snapshot_repository_clear(), dt_history_snapshot_repository_create(), and dt_history_snapshot_repository_restore().
Drop snapshot snap_id of imgid from all three undo tables.
Definition at line 140 of file history_snapshot_repository.c.
References _run_snap_imgid(), and L.
Referenced by _clear_undo_snapshot().
| 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.
| empty_history | TRUE when the image has no history at all. A placeholder row goes into memory.undo_history instead of the three copies, so that the next dt_history_snapshot_repository_next_id() still counts this snapshot. |
Definition at line 56 of file history_snapshot_repository.c.
References _run_snap_imgid(), dt_database_release_transaction, dt_database_rollback_transaction(), dt_database_start_transaction, L, and TRUE.
Referenced by dt_history_snapshot_undo_create().
| 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.
Definition at line 41 of file history_snapshot_repository.c.
References dt_database_get_sqlite3_global(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, and L.
Referenced by dt_history_snapshot_undo_create().
Copy snapshot snap_id of imgid back over the live history tables.
common/history_snapshot.c opens the transaction around both. Definition at line 111 of file history_snapshot_repository.c.
References _run_snap_imgid(), and L.
Referenced by _history_snapshot_undo_restore().