Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dt_iop_module_so_t Struct Reference

#include <imageop.h>

Collaboration diagram for dt_iop_module_so_t:

Data Fields

dt_gui_module_t common_fields
int(* version )()
void(* init_presets )(struct dt_iop_module_so_t *self)
void(* init_global )(struct dt_iop_module_so_t *self)
void(* cleanup_global )(struct dt_iop_module_so_t *self)
const char *(* name )(void)
const char *(* aliases )(void)
int(* default_group )(void)
int(* flags )(void)
const char *(* deprecated_msg )(void)
int(* iop_focus )(struct dt_gui_module_t *module, gboolean toggle)
const char **(* description )(struct dt_iop_module_t *self)
int(* operation_tags )(void)
int(* operation_tags_filter )(void)
void(* 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)
void(* 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)
int(* default_colorspace )(struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece)
int(* blend_colorspace )(struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece)
void(* tiling_callback )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)
void(* gui_update )(struct dt_iop_module_t *self)
void(* gui_reset )(struct dt_iop_module_t *self)
void(* gui_init )(struct dt_iop_module_t *self)
void(* color_picker_apply )(struct dt_iop_module_t *self, struct _GtkWidget *picker, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
void(* gui_changed )(struct dt_iop_module_t *self, GtkWidget *widget, void *previous)
void(* gui_cleanup )(struct dt_iop_module_t *self)
void(* gui_post_expose )(struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
void(* gui_focus )(struct dt_iop_module_t *self, gboolean in)
gboolean(* module_will_remove )(struct dt_iop_module_t *self)
void(* quiesce )(struct dt_iop_module_t *self)
int(* mouse_leave )(struct dt_iop_module_t *self)
int(* mouse_moved )(struct dt_iop_module_t *self, double x, double y, double pressure, int which)
int(* button_released )(struct dt_iop_module_t *self, double x, double y, int which, uint32_t state)
int(* button_pressed )(struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state)
int(* key_pressed )(struct dt_iop_module_t *self, GdkEventKey *event)
int(* scrolled )(struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)
void(* configure )(struct dt_iop_module_t *self, int width, int height)
void(* init )(struct dt_iop_module_t *self)
void(* cleanup )(struct dt_iop_module_t *self)
void(* init_pipe )(struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
void(* commit_params )(struct dt_iop_module_t *self, dt_iop_params_t *params, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
void(* reload_defaults )(struct dt_iop_module_t *self)
gboolean(* has_defaults )(struct dt_iop_module_t *self)
gboolean(* runtime_data_hash )(struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece)
gboolean(* geometry_record )(struct dt_iop_module_t *self, const void *params, struct dt_geometry_record_t *record)
void(* change_image )(struct dt_iop_module_t *self)
void(* commit_proxy )(struct dt_iop_module_t *self)
void(* cleanup_pipe )(struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
void(* modify_roi_in )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const struct dt_iop_roi_t *roi_out, struct dt_iop_roi_t *roi_in)
void(* modify_roi_out )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, struct dt_iop_roi_t *roi_out, const struct dt_iop_roi_t *roi_in)
int(* legacy_params )(struct dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)
void(* masks_selection_changed )(struct dt_iop_module_t *self, const int form_selected_id)
int(* process )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o)
 CPU implementation of the pixel filter for this module.
int(* process_tiling )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const int bpp)
int(* process_cl )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out)
 GPU implementation of the pixel filter for this module.
int(* process_tiling_cl )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const int bpp)
int(* distort_transform )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
int(* distort_backtransform )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
void(* distort_mask )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out)
int(* introspection_init )(struct dt_iop_module_so_t *self, int api_version)
dt_introspection_t *(* get_introspection )(void)
dt_introspection_field_t *(* get_introspection_linear )(void)
void *(* get_p )(const void *param, const char *name)
dt_introspection_field_t *(* get_f )(const char *name)
void(* set_preferences )(void *menu, struct dt_iop_module_t *self)
gboolean(* force_enable )(struct dt_iop_module_t *self, const gboolean current_state)
void(* post_history_commit )(struct dt_iop_module_t *self)
 Callback to run after a module's history is commited. This is mostly useful to synchronize mask drawing events with internal module resynchronization of masks, since the drawing events directly trigger the history appending.
