Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
imageop.c File Reference
#include "common/darktable.h"
#include "develop/imageop.h"
#include "bauhaus/bauhaus.h"
#include "common/collection.h"
#include "common/debug.h"
#include "common/exif.h"
#include "common/history.h"
#include "common/imagebuf.h"
#include "common/imageio_rawspeed.h"
#include "common/interpolation.h"
#include "common/module.h"
#include "common/opencl.h"
#include "common/usermanual_url.h"
#include "control/control.h"
#include "control/signal.h"
#include "develop/blend.h"
#include "develop/develop.h"
#include "develop/format.h"
#include "develop/masks.h"
#include "develop/tiling.h"
#include "gui/presets.h"
#include "dtgtk/button.h"
#include "dtgtk/expander.h"
#include "dtgtk/gradientslider.h"
#include "dtgtk/icon.h"
#include "gui/color_picker_proxy.h"
#include "gui/gtk.h"
#include "gui/gui_throttle.h"
#include "libs/modulegroups.h"
#include <assert.h>
#include <gmodule.h>
#include <math.h>
#include <complex.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "iop/iop_api.h"
+ Include dependency graph for imageop.c:

Data Structures

struct  dt_iop_gui_simple_callback_t
 

Macros

#define INCLUDE_API_FROM_MODULE_LOAD   "iop_load_module"
 
#define INCLUDE_API_FROM_MODULE_LOAD_BY_SO
 

Typedefs

typedef struct dt_iop_gui_simple_callback_t dt_iop_gui_simple_callback_t
 

Functions

static gboolean _iop_plugin_focus_accel (GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType modifier, gpointer data)
 
static gboolean _iop_plugin_header_button_release (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
float dt_dev_get_module_scale (const dt_dev_pixelpipe_t *const pipe, const dt_iop_roi_t *const roi_in)
 
void dt_iop_load_default_params (dt_iop_module_t *module)
 
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 _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)
 
static int default_default_group (void)
 
static int default_flags (void)
 
static int default_operation_tags (void)
 
static int default_operation_tags_filter (void)
 
static const char ** default_description (struct dt_iop_module_t *self)
 
static const char * default_aliases (void)
 
static const char * default_deprecated_msg (void)
 
static gboolean default_has_defaults (struct dt_iop_module_t *self)
 
static gboolean default_runtime_data_hash (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece)
 
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 void default_init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
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)
 
static void default_cleanup (dt_iop_module_t *module)
 
static void _iop_color_picker_data_ready_callback (gpointer instance, gpointer user_data)
 
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_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)
 
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)
 
static dt_introspection_field_tdefault_get_introspection_linear (void)
 
static dt_introspection_tdefault_get_introspection (void)
 
static voiddefault_get_p (const void *param, const char *name)
 
static dt_introspection_field_tdefault_get_f (const char *name)
 
void dt_iop_default_init (dt_iop_module_t *module)
 
int default_iop_focus (dt_gui_module_t *m, gboolean toggle)
 
int dt_iop_load_module_so (void *m, const char *libname, const char *module_name)
 
int dt_iop_load_module_by_so (dt_iop_module_t *module, dt_iop_module_so_t *so, dt_develop_t *dev)
 
