Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
display.c
Go to the documentation of this file.
1/*
2 This file is part of the Ansel project.
3 Copyright (C) 2023, 2025 Alynx Zhou.
4 Copyright (C) 2023, 2025-2026 Aurélien PIERRE.
5 Copyright (C) 2023 Luca Zulberti.
6 Copyright (C) 2026 Guillaume Stutin.
7
8 Ansel is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 Ansel is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
20*/
22#include "common/conf.h"
23#include "caches/mipmap_cache.h"
24#include "common/collection.h"
25#include "control/control.h"
27#include "develop/develop.h"
28#include "gui/actions/menu.h"
29#include "gui/application.h"
31#include "views/view.h"
32
33#include "gui/window_manager.h"
34
35#include <gtk/gtk.h>
36#include "control/signal.h"
37
38
41{
42 GtkWidget *widget = dt_gui_main_window();
43 return gdk_window_get_state(gtk_widget_get_window(widget)) & GDK_WINDOW_STATE_FULLSCREEN;
44}
45
46static gboolean full_screen_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
47{
49
51 {
52 gtk_window_unfullscreen(GTK_WINDOW(window));
53
54#ifdef GDK_WINDOWING_QUARTZ
55 // workaround for GTK Quartz backend bug
56 gtk_window_set_title(GTK_WINDOW(window), "Ansel");
57#endif
58
59 // Hide window controls
61 }
62 else
63 {
64 gtk_window_fullscreen(GTK_WINDOW(window));
65
66#ifdef GDK_WINDOWING_QUARTZ
67 // workaround for GTK Quartz backend bug
68 gtk_window_set_title(GTK_WINDOW(window), "Ansel Preview");
69#endif
70
71 // Show window controls
73 }
74
75#ifdef GDK_WINDOWING_QUARTZ
76 // Mac OS workaround: always re-anchor the window to the bottom of the screen
77 GdkWindow *win = gtk_widget_get_window(window);
78 GdkDisplay *display = gtk_widget_get_display(window);
79 GdkMonitor *monitor = gdk_display_get_monitor_at_window(display, win);
80 GdkRectangle geometry;
81 gdk_monitor_get_geometry(monitor, &geometry);
82
83 int w, h;
84 gtk_window_get_size(GTK_WINDOW(window), &w, &h);
85 gtk_window_move(GTK_WINDOW(window), geometry.x + geometry.width - w, geometry.y + geometry.height - h);
86#endif
87
89
90 return TRUE;
91}
92
94static gboolean _panel_is_visible(dt_ui_panel_t panel)
95{
96 gchar *key = panels_get_view_path("panel_collaps_state");
98 {
99 dt_free(key);
100 return FALSE;
101 }
102 key = panels_get_panel_path(panel, "_visible");
103 const gboolean ret = dt_conf_get_bool(key);
104 dt_free(key);
105 return ret;
106}
107
108static gboolean _toggle_side_borders_accel_callback(GtkAccelGroup *accel_group, GObject *accelerable, guint keyval,
109 GdkModifierType modifier, gpointer data)
110{
112
113 /* trigger invalidation of centerview to reprocess pipe */
115 return TRUE;
116}
117
119{
120 gchar *key = panels_get_view_path("panel_collaps_state");
121 const uint32_t state = dt_conf_get_int(key);
122
123 if(state) dt_conf_set_int(key, 0);
124 else dt_conf_set_int(key, 1);
125
127 dt_free(key);
128}
129
130void dt_ui_panel_show(dt_ui_t *ui, const dt_ui_panel_t p, gboolean show, gboolean write)
131{
132 g_return_if_fail(GTK_IS_WIDGET(ui->panels[p]));
133
134 // for left and right sides, panels are inside a gtkoverlay
135 GtkWidget *over_panel = NULL;
137 over_panel = gtk_widget_get_parent(ui->panels[p]);
138
139 if(show)
140 {
141 gtk_widget_show(ui->panels[p]);
142 if(over_panel) gtk_widget_show(over_panel);
143
145 {
146 const int32_t imgid = dt_view_active_images_get_first();
147 if(imgid > UNKNOWN_IMAGE)
148 {
152 g_idle_add((GSourceFunc)dt_thumbtable_scroll_to_selection, ui->thumbtable_filmstrip);
153 }
154 }
155 }
156 else
157 {
158 gtk_widget_hide(ui->panels[p]);
159 if(over_panel) gtk_widget_hide(over_panel);
160 }
161
162 if(write)
163 {
164 gchar *key;
165 if(show)
166 {
167 // we reset the collaps_panel value if we show a panel
168 key = panels_get_view_path("panel_collaps_state");
169 if(dt_conf_get_int(key) != 0)
170 {
172 dt_free(key);
173 // we ensure that all panels state are recorded as hidden
174 for(int k = 0; k < DT_UI_PANEL_SIZE; k++)
175 {
176 key = panels_get_panel_path(k, "_visible");
178 dt_free(key);
179 }
180 }
181 else
182 dt_free(key);
183 key = panels_get_panel_path(p, "_visible");
184 dt_conf_set_bool(key, show);
185 dt_free(key);
186 }
187 else
188 {
189 // if it was the last visible panel, we set collaps_panel value instead
190 // so collapsing panels after will have an effect
191 gboolean collapse = TRUE;
192 for(int k = 0; k < DT_UI_PANEL_SIZE; k++)
193 {
194 if(k != p && dt_ui_panel_visible(ui, k))
195 {
196 collapse = FALSE;
197 break;
198 }
199 }
200
201 if(collapse)
202 {
203 key = panels_get_view_path("panel_collaps_state");
205 dt_free(key);
206 }
207 else
208 {
209 key = panels_get_panel_path(p, "_visible");
210 dt_conf_set_bool(key, show);
211 dt_free(key);
212 }
213 }
214 }
215}
216
218{
219 g_return_val_if_fail(GTK_IS_WIDGET(ui->panels[p]), FALSE);
220 // gtk_widget_get_visible() only reflects this widget's own visible flag. For the bottom
221 // (filmstrip) panel, dt_thumbtable_show()/_hide() (called unconditionally from every view's
222 // enter()/leave(), bypassing dt_ui_panel_show()) only ever touch ui->panels[DT_UI_PANEL_BOTTOM]
223 // itself, never its wrapping GtkOverlay ("over" in _ui_init_panel_bottom()) that dt_ui_panel_show()
224 // shows/hides together with it. That can leave the panel's own flag TRUE while its ancestor stays
225 // hidden -- genuinely invisible on screen. gtk_widget_is_visible() walks the ancestor chain, so it
226 // reports actual on-screen visibility instead.
227 return gtk_widget_is_visible(ui->panels[p]);
228}
229
230
231static gboolean panel_left_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
232{
234 return TRUE;
235}
236
241
242static gboolean panel_top_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
243{
245 return TRUE;
246}
247
252
254{
255 // Filmstrip is not visible in lighttable
257 return (view && strcmp(view->module_name, "lighttable"));
258}
259
260
261static gboolean panel_right_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
262{
265
266 return TRUE;
267}
268
273
274static gboolean filmstrip_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
275{
278
279 return TRUE;
280}
281
286
287static gboolean profile_checked_callback(GtkWidget *widget)
288{
290 if(IS_NULL_PTR(prof)) return FALSE;
291
294
295 return (prof->type == settings.display_type
296 && (prof->type != DT_COLORSPACE_FILE || !strcmp(prof->filename, settings.display_filename)));
297}
298
299static gboolean profile_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
300{
301 const dt_colorprofile_desc_t *pp = (const dt_colorprofile_desc_t *)get_custom_data(GTK_WIDGET(user_data));
302 if(IS_NULL_PTR(pp)) return TRUE;
303
304 /* The setter owns the lock, the changed decision and the transform rebuild. pp comes
305 * straight from the menu item, which was built from the profile list, so "not found" is
306 * not reachable here -- re-picking the active entry is simply a no-op. */
308
310 {
312 /* The signal only reaches the thumbnails. colorout reads the display profile in its
313 * commit_params(), on the main and the preview pipes alike, so the darkroom has to be told
314 * to recommit -- otherwise it keeps the previous profile until the next zoom or edit. */
316 }
317
318 return TRUE;
319}
320
322{
323 if(!strcmp(string, "perceptual"))
325 else if(!strcmp(string, "relative colorimetric"))
327 else if(!strcmp(string, "saturation"))
329 else if(!strcmp(string, "absolute colorimetric"))
331 else
333
334 // Those seem to make no difference with most ICC profiles anyway.
335 // Perceptual needs A_to_B and B_to_A LUT defined in the .icc profile to work.
336 // Since most profiles don't have them, it falls back to something close to relative colorimetric.
337 // Really not sure if it's our implementation or if it's LittleCMS2 that is faulty here.
338 // This option just makes it look like pRoFESsional CoLoR mAnAgeMEnt®©.
339 // ICC intents are pretty much bogus in the first place... (gamut mapping by RGB clipping...)
340}
341
342static gboolean intent_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
343{
344 const dt_iop_color_intent_t new_intent = string_to_color_intent(get_custom_data(GTK_WIDGET(user_data)));
345 const gboolean intent_changed = dt_colorprofiles_set_display_intent(new_intent);
346
347 if(intent_changed)
348 {
350 // colorout reads the display intent in commit_params(): same reason as profile_callback()
352 }
353
354 return TRUE;
355}
356
357static gboolean intent_checked_callback(GtkWidget *widget)
358{
361 return settings.display_intent == string_to_color_intent(get_custom_data(widget));
362}
363
364static gboolean always_hide_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
365{
368 return TRUE;
369}
370
372{
373 return dt_conf_get_int("plugins/lighttable/overlays/global") == DT_THUMBNAIL_OVERLAYS_NONE;
374}
375
376static gboolean hover_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
377{
380 return TRUE;
381}
382
384{
385 return dt_conf_get_int("plugins/lighttable/overlays/global") == DT_THUMBNAIL_OVERLAYS_HOVER_NORMAL;
386}
387
388static gboolean always_show_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
389{
392 return TRUE;
393}
394
396{
397 return dt_conf_get_int("plugins/lighttable/overlays/global") == DT_THUMBNAIL_OVERLAYS_ALWAYS_NORMAL;
398}
399
400static gboolean group_borders_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
401{
402 gboolean borders = !dt_conf_get_bool("plugins/lighttable/group_borders");
403 dt_conf_set_bool("plugins/lighttable/group_borders", borders);
404 dt_thumbtable_set_draw_group_borders(dt_gui_get_ui()->thumbtable_lighttable, borders);
405 dt_thumbtable_set_draw_group_borders(dt_gui_get_ui()->thumbtable_filmstrip, borders);
406 return TRUE;
407}
408
410{
411 return dt_conf_get_bool("plugins/lighttable/group_borders");
412}
413
414static gboolean collapse_grouped_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
415{
416 dt_conf_set_bool("ui_last/grouping", !dt_conf_get_bool("ui_last/grouping"));
418 return TRUE;
419}
420
422{
423 return dt_conf_get_bool("ui_last/grouping");
424}
425
426static gboolean _jpg_checked(GtkWidget *widget)
427{
428 const int item = GPOINTER_TO_INT(get_custom_data(widget));
429 return item == dt_conf_get_int("lighttable/embedded_jpg");
430}
431
432static gboolean _jpg_combobox_changed(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
433{
434 const int mode = GPOINTER_TO_INT(get_custom_data(GTK_WIDGET(user_data)));
435 if(mode != dt_conf_get_int("lighttable/embedded_jpg"))
436 {
437 // Change the mode, and tell the thumbnail cache, which does not read conf: until told, it renders
438 // in the old mode. Before the purge, so a thumbnail regenerated in between already uses the new one.
439 dt_conf_set_int("lighttable/embedded_jpg", mode);
442 settings.embedded_jpg = mode;
444
445 // Drop the current collection's thumbnails, on disk too: a file in the disk cache does not say
446 // which mode rendered it, and would be read back as it is.
448 for(GList *img = g_list_first(imgs); img; img = g_list_next(img))
449 {
450 const int32_t imgid = GPOINTER_TO_INT(img->data);
452 }
453 g_list_free(imgs);
454 imgs = NULL;
455
456 // Redraw thumbnails
458 }
459 return TRUE;
460}
461
462void append_display(GtkWidget **menus, GList **lists, const dt_menus_t index)
463{
464 // Parent sub-menu color profile
465 add_top_submenu_entry(menus, lists, _("Monitor color profile"), index);
466 GtkWidget *parent = get_last_widget(lists);
467
468 /* Add available color profiles to the sub-menu.
469 *
470 * The menu items keep a pointer to their profile identity, read back by
471 * profile_callback() and profile_checked_callback(). That used to be a raw pointer into
472 * the module's own list; it is an owned copy now, so the menu holds no reference into
473 * module state. The array has the same lifetime as the menu -- built once at startup,
474 * alive for the process -- so it is deliberately not freed. */
475 static dt_colorprofile_desc_t *display_profiles = NULL;
476 static size_t n_display_profiles = 0;
477
478 if(IS_NULL_PTR(display_profiles))
479 n_display_profiles = dt_colorspaces_enumerate_profiles(DT_PROFILE_ROLE_MONITOR, &display_profiles);
480
481 for(size_t k = 0; k < n_display_profiles; k++)
482 add_sub_sub_menu_entry(menus, parent, lists, display_profiles[k].name, index, &display_profiles[k],
483 profile_callback, profile_checked_callback, NULL, NULL, 0, 0);
484
485 // Parent sub-menu profile intent
486 add_top_submenu_entry(menus, lists, _("Monitor color intent"), index);
487 parent = get_last_widget(lists);
488
489 const char *intents[4] = { _("Perceptual"), _("Relative colorimetric"), C_("rendering intent", "Saturation"),
490 _("Absolute colorimetric") };
491 // non-translatable strings to store in menu items for later mapping with dt_iop_color_intent_t
492 const char *data[4] = { "perceptual", "relative colorimetric", "saturation", "absolute colorimetric" };
493
494 for(int i = 0; i < 4; i++)
495 add_sub_sub_menu_entry(menus, parent, lists, intents[i], index, (void *)data[i], intent_callback, intent_checked_callback, NULL, NULL, 0, 0);
496
497 add_menu_separator(menus[index]);
498
499 // Parent sub-menu panels
500 add_top_submenu_entry(menus, lists, _("Panels"), index);
501 parent = get_last_widget(lists);
502
503 // Children of sub-menu panels
504 add_sub_sub_menu_entry(menus, parent, lists, _("Top"), index, NULL, panel_top_callback,
505 panel_top_checked_callback, NULL, NULL, GDK_KEY_t, DT_PRIMARY_MASK | GDK_SHIFT_MASK);
506
507 add_sub_sub_menu_entry(menus, parent, lists, _("Left"), index, NULL,
508 panel_left_callback, panel_left_checked_callback, NULL, NULL, GDK_KEY_l, DT_PRIMARY_MASK | GDK_SHIFT_MASK);
509
510 add_sub_sub_menu_entry(menus, parent, lists, _("Right"), index, NULL,
512
513 add_sub_sub_menu_entry(menus, parent, lists, _("Filmstrip"), index, NULL,
515
516 add_menu_separator(menus[index]);
517
518 // Lighttable & Filmstrip options
519 add_top_submenu_entry(menus, lists, _("Thumbnail overlays"), index);
520 parent = get_last_widget(lists);
521
522 add_sub_sub_menu_entry(menus, parent, lists, _("Always hide"), index, NULL,
524
525 add_sub_sub_menu_entry(menus, parent, lists, _("Show on hover"), index, NULL,
527
528 add_sub_sub_menu_entry(menus, parent, lists, _("Always show"), index, NULL,
530
531 // Submenu embedded JPEG
532 add_top_submenu_entry(menus, lists, _("Thumbnail source"), index);
533 parent = get_last_widget(lists);
534 add_sub_sub_menu_entry(menus, parent, lists, _("Always process the RAW"), index, GINT_TO_POINTER(0),
535 _jpg_combobox_changed, _jpg_checked, NULL, NULL, 0, 0);
536 add_sub_sub_menu_entry(menus, parent, lists, _("Use embedded JPG if unedited"), index, GINT_TO_POINTER(1),
537 _jpg_combobox_changed, _jpg_checked, NULL, NULL, 0, 0);
538 add_sub_sub_menu_entry(menus, parent, lists, _("Always use embedded JPG"), index, GINT_TO_POINTER(2),
539 _jpg_combobox_changed, _jpg_checked, NULL, NULL, 0, 0);
540
541 add_sub_menu_entry(menus, lists, _("Collapse grouped images"), index, NULL, collapse_grouped_callback, collapse_grouped_checked_callback, NULL, NULL, 0, 0);
542
543 add_sub_menu_entry(menus, lists, _("Show group borders"), index, NULL, group_borders_callback,
544 group_borders_checked_callback, NULL, NULL, GDK_KEY_p, DT_PRIMARY_MASK | GDK_SHIFT_MASK);
545
546 add_menu_separator(menus[index]);
547
548 add_sub_menu_entry(menus, lists, _("Full screen"), index, NULL, full_screen_callback,
549 full_screen_checked_callback, NULL, NULL, GDK_KEY_F11, 0);
550
551 dt_accels_new_global_action(_toggle_side_borders_accel_callback, NULL, NULL, N_("Global/Actions"), N_("Toggle all panels visibility"), GDK_KEY_F11, GDK_SHIFT_MASK, _("Triggers the action"));
552}
Handle default and user-set shortcuts (accelerators)
#define DT_PRIMARY_MASK
GtkWidget * dt_gui_main_window(void)
struct dt_ui_t * dt_gui_get_ui(void)
#define dt_accels_new_global_action(a, b, w, c, d, e, f, g)
get width of right, left, or bottom panel
#define TRUE
Definition ashift_lsd.c:162
#define FALSE
Definition ashift_lsd.c:158
void dt_collection_update_query(const dt_collection_t *collection, dt_collection_change_t query_change, dt_collection_properties_t changed_property, GList *list)
Definition collection.c:837
dt_collection_t * dt_collection_get_global(void)
Definition collection.c:138
GList * dt_collection_get_all(const dt_collection_t *collection, int limit)
Definition collection.c:442
@ DT_COLLECTION_PROP_GROUPING
Definition collection.h:143
@ DT_COLLECTION_CHANGE_RELOAD
Definition collection.h:164
static void profile_changed(GtkWidget *widget, gpointer user_data)
Definition colorin.c:505
gboolean dt_colorprofiles_set_display_profile_choice(const dt_colorspaces_color_profile_type_t type, const char *const filename)
Set the monitor profile identity and rebuild the four prepared transforms.
gboolean dt_colorprofiles_set_display_intent(const dt_iop_color_intent_t intent)
Set the rendering intent used towards the monitor, rebuilding the four prepared transforms.
size_t dt_colorspaces_enumerate_profiles(const dt_colorspaces_profile_role_t role, dt_colorprofile_desc_t **out)
Ordered snapshot of every profile registered for one role.
void dt_colorprofiles_get_settings(dt_colorprofiles_settings_t *const out)
Copy the current settings into caller-provided storage, under one lock.
The colour-profile module's API: which profiles exist, and how to apply one.
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
void dt_conf_set_bool(const char *name, int val)
int dt_conf_get_bool(const char *name)
void dt_conf_set_int(const char *name, int val)
int dt_conf_get_int(const char *name)
Integer for name, clamped to the bounds declared in the XML.
void dt_control_set_mouse_over_id(int32_t value)
Definition control.c:1040
void dt_control_set_keyboard_over_id(int32_t value)
Definition control.c:1066
struct dt_develop_t * dt_dev_get_global(void)
Definition darktable.c:531
struct dt_view_manager_t * dt_view_manager_get_global(void)
Definition darktable.c:602
void dt_dev_pixelpipe_change_zoom_main(dt_develop_t *dev)
#define dt_dev_pixelpipe_resync_history_all(dev)
static gboolean profile_checked_callback(GtkWidget *widget)
Definition display.c:287
static gboolean filmstrip_checked_callback(GtkWidget *widget)
Definition display.c:282
static gboolean always_show_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:388
static gboolean panel_right_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:261
void dt_ui_panel_show(dt_ui_t *ui, const dt_ui_panel_t p, gboolean show, gboolean write)
shows/hide a panel
Definition display.c:130
static gboolean hover_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:376
static gboolean group_borders_checked_callback()
Definition display.c:409
static gboolean collapse_grouped_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:414
static gboolean panel_left_checked_callback(GtkWidget *widget)
Definition display.c:237
void append_display(GtkWidget **menus, GList **lists, const dt_menus_t index)
Definition display.c:462
static gboolean always_hide_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:364
static gboolean available_in_lighttable_callback()
Definition display.c:253
gboolean dt_ui_panel_visible(dt_ui_t *ui, const dt_ui_panel_t p)
get visible state of panel
Definition display.c:217
static gboolean intent_checked_callback(GtkWidget *widget)
Definition display.c:357
gboolean full_screen_checked_callback(GtkWidget *w)
Definition display.c:40
static gboolean panel_left_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:231
static gboolean intent_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:342
dt_iop_color_intent_t string_to_color_intent(const char *string)
Definition display.c:321
static gboolean filmstrip_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:274
static gboolean _toggle_side_borders_accel_callback(GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType modifier, gpointer data)
Definition display.c:108
static gboolean hover_overlays_checked_callback(GtkWidget *widget)
Definition display.c:383
void dt_ui_toggle_panels_visibility(dt_ui_t *ui)
toggle view of panels eg. collapse/expands to previous view state
Definition display.c:118
static gboolean group_borders_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:400
static gboolean panel_right_checked_callback(GtkWidget *widget)
Definition display.c:269
static gboolean profile_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:299
static gboolean always_hide_overlays_checked_callback(GtkWidget *widget)
Definition display.c:371
static gboolean panel_top_checked_callback(GtkWidget *widget)
Definition display.c:248
static gboolean always_show_overlays_checked_callback(GtkWidget *widget)
Definition display.c:395
static gboolean full_screen_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:46
static gboolean _panel_is_visible(dt_ui_panel_t panel)
Definition display.c:94
static gboolean collapse_grouped_checked_callback()
Definition display.c:421
static gboolean _jpg_combobox_changed(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:432
static gboolean panel_top_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:242
static gboolean _jpg_checked(GtkWidget *widget)
Definition display.c:426
GtkWidget * geometry
its size, under the preview
GtkWidget * window
GtkWidget * view
the tree view
#define UNKNOWN_IMAGE
Definition image.h:78
float *const restrict const size_t k
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
Definition macros.h:96
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
Definition mem_alloc.h:171
void add_sub_sub_menu_entry(GtkWidget **menus, GtkWidget *parent, GList **lists, const gchar *label, const dt_menus_t index, void *data, gboolean(*action_callback)(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data), gboolean(*checked_callback)(GtkWidget *widget), gboolean(*active_callback)(GtkWidget *widget), gboolean(*sensitive_callback)(GtkWidget *widget), guint key_val, GdkModifierType mods)
Definition menu.c:597
GtkWidget * get_last_widget(GList **list)
Definition menu.c:631
void add_sub_menu_entry(GtkWidget **menus, GList **lists, const gchar *label, const dt_menus_t index, void *data, gboolean(*action_callback)(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data), gboolean(*checked_callback)(GtkWidget *widget), gboolean(*active_callback)(GtkWidget *widget), gboolean(*sensitive_callback)(GtkWidget *widget), guint key_val, GdkModifierType mods)
Definition menu.c:555
void * get_custom_data(GtkWidget *widget)
Definition menu.c:625
void add_top_submenu_entry(GtkWidget **menus, GList **lists, const gchar *label, const dt_menus_t index)
Definition menu.c:528
void add_menu_separator(GtkWidget *menu)
Definition menu.c:611
dt_menus_t
Definition menu.h:42
char * key
void dt_mipmap_cache_remove(const int32_t imgid, const gboolean flush_disk)
void dt_mipmap_cache_get_settings(dt_mipmap_cache_settings_t *settings)
Read back the settings in force. Snapshot, taken under the same lock the setter takes,...
void dt_mipmap_cache_set_settings(const dt_mipmap_cache_settings_t *settings)
Apply new settings to a running cache.
const char * name
Definition pdf.h:90
dt_iop_color_intent_t
ICC rendering intent, as stored in iop params and in conf.
@ DT_INTENT_ABSOLUTE_COLORIMETRIC
@ DT_INTENT_RELATIVE_COLORIMETRIC
@ DT_INTENT_PERCEPTUAL
@ DT_INTENT_SATURATION
@ DT_COLORSPACE_FILE
A user ICC file on disk; the only type whose filename is meaningful.
@ DT_COLORSPACES_PROFILE_TYPE_DISPLAY
@ DT_PROFILE_ROLE_MONITOR
Eligible for the monitor-profile menu.
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
Definition signal.h:390
struct dt_control_signal_t * dt_control_signal_get_global(void)
Definition darktable.c:619
@ DT_SIGNAL_CONTROL_PROFILE_USER_CHANGED
This signal is raised when a profile is changed by the user 1 uint32_t : the profile type that has ch...
Definition signal.h:246
const float uint32_t state[4]
A profile's public identity: what the GUI displays and stores, and nothing else.
dt_colorspaces_color_profile_type_t type
what to store in params / conf
char filename[DT_IOP_COLOR_ICC_LEN]
"" unless type == DT_COLORSPACE_FILE
Consistent snapshot of the display and soft-proofing settings.
char display_filename[DT_IOP_COLOR_ICC_LEN]
only meaningful for DT_COLORSPACE_FILE
dt_colorspaces_color_profile_type_t display_type
monitor profile identity
dt_iop_color_intent_t display_intent
rendering intent to the monitor
Everything about the mipmap cache that the USER decides.
int embedded_jpg
Whether to prefer the embedded JPEG over decoding (lighttable/embedded_jpg).
dt_thumbtable_t * thumbtable_filmstrip
GtkWidget * panels[DT_UI_PANEL_SIZE]
@ DT_THUMBNAIL_OVERLAYS_HOVER_NORMAL
Definition thumbnail.h:61
@ DT_THUMBNAIL_OVERLAYS_ALWAYS_NORMAL
Definition thumbnail.h:62
@ DT_THUMBNAIL_OVERLAYS_NONE
Definition thumbnail.h:60
int dt_thumbtable_scroll_to_selection(dt_thumbtable_t *table)
Scroll to show selected content.
Definition thumbtable.c:458
void dt_thumbtable_set_overlays_mode(dt_thumbtable_t *table, dt_thumbnail_overlay_t over)
Set the overlay display mode for thumbnails.
void dt_thumbtable_set_draw_group_borders(dt_thumbtable_t *table, gboolean enable)
Definition thumbtable.c:976
void dt_thumbtable_update_parent(dt_thumbtable_t *table)
#define dt_thumbtable_refresh_thumbnail(table, imgid, reinit)
Definition thumbtable.h:301
int32_t dt_view_active_images_get_first()
Definition view.c:1378
const dt_view_t * dt_view_manager_get_current_view(dt_view_manager_t *vm)
Definition view.c:144
gchar * panels_get_view_path(char *suffix)
gchar * panels_get_panel_path(dt_ui_panel_t panel, char *suffix)
void dt_ui_set_window_buttons_visible(dt_ui_t *ui, gboolean visible)
void dt_ui_restore_panels(dt_ui_t *ui)
dt_ui_panel_t
@ DT_UI_PANEL_TOP
@ DT_UI_PANEL_SIZE
@ DT_UI_PANEL_BOTTOM
@ DT_UI_PANEL_LEFT
@ DT_UI_PANEL_RIGHT