![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <imageop.h>
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 |
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.
| 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().
| 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) |
| 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) |
| int(* dt_iop_module_so_t::button_released) (struct dt_iop_module_t *self, double x, double y, int which, uint32_t state) |
| void(* dt_iop_module_so_t::change_image) (struct dt_iop_module_t *self) |
| void(* dt_iop_module_so_t::cleanup) (struct dt_iop_module_t *self) |
| 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().
| 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().
| 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) |
| 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) |
| 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.
| dt_gui_module_t dt_iop_module_so_t::common_fields |
| void(* dt_iop_module_so_t::configure) (struct dt_iop_module_t *self, int width, int height) |
| 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().
| 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) |
| int(* dt_iop_module_so_t::default_group) (void) |
| const char *(* dt_iop_module_so_t::deprecated_msg) (void) |
| const char **(* dt_iop_module_so_t::description) (struct dt_iop_module_t *self) |
| 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) |
| 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) |
| 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) |
| 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().
| gboolean(* dt_iop_module_so_t::force_enable) (struct dt_iop_module_t *self, const gboolean current_state) |
| 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.
| dt_introspection_field_t *(* dt_iop_module_so_t::get_f) (const char *name) |
Definition at line 319 of file imageop.h.
Referenced by dt_bauhaus_combobox_from_params(), dt_bauhaus_slider_from_params(), and dt_bauhaus_toggle_from_params().
| dt_introspection_t *(* dt_iop_module_so_t::get_introspection) (void) |
| dt_introspection_field_t *(* dt_iop_module_so_t::get_introspection_linear) (void) |
Definition at line 318 of file imageop.h.
Referenced by dt_ioppr_get_export_profile_type(), and dt_ioppr_get_work_profile_type().
| void(* dt_iop_module_so_t::gui_changed) (struct dt_iop_module_t *self, GtkWidget *widget, void *previous) |
| void(* dt_iop_module_so_t::gui_cleanup) (struct dt_iop_module_t *self) |
| void(* dt_iop_module_so_t::gui_focus) (struct dt_iop_module_t *self, gboolean in) |
| 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().
| 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) |
| void(* dt_iop_module_so_t::gui_reset) (struct dt_iop_module_t *self) |
| void(* dt_iop_module_so_t::gui_update) (struct dt_iop_module_t *self) |
| gboolean(* dt_iop_module_so_t::has_defaults) (struct dt_iop_module_t *self) |
| void(* dt_iop_module_so_t::init) (struct dt_iop_module_t *self) |
| void(* dt_iop_module_so_t::init_global) (struct dt_iop_module_so_t *self) |
| 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) |
| 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().
| 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) |
| int(* dt_iop_module_so_t::introspection_init) (struct dt_iop_module_so_t *self, int api_version) |
| int(* dt_iop_module_so_t::iop_focus) (struct dt_gui_module_t *module, gboolean toggle) |
| int(* dt_iop_module_so_t::key_pressed) (struct dt_iop_module_t *self, GdkEventKey *event) |
| 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().
| void(* dt_iop_module_so_t::masks_selection_changed) (struct dt_iop_module_t *self, const int form_selected_id) |
| 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) |
| 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) |
| gboolean(* dt_iop_module_so_t::module_will_remove) (struct dt_iop_module_t *self) |
| int(* dt_iop_module_so_t::mouse_leave) (struct dt_iop_module_t *self) |
| int(* dt_iop_module_so_t::mouse_moved) (struct dt_iop_module_t *self, double x, double y, double pressure, int which) |
| 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().
| dt_dev_operation_t dt_iop_module_so_t::op |
string identifying this operation.
Definition at line 235 of file imageop.h.
Referenced by _image_get_history_orientation(), _init_presets(), _resolve_presets_blend_colorspace(), add_preset(), dt_iop_cleanup_pipe(), dt_iop_get_localized_aliases(), dt_iop_get_localized_name(), dt_iop_get_module_flags(), dt_iop_so_is_hidden(), dt_ioppr_get_export_profile_type(), dt_ioppr_get_work_profile_type(), init_presets(), and set_presets().
| 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) |
| 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) |
| void(* dt_iop_module_so_t::post_history_commit) (struct dt_iop_module_t *self) |
| 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) |
| 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) |
| 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().
| 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.
| void(* dt_iop_module_so_t::reload_defaults) (struct dt_iop_module_t *self) |
| 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.
| int(* dt_iop_module_so_t::scrolled) (struct dt_iop_module_t *self, double x, double y, int up, uint32_t state) |
| void(* dt_iop_module_so_t::set_preferences) (void *menu, struct dt_iop_module_t *self) |
| 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) |
| int(* dt_iop_module_so_t::version) () |
Definition at line 78 of file imageop.h.
Referenced by _init_presets(), init_presets(), and set_presets().