![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <glib.h>
Include dependency graph for history/presets.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Typedefs | |
| typedef enum dt_presets_format_flag_t | dt_presets_format_flag_t |
Which image kinds a preset applies to. Persisted in the presets database (database/preset_repository.h documents its format and excluded row fields in terms of these), matched against the image at auto-apply time (develop/dev_history.c), and set by each module's preset registration. | |
| typedef gboolean(* | dt_presets_autoapply_resolver_t) (const gchar *operation) |
Answers whether the panel named operation allows its presets to auto-apply. | |
Enumerations | |
| enum | dt_presets_format_flag_t { FOR_LDR = 1 << 0 , FOR_RAW = 1 << 1 , FOR_HDR = 1 << 2 , FOR_NOT_MONO = 1 << 3 , FOR_NOT_COLOR = 1 << 4 } |
Which image kinds a preset applies to. Persisted in the presets database (database/preset_repository.h documents its format and excluded row fields in terms of these), matched against the image at auto-apply time (develop/dev_history.c), and set by each module's preset registration. More... | |
Functions | |
| void | dt_presets_save_to_file (const int rowid, const char *preset_name, const char *filedir) |
| int | dt_presets_import_from_file (const char *preset_path) |
| gboolean | dt_presets_module_can_autoapply (const gchar *operation) |
| void | dt_presets_set_autoapply_resolver (dt_presets_autoapply_resolver_t resolver) |
Answers whether the panel named operation allows its presets to auto-apply.
Only the side of the application that owns the panels can know. This used to be answered inline by walking dt_lib_get_global()->plugins – a call from here into libs/ (layer 7) for one boolean. With no resolver installed the answer is TRUE, which is what the loop returned for an operation matching no panel, and so what ansel-cli and the unit tests already got.
Definition at line 69 of file history/presets.h.
Which image kinds a preset applies to. Persisted in the presets database (database/preset_repository.h documents its format and excluded row fields in terms of these), matched against the image at auto-apply time (develop/dev_history.c), and set by each module's preset registration.
The FOR_NOT_ variants are negated to keep existing presets valid. Lived in gui/presets.h historically, but nothing about it is GUI: it is preset vocabulary, written to disk.
Which image kinds a preset applies to. Persisted in the presets database (database/preset_repository.h documents its format and excluded row fields in terms of these), matched against the image at auto-apply time (develop/dev_history.c), and set by each module's preset registration.
The FOR_NOT_ variants are negated to keep existing presets valid. Lived in gui/presets.h historically, but nothing about it is GUI: it is preset vocabulary, written to disk.
| Enumerator | |
|---|---|
| FOR_LDR | |
| FOR_RAW | |
| FOR_HDR | |
| FOR_NOT_MONO | |
| FOR_NOT_COLOR | |
Definition at line 42 of file history/presets.h.
| int dt_presets_import_from_file | ( | const char * | preset_path | ) |
load preset from file
Definition at line 155 of file history/presets.c.
References dt_exif_xmp_decode(), dt_free, dt_preset_repository_insert(), FALSE, get_preset_element(), get_preset_element_float(), get_preset_element_int(), IS_NULL_PTR, L, and preset.
Referenced by _import_preset_from_file().
| gboolean dt_presets_module_can_autoapply | ( | const gchar * | operation | ) |
Definition at line 230 of file history/presets.c.
References _autoapply_resolver, L, and TRUE.
Referenced by _presets_show_edit_dialog(), and tree_insert_presets().
save preset to file
Definition at line 37 of file history/presets.c.
References cleanup(), dt_exif_xmp_encode(), dt_free, dt_preset_free(), dt_preset_repository_get_by_rowid(), IS_NULL_PTR, L, and preset.
Referenced by _edit_preset_response(), and export_preset().
| void dt_presets_set_autoapply_resolver | ( | dt_presets_autoapply_resolver_t | resolver | ) |
Definition at line 225 of file history/presets.c.
References _autoapply_resolver, and L.
Referenced by dt_init().