void dt_iop_init_pipe (struct dt_iop_module_t *module, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
void dt_iop_cleanup_pipe (struct dt_iop_module_t *module, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
static void _gui_delete_callback (GtkButton *button, dt_iop_module_t *module)
 
gboolean dt_iop_gui_module_is_visible (dt_iop_module_t *module)
 
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.
 
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.
 
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.
 
dt_iop_module_tdt_iop_gui_get_previous_visible_module (dt_iop_module_t *module)
 
dt_iop_module_tdt_iop_gui_get_next_visible_module (dt_iop_module_t *module)
 
static void _gui_movedown_callback (GtkButton *button, dt_iop_module_t *module)
 
static void _gui_moveup_callback (GtkButton *button, dt_iop_module_t *module)
 
dt_iop_module_tdt_iop_gui_duplicate (dt_iop_module_t *base, gboolean copy_params)
 
void dt_iop_gui_rename_module (dt_iop_module_t *module)
 
static void _gui_copy_callback (GtkButton *button, gpointer user_data)
 
static void _gui_duplicate_callback (GtkButton *button, gpointer user_data)
 
static gboolean _rename_module_key_press (GtkWidget *entry, GdkEventKey *event, dt_iop_module_t *module)
 
static gboolean _rename_module_resize (GtkWidget *entry, GdkEventKey *event, dt_iop_module_t *module)
 
static void _gui_rename_callback (GtkButton *button, dt_iop_module_t *module)
 
static gboolean _gui_multiinstance_callback (GtkButton *button, GdkEventButton *event, gpointer user_data)
 
static gboolean _gui_off_button_press (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
static void _gui_off_callback (GtkToggleButton *togglebutton, gpointer user_data)
 
gboolean dt_iop_so_is_hidden (dt_iop_module_so_t *module)
 
gboolean dt_iop_is_hidden (dt_iop_module_t *module)
 
static void _iop_panel_label (dt_iop_module_t *module)
 
void dt_iop_gui_update_header (dt_iop_module_t *module)
 
void dt_iop_gui_set_enable_button_icon (GtkWidget *w, dt_iop_module_t *module)
 
void dt_iop_gui_set_enable_button (dt_iop_module_t *module)
 
void dt_iop_gui_init (dt_iop_module_t *module)
 
void dt_iop_reload_defaults (dt_iop_module_t *module)
 
static void _init_presets (dt_iop_module_so_t *module_so)
 
static void _init_module_so (void *m)
 
void dt_iop_load_modules_so (void)
 
int dt_iop_load_module (dt_iop_module_t *module, dt_iop_module_so_t *module_so, dt_develop_t *dev)
 
void dt_iop_cleanup_module (dt_iop_module_t *module)
 
void dt_iop_unload_modules_so ()
 
void dt_iop_set_mask_mode (dt_iop_module_t *module, int mask_mode)
 
gboolean dt_iop_module_has_raster_mask (const dt_iop_module_t *module)
 
gboolean dt_iop_module_needs_mask_history (const dt_iop_module_t *module)
 
void dt_iop_commit_blend_params (dt_iop_module_t *module, const dt_develop_blend_params_t *blendop_params)
 
gboolean _iop_validate_params (dt_introspection_field_t *field, gpointer params, gboolean report)
 
gboolean dt_iop_check_modules_equal (dt_iop_module_t *mod_1, dt_iop_module_t *mod_2)
 
void _hash_raster_masks (gpointer key, gpointer value, uint64_t *hash)
 
void dt_iop_compute_blendop_hash (dt_iop_module_t *module, uint64_t hash, GList *masks)
 
void dt_iop_compute_module_hash (dt_iop_module_t *module, GList *masks)
 
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)
 
void dt_iop_gui_cleanup_module (dt_iop_module_t *module)
 
void dt_iop_gui_update (dt_iop_module_t *module)
 
void dt_iop_gui_reset (dt_iop_module_t *module)
 
static void _gui_reset_callback (GtkButton *button, GdkEventButton *event, dt_iop_module_t *module)
 
static void _presets_popup_callback (GtkButton *button, dt_iop_module_t *module)
 
void dt_iop_request_focus (dt_iop_module_t *module)
 
static void _gui_set_single_expanded (dt_iop_module_t *module, gboolean expanded)
 
void _iop_dim_all_but (dt_iop_module_t *module, gboolean dim)
 
void dt_iop_gui_set_expanded (dt_iop_module_t *module, gboolean expanded, gboolean collapse_others)
 
void dt_iop_gui_update_expanded (dt_iop_module_t *module)
 
static gboolean _iop_plugin_body_button_press (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
static gboolean _iop_plugin_header_activate (GtkWidget *self, gboolean group_cycling, gpointer user_data)
 
static gboolean _iop_plugin_header_child_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 
static gboolean _iop_plugin_header_button_press (GtkWidget *w, GdkEventButton *e, gpointer user_data)
 
static void _display_mask_indicator_callback (GtkToggleButton *bt, dt_iop_module_t *module)
 
static gboolean _mask_indicator_tooltip (GtkWidget *treeview, gint x, gint y, gboolean kb_mode, GtkTooltip *tooltip, dt_iop_module_t *module)
 
void dt_iop_add_remove_mask_indicator (dt_iop_module_t *module)
 
gboolean _iop_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data)
 
void dt_iop_gui_set_expander (dt_iop_module_t *module)
 
GtkWidgetdt_iop_gui_get_widget (dt_iop_module_t *module)
 
GtkWidgetdt_iop_gui_get_pluginui (dt_iop_module_t *module)
 
void dt_iop_nap (int32_t usec)
 
gboolean dt_iop_get_cache_bypass (dt_iop_module_t *module)
 
void dt_iop_set_cache_bypass (dt_iop_module_t *module, gboolean state)
 
dt_iop_module_tdt_iop_get_colorout_module (void)
 
dt_iop_module_tdt_iop_get_module_from_list (GList *iop_list, const char *op)
 
dt_iop_module_tdt_iop_get_module (const char *op)
 
int dt_iop_get_module_flags (const char *op)
 
void dt_iop_set_darktable_iop_table ()
 
const gchar * dt_iop_get_localized_name (const gchar *op)
 
const gchar * dt_iop_get_localized_aliases (const gchar *op)
 
void dt_iop_update_multi_priority (dt_iop_module_t *module, int new_priority)
 
gboolean dt_iop_is_raster_mask_used (dt_iop_module_t *module, int id)
 
dt_iop_module_tdt_iop_get_module_by_op_priority (GList *modules, const char *operation, const int multi_priority)
 
dt_iop_module_tdt_iop_get_module_by_instance_name (GList *modules, const char *operation, const char *multi_name)
 
gboolean dt_iop_is_first_instance (GList *modules, dt_iop_module_t *module)
 
void dt_iop_throttled_history_update (gpointer data)
 
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_gui_changed (dt_iop_module_t *action, GtkWidget *widget, gpointer data)
 
void dt_bauhaus_update_module (dt_iop_module_t *self)
 
void dt_bauhaus_value_changed_default_callback (GtkWidget *widget)
 

Variables

static sqlite3_stmt * _iop_presets_select_stmt = NULL
 

Macro Definition Documentation

◆ INCLUDE_API_FROM_MODULE_LOAD

#define INCLUDE_API_FROM_MODULE_LOAD   "iop_load_module"

◆ INCLUDE_API_FROM_MODULE_LOAD_BY_SO

#define INCLUDE_API_FROM_MODULE_LOAD_BY_SO

Typedef Documentation

◆ dt_iop_gui_simple_callback_t

Function Documentation

◆ _display_mask_indicator_callback()

◆ _gui_copy_callback()

static void _gui_copy_callback ( GtkButton *  button,
gpointer  user_data 
)
static

◆ _gui_delete_callback()

◆ _gui_duplicate_callback()

static void _gui_duplicate_callback ( GtkButton *  button,
gpointer  user_data 
)
static

◆ _gui_movedown_callback()

static void _gui_movedown_callback ( GtkButton *  button,
dt_iop_module_t module 
)
static

◆ _gui_moveup_callback()

static void _gui_moveup_callback ( GtkButton *  button,
dt_iop_module_t module 
)
static

◆ _gui_multiinstance_callback()

static gboolean _gui_multiinstance_callback ( GtkButton *  button,
GdkEventButton *  event,
gpointer  user_data 
)
static

◆ _gui_off_button_press()

static gboolean _gui_off_button_press ( GtkWidget w,
GdkEventButton *  e,
gpointer  user_data 
)
static

◆ _gui_off_callback()

static void _gui_off_callback ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)
static

Modules may keep a delayed history commit queued while the user edits a control, for example through gui-throttled graph interactions. Enabling or disabling a module is an immediate history state change, so any stale delayed task must be canceled first or it may land afterwards and replay an older enabled+params state over the newer toggle action.

References darktable, darktable_t::develop, dt_dev_add_history_item, dt_dev_modulegroups_switch(), dt_free, dt_gui_throttle_cancel(), dt_history_item_get_name(), FALSE, darktable_t::gui, dt_gui_gtk_t::reset, dt_gui_gtk_t::scroll_to, tooltip, TRUE, and dt_iop_roi_t::y.

Referenced by dt_iop_gui_set_expander().

◆ _gui_rename_callback()

static void _gui_rename_callback ( GtkButton *  button,
dt_iop_module_t module 
)
static

◆ _gui_reset_callback()

◆ _gui_set_single_expanded()

◆ _hash_raster_masks()

void _hash_raster_masks ( gpointer  key,
gpointer  value,
uint64_t hash 
)

References dt_hash(), and dt_iop_roi_t::y.

Referenced by dt_iop_compute_blendop_hash().

◆ _init_module_so()

◆ _init_presets()

◆ _iop_color_picker_data_ready_callback()

static void _iop_color_picker_data_ready_callback ( gpointer  instance,
gpointer  user_data 
)
static

◆ _iop_dim_all_but()

void _iop_dim_all_but ( dt_iop_module_t module,
gboolean  dim 
)

Dim all modules except the one referenced, if any reference, or undim all

References darktable, darktable_t::develop, dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_get_pluginui(), dt_develop_t::iop, IS_NULL_PTR, m, and dt_iop_roi_t::y.

Referenced by dt_iop_gui_set_expanded().

◆ _iop_modify_roi_in()

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

◆ _iop_modify_roi_out()

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 
)
static

