![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/imageop.h"
#include "bauhaus/bauhaus.h"
#include "common/collection.h"
#include "common/debug.h"
#include "common/dtpthread.h"
#include "common/exif.h"
#include "common/history.h"
#include "common/imagebuf.h"
#include "common/imageio_rawspeed.h"
#include "common/interpolation.h"
#include "common/module.h"
#include "common/opencl.h"
#include "common/usermanual_url.h"
#include "control/control.h"
#include "develop/blend.h"
#include "develop/develop.h"
#include "develop/format.h"
#include "develop/masks.h"
#include "develop/tiling.h"
#include "dtgtk/button.h"
#include "dtgtk/expander.h"
#include "dtgtk/gradientslider.h"
#include "dtgtk/icon.h"
#include "gui/color_picker_proxy.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "libs/modulegroups.h"
#include <assert.h>
#include <gmodule.h>
#include <math.h>
#include <complex.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "iop/iop_api.h"
Data Structures | |
struct | dt_iop_gui_simple_callback_t |
Macros | |
#define | INCLUDE_API_FROM_MODULE_LOAD "iop_load_module" |
#define | INCLUDE_API_FROM_MODULE_LOAD_BY_SO |
Typedefs | |
typedef struct dt_iop_gui_simple_callback_t | dt_iop_gui_simple_callback_t |
#define INCLUDE_API_FROM_MODULE_LOAD "iop_load_module" |
#define INCLUDE_API_FROM_MODULE_LOAD_BY_SO |
typedef struct dt_iop_gui_simple_callback_t dt_iop_gui_simple_callback_t |
|
static |
References dt_iop_module_t::blend_data, darktable, dt_iop_module_t::dev, dt_dev_invalidate_zoom, DT_DEV_PIXELPIPE_DISPLAY_NONE, dt_dev_refresh_ui_images, dt_iop_request_focus(), dt_iop_set_cache_bypass(), darktable_t::gui, dt_iop_module_t::request_mask_display, dt_gui_gtk_t::reset, and dt_iop_gui_blend_data_t::showmask.
Referenced by dt_iop_gui_set_expander().
|
static |
References dt_iop_gui_rename_module().
Referenced by _gui_multiinstance_callback().
|
static |
References dt_develop_t::alliop, darktable, darktable_t::develop, dt_control_queue_redraw_center(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_get_history_end(), dt_dev_module_remove(), dt_dev_modules_update_multishow(), dt_dev_pixelpipe_rebuild(), dt_dev_refresh_ui_images, dt_gui_refocus_center(), dt_history_duplicate(), dt_iop_gui_cleanup_module(), dt_iop_gui_set_expanded(), dt_iop_is_hidden(), dt_iop_request_focus(), dt_iop_update_multi_priority(), dt_ioppr_iop_order_copy_deep(), DT_SIGNAL_DEVELOP_HISTORY_CHANGE, DT_SIGNAL_DEVELOP_HISTORY_WILL_CHANGE, DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dt_ui_get_container(), dt_iop_module_t::expander, FALSE, darktable_t::gui, dt_develop_t::gui_attached, dt_develop_t::history, dt_iop_module_t::instance, dt_develop_t::iop_order_list, dt_dev_history_item_t::multi_priority, dt_gui_gtk_t::reset, darktable_t::signals, TRUE, dt_gui_gtk_t::ui, and dt_iop_module_t::widget.
Referenced by _gui_multiinstance_callback().
|
static |
References dt_iop_gui_rename_module().
Referenced by _gui_multiinstance_callback().
|
static |
References darktable, dt_iop_module_t::dev, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_dev_modules_update_multishow(), dt_dev_pixelpipe_rebuild(), dt_iop_gui_get_previous_visible_module(), dt_ioppr_check_iop_order(), dt_ioppr_move_iop_before(), DT_SIGNAL_DEVELOP_MODULE_MOVED, DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dt_ui_get_container(), dt_iop_module_t::expander, darktable_t::gui, darktable_t::signals, TRUE, and dt_gui_gtk_t::ui.
Referenced by _gui_multiinstance_callback().
|
static |
References darktable, dt_iop_module_t::dev, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_dev_modules_update_multishow(), dt_dev_pixelpipe_rebuild(), dt_iop_gui_get_next_visible_module(), dt_ioppr_check_iop_order(), dt_ioppr_move_iop_after(), DT_SIGNAL_DEVELOP_MODULE_MOVED, DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dt_ui_get_container(), dt_iop_module_t::expander, darktable_t::gui, darktable_t::signals, TRUE, and dt_gui_gtk_t::ui.
Referenced by _gui_multiinstance_callback().
|
static |
References _gui_copy_callback(), _gui_delete_callback(), _gui_duplicate_callback(), _gui_movedown_callback(), _gui_moveup_callback(), _gui_rename_callback(), dt_gui_menu_popup(), DTGTK_BUTTON, dtgtk_button_set_active(), FALSE, IOP_FLAGS_ONE_INSTANCE, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
References darktable, darktable_t::develop, dt_iop_request_focus(), dt_modifier_is(), FALSE, darktable_t::gui, dt_develop_t::gui_module, dt_gui_gtk_t::reset, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
|
static |
References dt_iop_gui_rename_module().
Referenced by _gui_multiinstance_callback().
|
static |
References dt_iop_module_t::blend_params, darktable, dt_iop_module_t::default_blendop_params, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_gui_presets_autoapply_for_module(), dt_iop_commit_blend_params(), dt_iop_gui_reset(), dt_iop_gui_update(), dt_iop_reload_defaults(), dt_masks_form_remove(), dt_masks_get_from_id(), dt_modifier_is(), dt_develop_blend_params_t::mask_id, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
References darktable, dt_iop_module_t::dev, dt_conf_set_bool(), dt_control_queue_redraw_center(), dt_iop_request_focus(), dt_ui_container_focus_widget(), DT_UI_CONTAINER_SIZE, DTGTK_EXPANDER, dtgtk_expander_set_expanded(), dt_iop_module_t::expander, darktable_t::gui, dt_develop_t::gui_module, dt_iop_module_t::op, and dt_gui_gtk_t::ui.
Referenced by dt_iop_gui_set_expanded().
References dt_hash().
Referenced by dt_iop_compute_blendop_hash().
References _init_presets(), darktable, dt_iop_cleanup_module(), dt_iop_gui_cleanup_blending(), dt_iop_gui_cleanup_module(), dt_iop_gui_init(), dt_iop_gui_init_blending(), dt_iop_load_module_by_so(), FALSE, darktable_t::gui, IOP_CS_LAB, IOP_CS_RGB, IOP_FLAGS_NO_MASKS, IOP_FLAGS_SUPPORTS_BLENDING, and TRUE.
Referenced by dt_iop_load_modules_so().
|
static |
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_legacy_params(), dt_develop_blend_version(), dt_exif_xmp_encode(), dt_iop_cleanup_module(), dt_iop_load_module_by_so(), name, and dt_iop_module_so_t::op.
Referenced by _init_module_so().
void _iop_dim_all_but | ( | dt_iop_module_t * | module, |
gboolean | dim | ||
) |
Dim all modules except the one referenced, if any reference, or undim all
References darktable, darktable_t::develop, dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_get_pluginui(), dt_develop_t::iop, and m.
Referenced by dt_iop_gui_set_expanded().
|
static |
|
static |
|
static |
References _iop_plugin_focus_accel(), dt_gui_gtk_t::accels, dt_accels_t::darkroom_accels, darktable, delete_underscore(), dt_accels_build_path(), dt_accels_new_virtual_instance_shortcut(), dt_accels_remove_shortcut(), dt_capitalize_label(), dt_gui_container_nth_child(), dt_history_item_get_label(), darktable_t::gui, dt_iop_module_t::header, dt_gui_module_t::instance_name, IOP_MODULE_LABEL, and dt_iop_module_t::multi_name.
Referenced by dt_iop_gui_update_header().
|
static |
References _presets_popup_callback(), darktable, dt_iop_request_focus(), FALSE, darktable_t::gui, dt_gui_gtk_t::has_scroll_focus, and TRUE.
Referenced by dt_iop_gui_set_expander().
|
static |
References FALSE.
Referenced by _iop_panel_label(), and dt_iop_gui_init().
|
static |
References FALSE.
Referenced by dt_iop_gui_set_expander().
|
static |
References _presets_popup_callback(), container(), darktable, dt_iop_gui_rename_module(), dt_iop_gui_set_expanded(), dt_iop_request_focus(), dt_modifier_is(), DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dt_ui_get_container(), FALSE, darktable_t::gui, dt_gui_gtk_t::has_scroll_focus, dt_gui_gtk_t::scroll_to, TRUE, and dt_gui_gtk_t::ui.
Referenced by dt_iop_gui_set_expander().
gboolean _iop_tooltip_callback | ( | GtkWidget * | widget, |
gint | x, | ||
gint | y, | ||
gboolean | keyboard_mode, | ||
GtkTooltip * | tooltip, | ||
gpointer | user_data | ||
) |
References dt_gui_add_class(), DT_PIXEL_APPLY_DPI, FALSE, tooltip, and TRUE.
Referenced by dt_iop_gui_set_expander().
gboolean _iop_validate_params | ( | dt_introspection_field_t * | field, |
gpointer | params, | ||
gboolean | report | ||
) |
References _iop_validate_params(), dt_introspection_field_t::Array, dt_introspection_field_t::Char, dt_introspection_type_array_t::count, DT_INTROSPECTION_TYPE_ARRAY, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_CHAR, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_FLOATCOMPLEX, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_INT8, DT_INTROSPECTION_TYPE_OPAQUE, DT_INTROSPECTION_TYPE_STRUCT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_UNION, DT_INTROSPECTION_TYPE_USHORT, dt_introspection_type_struct_t::entries, dt_introspection_type_union_t::entries, dt_introspection_field_t::Enum, FALSE, dt_introspection_type_array_t::field, dt_introspection_type_struct_t::fields, dt_introspection_type_union_t::fields, dt_introspection_field_t::Float, dt_introspection_field_t::FloatComplex, dt_introspection_field_t::header, dt_introspection_field_t::Int, dt_introspection_field_t::Int8, dt_introspection_type_float_t::Max, dt_introspection_type_float_complex_t::Max, dt_introspection_type_char_t::Max, dt_introspection_type_int8_t::Max, dt_introspection_type_ushort_t::Max, dt_introspection_type_int_t::Max, dt_introspection_type_uint_t::Max, dt_introspection_type_float_t::Min, dt_introspection_type_float_complex_t::Min, dt_introspection_type_char_t::Min, dt_introspection_type_int8_t::Min, dt_introspection_type_ushort_t::Min, dt_introspection_type_int_t::Min, dt_introspection_type_uint_t::Min, dt_introspection_type_header_t::name, dt_introspection_type_header_t::offset, dt_introspection_type_header_t::size, dt_introspection_field_t::Struct, TRUE, dt_introspection_type_header_t::type, dt_introspection_type_array_t::type, dt_introspection_type_header_t::type_name, dt_introspection_field_t::UInt, dt_introspection_field_t::Union, dt_introspection_field_t::UShort, and dt_introspection_type_enum_t::values.
Referenced by _iop_validate_params(), and dt_iop_commit_params().
|
static |
References DEVELOP_MASK_CONDITIONAL, DEVELOP_MASK_MASK, DEVELOP_MASK_RASTER, dt_history_item_get_name(), FALSE, dt_iop_module_t::mask_indicator, dt_iop_module_t::op, dt_iop_module_t::raster_mask, dt_iop_module_t::sink, dt_iop_module_t::source, tooltip, TRUE, and type.
Referenced by dt_iop_gui_set_expander().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, FALSE, dt_iop_module_t::timeout_handle, and TRUE.
|
static |
|
static |
References _rename_module_key_press(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_gui_update_header(), dt_masks_group_update_name(), FALSE, dt_iop_module_t::multi_name, name, and TRUE.
Referenced by _rename_module_key_press(), and dt_iop_gui_rename_module().
|
static |
Referenced by dt_iop_gui_rename_module().
|
static |
|
static |
References dt_iop_module_t::default_params, and dt_iop_module_t::params.
|
static |
References dt_dev_pixelpipe_iop_t::data.
|
static |
References dt_dev_pixelpipe_iop_t::data, and dt_iop_module_t::params_size.
|
static |
References IOP_GROUP_TECHNICAL.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by dt_iop_load_module_so().
|
static |
Referenced by dt_iop_load_module_so().
|
static |
Referenced by dt_iop_load_module_so().
Referenced by dt_iop_load_module_so().
|
static |
References IOP_GUI_FREE.
|
static |
|
static |
int default_iop_focus | ( | dt_gui_module_t * | m, |
gboolean | toggle | ||
) |
|
static |
|
static |
|
static |
void dt_bauhaus_update_module | ( | dt_iop_module_t * | self | ) |
References DT_BAUHAUS_COMBOBOX, dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_value(), DT_BAUHAUS_SLIDER, dt_bauhaus_slider_set(), DT_BAUHAUS_WIDGET, DT_GUI_MODULE, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_USHORT, dt_bauhaus_widget_t::field, dt_bauhaus_widget_t::field_type, m, and dt_bauhaus_widget_t::type.
Referenced by dt_iop_gui_update().
void dt_bauhaus_value_changed_default_callback | ( | GtkWidget * | widget | ) |
References dt_bauhaus_combobox_data_t::active, dt_bauhaus_data_t::combobox, dt_bauhaus_combobox_entry_t::data, dt_bauhaus_widget_t::data, DT_BAUHAUS_COMBOBOX, DT_BAUHAUS_SLIDER, dt_bauhaus_slider_get(), DT_BAUHAUS_WIDGET, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_USHORT, dt_iop_gui_changed(), dt_bauhaus_combobox_data_t::entries, f(), dt_bauhaus_widget_t::field, dt_bauhaus_widget_t::field_type, dt_bauhaus_widget_t::label, and dt_bauhaus_widget_t::type.
Referenced by enter().
void dt_iop_add_remove_mask_indicator | ( | dt_iop_module_t * | module | ) |
add/remove mask indicator to iop module header
References dt_iop_module_t::blend_params, dt_iop_module_t::enabled, FALSE, and dt_iop_module_t::mask_indicator.
Referenced by _blendop_masks_mode_changed(), dt_iop_gui_update_blendif(), dt_iop_gui_update_blending(), dt_iop_gui_update_header(), and dt_masks_iop_update().
void dt_iop_cancel_history_update | ( | dt_iop_module_t * | module | ) |
cancel any previously-queued history update
References dt_iop_module_t::timeout_handle.
Referenced by gui_cleanup(), gui_cleanup(), gui_update(), and gui_update().
gboolean dt_iop_check_modules_equal | ( | dt_iop_module_t * | mod_1, |
dt_iop_module_t * | mod_2 | ||
) |
References dt_iop_module_t::instance, dt_iop_module_t::iop_order, and dt_iop_module_t::multi_priority.
Referenced by dt_dev_add_history_item_ext().
void dt_iop_cleanup_module | ( | dt_iop_module_t * | module | ) |
calls module->cleanup and closes the dl connection.
References dt_iop_module_t::blend_params, dt_lib_t::colorpicker, darktable, dt_iop_module_t::default_blendop_params, dt_iop_module_t::histogram, darktable_t::lib, dt_iop_module_t::masks, dt_lib_t::picker_proxy, dt_lib_t::proxy, dt_iop_module_t::raster_mask, dt_iop_module_t::source, and dt_iop_module_t::users.
Referenced by _init_module_so(), _init_presets(), dt_dev_cleanup(), dt_develop_blend_legacy_params_from_so(), dt_styles_apply_style_item(), and leave().
void dt_iop_commit_blend_params | ( | dt_iop_module_t * | module, |
const dt_develop_blend_params_t * | blendop_params | ||
) |
References dt_iop_module_t::blend_params, dt_iop_module_t::dev, DEVELOP_BLEND_CS_NONE, DT_DEBUG_MASKS, dt_iop_set_mask_mode(), dt_print(), dt_develop_t::iop, m, dt_iop_module_t::multi_name, dt_iop_module_t::op, dt_iop_module_t::raster_mask, dt_iop_module_t::sink, dt_iop_module_t::source, and dt_iop_module_t::users.
Referenced by _gui_reset_callback(), _history_to_module(), dt_gui_presets_apply_preset(), dt_iop_gui_duplicate(), and dt_iop_load_default_params().
void dt_iop_commit_params | ( | dt_iop_module_t * | module, |
dt_iop_params_t * | params, | ||
struct dt_develop_blend_params_t * | blendop_params, | ||
struct dt_dev_pixelpipe_t * | pipe, | ||
struct dt_dev_pixelpipe_iop_t * | piece | ||
) |
commits params and updates piece hash.
References _iop_validate_params(), dt_dev_pixelpipe_iop_t::blendop_data, dt_dev_pixelpipe_iop_t::blendop_hash, darktable, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_iop_module_t::dev, DT_DEBUG_PARAMS, DT_DEBUG_PIPE, dt_hash(), dt_iop_compute_module_hash(), dt_print(), dt_dev_pixelpipe_iop_t::enabled, dt_develop_t::forms, dt_dev_pixelpipe_iop_t::global_hash, dt_dev_pixelpipe_iop_t::global_mask_hash, dt_dev_pixelpipe_iop_t::hash, IOP_FLAGS_ALLOW_TILING, dt_iop_module_t::multi_name, dt_iop_module_t::op, dt_dev_pixelpipe_iop_t::pipe, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_dev_pixelpipe_iop_t::process_tiling_ready, dt_iop_module_t::so, TRUE, dt_dev_pixelpipe_t::type, and darktable_t::unmuted.
Referenced by _commit_history_to_node(), and dt_dev_pixelpipe_synch_all_real().
void dt_iop_compute_blendop_hash | ( | dt_iop_module_t * | module, |
uint64_t | hash, | ||
GList * | masks | ||
) |
References _hash_raster_masks(), dt_iop_module_t::blend_params, dt_hash(), dt_masks_get_from_id_ext(), dt_masks_group_get_hash(), IOP_FLAGS_SUPPORTS_BLENDING, dt_develop_blend_params_t::mask_id, dt_iop_module_t::raster_mask, dt_iop_module_t::source, and dt_iop_module_t::users.
Referenced by dt_iop_compute_module_hash().
void dt_iop_compute_module_hash | ( | dt_iop_module_t * | module, |
GList * | masks | ||
) |
Uniform way of getting the full state hash of user-defined parameters, including masks and blending. Writes the value in module->hash, also writes the module->blendop_hash for masking and blending.
WARNING: doesn't take into account parameters dynamically set at runtime.
WARNING: if computing module hash in HISTORY order, there is no guaranty that previous modules in PIPELINEÂ are also previous modules in HISTORY, so their blendops & masks may not be inited yet, meaning the blendop_hash we compute here will be garbage. In particular, (legacy) history compression algo can mess with history order, such that history entries of raster mask providers can end up after history entries of raster mask consumers. Our current history compression does a pipeline snapshot in pipeline order, for user-changed modules. (Raster masks providers and consumers will all be user-changed modules).
IFÂ COMPUTINGÂ HASHESÂ FORÂ PIPEÂ CACHEÂ INVALIDATION, that means we need to redo blendop/module hash recomputation at commit_params time, when pushing history to pipeline (but mandatorily in pipeline order).
IF COMPUTINGÂ HASHES FOR HISTORY CONSISTENCY (auto-saving when needed), since all we care is user params, it doesn't matter.
References dt_iop_module_t::blendop_hash, dt_hash(), dt_iop_compute_blendop_hash(), dt_iop_module_t::enabled, dt_iop_module_t::instance, dt_iop_module_t::iop_order, dt_iop_module_t::multi_priority, dt_iop_module_t::op, dt_iop_module_t::params, and dt_iop_module_t::params_size.
Referenced by _dt_dev_modules_reload_defaults(), _history_to_module(), _process_history_db_entry(), commit_params(), dt_dev_add_history_item_ext(), dt_iop_commit_params(), and dt_iop_load_default_params().
void dt_iop_default_init | ( | dt_iop_module_t * | module | ) |
allocate and load default settings from introspection.
References dt_introspection_field_t::Array, dt_iop_module_t::default_params, DT_INTROSPECTION_TYPE_ARRAY, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_CHAR, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_NONE, DT_INTROSPECTION_TYPE_OPAQUE, DT_INTROSPECTION_TYPE_STRUCT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_USHORT, dt_introspection_type_array_t::field, dt_introspection_type_header_t::field_name, dt_introspection_field_t::header, dt_introspection_type_header_t::offset, dt_introspection_type_header_t::size, dt_introspection_type_header_t::type, dt_introspection_type_array_t::type, and dt_introspection_type_header_t::type_name.
gboolean dt_iop_get_cache_bypass | ( | dt_iop_module_t * | module | ) |
Set bypass to TRUE if the pipeline cache should be bypassed temporarily for this module and the next, for example doing interactive GUI operations.
Pipeline cache consistency is ensured by hashing the internal module params and comparing that hash with the previously-known one from the cache line. If something outside the module is making the cache temporarily invalid, this is the way to go. The previous module's output may be fetched from cache if available, which is faster than simply disabling cache at all.
This is designed for mask previews, which have a special handling, in pipeline, where modules between the mask preview requesting module and the gamma.c module are bypassed, so the alpha channel is passed-through to be rendered by gamma.c without processing intermediate modules. This doesn't work if cache is enabled.
The pixelpipe code will propagate the bypass state to downstream pipe->pieces, so all modules coming later than this one in the pipeline will also have their cache disabled. That's how mask preview can work, because the pipeline is called in a recursive way, starting from the end.
Only one module from dev->iop list (modules tied to GUI) is allowed to bypass the cache at a time, other modules will lose their bypass flag if set.
dt_iop_module_t * dt_iop_get_colorout_module | ( | void | ) |
get module by name and colorout, works only with a dev mode
References darktable, darktable_t::develop, dt_iop_get_module_from_list(), and dt_develop_t::iop.
const gchar * dt_iop_get_localized_aliases | ( | const gchar * | op | ) |
References darktable, darktable_t::iop, and dt_iop_module_t::op.
const gchar * dt_iop_get_localized_name | ( | const gchar * | op | ) |
returns the localized plugin name for a given op name. must not be freed.
References darktable, darktable_t::iop, and dt_iop_module_t::op.
Referenced by dt_add_hist(), dt_history_get_items(), dt_history_get_items_as_string(), and dt_styles_get_item_list().
dt_iop_module_t * dt_iop_get_module | ( | const char * | op | ) |
References darktable, darktable_t::develop, dt_iop_get_module_from_list(), and dt_develop_t::iop.
dt_iop_module_t * dt_iop_get_module_by_instance_name | ( | GList * | modules, |
const char * | operation, | ||
const char * | multi_name | ||
) |
returns module with op + multi_name or NULL if not found on the list, if multi_name == NULL do not check for it
References m, dt_iop_module_t::multi_name, and dt_iop_module_t::op.
Referenced by dt_ioppr_update_for_entries().
dt_iop_module_t * dt_iop_get_module_by_op_priority | ( | GList * | modules, |
const char * | operation, | ||
const int | multi_priority | ||
) |
returns module with op + multi_priority or NULL if not found on the list, if multi_priority == -1 do not check for it
References m, dt_iop_module_t::multi_priority, and dt_iop_module_t::op.
Referenced by dt_history_merge_module_into_history(), dt_ioppr_resync_iop_list(), and dt_styles_apply_style_item().
int dt_iop_get_module_flags | ( | const char * | op | ) |
get module flags, works in dev and lt mode
References darktable, and darktable_t::iop.
Referenced by dt_gui_hist_dialog_new().
dt_iop_module_t * dt_iop_get_module_from_list | ( | GList * | iop_list, |
const char * | op | ||
) |
References dt_iop_module_t::op.
Referenced by _create_deleted_modules(), dt_iop_get_colorout_module(), and dt_iop_get_module().
dt_iop_module_t * dt_iop_get_module_preferred_instance | ( | dt_iop_module_so_t * | module | ) |
return preferred module instance for shortcuts
References dt_iop_module_t::blend_params, darktable, darktable_t::develop, DEVELOP_MASK_DISABLED, DEVELOP_MASK_ENABLED, dt_conf_get_bool(), dt_conf_is_equal(), dt_iop_module_t::enabled, dt_iop_module_t::expanded, dt_develop_t::gui_module, dt_develop_t::iop, dt_iop_module_t::iop_order, dt_develop_blend_params_t::mask_mode, and dt_iop_module_t::so.
void dt_iop_gui_changed | ( | dt_iop_module_t * | action, |
GtkWidget * | widget, | ||
gpointer | data | ||
) |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_set_enable_button(), and TRUE.
Referenced by _iop_toggle_callback(), and dt_bauhaus_value_changed_default_callback().
void dt_iop_gui_cleanup_module | ( | dt_iop_module_t * | module | ) |
cleans up gui of module and of blendops
References dt_gui_module_t::accel_path, dt_iop_is_hidden(), and dt_iop_module_t::widget.
Referenced by _check_deleted_instances(), _gui_delete_callback(), _init_module_so(), and leave().
dt_iop_module_t * dt_iop_gui_duplicate | ( | dt_iop_module_t * | base, |
gboolean | copy_params | ||
) |
References dt_iop_module_t::blend_params, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_dev_modulegroups_update_visibility(), dt_dev_modules_update_multishow(), dt_dev_pixelpipe_rebuild(), dt_iop_commit_blend_params(), dt_iop_gui_init(), dt_iop_gui_set_expanded(), dt_iop_gui_set_expander(), dt_iop_gui_update(), dt_iop_gui_update_blending(), dt_iop_is_hidden(), dt_iop_reload_defaults(), dt_iop_request_focus(), dt_masks_iop_use_same_as(), DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dt_ui_get_container(), dt_iop_module_t::expander, FALSE, darktable_t::gui, IOP_FLAGS_SUPPORTS_BLENDING, dt_develop_blend_params_t::mask_id, dt_iop_module_t::params, dt_gui_gtk_t::reset, dt_gui_gtk_t::scroll_to, TRUE, and dt_gui_gtk_t::ui.
Referenced by _menuitem_button_released_preset().
dt_iop_module_t * dt_iop_gui_get_next_visible_module | ( | dt_iop_module_t * | module | ) |
returns the next visible module on the module list
References dt_iop_module_t::dev, dt_iop_gui_module_is_visible(), and dt_develop_t::iop.
Referenced by _dev_module_update_multishow(), _focus_previous_module(), and _gui_moveup_callback().
GtkWidget * dt_iop_gui_get_pluginui | ( | dt_iop_module_t * | module | ) |
get the eventbox of plugin ui in expander
References DTGTK_EXPANDER, dtgtk_expander_get_frame(), and dt_iop_module_t::expander.
Referenced by _iop_dim_all_but(), and dt_iop_request_focus().
dt_iop_module_t * dt_iop_gui_get_previous_visible_module | ( | dt_iop_module_t * | module | ) |
returns the previous visible module on the module list
References dt_iop_module_t::dev, dt_iop_gui_module_is_visible(), and dt_develop_t::iop.
Referenced by _dev_module_update_multishow(), _focus_next_module(), and _gui_movedown_callback().
GtkWidget * dt_iop_gui_get_widget | ( | dt_iop_module_t * | module | ) |
get the widget of plugin ui in expander
References DTGTK_EXPANDER, dtgtk_expander_get_body(), and dt_iop_module_t::expander.
void dt_iop_gui_init | ( | dt_iop_module_t * | module | ) |
creates the module's gui widget
References _iop_plugin_focus_accel(), dt_gui_module_t::accel_path, darktable, delete_underscore(), dt_accels_build_path(), dt_accels_new_darkroom_action, dt_capitalize_label(), dt_iop_is_hidden(), darktable_t::gui, IOP_FLAGS_DEPRECATED, and dt_gui_gtk_t::reset.
Referenced by _init_module_so(), dt_iop_gui_duplicate(), and enter().
gboolean dt_iop_gui_module_is_visible | ( | dt_iop_module_t * | module | ) |
check if current module is visible
References dt_iop_is_hidden().
Referenced by _focus_module(), _module_from_active_group(), dt_iop_gui_get_next_visible_module(), and dt_iop_gui_get_previous_visible_module().
void dt_iop_gui_rename_module | ( | dt_iop_module_t * | module | ) |
References _rename_module_key_press(), _rename_module_resize(), dt_accels_disconnect_on_text_input(), dt_iop_gui_update_header(), dt_iop_module_t::header, dt_iop_module_t::multi_name, and TRUE.
Referenced by _gui_copy_callback(), _gui_duplicate_callback(), _gui_rename_callback(), _iop_plugin_header_button_press(), and _menuitem_button_released_preset().
void dt_iop_gui_reset | ( | dt_iop_module_t * | module | ) |
reset the ui to its defaults
References darktable, dt_iop_is_hidden(), darktable_t::gui, and dt_gui_gtk_t::reset.
Referenced by _gui_reset_callback().
void dt_iop_gui_set_enable_button | ( | dt_iop_module_t * | module | ) |
updates the enable button state. (take into account module->enabled and module->hide_enable_button
References dt_iop_gui_set_enable_button_icon(), dt_iop_module_t::enabled, FALSE, dt_iop_module_t::hide_enable_button, dt_iop_module_t::off, and TRUE.
Referenced by dt_dev_add_history_item_real(), dt_iop_gui_changed(), and dt_iop_gui_update_header().
void dt_iop_gui_set_enable_button_icon | ( | GtkWidget * | w, |
dt_iop_module_t * | module | ||
) |
References dt_iop_module_t::default_enabled, dtgtk_cairo_paint_switch(), dtgtk_cairo_paint_switch_off(), dtgtk_cairo_paint_switch_on(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), and dt_iop_module_t::hide_enable_button.
Referenced by dt_iop_gui_set_enable_button(), and dt_iop_gui_set_expander().
void dt_iop_gui_set_expanded | ( | dt_iop_module_t * | module, |
gboolean | expanded, | ||
gboolean | collapse_others | ||
) |
set expanded state of iop
References _gui_set_single_expanded(), _iop_dim_all_but(), darktable, darktable_t::develop, dt_iop_module_t::expander, FALSE, dt_develop_t::iop, m, and dt_iop_module_t::widget.
Referenced by _add_module_expander(), _focus_module(), _focus_next_module(), _focus_previous_module(), _gui_delete_callback(), _iop_plugin_header_button_press(), _lib_history_button_clicked_callback(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), default_iop_focus(), and dt_iop_gui_duplicate().
void dt_iop_gui_set_expander | ( | dt_iop_module_t * | module | ) |
creates a label widget for the expander, with callback to enable/disable this module.
References _display_mask_indicator_callback(), _gui_multiinstance_callback(), _gui_off_button_press(), _gui_off_callback(), _gui_reset_callback(), _iop_plugin_body_button_press(), _iop_plugin_header_activate(), _iop_plugin_header_button_press(), _iop_tooltip_callback(), _mask_indicator_tooltip(), _presets_popup_callback(), darktable, dt_get_help_url(), dt_gui_add_class(), dt_gui_add_help_link(), dt_iop_gui_init_blending(), dt_iop_gui_set_enable_button_icon(), dt_iop_gui_update_header(), dt_ui_container_add_widget(), DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dtgtk_button_new(), dtgtk_cairo_paint_multiinstance(), dtgtk_cairo_paint_presets(), dtgtk_cairo_paint_reset(), dtgtk_cairo_paint_showmask(), dtgtk_cairo_paint_switch(), DTGTK_EXPANDER, dtgtk_expander_get_body_event_box(), dtgtk_expander_get_frame(), dtgtk_expander_get_header_event_box(), dtgtk_expander_new(), dtgtk_togglebutton_new(), dt_iop_module_t::enabled, FALSE, darktable_t::gui, dt_iop_module_t::hide_enable_button, IOP_FLAGS_DEPRECATED, IOP_FLAGS_ONE_INSTANCE, IOP_MODULE_ICON, IOP_MODULE_INSTANCE, IOP_MODULE_LABEL, IOP_MODULE_LAST, IOP_MODULE_MASK, IOP_MODULE_PRESETS, IOP_MODULE_RESET, IOP_MODULE_SWITCH, dt_iop_module_t::op, TRUE, dt_gui_gtk_t::ui, and dt_iop_module_t::widget.
Referenced by _add_module_expander(), dt_iop_gui_duplicate(), and enter().
void dt_iop_gui_update | ( | dt_iop_module_t * | module | ) |
updates the gui params and the enabled switch.
References darktable, dt_bauhaus_update_module(), dt_iop_gui_update_blending(), dt_iop_gui_update_expanded(), dt_iop_gui_update_header(), dt_iop_is_hidden(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, and dt_gui_gtk_t::reset.
Referenced by _blendif_change_blend_colorspace(), _blendif_hide_output_channels(), _blendif_show_output_channels(), _gui_reset_callback(), dt_dev_pop_history_items(), dt_gui_presets_apply_preset(), and dt_iop_gui_duplicate().
void dt_iop_gui_update_expanded | ( | dt_iop_module_t * | module | ) |
refresh iop according to set expanded state
References DTGTK_EXPANDER, dtgtk_expander_set_expanded(), and dt_iop_module_t::expander.
Referenced by dt_iop_gui_update(), and enter().
void dt_iop_gui_update_header | ( | dt_iop_module_t * | module | ) |
gboolean dt_iop_have_required_input_format | ( | const int | req_ch, |
struct dt_iop_module_t *const | module, | ||
const int | ch, | ||
const void *const restrict | ivoid, | ||
void *const restrict | ovoid, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
References dt_iop_copy_image_roi(), FALSE, and TRUE.
Referenced by process(), process(), process(), process(), process(), process_cpu(), process_internal(), and process_nlmeans_cpu().
void dt_iop_init_pipe | ( | struct dt_iop_module_t * | module, |
struct dt_dev_pixelpipe_t * | pipe, | ||
struct dt_dev_pixelpipe_iop_t * | piece | ||
) |
initialize pipe.
References dt_dev_pixelpipe_iop_t::blendop_data.
Referenced by dt_dev_pixelpipe_create_nodes().
gboolean dt_iop_is_first_instance | ( | GList * | modules, |
dt_iop_module_t * | module | ||
) |
returns true if module is the first instance of this operation in the pipe
References m, dt_iop_module_t::op, and TRUE.
Referenced by declare_cat_on_pipe().
gboolean dt_iop_is_hidden | ( | dt_iop_module_t * | module | ) |
References dt_iop_so_is_hidden(), and dt_iop_module_t::so.
Referenced by _add_module_expander(), _check_deleted_instances(), _create_deleted_modules(), _gui_delete_callback(), _history_copy_and_paste_on_image_merge(), _lib_modulegroups_update_iop_visibility(), dt_iop_gui_cleanup_module(), dt_iop_gui_duplicate(), dt_iop_gui_init(), dt_iop_gui_module_is_visible(), dt_iop_gui_reset(), dt_iop_gui_update(), enter(), and leave().
gboolean dt_iop_is_raster_mask_used | ( | dt_iop_module_t * | module, |
int | id | ||
) |
iterates over the users hash table and checks if a specific mask is being used
References FALSE, key, dt_iop_module_t::raster_mask, dt_iop_module_t::source, TRUE, and dt_iop_module_t::users.
Referenced by dt_develop_blend_process(), and process().
void dt_iop_load_default_params | ( | dt_iop_module_t * | module | ) |
loads default settings from database.
References dt_iop_module_t::default_blendop_params, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_develop_blend_default_module_blend_colorspace(), dt_develop_blend_init_blend_parameters(), dt_iop_commit_blend_params(), dt_iop_compute_module_hash(), dt_iop_gui_blending_reload_defaults(), dt_develop_t::forms, dt_iop_module_t::params, and dt_iop_module_t::params_size.
Referenced by dt_iop_reload_defaults().
int dt_iop_load_module | ( | dt_iop_module_t * | module, |
dt_iop_module_so_t * | module_so, | ||
dt_develop_t * | dev | ||
) |
int dt_iop_load_module_by_so | ( | dt_iop_module_t * | module, |
dt_iop_module_so_t * | so, | ||
struct dt_develop_t * | dev | ||
) |
load a module for a given .so
References dt_iop_module_so_t::op, dt_iop_module_t::op, and dt_iop_module_t::params_size.
Referenced by _init_module_so(), _init_presets(), dt_develop_blend_legacy_params_from_so(), dt_iop_load_module(), and dt_iop_load_modules_ext().
int dt_iop_load_module_so | ( | void * | m, |
const char * | libname, | ||
const char * | module_name | ||
) |
GList * dt_iop_load_modules | ( | dt_develop_t * | dev | ) |
References dt_iop_load_modules_ext(), and FALSE.
Referenced by dt_dev_get_final_size(), and dt_dev_load_image().
GList * dt_iop_load_modules_ext | ( | struct dt_develop_t * | dev, |
gboolean | no_image | ||
) |
returns a list of instances referencing stuff loaded in load_modules_so.
References darktable, dt_iop_load_module_by_so(), dt_sort_iop_by_order(), darktable_t::iop, and dt_develop_t::iop_instance.
Referenced by _history_copy_and_paste_on_image_merge(), dt_iop_load_modules(), and dt_styles_apply_to_image().
loads and inits the modules in the plugins/ directory.
References _init_module_so(), darktable, dt_iop_load_module_so(), dt_module_load_modules(), and darktable_t::iop.
Referenced by dt_init().
void dt_iop_nap | ( | int32_t | usec | ) |
allow plugins to relinquish CPU and go to sleep for some time
Referenced by dt_dev_pixelpipe_process(), dt_dev_pixelpipe_process_rec(), dt_dev_process_image_job(), dt_dev_process_preview_job(), and dt_dev_wait_hash().
void dt_iop_queue_history_update | ( | dt_iop_module_t * | module, |
gboolean | extend_prior | ||
) |
queue a delayed call of the add_history function after user interaction, to capture parameter updates (but not too often).
References dt_develop_t::average_delay, darktable, darktable_t::develop, and dt_iop_module_t::timeout_handle.
Referenced by _move_point_internal(), _move_point_internal(), _move_point_internal(), _move_point_internal(), area_motion_notify(), lowlight_motion_notify(), and rawdenoise_motion_notify().
void dt_iop_refresh_center | ( | dt_iop_module_t * | module | ) |
queue a refresh of the center (FULL), preview, or second-preview windows, rerunning the pixelpipe from the given module
References darktable, dt_dev_invalidate, dt_dev_refresh_ui_images, darktable_t::gui, dt_develop_t::gui_attached, and dt_gui_gtk_t::reset.
Referenced by _blendop_blendif_channel_mask_view(), _blendop_blendif_channel_mask_view_toggle(), _blendop_blendif_leave_delayed(), _blendop_blendif_suppress_toggled(), _channel_tabs_switch_callback(), _display_mask_callback(), _reset_display_selection(), checker_1_picker_callback(), checker_2_picker_callback(), checker_size_callback(), dt_iop_gui_blending_lose_focus(), gui_focus(), rt_auto_levels_callback(), rt_showmask_callback(), rt_suppress_callback(), and show_luminance_mask_callback().
void dt_iop_refresh_preview | ( | dt_iop_module_t * | module | ) |
References darktable, dt_dev_invalidate_preview, dt_dev_refresh_ui_images, darktable_t::gui, dt_develop_t::gui_attached, and dt_gui_gtk_t::reset.
Referenced by invalidate_luminance_cache().
void dt_iop_reload_defaults | ( | dt_iop_module_t * | module | ) |
reloads certain gui/param defaults when the image was switched.
References darktable, dt_iop_module_t::dev, DT_DEBUG_PARAMS, dt_iop_gui_update_header(), dt_iop_load_default_params(), dt_print(), darktable_t::gui, dt_iop_module_t::header, dt_iop_module_t::op, and dt_gui_gtk_t::reset.
Referenced by _dt_dev_modules_reload_defaults(), _gui_reset_callback(), _init_default_history(), _insert_default_modules(), and dt_iop_gui_duplicate().
void dt_iop_request_focus | ( | dt_iop_module_t * | module | ) |
requests the focus for this plugin (to draw overlays over the center image)
References darktable_t::collection, darktable, darktable_t::develop, dt_collection_hint_message(), dt_control_change_cursor(), dt_control_queue_redraw_center(), dt_gui_add_class(), dt_gui_refocus_center(), dt_gui_remove_class(), dt_iop_color_picker_reset(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_get_pluginui(), dt_masks_reset_form_gui(), dt_iop_module_t::expander, FALSE, darktable_t::gui, dt_develop_t::gui_module, dt_gui_gtk_t::reset, and TRUE.
Referenced by _add_shape(), _area_button_press_callback(), _area_scroll_callback(), _auto_levels_callback(), _auto_levels_callback(), _blendop_blendif_key_press(), _blendop_blendif_showmask_clicked(), _blendop_blendif_suppress_toggled(), _blendop_masks_add_shape(), _blendop_masks_show_and_edit(), _check_deleted_instances(), _color_picker_callback_button_press(), _display_mask_callback(), _display_mask_indicator_callback(), _edit_masks(), _enter_edit_mode(), _enter_edit_mode(), _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), _event_structure_auto_clicked(), _event_structure_lines_clicked(), _event_structure_quad_clicked(), _focus_module(), _gui_delete_callback(), _gui_off_button_press(), _gui_set_single_expanded(), _iop_plugin_body_button_press(), _iop_plugin_header_button_press(), _lib_modulegroups_scroll(), _lib_modulegroups_update_iop_visibility(), _menu_add_shape(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _raster_combo_populate(), _select_region_toggled_callback(), _select_region_toggled_callback(), acquire_source_button_pressed(), acquire_target_button_pressed(), area_button_press(), area_button_press(), area_button_release(), auto_adjust_contrast_boost(), auto_adjust_exposure_boost(), btn_make_radio_callback(), button_pressed(), default_iop_focus(), dt_iop_gui_duplicate(), dt_iop_levels_button_press(), dt_iop_levels_scroll(), dt_masks_iop_combo_populate(), enter(), gui_reset(), mask_callback(), notebook_button_press(), profile_changed(), rt_add_shape(), rt_auto_levels_callback(), rt_display_wavelet_scale_callback(), rt_edit_masks_callback(), rt_select_algorithm_callback(), rt_showmask_callback(), rt_suppress_callback(), rt_wdbar_button_press(), rt_wdbar_scrolled(), show_luminance_mask_callback(), start_profiling_callback(), and workicc_changed().
void dt_iop_set_cache_bypass | ( | dt_iop_module_t * | module, |
gboolean | state | ||
) |
References dt_iop_module_t::bypass_cache, dt_iop_module_t::dev, FALSE, and dt_develop_t::iop.
Referenced by _blendop_blendif_channel_mask_view(), _blendop_blendif_channel_mask_view_toggle(), _blendop_blendif_leave_delayed(), _blendop_blendif_showmask_clicked(), _display_mask_indicator_callback(), _enter_edit_mode(), _event_commit_clicked(), _visualize_callback(), commit_params(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_update_blendif(), dt_iop_gui_update_blending(), init(), mask_callback(), process(), run_profile_callback(), run_validation_callback(), show_luminance_mask_callback(), and show_mask_callback().
void dt_iop_set_darktable_iop_table | ( | ) |
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_PREPARE_V2, dt_util_dstrcat(), darktable_t::iop, and dt_iop_module_t::op.
Referenced by dt_init().
const char ** dt_iop_set_description | ( | dt_iop_module_t * | module, |
const char * | main_text, | ||
const char * | purpose, | ||
const char * | input, | ||
const char * | process, | ||
const char * | output | ||
) |
References process().
Referenced by description().
void dt_iop_set_mask_mode | ( | dt_iop_module_t * | module, |
int | mask_mode | ||
) |
make sure the raster mask is advertised if available
References DEVELOP_MASK_ENABLED, DEVELOP_MASK_RASTER, dt_history_item_get_name(), key, dt_iop_module_t::masks, dt_iop_module_t::raster_mask, and dt_iop_module_t::source.
Referenced by _blendop_masks_mode_callback(), and dt_iop_commit_blend_params().
gboolean dt_iop_so_is_hidden | ( | dt_iop_module_so_t * | module | ) |
checks if iop do have an ui
References FALSE, IOP_FLAGS_HIDDEN, dt_iop_module_so_t::op, and TRUE.
Referenced by dt_iop_is_hidden().
void dt_iop_update_multi_priority | ( | dt_iop_module_t * | module, |
int | new_priority | ||
) |
set multi_priority and update raster mask links
References dt_dev_history_item_t::blend_params, dt_iop_module_t::blend_params, dt_iop_module_t::dev, dt_develop_t::history, key, dt_iop_module_t::raster_mask, dt_develop_blend_params_t::raster_mask_instance, dt_iop_module_t::source, and dt_iop_module_t::users.
Referenced by _create_deleted_modules(), _gui_delete_callback(), _history_to_module(), _process_history_db_entry(), _rebuild_multi_priority(), and dt_dev_module_duplicate().