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
7 Ansel is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Ansel is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
19*/
21#include "common/conf.h"
22#include "caches/mipmap_cache.h"
23#include "common/collection.h"
24#include "control/control.h"
26#include "develop/develop.h"
27#include "gui/actions/menu.h"
28#include "gui/application.h"
30#include "views/view.h"
31
32#include "gui/window_manager.h"
33
34#include <gtk/gtk.h>
35#include "control/signal.h"
36
37
40{
41 GtkWidget *widget = dt_gui_main_window();
42 return gdk_window_get_state(gtk_widget_get_window(widget)) & GDK_WINDOW_STATE_FULLSCREEN;
43}
44
45static gboolean full_screen_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
46{
48
50 {
51 gtk_window_unfullscreen(GTK_WINDOW(window));
52
53#ifdef GDK_WINDOWING_QUARTZ
54 // workaround for GTK Quartz backend bug
55 gtk_window_set_title(GTK_WINDOW(window), "Ansel");
56#endif
57
58 // Hide window controls
60 }
61 else
62 {
63 gtk_window_fullscreen(GTK_WINDOW(window));
64
65#ifdef GDK_WINDOWING_QUARTZ
66 // workaround for GTK Quartz backend bug
67 gtk_window_set_title(GTK_WINDOW(window), "Ansel Preview");
68#endif
69
70 // Show window controls
72 }
73
74#ifdef GDK_WINDOWING_QUARTZ
75 // Mac OS workaround: always re-anchor the window to the bottom of the screen
76 GdkWindow *win = gtk_widget_get_window(window);
77 GdkDisplay *display = gtk_widget_get_display(window);
78 GdkMonitor *monitor = gdk_display_get_monitor_at_window(display, win);
79 GdkRectangle geometry;
80 gdk_monitor_get_geometry(monitor, &geometry);
81
82 int w, h;
83 gtk_window_get_size(GTK_WINDOW(window), &w, &h);
84 gtk_window_move(GTK_WINDOW(window), geometry.x + geometry.width - w, geometry.y + geometry.height - h);
85#endif
86
88
89 return TRUE;
90}
91
93static gboolean _panel_is_visible(dt_ui_panel_t panel)
94{
95 gchar *key = panels_get_view_path("panel_collaps_state");
97 {
98 dt_free(key);
99 return FALSE;
100 }
101 key = panels_get_panel_path(panel, "_visible");
102 const gboolean ret = dt_conf_get_bool(key);
103 dt_free(key);
104 return ret;
105}
106
107static gboolean _toggle_side_borders_accel_callback(GtkAccelGroup *accel_group, GObject *accelerable, guint keyval,
108 GdkModifierType modifier, gpointer data)
109{
111
112 /* trigger invalidation of centerview to reprocess pipe */
114 return TRUE;
115}
116
118{
119 gchar *key = panels_get_view_path("panel_collaps_state");
120 const uint32_t state = dt_conf_get_int(key);
121
122 if(state) dt_conf_set_int(key, 0);
123 else dt_conf_set_int(key, 1);
124
126 dt_free(key);
127}
128
129void dt_ui_panel_show(dt_ui_t *ui, const dt_ui_panel_t p, gboolean show, gboolean write)
130{
131 g_return_if_fail(GTK_IS_WIDGET(ui->panels[p]));
132
133 // for left and right sides, panels are inside a gtkoverlay
134 GtkWidget *over_panel = NULL;
136 over_panel = gtk_widget_get_parent(ui->panels[p]);
137
138 if(show)
139 {
140 gtk_widget_show(ui->panels[p]);
141 if(over_panel) gtk_widget_show(over_panel);
142
144 {
145 const int32_t imgid = dt_view_active_images_get_first();
146 if(imgid > UNKNOWN_IMAGE)
147 {
151 g_idle_add((GSourceFunc)dt_thumbtable_scroll_to_selection, ui->thumbtable_filmstrip);
152 }
153 }
154 }
155 else
156 {
157 gtk_widget_hide(ui->panels[p]);
158 if(over_panel) gtk_widget_hide(over_panel);
159 }
160
161 if(write)
162 {
163 gchar *key;
164 if(show)
165 {
166 // we reset the collaps_panel value if we show a panel
167 key = panels_get_view_path("panel_collaps_state");
168 if(dt_conf_get_int(key) != 0)
169 {
171 dt_free(key);
172 // we ensure that all panels state are recorded as hidden
173 for(int k = 0; k < DT_UI_PANEL_SIZE; k++)
174 {
175 key = panels_get_panel_path(k, "_visible");
177 dt_free(key);
178 }
179 }
180 else
181 dt_free(key);
182 key = panels_get_panel_path(p, "_visible");
183 dt_conf_set_bool(key, show);
184 dt_free(key);
185 }
186 else
187 {
188 // if it was the last visible panel, we set collaps_panel value instead
189 // so collapsing panels after will have an effect
190 gboolean collapse = TRUE;
191 for(int k = 0; k < DT_UI_PANEL_SIZE; k++)
192 {
193 if(k != p && dt_ui_panel_visible(ui, k))
194 {
195 collapse = FALSE;
196 break;
197 }
198 }
199
200 if(collapse)
201 {
202 key = panels_get_view_path("panel_collaps_state");
204 dt_free(key);
205 }
206 else
207 {
208 key = panels_get_panel_path(p, "_visible");
209 dt_conf_set_bool(key, show);
210 dt_free(key);
211 }
212 }
213 }
214}
215
217{
218 g_return_val_if_fail(GTK_IS_WIDGET(ui->panels[p]), FALSE);
219 // gtk_widget_get_visible() only reflects this widget's own visible flag. For the bottom
220 // (filmstrip) panel, dt_thumbtable_show()/_hide() (called unconditionally from every view's
221 // enter()/leave(), bypassing dt_ui_panel_show()) only ever touch ui->panels[DT_UI_PANEL_BOTTOM]
222 // itself, never its wrapping GtkOverlay ("over" in _ui_init_panel_bottom()) that dt_ui_panel_show()
223 // shows/hides together with it. That can leave the panel's own flag TRUE while its ancestor stays
224 // hidden -- genuinely invisible on screen. gtk_widget_is_visible() walks the ancestor chain, so it
225 // reports actual on-screen visibility instead.
226 return gtk_widget_is_visible(ui->panels[p]);
227}
228
229
230static gboolean panel_left_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
231{
233 return TRUE;
234}
235
240
241static gboolean panel_top_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
242{
244 return TRUE;
245}
246
251
253{
254 // Filmstrip is not visible in lighttable
256 return (view && strcmp(view->module_name, "lighttable"));
257}
258
259
260static gboolean panel_right_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
261{
264
265 return TRUE;
266}
267
272
273static gboolean filmstrip_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
274{
277
278 return TRUE;
279}
280
285
286static gboolean profile_checked_callback(GtkWidget *widget)
287{
289 if(IS_NULL_PTR(prof)) return FALSE;
290
293
294 return (prof->type == settings.display_type
295 && (prof->type != DT_COLORSPACE_FILE || !strcmp(prof->filename, settings.display_filename)));
296}
297
298static gboolean profile_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
299{
300 const dt_colorprofile_desc_t *pp = (const dt_colorprofile_desc_t *)get_custom_data(GTK_WIDGET(user_data));
301 if(IS_NULL_PTR(pp)) return TRUE;
302
303 /* The setter owns the lock, the changed decision and the transform rebuild. pp comes
304 * straight from the menu item, which was built from the profile list, so "not found" is
305 * not reachable here -- re-picking the active entry is simply a no-op. */
307
310
311 return TRUE;
312}
313
315{
316 if(!strcmp(string, "perceptual"))
318 else if(!strcmp(string, "relative colorimetric"))
320 else if(!strcmp(string, "saturation"))
322 else if(!strcmp(string, "absolute colorimetric"))
324 else
326
327 // Those seem to make no difference with most ICC profiles anyway.
328 // Perceptual needs A_to_B and B_to_A LUT defined in the .icc profile to work.
329 // Since most profiles don't have them, it falls back to something close to relative colorimetric.
330 // Really not sure if it's our implementation or if it's LittleCMS2 that is faulty here.
331 // This option just makes it look like pRoFESsional CoLoR mAnAgeMEnt®©.
332 // ICC intents are pretty much bogus in the first place... (gamut mapping by RGB clipping...)
333}
334
335static gboolean intent_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
336{
337 const dt_iop_color_intent_t new_intent = string_to_color_intent(get_custom_data(GTK_WIDGET(user_data)));
338 const gboolean intent_changed = dt_colorprofiles_set_display_intent(new_intent);
339
340 if(intent_changed)
342
343 return TRUE;
344}
345
346static gboolean intent_checked_callback(GtkWidget *widget)
347{
350 return settings.display_intent == string_to_color_intent(get_custom_data(widget));
351}
352
353static gboolean always_hide_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
354{
357 return TRUE;
358}
359
361{
362 return dt_conf_get_int("plugins/lighttable/overlays/global") == DT_THUMBNAIL_OVERLAYS_NONE;
363}
364
365static gboolean hover_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
366{
369 return TRUE;
370}
371
373{
374 return dt_conf_get_int("plugins/lighttable/overlays/global") == DT_THUMBNAIL_OVERLAYS_HOVER_NORMAL;
375}
376
377static gboolean always_show_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
378{
381 return TRUE;
382}
383
385{
386 return dt_conf_get_int("plugins/lighttable/overlays/global") == DT_THUMBNAIL_OVERLAYS_ALWAYS_NORMAL;
387}
388
389static gboolean group_borders_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
390{
391 gboolean borders = !dt_conf_get_bool("plugins/lighttable/group_borders");
392 dt_conf_set_bool("plugins/lighttable/group_borders", borders);
393 dt_thumbtable_set_draw_group_borders(dt_gui_get_ui()->thumbtable_lighttable, borders);
394 dt_thumbtable_set_draw_group_borders(dt_gui_get_ui()->thumbtable_filmstrip, borders);
395 return TRUE;
396}
397
399{
400 return dt_conf_get_bool("plugins/lighttable/group_borders");
401}
402
403static gboolean collapse_grouped_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
404{
405 dt_conf_set_bool("ui_last/grouping", !dt_conf_get_bool("ui_last/grouping"));
407 return TRUE;
408}
409
411{
412 return dt_conf_get_bool("ui_last/grouping");
413}
414
415static gboolean _jpg_checked(GtkWidget *widget)
416{
417 const int item = GPOINTER_TO_INT(get_custom_data(widget));
418 return item == dt_conf_get_int("lighttable/embedded_jpg");
419}
420
421static gboolean _jpg_combobox_changed(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
422{
423 const int mode = GPOINTER_TO_INT(get_custom_data(GTK_WIDGET(user_data)));
424 if(mode != dt_conf_get_int("lighttable/embedded_jpg"))
425 {
427
428 // Empty the mipmap cache for the current collection, but only on RAM
429 // Don't delete disk cache, but RAM cache may be flushed to disk if user param sets it.
430 for(GList *img = g_list_first(imgs); img; img = g_list_next(img))
431 {
432 const int32_t imgid = GPOINTER_TO_INT(img->data);
434 }
435 g_list_free(imgs);
436 imgs = NULL;
437
438 // Change the mode
439 dt_conf_set_int("lighttable/embedded_jpg", mode);
440
441 // Redraw thumbnails
443 }
444 return TRUE;
445}
446
447void append_display(GtkWidget **menus, GList **lists, const dt_menus_t index)
448{
449 // Parent sub-menu color profile
450 add_top_submenu_entry(menus, lists, _("Monitor color profile"), index);
451 GtkWidget *parent = get_last_widget(lists);
452
453 /* Add available color profiles to the sub-menu.
454 *
455 * The menu items keep a pointer to their profile identity, read back by
456 * profile_callback() and profile_checked_callback(). That used to be a raw pointer into
457 * the module's own list; it is an owned copy now, so the menu holds no reference into
458 * module state. The array has the same lifetime as the menu -- built once at startup,
459 * alive for the process -- so it is deliberately not freed. */
460 static dt_colorprofile_desc_t *display_profiles = NULL;
461 static size_t n_display_profiles = 0;
462
463 if(IS_NULL_PTR(display_profiles))
464 n_display_profiles = dt_colorspaces_enumerate_profiles(DT_PROFILE_ROLE_MONITOR, &display_profiles);
465
466 for(size_t k = 0; k < n_display_profiles; k++)
467 add_sub_sub_menu_entry(menus, parent, lists, display_profiles[k].name, index, &display_profiles[k],
468 profile_callback, profile_checked_callback, NULL, NULL, 0, 0);
469
470 // Parent sub-menu profile intent
471 add_top_submenu_entry(menus, lists, _("Monitor color intent"), index);
472 parent = get_last_widget(lists);
473
474 const char *intents[4] = { _("Perceptual"), _("Relative colorimetric"), C_("rendering intent", "Saturation"),
475 _("Absolute colorimetric") };
476 // non-translatable strings to store in menu items for later mapping with dt_iop_color_intent_t
477 const char *data[4] = { "perceptual", "relative colorimetric", "saturation", "absolute colorimetric" };
478
479 for(int i = 0; i < 4; i++)
480 add_sub_sub_menu_entry(menus, parent, lists, intents[i], index, (void *)data[i], intent_callback, intent_checked_callback, NULL, NULL, 0, 0);
481
482 add_menu_separator(menus[index]);
483
484 // Parent sub-menu panels
485 add_top_submenu_entry(menus, lists, _("Panels"), index);
486 parent = get_last_widget(lists);
487
488 // Children of sub-menu panels
489 add_sub_sub_menu_entry(menus, parent, lists, _("Top"), index, NULL, panel_top_callback,
490 panel_top_checked_callback, NULL, NULL, GDK_KEY_t, DT_PRIMARY_MASK | GDK_SHIFT_MASK);
491
492 add_sub_sub_menu_entry(menus, parent, lists, _("Left"), index, NULL,
493 panel_left_callback, panel_left_checked_callback, NULL, NULL, GDK_KEY_l, DT_PRIMARY_MASK | GDK_SHIFT_MASK);
494
495 add_sub_sub_menu_entry(menus, parent, lists, _("Right"), index, NULL,
497
498 add_sub_sub_menu_entry(menus, parent, lists, _("Filmstrip"), index, NULL,
500
501 add_menu_separator(menus[index]);
502
503 // Lighttable & Filmstrip options
504 add_top_submenu_entry(menus, lists, _("Thumbnail overlays"), index);
505 parent = get_last_widget(lists);
506
507 add_sub_sub_menu_entry(menus, parent, lists, _("Always hide"), index, NULL,
509
510 add_sub_sub_menu_entry(menus, parent, lists, _("Show on hover"), index, NULL,
512
513 add_sub_sub_menu_entry(menus, parent, lists, _("Always show"), index, NULL,
515
516 // Submenu embedded JPEG
517 add_top_submenu_entry(menus, lists, _("Thumbnail source"), index);
518 parent = get_last_widget(lists);
519 add_sub_sub_menu_entry(menus, parent, lists, _("Always process the RAW"), index, GINT_TO_POINTER(0),
520 _jpg_combobox_changed, _jpg_checked, NULL, NULL, 0, 0);
521 add_sub_sub_menu_entry(menus, parent, lists, _("Use embedded JPG if unedited"), index, GINT_TO_POINTER(1),
522 _jpg_combobox_changed, _jpg_checked, NULL, NULL, 0, 0);
523 add_sub_sub_menu_entry(menus, parent, lists, _("Always use embedded JPG"), index, GINT_TO_POINTER(2),
524 _jpg_combobox_changed, _jpg_checked, NULL, NULL, 0, 0);
525
526 add_sub_menu_entry(menus, lists, _("Collapse grouped images"), index, NULL, collapse_grouped_callback, collapse_grouped_checked_callback, NULL, NULL, 0, 0);
527
528 add_sub_menu_entry(menus, lists, _("Show group borders"), index, NULL, group_borders_callback,
529 group_borders_checked_callback, NULL, NULL, GDK_KEY_p, DT_PRIMARY_MASK | GDK_SHIFT_MASK);
530
531 add_menu_separator(menus[index]);
532
533 add_sub_menu_entry(menus, lists, _("Full screen"), index, NULL, full_screen_callback,
534 full_screen_checked_callback, NULL, NULL, GDK_KEY_F11, 0);
535
536 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"));
537}
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:994
void dt_control_set_keyboard_over_id(int32_t value)
Definition control.c:1020
struct dt_develop_t * dt_dev_get_global(void)
Definition darktable.c:528
struct dt_view_manager_t * dt_view_manager_get_global(void)
Definition darktable.c:599
void dt_dev_pixelpipe_change_zoom_main(dt_develop_t *dev)
static gboolean profile_checked_callback(GtkWidget *widget)
Definition display.c:286
static gboolean filmstrip_checked_callback(GtkWidget *widget)
Definition display.c:281
static gboolean always_show_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:377
static gboolean panel_right_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:260
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:129
static gboolean hover_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:365
static gboolean group_borders_checked_callback()
Definition display.c:398
static gboolean collapse_grouped_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:403
static gboolean panel_left_checked_callback(GtkWidget *widget)
Definition display.c:236
void append_display(GtkWidget **menus, GList **lists, const dt_menus_t index)
Definition display.c:447
static gboolean always_hide_overlays_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:353
static gboolean available_in_lighttable_callback()
Definition display.c:252
gboolean dt_ui_panel_visible(dt_ui_t *ui, const dt_ui_panel_t p)
get visible state of panel
Definition display.c:216
static gboolean intent_checked_callback(GtkWidget *widget)
Definition display.c:346
gboolean full_screen_checked_callback(GtkWidget *w)
Definition display.c:39
static gboolean panel_left_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:230
static gboolean intent_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:335
dt_iop_color_intent_t string_to_color_intent(const char *string)
Definition display.c:314
static gboolean filmstrip_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:273
static gboolean _toggle_side_borders_accel_callback(GtkAccelGroup *accel_group, GObject *accelerable, guint keyval, GdkModifierType modifier, gpointer data)
Definition display.c:107
static gboolean hover_overlays_checked_callback(GtkWidget *widget)
Definition display.c:372
void dt_ui_toggle_panels_visibility(dt_ui_t *ui)
toggle view of panels eg. collapse/expands to previous view state
Definition display.c:117
static gboolean group_borders_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:389
static gboolean panel_right_checked_callback(GtkWidget *widget)
Definition display.c:268
static gboolean profile_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:298
static gboolean always_hide_overlays_checked_callback(GtkWidget *widget)
Definition display.c:360
static gboolean panel_top_checked_callback(GtkWidget *widget)
Definition display.c:247
static gboolean always_show_overlays_checked_callback(GtkWidget *widget)
Definition display.c:384
static gboolean full_screen_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:45
static gboolean _panel_is_visible(dt_ui_panel_t panel)
Definition display.c:93
static gboolean collapse_grouped_checked_callback()
Definition display.c:410
static gboolean _jpg_combobox_changed(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:421
static gboolean panel_top_callback(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
Definition display.c:241
static gboolean _jpg_checked(GtkWidget *widget)
Definition display.c:415
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:607
GtkWidget * get_last_widget(GList **list)
Definition menu.c:641
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:565
void * get_custom_data(GtkWidget *widget)
Definition menu.c:635
void add_top_submenu_entry(GtkWidget **menus, GList **lists, const gchar *label, const dt_menus_t index)
Definition menu.c:538
void add_menu_separator(GtkWidget *menu)
Definition menu.c:621
dt_menus_t
Definition menu.h:42
char * key
void dt_mipmap_cache_remove(const int32_t imgid, const gboolean flush_disk)
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:386
struct dt_control_signal_t * dt_control_signal_get_global(void)
Definition darktable.c:616
@ 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:245
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
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:457
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:919
void dt_thumbtable_update_parent(dt_thumbtable_t *table)
#define dt_thumbtable_refresh_thumbnail(table, imgid, reinit)
Definition thumbtable.h:298
int32_t dt_view_active_images_get_first()
Definition view.c:1307
const dt_view_t * dt_view_manager_get_current_view(dt_view_manager_t *vm)
Definition view.c:139
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