Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
iop_api.h File Reference
+ Include dependency graph for iop_api.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 OPTIONAL (void, init_presets, struct dt_iop_module_so_t *self)
 
 OPTIONAL (void, init_global, struct dt_iop_module_so_t *self)
 
 OPTIONAL (void, cleanup_global, struct dt_iop_module_so_t *self)
 
 REQUIRED (const char *, name, void)
 
 DEFAULT (const char *, aliases, void)
 
 DEFAULT (int, default_group, void)
 
 DEFAULT (int, flags, void)
 
 DEFAULT (const char *, deprecated_msg, void)
 
 DEFAULT (int, iop_focus, struct dt_gui_module_t *module, gboolean toggle)
 
 DEFAULT (const char **, description, struct dt_iop_module_t *self)
 
 DEFAULT (int, operation_tags, void)
 
 DEFAULT (int, operation_tags_filter, void)
 
 DEFAULT (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)
 
 DEFAULT (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)
 
 REQUIRED (int, default_colorspace, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
 DEFAULT (int, input_colorspace, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
 DEFAULT (int, output_colorspace, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
 DEFAULT (int, blend_colorspace, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
 DEFAULT (void, tiling_callback, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const struct dt_iop_roi_t *roi_in, const struct dt_iop_roi_t *roi_out, struct dt_develop_tiling_t *tiling)
 
 OPTIONAL (void, gui_update, struct dt_iop_module_t *self)
 
 OPTIONAL (void, gui_reset, struct dt_iop_module_t *self)
 
 OPTIONAL (void, gui_init, struct dt_iop_module_t *self)
 
 OPTIONAL (void, color_picker_apply, struct dt_iop_module_t *self, struct _GtkWidget *picker, struct dt_dev_pixelpipe_iop_t *piece)
 
 OPTIONAL (void, gui_changed, struct dt_iop_module_t *self, GtkWidget *widget, void *previous)
 
 DEFAULT (void, gui_cleanup, struct dt_iop_module_t *self)
 
 OPTIONAL (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)
 
 OPTIONAL (void, gui_focus, struct dt_iop_module_t *self, gboolean in)
 
 OPTIONAL (int, mouse_leave, struct dt_iop_module_t *self)
 
 OPTIONAL (int, mouse_moved, struct dt_iop_module_t *self, double x, double y, double pressure, int which)
 
 OPTIONAL (int, button_released, struct dt_iop_module_t *self, double x, double y, int which, uint32_t state)
 
 OPTIONAL (int, button_pressed, struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state)
 
 OPTIONAL (int, scrolled, struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)
 
 OPTIONAL (void, configure, struct dt_iop_module_t *self, int width, int height)
 
 OPTIONAL (void, init, struct dt_iop_module_t *self)
 
 DEFAULT (void, cleanup, struct dt_iop_module_t *self)
 
 DEFAULT (void, init_pipe, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
 DEFAULT (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)
 
 OPTIONAL (void, reload_defaults, struct dt_iop_module_t *self)
 
 DEFAULT (gboolean, has_defaults, struct dt_iop_module_t *self)
 
 OPTIONAL (void, change_image, struct dt_iop_module_t *self)
 
 DEFAULT (void, cleanup_pipe, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece)
 
 OPTIONAL (void, modify_roi_in, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const struct dt_iop_roi_t *roi_out, struct dt_iop_roi_t *roi_in)
 
 OPTIONAL (void, modify_roi_out, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, struct dt_iop_roi_t *roi_out, const struct dt_iop_roi_t *roi_in)
 
 OPTIONAL (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)
 
 OPTIONAL (void, masks_selection_changed, struct dt_iop_module_t *self, const int form_selected_id)
 
 REQUIRED (void, process, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out)
 
 DEFAULT (void, process_tiling, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const void *const i, void *const o, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out, const int bpp)
 
 DEFAULT (int, distort_transform, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
 
 DEFAULT (int, distort_backtransform, struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, float *points, size_t points_count)
 
 OPTIONAL (void, distort_mask, struct dt_iop_module_t *self, 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)
 
 OPTIONAL (int, introspection_init, struct dt_iop_module_so_t *self, int api_version)
 
 DEFAULT (dt_introspection_t *, get_introspection, void)
 
 DEFAULT (dt_introspection_field_t *, get_introspection_linear, void)
 
 DEFAULT (void *, get_p, const void *param, const char *name)
 
 DEFAULT (dt_introspection_field_t *, get_f, const char *name)
 
 OPTIONAL (void, set_preferences, void *menu, struct dt_iop_module_t *self)
 
 OPTIONAL (gboolean, force_enable, struct dt_iop_module_t *self, const gboolean current_state)
 
 OPTIONAL (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.
 

Function Documentation

◆ DEFAULT() [1/27]

DEFAULT ( const char **  ,
description  ,
struct dt_iop_module_t self 
)

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

◆ DEFAULT() [2/27]

DEFAULT ( const char *  ,
aliases  ,
void   
)

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

◆ DEFAULT() [3/27]

DEFAULT ( const char *  ,
deprecated_msg  ,
void   
)

get the deprecated message if needed, to be translated.

◆ DEFAULT() [4/27]

DEFAULT ( dt_introspection_field_t ,
get_f  ,
const char *  name 
)

◆ DEFAULT() [5/27]

DEFAULT ( dt_introspection_field_t ,
get_introspection_linear  ,
void   
)

◆ DEFAULT() [6/27]

DEFAULT ( dt_introspection_t ,
get_introspection  ,
void   
)

◆ DEFAULT() [7/27]

DEFAULT ( gboolean  ,
has_defaults  ,
struct dt_iop_module_t self 
)

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

◆ DEFAULT() [8/27]

DEFAULT ( int  ,
blend_colorspace  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

what colorspace the blend module operates with?

◆ DEFAULT() [9/27]

DEFAULT ( int  ,
default_group  ,
void   
)

get the default group this module belongs to.

◆ DEFAULT() [10/27]

DEFAULT ( int  ,
distort_backtransform  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
float *  points,
size_t  points_count 
)

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

◆ DEFAULT() [11/27]

DEFAULT ( int  ,
distort_transform  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
float *  points,
size_t  points_count 
)

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

◆ DEFAULT() [12/27]

DEFAULT ( int  ,
flags  ,
void   
)

get the iop module flags.

◆ DEFAULT() [13/27]

DEFAULT ( int  ,
input_colorspace  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

what input colorspace it expects?

◆ DEFAULT() [14/27]

DEFAULT ( int  ,
iop_focus  ,
struct dt_gui_module_t module,
gboolean  toggle 
)

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

◆ DEFAULT() [15/27]

DEFAULT ( int  ,
operation_tags  ,
void   
)

◆ DEFAULT() [16/27]

DEFAULT ( int  ,
operation_tags_filter  ,
void   
)

◆ DEFAULT() [17/27]

DEFAULT ( int  ,
output_colorspace  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

what will it output?

◆ DEFAULT() [18/27]

DEFAULT ( void ,
get_p  ,
const void param,
const char *  name 
)

◆ DEFAULT() [19/27]

DEFAULT ( void  ,
cleanup  ,
struct dt_iop_module_t self 
)

◆ DEFAULT() [20/27]

DEFAULT ( void  ,
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.

◆ DEFAULT() [21/27]

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

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

◆ DEFAULT() [22/27]

DEFAULT ( void  ,
gui_cleanup  ,
struct dt_iop_module_t self 
)

destroy widget.

◆ DEFAULT() [23/27]

DEFAULT ( void  ,
init_pipe  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

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

◆ DEFAULT() [24/27]

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

what do the iop want as an input?

◆ DEFAULT() [25/27]

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

what will it output?

◆ DEFAULT() [26/27]

DEFAULT ( void  ,
process_tiling  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
const void *const  i,
void *const  o,
const struct dt_iop_roi_t *const  roi_in,
const struct dt_iop_roi_t *const  roi_out,
const int  bpp 
)

a tiling variant of process().

◆ DEFAULT() [27/27]

DEFAULT ( void  ,
tiling_callback  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
const struct dt_iop_roi_t roi_in,
const struct dt_iop_roi_t roi_out,
struct dt_develop_tiling_t tiling 
)

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

◆ OPTIONAL() [1/28]

OPTIONAL ( gboolean  ,
force_enable  ,
struct dt_iop_module_t self,
const gboolean  current_state 
)

◆ OPTIONAL() [2/28]

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

◆ OPTIONAL() [3/28]

OPTIONAL ( int  ,
button_released  ,
struct dt_iop_module_t self,
double  x,
double  y,
int  which,
uint32_t  state 
)

◆ OPTIONAL() [4/28]

OPTIONAL ( int  ,
introspection_init  ,
struct dt_iop_module_so_t self,
int  api_version 
)

◆ OPTIONAL() [5/28]

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

◆ OPTIONAL() [6/28]

OPTIONAL ( int  ,
mouse_leave  ,
struct dt_iop_module_t self 
)

optional event callbacks

◆ OPTIONAL() [7/28]

OPTIONAL ( int  ,
mouse_moved  ,
struct dt_iop_module_t self,
double  x,
double  y,
double  pressure,
int  which 
)

◆ OPTIONAL() [8/28]

OPTIONAL ( int  ,
scrolled  ,
struct dt_iop_module_t self,
double  x,
double  y,
int  up,
uint32_t  state 
)

◆ OPTIONAL() [9/28]

OPTIONAL ( void  ,
change_image  ,
struct dt_iop_module_t self 
)

called after the image has changed in darkroom

◆ OPTIONAL() [10/28]

OPTIONAL ( void  ,
cleanup_global  ,
struct dt_iop_module_so_t self 
)

called once per module, at shutdown.

◆ OPTIONAL() [11/28]

OPTIONAL ( void  ,
color_picker_apply  ,
struct dt_iop_module_t self,
struct _GtkWidget *  picker,
struct dt_dev_pixelpipe_iop_t piece 
)

apply color picker results

◆ OPTIONAL() [12/28]

OPTIONAL ( void  ,
configure  ,
struct dt_iop_module_t self,
int  width,
int  height 
)

◆ OPTIONAL() [13/28]

OPTIONAL ( void  ,
distort_mask  ,
struct dt_iop_module_t self,
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 
)

◆ OPTIONAL() [14/28]

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

called by standard widget callbacks after value changed

◆ OPTIONAL() [15/28]

OPTIONAL ( void  ,
gui_focus  ,
struct dt_iop_module_t self,
gboolean  in 
)

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

◆ OPTIONAL() [16/28]

OPTIONAL ( void  ,
gui_init  ,
struct dt_iop_module_t self 
)

construct widget.

◆ OPTIONAL() [17/28]

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

optional method called after darkroom expose.

◆ OPTIONAL() [18/28]

OPTIONAL ( void  ,
gui_reset  ,
struct dt_iop_module_t self 
)

reset ui to defaults

◆ OPTIONAL() [19/28]

OPTIONAL ( void  ,
gui_update  ,
struct dt_iop_module_t self 
)

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

◆ OPTIONAL() [20/28]

OPTIONAL ( void  ,
init  ,
struct dt_iop_module_t self 
)

◆ OPTIONAL() [21/28]

OPTIONAL ( void  ,
init_global  ,
struct dt_iop_module_so_t self 
)

called once per module, at startup.

◆ OPTIONAL() [22/28]

OPTIONAL ( void  ,
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.

◆ OPTIONAL() [23/28]

OPTIONAL ( void  ,
masks_selection_changed  ,
struct dt_iop_module_t self,
const int  form_selected_id 
)

◆ OPTIONAL() [24/28]

OPTIONAL ( void  ,
modify_roi_in  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
const struct dt_iop_roi_t roi_out,
struct dt_iop_roi_t roi_in 
)

◆ OPTIONAL() [25/28]

OPTIONAL ( void  ,
modify_roi_out  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
struct dt_iop_roi_t roi_out,
const struct dt_iop_roi_t roi_in 
)

◆ OPTIONAL() [26/28]

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

Parameters
self

◆ OPTIONAL() [27/28]

OPTIONAL ( void  ,
reload_defaults  ,
struct dt_iop_module_t self 
)

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

◆ OPTIONAL() [28/28]

OPTIONAL ( void  ,
set_preferences  ,
void menu,
struct dt_iop_module_t self 
)

◆ REQUIRED() [1/3]

REQUIRED ( const char *  ,
name  ,
void   
)

get name of the module, to be translated.

◆ REQUIRED() [2/3]

REQUIRED ( int  ,
default_colorspace  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_t pipe,
struct dt_dev_pixelpipe_iop_t piece 
)

what default colorspace this iop use?

◆ REQUIRED() [3/3]

REQUIRED ( void  ,
process  ,
struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
const void *const  i,
void *const  o,
const struct dt_iop_roi_t *const  roi_in,
const struct dt_iop_roi_t *const  roi_out 
)

this is the temp homebrew callback to operations. x,y, and scale are just given for orientation in the framebuffer. i and o are scaled to the same size width*height and contain a max of 3 floats. other color formats may be filled by this callback, if the pipeline can handle it. the simplest variant of process(). you can only use OpenMP SIMD here, no intrinsics must be provided by each IOP.