Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
presets.h File Reference
#include "develop/blend.h"
#include "history/history.h"
#include "history/presets.h"
+ Include dependency graph for gui/presets.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_gui_presets_edit_dialog_t
 

Macros

#define DT_PRESETS_FOR_NOT   (FOR_NOT_MONO | FOR_NOT_COLOR);
 

Typedefs

typedef struct dt_gui_presets_edit_dialog_t dt_gui_presets_edit_dialog_t
 

Functions

void dt_gui_presets_init ()
 
void dt_gui_presets_cleanup ()
 
gboolean dt_gui_presets_autogen_enabled ()
 
void dt_gui_presets_add_generic (const char *name, dt_dev_operation_t op, const int32_t version, const void *params, const int32_t params_size, const int32_t enabled)
 
void dt_gui_presets_add_with_blendop (const char *name, dt_dev_operation_t op, const int32_t version, const void *params, const int32_t params_size, const void *blend_params, const int32_t enabled)
 
void dt_gui_presets_update_mml (const char *name, dt_dev_operation_t op, const int32_t version, const char *maker, const char *model, const char *lens)
 
void dt_gui_presets_update_iso (const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
 
void dt_gui_presets_update_av (const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
 
void dt_gui_presets_update_tv (const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
 
void dt_gui_presets_update_fl (const char *name, dt_dev_operation_t op, const int32_t version, const float min, const float max)
 
void dt_gui_presets_update_ldr (const char *name, dt_dev_operation_t op, const int32_t version, const int ldrflag)
 
void dt_gui_presets_update_autoapply (const char *name, dt_dev_operation_t op, const int32_t version, const int autoapply)
 
void dt_gui_presets_update_filter (const char *name, dt_dev_operation_t op, const int32_t version, const int filter)
 
void dt_gui_presets_popup_menu_show_for_params (dt_dev_operation_t op, int32_t version, void *params, int32_t params_size, void *blendop_params, const dt_image_t *image, void(*pick_callback)(GtkMenuItem *, void *), void *callback_data)
 
void dt_gui_presets_popup_menu_show_for_module (dt_iop_module_t *module)
 
void dt_gui_favorite_presets_menu_show ()
 
void dt_gui_presets_apply_preset (const gchar *name, dt_iop_module_t *module)
 
gboolean dt_gui_presets_autoapply_for_module (dt_iop_module_t *module)
 
void dt_gui_presets_show_iop_edit_dialog (const char *name_in, dt_iop_module_t *module, GCallback final_callback, gpointer data, gboolean allow_name_change, gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent)
 
void dt_gui_presets_show_edit_dialog (const char *name_in, const char *module_name, int rowid, GCallback final_callback, gpointer data, gboolean allow_name_change, gboolean allow_desc_change, gboolean allow_remove, GtkWindow *parent)
 
void dt_gui_presets_confirm_and_delete (GtkWidget *parent_dialog, const char *name, const char *module_name, int rowid)
 

Macro Definition Documentation

◆ DT_PRESETS_FOR_NOT

#define DT_PRESETS_FOR_NOT   (FOR_NOT_MONO | FOR_NOT_COLOR);

Definition at line 70 of file gui/presets.h.

Typedef Documentation

◆ dt_gui_presets_edit_dialog_t

Function Documentation

◆ dt_gui_favorite_presets_menu_show()

void dt_gui_favorite_presets_menu_show ( )

show popupmenu for favorite modules

◆ dt_gui_presets_add_generic()

void dt_gui_presets_add_generic ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const void params,
const int32_t  params_size,
const int32_t  enabled 
)

add or replace a generic (i.e. non-exif specific) preset for this operation. Its blending color space is the module's default one, resolved when the module's presets are loaded.

Definition at line 135 of file gui/presets.c.

References DEVELOP_BLEND_CS_NONE, dt_develop_blend_init_blend_parameters(), dt_gui_presets_add_with_blendop(), enabled, name, and params_size().

Referenced by init_presets(), and set_presets().

◆ dt_gui_presets_add_with_blendop()

void dt_gui_presets_add_with_blendop ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const void params,
const int32_t  params_size,
const void blend_params,
const int32_t  enabled 
)

same as add_generic but also supply blendop parameters for the presets.

Definition at line 147 of file gui/presets.c.

References dt_develop_blend_version(), dt_preset_repository_add_iop_preset(), enabled, name, and params_size().

Referenced by add_preset(), and dt_gui_presets_add_generic().

◆ dt_gui_presets_apply_preset()

◆ dt_gui_presets_autoapply_for_module()

◆ dt_gui_presets_autogen_enabled()

gboolean dt_gui_presets_autogen_enabled ( )

Definition at line 123 of file gui/presets.c.

References _gui_presets_autogen_enabled.

Referenced by _init_presets().

◆ dt_gui_presets_cleanup()

void dt_gui_presets_cleanup ( )

Definition at line 128 of file gui/presets.c.

References dt_preset_repository_cleanup().

Referenced by dt_cleanup().

◆ dt_gui_presets_confirm_and_delete()

void dt_gui_presets_confirm_and_delete ( GtkWidget parent_dialog,
const char *  name,
const char *  module_name,
int  rowid 
)

◆ dt_gui_presets_init()

void dt_gui_presets_init ( )

create a db table with presets for all operations.

Definition at line 102 of file gui/presets.c.

References _gui_presets_autogen_enabled, darktable_package_version, dt_conf_get_string(), dt_conf_set_string(), dt_free, dt_preset_repository_delete_shipped(), and IS_NULL_PTR.

Referenced by dt_gui_gtk_init(), and dt_init().

◆ dt_gui_presets_popup_menu_show_for_module()

void dt_gui_presets_popup_menu_show_for_module ( dt_iop_module_t module)

◆ dt_gui_presets_popup_menu_show_for_params()

void dt_gui_presets_popup_menu_show_for_params ( dt_dev_operation_t  op,
int32_t  version,
void params,
int32_t  params_size,
void blendop_params,
const dt_image_t image,
void(*)(GtkMenuItem *, void *)  pick_callback,
void callback_data 
)

show a popup menu without initialized module.

Definition at line 1144 of file gui/presets.c.

References _gui_presets_popup_menu_show_internal(), params_size(), and pick_callback().

◆ dt_gui_presets_show_edit_dialog()

void dt_gui_presets_show_edit_dialog ( const char *  name_in,
const char *  module_name,
int  rowid,
GCallback  final_callback,
gpointer  data,
gboolean  allow_name_change,
gboolean  allow_desc_change,
gboolean  allow_remove,
GtkWindow *  parent 
)

◆ dt_gui_presets_show_iop_edit_dialog()

void dt_gui_presets_show_iop_edit_dialog ( const char *  name_in,
dt_iop_module_t module,
GCallback  final_callback,
gpointer  data,
gboolean  allow_name_change,
gboolean  allow_desc_change,
gboolean  allow_remove,
GtkWindow *  parent 
)

◆ dt_gui_presets_update_autoapply()

void dt_gui_presets_update_autoapply ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const int  autoapply 
)

