![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for undo.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_undo_t |
Typedefs | |
| typedef enum dt_undo_type_t | dt_undo_type_t |
| typedef enum dt_undo_action_t | dt_undo_action_t |
| typedef void * | dt_undo_data_t |
| typedef struct dt_undo_t | dt_undo_t |
Enumerations | |
| enum | dt_undo_type_t { DT_UNDO_NONE = 0 , DT_UNDO_GEOTAG = 1 << 0 , DT_UNDO_HISTORY = 1 << 1 , DT_UNDO_MASK = 1 << 2 , DT_UNDO_RATINGS = 1 << 3 , DT_UNDO_COLORLABELS = 1 << 4 , DT_UNDO_TAGS = 1 << 5 , DT_UNDO_METADATA = 1 << 6 , DT_UNDO_LT_HISTORY = 1 << 7 , DT_UNDO_FLAGS = 1 << 8 , DT_UNDO_DATETIME = 1 << 9 , DT_UNDO_DUPLICATE = 1 << 10 , DT_UNDO_REMOVE = 1 << 11 , DT_UNDO_DEVELOP , DT_UNDO_LIGHTTABLE , DT_UNDO_MAP = DT_UNDO_GEOTAG | DT_UNDO_TAGS | DT_UNDO_DATETIME , DT_UNDO_ALL = DT_UNDO_MAP | DT_UNDO_DEVELOP | DT_UNDO_LIGHTTABLE } |
| enum | dt_undo_action_t { DT_ACTION_UNDO , DT_ACTION_REDO } |
Functions | |
| dt_undo_t * | dt_undo_init (void) |
| void | dt_undo_cleanup (dt_undo_t *self) |
| dt_undo_t * | dt_undo_get_global (void) |
| void | dt_undo_start_group (dt_undo_t *self, dt_undo_type_t type) |
| void | dt_undo_end_group (dt_undo_t *self) |
| void | dt_undo_record (dt_undo_t *self, gpointer user_data, dt_undo_type_t type, dt_undo_data_t data, void(*undo)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item, dt_undo_action_t action, GList **imgs), void(*free_data)(gpointer data)) |
| void | dt_undo_do_undo (dt_undo_t *self, uint32_t filter) |
| void | dt_undo_do_redo (dt_undo_t *self, uint32_t filter) |
| void | dt_undo_clear (dt_undo_t *self, uint32_t filter) |
| void | dt_undo_iterate_internal (dt_undo_t *self, uint32_t filter, gpointer user_data, void(*apply)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item)) |
| void | dt_undo_iterate (dt_undo_t *self, uint32_t filter, gpointer user_data, void(*apply)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item)) |
| void | dt_undo_disable_next (dt_undo_t *self) |
| gboolean | dt_is_undo_list_populated (dt_undo_t *self, uint32_t filter) |
| gboolean | dt_is_redo_list_populated (dt_undo_t *self, uint32_t filter) |
| int | dt_undo_list_length (dt_undo_t *self, uint32_t filter) |
How many records match filter, so a caller can tell a one-record undo from a batch of a thousand. The GUI uses it to decide whether an operation is worth announcing: popping a whole removal runs on the GUI thread and takes tens of seconds, while an ordinary rating change is instant and must not raise a toast. | |
| int | dt_redo_list_length (dt_undo_t *self, uint32_t filter) |
| typedef enum dt_undo_action_t dt_undo_action_t |
| typedef void* dt_undo_data_t |
| typedef enum dt_undo_type_t dt_undo_type_t |
| enum dt_undo_action_t |
| enum dt_undo_type_t |
| gboolean dt_is_redo_list_populated | ( | dt_undo_t * | self, |
| uint32_t | filter | ||
| ) |
Definition at line 331 of file undo.c.
References _is_do_undo_list_populated(), and DT_ACTION_REDO.
Referenced by redo_sensitive_callback().
| gboolean dt_is_undo_list_populated | ( | dt_undo_t * | self, |
| uint32_t | filter | ||
| ) |
Definition at line 326 of file undo.c.
References _is_do_undo_list_populated(), and DT_ACTION_UNDO.
Referenced by undo_sensitive_callback().
| int dt_redo_list_length | ( | dt_undo_t * | self, |
| uint32_t | filter | ||
| ) |
Definition at line 341 of file undo.c.
References _do_undo_list_length(), and DT_ACTION_REDO.
Referenced by redo_callback().
Definition at line 76 of file undo.c.
References dt_pthread_mutex_destroy(), DT_UNDO_ALL, dt_undo_clear(), and dt_undo_t::mutex.
Referenced by dt_cleanup().
Definition at line 367 of file undo.c.
References _undo_clear_list(), dt_undo_t::disable_next, FALSE, IS_NULL_PTR, LOCK, dt_undo_t::redo_list, dt_undo_t::undo_list, and UNLOCK.
Referenced by _darkroom_image_loaded_callback(), dt_undo_cleanup(), dt_view_manager_switch_by_view(), and enter().
Definition at line 70 of file undo.c.
References dt_undo_t::disable_next, DT_DEBUG_UNDO, dt_print(), and TRUE.
Definition at line 272 of file undo.c.
References _undo_do_undo_redo(), and DT_ACTION_REDO.
Referenced by redo_callback().
Definition at line 277 of file undo.c.
References _undo_do_undo_redo(), and DT_ACTION_UNDO.
Referenced by undo_callback().
Definition at line 149 of file undo.c.
References _undo_record(), DT_DEBUG_UNDO, dt_print(), DT_UNDO_NONE, dt_undo_t::group, dt_undo_t::group_indent, IS_NULL_PTR, and TRUE.
Referenced by _history_action_on_list_with_undo(), dt_colorlabels_toggle_label_on_list(), dt_control_duplicate_images_job_run(), dt_control_flip_images_job_run(), dt_control_monochrome_images_job_run(), dt_control_remove_images_job_run(), dt_history_delete_on_image_ext(), dt_image_set_datetime(), dt_image_set_datetimes(), dt_image_set_images_locations(), dt_image_set_locations(), dt_metadata_clear(), dt_metadata_set(), dt_metadata_set_list(), dt_metadata_set_list_id(), dt_multiple_styles_apply_to_list(), dt_ratings_apply_on_image(), dt_ratings_apply_on_list(), dt_styles_apply_to_image(), dt_tag_attach_images(), dt_tag_attach_string_list(), dt_tag_detach_images(), and dt_tag_set_tags().
Definition at line 611 of file darktable.c.
References darktable, and darktable_t::undo.
Referenced by _check_deleted_instances(), _create_deleted_modules(), _darkroom_image_loaded_callback(), _history_action_on_list_with_undo(), _history_delete_apply(), _history_load_and_apply_apply(), _history_style_apply(), _image_duplicate_with_version(), _image_remove(), _image_set_monochrome_flag(), dt_colorlabels_toggle_label_on_list(), dt_control_duplicate_images_job_run(), dt_control_flip_images_job_run(), dt_control_monochrome_images_job_run(), dt_control_remove_images_job_run(), dt_dev_history_undo_end_record_locked(), dt_dev_history_undo_invalidate_module(), dt_history_copy_and_paste_on_image(), dt_history_delete_on_image_ext(), dt_image_flip(), dt_image_set_datetime(), dt_image_set_datetimes(), dt_image_set_images_locations(), dt_image_set_locations(), dt_metadata_clear(), dt_metadata_set(), dt_metadata_set_list(), dt_metadata_set_list_id(), dt_multiple_styles_apply_to_list(), dt_ratings_apply_on_image(), dt_ratings_apply_on_list(), dt_styles_apply_to_image(), dt_tag_attach_images(), dt_tag_attach_string_list(), dt_tag_detach_images(), dt_tag_set_tags(), dt_view_manager_switch_by_view(), enter(), redo_callback(), redo_sensitive_callback(), undo_callback(), and undo_sensitive_callback().
Definition at line 50 of file undo.c.
References dt_undo_t::disable_next, DT_DEBUG_UNDO, dt_print(), dt_pthread_mutex_init(), DT_UNDO_NONE, FALSE, dt_undo_t::group, dt_undo_t::group_indent, dt_undo_t::locked, dt_undo_t::mutex, dt_undo_t::redo_list, and dt_undo_t::undo_list.
Referenced by dt_init().
| void dt_undo_iterate | ( | dt_undo_t * | self, |
| uint32_t | filter, | ||
| gpointer | user_data, | ||
| void(*)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item) | apply | ||
| ) |
Definition at line 404 of file undo.c.
References dt_undo_iterate_internal(), IS_NULL_PTR, LOCK, and UNLOCK.
| void dt_undo_iterate_internal | ( | dt_undo_t * | self, |
| uint32_t | filter, | ||
| gpointer | user_data, | ||
| void(*)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item) | apply | ||
| ) |
Definition at line 394 of file undo.c.
References _undo_iterate(), IS_NULL_PTR, dt_undo_t::redo_list, and dt_undo_t::undo_list.
Referenced by _check_deleted_instances(), _create_deleted_modules(), dt_dev_history_undo_invalidate_module(), and dt_undo_iterate().
| int dt_undo_list_length | ( | dt_undo_t * | self, |
| uint32_t | filter | ||
| ) |
How many records match filter, so a caller can tell a one-record undo from a batch of a thousand. The GUI uses it to decide whether an operation is worth announcing: popping a whole removal runs on the GUI thread and takes tens of seconds, while an ordinary rating change is instant and must not raise a toast.
Definition at line 336 of file undo.c.
References _do_undo_list_length(), and DT_ACTION_UNDO.
Referenced by undo_callback().
| void dt_undo_record | ( | dt_undo_t * | self, |
| gpointer | user_data, | ||
| dt_undo_type_t | type, | ||
| dt_undo_data_t | data, | ||
| void(*)(gpointer user_data, dt_undo_type_t type, dt_undo_data_t item, dt_undo_action_t action, GList **imgs) | undo, | ||
| void(*)(gpointer data) | free_data | ||
| ) |
Definition at line 163 of file undo.c.
References _undo_record(), FALSE, and type.
Referenced by _history_delete_apply(), _history_load_and_apply_apply(), _history_style_apply(), _image_duplicate_with_version(), _image_remove(), _image_set_monochrome_flag(), dt_colorlabels_toggle_label_on_list(), dt_dev_history_undo_end_record_locked(), dt_history_copy_and_paste_on_image(), dt_history_delete_on_image_ext(), dt_image_flip(), dt_image_set_datetime(), dt_image_set_datetimes(), dt_image_set_images_locations(), dt_image_set_locations(), dt_metadata_clear(), dt_metadata_set(), dt_metadata_set_list(), dt_metadata_set_list_id(), dt_ratings_apply_on_image(), dt_ratings_apply_on_list(), dt_tag_attach_images(), dt_tag_attach_string_list(), dt_tag_detach_images(), and dt_tag_set_tags().
| void dt_undo_start_group | ( | dt_undo_t * | self, |
| dt_undo_type_t | type | ||
| ) |
Definition at line 134 of file undo.c.
References _undo_record(), DT_DEBUG_UNDO, dt_print(), DT_UNDO_NONE, dt_undo_t::group, dt_undo_t::group_indent, IS_NULL_PTR, TRUE, and type.
Referenced by _history_action_on_list_with_undo(), dt_colorlabels_toggle_label_on_list(), dt_control_duplicate_images_job_run(), dt_control_flip_images_job_run(), dt_control_monochrome_images_job_run(), dt_control_remove_images_job_run(), dt_history_delete_on_image_ext(), dt_image_set_datetime(), dt_image_set_datetimes(), dt_image_set_images_locations(), dt_image_set_locations(), dt_metadata_clear(), dt_metadata_set(), dt_metadata_set_list(), dt_metadata_set_list_id(), dt_multiple_styles_apply_to_list(), dt_ratings_apply_on_image(), dt_ratings_apply_on_list(), dt_styles_apply_to_image(), dt_tag_attach_images(), dt_tag_attach_string_list(), dt_tag_detach_images(), and dt_tag_set_tags().