Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
presets.h File Reference
#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)
 

Typedef Documentation

◆ dt_presets_autoapply_resolver_t

typedef gboolean(* dt_presets_autoapply_resolver_t) (const gchar *operation)

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.

◆ 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.

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.

Enumeration Type Documentation

◆ 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.

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.

Function Documentation

◆ dt_presets_import_from_file()

int dt_presets_import_from_file ( const char *  preset_path)

◆ dt_presets_module_can_autoapply()

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().

◆ dt_presets_save_to_file()

void dt_presets_save_to_file ( const int  rowid,
const char *  preset_name,
const char *  filedir 
)

◆ dt_presets_set_autoapply_resolver()

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().