Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
develop.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2021 darktable developers.
4 Copyright (C) 2022-2026 Ansel developers
5
6 darktable is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 darktable is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with darktable. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <cairo.h>
23#include <glib.h>
24#include <inttypes.h>
25#include <stdint.h>
26
27#include "common/debug.h"
28#include "common/darktable.h"
29#include "common/dtpthread.h"
30#include "common/image.h"
31#include "control/settings.h"
32#include "develop/imageop.h"
33#include "develop/dev_history.h"
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40struct dt_iop_module_t;
41
48
58
64
71
80
107
115
123
130{
131 struct dt_iop_module_t *module;
132 float (*get_exposure)(struct dt_iop_module_t *exp);
133 float (*get_black)(struct dt_iop_module_t *exp);
135
136struct dt_dev_pixelpipe_t;
137
138typedef struct dt_backbuf_t
139{
140 void *buffer; // image data
141 size_t width; // pixel size of image
142 size_t height; // pixel size of image
143 uint64_t hash; // checksum/integrity hash, for example to connect to a cacheline
144 const char *op; // name of the backbuf
145 size_t bpp; // bits per pixels
147
148
149typedef struct dt_develop_t
150{
151 // != 0 if the gui should be notified of changes in hist stack and modules should be
152 // gui_init'ed.
153 int32_t gui_attached;
154
155 int exit; // set to 1 to close background darkroom pipeline threads
158 struct dt_iop_module_t *gui_module; // this module claims gui expose/event callbacks.
159
160 // darkroom border size: ISO 12646 borders or user-defined borders
161 int32_t border_size;
162
163 // Those are the darkroom main widget size, aka max paintable area.
164 // This size is allocated by Gtk from the window size minus all panels.
165 // It is NOT the size of the backbuffer/ROI.
167
168 // width = orig_width - 2 * border_size,
169 // height = orig_height - 2 * border_size,
170 // aka the surface actually covered by an image backbuffer (ROI)
171 // set by `dt_dev_configure()`
172 int32_t width, height;
173
174 // natural scaling = MIN(dev->width / dev->pipe->processed_width, dev->height / dev->pipe->processed_height)
175 // aka ensure that image fits into widget minus margins/borders.
177
178 // User-defined scaling factor, related to GUI zoom.
179 // Applies on top of natural scale
180 float scaling;
181
182 // Relative coordinates of the center of the ROI, expressed with
183 // regard to the complete image.
184 float x, y;
185
186 // image processing pipeline with caching
188
189 // image under consideration, which
190 // is copied each time an image is changed. this means we have some information
191 // always cached (might be out of sync, so stars are not reliable), but for the iops
192 // it's quite a convenience to access trivial stuff which is constant anyways without
193 // calling into the cache explicitly. this should never be accessed directly, but
194 // by the iop through the copy their respective pixelpipe holds, for thread-safety.
196
197 // history stack
199 int32_t history_end;
201
202 // operations pipeline
205 // iop's to be deleted
207
208 // iop order
211
212 // profiles info
214
215 // histogram for display.
218
219 // list of forms iop can use for masks or whatever
221 // integrity hash of forms
223 // forms have been added or removed or changed and need to be committed to history
227 // all forms to be linked here for cleanup:
229
230 dt_backbuf_t raw_histogram; // backbuf to prepare the raw histogram (before white balance)
231 dt_backbuf_t output_histogram; // backbuf to prepare the display-agnostic output histogram (in the middle of colorout)
232 dt_backbuf_t display_histogram; // backbuf to prepare the display-referred output histogram (at the far end of the pipe)
233
234 // if dev is GUI-attached, auto save history 15s after the last change is made.
236
237 // Track history changes from C. Note: we have a DB variant.
239
240 /* proxy for communication between plugins and develop/darkroom */
241 struct
242 {
243 // list of exposure iop instances, with plugin hooks, used by histogram dragging functions
244 // each element is dt_dev_proxy_exposure_t
246
247 // modulegroups plugin hooks
248 struct
249 {
250 struct dt_lib_module_t *module;
251 /* switch module group */
252 void (*set)(struct dt_lib_module_t *self, uint32_t group);
253 /* get current module group */
254 uint32_t (*get)(struct dt_lib_module_t *self);
255 /* get activated module group */
256 uint32_t (*get_activated)(struct dt_lib_module_t *self);
257 /* test if iop group flags matches modulegroup */
258 gboolean (*test)(struct dt_lib_module_t *self, uint32_t group, uint32_t iop_group);
259 /* switch to modulegroup */
261 /* update modulegroup visibility */
263 /* test if module is preset in one of the current groups */
264 gboolean (*test_visible)(struct dt_lib_module_t *self, gchar *module);
266
267 // snapshots plugin hooks
268 struct
269 {
270 // this flag is set by snapshot plugin to signal that expose of darkroom
271 // should store cairo surface as snapshot to disk using filename.
272 gboolean request;
273 const gchar *filename;
275
276 // masks plugin hooks
277 struct
278 {
279 struct dt_lib_module_t *module;
280 /* treview list refresh */
282 void (*list_remove)(struct dt_lib_module_t *self, int formid, int parentid);
284 /* selected forms change */
285 void (*selection_change)(struct dt_lib_module_t *self, struct dt_iop_module_t *module, const int selectid, const int throw_event);
287
288 // what is the ID of the module currently doing pipeline chromatic adaptation ?
289 // this is to prevent multiple modules/instances from doing white balance globally.
290 // only used to display warnings in GUI of modules that should probably not be doing white balance
292
293 // is the WB module using D65 illuminant and not doing full chromatic adaptation ?
294 gboolean wb_is_D65;
295 dt_aligned_pixel_t wb_coeffs;
296
298
299 // for the overexposure indicator
300 struct
301 {
302 GtkWidget *floating_window, *button; // yes, having gtk stuff in here is ugly. live with it.
303
304 gboolean enabled;
306 float lower;
307 float upper;
310
311 // for the raw overexposure indicator
312 struct
313 {
314 GtkWidget *floating_window, *button; // yes, having gtk stuff in here is ugly. live with it.
315
316 gboolean enabled;
321
322 struct
323 {
324 GtkWidget *floating_window, *button; // 10 years later, still ugly
325
329
330 // ISO 12646-compliant colour assessment conditions
331 struct
332 {
333 GtkWidget *button; // yes, ugliness is the norm. what did you expect ?
334 gboolean enabled;
336
337 // the display profile related things (softproof, gamut check, profiles ...)
338 struct
339 {
342
343 // progress bar
344 struct
345 {
346 int total, completed;
348
349 int mask_form_selected_id; // select a mask inside an iop
350 gboolean darkroom_skip_mouse_events; // skip mouse events for masks
351 gboolean mask_lock;
353
356
357void dt_dev_init(dt_develop_t *dev, int32_t gui_attached);
359
362// launch jobs above
365
366// Lazy helpers that will update GUI pipelines (main image and small preview)
367// only when needed, and only the one(s) needed.
369#define dt_dev_process_all(dev) DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_process_all_real, (dev))
370
371int dt_dev_load_image(dt_develop_t *dev, const int32_t imgid);
373int dt_dev_is_current_image(dt_develop_t *dev, int32_t imgid);
374
375void dt_dev_get_processed_size(const dt_develop_t *dev, int *procw, int *proch);
376
377float dt_dev_get_zoom_scale(dt_develop_t *dev, gboolean preview);
378
390void dt_dev_retrieve_full_pos(dt_develop_t *dev, const int px, const int py, float *mouse_x, float *mouse_y);
391
392void dt_dev_configure_real(dt_develop_t *dev, int wd, int ht);
393#define dt_dev_configure(dev, wd, ht) DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_configure_real, (dev), (wd), (ht))
394
404void dt_dev_check_zoom_pos_bounds(dt_develop_t *dev, float *dev_x, float *dev_y, float *box_w, float *box_h);
405
406/*
407 * exposure plugin hook, set the exposure and the black level
408 */
409
414
415/*
416 * modulegroups plugin hooks
417 */
423void dt_dev_modulegroups_set(dt_develop_t *dev, uint32_t group);
428
430void dt_dev_snapshot_request(dt_develop_t *dev, const char *filename);
431
433void dt_dev_average_delay_update(const dt_times_t *start, uint32_t *average_delay);
434
435/*
436 * masks plugin hooks
437 */
440void dt_dev_masks_list_remove(dt_develop_t *dev, int formid, int parentid);
441void dt_dev_masks_selection_change(dt_develop_t *dev, struct dt_iop_module_t *module, const int selectid, const int throw_event);
442
445
446/*
447 * multi instances
448 */
455
457gchar *dt_history_item_get_name(const struct dt_iop_module_t *module);
458gchar *dt_history_item_get_name_html(const struct dt_iop_module_t *module);
459
461gchar *dt_history_item_get_label(const struct dt_iop_module_t *module);
462
463
464/*
465 * distort functions
466 */
468int dt_dev_distort_transform(dt_develop_t *dev, float *points, size_t points_count);
470int dt_dev_distort_backtransform(dt_develop_t *dev, float *points, size_t points_count);
472int dt_dev_distort_transform_plus(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction,
473 float *points, size_t points_count);
476 const int transf_direction, float *points, size_t points_count);
478int dt_dev_distort_backtransform_plus(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction,
479 float *points, size_t points_count);
482 const int transf_direction, float *points, size_t points_count);
483
486 struct dt_iop_module_t *module);
487/*
488 * hash functions
489 */
493int dt_dev_wait_hash(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, dt_pthread_mutex_t *lock,
494 const volatile uint64_t *const hash);
500int dt_dev_sync_pixelpipe_hash(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, dt_pthread_mutex_t *lock,
501 const volatile uint64_t *const hash);
502
503/*
504 * history undo support helpers for darkroom
505 */
506
507/* all history change must be enclosed into a start / end call */
510
511// Getter and setter for global mask lock (GUI)
512// Can be overriden by key accels
513
515void dt_masks_set_lock_mode(dt_develop_t *dev, gboolean mode);
516
517// Count all the mask forms used x history entries, up to a certain threshold.
518// Stop counting when the threshold is reached, for performance.
519guint dt_dev_mask_history_overload(GList *dev_history, guint threshold);
520
521// Write the `darktable|changed` tag on the current picture upon history modification
522void dt_dev_append_changed_tag(const int32_t imgid);
523
524// This needs to run after `dt_dev_pixelpipe_get_roi_out()` so `pipe->processed_width`
525// and `pipe->processed_height` are defined.
526// Natural scale is the rescaling factor such that the full-res pipeline output
527// (real or virtual) fits within darkroom widget area (minus borders/margins)
529
538
547
548// Get the current zoom factor ( scaling * natural_scale )
549float dt_dev_get_zoom_level(const dt_develop_t *dev);
550
551// Reset darkroom ROI scaling and position
553
564gboolean dt_dev_clip_roi(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height);
565
575gboolean dt_dev_rescale_roi(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height);
576
586gboolean dt_dev_rescale_roi_to_input(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height);
587
595
608gboolean dt_dev_roi_to_input_space(dt_develop_t *dev, /*gboolean normalized_in,*/ gboolean normalize_out, const float in_x, const float in_y, float *out_x, float *out_y);
609
621gboolean dt_dev_roi_delta_to_input_space(dt_develop_t *dev, const float delta[2],/* gboolean normalize_out,*/ const float in[2], float points[2]);
622
623#ifdef __cplusplus
624}
625#endif
626
627// clang-format off
628// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
629// vim: shiftwidth=2 expandtab tabstop=2 cindent
630// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
631// clang-format on
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
gboolean dt_dev_roi_to_input_space(dt_develop_t *dev, gboolean normalize_out, const float in_x, const float in_y, float *out_x, float *out_y)
Get point in input image space from point in normalized ROI space. The function performs a distortion...
Definition develop.c:1431
int dt_dev_wait_hash(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, dt_pthread_mutex_t *lock, const volatile uint64_t *const hash)
Definition develop.c:1112
void dt_dev_masks_list_change(dt_develop_t *dev)
Definition develop.c:755
int dt_dev_distort_backtransform_locked(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
Definition develop.c:1059
void dt_dev_get_processed_size(const dt_develop_t *dev, int *procw, int *proch)
Definition develop.c:655
void dt_masks_set_lock_mode(dt_develop_t *dev, gboolean mode)
Definition develop.c:1242
dt_dev_overexposed_colorscheme_t
Definition develop.h:43
@ DT_DEV_OVEREXPOSED_PURPLEGREEN
Definition develop.h:46
@ DT_DEV_OVEREXPOSED_REDBLUE
Definition develop.h:45
@ DT_DEV_OVEREXPOSED_BLACKWHITE
Definition develop.h:44
uint32_t dt_dev_modulegroups_get(dt_develop_t *dev)
Definition develop.c:735
void dt_dev_cleanup(dt_develop_t *dev)
Definition develop.c:180
void dt_dev_module_remove(dt_develop_t *dev, struct dt_iop_module_t *module)
Definition develop.c:867
dt_dev_overlay_colors_t
Definition develop.h:50
@ DT_DEV_OVERLAY_CYAN
Definition develop.h:55
@ DT_DEV_OVERLAY_YELLOW
Definition develop.h:54
@ DT_DEV_OVERLAY_RED
Definition develop.h:52
@ DT_DEV_OVERLAY_GREEN
Definition develop.h:53
@ DT_DEV_OVERLAY_GRAY
Definition develop.h:51
@ DT_DEV_OVERLAY_MAGENTA
Definition develop.h:56
void dt_dev_process_image_job(dt_develop_t *dev)
Definition develop.c:533
int dt_dev_distort_transform_plus(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
Definition develop.c:1049
int dt_dev_distort_backtransform(dt_develop_t *dev, float *points, size_t points_count)
Definition develop.c:1014
dt_dev_pixelpipe_display_mask_t
Definition develop.h:82
@ DT_DEV_PIXELPIPE_DISPLAY_a
Definition develop.h:88
@ DT_DEV_PIXELPIPE_DISPLAY_OUTPUT
Definition develop.h:86
@ DT_DEV_PIXELPIPE_DISPLAY_G
Definition develop.h:91
@ DT_DEV_PIXELPIPE_DISPLAY_L
Definition develop.h:87
@ DT_DEV_PIXELPIPE_DISPLAY_CHANNEL
Definition develop.h:85
@ DT_DEV_PIXELPIPE_DISPLAY_ANY
Definition develop.h:104
@ DT_DEV_PIXELPIPE_DISPLAY_LCH_h
Definition develop.h:95
@ DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_hz
Definition develop.h:101
@ DT_DEV_PIXELPIPE_DISPLAY_HSL_H
Definition develop.h:96
@ DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU_MONO
Definition develop.h:103
@ DT_DEV_PIXELPIPE_DISPLAY_HSL_S
Definition develop.h:97
@ DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Cz
Definition develop.h:100
@ DT_DEV_PIXELPIPE_DISPLAY_LCH_C
Definition develop.h:94
@ DT_DEV_PIXELPIPE_DISPLAY_b
Definition develop.h:89
@ DT_DEV_PIXELPIPE_DISPLAY_STICKY
Definition develop.h:105
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
Definition develop.h:84
@ DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Jz
Definition develop.h:99
@ DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU
Definition develop.h:102
@ DT_DEV_PIXELPIPE_DISPLAY_NONE
Definition develop.h:83
@ DT_DEV_PIXELPIPE_DISPLAY_HSL_l
Definition develop.h:98
@ DT_DEV_PIXELPIPE_DISPLAY_GRAY
Definition develop.h:93
@ DT_DEV_PIXELPIPE_DISPLAY_B
Definition develop.h:92
@ DT_DEV_PIXELPIPE_DISPLAY_R
Definition develop.h:90
dt_dev_transform_direction_t
Definition develop.h:73
@ DT_DEV_TRANSFORM_DIR_BACK_EXCL
Definition develop.h:78
@ DT_DEV_TRANSFORM_DIR_BACK_INCL
Definition develop.h:77
@ DT_DEV_TRANSFORM_DIR_FORW_INCL
Definition develop.h:75
@ DT_DEV_TRANSFORM_DIR_ALL
Definition develop.h:74
@ DT_DEV_TRANSFORM_DIR_FORW_EXCL
Definition develop.h:76
float dt_dev_get_overlay_scale(dt_develop_t *dev)
Get the overlay scale factor (scaling * natural_scale_on_processed_size * ppd)
Definition develop.c:1320
int dt_dev_distort_backtransform_plus(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
Definition develop.c:1088
void dt_dev_append_changed_tag(const int32_t imgid)
Definition develop.c:1264
float dt_dev_get_zoom_level(const dt_develop_t *dev)
Definition develop.c:1325
void dt_dev_masks_selection_change(dt_develop_t *dev, struct dt_iop_module_t *module, const int selectid, const int throw_event)
Definition develop.c:770
void dt_dev_init(dt_develop_t *dev, int32_t gui_attached)
Definition develop.c:76
int dt_dev_is_current_image(dt_develop_t *dev, int32_t imgid)
Definition develop.c:696
void dt_dev_undo_start_record(dt_develop_t *dev)
Definition develop.c:1206
dt_dev_rawoverexposed_mode_t
Definition develop.h:59
@ DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR
Definition develop.h:62
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA
Definition develop.h:60
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID
Definition develop.h:61
void dt_dev_snapshot_request(dt_develop_t *dev, const char *filename)
Definition develop.c:777
void dt_dev_process_all_real(dt_develop_t *dev)
Definition develop.c:264
void dt_dev_modulegroups_update_visibility(dt_develop_t *dev)
Definition develop.c:749
gboolean dt_masks_get_lock_mode(dt_develop_t *dev)
Definition develop.c:1230
float dt_dev_exposure_get_black(dt_develop_t *dev)
Definition develop.c:720
gchar * dt_history_item_get_label(const struct dt_iop_module_t *module)
Definition develop.c:969
void dt_dev_modulegroups_set(dt_develop_t *dev, uint32_t group)
Definition develop.c:729
gchar * dt_history_item_get_name_html(const struct dt_iop_module_t *module)
Definition develop.c:997
void dt_dev_modulegroups_switch(dt_develop_t *dev, struct dt_iop_module_t *module)
Definition develop.c:743
void dt_dev_check_zoom_pos_bounds(dt_develop_t *dev, float *dev_x, float *dev_y, float *box_w, float *box_h)
Ensure that the current ROI position is within allowed bounds .
Definition develop.c:620
gboolean dt_dev_check_zoom_scale_bounds(dt_develop_t *dev)
Ensure that the current zoom level is within allowed bounds (for scrolling).
Definition develop.c:1405
int dt_dev_distort_transform_locked(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
Definition develop.c:1020
dt_clipping_preview_mode_t
Definition develop.h:117
@ DT_CLIPPING_PREVIEW_ANYRGB
Definition develop.h:119
@ DT_CLIPPING_PREVIEW_GAMUT
Definition develop.h:118
@ DT_CLIPPING_PREVIEW_SATURATION
Definition develop.h:121
@ DT_CLIPPING_PREVIEW_LUMINANCE
Definition develop.h:120
struct dt_dev_pixelpipe_iop_t * dt_dev_distort_get_iop_pipe(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, struct dt_iop_module_t *module)
Definition develop.c:1097
void dt_dev_reset_roi(dt_develop_t *dev)
Definition develop.c:1334
struct dt_iop_module_t * dt_dev_module_duplicate(dt_develop_t *dev, struct dt_iop_module_t *base)
Definition develop.c:795
float dt_dev_get_natural_scale(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe)
Definition develop.c:1298
dt_dev_pipe_type_t
Definition develop.h:125
@ DT_DEV_PREVIEW_PIPE
Definition develop.h:127
@ DT_DEV_PIPE
Definition develop.h:126
gboolean dt_dev_rescale_roi_to_input(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height)
Scale the ROI to fit the input size within given width/height, centered.
Definition develop.c:1395
void dt_dev_process_preview(dt_develop_t *dev)
Definition develop.c:256
void dt_dev_average_delay_update(const dt_times_t *start, uint32_t *average_delay)
Definition develop.c:784
gboolean dt_dev_roi_delta_to_input_space(dt_develop_t *dev, const float delta[2], const float in[2], float points[2])
Convert a delta vector in ROI space to input image space. The function performs a distortion backtran...
Definition develop.c:1470
int dt_dev_sync_pixelpipe_hash(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, dt_pthread_mutex_t *lock, const volatile uint64_t *const hash)
Definition develop.c:1154
void dt_dev_configure_real(dt_develop_t *dev, int wd, int ht)
Definition develop.c:596
void dt_dev_process_preview_job(dt_develop_t *dev)
Definition develop.c:527
void dt_dev_masks_update_hash(dt_develop_t *dev)
Definition develop.c:1277
gboolean dt_dev_clip_roi(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height)
Clip the view to the ROI. WARNING: this must be done before any translation.
Definition develop.c:1342
dt_dev_rawoverexposed_colorscheme_t
Definition develop.h:65
@ DT_DEV_RAWOVEREXPOSED_RED
Definition develop.h:66
@ DT_DEV_RAWOVEREXPOSED_BLUE
Definition develop.h:68
@ DT_DEV_RAWOVEREXPOSED_BLACK
Definition develop.h:69
@ DT_DEV_RAWOVEREXPOSED_GREEN
Definition develop.h:67
void dt_dev_undo_end_record(dt_develop_t *dev)
Definition develop.c:1219
gboolean dt_dev_rescale_roi(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height)
Scale the ROI to fit within given width/height, centered.
Definition develop.c:1385
float dt_dev_get_zoom_scale(dt_develop_t *dev, gboolean preview)
Definition develop.c:562
float dt_dev_get_fit_scale(dt_develop_t *dev)
Get the scale factor to fit the image into the darkroom area. (scaling * natural_scale_on_processed_s...
Definition develop.c:1309
void dt_dev_modules_update_multishow(dt_develop_t *dev)
Definition develop.c:952
dt_develop_detail_mmask_t
Definition develop.h:109
@ DT_DEV_DETAIL_MASK_DEMOSAIC
Definition develop.h:112
@ DT_DEV_DETAIL_MASK_REQUIRED
Definition develop.h:111
@ DT_DEV_DETAIL_MASK_RAWPREPARE
Definition develop.h:113
@ DT_DEV_DETAIL_MASK_NONE
Definition develop.h:110
guint dt_dev_mask_history_overload(GList *dev_history, guint threshold)
Definition dev_history.c:914
int dt_dev_distort_transform(dt_develop_t *dev, float *points, size_t points_count)
Definition develop.c:1010
void dt_dev_masks_list_update(dt_develop_t *dev)
Definition develop.c:760
int dt_dev_load_image(dt_develop_t *dev, const int32_t imgid)
Definition develop.c:569
void dt_dev_reorder_gui_module_list(dt_develop_t *dev)
Definition develop.c:1190
uint64_t dt_dev_hash(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe)
Definition develop.c:1174
float dt_dev_exposure_get_exposure(dt_develop_t *dev)
Definition develop.c:710
void dt_dev_masks_list_remove(dt_develop_t *dev, int formid, int parentid)
Definition develop.c:765
void dt_dev_process_image(dt_develop_t *dev)
Definition develop.c:248
gchar * dt_history_item_get_name(const struct dt_iop_module_t *module)
Definition develop.c:982
void dt_dev_retrieve_full_pos(dt_develop_t *dev, const int px, const int py, float *mouse_x, float *mouse_y)
Get the pointer position from widget space to preview buffer space [0..1].
Definition develop.c:680
enum dt_develop_detail_mmask_t dt_develop_detail_mask_t
#define dt_pthread_rwlock_t
Definition dtpthread.h:334
unsigned __int64 uint64_t
Definition strptime.c:71
Definition develop.h:139
size_t height
Definition develop.h:142
uint64_t hash
Definition develop.h:143
size_t width
Definition develop.h:141
void * buffer
Definition develop.h:140
size_t bpp
Definition develop.h:145
const char * op
Definition develop.h:144
Definition pixelpipe_hb.h:46
struct dt_iop_module_t *struct dt_dev_pixelpipe_t * pipe
Definition pixelpipe_hb.h:48
uint64_t hash
Definition pixelpipe_hb.h:73
Definition pixelpipe_hb.h:126
Definition develop.h:130
struct dt_iop_module_t *float(* get_exposure)(struct dt_iop_module_t *exp)
Definition develop.h:132
float(* get_black)(struct dt_iop_module_t *exp)
Definition develop.h:133
Definition develop.h:150
void(* list_update)(struct dt_lib_module_t *self)
Definition develop.h:283
int32_t height
Definition develop.h:172
struct dt_develop_t::@22 iso_12646
int32_t gui_attached
Definition develop.h:153
GList * iop_order_list
Definition develop.h:210
dt_image_t image_storage
Definition develop.h:195
uint64_t history_hash
Definition develop.h:238
uint32_t(* get)(struct dt_lib_module_t *self)
Definition develop.h:254
uint32_t average_delay
Definition develop.h:156
struct dt_develop_t::@18::@27 masks
struct dt_develop_t::@18::@26 snapshot
int32_t orig_height
Definition develop.h:166
struct dt_lib_module_t *void(* set)(struct dt_lib_module_t *self, uint32_t group)
Definition develop.h:252
struct dt_develop_t::@23 profile
int iop_order_version
Definition develop.h:209
float x
Definition develop.h:184
dt_dev_rawoverexposed_colorscheme_t colorscheme
Definition develop.h:318
int32_t border_size
Definition develop.h:161
dt_backbuf_t display_histogram
Definition develop.h:232
uint32_t * histogram_pre_levels
Definition develop.h:216
GList * iop
Definition develop.h:204
gboolean request
Definition develop.h:272
struct dt_develop_t::@20 rawoverexposed
dt_backbuf_t output_histogram
Definition develop.h:231
struct dt_develop_t::@18::@25 modulegroups
int32_t history_end
Definition develop.h:199
gboolean wb_is_D65
Definition develop.h:294
struct dt_develop_t::@21 display
gboolean(* test_visible)(struct dt_lib_module_t *self, gchar *module)
Definition develop.h:264
void(* list_remove)(struct dt_lib_module_t *self, int formid, int parentid)
Definition develop.h:282
void(* update_visibility)(struct dt_lib_module_t *self)
Definition develop.h:262
int completed
Definition develop.h:346
struct dt_iop_module_t * gui_module
Definition develop.h:158
dt_pthread_rwlock_t history_mutex
Definition develop.h:198
void(* switch_group)(struct dt_lib_module_t *self, struct dt_iop_module_t *module)
Definition develop.h:260
dt_dev_proxy_exposure_t exposure
Definition develop.h:245
dt_clipping_preview_mode_t mode
Definition develop.h:308
uint32_t preview_average_delay
Definition develop.h:157
uint32_t(* get_activated)(struct dt_lib_module_t *self)
Definition develop.h:256
struct dt_develop_t::@19 overexposed
float brightness
Definition develop.h:326
int32_t orig_width
Definition develop.h:166
struct dt_lib_module_t *void(* list_change)(struct dt_lib_module_t *self)
Definition develop.h:281
gboolean forms_changed
Definition develop.h:224
GtkWidget * floating_window
Definition develop.h:302
struct dt_develop_t::@24 progress
gboolean(* test)(struct dt_lib_module_t *self, uint32_t group, uint32_t iop_group)
Definition develop.h:258
float lower
Definition develop.h:306
float y
Definition develop.h:184
struct dt_dev_pixelpipe_t * preview_pipe
Definition develop.h:187
struct dt_develop_t::@18 proxy
struct dt_masks_form_t * form_visible
Definition develop.h:225
GList * history
Definition develop.h:200
int mask_form_selected_id
Definition develop.h:349
GList * allprofile_info
Definition develop.h:213
gboolean darkroom_skip_mouse_events
Definition develop.h:350
GList * alliop
Definition develop.h:206
dt_aligned_pixel_t wb_coeffs
Definition develop.h:295
dt_dev_overexposed_colorscheme_t colorscheme
Definition develop.h:305
GList * allforms
Definition develop.h:228
dt_backbuf_t raw_histogram
Definition develop.h:230
float scaling
Definition develop.h:180
struct dt_masks_form_gui_t * form_gui
Definition develop.h:226
GtkWidget * button
Definition develop.h:302
void(* selection_change)(struct dt_lib_module_t *self, struct dt_iop_module_t *module, const int selectid, const int throw_event)
Definition develop.h:285
int border
Definition develop.h:327
gint drawing_timeout
Definition develop.h:352
uint32_t * histogram_pre_tonecurve
Definition develop.h:216
uint32_t histogram_pre_levels_max
Definition develop.h:217
GtkWidget * gamut_button
Definition develop.h:340
struct dt_iop_module_t * chroma_adaptation
Definition develop.h:291
gboolean mask_lock
Definition develop.h:351
gboolean enabled
Definition develop.h:304
int exit
Definition develop.h:155
int32_t iop_instance
Definition develop.h:203
uint64_t forms_hash
Definition develop.h:222
dt_dev_rawoverexposed_mode_t mode
Definition develop.h:317
const gchar * filename
Definition develop.h:273
uint32_t histogram_pre_tonecurve_max
Definition develop.h:217
float threshold
Definition develop.h:319
guint auto_save_timeout
Definition develop.h:235
struct dt_dev_pixelpipe_t * pipe
Definition develop.h:187
float upper
Definition develop.h:307
GtkWidget * softproof_button
Definition develop.h:340
int32_t width
Definition develop.h:172
GList * forms
Definition develop.h:220
gboolean loading_cache
Definition develop.h:354
float natural_scale
Definition develop.h:176
Definition common/image.h:195
Definition imageop.h:181
struct dt_develop_t * dev
Definition imageop.h:226
int iop_order
Definition imageop.h:195
Definition libs/lib.h:75
Definition masks.h:281
Definition masks.h:242
Definition darktable.h:608