◆ _iop_panel_label()

◆ _iop_plugin_body_button_press()

static gboolean _iop_plugin_body_button_press ( GtkWidget w,
GdkEventButton *  e,
gpointer  user_data 
)
static

◆ _iop_plugin_focus_accel()

static gboolean _iop_plugin_focus_accel ( GtkAccelGroup *  accel_group,
GObject *  accelerable,
guint  keyval,
GdkModifierType  modifier,
gpointer  data 
)
static

References FALSE, IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by _iop_panel_label(), and dt_iop_gui_init().

◆ _iop_plugin_header_activate()

static gboolean _iop_plugin_header_activate ( GtkWidget self,
gboolean  group_cycling,
gpointer  user_data 
)
static

References FALSE, IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by dt_iop_gui_set_expander().

◆ _iop_plugin_header_button_press()

static gboolean _iop_plugin_header_button_press ( GtkWidget w,
GdkEventButton *  e,
gpointer  user_data 
)
static

◆ _iop_plugin_header_button_release()

static gboolean _iop_plugin_header_button_release ( GtkWidget w,
GdkEventButton *  e,
gpointer  user_data 
)
static

◆ _iop_plugin_header_child_button_press()

static gboolean _iop_plugin_header_child_button_press ( GtkWidget widget,
GdkEventButton *  event,
gpointer  user_data 
)
static

