105#ifdef GDK_WINDOWING_QUARTZ
283 const void *
const i,
void *
const o)
310 size_t param_size =
module->so->get_introspection()->size;
311 module->params_size = param_size;
317 module->params = NULL;
322 module->default_params = NULL;
324 module->params = (dt_iop_params_t *)calloc(1, param_size);
325 module->default_params = (dt_iop_params_t *)calloc(1, param_size);
327 module->default_enabled = 0;
332 switch(
i->header.type)
335 *(
float*)((uint8_t *)
module->default_params + i->header.offset) = i->Float.Default;
338 *(
int*)((uint8_t *)
module->default_params + i->header.offset) = i->Int.Default;
341 *(
unsigned int*)((uint8_t *)
module->default_params + i->header.offset) = i->UInt.Default;
344 *(
unsigned short*)((uint8_t *)
module->default_params + i->header.offset) = i->UShort.Default;
347 *(
int*)((uint8_t *)
module->default_params + i->header.offset) = i->Enum.Default;
350 *(gboolean*)((uint8_t *)
module->default_params + i->header.offset) = i->Bool.Default;
353 *(
char*)((uint8_t *)
module->default_params + i->header.offset) = i->Char.Default;
356 memset((uint8_t *)module->
default_params +
i->header.offset, 0,
i->header.size);
362 size_t element_size =
i->Array.field->header.size;
363 if(element_size %
sizeof(
int))
366 for (
size_t c = element_size; c <
i->header.size; c++,
p++)
367 p[element_size] = *
p;
371 element_size /=
sizeof(int);
372 size_t num_ints =
i->header.size /
sizeof(int);
374 int *
p = (
int *)((uint8_t *)
module->default_params + i->header.offset);
375 for (
size_t c = element_size; c < num_ints; c++,
p++)
376 p[element_size] = *
p;
384 fprintf(stderr,
"unsupported introspection type \"%s\" encountered in dt_iop_default_init (field %s)\n",
i->header.type_name,
i->header.field_name);
401 if(module->gui && !
IS_NULL_PTR(module->gui->expander))
403 g_object_set_data(G_OBJECT(module->gui->expander),
"dt-modulegroups-switch-from-active-once",
404 GINT_TO_POINTER(
TRUE));
420 if(module->dev->gui_module != module)
427 module->dev->gui_module = NULL;
457 const char *
const module_name = entry->
op;
458 g_strlcpy(module->
op, module_name,
sizeof(module->
op));
462#define INCLUDE_API_FROM_MODULE_STATIC_DEFAULTS
465 if(
IS_NULL_PTR(module->init))
module->init = dt_iop_default_init;
466 if(
IS_NULL_PTR(module->modify_roi_in))
module->modify_roi_in = _iop_modify_roi_in;
467 if(
IS_NULL_PTR(module->modify_roi_out))
module->modify_roi_out = _iop_modify_roi_out;
470 if(
IS_NULL_PTR(module->process_tiling_cl))
module->process_tiling_cl = dt_opencl_is_inited() ? default_process_tiling_cl : NULL;
474 module->process_plain = module->process;
475 module->process = default_process;
480 module->have_introspection = FALSE;
481 if(module->introspection_init)
486 module->have_introspection = TRUE;
494 "[iop_load_module] `%s' claims introspection but did not replace the default"
495 " accessors\n", module_name);
500 fprintf(stderr,
"[iop_load_module] failed to initialize introspection for operation `%s'\n", module_name);
503 if(module->init_global)
module->init_global(module);
513 module->hide_enable_button = 0;
514 module->request_color_pick = DT_REQUEST_COLORPICK_OFF;
515 module->request_histogram = DT_REQUEST_ONLY_IN_GUI;
516 module->histogram_stats.bins_count = 0;
517 module->histogram_stats.pixels = 0;
518 module->multi_priority = 0;
519 module->iop_order = 0;
520 for(
int k = 0;
k < 3;
k++)
522 module->picked_color[k] = module->picked_output_color[k] = 0.0f;
523 module->picked_color_min[k] = module->picked_output_color_min[k] = 666.0f;
524 module->picked_color_max[k] = module->picked_output_color_max[k] = -666.0f;
526 module->histogram_cst = IOP_CS_NONE;
527 module->histogram = NULL;
528 module->histogram_max[0] = module->histogram_max[1] = module->histogram_max[2] = module->histogram_max[3]
530 module->histogram_middle_grey = FALSE;
531 module->request_mask_display = DT_DEV_PIXELPIPE_DISPLAY_NONE;
532 module->bypass_cache = FALSE;
533 module->bypass_cache_variant = 0;
534 module->enabled = module->default_enabled = module->workflow_enabled = 0;
535 g_strlcpy(module->
op, so->
op, 20);
536 module->raster_mask.source.users = g_hash_table_new(NULL, NULL);
537 module->raster_mask.source.masks = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, dt_free_gpointer);
538 module->raster_mask.sink.source = NULL;
539 module->raster_mask.sink.id = 0;
543#define INCLUDE_API_FROM_MODULE_LOAD_BY_SO
546 module->version = so->version;
547 module->process_plain = so->process_plain;
548 module->have_introspection = so->have_introspection;
551 module->global_data = so->data;
554 module->init(module);
555 module->hash = DT_PIXELPIPE_CACHE_HASH_INVALID;
556 module->blendop_hash = DT_PIXELPIPE_CACHE_HASH_INVALID;
560 fprintf(stderr,
"[iop_load_module] `%s' needs to have a params size > 0!\n", so->
op);
567 module->params = calloc(1, module->params_size);
569 module->default_params = calloc(1, module->params_size);
570 module->blend_params = calloc(1, sizeof(dt_develop_blend_params_t));
571 module->default_blendop_params = calloc(1, sizeof(dt_develop_blend_params_t));
579 module->common_fields.name = delete_underscore(module->name());
580 module->common_fields.view = g_strdup(_("Darkroom"));
584 module->common_fields.name = NULL;
585 module->common_fields.view = NULL;
587 module->common_fields.widget_list = NULL;
588 module->common_fields.widget_list_bh = NULL;
589 module->common_fields.focus = module->iop_focus;
590 module->common_fields.ensure_visible = _iop_ensure_visible;
591 module->common_fields.deprecated = (module->flags() & IOP_FLAGS_DEPRECATED) == IOP_FLAGS_DEPRECATED;
609 if(!
IS_NULL_PTR(module->init_pipe))
module->init_pipe(module, pipe, piece);
614 "[dt_iop_init_pipe] `%s' could not allocate its %" G_GSIZE_FORMAT
615 " bytes of node storage; the node stays disabled\n", module->
op, piece->
data_size);
624 "[dt_iop_init_pipe] `%s' could not allocate blend storage; the node stays disabled\n",
649 "[dt_iop_cleanup_pipe] missing module, skipping module pipe cleanup\n");
654 "[dt_iop_cleanup_pipe] missing pipe for `%s`, skipping module pipe cleanup\n",
660 gboolean module_so_loaded =
FALSE;
665 for(GList *iop = g_list_first(
darktable.
iop); iop; iop = g_list_next(iop))
667 if(iop->data == module_so)
669 module_so_loaded =
TRUE;
674 if(!module_so_loaded)
676 "[dt_iop_cleanup_pipe] invalid shared-object descriptor %p, skipping module pipe cleanup\n",
678 else if(module->cleanup_pipe != module_so->cleanup_pipe)
680 "[dt_iop_cleanup_pipe] stale cleanup callback for `%s`, skipping module pipe cleanup\n",
683 module_so->cleanup_pipe(module, pipe, piece);
694 gboolean
enable, gboolean write_history,
const char *reason)
723 gboolean is_hidden =
TRUE;
727 g_debug(
"Module '%s' is not hidden and lacks implementation of gui_init()...", module->
op);
728 else if(!module->gui_cleanup)
729 g_debug(
"Module '%s' is not hidden and lacks implementation of gui_cleanup()...", module->
op);
765 gboolean found =
FALSE;
767 for(
const GList *history = g_list_last(dev->
history); history && !found;
768 history = g_list_previous(history))
771 found = (item->module == module);
788 const int flags = iop->flags();
803 if(module->reload_defaults)
810 module->reload_defaults(module);
815 fprintf(stderr,
"reload_defaults should not be called without image.\n");
838 for(GList *l = presets; l; l = g_list_next(l))
846 memcpy(&blend_params,
preset->blendop_params,
sizeof(blend_params));
851 module = (dt_iop_module_t *)calloc(1, sizeof(dt_iop_module_t));
863 sizeof(blend_params));
878 module_so->init_presets(module_so);
883 const int32_t module_version = module_so->version();
888 for(GList *l = presets; l; l = g_list_next(l))
892 int32_t old_params_version =
preset->op_version;
893 const void *old_params =
preset->op_params;
894 const int32_t old_params_size =
preset->op_params_size;
895 const int32_t old_blend_params_version =
preset->blendop_version;
896 const void *old_blend_params =
preset->blendop_params;
897 const int32_t old_blend_params_size =
preset->blendop_params_size;
899 if(old_params_version == 0)
907 if(old_params_version == 0)
909 fprintf(stderr,
"[imageop_init_presets] WARNING: Could not find versioning information for '%s' "
910 "preset '%s'\nUntil some is found, the preset will be unavailable.\n(To make it "
911 "return, please load an image that uses the preset.)\n",
918 fprintf(stderr,
"[imageop_init_presets] Found version %d for '%s' preset '%s'\n", old_params_version,
926 if(module_version > old_params_version && !
IS_NULL_PTR(module_so->legacy_params))
930 module = (dt_iop_module_t *)calloc(1, sizeof(dt_iop_module_t));
948 const int32_t new_params_size =
module->params_size;
949 void *new_params = calloc(1, new_params_size);
952 if(module->legacy_params(module, old_params, old_params_version, new_params, module_version))
960 fprintf(stderr,
"[imageop_init_presets] updating '%s' preset '%s' from version %d to version %d\nto:'%s'",
961 module_so->
op,
name, old_params_version, module_version,
972 else if(module_version > old_params_version)
974 fprintf(stderr,
"[imageop_init_presets] Can't upgrade '%s' preset '%s' from version %d to %d, no "
975 "legacy_params() implemented \n",
976 module_so->
op,
name, old_params_version, module_version);
982 "[imageop_init_presets] updating '%s' preset '%s' from blendop version %d to version %d\n",
988 module = (dt_iop_module_t *)calloc(1, sizeof(dt_iop_module_t));
995 if(module->params_size == 0)
1007 old_blend_params_size) == 0)
1047 static gboolean blending_accels_initialized =
FALSE;
1048 if(!blending_accels_initialized)
1059 blending_accels_initialized =
TRUE;
1078 GList *modules = NULL;
1082 dt_iop_module_so_t *
module = (dt_iop_module_so_t *)calloc(1, sizeof(dt_iop_module_so_t));
1090 modules = g_list_prepend(modules, module);
1127 module->cleanup(module);
1132 module->common_fields.name = NULL;
1137 module->common_fields.view = NULL;
1159 module->raster_mask.source.users = NULL;
1160 module->raster_mask.source.masks = NULL;
1168 if(module->cleanup_global)
module->cleanup_global(module);
1177 static const int key = 0;
1179 gboolean drawn_used =
FALSE;
1180 gboolean parametric_used =
FALSE;
1183 if(drawn_used || parametric_used)
1198 const gboolean mask_mode_raster =
module->blend_params
1199 && ((module->blend_params->mask_mode & DEVELOP_MASK_RASTER) == DEVELOP_MASK_RASTER);
1202 return mask_mode_raster || has_raster_sink;
1207 gboolean raster_used =
FALSE;
1208 gboolean drawn_used =
FALSE;
1209 gboolean parametric_used =
FALSE;
1212 const gboolean supports_blending
1213 = ((
module->flags() & IOP_FLAGS_SUPPORTS_BLENDING) == IOP_FLAGS_SUPPORTS_BLENDING);
1214 const gboolean internal_masks = ((
module->flags() & IOP_FLAGS_INTERNAL_MASKS) == IOP_FLAGS_INTERNAL_MASKS);
1216 if(!supports_blending)
return internal_masks;
1223 if(!
IS_NULL_PTR(parametric)) *parametric = parametric_used;
1225 return raster_used || drawn_used || parametric_used || internal_masks;
1249 for(GList *iter = g_list_first(module->
dev->
iop); iter; iter = g_list_next(iter))
1252 if(!strcmp(
m->op, blendop_params->raster_mask_source))
1254 if(
m->multi_priority == blendop_params->raster_mask_instance)
1256 g_hash_table_insert(
m->raster_mask.source.users, module, GINT_TO_POINTER(blendop_params->raster_mask_id));
1257 dt_print(
DT_DEBUG_MASKS,
"[raster masks] Committing raster mask from %s (%s) into %s (%s)\n",
m->op,
m->multi_name, module->
op,
1259 module->raster_mask.sink.source = m;
1260 module->raster_mask.sink.id = blendop_params->raster_mask_id;
1267 module->raster_mask.sink.source = NULL;
1268 module->raster_mask.sink.id = 0;
1275 gboolean all_ok =
TRUE;
1306 fprintf(stderr,
"validation check failed in _iop_validate_params for type \"%s\"; string not null terminated.\n",
1318 fprintf(stderr,
"validation check failed in _iop_validate_params for type \"%s\", for array element \"%d\"\n",
1327 all_ok = isnan(*(
float*)
p) || ((*(
float*)
p >= field->
Float.
Min && *(
float*)
p <= field->
Float.
Max));
1330 all_ok = (*(
int*)
p >= field->
Int.
Min && *(
int*)
p <= field->
Int.
Max);
1333 all_ok = (*(
unsigned int*)
p >= field->
UInt.
Min && *(
unsigned int*)
p <= field->
UInt.
Max);
1336 all_ok = (*(
unsigned short int*)
p >= field->
UShort.
Min && *(
unsigned short int*)
p <= field->
UShort.
Max);
1339 all_ok = (*(uint8_t*)
p >= field->
Int8.
Min && *(uint8_t*)
p <= field->
Int8.
Max);
1354 if(
i->value == *(
int*)
p)
1368 fprintf(stderr,
"unsupported introspection type \"%s\" encountered in _iop_validate_params (field %s)\n",
1374 if(!all_ok && report)
1375 fprintf(stderr,
"validation check failed in _iop_validate_params for type \"%s\"%s%s\n",
1385 return mod_1 == mod_2
1400 *hash =
dt_hash(*hash, (
char *)module->op,
sizeof(module->op));
1401 *hash =
dt_hash(*hash, (
char *)&module->iop_order,
sizeof(module->iop_order));
1402 *hash =
dt_hash(*hash, (
char *)&module->multi_priority,
sizeof(module->multi_priority));
1457 module->blendop_hash = hash;
1474 hash =
dt_hash(hash, (
char *)&module->
enabled,
sizeof(gboolean));
1486 module->hash = hash;
1532 if(piece->module != module)
1535 "[dt_iop_commit_params] node belongs to `%s' but `%s' is committing, skipping\n",
1536 IS_NULL_PTR(piece->module) ?
"(none)" : piece->module->op,
module->op);
1543 "[dt_iop_commit_params] `%s' node has no blend storage, skipping commit\n", module->
op);
1550 "[dt_iop_commit_params] `%s' node claims %" G_GSIZE_FORMAT
1551 " bytes of private data but has none, skipping commit\n", module->
op, piece->
data_size);
1581 " skipping\n", module->
op);
1593 if(module->process_cl)
1606 module->commit_params(module, params, pipe, piece);
1608 gchar *
string = g_strdup_printf(
"/plugins/%s/opencl", module->
op);
1633 if(module->runtime_data_hash(module, pipe, piece))
1649 if(module->gui_reset && !
dt_iop_is_hidden(module))
module->gui_reset(module);
1655 if(usec <= 0)
return;
1666 return module->bypass_cache;
1671 module->bypass_cache = state;
1676 for(GList *iop = g_list_last(module->
dev->
iop);
1678 iop = g_list_previous(iop))
1688 module->bypass_cache_variant = variant;
1701 for(GList *modules = iop_list; modules; modules = g_list_next(modules))
1704 if(strcmp(mod->
op, op) == 0)
1725 if(!strcmp(module->op, op))
return module->flags();
1726 modules = g_list_next(modules);
1737 if(count == 0)
return;
1745 for(GList *iop =
darktable.
iop; iop &&
i < count; iop = g_list_next(iop))
1749 rows[
i].
name =
module->name();
1760 static GHashTable *module_names = NULL;
1763 module_names = g_hash_table_new(g_str_hash, g_str_equal);
1764 for(GList *iop =
darktable.
iop; iop; iop = g_list_next(iop))
1767 g_hash_table_insert(module_names, module->op, g_strdup(module->name()));
1772 return (gchar *)g_hash_table_lookup(module_names, op);
1782 static GHashTable *module_aliases = NULL;
1785 module_aliases = g_hash_table_new(g_str_hash, g_str_equal);
1786 for(GList *iop =
darktable.
iop; iop; iop = g_list_next(iop))
1789 g_hash_table_insert(module_aliases, module->op, g_strdup(module->aliases()));
1794 return (gchar *)g_hash_table_lookup(module_aliases, op);
1803 GHashTableIter iter;
1807 while(g_hash_table_iter_next(&iter, &
key, &
value))
1814 for(GList *hiter = module->
dev->
history; hiter; hiter = g_list_next(hiter))
1817 if(hist->module == sink_module)
1822 module->multi_priority = new_priority;
1827 GHashTableIter iter;
1831 while(g_hash_table_iter_next(&iter, &
key, &
value))
1833 if(GPOINTER_TO_INT(
value) ==
id)
1843 for(GList *
m = modules;
m;
m = g_list_next(
m))
1847 if(strcmp(mod->
op, operation) == 0
1848 && (mod->
multi_priority == multi_priority || multi_priority == -1))
1861 for(GList *
m = modules;
m;
m = g_list_next(
m))
1865 if((strcmp(mod->
op, operation) == 0)
1877 gboolean is_first =
TRUE;
1878 GList *iop = modules;
1882 if(!strcmp(
m->op, module->
op))
1884 is_first = (
m == module);
1887 iop = g_list_next(iop);
1896 static const char *str_out[5] = {NULL, NULL, NULL, NULL, NULL};
1898 str_out[0] = main_text;
1899 str_out[1] = purpose;
1902 str_out[4] = output;
1904 return (
const char **)str_out;
void dt_gui_refocus_center()
__DT_CLONE_TARGETS__ int process(struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
void dt_develop_blend_init_blend_parameters(dt_develop_blend_params_t *blend_params, dt_develop_blend_colorspace_t cst)
dt_develop_blend_colorspace_t dt_develop_blend_default_module_blend_colorspace(dt_iop_module_t *module)
int dt_develop_blend_version(void)
int dt_develop_blend_legacy_params(dt_iop_module_t *module, const void *const old_params, const int old_version, void *new_params, const int new_version, const int length)
void dt_develop_blend_get_mask_usage(const dt_iop_module_t *module, const dt_develop_blend_params_t *params, gboolean *top_enabled, gboolean *raster_used, gboolean *drawn_used, gboolean *parametric_used)
void dt_develop_blend_resolve_default_colorspace(dt_iop_module_t *module, dt_develop_blend_params_t *blend_params)
Replace DEVELOP_BLEND_CS_NONE, which stands for "whichever space this module blends in",...
dt_develop_blend_colorspace_t
void dt_iop_gui_init_blending(dt_iop_module_t *module)
void dt_iop_gui_cleanup_blending(dt_iop_module_t *module)
void dt_iop_gui_blending_reload_defaults(dt_iop_module_t *module)
The blending panel's GUI state and API, cut out of develop/blend.h.
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void dt_collection_query_set_iop_names(const dt_iop_name_row_t *rows, const size_t count)
Fill memory.darktable_iop_names, the table the module-name rules join against.
void dt_conf_set_bool(const char *name, int val)
int dt_conf_get_bool(const char *name)
int dt_conf_key_exists(const char *key)
Does key have a value?
gboolean dt_conf_key_not_empty(const char *name)
struct dt_develop_t * dt_dev_get_global(void)
struct dt_gui_gtk_t * dt_gui_get_global(void)
void dt_database_begin_transaction_batch(void)
void dt_database_end_transaction_batch(void)
dt_dev_history_item_t * dt_dev_history_get_last_item_by_module(GList *history_list, dt_iop_module_t *module, int history_end)
Find the last history item referencing a module up to history_end.
#define dt_dev_add_history_item(dev, module, enable, redraw)
int32_t dt_dev_get_history_end_ext(struct dt_develop_t *dev)
Get the current history end index (GUI perspective).
#define dt_dev_pixelpipe_rebuild_all(dev)
void dt_dev_signal_modules_moved(dt_develop_t *dev)
gchar * dt_history_item_get_name(const struct dt_iop_module_t *module)
static int dt_pthread_rwlock_unlock(dt_pthread_rwlock_t *rwlock) RELEASE_GENERIC(rwlock) NO_THREAD_SAFETY_ANALYSIS
static int dt_pthread_rwlock_rdlock(dt_pthread_rwlock_t *rwlock) ACQUIRE_SHARED(rwlock) NO_THREAD_SAFETY_ANALYSIS
char * dt_exif_xmp_encode(const unsigned char *input, const int len, int *output_len)
What a photograph says about itself: the EXIF, IPTC and XMP tags a camera and a cataloguer write,...
gboolean dt_gui_presets_autogen_enabled()
static uint64_t dt_hash(uint64_t hash, const char *str, size_t size)
static gboolean enable(const dt_image_t *image)
char dt_dev_operation_t[20]
The string identifying an operation in the history stack ("exposure", "colorbalancergb",...
int dt_history_repository_find_version_for_params(const char *operation, const void *op_params, const int op_params_size)
The module version some image's history recorded for this exact parameter blob.
uint32_t dt_rawspeed_crop_dcraw_filters(uint32_t filters, uint32_t crop_x, uint32_t crop_y)
static int default_operation_tags(void)
dt_iop_module_t * dt_iop_get_module_from_list(GList *iop_list, const char *op)
dt_iop_module_t * dt_iop_get_module(const char *op)
static int default_distort_backtransform(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
void dt_iop_set_darktable_iop_table()
static int _iop_load_module_static(dt_iop_module_so_t *module, const dt_iop_module_static_entry_t *const entry)
Bind one statically-linked IOP module into its dt_iop_module_so_t.
gboolean dt_iop_module_needs_mask_history_ext(const dt_iop_module_t *module, gboolean *raster, gboolean *drawn, gboolean *parametric)
static const char * default_aliases(void)
static void _init_module_so(void *m)
void dt_iop_load_default_params(dt_iop_module_t *module)
static void _iop_ensure_visible(dt_gui_module_t *m)
dt_iop_module_t * dt_iop_get_module_by_instance_name(GList *modules, const char *operation, const char *multi_name)
static int default_distort_transform(dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
static int default_default_group(void)
gboolean dt_iop_is_raster_mask_used(dt_iop_module_t *module, int id)
void dt_iop_commit_params(dt_iop_module_t *module, dt_iop_params_t *params, dt_develop_blend_params_t *blendop_params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
Copy params into the pipeline piece, so the next render uses them.
void dt_iop_compute_module_hash(dt_iop_module_t *module, GList *masks)
void dt_iop_reload_defaults(dt_iop_module_t *module)
void _hash_raster_masks(gpointer key, gpointer value, uint64_t *hash)
gboolean dt_iop_module_supports_drawn_mask(dt_iop_module_t *iop)
void dt_iop_compute_blendop_hash(dt_iop_module_t *module, uint64_t hash, GList *masks)
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.
gboolean dt_iop_is_first_instance(GList *modules, dt_iop_module_t *module)
static int default_flags(void)
void dt_iop_commit_blend_params(dt_iop_module_t *module, const dt_develop_blend_params_t *blendop_params)
uint32_t dt_dev_get_roi_filters(const dt_dev_pixelpipe_iop_t *const piece, const dt_iop_roi_t *const roi_in)
void dt_iop_cleanup_module(dt_iop_module_t *module)
static void _iop_modify_roi_out(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *roi_in)
gboolean dt_iop_module_has_raster_mask(const dt_iop_module_t *module)
const gchar * dt_iop_get_localized_aliases(const gchar *op)
const gchar * dt_iop_get_localized_name(const gchar *op)
void dt_iop_set_cache_bypass_variant(dt_iop_module_t *module, int variant)
static void default_commit_params(struct dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
static dt_introspection_field_t * default_get_f(const char *name)
int dt_iop_load_module(dt_iop_module_t *module, dt_iop_module_so_t *module_so, dt_develop_t *dev)
gboolean _iop_validate_params(dt_introspection_field_t *field, gpointer params, gboolean report)
int dt_iop_load_module_by_so(dt_iop_module_t *module, dt_iop_module_so_t *so, dt_develop_t *dev)
static void _resolve_presets_blend_colorspace(dt_iop_module_so_t *module_so)
static void default_cleanup_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
static void default_gui_cleanup(dt_iop_module_t *self)
void dt_iop_gui_reset(dt_iop_module_t *module)
static void default_init_pipe(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
gboolean dt_iop_module_needs_mask_history(const dt_iop_module_t *module)
void dt_iop_load_modules_so(void)
void dt_iop_nap(int32_t usec)
static void default_cleanup(dt_iop_module_t *module)
void dt_iop_default_init(dt_iop_module_t *module)
static gboolean _module_carries_history(dt_iop_module_t *module)
void dt_iop_unload_modules_so()
static gboolean _iop_piece_is_committable(dt_iop_module_t *module, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
Is this pipeline node safe to dispatch module code on?
int default_iop_focus(dt_gui_module_t *m, gboolean toggle)
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.
static const char ** default_description(struct dt_iop_module_t *self)
gboolean dt_iop_module_is_in_pipeline(dt_iop_module_t *iop)
static const char * default_deprecated_msg(void)
gboolean dt_iop_is_hidden(dt_iop_module_t *module)
static gboolean default_has_defaults(struct dt_iop_module_t *self)
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)
gboolean dt_iop_so_is_hidden(dt_iop_module_so_t *module)
float dt_dev_get_module_scale(const dt_dev_pixelpipe_t *const pipe, const dt_iop_roi_t *const roi_in)
int dt_iop_get_module_flags(const char *op)
static gboolean default_runtime_data_hash(struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
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.
dt_iop_module_t * dt_iop_get_colorout_module(void)
gboolean dt_iop_check_modules_equal(dt_iop_module_t *mod_1, dt_iop_module_t *mod_2)
static int default_operation_tags_filter(void)
gboolean dt_iop_module_instance_exists(dt_iop_module_t *iop)
void dt_iop_set_cache_bypass(dt_iop_module_t *module, gboolean state)
static dt_introspection_t * default_get_introspection(void)
gboolean dt_iop_get_cache_bypass(dt_iop_module_t *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.
void dt_iop_set_mask_mode(dt_iop_module_t *module, int mask_mode)
static void _iop_modify_roi_in(struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_out, dt_iop_roi_t *roi_in)
static void _init_presets(dt_iop_module_so_t *module_so)
dt_iop_module_t * dt_iop_get_module_by_op_priority(GList *modules, const char *operation, const int multi_priority)
gboolean dt_iop_gui_commit_iop_order_change(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.
static void * default_get_p(const void *param, const char *name)
static dt_introspection_field_t * default_get_introspection_linear(void)
void dt_iop_update_multi_priority(dt_iop_module_t *module, int new_priority)
static int default_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)
void dt_iop_gui_cleanup_module(dt_iop_module_t *module)
void dt_iop_gui_init(dt_iop_module_t *module)
const dt_iop_module_static_entry_t dt_iop_static_modules[]
const int dt_iop_static_modules_count
void dt_iop_gui_update_header(dt_iop_module_t *module)
void dt_iop_request_focus(dt_iop_module_t *module)
Move darkroom focus to module, or clear it with NULL.
@ IOP_FLAGS_SUPPORTS_BLENDING
void dt_iop_gui_set_expanded(dt_iop_module_t *module, gboolean expanded, gboolean collapse_others)
#define DT_INTROSPECTION_VERSION
@ DT_INTROSPECTION_TYPE_BOOL
@ DT_INTROSPECTION_TYPE_ENUM
@ DT_INTROSPECTION_TYPE_OPAQUE
@ DT_INTROSPECTION_TYPE_NONE
@ DT_INTROSPECTION_TYPE_ARRAY
@ DT_INTROSPECTION_TYPE_CHAR
@ DT_INTROSPECTION_TYPE_FLOAT
@ DT_INTROSPECTION_TYPE_UNION
@ DT_INTROSPECTION_TYPE_UINT
@ DT_INTROSPECTION_TYPE_USHORT
@ DT_INTROSPECTION_TYPE_INT8
@ DT_INTROSPECTION_TYPE_STRUCT
@ DT_INTROSPECTION_TYPE_FLOATCOMPLEX
@ DT_INTROSPECTION_TYPE_INT
struct dt_iop_tonecurve_params_t preset
gboolean dt_ioppr_move_iop_after(struct dt_develop_t *dev, dt_iop_module_t *module, dt_iop_module_t *module_prev)
Move a module instance after another module in the pipe.
gboolean dt_ioppr_move_iop_before(struct dt_develop_t *dev, dt_iop_module_t *module, dt_iop_module_t *module_next)
Move a module instance before another module in the pipe.
int dt_ioppr_check_iop_order(dt_develop_t *dev, const int32_t imgid, const char *msg)
Debug helper to validate the current order for a develop context.
int32_t dt_get_debug_flags(void)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
uint64_t dt_masks_group_get_hash_ext(uint64_t hash, GList *masks, dt_masks_form_t *form)
dt_masks_form_t * dt_masks_get_from_id_ext(GList *forms, int id)
#define dt_free_align(ptr)
Release memory from dt_alloc_align() and set ptr to NULL.
static void * dt_calloc_align(size_t size)
dt_alloc_align() followed by a zero fill.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
dt_mipmap_buffer_dsc_flags flags
int dt_opencl_is_inited(void)
char * dt_pixelpipe_get_pipe_name(dt_dev_pixelpipe_type_t pipe_type)
void dt_module_preset_free(gpointer data)
Release one dt_module_preset_t. Suits g_list_free_full().
GList * dt_preset_repository_list_for_upgrade(const char *operation)
Every preset of operation at any version, with both parameter blobs.
void dt_preset_repository_update_module_params(const char *operation, const char *name, const int op_version, const void *params, const int params_size)
Replace the parameters (and version) of (operation, name).
void dt_preset_repository_set_module_version(const char *operation, const char *name, const int op_version)
Set ONLY the version of (operation, name), leaving the parameters alone.
void dt_preset_repository_set_blend_params(const char *operation, const char *name, const int blendop_version, const void *blend_params, const int blend_params_size)
Replace the blend parameters (and blend version) of (operation, name), at any version....
data.presets: a module's saved parameters, with the conditions under which it auto-applies.
void dt_control_signal_disconnect_all(const struct dt_control_signal_t *ctlsig, gpointer user_data)
struct dt_control_signal_t * dt_control_signal_get_global(void)
static const dt_aligned_pixel_simd_t value
const float uint32_t state[4]
const float const float param
unsigned __int64 uint64_t
struct dt_develop_blend_params_t * blend_params
dt_iop_buffer_dsc_t dsc_in
uint64_t global_mask_hash
struct dt_iop_module_t *void * data
gboolean cache_output_on_ram
dt_dev_pixelpipe_type_t type
struct dt_develop_t::@13 color_picker
Authoritative darkroom color-picker state.
dt_pthread_rwlock_t history_mutex
struct dt_iop_module_t *struct dt_iop_color_picker_t * picker
The dt_gui_module_t type is the intersection between a dt_lib_module_t and a dt_iop_module_t structur...
union dt_introspection_field_t * field
dt_introspection_type_t type
dt_introspection_type_enum_tuple_t * values
union dt_introspection_field_t ** fields
union dt_introspection_field_t ** fields
One IOP module built into this binary, and the generated function that binds it.
void(* fill_so)(dt_iop_module_so_t *module)
dt_iop_params_t * default_params
struct dt_develop_blend_params_t * blend_params
struct dt_iop_module_gui_t * gui
dt_gui_module_t common_fields
struct dt_develop_t * dev
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)
struct dt_iop_module_t::@23::@24 source
struct dt_iop_module_t::@23::@25 sink
struct dt_develop_blend_params_t * default_blendop_params
struct dt_iop_module_t::@23 raster_mask
One module's identity, for the rule that searches by module name.
Region of interest passed through the pixelpipe.
dt_introspection_type_float_complex_t FloatComplex
dt_introspection_type_header_t header
dt_introspection_type_ushort_t UShort
dt_introspection_type_float_t Float
dt_introspection_type_union_t Union
dt_introspection_type_uint_t UInt
dt_introspection_type_int_t Int
dt_introspection_type_char_t Char
dt_introspection_type_int8_t Int8
dt_introspection_type_array_t Array
dt_introspection_type_enum_t Enum
dt_introspection_type_struct_t Struct