set auto apply property of preset.

Definition at line 1196 of file gui/presets.c.

References DT_PRESET_FLAG_AUTOAPPLY, dt_preset_repository_update_flag(), and name.

Referenced by init_presets(), and set_presets().

◆ dt_gui_presets_update_av()

void dt_gui_presets_update_av ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const float  min,
const float  max 
)

◆ dt_gui_presets_update_filter()

void dt_gui_presets_update_filter ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const int  filter 
)

set filter mode. if 1, the preset will only show for matching images.

Definition at line 1202 of file gui/presets.c.

References DT_PRESET_FLAG_FILTER, dt_preset_repository_update_flag(), and name.

Referenced by init_presets(), and set_presets().

◆ dt_gui_presets_update_fl()

void dt_gui_presets_update_fl ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const float  min,
const float  max 
)

◆ dt_gui_presets_update_iso()

void dt_gui_presets_update_iso ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const float  min,
const float  max 
)

update ranges for iso, aperture, exposure, and focal length, respectively.

Definition at line 1166 of file gui/presets.c.

References DT_PRESET_RANGE_ISO, dt_preset_repository_update_range(), max, min, and name.

Referenced by init_presets(), and set_presets().

◆ dt_gui_presets_update_ldr()

void dt_gui_presets_update_ldr ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const int  ldrflag 
)

update ldr flag: 0-don't care, 1-low dynamic range, 2-raw

Definition at line 1190 of file gui/presets.c.

References DT_PRESET_FLAG_FORMAT, dt_preset_repository_update_flag(), and name.

Referenced by init_presets(), and set_presets().

◆ dt_gui_presets_update_mml()

void dt_gui_presets_update_mml ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const char *  maker,
const char *  model,
const char *  lens 
)

update match strings for maker, model, lens.

Definition at line 1160 of file gui/presets.c.

References dt_preset_repository_update_camera(), maker, model, and name.

Referenced by init_presets(), and set_presets().

◆ dt_gui_presets_update_tv()

void dt_gui_presets_update_tv ( const char *  name,
dt_dev_operation_t  op,
const int32_t  version,
const float  min,
const float  max 
)