![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <gtk/gtk.h>#include <inttypes.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 char | dt_dev_operation_t[20] |
| The string identifying an operation in the history stack ("exposure", "colorbalancergb", ...): the identity every history item, preset row and raster-mask source reference is keyed on. | |
| typedef struct dt_history_copy_item_t | dt_history_copy_item_t |
| typedef struct dt_history_item_t | dt_history_item_t |
| typedef const char *(* | dt_history_operation_name_resolver_t) (const char *operation) |
| Turns an operation string ("exposure", "colorbalancergb") into the name a user should read. | |
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) |
| 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) |
| void | dt_history_set_operation_name_resolver (dt_history_operation_name_resolver_t resolver) |
| const char * | dt_history_operation_name (const char *operation) |
Resolve operation through the installed resolver, or return it unchanged. | |
| typedef char dt_dev_operation_t[20] |
The string identifying an operation in the history stack ("exposure", "colorbalancergb", ...): the identity every history item, preset row and raster-mask source reference is keyed on.
Lived in control/settings.h historically, which used it for nothing — while develop/imageop.h trailed control/signal.h into all 122 of its consumers just to reach this one typedef. It keeps the dt_dev_ prefix for now; renaming a symbol this widespread is its own change, not a relocation's.
| typedef struct dt_history_copy_item_t dt_history_copy_item_t |
| typedef struct dt_history_item_t dt_history_item_t |
| typedef const char *(* dt_history_operation_name_resolver_t) (const char *operation) |
Turns an operation string ("exposure", "colorbalancergb") into the name a user should read.
Only the side of the application that loaded the modules can answer: the mapping is built from the module list, and the names come from each module's own translation. That is dt_iop_get_localized_name(), in develop/imageop.c – layer 5, and the single reason this file reached out of layer 1 at all, for three calls that do nothing but label a history line.
With no resolver installed the answer is the operation string itself: legible, if untranslated. dt_init() installs one before anything reads history, and ansel-cli loads the module list too, so the fallback is for unit tests.
| void dt_history_delete_on_image | ( | int32_t | imgid | ) |
delete all history for the given image
Definition at line 130 of file history/history.c.
References DT_HISTORY_CHANGE_TAGS, dt_history_changed(), dt_history_delete_on_image_ext(), and TRUE.
Referenced by dt_control_duplicate_images_job_run().
| void dt_history_delete_on_image_ext | ( | int32_t | imgid, |
| gboolean | undo | ||
| ) |
as above but control whether to record undo/redo
Definition at line 95 of file history/history.c.
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, dt_history_repository_delete_all_for_image(), 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_thumbnail_notify_image_changed(), dt_undo_end_group(), dt_undo_get_global(), DT_UNDO_LT_HISTORY, dt_undo_record(), dt_undo_start_group(), FALSE, dt_undo_lt_history_t::imgid, and TRUE.
Referenced by _history_delete_apply(), _history_snapshot_undo_restore(), and dt_history_delete_on_image().
| GList * dt_history_get_items | ( | int32_t | imgid, |
| gboolean | enabled | ||
| ) |
get list of history items for image
Definition at line 163 of file history/history.c.
References _collect_item(), dt_history_repository_foreach_last_item(), and enabled.
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
Definition at line 190 of file history/history.c.
References _collect_item_string(), dt_free_gpointer(), dt_history_repository_foreach_item(), dt_util_glist_to_str(), and items.
Referenced by _altered_enter(), and main().
| char * dt_history_item_as_string | ( | const char * | name, |
| gboolean | enabled | ||
| ) |
get a single history item as string with enabled status
Definition at line 136 of file history/history.c.
Referenced by _collect_item_string().
| void dt_history_item_free | ( | gpointer | data | ) |
helper function to free a GList of dt_history_item_t
Definition at line 73 of file history/history.c.
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().
| const char * dt_history_operation_name | ( | const char * | operation | ) |
Resolve operation through the installed resolver, or return it unchanged.
Definition at line 66 of file history/history.c.
References _operation_name_resolver.
Referenced by _collect_item(), and _collect_item_string().
| void dt_history_set_operation_name_resolver | ( | dt_history_operation_name_resolver_t | resolver | ) |
Definition at line 61 of file history/history.c.
References _operation_name_resolver.
Referenced by dt_init().