![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <gtk/gtk.h>#include <inttypes.h>#include <sqlite3.h>#include "common/history_actions.h"#include "common/image_cache.h"
Include dependency graph for history.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_history_copy_item_t |
| struct | dt_history_item_t |
Typedefs | |
| typedef struct dt_history_copy_item_t | dt_history_copy_item_t |
| typedef void(* | dt_history_db_row_cb) (void *user_data, const int32_t imgid, const int num, const int module_version, const char *operation, const void *op_params, const int op_params_len, const gboolean enabled, const void *blendop_params, const int blendop_params_len, const int blendop_version, const int multi_priority, const char *multi_name, const char *preset_name) |
| typedef struct dt_history_item_t | dt_history_item_t |
Functions | |
| void | dt_history_item_free (gpointer data) |
| void | dt_history_delete_on_image (int32_t imgid) |
| void | dt_history_delete_on_image_ext (int32_t imgid, gboolean undo) |
| int32_t | dt_history_get_end (const int32_t imgid) |
| gboolean | dt_history_set_end (const int32_t imgid, const int32_t history_end) |
| void | dt_history_db_foreach_history_row (const int32_t imgid, dt_history_db_row_cb cb, void *user_data) |
| void | dt_history_db_foreach_auto_preset_row (const int32_t imgid, const struct dt_image_t *image, const char *workflow_preset, const int iformat, const int excluded, dt_history_db_row_cb cb, void *user_data) |
| gboolean | dt_history_db_get_autoapply_ioporder_params (const int32_t imgid, const struct dt_image_t *image, const int iformat, const int excluded, void **params, int32_t *params_len) |
| int32_t | dt_history_db_get_next_history_num (const int32_t imgid) |
| gboolean | dt_history_db_delete_history (const int32_t imgid) |
| gboolean | dt_history_db_delete_masks_history (const int32_t imgid) |
| gboolean | dt_history_db_delete_dev_history (const int32_t imgid) |
| gboolean | dt_history_db_shift_history_nums (const int32_t imgid, const int delta) |
| gboolean | dt_history_db_write_history_item (const int32_t imgid, const int num, const char *operation, const void *op_params, const int op_params_size, const int module_version, const int enabled, const void *blendop_params, const int blendop_params_size, const int blendop_version, const int multi_priority, const char *multi_name) |
| GList * | dt_history_duplicate (GList *hist) |
| Deep-copy a history list. | |
| GList * | dt_history_get_items (int32_t imgid, gboolean enabled) |
| char * | dt_history_get_items_as_string (int32_t imgid) |
| char * | dt_history_item_as_string (const char *name, gboolean enabled) |
| gboolean | dt_history_check_module_exists (int32_t imgid, const char *operation, gboolean enabled) |
| void | dt_history_cleanup (void) |
| void | dt_history_hash_set_mipmap (const int32_t imgid, const uint64_t history_hash, const dt_image_cache_write_mode_t mode) |
| typedef struct dt_history_copy_item_t dt_history_copy_item_t |
| typedef void(* dt_history_db_row_cb) (void *user_data, const int32_t imgid, const int num, const int module_version, const char *operation, const void *op_params, const int op_params_len, const gboolean enabled, const void *blendop_params, const int blendop_params_len, const int blendop_version, const int multi_priority, const char *multi_name, const char *preset_name) |
low-level DB helpers (used by develop/dev_history.c)
| typedef struct dt_history_item_t dt_history_item_t |
| gboolean dt_history_check_module_exists | ( | int32_t | imgid, |
| const char * | operation, | ||
| gboolean | enabled | ||
| ) |
References _history_check_module_exists_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), FALSE, and TRUE.
Referenced by _insert_default_modules().
cleanup cached statements
References _history_auto_ioporder_stmt, _history_auto_presets_legacy_stmt, _history_auto_presets_stmt, _history_check_module_exists_stmt, _history_delete_history_stmt, _history_delete_masks_stmt, _history_get_end_stmt, _history_get_next_num_stmt, _history_hash_set_mipmap_stmt, _history_insert_num_stmt, _history_select_history_stmt, _history_select_num_stmt, _history_set_end_stmt, _history_shift_history_nums_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), _history_update_item_stmt, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by dt_cleanup().
| gboolean dt_history_db_delete_dev_history | ( | const int32_t | imgid | ) |
References dt_history_db_delete_history(), dt_history_db_delete_masks_history(), FALSE, and TRUE.
Referenced by _cleanup_history().
| gboolean dt_history_db_delete_history | ( | const int32_t | imgid | ) |
References _history_delete_history_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), and FALSE.
Referenced by dt_exif_xmp_read(), and dt_history_db_delete_dev_history().
| gboolean dt_history_db_delete_masks_history | ( | const int32_t | imgid | ) |
References _history_delete_masks_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), and FALSE.
Referenced by dt_exif_xmp_read(), and dt_history_db_delete_dev_history().
| void dt_history_db_foreach_auto_preset_row | ( | const int32_t | imgid, |
| const struct dt_image_t * | image, | ||
| const char * | workflow_preset, | ||
| const int | iformat, | ||
| const int | excluded, | ||
| dt_history_db_row_cb | cb, | ||
| void * | user_data | ||
| ) |
| void dt_history_db_foreach_history_row | ( | const int32_t | imgid, |
| dt_history_db_row_cb | cb, | ||
| void * | user_data | ||
| ) |
| gboolean dt_history_db_get_autoapply_ioporder_params | ( | const int32_t | imgid, |
| const struct dt_image_t * | image, | ||
| const int | iformat, | ||
| const int | excluded, | ||
| void ** | params, | ||
| int32_t * | params_len | ||
| ) |
| int32_t dt_history_db_get_next_history_num | ( | const int32_t | imgid | ) |
References _history_get_next_num_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by dt_add_hist(), dt_dev_read_history_ext(), dt_exif_xmp_read(), and dt_image_set_flip().
| gboolean dt_history_db_shift_history_nums | ( | const int32_t | imgid, |
| const int | delta | ||
| ) |
References _history_shift_history_nums_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, delta, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), and TRUE.
Referenced by dt_exif_xmp_read().
| gboolean dt_history_db_write_history_item | ( | const int32_t | imgid, |
| const int | num, | ||
| const char * | operation, | ||
| const void * | op_params, | ||
| const int | op_params_size, | ||
| const int | module_version, | ||
| const int | enabled, | ||
| const void * | blendop_params, | ||
| const int | blendop_params_size, | ||
| const int | blendop_version, | ||
| const int | multi_priority, | ||
| const char * | multi_name | ||
| ) |
| void dt_history_delete_on_image | ( | int32_t | imgid | ) |
delete all history for the given image
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_history_delete_on_image_ext(), DT_SIGNAL_TAG_CHANGED, darktable_t::signals, and TRUE.
Referenced by dt_control_duplicate_images_job_run(), and history_delete().
| void dt_history_delete_on_image_ext | ( | int32_t | imgid, |
| gboolean | undo | ||
| ) |
as above but control whether to record undo/redo
References _remove_preset_flag(), dt_undo_lt_history_t::after, dt_undo_lt_history_t::after_history_end, dt_undo_lt_history_t::before, dt_undo_lt_history_t::before_history_end, darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_history_snapshot_item_init(), dt_history_snapshot_undo_create(), dt_history_snapshot_undo_lt_history_data_free(), dt_history_snapshot_undo_pop(), dt_mipmap_cache_remove(), dt_tag_detach_by_string(), dt_thumbtable_refresh_thumbnail, dt_undo_end_group(), DT_UNDO_LT_HISTORY, dt_undo_record(), dt_undo_start_group(), FALSE, darktable_t::gui, dt_undo_lt_history_t::imgid, darktable_t::mipmap_cache, dt_ui_t::thumbtable_lighttable, TRUE, dt_gui_gtk_t::ui, and darktable_t::undo.
Referenced by _history_delete_apply(), _history_snapshot_undo_restore(), dt_history_delete_on_image(), and gui_reset().
| GList * dt_history_duplicate | ( | GList * | hist | ) |
Deep-copy a history list.
Duplicates params, blend params and masks for each history item.
| hist | Source history list. |
References dt_dev_history_item_t::blend_params, dt_masks_dup_forms_deep(), dt_dev_history_item_t::forms, h, dt_dev_history_item_t::op_name, dt_dev_history_item_t::params, and dt_iop_module_t::params.
Referenced by _hm_backup_dest(), _pop_undo(), dt_dev_history_undo_end_record_locked(), and dt_dev_history_undo_start_record_locked().
| int32_t dt_history_get_end | ( | const int32_t | imgid | ) |
read history_end from database for an image (main.images.history_end)
References _history_get_end_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by dt_dev_read_history_ext(), and dt_history_snapshot_undo_create().
| GList * dt_history_get_items | ( | int32_t | imgid, |
| gboolean | enabled | ||
| ) |
get list of history items for image
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, dt_iop_get_localized_name(), dt_history_item_t::enabled, dt_history_item_t::name, name, dt_history_item_t::num, and dt_history_item_t::op.
Referenced by _gui_styles_dialog_run(), and dt_gui_hist_dialog_new().
| char * dt_history_get_items_as_string | ( | int32_t | imgid | ) |
get list of history items for image as a nice string
References darktable, darktable_t::db, delete_underscore(), dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, dt_free_gpointer(), dt_history_item_as_string(), dt_iop_get_localized_name(), dt_util_glist_to_str(), items, and name.
Referenced by _altered_enter(), and main().
| void dt_history_hash_set_mipmap | ( | const int32_t | imgid, |
| const uint64_t | history_hash, | ||
| const dt_image_cache_write_mode_t | mode | ||
| ) |
update mipmap hash in database from the provided image history hash
References darktable, dt_image_cache_get(), dt_image_cache_write_release(), darktable_t::image_cache, and dt_image_t::mipmap_hash.
Referenced by _generate_blocking(), dt_imageio_export_with_flags(), and dt_mipmap_cache_deallocate_dynamic().
| char * dt_history_item_as_string | ( | const char * | name, |
| gboolean | enabled | ||
| ) |
get a single history item as string with enabled status
References name.
Referenced by dt_history_get_items_as_string().
| void dt_history_item_free | ( | gpointer | data | ) |
helper function to free a GList of dt_history_item_t
References dt_free, dt_history_item_t::name, and dt_history_item_t::op.
Referenced by _gui_styles_dialog_run(), and dt_gui_hist_dialog_new().
| gboolean dt_history_set_end | ( | const int32_t | imgid, |
| const int32_t | history_end | ||
| ) |
write history_end to database for an image (main.images.history_end)
References _history_set_end_stmt, _history_stmt_mutex, _history_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), and FALSE.
Referenced by _history_snapshot_undo_restore(), dt_add_hist(), dt_dev_write_history_ext(), dt_exif_xmp_read(), and dt_image_set_flip().