![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/blend.h"
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 enum dt_gui_presets_format_flag_t | dt_gui_presets_format_flag_t |
typedef struct dt_gui_presets_edit_dialog_t | dt_gui_presets_edit_dialog_t |
Enumerations | |
enum | dt_gui_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 } |
Functions | |
void | dt_gui_presets_init () |
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, const dt_develop_blend_colorspace_t blend_cst) |
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) |
#define DT_PRESETS_FOR_NOT (FOR_NOT_MONO | FOR_NOT_COLOR); |
typedef struct dt_gui_presets_edit_dialog_t dt_gui_presets_edit_dialog_t |
typedef enum dt_gui_presets_format_flag_t dt_gui_presets_format_flag_t |
void dt_gui_favorite_presets_menu_show | ( | ) |
show popupmenu for favorite modules
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, | ||
const dt_develop_blend_colorspace_t | blend_cst | ||
) |
add or replace a generic (i.e. non-exif specific) preset for this operation.
References dt_develop_blend_init_blend_parameters(), dt_gui_presets_add_with_blendop(), name, and params_size().
Referenced by init_presets(), and set_presets().
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.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_BLOB, DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_develop_blend_version(), name, and params_size().
Referenced by add_preset(), and dt_gui_presets_add_generic().
void dt_gui_presets_apply_preset | ( | const gchar * | name, |
dt_iop_module_t * | module | ||
) |
apply a preset to the current module
References dt_iop_module_t::blend_params, darktable, darktable_t::db, dt_iop_module_t::default_blendop_params, darktable_t::develop, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_dev_add_history_item, dt_develop_blend_legacy_params(), dt_develop_blend_version(), dt_gui_store_last_preset(), dt_iop_commit_blend_params(), dt_iop_gui_update(), FALSE, name, dt_iop_module_t::op, dt_iop_module_t::params, dt_iop_module_t::params_size, and dt_iop_module_t::widget.
Referenced by _menuitem_pick_preset(), and dt_gui_presets_autoapply_for_module().
gboolean dt_gui_presets_autoapply_for_module | ( | dt_iop_module_t * | module | ) |
apply any auto presets that are appropriate for the current module
References dt_image_t::camera_alias, dt_image_t::camera_maker, darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_DOUBLE, DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_gui_presets_apply_preset(), dt_image_is_hdr(), dt_image_is_matrix_correction_supported(), dt_image_is_rawprepare_supported(), dt_image_monochrome_flags(), dt_image_t::exif_aperture, dt_image_t::exif_exposure, dt_image_t::exif_focal_length, dt_image_t::exif_iso, dt_image_t::exif_lens, dt_image_t::exif_maker, dt_image_t::exif_model, FALSE, FOR_HDR, FOR_LDR, FOR_NOT_COLOR, FOR_NOT_MONO, FOR_RAW, name, dt_iop_module_t::op, and TRUE.
Referenced by _gui_reset_callback().
void dt_gui_presets_confirm_and_delete | ( | GtkWidget * | parent_dialog, |
const char * | name, | ||
const char * | module_name, | ||
int | rowid | ||
) |
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_osx_disallow_fullscreen(), and name.
Referenced by _edit_preset_response(), and tree_key_press_presets().
void dt_gui_presets_init | ( | ) |
create a db table with presets for all operations.
References darktable, darktable_t::db, dt_database_get(), and DT_DEBUG_SQLITE3_EXEC.
Referenced by dt_gui_gtk_init(), and dt_init().
void dt_gui_presets_popup_menu_show_for_module | ( | dt_iop_module_t * | module | ) |
show the popup menu for the given module, with default behavior.
References _gui_presets_popup_menu_show_internal(), dt_iop_module_t::blend_params, dt_iop_module_t::dev, dt_develop_t::image_storage, dt_iop_module_t::op, dt_iop_module_t::params, and dt_iop_module_t::params_size.
Referenced by _presets_popup_callback().
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.
References _gui_presets_popup_menu_show_internal(), params_size(), and pick_callback().
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 | ||
) |
References _presets_show_edit_dialog(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, and DT_DEBUG_SQLITE3_PREPARE_V2.
Referenced by edit_preset(), and edit_preset().
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 | ||
) |
References _presets_show_edit_dialog(), and dt_iop_module_t::op.
Referenced by _edit_preset().
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.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, and name.
Referenced by init_presets(), and set_presets().
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_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.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, and name.
Referenced by init_presets(), and set_presets().
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_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.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_DOUBLE, DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, and name.
Referenced by init_presets(), and set_presets().
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
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, and name.
Referenced by init_presets(), and set_presets().
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.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, maker, model, and name.
Referenced by init_presets(), and set_presets().
void dt_gui_presets_update_tv | ( | const char * | name, |
dt_dev_operation_t | op, | ||
const int32_t | version, | ||
const float | min, | ||
const float | max | ||
) |