Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
iop/drawlayer/conf.c
Go to the documentation of this file.
1/*
2 This file is part of the Ansel project.
3 Copyright (C) 2026 Aurélien PIERRE.
4
5 Ansel is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 Ansel is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/*
20 * drawlayer config subsystem (included directly by drawlayer.c)
21 *
22 * This file intentionally has no public header/API.
23 */
24
29#define DRAWLAYER_CONF_BASE "plugins/drawlayer/"
30#define DRAWLAYER_CONF_BRUSH_SHAPE DRAWLAYER_CONF_BASE "brush_shape"
31#define DRAWLAYER_CONF_BRUSH_MODE DRAWLAYER_CONF_BASE "brush_mode"
32#define DRAWLAYER_CONF_COLOR_R DRAWLAYER_CONF_BASE "color_r"
33#define DRAWLAYER_CONF_COLOR_G DRAWLAYER_CONF_BASE "color_g"
34#define DRAWLAYER_CONF_COLOR_B DRAWLAYER_CONF_BASE "color_b"
35#define DRAWLAYER_CONF_SOFTNESS DRAWLAYER_CONF_BASE "softness"
36#define DRAWLAYER_CONF_OPACITY DRAWLAYER_CONF_BASE "opacity"
37#define DRAWLAYER_CONF_FLOW DRAWLAYER_CONF_BASE "flow"
38#define DRAWLAYER_CONF_SPRINKLES DRAWLAYER_CONF_BASE "sprinkles"
39#define DRAWLAYER_CONF_SPRINKLE_SIZE DRAWLAYER_CONF_BASE "sprinkle_size"
40#define DRAWLAYER_CONF_SPRINKLE_COARSENESS DRAWLAYER_CONF_BASE "sprinkle_coarseness"
41#define DRAWLAYER_CONF_DISTANCE DRAWLAYER_CONF_BASE "distance"
42#define DRAWLAYER_CONF_SMOOTHING DRAWLAYER_CONF_BASE "smoothing"
43#define DRAWLAYER_CONF_SIZE DRAWLAYER_CONF_BASE "size"
44#define DRAWLAYER_CONF_PICK_SOURCE DRAWLAYER_CONF_BASE "pick_source"
45#define DRAWLAYER_CONF_HDR_EV DRAWLAYER_CONF_BASE "hdr_exposure"
46#define DRAWLAYER_CONF_MAP_PRESSURE_SIZE DRAWLAYER_CONF_BASE "map_pressure_size"
47#define DRAWLAYER_CONF_MAP_PRESSURE_OPACITY DRAWLAYER_CONF_BASE "map_pressure_opacity"
48#define DRAWLAYER_CONF_MAP_PRESSURE_FLOW DRAWLAYER_CONF_BASE "map_pressure_flow"
49#define DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS DRAWLAYER_CONF_BASE "map_pressure_softness"
50#define DRAWLAYER_CONF_MAP_TILT_SIZE DRAWLAYER_CONF_BASE "map_tilt_size"
51#define DRAWLAYER_CONF_MAP_TILT_OPACITY DRAWLAYER_CONF_BASE "map_tilt_opacity"
52#define DRAWLAYER_CONF_MAP_TILT_FLOW DRAWLAYER_CONF_BASE "map_tilt_flow"
53#define DRAWLAYER_CONF_MAP_TILT_SOFTNESS DRAWLAYER_CONF_BASE "map_tilt_softness"
54#define DRAWLAYER_CONF_MAP_ACCEL_SIZE DRAWLAYER_CONF_BASE "map_acceleration_size"
55#define DRAWLAYER_CONF_MAP_ACCEL_OPACITY DRAWLAYER_CONF_BASE "map_acceleration_opacity"
56#define DRAWLAYER_CONF_MAP_ACCEL_FLOW DRAWLAYER_CONF_BASE "map_acceleration_flow"
57#define DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS DRAWLAYER_CONF_BASE "map_acceleration_hardness"
58#define DRAWLAYER_CONF_PRESSURE_PROFILE DRAWLAYER_CONF_BASE "pressure_profile"
59#define DRAWLAYER_CONF_TILT_PROFILE DRAWLAYER_CONF_BASE "tilt_profile"
60#define DRAWLAYER_CONF_ACCEL_PROFILE DRAWLAYER_CONF_BASE "acceleration_profile"
61
64{
90 {
91 const gboolean migrated = dt_conf_key_exists(DRAWLAYER_CONF_BASE "map_speed_size")
92 ? dt_conf_get_bool(DRAWLAYER_CONF_BASE "map_speed_size")
93 : FALSE;
95 }
97 {
98 const gboolean migrated = dt_conf_key_exists(DRAWLAYER_CONF_BASE "map_speed_opacity")
99 ? dt_conf_get_bool(DRAWLAYER_CONF_BASE "map_speed_opacity")
100 : FALSE;
102 }
104 {
105 const gboolean migrated = dt_conf_key_exists(DRAWLAYER_CONF_BASE "map_speed_flow")
106 ? dt_conf_get_bool(DRAWLAYER_CONF_BASE "map_speed_flow")
107 : FALSE;
109 }
111 {
112 const gboolean migrated = dt_conf_key_exists(DRAWLAYER_CONF_BASE "map_speed_softness")
113 ? dt_conf_get_bool(DRAWLAYER_CONF_BASE "map_speed_softness")
114 : FALSE;
116 }
120}
121
128
135
137static float _conf_size(void)
138{
139 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_SIZE), 1.0f, 2048.0f);
140}
141
143static float _conf_opacity(void)
144{
145 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_OPACITY), 0.0f, 100.0f);
146}
147
149static float _conf_flow(void)
150{
151 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_FLOW), 0.0f, 100.0f);
152}
153
155static float _conf_sprinkles(void)
156{
157 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_SPRINKLES), 0.0f, 100.0f);
158}
159
161static float _conf_sprinkle_size(void)
162{
163 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_SPRINKLE_SIZE), 1.0f, 256.0f);
164}
165
168{
169 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_SPRINKLE_COARSENESS), 0.0f, 100.0f);
170}
171
173static float _conf_distance(void)
174{
175 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_DISTANCE), 0.0f, 100.0f);
176}
177
179static float _conf_smoothing(void)
180{
181 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_SMOOTHING), 0.0f, 100.0f);
182}
183
185static float _conf_softness(void)
186{
188}
189
191static float _conf_hardness(void)
192{
193 return 1.0f - _conf_softness();
194}
195
197static float _conf_hdr_exposure(void)
198{
199 return CLAMP(dt_conf_get_float(DRAWLAYER_CONF_HDR_EV), 0.0f, 4.0f);
200}
201
208
215
223
225static void _color_history_key(const int index, const char channel, char *key, const size_t key_size)
226{
227 g_snprintf(key, key_size, DRAWLAYER_CONF_BASE "color_history_%d_%c", index, channel);
228}
229
231static void _color_history_valid_key(const int index, char *key, const size_t key_size)
232{
233 g_snprintf(key, key_size, DRAWLAYER_CONF_BASE "color_history_%d_valid", index);
234}
235
238{
239 if(!g || !g->ui.widgets) return;
240
241 float history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3] = { { 0.0f } };
242 gboolean valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT] = { FALSE };
243
244 char key[128] = { 0 };
245 for(int i = 0; i < DT_DRAWLAYER_COLOR_HISTORY_COUNT; i++)
246 {
249
250 _color_history_key(i, 'r', key, sizeof(key));
251 history[i][0] = _clamp01(dt_conf_key_exists(key) ? dt_conf_get_float(key) : 0.0f);
252 _color_history_key(i, 'g', key, sizeof(key));
253 history[i][1] = _clamp01(dt_conf_key_exists(key) ? dt_conf_get_float(key) : 0.0f);
254 _color_history_key(i, 'b', key, sizeof(key));
255 history[i][2] = _clamp01(dt_conf_key_exists(key) ? dt_conf_get_float(key) : 0.0f);
256 }
257 dt_drawlayer_widgets_set_color_history(g->ui.widgets, history, valid);
258}
259
262{
263 if(!g || !g->ui.widgets) return;
264
265 float history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3] = { { 0.0f } };
266 gboolean valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT] = { FALSE };
267 dt_drawlayer_widgets_get_color_history(g->ui.widgets, history, valid);
268
269 char key[128] = { 0 };
270 for(int i = 0; i < DT_DRAWLAYER_COLOR_HISTORY_COUNT; i++)
271 {
273 dt_conf_set_bool(key, valid[i]);
274
275 _color_history_key(i, 'r', key, sizeof(key));
276 dt_conf_set_float(key, history[i][0]);
277 _color_history_key(i, 'g', key, sizeof(key));
278 dt_conf_set_float(key, history[i][1]);
279 _color_history_key(i, 'b', key, sizeof(key));
280 dt_conf_set_float(key, history[i][2]);
281 }
282}
283
285static void _remember_display_color(dt_iop_module_t *self, const float display_rgb[3])
286{
288 if(!g || !g->ui.widgets || !display_rgb) return;
289
290 if(!dt_drawlayer_widgets_push_color_history(g->ui.widgets, display_rgb)) return;
292 if(g->controls.color_swatch) gtk_widget_queue_draw(g->controls.color_swatch);
293}
294
296static void _apply_display_brush_color(dt_iop_module_t *self, const float display_rgb[3], const gboolean remember)
297{
299 if(!self || !g || !g->ui.widgets || !display_rgb) return;
300
304
305 dt_drawlayer_widgets_set_display_color(g->ui.widgets, display_rgb);
307
308 if(remember) _remember_display_color(self, display_rgb);
309
310 if(g->controls.color) gtk_widget_queue_draw(g->controls.color);
311 if(g->controls.color_swatch) gtk_widget_queue_draw(g->controls.color_swatch);
313}
314
317{
319 if(!g || !g->ui.widgets) return;
320
321 float display_rgb[3] = { 0.0f };
322 _conf_display_color(display_rgb);
323
324 dt_drawlayer_widgets_set_display_color(g->ui.widgets, display_rgb);
325 if(g->controls.color_swatch) gtk_widget_queue_draw(g->controls.color_swatch);
326}
327
329static void _sync_params_from_gui(dt_iop_module_t *self, const gboolean record_history)
330{
332 (void)record_history;
333 if(!g || (darktable.gui && darktable.gui->reset)) return;
334
346 if(g->controls.image_colorpicker_source)
347 dt_conf_set_int(DRAWLAYER_CONF_PICK_SOURCE, dt_bauhaus_combobox_get(g->controls.image_colorpicker_source));
349
350 dt_conf_set_bool(DRAWLAYER_CONF_MAP_PRESSURE_SIZE, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_pressure_size)));
351 dt_conf_set_bool(DRAWLAYER_CONF_MAP_PRESSURE_OPACITY, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_pressure_opacity)));
352 dt_conf_set_bool(DRAWLAYER_CONF_MAP_PRESSURE_FLOW, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_pressure_flow)));
353 dt_conf_set_bool(DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_pressure_softness)));
354
355 dt_conf_set_bool(DRAWLAYER_CONF_MAP_TILT_SIZE, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_tilt_size)));
356 dt_conf_set_bool(DRAWLAYER_CONF_MAP_TILT_OPACITY, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_tilt_opacity)));
357 dt_conf_set_bool(DRAWLAYER_CONF_MAP_TILT_FLOW, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_tilt_flow)));
358 dt_conf_set_bool(DRAWLAYER_CONF_MAP_TILT_SOFTNESS, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_tilt_softness)));
359
360 dt_conf_set_bool(DRAWLAYER_CONF_MAP_ACCEL_SIZE, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_accel_size)));
361 dt_conf_set_bool(DRAWLAYER_CONF_MAP_ACCEL_OPACITY, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_accel_opacity)));
362 dt_conf_set_bool(DRAWLAYER_CONF_MAP_ACCEL_FLOW, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_accel_flow)));
363 dt_conf_set_bool(DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g->controls.map_accel_softness)));
364
365 if(g->controls.pressure_profile) dt_conf_set_int(DRAWLAYER_CONF_PRESSURE_PROFILE, dt_bauhaus_combobox_get(g->controls.pressure_profile));
366 if(g->controls.tilt_profile) dt_conf_set_int(DRAWLAYER_CONF_TILT_PROFILE, dt_bauhaus_combobox_get(g->controls.tilt_profile));
367 if(g->controls.accel_profile) dt_conf_set_int(DRAWLAYER_CONF_ACCEL_PROFILE, dt_bauhaus_combobox_get(g->controls.accel_profile));
368}
#define FALSE
Definition ashift_lsd.c:158
float dt_bauhaus_slider_get(GtkWidget *widget)
Definition bauhaus.c:2769
int dt_bauhaus_combobox_get(GtkWidget *widget)
Definition bauhaus.c:1771
dt_drawlayer_brush_mode_t
Pixel blending behavior used while stamping a dab.
Definition brush.h:49
@ DT_DRAWLAYER_BRUSH_MODE_PAINT
Definition brush.h:50
@ DT_DRAWLAYER_BRUSH_MODE_SMUDGE
Definition brush.h:53
dt_drawlayer_brush_shape_t
Supported analytic fall-off profiles for brush alpha.
Definition brush.h:40
@ DT_DRAWLAYER_BRUSH_SHAPE_SIGMOIDAL
Definition brush.h:44
@ DT_DRAWLAYER_BRUSH_SHAPE_LINEAR
Definition brush.h:41
const float i
Definition colorspaces_inline_conversions.h:669
const float g
Definition colorspaces_inline_conversions.h:925
static dt_aligned_pixel_t rgb
Definition colorspaces_inline_conversions.h:530
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
char * key
Definition common/metadata.c:60
void dt_conf_set_bool(const char *name, int val)
Definition control/conf.c:158
int dt_conf_get_bool(const char *name)
Definition control/conf.c:364
int dt_conf_key_exists(const char *key)
Definition control/conf.c:556
void dt_conf_set_float(const char *name, float val)
Definition control/conf.c:148
float dt_conf_get_float(const char *name)
Definition control/conf.c:325
void dt_conf_set_int(const char *name, int val)
Definition control/conf.c:130
int dt_conf_get_int(const char *name)
Definition control/conf.c:241
void dt_control_queue_redraw_center()
request redraw of center window. This redraws the center view within a gdk critical section to preven...
Definition control.c:630
darktable_t darktable
Definition darktable.c:178
static float _clamp01(const float value)
Definition drawlayer.c:244
drawlayer_mapping_profile_t
Definition drawlayer.c:104
@ DRAWLAYER_PROFILE_INV_QUADRATIC
Definition drawlayer.c:110
@ DRAWLAYER_PROFILE_LINEAR
Definition drawlayer.c:105
drawlayer_pick_source_t
Definition drawlayer.c:138
@ DRAWLAYER_PICK_SOURCE_INPUT
Definition drawlayer.c:139
@ DRAWLAYER_PICK_SOURCE_OUTPUT
Definition drawlayer.c:140
static float _conf_smoothing(void)
Read and clamp configured smoothing parameter (%).
Definition iop/drawlayer/conf.c:179
#define DRAWLAYER_CONF_BRUSH_MODE
Definition iop/drawlayer/conf.c:31
#define DRAWLAYER_CONF_MAP_TILT_SIZE
Definition iop/drawlayer/conf.c:50
static void _ensure_gui_conf_defaults(void)
Ensure all drawlayer GUI config keys exist with sane defaults.
Definition iop/drawlayer/conf.c:63
#define DRAWLAYER_CONF_COLOR_R
Definition iop/drawlayer/conf.c:32
static float _conf_sprinkle_coarseness(void)
Read and clamp configured sprinkle octave mix (%).
Definition iop/drawlayer/conf.c:167
static drawlayer_mapping_profile_t _conf_mapping_profile(const char *key)
Read and clamp one mapping-profile enum key.
Definition iop/drawlayer/conf.c:210
static float _conf_hardness(void)
Derive hardness as complementary value of softness.
Definition iop/drawlayer/conf.c:191
#define DRAWLAYER_CONF_PICK_SOURCE
Definition iop/drawlayer/conf.c:44
#define DRAWLAYER_CONF_OPACITY
Definition iop/drawlayer/conf.c:36
#define DRAWLAYER_CONF_DISTANCE
Definition iop/drawlayer/conf.c:41
static float _conf_flow(void)
Read and clamp configured flow (%).
Definition iop/drawlayer/conf.c:149
static float _conf_softness(void)
Read configured softness in [0,1].
Definition iop/drawlayer/conf.c:185
static float _conf_size(void)
Read and clamp configured brush size (px).
Definition iop/drawlayer/conf.c:137
static void _conf_display_color(float rgb[3])
Read configured display RGB brush color.
Definition iop/drawlayer/conf.c:217
#define DRAWLAYER_CONF_MAP_PRESSURE_SIZE
Definition iop/drawlayer/conf.c:46
static float _conf_sprinkles(void)
Read and clamp configured sprinkles amount (%).
Definition iop/drawlayer/conf.c:155
#define DRAWLAYER_CONF_ACCEL_PROFILE
Definition iop/drawlayer/conf.c:60
#define DRAWLAYER_CONF_SPRINKLES
Definition iop/drawlayer/conf.c:38
static void _remember_display_color(dt_iop_module_t *self, const float display_rgb[3])
Push current display color to history and trigger swatch redraw.
Definition iop/drawlayer/conf.c:285
#define DRAWLAYER_CONF_SMOOTHING
Definition iop/drawlayer/conf.c:42
static float _conf_opacity(void)
Read and clamp configured stroke opacity (%).
Definition iop/drawlayer/conf.c:143
#define DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS
Definition iop/drawlayer/conf.c:49
#define DRAWLAYER_CONF_PRESSURE_PROFILE
Definition iop/drawlayer/conf.c:58
#define DRAWLAYER_CONF_MAP_TILT_FLOW
Definition iop/drawlayer/conf.c:52
static float _conf_distance(void)
Read and clamp configured distance/sampling parameter (%).
Definition iop/drawlayer/conf.c:173
#define DRAWLAYER_CONF_MAP_ACCEL_FLOW
Definition iop/drawlayer/conf.c:56
static drawlayer_pick_source_t _conf_pick_source(void)
Read and clamp color picker source selector.
Definition iop/drawlayer/conf.c:203
#define DRAWLAYER_CONF_BASE
Definition iop/drawlayer/conf.c:29
#define DRAWLAYER_CONF_MAP_ACCEL_SIZE
Definition iop/drawlayer/conf.c:54
#define DRAWLAYER_CONF_SPRINKLE_SIZE
Definition iop/drawlayer/conf.c:39
#define DRAWLAYER_CONF_MAP_PRESSURE_OPACITY
Definition iop/drawlayer/conf.c:47
#define DRAWLAYER_CONF_SIZE
Definition iop/drawlayer/conf.c:43
static void _color_history_key(const int index, const char channel, char *key, const size_t key_size)
Build config key for one color-history channel entry.
Definition iop/drawlayer/conf.c:225
static void _sync_color_picker_from_conf(dt_iop_module_t *self)
Refresh picker widgets from persisted config color.
Definition iop/drawlayer/conf.c:316
#define DRAWLAYER_CONF_FLOW
Definition iop/drawlayer/conf.c:37
#define DRAWLAYER_CONF_MAP_TILT_SOFTNESS
Definition iop/drawlayer/conf.c:53
static void _color_history_valid_key(const int index, char *key, const size_t key_size)
Build config key for one color-history validity entry.
Definition iop/drawlayer/conf.c:231
#define DRAWLAYER_CONF_TILT_PROFILE
Definition iop/drawlayer/conf.c:59
#define DRAWLAYER_CONF_MAP_ACCEL_OPACITY
Definition iop/drawlayer/conf.c:55
static void _load_color_history(dt_iop_drawlayer_gui_data_t *g)
Load persisted color-history stack from config into widgets state.
Definition iop/drawlayer/conf.c:237
#define DRAWLAYER_CONF_HDR_EV
Definition iop/drawlayer/conf.c:45
static dt_iop_drawlayer_brush_shape_t _conf_brush_shape(void)
Read and clamp configured brush shape.
Definition iop/drawlayer/conf.c:123
static void _sync_params_from_gui(dt_iop_module_t *self, const gboolean record_history)
Sync active GUI widget values back into persistent config keys.
Definition iop/drawlayer/conf.c:329
#define DRAWLAYER_CONF_MAP_PRESSURE_FLOW
Definition iop/drawlayer/conf.c:48
#define DRAWLAYER_CONF_COLOR_G
Definition iop/drawlayer/conf.c:33
static float _conf_hdr_exposure(void)
Read and clamp HDR picker exposure compensation (EV).
Definition iop/drawlayer/conf.c:197
#define DRAWLAYER_CONF_COLOR_B
Definition iop/drawlayer/conf.c:34
#define DRAWLAYER_CONF_MAP_TILT_OPACITY
Definition iop/drawlayer/conf.c:51
#define DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS
Definition iop/drawlayer/conf.c:57
static float _conf_sprinkle_size(void)
Read and clamp configured sprinkle feature size (px).
Definition iop/drawlayer/conf.c:161
static dt_iop_drawlayer_brush_mode_t _conf_brush_mode(void)
Read and clamp configured brush blend mode.
Definition iop/drawlayer/conf.c:130
static void _apply_display_brush_color(dt_iop_module_t *self, const float display_rgb[3], const gboolean remember)
Apply display-space brush color to conf, widgets and redraw.
Definition iop/drawlayer/conf.c:296
#define DRAWLAYER_CONF_SOFTNESS
Definition iop/drawlayer/conf.c:35
#define DRAWLAYER_CONF_SPRINKLE_COARSENESS
Definition iop/drawlayer/conf.c:40
#define DRAWLAYER_CONF_BRUSH_SHAPE
Definition iop/drawlayer/conf.c:30
static void _store_color_history(const dt_iop_drawlayer_gui_data_t *g)
Persist current widget color-history stack into config.
Definition iop/drawlayer/conf.c:261
void dt_drawlayer_ui_cursor_clear(dt_drawlayer_ui_state_t *state)
Definition runtime.c:1148
struct dt_gui_gtk_t * gui
Definition darktable.h:702
int32_t reset
Definition gtk.h:143
Definition runtime.h:282
Definition imageop.h:217
dt_iop_gui_data_t * gui_data
Definition imageop.h:277
gboolean dt_drawlayer_widgets_push_color_history(dt_drawlayer_widgets_t *widgets, const float display_rgb[3])
Push one color to history head if different from current head.
Definition widgets.c:421
void dt_drawlayer_widgets_set_color_history(dt_drawlayer_widgets_t *widgets, const float history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3], const gboolean valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT])
Replace full color-history content and validity flags.
Definition widgets.c:391
int dt_drawlayer_widgets_get_brush_profile_selection(const dt_drawlayer_widgets_t *widgets)
Read currently selected brush profile.
Definition widgets.c:730
void dt_drawlayer_widgets_get_color_history(const dt_drawlayer_widgets_t *widgets, float history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3], gboolean valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT])
Copy full color-history content and validity flags out.
Definition widgets.c:406
void dt_drawlayer_widgets_set_display_color(dt_drawlayer_widgets_t *widgets, const float display_rgb[3])
Set current color and synchronize picker internals.
Definition widgets.c:369
#define DT_DRAWLAYER_COLOR_HISTORY_COUNT
Definition widgets.h:30