int(* populate_masks_context_menu )(struct dt_iop_module_t *self, GtkWidget *menu, const int formid, const float pzx, const float pzy)
void(* autoset )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *i)
 Used for modules to init their parameters based on actual input reading, while init_defaults() only reads metadata.
dt_dev_operation_t op
dt_iop_global_data_t * data
int(* process_plain )(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o)
gboolean have_introspection

Detailed Description

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.

Definition at line 226 of file imageop.h.

Field Documentation

◆ aliases

const char *(* dt_iop_module_so_t::aliases) (void)

get the alternative names or keywords of the module, to be translated. Separate variants by a pipe |

Definition at line 89 of file imageop.h.

Referenced by dt_iop_get_localized_aliases().

◆ autoset

void(* dt_iop_module_so_t::autoset) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *i)

Used for modules to init their parameters based on actual input reading, while init_defaults() only reads metadata.

Parameters
self
pipe
piece
input

Definition at line 351 of file imageop.h.

◆ blend_colorspace

int(* dt_iop_module_so_t::blend_colorspace) (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece)

what colorspace the blend module operates with?

Definition at line 118 of file imageop.h.

◆ button_pressed

int(* dt_iop_module_so_t::button_pressed) (struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state)

Definition at line 157 of file imageop.h.

◆ button_released

int(* dt_iop_module_so_t::button_released) (struct dt_iop_module_t *self, double x, double y, int which, uint32_t state)

Definition at line 155 of file imageop.h.

◆ change_image

void(* dt_iop_module_so_t::change_image) (struct dt_iop_module_t *self)

called after the image has changed in darkroom

Definition at line 223 of file imageop.h.

◆ cleanup

void(* dt_iop_module_so_t::cleanup) (struct dt_iop_module_t *self)

Definition at line 164 of file imageop.h.

◆ cleanup_global

void(* dt_iop_module_so_t::cleanup_global) (struct dt_iop_module_so_t *self)

called once per module, at shutdown.

Definition at line 84 of file imageop.h.

Referenced by dt_iop_unload_modules_so().

◆ cleanup_pipe

void(* dt_iop_module_so_t::cleanup_pipe) (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)

this destroys all resources needed by the piece of the pixelpipe.

Definition at line 234 of file imageop.h.

Referenced by dt_iop_cleanup_pipe().

◆ color_picker_apply

void(* dt_iop_module_so_t::color_picker_apply) (struct dt_iop_module_t *self, struct _GtkWidget *picker, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)

apply color picker results

Definition at line 133 of file imageop.h.

◆ commit_params

void(* dt_iop_module_so_t::commit_params) (struct dt_iop_module_t *self, dt_iop_params_t *params, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)

this resets the params to factory defaults. used at the beginning of each history synch. this commits (a mutex will be locked to synch pipe/gui) the given history params to the pixelpipe piece.

Definition at line 173 of file imageop.h.

◆ commit_proxy

void(* dt_iop_module_so_t::commit_proxy) (struct dt_iop_module_t *self)

Publish module-derived state into dev->proxy (e.g. temperature's WB coeffs) on the GUI/main thread. Called after history is applied to params (dt_dev_pop_history_items_ext) and on every GUI history commit (dt_dev_add_history_item_real), i.e. always BEFORE any pipeline runs. dev->proxy is a GUI/main-thread inter-module channel; pipelines must never access it (neither read nor write) – the pipeline only needs module params.

Definition at line 230 of file imageop.h.

◆ common_fields

dt_gui_module_t dt_iop_module_so_t::common_fields

Definition at line 229 of file imageop.h.

◆ configure

void(* dt_iop_module_so_t::configure) (struct dt_iop_module_t *self, int width, int height)

Definition at line 161 of file imageop.h.

◆ data

dt_iop_global_data_t* dt_iop_module_so_t::data

other stuff that may be needed by the module, not only in gui mode. inited only once, has to be read-only then.

Definition at line 238 of file imageop.h.

Referenced by cleanup_global(), cleanup_global(), dt_dev_load_modules(), and init_global().

◆ default_colorspace

int(* dt_iop_module_so_t::default_colorspace) (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece)

what default colorspace this iop use?

Definition at line 115 of file imageop.h.

◆ default_group

int(* dt_iop_module_so_t::default_group) (void)

get the default group this module belongs to.

Definition at line 91 of file imageop.h.

◆ deprecated_msg

const char *(* dt_iop_module_so_t::deprecated_msg) (void)

get the deprecated message if needed, to be translated.

Definition at line 95 of file imageop.h.

◆ description

const char **(* dt_iop_module_so_t::description) (struct dt_iop_module_t *self)

get a descriptive text used for example in a tooltip in more modules

Definition at line 101 of file imageop.h.

◆ distort_backtransform

int(* dt_iop_module_so_t::distort_backtransform) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)