References FALSE, TRUE, and dt_iop_roi_t::y.

Referenced by dt_iop_gui_set_expander().

◆ _iop_tooltip_callback()

gboolean _iop_tooltip_callback ( GtkWidget widget,
gint  x,
gint  y,
gboolean  keyboard_mode,
GtkTooltip *  tooltip,
gpointer  user_data 
)

◆ _iop_validate_params()

gboolean _iop_validate_params ( dt_introspection_field_t field,
gpointer  params,
gboolean  report 
)
Todo:
: special case float2

References _iop_validate_params(), dt_introspection_field_t::Array, dt_introspection_field_t::Char, dt_introspection_type_array_t::count, DT_INTROSPECTION_TYPE_ARRAY, DT_INTROSPECTION_TYPE_BOOL, DT_INTROSPECTION_TYPE_CHAR, DT_INTROSPECTION_TYPE_ENUM, DT_INTROSPECTION_TYPE_FLOAT, DT_INTROSPECTION_TYPE_FLOATCOMPLEX, DT_INTROSPECTION_TYPE_INT, DT_INTROSPECTION_TYPE_INT8, DT_INTROSPECTION_TYPE_OPAQUE, DT_INTROSPECTION_TYPE_STRUCT, DT_INTROSPECTION_TYPE_UINT, DT_INTROSPECTION_TYPE_UNION, DT_INTROSPECTION_TYPE_USHORT, dt_introspection_type_struct_t::entries, dt_introspection_type_union_t::entries, dt_introspection_field_t::Enum, FALSE, dt_introspection_type_array_t::field, dt_introspection_type_struct_t::fields, dt_introspection_type_union_t::fields, dt_introspection_field_t::Float, dt_introspection_field_t::FloatComplex, dt_introspection_field_t::header, i, dt_introspection_field_t::Int, dt_introspection_field_t::Int8, dt_introspection_type_float_t::Max, dt_introspection_type_float_complex_t::Max, dt_introspection_type_char_t::Max, dt_introspection_type_int8_t::Max, dt_introspection_type_ushort_t::Max, dt_introspection_type_int_t::Max, dt_introspection_type_uint_t::Max, dt_introspection_type_float_t::Min, dt_introspection_type_float_complex_t::Min, dt_introspection_type_char_t::Min, dt_introspection_type_int8_t::Min, dt_introspection_type_ushort_t::Min, dt_introspection_type_int_t::Min, dt_introspection_type_uint_t::Min, dt_introspection_type_header_t::name, dt_introspection_type_header_t::offset, p, dt_introspection_type_header_t::size, dt_introspection_field_t::Struct, TRUE, dt_introspection_type_header_t::type, dt_introspection_type_array_t::type, dt_introspection_type_header_t::type_name, dt_introspection_field_t::UInt, dt_introspection_field_t::Union, dt_introspection_field_t::UShort, dt_introspection_type_enum_t::values, and dt_iop_roi_t::y.

