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-2014 johannes hanika.
4 Copyright (C) 2010 Bruce Guenter.
5 Copyright (C) 2010-2011 Henrik Andersson.
6 Copyright (C) 2011 Robert Bieber.
7 Copyright (C) 2011 Rostyslav Pidgornyi.
8 Copyright (C) 2012-2014, 2020-2021 Aldric Renaudin.
9 Copyright (C) 2012, 2016, 2019-2021 Pascal Obry.
10 Copyright (C) 2012 Richard Wonka.
11 Copyright (C) 2012-2016, 2019 Tobias Ellinghaus.
12 Copyright (C) 2012, 2014, 2016-2017, 2019 Ulrich Pegelow.
13 Copyright (C) 2014-2015 Pedro Côrte-Real.
14 Copyright (C) 2014-2016, 2020 Roman Lebedev.
15 Copyright (C) 2016 Alexander V. Smal.
16 Copyright (C) 2017-2019 Edgardo Hoszowski.
17 Copyright (C) 2017, 2019, 2021 luzpaz.
18 Copyright (C) 2019-2020, 2022-2026 Aurélien PIERRE.
19 Copyright (C) 2020-2021 Chris Elston.
20 Copyright (C) 2020 Dan Torop.
21 Copyright (C) 2020-2021 Diederik Ter Rahe.
22 Copyright (C) 2020 GrahamByrnes.
23 Copyright (C) 2020-2022 Hanno Schwalm.
24 Copyright (C) 2020 Harold le Clément de Saint-Marcq.
25 Copyright (C) 2020-2021 Ralf Brown.
26 Copyright (C) 2021 Sakari Kapanen.
27 Copyright (C) 2022 Martin Bařinka.
28 Copyright (C) 2023, 2025 Alynx Zhou.
29 Copyright (C) 2023 Luca Zulberti.
30 Copyright (C) 2025-2026 Guillaume Stutin.
31
32 darktable is free software: you can redistribute it and/or modify
33 it under the terms of the GNU General Public License as published by
34 the Free Software Foundation, either version 3 of the License, or
35 (at your option) any later version.
36
37 darktable is distributed in the hope that it will be useful,
38 but WITHOUT ANY WARRANTY; without even the implied warranty of
39 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 GNU General Public License for more details.
41
42 You should have received a copy of the GNU General Public License
43 along with darktable. If not, see <http://www.gnu.org/licenses/>.
44*/
45
46#pragma once
47
48#include <cairo.h>
49#include <glib.h>
50#include <inttypes.h>
51#include <stddef.h>
52#include <stdint.h>
53
54#include "common/debug.h"
55#include "common/darktable.h"
56#include "common/dtpthread.h"
57#include "common/image.h"
58#include "control/settings.h"
59#include "develop/imageop.h"
60#include "develop/dev_history.h"
62
63
64struct dt_iop_module_t;
67struct dt_lib_module_t;
69
76
86
92
99
108
135
143
151
152struct dt_dev_pixelpipe_t;
153
154typedef struct dt_develop_t
155{
156 // != 0 if the gui should be notified of changes in hist stack and modules should be
157 // gui_init'ed.
158 int32_t gui_attached;
159
160 int exit; // set to 1 to close background darkroom pipeline threads
161 struct dt_iop_module_t *gui_module; // this module claims gui expose/event callbacks.
162
163 // The roi structure is used in darkroom GUI only.
164 // It defines the output size of the image backbuffer fitting
165 // into the darkroom center widget. This is critically used for all
166 // GUI <-> RAW pixel coordinates conversions. It should be recomputed
167 // ASAP when widget size changes.
168 struct {
169 // width = orig_width - 2 * border_size,
170 // height = orig_height - 2 * border_size,
171 // aka the surface actually covered by an image backbuffer (ROI)
172 // set by `dt_dev_configure()`
173 int32_t width, height;
174
175 // User-defined scaling factor, related to GUI zoom.
176 // Applies on top of natural scale
177 float scaling;
178
179 // Relative coordinates of the center of the ROI, expressed with
180 // regard to the complete image.
181 float x, y;
182
183 // darkroom border size: ISO 12646 borders or user-defined borders
184 int32_t border_size;
185
186 // Those are the darkroom main widget size, aka max paintable area.
187 // This size is allocated by Gtk from the window size minus all panels.
188 // It is NOT the size of the backbuffer/ROI.
189 int32_t orig_width, orig_height;
190
191 // Dimensions of the preview backbuffer, depending on the
192 // darkroom main widget size and DPI factor.
193 // These are computed early, before we have the actual buffer.
194 // Use them everywhere in GUI.
195 // They respect the final image aspect ratio and fit within
196 // the width x height bounding box.
197 int32_t preview_width, preview_height;
198
199 // Dimension of the main image backbuffer
200 // They are at lower than or equal to (width, height),
201 // the bounding box defined by the widget where main image fits.
202 // Since the ROI may clip the zoomed-in image, they don't respect
203 // the final image aspect ratio
204 int32_t main_width, main_height;
205
206 // natural scaling = MIN(dev->width / dev->roi.processed_width, dev->height / dev->roi.processed_height)
207 // aka ensure that image fits into widget minus margins/borders.
209
210 // Dimensions of the full-resolution RAW image
211 // being worked on.
212 int32_t raw_width, raw_height;
213
214 // Dimensions of the final processed image if we processed it full-resolution.
215 // This is used to get the final aspect ratio of an image,
216 // taking all cropping and distortions into account.
217 int32_t processed_width, processed_height;
218
219 // Conveniency state to check if all widget sizes are inited
220 gboolean gui_inited;
221
222 // Conveniency state to check if input (raw image) sizes are inited
223 gboolean raw_inited;
224
225 // Conveniency state to check if all output (backbuffer) sizes are inited
227
229
230 // image processing pipeline with caching
232 // Virtual preview-like pipeline used for geometry/ROI computations on the GUI thread.
233 // It mirrors preview_pipe history/nodes but never processes pixels.
234 // It is meant for fast access from the GUI mainthread without waiting for threads to return.
236
237 // image under consideration, which
238 // is copied each time an image is changed. this means we have some information
239 // always cached (might be out of sync, so stars are not reliable), but for the iops
240 // it's quite a convenience to access trivial stuff which is constant anyways without
241 // calling into the cache explicitly. this should never be accessed directly, but
242 // by the iop through the copy their respective pixelpipe holds, for thread-safety.
244
245 // Protect read & write to dev->history and dev->forms
246 // and other related stuff like history_end, hashes, etc.
248
249 // We don't always apply the full history to modules,
250 // this is the cursor where we stop the list.
251 // Note: history_end = number of history items,
252 // since we consider the 0th element to be the RAW image
253 // (no IOP, no history entry, no item on the GList).
254 // So the index of the history
255 // entry matching history_end is history_end - 1,
256 int32_t history_end;
257
258 // history stack
260
261 // operations pipeline
264 // iop's to be deleted
266
267 // iop order
270
271 // Undo tracking for history changes. This is managed by dt_dev_undo_start_record()
272 // / dt_dev_undo_end_record() and stores "before" snapshots until the outermost
273 // change completes.
278
279 // profiles info
281
282 // histogram for display.
285
286 // list of forms iop can use for masks or whatever
288
289 // integrity hash of forms
291 // forms have been added or removed or changed and need to be committed to history
294 // all forms to be linked here for cleanup:
296
297 // Mutex lock protecting masks, shapes, etc.
298 // aka dev->forms and dev->all_forms
300
301 dt_backbuf_t raw_histogram; // backbuf to prepare the raw histogram (before white balance)
302 dt_backbuf_t output_histogram; // backbuf to prepare the display-agnostic output histogram (in the middle of colorout)
303 dt_backbuf_t display_histogram; // backbuf to prepare the display-referred output histogram (at the far end of the pipe)
304
305 // Track history changes from C.
306 // This is updated when history is changed, read or written.
307 dt_atomic_uint64 history_hash;
308
309 // Darkroom pipelines are running fulltime in background until leaving darkroom.
310 // Set that to TRUE once they get shutdown.
312
346 struct
347 {
348 struct dt_iop_module_t *module;
351 int kind;
353 gboolean enabled;
357
366
368
372
373 /* proxy for communication between plugins and develop/darkroom */
374 struct
375 {
376 // snapshots plugin hooks
377 struct
378 {
379 // this flag is set by snapshot plugin to signal that expose of darkroom
380 // should store cairo surface as snapshot to disk using filename.
381 gboolean request;
382 const gchar *filename;
384
385 // masks plugin hooks
386 struct
387 {
388 struct dt_lib_module_t *module;
389 /* treview list refresh */
391 void (*list_remove)(struct dt_lib_module_t *self, int formid, int parentid);
393 /* selected forms change */
394 void (*selection_change)(struct dt_lib_module_t *self, struct dt_iop_module_t *module, const int selectid, const int throw_event);
396
397 // what is the ID of the module currently doing pipeline chromatic adaptation ?
398 // this is to prevent multiple modules/instances from doing white balance globally.
399 // only used to display warnings in GUI of modules that should probably not be doing white balance
401
402 // is the WB module using D65 illuminant and not doing full chromatic adaptation ?
403 gboolean wb_is_D65;
404 dt_aligned_pixel_t wb_coeffs;
405
407
408 // for the overexposure indicator
409 struct
410 {
411 GtkWidget *floating_window, *button; // yes, having gtk stuff in here is ugly. live with it.
412
413 gboolean enabled;
415 float lower;
416 float upper;
419
420 // for the raw overexposure indicator
421 struct
422 {
423 GtkWidget *floating_window, *button; // yes, having gtk stuff in here is ugly. live with it.
424
425 gboolean enabled;
430
431 struct
432 {
433 GtkWidget *floating_window, *button; // 10 years later, still ugly
434
438
439 // ISO 12646-compliant colour assessment conditions
440 struct
441 {
442 GtkWidget *button; // yes, ugliness is the norm. what did you expect ?
443 gboolean enabled;
445
446 // the display profile related things (softproof, gamut check, profiles ...)
447 struct
448 {
451
452 // progress bar
453 struct
454 {
455 int total, completed;
457
458 gboolean darkroom_skip_mouse_events; // skip mouse events for masks
459 gboolean mask_lock;
460
462
465
467{
469}
470
471static inline void dt_dev_set_history_hash(dt_develop_t *dev, const uint64_t history_hash)
472{
473 dt_atomic_set_uint64(&dev->history_hash, history_hash);
474}
475
476#ifdef __cplusplus
477extern "C" {
478#endif
479
480void dt_dev_init(dt_develop_t *dev, int32_t gui_attached);
483
490
491// Optionally prefetch `DT_MIPMAP_FULL`, then refresh dev->image_storage from the image cache.
492// Returns a status code to differentiate missing source image data from DB/cache failures.
494
495// Start background pipeline threads. They run fulltime until we close darkroom,
496// so no need to recall that
498
499dt_dev_image_storage_t dt_dev_load_image(dt_develop_t *dev, const int32_t imgid);
501int dt_dev_is_current_image(dt_develop_t *dev, int32_t imgid);
502
503void dt_dev_get_processed_size(const dt_develop_t *dev, int *procw, int *proch);
504
505float dt_dev_get_zoom_scale(const dt_develop_t *dev, gboolean preview);
506
507// Set all the params of a backbuffer at once
508void dt_dev_set_backbuf(dt_backbuf_t *backbuf, const int width, const int height, const size_t bpp,
509 const int64_t hash, const int64_t history_hash);
510
523void dt_dev_coordinates_widget_to_image_norm(dt_develop_t *dev, float *points, size_t num_points);
524void dt_dev_coordinates_image_norm_to_widget(dt_develop_t *dev, float *points, size_t num_points);
525void dt_dev_coordinates_image_norm_to_image_abs(dt_develop_t *dev, float *points, size_t num_points);
526void dt_dev_coordinates_image_abs_to_image_norm(dt_develop_t *dev, float *points, size_t num_points);
527void dt_dev_coordinates_raw_abs_to_raw_norm(dt_develop_t *dev, float *points, size_t num_points);
528void dt_dev_coordinates_raw_norm_to_raw_abs(dt_develop_t *dev, float *points, size_t num_points);
529void dt_dev_coordinates_image_norm_to_preview_abs(dt_develop_t *dev, float *points, size_t num_points);
530void dt_dev_coordinates_preview_abs_to_image_norm(dt_develop_t *dev, float *points, size_t num_points);
531void dt_dev_coordinates_image_abs_to_raw_norm(dt_develop_t *dev, float *points, size_t num_points);
532
544void dt_dev_retrieve_full_pos(dt_develop_t *dev, const int px, const int py, float *mouse_x, float *mouse_y);
545
546void dt_dev_configure_real(dt_develop_t *dev, int wd, int ht);
547#define dt_dev_configure(dev, wd, ht) DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_configure_real, (dev), (wd), (ht))
548
558void dt_dev_check_zoom_pos_bounds(dt_develop_t *dev, float *dev_x, float *dev_y, float *box_w, float *box_h);
559
560/*
561 * modulegroups helpers
562 */
569
571void dt_dev_snapshot_request(dt_develop_t *dev, const char *filename);
572
573/*
574 * masks plugin hooks
575 */
578void dt_dev_masks_list_remove(dt_develop_t *dev, int formid, int parentid);
579void dt_dev_masks_selection_change(dt_develop_t *dev, struct dt_iop_module_t *module, const int selectid, const int throw_event);
580
583
584/*
585 * multi instances
586 */
593
595gchar *dt_dev_get_multi_name(const struct dt_iop_module_t *module);
597gchar *dt_dev_get_masks_group_name(const struct dt_iop_module_t *module);
598gchar *dt_history_item_get_name(const struct dt_iop_module_t *module);
599gchar *dt_history_item_get_name_html(const struct dt_iop_module_t *module);
600
602gchar *dt_history_item_get_label(const struct dt_iop_module_t *module);
603
604
605/*
606 * distort functions
607 */
609int dt_dev_coordinates_raw_abs_to_image_abs(dt_develop_t *dev, float *points, size_t points_count);
611int dt_dev_coordinates_image_abs_to_raw_abs(dt_develop_t *dev, float *points, size_t points_count);
613int dt_dev_distort_transform_plus(dt_develop_t *dev, const struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction,
614 float *points, size_t points_count);
617 const int transf_direction, float *points, size_t points_count);
619int dt_dev_distort_backtransform_plus(dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction,
620 float *points, size_t points_count);
621
624 struct dt_iop_module_t *module);
625
626/*
627 * history undo support helpers for darkroom
628 */
629
630/* all history change must be enclosed into a start / end call */
633
634// Getter and setter for global mask lock (GUI)
635// Can be overriden by key accels
636
638void dt_masks_set_lock_mode(dt_develop_t *dev, gboolean mode);
639
640// Count all the mask forms used x history entries, up to a certain threshold.
641// Stop counting when the threshold is reached, for performance.
642guint dt_dev_mask_history_overload(GList *dev_history, guint threshold);
643
644// Write the `darktable|changed` tag on the current picture upon history modification
645void dt_dev_append_changed_tag(const int32_t imgid);
646
647// This needs to run after `dt_dev_pixelpipe_get_roi_out()` so `pipe->processed_width`
648// and `pipe->processed_height` are defined.
649// Natural scale is the rescaling factor such that the full-res pipeline output
650// (real or virtual) fits within darkroom widget area (minus borders/margins)
652
653// Get the final size of the main thumbnail that fits within darkroom central widget
654// Needs to be recomputed when module parameters change (for modules changing ROI)
655// or when the widget is resized.
657
670 const struct dt_iop_roi_t *roi);
671
680
689
698
699// Get the current zoom factor ( scaling * natural_scale )
700float dt_dev_get_zoom_level(const dt_develop_t *dev);
701
702// Reset darkroom ROI scaling and position
704
715gboolean dt_dev_clip_roi(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height);
716
726gboolean dt_dev_rescale_roi(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height);
727
737gboolean dt_dev_rescale_roi_to_input(dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height);
738
746
754// Update the mouse bounding box size according to current zoom level, dpp and DPI.
756
757#ifdef __cplusplus
758}
759#endif
760
761// clang-format off
762// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
763// vim: shiftwidth=2 expandtab tabstop=2 cindent
764// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
765// clang-format on
uint64_t dt_atomic_get_uint64(const dt_atomic_uint64 *var)
Definition atomic.h:68
void dt_atomic_set_uint64(dt_atomic_uint64 *var, uint64_t value)
Definition atomic.h:67
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
const float threshold
Definition colorspaces_inline_conversions.h:340
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void dt_dev_masks_list_change(dt_develop_t *dev)
Definition develop.c:1051
void dt_dev_coordinates_image_abs_to_image_norm(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:947
float dt_dev_get_natural_scale(dt_develop_t *dev)
Definition develop.c:1567
void dt_dev_get_processed_size(const dt_develop_t *dev, int *procw, int *proch)
Definition develop.c:868
static uint64_t dt_dev_get_history_hash(const dt_develop_t *dev)
Definition develop.h:466
void dt_masks_set_lock_mode(dt_develop_t *dev, gboolean mode)
Definition develop.c:1519
dt_dev_overexposed_colorscheme_t
Definition develop.h:71
@ DT_DEV_OVEREXPOSED_PURPLEGREEN
Definition develop.h:74
@ DT_DEV_OVEREXPOSED_REDBLUE
Definition develop.h:73
@ DT_DEV_OVEREXPOSED_BLACKWHITE
Definition develop.h:72
void dt_dev_coordinates_preview_abs_to_image_norm(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:1017
int dt_dev_get_thumbnail_size(dt_develop_t *dev)
Definition develop.c:341
int dt_dev_coordinates_raw_abs_to_image_abs(dt_develop_t *dev, float *points, size_t points_count)
Definition develop.c:1385
void dt_dev_coordinates_raw_norm_to_raw_abs(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:981
void dt_dev_cleanup(dt_develop_t *dev)
Definition develop.c:189
void dt_dev_module_remove(dt_develop_t *dev, struct dt_iop_module_t *module)
Definition develop.c:1153
dt_dev_overlay_colors_t
Definition develop.h:78
@ DT_DEV_OVERLAY_CYAN
Definition develop.h:83
@ DT_DEV_OVERLAY_YELLOW
Definition develop.h:82
@ DT_DEV_OVERLAY_RED
Definition develop.h:80
@ DT_DEV_OVERLAY_GREEN
Definition develop.h:81
@ DT_DEV_OVERLAY_GRAY
Definition develop.h:79
@ DT_DEV_OVERLAY_MAGENTA
Definition develop.h:84
dt_dev_pixelpipe_display_mask_t
Definition develop.h:110
@ DT_DEV_PIXELPIPE_DISPLAY_a
Definition develop.h:116
@ DT_DEV_PIXELPIPE_DISPLAY_OUTPUT
Definition develop.h:114
@ DT_DEV_PIXELPIPE_DISPLAY_G
Definition develop.h:119
@ DT_DEV_PIXELPIPE_DISPLAY_L
Definition develop.h:115
@ DT_DEV_PIXELPIPE_DISPLAY_CHANNEL
Definition develop.h:113
@ DT_DEV_PIXELPIPE_DISPLAY_ANY
Definition develop.h:132
@ DT_DEV_PIXELPIPE_DISPLAY_LCH_h
Definition develop.h:123
@ DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_hz
Definition develop.h:129
@ DT_DEV_PIXELPIPE_DISPLAY_HSL_H
Definition develop.h:124
@ DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU_MONO
Definition develop.h:131
@ DT_DEV_PIXELPIPE_DISPLAY_HSL_S
Definition develop.h:125
@ DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Cz
Definition develop.h:128
@ DT_DEV_PIXELPIPE_DISPLAY_LCH_C
Definition develop.h:122
@ DT_DEV_PIXELPIPE_DISPLAY_b
Definition develop.h:117
@ DT_DEV_PIXELPIPE_DISPLAY_STICKY
Definition develop.h:133
@ DT_DEV_PIXELPIPE_DISPLAY_MASK
Definition develop.h:112
@ DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Jz
Definition develop.h:127
@ DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU
Definition develop.h:130
@ DT_DEV_PIXELPIPE_DISPLAY_NONE
Definition develop.h:111
@ DT_DEV_PIXELPIPE_DISPLAY_HSL_l
Definition develop.h:126
@ DT_DEV_PIXELPIPE_DISPLAY_GRAY
Definition develop.h:121
@ DT_DEV_PIXELPIPE_DISPLAY_B
Definition develop.h:120
@ DT_DEV_PIXELPIPE_DISPLAY_R
Definition develop.h:118
int dt_dev_distort_transform_plus(dt_develop_t *dev, const struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
dt_dev_transform_direction_t
Definition develop.h:101
@ DT_DEV_TRANSFORM_DIR_BACK_EXCL
Definition develop.h:106
@ DT_DEV_TRANSFORM_DIR_BACK_INCL
Definition develop.h:105
@ DT_DEV_TRANSFORM_DIR_FORW_INCL
Definition develop.h:103
@ DT_DEV_TRANSFORM_DIR_ALL
Definition develop.h:102
@ DT_DEV_TRANSFORM_DIR_FORW_EXCL
Definition develop.h:104
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:1585
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:1446
void dt_dev_append_changed_tag(const int32_t imgid)
Definition develop.c:1542
dt_dev_image_storage_t dt_dev_load_image(dt_develop_t *dev, const int32_t imgid)
Definition develop.c:782
void dt_dev_coordinates_image_norm_to_preview_abs(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:1002
float dt_dev_get_zoom_level(const dt_develop_t *dev)
Definition develop.c:1590
void dt_dev_coordinates_image_norm_to_widget(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:905
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:1066
void dt_dev_init(dt_develop_t *dev, int32_t gui_attached)
Definition develop.c:129
int dt_dev_is_current_image(dt_develop_t *dev, int32_t imgid)
Definition develop.c:1034
void dt_dev_undo_start_record(dt_develop_t *dev)
Definition develop.c:1484
dt_dev_rawoverexposed_mode_t
Definition develop.h:87
@ DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR
Definition develop.h:90
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA
Definition develop.h:88
@ DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID
Definition develop.h:89
void dt_dev_snapshot_request(dt_develop_t *dev, const char *filename)
Definition develop.c:1073
void dt_dev_modulegroups_update_visibility(dt_develop_t *dev)
Definition develop.c:1045
gboolean dt_masks_get_lock_mode(dt_develop_t *dev)
Definition develop.c:1507
gchar * dt_history_item_get_label(const struct dt_iop_module_t *module)
Definition develop.c:1319
gchar * dt_history_item_get_name_html(const struct dt_iop_module_t *module)
Definition develop.c:1369
void dt_dev_modulegroups_switch(dt_develop_t *dev, struct dt_iop_module_t *module)
Definition develop.c:1039
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:833
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:1667
int dt_dev_distort_transform_locked(dt_develop_t *dev, const struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
dt_clipping_preview_mode_t
Definition develop.h:145
@ DT_CLIPPING_PREVIEW_ANYRGB
Definition develop.h:147
@ DT_CLIPPING_PREVIEW_GAMUT
Definition develop.h:146
@ DT_CLIPPING_PREVIEW_SATURATION
Definition develop.h:149
@ DT_CLIPPING_PREVIEW_LUMINANCE
Definition develop.h:148
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:1453
void dt_dev_reset_roi(dt_develop_t *dev)
Definition develop.c:1596
struct dt_iop_module_t * dt_dev_module_duplicate(dt_develop_t *dev, struct dt_iop_module_t *base)
Definition develop.c:1081
GList * dt_dev_load_modules(dt_develop_t *dev)
Definition develop.c:99
void dt_dev_set_backbuf(dt_backbuf_t *backbuf, const int width, const int height, const size_t bpp, const int64_t hash, const int64_t history_hash)
Definition develop.c:1709
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:1657
gboolean dt_dev_pixelpipe_has_preview_output(const dt_develop_t *dev, const struct dt_dev_pixelpipe_t *pipe, const struct dt_iop_roi_t *roi)
Tell whether a GUI-attached pipe currently targets the darkroom preview-sized output.
gboolean dt_dev_pipelines_share_preview_output(dt_develop_t *dev)
Tell whether the darkroom main and preview pipes currently target the same GUI output.
Definition develop.c:462
void dt_dev_configure_real(dt_develop_t *dev, int wd, int ht)
Definition develop.c:817
void dt_dev_masks_update_hash(dt_develop_t *dev)
Definition develop.c:1551
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:1604
static void dt_dev_set_history_hash(dt_develop_t *dev, const uint64_t history_hash)
Definition develop.h:471
dt_dev_rawoverexposed_colorscheme_t
Definition develop.h:93
@ DT_DEV_RAWOVEREXPOSED_RED
Definition develop.h:94
@ DT_DEV_RAWOVEREXPOSED_BLUE
Definition develop.h:96
@ DT_DEV_RAWOVEREXPOSED_BLACK
Definition develop.h:97
@ DT_DEV_RAWOVEREXPOSED_GREEN
Definition develop.h:95
int dt_dev_coordinates_image_abs_to_raw_abs(dt_develop_t *dev, float *points, size_t points_count)
Definition develop.c:1390
void dt_dev_undo_end_record(dt_develop_t *dev)
Definition develop.c:1495
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:1647
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:1577
dt_dev_image_storage_t dt_dev_ensure_image_storage(dt_develop_t *dev, const int32_t imgid)
Definition develop.c:742
dt_dev_image_storage_t
Definition develop.h:485
@ DT_DEV_IMAGE_STORAGE_DB_NOT_READ
Definition develop.h:488
@ DT_DEV_IMAGE_STORAGE_OK
Definition develop.h:486
@ DT_DEV_IMAGE_STORAGE_MIPMAP_NOT_FOUND
Definition develop.h:487
void dt_dev_modules_update_multishow(dt_develop_t *dev)
Definition develop.c:1251
dt_develop_detail_mmask_t
Definition develop.h:137
@ DT_DEV_DETAIL_MASK_DEMOSAIC
Definition develop.h:140
@ DT_DEV_DETAIL_MASK_REQUIRED
Definition develop.h:139
@ DT_DEV_DETAIL_MASK_RAWPREPARE
Definition develop.h:141
@ DT_DEV_DETAIL_MASK_NONE
Definition develop.h:138
void dt_dev_coordinates_image_norm_to_image_abs(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:932
guint dt_dev_mask_history_overload(GList *dev_history, guint threshold)
Definition dev_history.c:1113
gchar * dt_dev_get_masks_group_name(const struct dt_iop_module_t *module)
Definition develop.c:1340
void dt_dev_coordinates_widget_to_image_norm(dt_develop_t *dev, float *points, size_t num_points)
Coordinate conversion helpers between widget, normalized image, and absolute image spaces.
Definition develop.c:880
void dt_dev_update_mouse_effect_radius(dt_develop_t *dev)
Convert absolute output-image coordinates to input image space by calling dt_dev_coordinates_image_ab...
Definition develop.c:1693
void dt_dev_masks_list_update(dt_develop_t *dev)
Definition develop.c:1056
void dt_dev_reorder_gui_module_list(dt_develop_t *dev)
Definition develop.c:1468
gchar * dt_dev_get_multi_name(const struct dt_iop_module_t *module)
Definition develop.c:1332
void dt_dev_masks_list_remove(dt_develop_t *dev, int formid, int parentid)
Definition develop.c:1061
float dt_dev_get_zoom_scale(const dt_develop_t *dev, gboolean preview)
Definition develop.c:775
void dt_dev_coordinates_raw_abs_to_raw_norm(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:964
void dt_dev_coordinates_image_abs_to_raw_norm(dt_develop_t *dev, float *points, size_t num_points)
Definition develop.c:996
gchar * dt_history_item_get_name(const struct dt_iop_module_t *module)
Definition develop.c:1354
void dt_dev_retrieve_full_pos(dt_develop_t *dev, const int px, const int py, float *mouse_x, float *mouse_y)
Get a point position from widget space to preview buffer space [0..1].
enum dt_develop_detail_mmask_t dt_develop_detail_mask_t
void dt_dev_start_all_pipelines(dt_develop_t *dev)
Definition develop.c:706
#define dt_pthread_rwlock_t
Definition dtpthread.h:389
int bpp
Definition imageio/format/pdf.c:88
struct _GtkWidget GtkWidget
Definition splash.h:29
unsigned __int64 uint64_t
Definition strptime.c:74
Definition pixelpipe_hb.h:187
Definition colorpicker.h:53
Definition pixelpipe_hb.h:95
Definition pixelpipe_hb.h:216
Definition develop.h:155
void(* list_update)(struct dt_lib_module_t *self)
Definition develop.h:392
int32_t height
Definition develop.h:173
int32_t gui_attached
Definition develop.h:158
cairo_surface_t * image_surface
Definition develop.h:461
GList * iop_order_list
Definition develop.h:269
int undo_history_before_end
Definition develop.h:276
struct dt_develop_t::@25 profile
dt_image_t image_storage
Definition develop.h:243
int picker_cst
Definition develop.h:352
struct dt_develop_t::@19 color_picker
Authoritative darkroom color-picker state.
struct dt_develop_t::@23 display
int32_t orig_height
Definition develop.h:189
struct dt_colorpicker_sample_t * primary_sample
Definition develop.h:358
int iop_order_version
Definition develop.h:268
GList * undo_history_before_snapshot
Definition develop.h:275
float x
Definition develop.h:181
gboolean output_inited
Definition develop.h:226
dt_dev_rawoverexposed_colorscheme_t colorscheme
Definition develop.h:427
int32_t border_size
Definition develop.h:184
dt_backbuf_t display_histogram
Definition develop.h:303
uint32_t * histogram_pre_levels
Definition develop.h:283
GList * iop
Definition develop.h:263
gboolean request
Definition develop.h:381
gboolean update_pending
Definition develop.h:354
int32_t raw_height
Definition develop.h:212
dt_backbuf_t output_histogram
Definition develop.h:302
int32_t preview_height
Definition develop.h:197
int32_t history_end
Definition develop.h:256
int kind
Definition develop.h:351
GList * undo_history_before_iop_order_list
Definition develop.h:277
GtkWidget * widget
Definition develop.h:350
gboolean wb_is_D65
Definition develop.h:403
struct dt_develop_t::@24 iso_12646
struct dt_iop_module_t * pending_module
Definition develop.h:369
gboolean restrict_histogram
Definition develop.h:363
int statistic
Definition develop.h:364
void(* list_remove)(struct dt_lib_module_t *self, int formid, int parentid)
Definition develop.h:391
int completed
Definition develop.h:455
struct dt_iop_module_t * gui_module
Definition develop.h:161
dt_pthread_rwlock_t history_mutex
Definition develop.h:247
GSList * samples
Definition develop.h:359
gboolean live_samples_enabled
Definition develop.h:362
dt_clipping_preview_mode_t mode
Definition develop.h:417
gboolean gui_inited
Definition develop.h:220
struct dt_develop_t::@20::@27 snapshot
float brightness
Definition develop.h:435
dt_atomic_uint64 history_hash
Definition develop.h:307
struct dt_lib_module_t *void(* list_change)(struct dt_lib_module_t *self)
Definition develop.h:390
gboolean forms_changed
Definition develop.h:292
GtkWidget * floating_window
Definition develop.h:411
float lower
Definition develop.h:415
float y
Definition develop.h:181
struct dt_dev_pixelpipe_t * preview_pipe
Definition develop.h:231
gboolean pipelines_started
Definition develop.h:311
GList * history
Definition develop.h:259
struct dt_dev_pixelpipe_t * virtual_pipe
Definition develop.h:235
GList * allprofile_info
Definition develop.h:280
gboolean darkroom_skip_mouse_events
Definition develop.h:458
GList * alliop
Definition develop.h:265
dt_aligned_pixel_t wb_coeffs
Definition develop.h:404
struct dt_iop_module_t *struct dt_iop_color_picker_t * picker
Definition develop.h:349
dt_dev_overexposed_colorscheme_t colorscheme
Definition develop.h:414
GList * allforms
Definition develop.h:295
dt_backbuf_t raw_histogram
Definition develop.h:301
float scaling
Definition develop.h:177
struct dt_masks_form_gui_t * form_gui
Definition develop.h:293
struct dt_develop_t::@20::@28 masks
GtkWidget * button
Definition develop.h:411
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:394
int border
Definition develop.h:436
struct dt_colorpicker_sample_t * selected_sample
Definition develop.h:360
struct dt_develop_t::@20 proxy
uint32_t * histogram_pre_tonecurve
Definition develop.h:283
guint refresh_idle_source
Definition develop.h:356
uint32_t histogram_pre_levels_max
Definition develop.h:284
int32_t processed_height
Definition develop.h:217
struct dt_dev_pixelpipe_t * pending_pipe
Definition develop.h:370
struct dt_lib_module_t * histogram_module
Definition develop.h:365
GtkWidget * gamut_button
Definition develop.h:449
struct dt_iop_module_t * chroma_adaptation
Definition develop.h:400
gboolean mask_lock
Definition develop.h:459
gboolean enabled
Definition develop.h:353
int exit
Definition develop.h:160
int32_t iop_instance
Definition develop.h:262
dt_pthread_rwlock_t masks_mutex
Definition develop.h:299
uint64_t forms_hash
Definition develop.h:290
dt_dev_rawoverexposed_mode_t mode
Definition develop.h:426
struct dt_develop_t::@22 rawoverexposed
const gchar * filename
Definition develop.h:382
uint32_t histogram_pre_tonecurve_max
Definition develop.h:284
float threshold
Definition develop.h:428
struct dt_develop_t::@26 progress
uint64_t piece_hash
Definition develop.h:367
gboolean raw_inited
Definition develop.h:223
struct dt_dev_pixelpipe_t * pipe
Definition develop.h:231
float upper
Definition develop.h:416
GtkWidget * softproof_button
Definition develop.h:449
gboolean display_samples
Definition develop.h:361
struct dt_develop_t::@18 roi
GList * forms
Definition develop.h:287
int undo_history_depth
Definition develop.h:274
struct dt_develop_t::@21 overexposed
gboolean recompute_requested
Definition develop.h:355
gboolean loading_cache
Definition develop.h:463
int32_t main_height
Definition develop.h:204
float natural_scale
Definition develop.h:208
Definition common/image.h:247
Definition color_picker_proxy.h:50
Definition imageop.h:216
struct dt_develop_t * dev
Definition imageop.h:261
int iop_order
Definition imageop.h:230
Definition imageop.h:67
Definition libs/lib.h:78
Definition masks.h:427