reverse points after the iop is applied => point before process

Definition at line 308 of file imageop.h.

◆ distort_mask

void(* dt_iop_module_so_t::distort_mask) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out)

Definition at line 312 of file imageop.h.

◆ distort_transform

int(* dt_iop_module_so_t::distort_transform) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)

this functions are used for distort iop points is an array of float {x1,y1,x2,y2,...} size is 2*points_count points before the iop is applied => point after processed

Definition at line 305 of file imageop.h.

◆ flags

int(* dt_iop_module_so_t::flags) (void)

get the iop module flags.

Definition at line 93 of file imageop.h.

Referenced by _init_module_so(), _resolve_presets_blend_colorspace(), and dt_iop_so_is_hidden().

◆ force_enable

gboolean(* dt_iop_module_so_t::force_enable) (struct dt_iop_module_t *self, const gboolean current_state)

Definition at line 328 of file imageop.h.

◆ geometry_record

gboolean(* dt_iop_module_so_t::geometry_record) (struct dt_iop_module_t *self, const void *params, struct dt_geometry_record_t *record)

Publish this module's geometry as data, for develop/geometry (the service that replaced the GUI's pixel-less clone of the pipeline – see doc/geometry-service.md).

Fill record's vtable/data and return TRUE; return FALSE (the default) for a module that does not change geometry. Called on the GUI thread.

params is THE SAME BLOB commit_params() is handed for this module – resolved from the history stack, or the module's defaults where the pipe would use those. It is not self->params: those are the GUI thread's live values, and dt_dev_add_history_item() is throttled, so between an edit and its commit they describe a geometry the pipes are not rendering. Read this argument, exactly as commit_params() reads its own.

THE ONE-CONSTRUCTOR RULE: whatever commit_params() derives for geometry and whatever the record carries must come from ONE shared helper, and the record's evaluators must be the same code distort_transform()/modify_roi_out() run. Two derivations of the same geometry drift, and the drift surfaces as an overlay that no longer sits on what it describes.

Definition at line 220 of file imageop.h.

◆ get_f

dt_introspection_field_t *(* dt_iop_module_so_t::get_f) (const char *name)

◆ get_introspection

dt_introspection_t *(* dt_iop_module_so_t::get_introspection) (void)

Definition at line 316 of file imageop.h.

◆ get_introspection_linear

dt_introspection_field_t *(* dt_iop_module_so_t::get_introspection_linear) (void)

Definition at line 317 of file imageop.h.

◆ get_p

void *(* dt_iop_module_so_t::get_p) (const void *param, const char *name)

Definition at line 318 of file imageop.h.

Referenced by dt_ioppr_get_export_profile_type(), and dt_ioppr_get_work_profile_type().

◆ gui_changed

void(* dt_iop_module_so_t::gui_changed) (struct dt_iop_module_t *self, GtkWidget *widget, void *previous)

called by standard widget callbacks after value changed

Definition at line 135 of file imageop.h.

◆ gui_cleanup

void(* dt_iop_module_so_t::gui_cleanup) (struct dt_iop_module_t *self)

destroy widget.

Definition at line 137 of file imageop.h.

Referenced by dt_iop_so_is_hidden().

◆ gui_focus

void(* dt_iop_module_so_t::gui_focus) (struct dt_iop_module_t *self, gboolean in)

optional callback to be notified if the module acquires gui focus/loses it.

Definition at line 142 of file imageop.h.

◆ gui_init

void(* dt_iop_module_so_t::gui_init) (struct dt_iop_module_t *self)

construct widget.