Referenced by _iop_validate_params(), and dt_iop_commit_params().

◆ _mask_indicator_tooltip()

static gboolean _mask_indicator_tooltip ( GtkWidget treeview,
gint  x,
gint  y,
gboolean  kb_mode,
GtkTooltip *  tooltip,
dt_iop_module_t module 
)
static

◆ _presets_popup_callback()

◆ _rename_module_key_press()

static gboolean _rename_module_key_press ( GtkWidget entry,
GdkEventKey *  event,
dt_iop_module_t module 
)
static

◆ _rename_module_resize()

static gboolean _rename_module_resize ( GtkWidget entry,
GdkEventKey *  event,
dt_iop_module_t module 
)
static

References TRUE, width, and dt_iop_roi_t::y.

Referenced by dt_iop_gui_rename_module().

◆ default_aliases()

static const char * default_aliases ( void  )
static

◆ default_cleanup()

static void default_cleanup ( dt_iop_module_t module)
static

◆ default_cleanup_pipe()

static void default_cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)
static

◆ default_commit_params()

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

◆ default_default_group()

static int default_default_group ( void  )
static

References IOP_GROUP_TECHNICAL.

◆ default_deprecated_msg()

static const char * default_deprecated_msg ( void  )
static

◆ default_description()

static const char ** default_description ( struct dt_iop_module_t self)
static

◆ default_distort_backtransform()

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 
)
static

References void().

◆ default_distort_transform()

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

References void().

◆ default_flags()

static int default_flags ( void  )
static

◆ default_get_f()

static dt_introspection_field_t * default_get_f ( const char *  name)
static

References dt_iop_roi_t::y.

Referenced by dt_iop_load_module_so().

◆ default_get_introspection()

static dt_introspection_t * default_get_introspection ( void  )
static

References dt_iop_roi_t::y.

Referenced by dt_iop_load_module_so().

◆ default_get_introspection_linear()

static dt_introspection_field_t * default_get_introspection_linear ( void  )
static

References dt_iop_roi_t::y.

Referenced by dt_iop_load_module_so().

◆ default_get_p()

static void * default_get_p ( const void param,
const char *  name 
)
static

References dt_iop_roi_t::y.

Referenced by dt_iop_load_module_so().

◆ default_gui_cleanup()

static void default_gui_cleanup ( dt_iop_module_t self)
static

References IOP_GUI_FREE.

◆ default_has_defaults()

static gboolean default_has_defaults ( struct dt_iop_module_t self)
static

◆ default_init_pipe()

◆ default_iop_focus()

◆ default_operation_tags()

static int default_operation_tags ( void  )
static

◆ default_operation_tags_filter()

static int default_operation_tags_filter ( void  )
static

◆ default_process()

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 
)
static

◆ default_runtime_data_hash()

static gboolean default_runtime_data_hash ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const dt_dev_pixelpipe_iop_t piece 
)
static

References FALSE, and void().

◆ dt_bauhaus_update_module()

◆ dt_bauhaus_value_changed_default_callback()

◆ dt_dev_get_module_scale()

float dt_dev_get_module_scale ( const dt_dev_pixelpipe_t *const  pipe,
const dt_iop_roi_t *const  roi_in 
)

◆ dt_iop_add_remove_mask_indicator()

void dt_iop_add_remove_mask_indicator ( dt_iop_module_t module)

◆ dt_iop_check_modules_equal()

