39#ifndef DT_IOP_PARAMS_T
40#define DT_IOP_PARAMS_T
211 const gboolean paste_instances,
const char *source_label,
243 gboolean force_new_item);
259#define dt_dev_add_history_item(dev, module, enable, redraw) DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_add_history_item_real, (dev), (module), (enable), (redraw))
575 void *out_params,
size_t out_params_size,
576 void *out_blend,
size_t out_blend_size, gboolean *out_has_blend);
void reload_defaults(dt_iop_module_t *module)
size_t params_size(dt_imageio_module_format_t *self)
void dt_dev_transient_params_set(struct dt_iop_module_t *module, const void *params, size_t params_size, const void *blend_params, size_t blend_size)
Out-of-history transient param channel.
void dt_dev_history_compress_ext(struct dt_develop_t *dev, gboolean write_history)
Variant of history compression that optionally skips DB writeback.
gboolean dt_dev_history_item_update_from_params(struct dt_develop_t *dev, dt_dev_history_item_t *hist, struct dt_iop_module_t *module, gboolean enabled, const void *params, const int32_t params_size, const struct dt_develop_blend_params_t *blend_params, GList *forms)
Fill/refresh a history item from explicit params and apply them to the module.
int dt_history_merge_module_into_history(struct dt_develop_t *dev_dest, struct dt_develop_t *dev_src, struct dt_iop_module_t *mod_src)
Merge a single module instance into a destination history.
dt_dev_history_item_t * dt_dev_history_get_last_item_by_module(GList *history_list, struct dt_iop_module_t *module, int history_end)
Find the last history item referencing a module up to history_end.
void dt_dev_history_free_history(struct dt_develop_t *dev)
Free the whole history list attached to dev->history.
int dt_dev_history_refresh_nodes_ext(struct dt_develop_t *dev, GList **iop, GList *history)
Refresh GUI module nodes to match history state.
void dt_dev_history_undo_end_record(struct dt_develop_t *dev)
Finish an undo record for history changes.
struct dt_iop_module_t * dt_dev_get_module_instance(struct dt_develop_t *dev, const char *op, const char *multi_name, const int multi_priority)
Find a module instance by op name and instance metadata.
int dt_dev_history_item_from_source_history_item(struct dt_develop_t *dev_dest, struct dt_develop_t *dev_src, const struct dt_dev_history_item_t *hist_src, struct dt_iop_module_t *mod_dest, struct dt_dev_history_item_t **out_hist)
Create a history item from another history item, using a destination module.
gboolean dt_dev_transient_params_get(struct dt_develop_t *dev, const struct dt_iop_module_t *module, void *out_params, size_t out_params_size, void *out_blend, size_t out_blend_size, gboolean *out_has_blend)
Copy the active transient params for module into caller buffers (pipeline thread).
int dt_dev_merge_history_into_image(struct dt_develop_t *dev_src, int32_t dest_imgid, const GList *mod_list, gboolean merge_iop_order, const dt_history_merge_strategy_t mode, const gboolean paste_instances, const char *source_label, dt_hm_batch_state_t *batch)
Merge a list of modules into a destination image history via dt_history_merge().
void dt_dev_set_history_end_ext(struct dt_develop_t *dev, const uint32_t index)
Set the history end index (GUI perspective).
void dt_dev_history_undo_invalidate_module(struct dt_iop_module_t *module)
Invalidate a module pointer inside undo snapshots.
gboolean dt_dev_reload_history_items(struct dt_develop_t *dev, const int32_t imgid)
Reload history from DB and rebuild pipelines/GUI state.
void dt_dev_history_cleanup(void)
Cleanup cached statements or state used by history I/O.
void dt_dev_pop_history_items(struct dt_develop_t *dev)
Thread-safe wrapper around dt_dev_pop_history_items_ext(), then update GUI.
void dt_dev_free_history_item(gpointer data)
Free a single history item (used as GList free callback).
void dt_dev_history_pixelpipe_update(struct dt_develop_t *dev, gboolean rebuild)
Rebuild or resync pixelpipes after backend history changes.
int dt_dev_replace_history_on_image(struct dt_develop_t *dev_src, const int32_t dest_imgid, const gboolean reload_defaults, const char *msg)
Replace an image history with the content of dev_src.
void dt_dev_transient_params_clear(struct dt_iop_module_t *module)
Drop the transient slot if it belongs to module.
gboolean dt_dev_init_default_history(struct dt_develop_t *dev, const int32_t imgid, gboolean apply_auto_presets)
Initialize module defaults and insert required default modules.
uint64_t dt_dev_history_compute_hash(struct dt_develop_t *dev)
Get the integrity checksum of the whole history stack. This should be done ONLY when history is chang...
gboolean dt_dev_transient_params_active(struct dt_develop_t *dev, const struct dt_iop_module_t *module)
Whether a transient slot is currently active for module (cheap, locked read).
void dt_dev_history_undo_start_record_locked(struct dt_develop_t *dev)
Start an undo record with history_mutex already locked.
void dt_dev_pop_history_items_ext(struct dt_develop_t *dev)
Apply history items to module params up to dev->history_end.
void dt_dev_history_truncate(struct dt_develop_t *dev, const int32_t imgid)
void dt_dev_history_undo_start_record(struct dt_develop_t *dev)
Start an undo record for history changes.
void dt_dev_history_compress_or_truncate(struct dt_develop_t *dev)
Compress history if history_end is at top, otherwise truncate.
void dt_dev_write_history_ext(struct dt_develop_t *dev, const int32_t imgid)
Write dev->history to DB and XMP for a given image id.
gboolean dt_dev_read_history_ext(struct dt_develop_t *dev, const int32_t imgid)
Read history and masks from DB and populate dev->history.
void dt_dev_history_gui_update(struct dt_develop_t *dev)
Apply history-loaded params to module GUIs.
int32_t dt_dev_get_history_end_ext(struct dt_develop_t *dev)
Get the current history end index (GUI perspective).
int dt_dev_copy_module_contents(struct dt_develop_t *dev_dest, struct dt_develop_t *dev_src, struct dt_iop_module_t *mod_dest, const struct dt_iop_module_t *mod_src)
Copy params/blend params from one module instance to another.
gboolean dt_history_module_skip_copy(const int flags)
Determine whether a module should be skipped during history copy.
void dt_dev_history_undo_end_record_locked(struct dt_develop_t *dev)
Finish an undo record with history_mutex already locked.
void dt_dev_invalidate_history_module(GList *list, struct dt_iop_module_t *module)
Remove a module pointer from a history list.
gboolean dt_dev_add_history_item_ext(struct dt_develop_t *dev, struct dt_iop_module_t *module, gboolean enable, gboolean force_new_item)
Append or update a history item for a module.
void dt_dev_history_notify_change(struct dt_develop_t *dev, const int32_t imgid)
Notify the rest of the app that history changes were written.
void dt_dev_write_history(struct dt_develop_t *dev, gboolean async)
Thread-safe wrapper around dt_dev_write_history_ext() for dev->image_storage.id.
void dt_dev_history_compress(struct dt_develop_t *dev)
Compress an history from a loaded pipeline, aka simply take a snapshot of all modules parameters....
void dt_dev_add_history_item_real(struct dt_develop_t *dev, struct dt_iop_module_t *module, gboolean enable, gboolean redraw)
Thread-safe wrapper around dt_dev_add_history_item_ext().
struct dt_iop_module_t * dt_dev_create_module_instance(struct dt_develop_t *dev, const char *op, const char *multi_name, const int multi_priority, gboolean use_next_priority)
Create a new module instance from an existing base .so.
int dt_dev_next_multi_priority_for_op(struct dt_develop_t *dev, const char *op)
Return the next available multi_priority for an operation.
dt_dev_history_item_t * dt_dev_history_get_first_item_by_module(GList *history_list, struct dt_iop_module_t *module)
Find the first history item referencing a module.
static gboolean enable(dt_image_t *image)
dt_history_merge_strategy_t
dt_mipmap_buffer_dsc_flags flags
unsigned __int64 uint64_t
struct dt_develop_blend_params_t * blend_params
struct dt_iop_module_t *gboolean enabled
struct dt_develop_blend_params_t * blend_params
struct dt_develop_t * dev
GModule *dt_dev_operation_t op