Definition at line 130 of file imageop.h.

Referenced by _init_module_so(), and dt_iop_so_is_hidden().

◆ gui_post_expose

void(* dt_iop_module_so_t::gui_post_expose) (struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)

optional method called after darkroom expose.

Definition at line 140 of file imageop.h.

◆ gui_reset

void(* dt_iop_module_so_t::gui_reset) (struct dt_iop_module_t *self)

reset ui to defaults

Definition at line 128 of file imageop.h.

◆ gui_update

void(* dt_iop_module_so_t::gui_update) (struct dt_iop_module_t *self)

callback methods for gui. synch gtk interface with gui params, if necessary.

Definition at line 126 of file imageop.h.

◆ has_defaults

gboolean(* dt_iop_module_so_t::has_defaults) (struct dt_iop_module_t *self)

check if params are set to defaults. Modules where defaults are partially or totally inited at runtime and where memcmp() wouldn't work can implement their own custom checks. Return TRUE if params are set to defaults.

Definition at line 182 of file imageop.h.

◆ have_introspection

gboolean dt_iop_module_so_t::have_introspection

Definition at line 247 of file imageop.h.

◆ init

void(* dt_iop_module_so_t::init) (struct dt_iop_module_t *self)

Definition at line 163 of file imageop.h.

◆ init_global

void(* dt_iop_module_so_t::init_global) (struct dt_iop_module_so_t *self)

called once per module, at startup.

Definition at line 82 of file imageop.h.

◆ init_pipe

void(* dt_iop_module_so_t::init_pipe) (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)

this inits the piece of the pipe, allocing piece->data as necessary.

Definition at line 168 of file imageop.h.

◆ init_presets

void(* dt_iop_module_so_t::init_presets) (struct dt_iop_module_so_t *self)

this initializes static, hardcoded presets for this module and is called only once per run of dt.

Definition at line 80 of file imageop.h.

Referenced by _init_presets().

◆ input_format

void(* dt_iop_module_so_t::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)

what do the iop want as an input?

Definition at line 108 of file imageop.h.

◆ introspection_init

int(* dt_iop_module_so_t::introspection_init) (struct dt_iop_module_so_t *self, int api_version)

Definition at line 315 of file imageop.h.

◆ iop_focus

int(* dt_iop_module_so_t::iop_focus) (struct dt_gui_module_t *module, gboolean toggle)

give focus to the current module and adapt other parts of the GUI if needed

Definition at line 98 of file imageop.h.

◆ key_pressed

int(* dt_iop_module_so_t::key_pressed) (struct dt_iop_module_t *self, GdkEventKey *event)

Definition at line 158 of file imageop.h.

◆ legacy_params

int(* dt_iop_module_so_t::legacy_params) (struct dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version)

Definition at line 242 of file imageop.h.

Referenced by _init_presets().

◆ masks_selection_changed

void(* dt_iop_module_so_t::masks_selection_changed) (struct dt_iop_module_t *self, const int form_selected_id)

Definition at line 244 of file imageop.h.

◆ modify_roi_in

void(* dt_iop_module_so_t::modify_roi_in) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const struct dt_iop_roi_t *roi_out, struct dt_iop_roi_t *roi_in)

Definition at line 237 of file imageop.h.

◆ modify_roi_out

void(* dt_iop_module_so_t::modify_roi_out) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, struct dt_iop_roi_t *roi_out, const struct dt_iop_roi_t *roi_in)

Definition at line 240 of file imageop.h.

◆ module_will_remove

gboolean(* dt_iop_module_so_t::module_will_remove) (struct dt_iop_module_t *self)

optional callback invoked before removing a module instance. Return FALSE to cancel the removal.

Definition at line 144 of file imageop.h.

◆ mouse_leave

int(* dt_iop_module_so_t::mouse_leave) (struct dt_iop_module_t *self)

optional event callbacks

Definition at line 153 of file imageop.h.

◆ mouse_moved

int(* dt_iop_module_so_t::mouse_moved) (struct dt_iop_module_t *self, double x, double y, double pressure, int which)

Definition at line 154 of file imageop.h.

◆ name

const char *(* dt_iop_module_so_t::name) (void)

get name of the module, to be translated.