gboolean dt_iop_check_modules_equal ( dt_iop_module_t mod_1,
dt_iop_module_t mod_2 
)

References dt_iop_roi_t::y.

Referenced by dt_dev_add_history_item_ext().

◆ dt_iop_cleanup_module()

◆ dt_iop_cleanup_pipe()

void dt_iop_cleanup_pipe ( struct dt_iop_module_t module,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

◆ dt_iop_commit_blend_params()

◆ dt_iop_commit_params()

◆ dt_iop_compute_blendop_hash()

◆ dt_iop_compute_module_hash()

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.

References dt_hash(), dt_iop_compute_blendop_hash(), and dt_iop_roi_t::y.

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().

◆ dt_iop_default_init()

◆ dt_iop_get_cache_bypass()

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.

Referenced by _darkroom_gui_module_requests_uncropped_full_image(), and dt_dev_pixelpipe_activemodule_disables_currentmodule().

◆ dt_iop_get_colorout_module()

dt_iop_module_t * dt_iop_get_colorout_module ( void  )

get module by name and colorout, works only with a dev mode

References darktable, darktable_t::develop, dt_iop_get_module_from_list(), and dt_develop_t::iop.

◆ dt_iop_get_localized_aliases()

const gchar * dt_iop_get_localized_aliases ( const gchar *  op)

◆ dt_iop_get_localized_name()

const gchar * dt_iop_get_localized_name ( const gchar *  op)

returns the localized plugin name for a given op name. must not be freed.

References darktable, darktable_t::iop, IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by dt_add_hist(), dt_history_get_items(), dt_history_get_items_as_string(), and dt_styles_get_item_list().

◆ dt_iop_get_module()

dt_iop_module_t * dt_iop_get_module ( const char *  op)

◆ dt_iop_get_module_by_instance_name()

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

References IS_NULL_PTR, m, and dt_iop_roi_t::y.

Referenced by _hm_module_from_id(), and dt_ioppr_update_for_entries().

◆ dt_iop_get_module_by_op_priority()

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

References m, and dt_iop_roi_t::y.

Referenced by _dt_styles_tmp_module_from_style_item(), _history_merge_resolve_dest_instance(), _hm_module_from_id(), _refresh_global_histogram_backbuf_for_hash(), _refresh_preview_histograms(), dt_dev_create_module_instance(), and dt_ioppr_resync_iop_list().

◆ dt_iop_get_module_flags()

int dt_iop_get_module_flags ( const char *  op)

get module flags, works in dev and lt mode

References darktable, darktable_t::iop, and dt_iop_roi_t::y.

Referenced by dt_gui_hist_dialog_new().

◆ dt_iop_get_module_from_list()

dt_iop_module_t * dt_iop_get_module_from_list ( GList *  iop_list,
const char *  op 
)

◆ dt_iop_gui_changed()

◆ dt_iop_gui_cleanup_module()

void dt_iop_gui_cleanup_module ( dt_iop_module_t module)

cleans up gui of module and of blendops

References dt_free, dt_iop_is_hidden(), IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by _check_deleted_instances(), _gui_delete_callback(), _init_module_so(), and leave().

◆ dt_iop_gui_commit_iop_order_change()

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.

Parameters
devDevelop instance owning the reordered modules.
moduleModule to record in history, or NULL for whole-pipeline changes.
enableHistory enable state passed to dt_dev_add_history_item.
write_historyTRUE to record a history item, FALSE to skip it.
reasonDebug string used in IOP-order checks.
Returns
TRUE when the GUI refresh completed, FALSE if dev was NULL.

References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_add_history_item, dt_dev_modules_update_multishow(), dt_dev_pixelpipe_rebuild_all, dt_ioppr_check_iop_order(), DT_SIGNAL_DEVELOP_MODULE_MOVED, enable(), FALSE, IS_NULL_PTR, darktable_t::signals, TRUE, and dt_iop_roi_t::y.

Referenced by _ioporder_apply_preset(), dt_iop_gui_move_module_after(), dt_iop_gui_move_module_before(), gui_reset(), and set_params().

◆ dt_iop_gui_duplicate()

◆ dt_iop_gui_get_next_visible_module()

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

References dt_iop_gui_module_is_visible(), and dt_iop_roi_t::y.

Referenced by _focus_previous_module(), and _gui_moveup_callback().

◆ dt_iop_gui_get_pluginui()

GtkWidget * dt_iop_gui_get_pluginui ( dt_iop_module_t module)

get the eventbox of plugin ui in expander

References DTGTK_EXPANDER, dtgtk_expander_get_frame(), and dt_iop_roi_t::y.

Referenced by _iop_dim_all_but(), and dt_iop_request_focus().

◆ dt_iop_gui_get_previous_visible_module()

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

References dt_iop_gui_module_is_visible(), and dt_iop_roi_t::y.

Referenced by _focus_next_module(), and _gui_movedown_callback().

◆ dt_iop_gui_get_widget()

GtkWidget * dt_iop_gui_get_widget ( dt_iop_module_t module)

get the widget of plugin ui in expander

References DTGTK_EXPANDER, dtgtk_expander_get_body(), and dt_iop_roi_t::y.

◆ dt_iop_gui_init()

◆ dt_iop_gui_module_is_visible()

gboolean dt_iop_gui_module_is_visible ( dt_iop_module_t module)

◆ dt_iop_gui_move_module_after()

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.

Parameters
moduleModule being moved.
module_prevModule that should end up immediately before module.
reasonDebug string used in IOP-order checks.
Returns
TRUE if the move was applied, FALSE otherwise.

References dt_iop_gui_commit_iop_order_change(), dt_ioppr_move_iop_after(), FALSE, TRUE, and dt_iop_roi_t::y.

Referenced by _gui_moveup_callback(), _ioporder_drag_data_received(), and _modulegroups_drag_data_received().

◆ dt_iop_gui_move_module_before()

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.

Parameters
moduleModule being moved.
module_nextModule that should end up immediately after module.
reasonDebug string used in IOP-order checks.
Returns
TRUE if the move was applied, FALSE otherwise.

References dt_iop_gui_commit_iop_order_change(), dt_ioppr_move_iop_before(), FALSE, TRUE, and dt_iop_roi_t::y.

Referenced by _gui_movedown_callback(), _ioporder_drag_data_received(), and _modulegroups_drag_data_received().

◆ dt_iop_gui_rename_module()

◆ dt_iop_gui_reset()

void dt_iop_gui_reset ( dt_iop_module_t module)

reset the ui to its defaults

References darktable, dt_iop_is_hidden(), darktable_t::gui, dt_gui_gtk_t::reset, and dt_iop_roi_t::y.

Referenced by _gui_reset_callback().

◆ dt_iop_gui_set_enable_button()

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

References dt_gui_add_class(), dt_gui_remove_class(), dt_iop_gui_set_enable_button_icon(), FALSE, IS_NULL_PTR, TRUE, and dt_iop_roi_t::y.

Referenced by dt_dev_add_history_item_real(), dt_iop_gui_changed(), and dt_iop_gui_update_header().

◆ dt_iop_gui_set_enable_button_icon()

◆ dt_iop_gui_set_expanded()

◆ dt_iop_gui_set_expander()

◆ dt_iop_gui_update()

◆ dt_iop_gui_update_expanded()

void dt_iop_gui_update_expanded ( dt_iop_module_t module)

refresh iop according to set expanded state

References DTGTK_EXPANDER, dtgtk_expander_set_expanded(), IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by dt_iop_gui_update(), and enter().

◆ dt_iop_gui_update_header()

◆ dt_iop_init_pipe()

void dt_iop_init_pipe ( struct dt_iop_module_t module,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

◆ dt_iop_is_first_instance()

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

References m, TRUE, and dt_iop_roi_t::y.

Referenced by declare_cat_on_pipe().

◆ dt_iop_is_hidden()

◆ dt_iop_is_raster_mask_used()

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

References FALSE, key, TRUE, value, and dt_iop_roi_t::y.

Referenced by dt_develop_blend_process(), and process().

◆ dt_iop_load_default_params()

◆ dt_iop_load_module()

◆ dt_iop_load_module_by_so()

int dt_iop_load_module_by_so ( dt_iop_module_t module,
dt_iop_module_so_t so,
struct dt_develop_t dev 
)

◆ dt_iop_load_module_so()

◆ dt_iop_load_modules_so()

◆ dt_iop_module_has_raster_mask()

gboolean dt_iop_module_has_raster_mask ( const dt_iop_module_t module)

returns TRUE if module consumes a raster mask

References FALSE, IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by dt_iop_module_needs_mask_history().

◆ dt_iop_module_needs_mask_history()

gboolean dt_iop_module_needs_mask_history ( const dt_iop_module_t module)

returns TRUE if module needs masks committed to history

References dt_iop_module_has_raster_mask(), FALSE, IS_NULL_PTR, and dt_iop_roi_t::y.

Referenced by dt_dev_add_history_item_ext(), and dt_dev_history_item_from_source_history_item().

◆ dt_iop_nap()

void dt_iop_nap ( int32_t  usec)

allow plugins to relinquish CPU and go to sleep for some time

References dt_iop_roi_t::y.

Referenced by dt_dev_darkroom_pipeline().

◆ dt_iop_reload_defaults()

◆ dt_iop_request_focus()

void dt_iop_request_focus ( dt_iop_module_t module)

requests the focus for this plugin (to draw overlays over the center image)

References darktable_t::collection, darktable, darktable_t::develop, dt_collection_hint_message(), dt_control_change_cursor(), dt_control_queue_redraw_center(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_gui_add_class(), dt_gui_refocus_center(), dt_gui_remove_class(), 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, FALSE, darktable_t::gui, dt_develop_t::gui_module, dt_gui_gtk_t::has_scroll_focus, dt_gui_gtk_t::reset, darktable_t::signals, TRUE, and dt_iop_roi_t::y.

Referenced by _add_shape(), _area_button_press_callback(), _area_scroll_callback(), _auto_levels_callback(), _auto_levels_callback(), _blendop_blendif_key_press(), _blendop_blendif_showmask_clicked(), _blendop_blendif_suppress_toggled(), _blendop_masks_add_shape(), _blendop_masks_show_and_edit(), _check_deleted_instances(), _color_picker_callback_button_press(), _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_off_button_press(), _gui_set_single_expanded(), _iop_plugin_body_button_press(), _iop_plugin_header_button_release(), _lib_modulegroups_scroll(), _lib_modulegroups_update_iop_visibility(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _raster_combo_populate(), _select_region_toggled_callback(), _select_region_toggled_callback(), 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_iop_gui_duplicate(), dt_iop_levels_button_press(), dt_iop_levels_scroll(), dt_masks_creation_mode(), dt_masks_iop_combo_populate(), gui_reset(), mask_callback(), notebook_button_press(), profile_changed(), rt_add_shape(), rt_auto_levels_callback(), rt_display_wavelet_scale_callback(), rt_edit_masks_callback(), rt_select_algorithm_callback(), rt_showmask_callback(), rt_suppress_callback(), rt_wdbar_button_press(), rt_wdbar_scrolled(), show_luminance_mask_callback(), start_profiling_callback(), and workicc_changed().

◆ dt_iop_set_cache_bypass()

◆ dt_iop_set_darktable_iop_table()

◆ dt_iop_set_description()

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 
)

References process(), and dt_iop_roi_t::y.

Referenced by description().

◆ dt_iop_set_mask_mode()

void dt_iop_set_mask_mode ( dt_iop_module_t module,
int  mask_mode 
)

make sure the raster mask is advertised if available

References DEVELOP_MASK_ENABLED, DEVELOP_MASK_RASTER, dt_history_item_get_name(), key, and dt_iop_roi_t::y.

Referenced by _blendop_masks_mode_callback(), and dt_iop_commit_blend_params().

◆ dt_iop_so_is_hidden()

gboolean dt_iop_so_is_hidden ( dt_iop_module_so_t module)

checks if iop do have an ui

References FALSE, IOP_FLAGS_HIDDEN, IS_NULL_PTR, TRUE, and dt_iop_roi_t::y.

Referenced by dt_iop_is_hidden().

◆ dt_iop_throttled_history_update()

◆ dt_iop_unload_modules_so()

void dt_iop_unload_modules_so ( void  )

cleans up the dlopen refs.

References _iop_presets_select_stmt, darktable, dt_free, darktable_t::iop, and dt_iop_roi_t::y.

Referenced by dt_cleanup().

◆ dt_iop_update_multi_priority()

Variable Documentation

◆ _iop_presets_select_stmt

sqlite3_stmt* _iop_presets_select_stmt = NULL
static