![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <gmodule.h>#include <gtk/gtk.h>#include <sched.h>#include <stddef.h>#include <stdint.h>#include "system/dtpthread.h"#include "common/logging.h"#include "system/mem_alloc.h"#include "system/simd.h"#include "common/introspection.h"#include "common/gui_module_api.h"#include "common/opencl.h"#include "history/history.h"#include "pixel/format.h"#include "develop/pixelpipe_hb.h"#include "iop/iop_api.h"
Include dependency graph for imageop.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_gui_data_t |
| struct | dt_iop_module_so_t |
| struct | dt_iop_module_t |
| struct | dt_iop_module_static_entry_t |
| One IOP module built into this binary, and the generated function that binds it. More... | |
Macros | |
| #define | INCLUDE_API_FROM_MODULE_H |
| #define | INCLUDE_API_FROM_MODULE_H |
| #define | dt_iop_fmt_log(module, fmt, ...) dt_print(DT_DEBUG_PIPE, "[iop-fmt] %-14s " fmt "\n", (module)->op, ##__VA_ARGS__) |
Debug helper to trace a module's input-format-driven decisions on the -d pipe channel (DT_DEBUG_PIPE). Use it at every spot where a module branches on the image or buffer type — self enable/disable, code-path selection, descriptor choice — so the heuristics are readable from logs instead of having to be reverse-engineered from pixel outputs. The first argument is the module (dt_iop_module_t* or dt_iop_module_so_t*, both expose op); the rest is a printf format and its arguments. A trailing newline is added. | |
Typedefs | |
| typedef enum dt_iop_module_header_icons_t | dt_iop_module_header_icons_t |
| typedef enum dt_iop_group_t | dt_iop_group_t |
| typedef enum dt_iop_tags_t | dt_iop_tags_t |
| typedef enum dt_iop_flags_t | dt_iop_flags_t |
| typedef struct dt_iop_gui_data_t | dt_iop_gui_data_t |
| typedef void | dt_iop_data_t |
| typedef void | dt_iop_global_data_t |
| typedef enum dt_dev_request_colorpick_flags_t | dt_dev_request_colorpick_flags_t |
| typedef struct dt_iop_module_so_t | dt_iop_module_so_t |
| typedef struct dt_iop_module_t | dt_iop_module_t |
| typedef struct dt_iop_module_static_entry_t | dt_iop_module_static_entry_t |
| One IOP module built into this binary, and the generated function that binds it. | |
Variables | |
| const dt_iop_module_static_entry_t | dt_iop_static_modules [] |
| const int | dt_iop_static_modules_count |
| #define dt_iop_fmt_log | ( | module, | |
| fmt, | |||
| ... | |||
| ) | dt_print(DT_DEBUG_PIPE, "[iop-fmt] %-14s " fmt "\n", (module)->op, ##__VA_ARGS__) |
Debug helper to trace a module's input-format-driven decisions on the -d pipe channel (DT_DEBUG_PIPE). Use it at every spot where a module branches on the image or buffer type — self enable/disable, code-path selection, descriptor choice — so the heuristics are readable from logs instead of having to be reverse-engineered from pixel outputs. The first argument is the module (dt_iop_module_t* or dt_iop_module_so_t*, both expose op); the rest is a printf format and its arguments. A trailing newline is added.
Example: dt_iop_fmt_log(self, "enable=%d needs_demosaic=%d filters=%u", enabled, dt_image_needs_demosaic(img), img->dsc.filters);
color picker request
| typedef void dt_iop_data_t |
| typedef enum dt_iop_flags_t dt_iop_flags_t |
module tags
| typedef void dt_iop_global_data_t |
| typedef enum dt_iop_group_t dt_iop_group_t |
module group
| typedef struct dt_iop_gui_data_t dt_iop_gui_data_t |
| typedef enum dt_iop_module_header_icons_t dt_iop_module_header_icons_t |
| typedef struct dt_iop_module_so_t dt_iop_module_so_t |
The per-operation half of a module: everything that exists once, whatever the image. Modules are linked into lib_ansel and bound at startup by dt_iop_load_modules_so(); there is no dlopen handle to cache any more. See doc/static-iop.md.
| typedef struct dt_iop_module_static_entry_t dt_iop_module_static_entry_t |
One IOP module built into this binary, and the generated function that binds it.
IOP modules are linked in, not dlopen'd. The table below is generated from src/iop/CMakeLists.txt by tools/generate_iop_static.py – the same list develop/iop_order.c and develop/geometry/geometry.c are written against, so the three cannot drift the way a directory scan could. fill_so lives in the module's own translation unit, which is the only place its entry points are reachable by their plain names.
| typedef struct dt_iop_module_t dt_iop_module_t |
| typedef enum dt_iop_tags_t dt_iop_tags_t |
module tags
| enum dt_iop_flags_t |
module tags
| enum dt_iop_group_t |
| enum dt_iop_tags_t |
| int default_blend_colorspace | ( | struct dt_iop_module_t * | self, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
| void default_input_format | ( | struct dt_iop_module_t * | self, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| struct dt_iop_buffer_dsc_t * | dsc | ||
| ) |
Definition at line 28 of file develop/format.c.
References dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::cst, dt_iop_buffer_dsc_t::datatype, dt_dev_pixelpipe_t::dev, dt_image_t::dsc, dt_dev_pixelpipe_iop_t::dsc_in, dt_image_is_raw(), dt_ioppr_get_iop_order(), dt_iop_buffer_dsc_t::filters, dt_develop_t::image_storage, IOP_CS_RAW, dt_dev_pixelpipe_t::iop_order_list, dt_iop_module_t::multi_priority, dt_iop_module_t::op, TYPE_FLOAT, and TYPE_UINT16.
Referenced by input_format().
| void default_output_format | ( | struct dt_iop_module_t * | self, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| struct dt_iop_buffer_dsc_t * | dsc | ||
| ) |
Definition at line 46 of file develop/format.c.
References dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::cst, dt_iop_buffer_dsc_t::datatype, dt_dev_pixelpipe_t::dev, dt_image_t::dsc, dt_dev_pixelpipe_iop_t::dsc_in, dt_image_is_raw(), dt_ioppr_get_iop_order(), dt_iop_buffer_dsc_t::filters, dt_develop_t::image_storage, IOP_CS_RAW, dt_dev_pixelpipe_t::iop_order_list, dt_iop_module_t::multi_priority, dt_iop_module_t::op, TYPE_FLOAT, and TYPE_UINT16.
Referenced by output_format().
| void dt_bauhaus_update_module | ( | dt_iop_module_t * | self | ) |
Definition at line 2054 of file imageop_gui.c.
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, IS_NULL_PTR, m, and dt_bauhaus_widget_t::type.
Referenced by dt_iop_gui_update().
Definition at line 2107 of file imageop_gui.c.
References dt_bauhaus_data_t::combobox, d, 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(), f, dt_bauhaus_widget_t::field, dt_bauhaus_widget_t::field_type, i, IS_NULL_PTR, dt_bauhaus_widget_t::label, and dt_bauhaus_widget_t::type.
Referenced by enter().
| float dt_dev_get_module_scale | ( | const struct dt_dev_pixelpipe_t * | pipe, |
| const dt_iop_roi_t * | roi_in | ||
| ) |
Get the size of one current-grid pixel in full-resolution image pixels.
pipe->iscale tracks how much the pipeline input was already downsampled when the mipmap cache selected the source buffer. roi_in->scale then applies the per-module raster scaling on top of that buffer. Modules that author radii or frequencies in original-image pixels should derive their current working scale from this ratio and clamp it locally only when they explicitly want to avoid magnifying the effect above 100%.
| pipe | current pixelpipe input contract. |
| roi_in | input ROI currently processed by the module. |
| uint32_t dt_dev_get_roi_filters | ( | const struct dt_dev_pixelpipe_iop_t * | piece, |
| const dt_iop_roi_t * | roi_in | ||
| ) |
Get this piece's raw CFA filters descriptor, phase-corrected for its current crop.
piece->dsc_in.filters/xtrans only carries the fixed sensor border trim (baked in once by rawprepare from the immutable image descriptor) — never the dynamic offset a downstream geometry module (lens.cc's scale, crop, ashift...) may impose on this piece's roi_in through backward ROI planning. That offset cannot be folded into dsc_in/dsc_out once and for all: those are settled by a single pipe-wide pass that runs before/independently of per-tile ROI refinement, so a value baked in there would be correct for at most one tile and silently wrong for every other tile once the piece is large enough to get tiled. It must instead be recomputed fresh, from this call's own roi_in, every time a "tile-local" pixel algorithm needs it — one that indexes the CFA by plain row/col with no ROI awareness of its own (RCD, LMMSE, PPG, AMaZE, the Bayer downsample path, highlights' laplacian/harmonic Bayer reconstruction...).
Do NOT call this for "self-correcting" algorithms that already take roi_in/an explicit x,y and add it themselves at each lookup (VNG, Markesteijn/FDC, passthrough-color, the X-Trans downsample path, green-equilibration, FCxtrans-based code in general) — they must keep reading piece->dsc_in.filters/xtrans directly, or the offset gets applied twice.
| piece | the pipeline piece currently processing (its dsc_in.filters is the fixed-trim-only source table). |
| roi_in | this call's own input ROI — the tile's, when tiled, not the untiled request. |
roi_in->x/y. Passed through unchanged (X-Trans sentinel 9u is a no-op input) when the sensor is X-Trans; read piece->dsc_in.xtrans directly in that case, already phase-correct via roi_in. | void dt_iop_add_remove_mask_indicator | ( | dt_iop_module_t * | module | ) |
add/remove mask indicator to iop module header
Definition at line 1761 of file imageop_gui.c.
References _mask_indicator_get_usage(), dt_iop_module_t::blend_params, dt_iop_module_t::enabled, FALSE, dt_iop_module_t::gui, IS_NULL_PTR, and dt_iop_module_gui_t::mask_indicator.
Referenced by _blendop_masks_mode_changed(), dt_iop_gui_blend_masks_update(), dt_iop_gui_blend_set_drawn_mask_group(), dt_iop_gui_update_blendif(), dt_iop_gui_update_blending(), and dt_iop_gui_update_header().
| gboolean dt_iop_check_modules_equal | ( | dt_iop_module_t * | mod_1, |
| dt_iop_module_t * | mod_2 | ||
| ) |
Definition at line 1382 of file imageop.c.
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.
Definition at line 1113 of file imageop.c.
References dt_iop_module_t::blend_params, dt_develop_t::color_picker, dt_iop_module_t::common_fields, dt_iop_module_t::default_blendop_params, dt_control_signal_disconnect_all(), dt_control_signal_get_global(), dt_dev_get_global(), dt_free, dt_develop_t::enabled, FALSE, dt_iop_module_t::histogram, IS_NULL_PTR, dt_iop_module_t::masks, dt_gui_module_t::name, dt_develop_t::picker, dt_iop_module_t::raster_mask, dt_iop_module_t::source, dt_develop_t::update_pending, dt_iop_module_t::users, dt_gui_module_t::view, and dt_develop_t::widget.
Referenced by _dt_styles_tmp_module_free(), _dt_styles_tmp_module_from_style_item(), _init_module_so(), _init_presets(), _resolve_presets_blend_colorspace(), _studio_dev_teardown(), dt_dev_cleanup(), dt_develop_blend_legacy_params_from_so(), and leave().
| void dt_iop_cleanup_pipe | ( | struct dt_iop_module_t * | module, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Release module-owned resources for one pixelpipe node.
The instance callback is an immutable copy of the callback stored in the loaded shared-object descriptor. Pixelpipes can retain removed module instances until their next topology rebuild, so validate both the descriptor lifetime and that callback identity before calling through the instance. A mismatch means the instance storage is no longer trustworthy; calling the descriptor callback with that same instance would only move the use-after-free into the module cleanup code.
Definition at line 641 of file imageop.c.
References dt_dev_pixelpipe_iop_t::blendop_data, darktable, DT_DEBUG_ALWAYS, dt_free_align, dt_print(), FALSE, darktable_t::iop, IS_NULL_PTR, dt_iop_module_so_t::op, dt_iop_module_t::op, and TRUE.
Referenced by dt_dev_pixelpipe_cleanup_nodes().
| void dt_iop_commit_blend_params | ( | dt_iop_module_t * | module, |
| const struct dt_develop_blend_params_t * | blendop_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 | ||
| ) |
Copy params into the pipeline piece, so the next render uses them.
commits params and updates piece hash.
| module | the module whose commit_params() callback is invoked. |
| params | the parameter block to commit; copied, not retained. |
| piece | the pipeline piece to configure. Must already be initialised for this pipe. |
Definition at line 1565 of file imageop.c.
References _iop_piece_is_committable(), _iop_validate_params(), dt_dev_pixelpipe_iop_t::blendop_data, dt_dev_pixelpipe_iop_t::blendop_hash, dt_dev_pixelpipe_iop_t::cache_output_on_ram, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_iop_module_t::dev, dt_conf_get_bool(), dt_conf_key_exists(), dt_conf_key_not_empty(), dt_conf_set_bool(), DT_DEBUG_ALWAYS, DT_DEBUG_PARAMS, dt_free, dt_get_debug_flags(), dt_hash(), dt_iop_compute_module_hash(), dt_pixelpipe_get_pipe_name(), 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, IS_NULL_PTR, dt_iop_module_t::multi_name, dt_iop_module_t::op, dt_dev_pixelpipe_iop_t::process_cl_ready, dt_dev_pixelpipe_iop_t::process_tiling_ready, dt_iop_module_t::so, TRUE, and dt_dev_pixelpipe_t::type.
Referenced by _commit_piece_contract(), _sync_focused_in_place(), and dt_dev_pixelpipe_sync_no_history().
| 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.
Definition at line 1461 of file imageop.c.
References dt_iop_module_t::blendop_hash, dt_hash(), dt_iop_compute_blendop_hash(), dt_iop_module_t::enabled, 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_history_item_update_from_params(), 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.
Definition at line 308 of file imageop.c.
References dt_iop_module_t::default_params, dt_free, 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, i, IS_NULL_PTR, p, and dt_iop_module_t::params.
| 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.
Definition at line 1664 of file imageop.c.
Referenced by _suppressed_by_focus(), and dt_dev_pixelpipe_activemodule_disables_currentmodule().
| dt_iop_module_t * dt_iop_get_colorout_module | ( | void | ) |
get module by name and colorout, works only with a dev mode
Definition at line 1692 of file imageop.c.
References dt_dev_get_global(), and dt_iop_get_module_from_list().
| const gchar * dt_iop_get_localized_aliases | ( | const gchar * | op | ) |
Definition at line 1779 of file imageop.c.
References darktable, darktable_t::iop, and IS_NULL_PTR.
| const gchar * dt_iop_get_localized_name | ( | const gchar * | op | ) |
returns the localized plugin name for a given op name. must not be freed.
Definition at line 1757 of file imageop.c.
References darktable, darktable_t::iop, and IS_NULL_PTR.
Referenced by _history_operation_name(), _prepend_item(), and dt_add_hist().
| dt_iop_module_t * dt_iop_get_module | ( | const char * | op | ) |
Definition at line 1714 of file imageop.c.
References dt_dev_get_global(), and dt_iop_get_module_from_list().
| 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 IS_NULL_PTR(multi_name) do not check for it
Definition at line 1857 of file imageop.c.
References IS_NULL_PTR, m, dt_iop_module_t::multi_name, and dt_iop_module_t::op.
Referenced by _hm_dest_module_from_id(), _hm_module_from_id(), and 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
Definition at line 1839 of file imageop.c.
References m, dt_iop_module_t::multi_priority, and dt_iop_module_t::op.
Referenced by _dt_styles_tmp_module_from_style_item(), _history_merge_resolve_dest_instance(), _hm_dest_module_from_id(), _hm_module_from_id(), _refresh_global_histogram_backbuf_for_hash(), _refresh_preview_histograms(), dt_dev_create_module_instance(), dt_dev_snapshot_capture(), dt_history_merge(), and dt_ioppr_resync_iop_list().
| int dt_iop_get_module_flags | ( | const char * | op | ) |
get module flags, works in dev and lt mode
Definition at line 1719 of file imageop.c.
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 | ||
| ) |
Definition at line 1697 of file imageop.c.
References dt_iop_module_t::op.
Referenced by _create_deleted_modules(), _process_history_db_entry(), dt_iop_get_colorout_module(), dt_iop_get_module(), and reload_defaults().
| GList * dt_iop_get_modules_so | ( | void | ) |
The list of loaded iop module shared objects (dt_iop_module_so_t*), built once at startup by dt_iop_load_modules_so() in develop/imageop.c, which owns it. Readers use this accessor instead of reaching into the application struct, so they need neither darktable.h nor knowledge of where the list is stored.
Definition at line 533 of file darktable.c.
References darktable, and darktable_t::iop.
Referenced by _image_get_history_orientation(), dt_dev_load_modules(), dt_ioppr_get_export_profile_type(), and dt_ioppr_get_work_profile_type().
| void dt_iop_gui_changed | ( | dt_iop_module_t * | module, |
| GtkWidget * | widget, | ||
| gpointer | data | ||
| ) |
Definition at line 2036 of file imageop_gui.c.
References dt_dev_add_history_item, dt_iop_color_picker_reset(), dt_iop_gui_set_enable_button(), dt_iop_gui_update_header(), IS_NULL_PTR, 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
Definition at line 1090 of file imageop_gui.c.
References _iop_color_picker_data_ready_callback(), _iop_listens_to_picker_data(), dt_gui_module_t::accel_path, dt_iop_module_t::dev, dt_accels_build_path(), dt_accels_remove_accel(), dt_accels_remove_shortcut(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_free, dt_gui_get_accels(), dt_gui_get_global(), DT_GUI_MODULE, dt_iop_gui_cleanup_blending(), dt_iop_gui_data(), dt_iop_is_hidden(), dt_iop_module_gui_t::expander, dt_iop_module_t::gui, dt_iop_module_gui_t::header, dt_gui_module_t::instance_name, IOP_FLAGS_DEPRECATED, IS_NULL_PTR, m, dt_gui_gtk_t::scroll_to, dt_gui_gtk_t::scroll_to_header_once, and dt_iop_module_gui_t::widget.
Referenced by _gui_delete_callback(), _init_module_so(), _studio_dev_teardown(), dt_dev_history_gui_update(), and leave().
| gboolean dt_iop_gui_commit_iop_order_change | ( | struct dt_develop_t * | dev, |
| dt_iop_module_t * | module, | ||
| gboolean | enable, | ||
| gboolean | write_history, | ||
| const char * | reason | ||
| ) |
Commit the GUI-side consequences of an IOP-order change.
Order changes may come from drag-and-drop, context-menu move commands or preset application. The low-level order code only mutates dt_develop_t::iop and the serialized order list; this function updates module headers, rebuilds the pipes, stores the history item when requested and broadcasts the GUI change signal.
| dev | Develop instance owning the reordered modules. |
| module | Module to record in history, or NULL for whole-pipeline changes. |
| enable | History enable state passed to dt_dev_add_history_item. |
| write_history | TRUE to record a history item, FALSE to skip it. |
| reason | Debug string used in IOP-order checks. |
dev was NULL. Definition at line 693 of file imageop.c.
References dt_dev_add_history_item, dt_dev_pixelpipe_rebuild_all, dt_dev_signal_modules_moved(), dt_ioppr_check_iop_order(), enable(), FALSE, IS_NULL_PTR, and TRUE.
Referenced by _ioporder_apply_preset(), dt_iop_gui_move_module_after(), dt_iop_gui_move_module_before(), gui_reset(), and set_params().
| dt_iop_module_t * dt_iop_gui_duplicate | ( | dt_iop_module_t * | base, |
| gboolean | copy_params | ||
| ) |
Create another instance of base, insert it into dev->iop and give it a GUI.
| base | the module to duplicate. |
| copy_params | TRUE to carry over base's current parameters and blending. |
Definition at line 581 of file imageop_gui.c.
References _gui_set_single_expanded(), dt_iop_module_t::blend_params, dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_history_flush_pending_commits(), dt_dev_pixelpipe_rebuild_all, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_get_global(), 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_iop_module_gui_t::expander, FALSE, dt_iop_module_t::gui, IOP_FLAGS_SUPPORTS_BLENDING, IS_NULL_PTR, dt_develop_blend_params_t::mask_id, dt_iop_module_t::params, dt_gui_gtk_t::scroll_to_header_once, and TRUE.
Referenced by _menuitem_button_released_preset().
| void dt_iop_gui_enter_critical_section | ( | dt_iop_module_t *const | module | ) |
Take the module's GUI lock, serialising access to its dt_iop_gui_data_t.
enter/leave a GUI critical section by acquiring gui->gui_lock. Implemented in imageop_gui.c; tolerate headless callers (no GUI, no GUI data to protect), so common/iop-autoset.c and friends can call them without seeing the gui struct.
Must be paired with dt_iop_gui_leave_critical_section() on every path. The pair uses the BAD_ lock variants because the acquire and release routinely sit in different functions, which the thread-safety analyser cannot model.
Definition at line 2185 of file imageop_gui.c.
References dt_pthread_mutex_BAD_lock(), dt_iop_module_t::gui, and dt_iop_module_gui_t::gui_lock.
Referenced by __attribute__(), __attribute__(), _auto_levels_callback(), _auto_levels_callback(), _auto_set_exposure(), _auto_set_illuminant(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _do_get_structure_auto(), _draw(), _event_draw(), _get_structure(), _history_resync_callback(), _preview_pipe_finished_callback(), _process_common_setup(), _refresh_module_histogram(), _select_region_toggled_callback(), _select_region_toggled_callback(), _spot_settings_changed_callback(), button_pressed(), button_pressed(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), commit_profile_callback(), dt_drawlayer_begin_gui_stroke_capture(), dt_drawlayer_commit_dabs(), dt_iop_autoset_advance(), dt_iop_levels_compute_levels_automatic(), dt_iop_zonesystem_preview_draw(), gui_cache_init(), gui_cleanup(), gui_focus(), gui_init(), gui_init(), gui_post_expose(), gui_post_expose(), gui_update(), gui_update(), invalidate_luminance_cache(), key_pressed(), masks_selection_changed(), mouse_moved(), mouse_moved(), optimize_changed_callback(), process(), process(), process(), process_cl(), process_cl(), process_clusters(), process_common_cleanup(), process_drago(), process_internal(), rt_auto_levels_callback(), rt_curr_scale_update(), rt_develop_ui_pipe_finished_callback(), rt_display_wavelet_scale_callback(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), scrolled(), start_profiling_callback(), and update_histogram().
| 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
Definition at line 567 of file imageop_gui.c.
References dt_iop_module_t::dev, dt_iop_gui_module_is_visible(), and dt_develop_t::iop.
| GtkWidget * dt_iop_gui_get_off | ( | dt_iop_module_t * | module | ) |
widget-identity helpers for gui/ callers that must not see the gui struct through this header's forward declaration (the struct lives in imageop_gui.h, layer-wise above them until the T6 re-stratification). Implemented in imageop_gui.c; all NULL-safe.
Definition at line 2198 of file imageop_gui.c.
Referenced by _color_picker_callback_button_press().
| GtkWidget * dt_iop_gui_get_pluginui | ( | dt_iop_module_t * | module | ) |
get the eventbox of plugin ui in expander
Definition at line 2029 of file imageop_gui.c.
References DTGTK_EXPANDER, dtgtk_expander_get_frame(), dt_iop_module_gui_t::expander, dt_iop_module_t::gui, and IS_NULL_PTR.
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
Definition at line 553 of file imageop_gui.c.
References dt_iop_module_t::dev, dt_iop_gui_module_is_visible(), and dt_develop_t::iop.
| GtkWidget * dt_iop_gui_get_widget | ( | dt_iop_module_t * | module | ) |
get the widget of plugin ui in expander
Definition at line 2022 of file imageop_gui.c.
References DTGTK_EXPANDER, dtgtk_expander_get_body(), dt_iop_module_gui_t::expander, dt_iop_module_t::gui, and IS_NULL_PTR.
Referenced by dt_gui_presets_apply_preset().
| void dt_iop_gui_init | ( | dt_iop_module_t * | module | ) |
creates the module's gui widget
Definition at line 1017 of file imageop_gui.c.
References _iop_color_picker_data_ready_callback(), _iop_listens_to_picker_data(), _iop_plugin_enable_accel(), _iop_plugin_focus_accel(), dt_gui_module_t::accel_path, delete_underscore(), dt_accels_build_path(), dt_accels_new_darkroom_action, dt_capitalize_label(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_free, dt_gui_widget_freeze, dt_iop_is_hidden(), DT_SIGNAL_CONTROL_PICKERDATA_READY, dt_iop_module_t::gui, IOP_FLAGS_DEPRECATED, and IS_NULL_PTR.
Referenced by _init_module_so(), dt_dev_history_gui_update(), dt_iop_gui_duplicate(), and enter().
| void dt_iop_gui_leave_critical_section | ( | dt_iop_module_t *const | module | ) |
Release what dt_iop_gui_enter_critical_section() took. Also a no-op headless.
Definition at line 2193 of file imageop_gui.c.
References dt_pthread_mutex_BAD_unlock(), dt_iop_module_t::gui, and dt_iop_module_gui_t::gui_lock.
Referenced by __attribute__(), __attribute__(), _auto_levels_callback(), _auto_levels_callback(), _auto_set_exposure(), _auto_set_illuminant(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _do_get_structure_auto(), _draw(), _event_draw(), _get_structure(), _history_resync_callback(), _preview_pipe_finished_callback(), _process_common_setup(), _refresh_module_histogram(), _select_region_toggled_callback(), _select_region_toggled_callback(), _spot_settings_changed_callback(), button_pressed(), button_pressed(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), commit_profile_callback(), dt_drawlayer_begin_gui_stroke_capture(), dt_drawlayer_commit_dabs(), dt_iop_autoset_advance(), dt_iop_levels_compute_levels_automatic(), dt_iop_zonesystem_preview_draw(), gui_cache_init(), gui_cleanup(), gui_focus(), gui_init(), gui_init(), gui_post_expose(), gui_post_expose(), gui_update(), gui_update(), invalidate_luminance_cache(), key_pressed(), masks_selection_changed(), mouse_moved(), mouse_moved(), optimize_changed_callback(), process(), process(), process(), process_cl(), process_cl(), process_clusters(), process_common_cleanup(), process_drago(), process_internal(), rt_auto_levels_callback(), rt_curr_scale_update(), rt_develop_ui_pipe_finished_callback(), rt_display_wavelet_scale_callback(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), scrolled(), start_profiling_callback(), and update_histogram().
| gboolean dt_iop_gui_module_is_visible | ( | dt_iop_module_t * | module | ) |
check if current module is visible
Definition at line 545 of file imageop_gui.c.
References dt_iop_is_hidden().
Referenced by _focus_module(), dt_dev_modules_update_multishow(), dt_iop_gui_get_next_visible_module(), and dt_iop_gui_get_previous_visible_module().
| gboolean dt_iop_gui_move_module_after | ( | dt_iop_module_t * | module, |
| dt_iop_module_t * | module_prev, | ||
| const char * | reason | ||
| ) |
Move a module after another one and commit the GUI-side effects.
This is the GUI boundary for module reordering: dt_ioppr_move_iop_after only mutates the pipeline list and order list, while this function is responsible for updating visible headers, rebuilding the pipes, recording the history step and notifying GUI listeners.
| module | Module being moved. |
| module_prev | Module that should end up immediately before module. |
| reason | Debug string used in IOP-order checks. |
Definition at line 714 of file imageop.c.
References dt_iop_module_t::dev, dt_iop_gui_commit_iop_order_change(), dt_ioppr_move_iop_after(), FALSE, and TRUE.
Referenced by _ioporder_drag_data_received(), and _modulegroups_drag_data_received().
| gboolean dt_iop_gui_move_module_before | ( | dt_iop_module_t * | module, |
| dt_iop_module_t * | module_next, | ||
| const char * | reason | ||
| ) |
Move a module before another one and commit the GUI-side effects.
This is the GUI boundary for module reordering: dt_ioppr_move_iop_before only mutates the pipeline list and order list, while this function is responsible for updating visible headers, rebuilding the pipes, recording the history step and notifying GUI listeners.
| module | Module being moved. |
| module_next | Module that should end up immediately after module. |
| reason | Debug string used in IOP-order checks. |
Definition at line 707 of file imageop.c.
References dt_iop_module_t::dev, dt_iop_gui_commit_iop_order_change(), dt_ioppr_move_iop_before(), FALSE, and TRUE.
Referenced by _ioporder_drag_data_received(), and _modulegroups_drag_data_received().
| gboolean dt_iop_gui_owns_widget | ( | const dt_iop_module_t * | module, |
| const GtkWidget * | target | ||
| ) |
Definition at line 2203 of file imageop_gui.c.
Referenced by _ui_scroll_target_is_live_widget().
| void dt_iop_gui_rename_module | ( | dt_iop_module_t * | module | ) |
Definition at line 764 of file imageop_gui.c.
References _rename_module_key_press(), _rename_module_resize(), dt_accels_disconnect_on_text_input(), dt_iop_gui_update_header(), dt_iop_module_t::gui, dt_iop_module_gui_t::header, IS_NULL_PTR, dt_iop_module_t::multi_name, and TRUE.
Referenced by _gui_rename_callback(), _iop_plugin_header_button_press(), _menuitem_button_released_preset(), and _rename_module_idle().
| void dt_iop_gui_reset | ( | dt_iop_module_t * | module | ) |
reset the ui to its defaults
Definition at line 1646 of file imageop.c.
References dt_gui_freeze_begin, dt_gui_freeze_end, and dt_iop_is_hidden().
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
Definition at line 993 of file imageop_gui.c.
References dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_set_enable_button_icon(), dt_iop_module_t::enabled, FALSE, dt_iop_module_t::gui, dt_iop_module_t::hide_enable_button, IS_NULL_PTR, dt_iop_module_gui_t::off, and TRUE.
Referenced by _commit_gui(), dt_iop_gui_changed(), and dt_iop_gui_update_header().
| void dt_iop_gui_set_expanded | ( | dt_iop_module_t * | module, |
| gboolean | expanded, | ||
| gboolean | collapse_others | ||
| ) |
set expanded state of iop
Definition at line 1441 of file imageop_gui.c.
References _gui_set_single_expanded(), _iop_dim_all_but(), dt_iop_module_t::dev, dt_iop_module_gui_t::expander, FALSE, dt_iop_module_t::gui, dt_develop_t::iop, IS_NULL_PTR, m, and dt_iop_module_gui_t::widget.
Referenced by _focus_module(), _focus_next_module(), _focus_previous_module(), _history_show_module_for_end(), _iop_ensure_visible(), _iop_plugin_enable_accel(), _iop_plugin_header_button_release(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _update_iop_visibility(), 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.
Definition at line 1853 of file imageop_gui.c.
References _display_mask_indicator_callback(), _gui_multiinstance_callback(), _gui_off_callback(), _gui_reset_callback(), _iop_gui_widget_gone(), _iop_plugin_body_button_press(), _iop_plugin_header_activate(), _iop_plugin_header_button_press(), _iop_plugin_header_button_release(), _iop_plugin_header_child_button_press(), _iop_tooltip_callback(), _mask_indicator_tooltip(), _presets_popup_callback(), dt_get_help_url(), dt_gui_add_class(), dt_gui_add_help_link(), DT_GUI_BOX_SPACING, dt_gui_get_ui(), 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_module_switch(), dtgtk_cairo_paint_multiinstance(), dtgtk_cairo_paint_presets(), dtgtk_cairo_paint_reset(), dtgtk_cairo_paint_showmask(), 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, dt_iop_module_t::gui, dt_iop_module_t::hide_enable_button, i, 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, and dt_iop_module_gui_t::widget.
Referenced by dt_dev_history_gui_update(), dt_iop_gui_duplicate(), and enter().
| void dt_iop_gui_update | ( | dt_iop_module_t * | module | ) |
updates the gui params and the enabled switch.
Definition at line 1193 of file imageop_gui.c.
References dt_bauhaus_update_module(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), dt_iop_gui_update_blending(), dt_iop_gui_update_expanded(), dt_iop_gui_update_header(), dt_iop_is_hidden(), and dt_iop_module_t::params.
Referenced by _blendif_change_blend_colorspace(), _blendif_hide_output_channels(), _blendif_show_output_channels(), _gui_reset_callback(), dt_dev_history_gui_update(), dt_gui_presets_apply_preset(), dt_iop_autoset_advance(), and dt_iop_gui_duplicate().
| void dt_iop_gui_update_expanded | ( | dt_iop_module_t * | module | ) |
refresh iop according to set expanded state
Definition at line 1458 of file imageop_gui.c.
References DTGTK_EXPANDER, dtgtk_expander_set_expanded(), dt_iop_module_gui_t::expander, dt_iop_module_t::gui, and IS_NULL_PTR.
Referenced by dt_iop_gui_update(), and enter().
| void dt_iop_gui_update_header | ( | dt_iop_module_t * | module | ) |
Definition at line 964 of file imageop_gui.c.
References _iop_panel_label(), dt_iop_add_remove_mask_indicator(), dt_iop_gui_set_enable_button(), dt_iop_module_t::gui, dt_iop_module_gui_t::header, and IS_NULL_PTR.
Referenced by _blendop_blend_mode_callback(), _blendop_blendif_boost_factor_callback(), _blendop_blendif_details_callback(), _blendop_blendif_invert(), _blendop_blendif_polarity_callback(), _blendop_blendif_reset(), _blendop_blendif_sliders_callback(), _blendop_blendif_sliders_reset_callback(), _blendop_compositing_changed(), _blendop_masks_apply_and_commit(), _blendop_masks_combine_callback(), _blendop_masks_invert_toggled(), _blendop_masks_mode_changed(), _blendop_masks_polarity_callback(), _raster_polarity_callback(), _raster_value_changed_callback(), _rename_module_key_press(), dt_iop_gui_blend_set_drawn_mask_group(), dt_iop_gui_changed(), dt_iop_gui_rename_module(), dt_iop_gui_set_expander(), dt_iop_gui_update(), and dt_iop_reload_defaults().
| void dt_iop_init_pipe | ( | struct dt_iop_module_t * | module, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Build one pixelpipe node's module-owned storage.
initialize pipe.
Establishes what _iop_piece_is_committable() later relies on. init_pipe is OPTIONAL in the module API, so a module that allocates nothing is legitimate and leaves data NULL with data_size 0; what is never legitimate is claiming a size without the storage, which is how a failed allocation would otherwise reach 61 modules that dereference piece->data unchecked.
Definition at line 604 of file imageop.c.
References dt_dev_pixelpipe_iop_t::blendop_data, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_calloc_align(), DT_DEBUG_ALWAYS, dt_print(), dt_dev_pixelpipe_iop_t::enabled, IS_NULL_PTR, and dt_iop_module_t::op.
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
Definition at line 1875 of file imageop.c.
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 | ) |
Definition at line 736 of file imageop.c.
References dt_iop_so_is_hidden(), and dt_iop_module_t::so.
Referenced by _get_user_mod_list(), _gui_delete_callback(), _ioporder_module_is_graph_visible(), _is_module_in_tab(), _modulegroups_reorder_target(), _modulegroups_sync_section_label_margins(), _studio_dev_teardown(), _update_iop_visibility(), dt_dev_history_gui_update(), 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(), dt_iop_is_visible(), dt_iop_module_is_in_pipeline(), 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
Definition at line 1825 of file imageop.c.
References FALSE, key, dt_iop_module_t::raster_mask, dt_iop_module_t::source, TRUE, dt_iop_module_t::users, and value.
Referenced by dt_dev_pixelpipe_process(), dt_develop_blend_process(), dt_develop_blend_process_cl(), and process().
| gboolean dt_iop_is_visible | ( | dt_iop_module_t * | module | ) |
Check if the module is currently visible in GUI
Definition at line 916 of file imageop_gui.c.
References dt_iop_is_hidden(), dt_iop_module_gui_t::expander, dt_iop_module_t::gui, and IS_NULL_PTR.
| void dt_iop_load_default_params | ( | dt_iop_module_t * | module | ) |
loads default settings from database.
Definition at line 145 of file imageop.c.
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_dev_modules_reload_defaults(), and dt_iop_reload_defaults().
| int dt_iop_load_module | ( | dt_iop_module_t * | module, |
| dt_iop_module_so_t * | module_so, | ||
| struct dt_develop_t * | dev | ||
| ) |
Definition at line 1102 of file imageop.c.
References dt_free, and dt_iop_load_module_by_so().
Referenced by _create_deleted_modules(), _dt_styles_tmp_module_from_style_item(), _find_so_for_history_entry(), dt_dev_create_module_instance(), and dt_dev_module_duplicate().
| 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
Definition at line 510 of file imageop.c.
References dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_develop_t::gui_attached, IS_NULL_PTR, k, dt_iop_module_so_t::op, dt_iop_module_t::op, dt_iop_module_t::params, and dt_iop_module_t::params_size.
Referenced by _init_module_so(), _init_presets(), _resolve_presets_blend_colorspace(), dt_dev_load_modules(), dt_develop_blend_legacy_params_from_so(), and dt_iop_load_module().
loads and inits every module in dt_iop_static_modules.
Definition at line 1073 of file imageop.c.
References _init_module_so(), _iop_load_module_static(), darktable, dt_database_begin_transaction_batch(), dt_database_end_transaction_batch(), dt_free, dt_iop_static_modules, dt_iop_static_modules_count, darktable_t::iop, and k.
Referenced by dt_init().
| gboolean dt_iop_module_has_raster_mask | ( | const dt_iop_module_t * | module | ) |
returns TRUE if module consumes a raster mask
Definition at line 1194 of file imageop.c.
References FALSE, IS_NULL_PTR, dt_iop_module_t::raster_mask, dt_iop_module_t::sink, and dt_iop_module_t::source.
| gboolean dt_iop_module_instance_exists | ( | dt_iop_module_t * | iop | ) |
Whether this instance conceptually exists yet.
An extra instance is created by a history item, so one whose item sits past the current history end is only a disabled pipeline node referenced by an entry the user has not reached: it exists in dev->iop but not, as far as anything the user can act on is concerned. A base instance (multi_priority 0) always exists.
Definition at line 741 of file imageop.c.
References dt_iop_module_t::dev, dt_dev_get_history_end_ext(), dt_dev_history_get_last_item_by_module(), dt_pthread_rwlock_rdlock(), dt_pthread_rwlock_unlock(), FALSE, dt_develop_t::history, dt_develop_t::history_mutex, IS_NULL_PTR, dt_iop_module_t::multi_priority, and TRUE.
Referenced by _update_iop_visibility(), and dt_iop_module_is_in_pipeline().
| gboolean dt_iop_module_is_in_pipeline | ( | dt_iop_module_t * | iop | ) |
Whether the module is part of the pipeline the user sees – the rule the "Pipeline" tab of the module groups panel lists modules by, so that a list of pipeline modules built anywhere else agrees with what that tab shows. Includes disabled modules that carry history.
Definition at line 778 of file imageop.c.
References _module_carries_history(), dt_iop_is_hidden(), dt_iop_module_instance_exists(), dt_iop_module_t::enabled, FALSE, and IS_NULL_PTR.
Referenced by _is_module_in_tab(), and _modchooser_run().
| gboolean dt_iop_module_needs_mask_history | ( | const dt_iop_module_t * | module | ) |
returns TRUE if module needs masks committed to history
Definition at line 1228 of file imageop.c.
References dt_iop_module_needs_mask_history_ext().
Referenced by _hm_collect_labels_from_history_map(), _hm_report_dest_label(), _hm_report_update_arrows(), _hm_report_update_dest_labels(), _hm_show_merge_report_popup(), and dt_dev_add_history_item_ext().
| gboolean dt_iop_module_needs_mask_history_ext | ( | const dt_iop_module_t * | module, |
| gboolean * | raster, | ||
| gboolean * | drawn, | ||
| gboolean * | parametric | ||
| ) |
returns TRUE if module needs masks committed to history plus each flag is set accordingly
Definition at line 1205 of file imageop.c.
References dt_iop_module_t::blend_params, dt_develop_blend_get_mask_usage(), FALSE, and IS_NULL_PTR.
Referenced by dt_dev_history_item_from_source_history_item(), and dt_iop_module_needs_mask_history().
| gboolean dt_iop_module_supports_drawn_mask | ( | dt_iop_module_t * | iop | ) |
Whether the module can carry a drawn mask, i.e. whether offering it one means anything. Supports blending, and is not one of the modules that opt out of masks specifically.
Definition at line 785 of file imageop.c.
References dt_iop_module_t::blend_params, FALSE, flags, IOP_FLAGS_NO_MASKS, IOP_FLAGS_SUPPORTS_BLENDING, and IS_NULL_PTR.
Referenced by _modchooser_run(), _modules_owning_group(), _show_masks_on_owning_module(), _tree_select_module_group(), _tree_store_add_forms(), and dt_iop_gui_blend_set_drawn_mask_group().
| void dt_iop_nap | ( | int32_t | usec | ) |
allow plugins to relinquish CPU and go to sleep for some time
Definition at line 1653 of file imageop.c.
Referenced by dt_dev_darkroom_pipeline(), dt_opencl_reserve_device_for_pipe(), leave(), and nlmeans_denoise_cl().
| void dt_iop_reload_defaults | ( | dt_iop_module_t * | module | ) |
reloads certain gui/param defaults when the image was switched.
Definition at line 792 of file imageop.c.
References dt_iop_module_t::dev, DT_DEBUG_PARAMS, dt_gui_widget_freeze, dt_iop_gui_update_header(), dt_iop_load_default_params(), dt_print(), dt_iop_module_t::gui, dt_iop_module_gui_t::header, and dt_iop_module_t::op.
Referenced by _gui_reset_callback(), _insert_default_modules(), dt_dev_init_default_history(), and dt_iop_gui_duplicate().
| void dt_iop_request_focus | ( | dt_iop_module_t * | module | ) |
Move darkroom focus to module, or clear it with NULL.
requests the focus for this plugin (to draw overlays over the center image) NOTE: this sets the current module expander as the scroll reference, which is handled when the parent panel changes size, which happens when uncollapsing the module. So dt_iop_request_focus() needs to be called before expanding modules (dt_iop_set_expanded) for auto-scroll to work properly.
Not a passive setter. It calls the outgoing module's gui_focus(FALSE) and the incoming one's gui_focus(TRUE) – which modules use to enter and leave edit modes – asks the panel to scroll the module into view, and triggers a module-visibility refresh that runs later, on the GTK main loop. Callers that change other state in the same callback should assume that refresh observes whatever is committed by the time control returns, not what is true at the moment of this call.
No-op when the module already has focus, or while widgets are suppressed.
Definition at line 1275 of file imageop_gui.c.
References dt_iop_module_t::dev, dt_collection_get_global(), dt_collection_hint_message(), dt_control_queue_cursor, dt_control_queue_redraw_center(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_get_global(), dt_dev_modulegroups_switch_tab(), dt_gui_add_class(), dt_gui_get_global(), dt_gui_refocus_center(), dt_gui_remove_class(), dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_get_pluginui(), dt_masks_reset_form_gui(), DT_SIGNAL_DEVELOP_MASKS_GUI_CHANGED, dt_widget_scroll_focus(), dt_widget_set_scroll_focus(), dt_iop_module_gui_t::expander, FALSE, dt_iop_module_t::gui, dt_develop_t::gui_module, IS_NULL_PTR, dt_gui_gtk_t::scroll_to, dt_gui_gtk_t::scroll_to_header_once, and TRUE.
Referenced by _add_shape(), _area_button_press_callback(), _area_scroll_callback(), _auto_levels_callback(), _auto_levels_callback(), _blendop_blendif_channel_display_toggled(), _blendop_blendif_key_press(), _blendop_blendif_showmask_clicked(), _blendop_masks_shape_can_start(), _blendop_masks_show_and_edit(), _color_picker_callback_button_press(), _custom_model_callback(), _darkroom_image_loaded_callback(), _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_set_single_expanded(), _history_show_module_for_end(), _iop_ensure_visible(), _iop_plugin_body_button_press(), _iop_plugin_enable_accel(), _iop_plugin_header_button_release(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _raster_combo_populate(), _scroll_event(), _select_region_toggled_callback(), _select_region_toggled_callback(), _update_iop_visibility(), acquire_source_button_pressed(), acquire_target_button_pressed(), area_button_press(), area_button_press(), area_button_release(), btn_make_radio_callback(), button_pressed(), button_pressed(), default_iop_focus(), dt_dev_history_gui_update(), dt_iop_gui_duplicate(), dt_iop_levels_button_press(), dt_iop_levels_scroll(), dt_masks_creation_mode_enter(), dt_masks_iop_combo_populate(), gui_reset(), key_pressed(), mask_callback(), notebook_button_press(), profile_changed(), rt_auto_levels_callback(), rt_display_wavelet_scale_callback(), rt_edit_masks_callback(), rt_select_algorithm_callback(), rt_shape_buttons_can_start(), 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 | ||
| ) |
Definition at line 1669 of file imageop.c.
References dt_iop_module_t::bypass_cache, dt_iop_module_t::dev, FALSE, dt_develop_t::iop, and state.
Referenced by _blendop_blendif_channel_display_toggled(), _blendop_blendif_channel_mask_view(), _blendop_blendif_channel_mask_view_toggle(), _blendop_blendif_leave_delayed(), _blendop_blendif_showmask_clicked(), _blendop_blendif_update_tab(), _color_picker_reset(), _display_mask_indicator_callback(), _enter_edit_mode(), _enter_edit_mode(), _event_commit_clicked(), _event_commit_clicked(), _visualize_callback(), commit_params(), dt_iop_gui_blending_lose_focus(), dt_iop_gui_update_blendif(), dt_iop_gui_update_blending(), gui_cleanup(), gui_focus(), gui_reset(), init(), mask_callback(), process(), rt_sync_bypass_cache(), run_profile_callback(), run_validation_callback(), show_luminance_mask_callback(), and show_mask_callback().
| void dt_iop_set_cache_bypass_variant | ( | dt_iop_module_t * | module, |
| int | variant | ||
| ) |
Set the opaque per-module hash disambiguator described on dt_iop_module_t.bypass_cache_variant. Call alongside dt_iop_set_cache_bypass() whenever a module can be bypassing the cache for more than one mutually-independent GUI reason at once, so toggling one of them still changes the pipeline hash even while bypass_cache itself stays TRUE.
Definition at line 1686 of file imageop.c.
Referenced by rt_sync_bypass_cache().
| void dt_iop_set_darktable_iop_table | ( | ) |
Definition at line 1732 of file imageop.c.
References darktable, dt_collection_query_set_iop_names(), dt_free, i, darktable_t::iop, IS_NULL_PTR, dt_iop_name_row_t::name, and dt_iop_name_row_t::operation.
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 | ||
| ) |
| void dt_iop_set_mask_mode | ( | dt_iop_module_t * | module, |
| int | mask_mode | ||
| ) |
make sure the raster mask is advertised if available
Definition at line 1174 of file imageop.c.
References dt_iop_module_t::blend_params, dt_develop_blend_get_mask_usage(), dt_history_item_get_name(), FALSE, key, dt_iop_module_t::masks, dt_iop_module_t::raster_mask, dt_iop_module_t::source, and void().
Referenced by _blendop_masks_mode_callback(), dt_iop_commit_blend_params(), and dt_iop_gui_blend_set_drawn_mask_group().
| gboolean dt_iop_so_is_hidden | ( | dt_iop_module_so_t * | module | ) |
checks if iop do have an ui
Definition at line 721 of file imageop.c.
References FALSE, IOP_FLAGS_HIDDEN, IS_NULL_PTR, dt_iop_module_so_t::op, and TRUE.
Referenced by dt_iop_is_hidden().
tears down the module descriptors built by dt_iop_load_modules_so().
Definition at line 1163 of file imageop.c.
References darktable, dt_free, and darktable_t::iop.
Referenced by dt_cleanup().
| void dt_iop_update_multi_priority | ( | dt_iop_module_t * | module, |
| int | new_priority | ||
| ) |
set multi_priority and update raster mask links
Definition at line 1801 of file imageop.c.
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, dt_iop_module_t::users, and value.
Referenced by _create_deleted_modules(), _gui_delete_callback(), _history_to_module(), _process_history_db_entry(), _rebuild_multi_priority(), and dt_dev_module_duplicate().
|
extern |
Referenced by dt_iop_load_modules_so().
|
extern |
Referenced by dt_iop_load_modules_so().