Definition at line 87 of file imageop.h.

Referenced by dt_iop_get_localized_name().

◆ op

◆ operation_tags

int(* dt_iop_module_so_t::operation_tags) (void)

Definition at line 103 of file imageop.h.

◆ operation_tags_filter

int(* dt_iop_module_so_t::operation_tags_filter) (void)

Definition at line 104 of file imageop.h.

◆ output_format

void(* dt_iop_module_so_t::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)

what will it output?

Definition at line 111 of file imageop.h.

◆ populate_masks_context_menu

int(* dt_iop_module_so_t::populate_masks_context_menu) (struct dt_iop_module_t *self, GtkWidget *menu, const int formid, const float pzx, const float pzy)

Definition at line 340 of file imageop.h.

◆ post_history_commit

void(* dt_iop_module_so_t::post_history_commit) (struct dt_iop_module_t *self)

Callback to run after a module's history is commited. This is mostly useful to synchronize mask drawing events with internal module resynchronization of masks, since the drawing events directly trigger the history appending.

Parameters
self

Definition at line 338 of file imageop.h.

◆ process_plain

int(* dt_iop_module_so_t::process_plain) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o)

gui is also only inited once at startup. which results in this widget here, too.

Definition at line 243 of file imageop.h.

◆ process_tiling

int(* dt_iop_module_so_t::process_tiling) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const int bpp)

a tiling variant of process().

Definition at line 270 of file imageop.h.

◆ process_tiling_cl

int(* dt_iop_module_so_t::process_tiling_cl) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const int bpp)

a tiling variant of process_cl().

Definition at line 297 of file imageop.h.

◆ quiesce

void(* dt_iop_module_so_t::quiesce) (struct dt_iop_module_t *self)

optional callback invoked on the GUI thread when leaving the darkroom view, BEFORE the pixelpipe nodes and history are torn down. A module that owns background threads still touching the pipe, dev or history (e.g. an asynchronous paint/commit worker) must stop/join them here so they cannot run a resync against freed pipeline nodes during teardown.

Definition at line 150 of file imageop.h.

◆ reload_defaults

void(* dt_iop_module_so_t::reload_defaults) (struct dt_iop_module_t *self)

this is the chance to update default parameters, after the full raw is loaded.

Definition at line 175 of file imageop.h.

◆ runtime_data_hash

gboolean(* dt_iop_module_so_t::runtime_data_hash) (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece)

whether commit_params() seals extra effective runtime state into piece->data that must be part of the cache hash.

Returning TRUE makes dt_iop_commit_params() hash the first piece->data_size bytes of piece->data BLINDLY. Those bytes must therefore be CONTENT, and piece->data_size must stop before the first pointer in the struct – keep runtime pointers last and set piece->data_size = G_STRUCT_OFFSET(<data_t>, <first pointer>) in init_pipe(), as iop/colorbalancergb.c and iop/colorout.c both do.

A pointer in the hashed prefix is wrong in both directions, and the second one is silent: a re-allocation gives a new address for identical state, re-keying the whole downstream chain to recompute pixels that cannot have moved; and the allocator handing the SAME address back for different state makes the cache serve the previous state's pixels under the new key. That is issue #1145: colorout's rendering state moved behind an opaque pointer, its hashed prefix became an address, and every darkroom pipeline resync recomputed colorout, dither and gamma. A module whose state is opaque must have its owner publish an identity for it (dt_colorspaces_conversion_identity()) and hash THAT.

Definition at line 201 of file imageop.h.

◆ scrolled

int(* dt_iop_module_so_t::scrolled) (struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)

Definition at line 160 of file imageop.h.

◆ set_preferences

void(* dt_iop_module_so_t::set_preferences) (void *menu, struct dt_iop_module_t *self)

Definition at line 322 of file imageop.h.

◆ tiling_callback

void(* dt_iop_module_so_t::tiling_callback) (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling)

report back info for tiling: memory usage and overlap. Memory usage: factor * input_size + overhead

Definition at line 122 of file imageop.h.

◆ version

int(* dt_iop_module_so_t::version) ()

Definition at line 78 of file imageop.h.

Referenced by _init_presets(), init_presets(), and set_presets().


The documentation for this struct was generated from the following file: