Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
gtk.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-2011, 2013 Henrik Andersson.
5 Copyright (C) 2011 Robert Bieber.
6 Copyright (C) 2011-2019 Tobias Ellinghaus.
7 Copyright (C) 2011, 2015 Ulrich Pegelow.
8 Copyright (C) 2012, 2014, 2019-2022 Aldric Renaudin.
9 Copyright (C) 2012 Richard Wonka.
10 Copyright (C) 2013, 2015, 2018-2022 Pascal Obry.
11 Copyright (C) 2013-2016, 2020 Roman Lebedev.
12 Copyright (C) 2013 Simon Spannagel.
13 Copyright (C) 2014 Mikhail Trishchenkov.
14 Copyright (C) 2014-2016, 2019 parafin.
15 Copyright (C) 2015, 2017 Jérémy Rosen.
16 Copyright (C) 2015 Pedro Côrte-Real.
17 Copyright (C) 2016-2017 Peter Budai.
18 Copyright (C) 2017-2018 Dan Torop.
19 Copyright (C) 2017-2018 Matthieu Moy.
20 Copyright (C) 2018 Heiko Bauke.
21 Copyright (C) 2018 Rikard Öxler.
22 Copyright (C) 2019-2020, 2022-2023, 2025 Aurélien PIERRE.
23 Copyright (C) 2019 Kevin Daudt.
24 Copyright (C) 2020 Bill Ferguson.
25 Copyright (C) 2020-2022 Chris Elston.
26 Copyright (C) 2020-2022 Diederik Ter Rahe.
27 Copyright (C) 2020 Hanno Schwalm.
28 Copyright (C) 2020 Harold le Clément de Saint-Marcq.
29 Copyright (C) 2020 Hubert Kowalski.
30 Copyright (C) 2020 Mark-64.
31 Copyright (C) 2020-2021 Philippe Weyland.
32 Copyright (C) 2021 Ralf Brown.
33 Copyright (C) 2022 luzpaz.
34 Copyright (C) 2022 Martin Bařinka.
35 Copyright (C) 2022 Nicolas Auffray.
36 Copyright (C) 2023 Luca Zulberti.
37 Copyright (C) 2025 Alynx Zhou.
38 Copyright (C) 2026 Guillaume Stutin.
39
40 darktable is free software: you can redistribute it and/or modify
41 it under the terms of the GNU General Public License as published by
42 the Free Software Foundation, either version 3 of the License, or
43 (at your option) any later version.
44
45 darktable is distributed in the hope that it will be useful,
46 but WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 GNU General Public License for more details.
49
50 You should have received a copy of the GNU General Public License
51 along with darktable. If not, see <http://www.gnu.org/licenses/>.
52*/
53
54#pragma once
55
56#include "common/darktable.h"
57#include "common/dtpthread.h"
58#include "dtgtk/thumbtable.h"
59#include "gui/window_manager.h"
60#include "gui/accelerators.h"
61
62#include <gtk/gtk.h>
63#include <stdint.h>
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69#define DT_GUI_IOP_MODULE_CONTROL_SPACING 0
70#define DT_GUI_MOUSE_EFFECT_RADIUS darktable.gui->mouse.effect_radius
71#define DT_GUI_MOUSE_EFFECT_RADIUS_SCALED darktable.gui->mouse.effect_radius_scaled
72
73/* helper macro that applies the DPI transformation to fixed pixel values. input should be defaulting to 96
74 * DPI */
75#define DT_PIXEL_APPLY_DPI(value) ((value) * darktable.gui->dpi_factor)
76#define DT_PIXEL_APPLY_DPI_DPP(value) ((value) * darktable.gui->dpi_factor * darktable.gui->ppd)
77
78
79enum
80{
83};
84
85typedef struct dt_gui_widgets_t
86{
87 /* left panel */
88 GtkGrid *panel_left; // panel grid 3 rows, top,center,bottom and file on center
89 GtkGrid *panel_right;
90
91 /* resize of left/right panels */
95
131
132typedef struct dt_gui_gtk_t
133{
134
136
138
139 cairo_surface_t *surface;
142
143 int32_t reset;
145
146 int32_t center_tooltip; // 0 = no tooltip, 1 = new tooltip, 2 = old tooltip
147
148 // Culling mode is a special case of collection filter that is restricted to user selection
149 gboolean culling_mode;
150
151 // Track if the current selection has pushed on the backup copy
152 // see common/selection.h:dt_selection_push()
154
155 // Global accelerators for main menu, needed for GtkMenu mnemonics.
157
159
161
163
164
165 struct {
166 // distance to the cursor in device pixels (screen space)
168 // distance to the cursor in absolute output-image pixels
171
172 int icon_size; // size of top panel icons
173
174 // store which gtkrc we loaded:
176
177 GtkWidget *scroll_to[2]; // one for left, one for right
178
180
181 // scrolling focus
182 // This emulates the same feature as Gtk focus, but to capture scrolling events
184
185 cairo_filter_t filter_image; // filtering used for all modules expect darkroom
186 cairo_filter_t dr_filter_image; // filtering used in the darkroom
187
188 // Export popup window
189 struct {
191 GtkWidget *module;
193 struct {
195 GtkWidget *module;
197
198 dt_pthread_mutex_t mutex;
200
202{
203 GtkBox *parent; // the parent widget
204 gchar *confname; // configuration name for the toggle status
205 GtkWidget *toggle; // toggle button
206 GtkWidget *expander; // the expanded
207 GtkBox *container; // the container for all widgets into the section
208 GtkWidget *label; // The section label
210
225
226static inline cairo_surface_t *dt_cairo_image_surface_create(cairo_format_t format, int width, int height) {
227 cairo_surface_t *cst = cairo_image_surface_create(format, width * darktable.gui->ppd, height * darktable.gui->ppd);
228 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
229 return cst;
230}
231
232static inline cairo_surface_t *dt_cairo_image_surface_create_for_data(unsigned char *data, cairo_format_t format, int width, int height, int stride) {
233 cairo_surface_t *cst = cairo_image_surface_create_for_data(data, format, width, height, stride);
234 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
235 return cst;
236}
237
238static inline cairo_surface_t *dt_cairo_image_surface_create_from_png(const char *filename) {
239 cairo_surface_t *cst = cairo_image_surface_create_from_png(filename);
240 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
241 return cst;
242}
243
244static inline int dt_cairo_image_surface_get_width(cairo_surface_t *surface) {
245 return cairo_image_surface_get_width(surface) / darktable.gui->ppd;
246}
247
248static inline int dt_cairo_image_surface_get_height(cairo_surface_t *surface) {
249 return cairo_image_surface_get_height(surface) / darktable.gui->ppd;
250}
251
252static inline cairo_surface_t *dt_gdk_cairo_surface_create_from_pixbuf(const GdkPixbuf *pixbuf, int scale, GdkWindow *for_window) {
253 cairo_surface_t *cst = gdk_cairo_surface_create_from_pixbuf(pixbuf, scale, for_window);
254 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
255 return cst;
256}
257
258static inline GdkPixbuf *dt_gdk_pixbuf_new_from_file_at_size(const char *filename, int width, int height, GError **error) {
259 return gdk_pixbuf_new_from_file_at_size(filename, width * darktable.gui->ppd, height * darktable.gui->ppd, error);
260}
261
262// call class function to add or remove CSS classes (need to be set on top of this file as first function is used in this file)
263void dt_gui_add_class(GtkWidget *widget, const gchar *class_name);
264void dt_gui_remove_class(GtkWidget *widget, const gchar *class_name);
265
268void dt_gui_gtk_quit();
269void dt_gui_store_last_preset(const char *name);
272void dt_gui_gtk_set_source_rgba(cairo_t *cr, dt_gui_color_t, float opacity_coef);
273double dt_get_system_gui_ppd(GtkWidget *widget);
274
275/* Return requested scroll delta(s) from event. If delta_x or delta_y
276 * is NULL, do not return that delta. Return TRUE if requested deltas
277 * can be retrieved. Handles both GDK_SCROLL_UP/DOWN/LEFT/RIGHT and
278 * GDK_SCROLL_SMOOTH style scroll events. */
279gboolean dt_gui_get_scroll_deltas(const GdkEventScroll *event, gdouble *delta_x, gdouble *delta_y);
280/* Same as above, except accumulate smooth scrolls deltas of < 1 and
281 * only set deltas and return TRUE once scrolls accumulate to >= 1.
282 * Effectively makes smooth scroll events act like old-style unit
283 * scroll events. */
284gboolean dt_gui_get_scroll_unit_deltas(const GdkEventScroll *event, int *delta_x, int *delta_y);
285
286/* Note that on macOS Shift+vertical scroll can be reported as Shift+horizontal scroll.
287 * So if Shift changes scrolling effect, both scrolls should be handled the same.
288 * For this case (or if it's otherwise useful) use the following 2 functions. */
289
290/* Return sum of scroll deltas from event. Return TRUE if any deltas
291 * can be retrieved. Handles both GDK_SCROLL_UP/DOWN/LEFT/RIGHT and
292 * GDK_SCROLL_SMOOTH style scroll events. */
293gboolean dt_gui_get_scroll_delta(const GdkEventScroll *event, gdouble *delta);
294/* Same as above, except accumulate smooth scrolls deltas of < 1 and
295 * only set delta and return TRUE once scrolls accumulate to >= 1.
296 * Effectively makes smooth scroll events act like old-style unit
297 * scroll events. */
298gboolean dt_gui_get_scroll_unit_delta(const GdkEventScroll *event, int *delta);
299
303void dt_ui_container_foreach(dt_ui_t *ui, const dt_ui_container_t c, GtkCallback callback);
307void dt_ui_panel_show(dt_ui_t *ui, const dt_ui_panel_t, gboolean show, gboolean write);
311void dt_ui_notify_user();
313gboolean dt_ui_panel_visible(dt_ui_t *ui, const dt_ui_panel_t);
317gboolean dt_ui_panel_ancestor(dt_ui_t *ui, const dt_ui_panel_t p, GtkWidget *w);
323
328
330
331/* activate ellipsization of the combox entries */
332void dt_ellipsize_combo(GtkComboBox *cbox);
333
334// capitalize strings. Because grammar says sentences start with a capital,
335// and typography says it makes it easier to extract the structure of the text.
336void dt_capitalize_label(gchar *text);
337
338#define dt_accels_new_global_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->global_accels, c, d, e, f, FALSE, g)
339
340#define dt_accels_new_darkroom_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->darkroom_accels, c, d, e, f, FALSE, g)
341
342#define dt_accels_new_lighttable_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->lighttable_accels, c, d, e, f, FALSE, g)
343
344#define dt_accels_new_darkroom_locked_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->darkroom_accels, c, d, e, f, TRUE, g)
345
346
347static inline void dt_ui_section_label_set(GtkWidget *label)
348{
349 gtk_widget_set_halign(label, GTK_ALIGN_FILL); // make it span the whole available width
350 gtk_label_set_xalign (GTK_LABEL(label), 0.5f);
351 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END); // ellipsize labels
352 dt_gui_add_class(label, "dt_section_label"); // make sure that we can style these easily
353}
354
355static inline GtkWidget *dt_ui_section_label_new(const gchar *str)
356{
357 gchar *str_cpy = g_strdup(str);
358 dt_capitalize_label(str_cpy);
359 GtkWidget *label = gtk_label_new(str_cpy);
360 dt_free(str_cpy);
362 return label;
363};
364
365static inline GtkWidget *dt_ui_label_new(const gchar *str)
366{
367 gchar *str_cpy = g_strdup(str);
368 dt_capitalize_label(str_cpy);
369 GtkWidget *label = gtk_label_new(str_cpy);
370 dt_free(str_cpy);
371 gtk_widget_set_halign(label, GTK_ALIGN_START);
372 gtk_label_set_xalign (GTK_LABEL(label), 0.0f);
373 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
374 return label;
375};
376
377GtkNotebook *dt_ui_notebook_new();
378
379GtkWidget *dt_ui_notebook_page(GtkNotebook *notebook, const char *text, const char *tooltip);
380
381// show a dialog box with 2 buttons in case some user interaction is required BEFORE dt's gui is initialised.
382// this expects gtk_init() to be called already which should be the case during most of dt's init phase.
383gboolean dt_gui_show_standalone_yes_no_dialog(const char *title, const char *markup, const char *no_text,
384 const char *yes_text);
385
386// similar to the one above. this one asks the user for some string. the hint is shown in the empty entry box
387char *dt_gui_show_standalone_string_dialog(const char *title, const char *markup, const char *placeholder,
388 const char *no_text, const char *yes_text);
389
390void dt_gui_add_help_link(GtkWidget *widget, const char *link);
391
392// load a CSS theme
393void dt_gui_load_theme(const char *theme);
394
395// reload GUI scalings
397
398// return modifier keys currently pressed, independent of any key event
399GdkModifierType dt_key_modifier_state();
400
401
416void dt_gui_widget_init_auto_height(GtkWidget *widget , int min_rows, int max_rows);
417GtkWidget *dt_ui_scroll_wrap(GtkWidget *w, gint min_size, char *config_str);
418// check whether the given container has any user-added children
419gboolean dt_gui_container_has_children(GtkContainer *container);
420// return a count of the user-added children in the given container
422// return the first child of the given container
424// return the requested child of the given container, or NULL if it has fewer children
425GtkWidget *dt_gui_container_nth_child(GtkContainer *container, int which);
426
427// remove all of the children we've added to the container. Any which no longer have any references will
428// be destroyed.
430
431// delete all of the children we've added to the container. Use this function only if you are SURE
432// there are no other references to any of the children (if in doubt, use dt_gui_container_remove_children
433// instead; it's a bit slower but safer).
435
436void dt_gui_menu_popup(GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor);
437
451
452void dt_gui_draw_rounded_rectangle(cairo_t *cr, float width, float height, float x, float y);
453
454// event handler for "key-press-event" of GtkTreeView to decide if focus switches to GtkSearchEntry
455gboolean dt_gui_search_start(GtkWidget *widget, GdkEventKey *event, GtkSearchEntry *entry);
456
457// event handler for "stop-search" of GtkSearchEntry
458void dt_gui_search_stop(GtkSearchEntry *entry, GtkWidget *widget);
459
473 const char *confname, const char *label,
474 GtkBox *parent, GtkPackType pack);
475// routine to be called from gui_update
477
478// routine to hide the collapsible section
480
489GtkBox *attach_popover(GtkWidget *widget, const char *icon, GtkWidget *content);
490
503GtkBox *attach_help_popover(GtkWidget *widget, const char *label);
504
505
513
514// Get the top-most window attached to a widget.
515// This is a dynamic get that takes into account destroyed widgets and such.
516static inline GtkWindow *dt_gtk_get_window(GtkWidget *widget)
517{
518 if(!widget) return NULL;
519 GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
520 if(toplevel && gtk_widget_is_toplevel(toplevel)) return GTK_WINDOW(toplevel);
521 return NULL;
522}
523
524
525// Give back the focus to the main/center widget, either
526// image in darkroom or thumbtable in lighttable
528
529#ifdef __cplusplus
530}
531#endif
532
533// clang-format off
534// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
535// vim: shiftwidth=2 expandtab tabstop=2 cindent
536// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
537// clang-format on
Handle default and user-set shortcuts (accelerators)
static void error(char *msg)
Definition ashift_lsd.c:202
uint32_t container(dt_lib_module_t *self)
Definition backgroundjobs.c:77
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
Definition chromatic_adaptation.h:315
const float c
Definition colorspaces_inline_conversions.h:1365
const float delta
Definition colorspaces_inline_conversions.h:722
const char * tooltip
Definition common/image.h:217
char * name
Definition common/metadata.c:61
darktable_t darktable
Definition darktable.c:178
#define dt_free(ptr)
Definition darktable.h:380
#define PATH_MAX
Definition darktable.h:994
GtkWidget * dt_ui_toast_msg(dt_ui_t *ui)
get the toast message widget
Definition window_manager.c:114
gboolean dt_gui_get_scroll_deltas(const GdkEventScroll *event, gdouble *delta_x, gdouble *delta_y)
Definition gtk.c:154
GtkWidget * dt_ui_center(dt_ui_t *ui)
get the center drawable widget
Definition window_manager.c:101
void dt_gui_gtk_set_source_rgb(cairo_t *cr, dt_gui_color_t)
Definition gtk.c:363
GtkBox * attach_help_popover(GtkWidget *widget, const char *label)
Definition gtk.c:2753
void dt_gui_menu_popup(GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor)
Definition gtk.c:2528
void dt_ui_container_foreach(dt_ui_t *ui, const dt_ui_container_t c, GtkCallback callback)
calls a callback on all children widgets from container
Definition gtk.c:1393
gboolean dt_gui_get_scroll_delta(const GdkEventScroll *event, gdouble *delta)
Definition gtk.c:297
void dt_gui_container_remove_children(GtkContainer *container)
Definition gtk.c:2482
gboolean dt_gui_get_scroll_unit_deltas(const GdkEventScroll *event, int *delta_x, int *delta_y)
Definition gtk.c:214
static cairo_surface_t * dt_cairo_image_surface_create_from_png(const char *filename)
Definition gtk.h:238
gboolean dt_gui_get_scroll_unit_delta(const GdkEventScroll *event, int *delta)
Definition gtk.c:308
void dt_gui_search_stop(GtkSearchEntry *entry, GtkWidget *widget)
Definition gtk.c:2591
void dt_gui_hide_collapsible_section(dt_gui_collapsible_section_t *cs)
Definition gtk.c:2659
void dt_gui_remove_class(GtkWidget *widget, const gchar *class_name)
Definition gtk.c:139
dt_gui_color_t
Definition gtk.h:97
@ DT_GUI_COLOR_BG
Definition gtk.h:98
@ DT_GUI_COLOR_DARKROOM_PREVIEW_BG
Definition gtk.h:100
@ DT_GUI_COLOR_LIGHTTABLE_FONT
Definition gtk.h:103
@ DT_GUI_COLOR_MAP_LOC_SHAPE_HIGH
Definition gtk.h:126
@ DT_GUI_COLOR_LOG_FG
Definition gtk.h:122
@ DT_GUI_COLOR_BRUSH_CURSOR
Definition gtk.h:105
@ DT_GUI_COLOR_LAST
Definition gtk.h:129
@ DT_GUI_COLOR_THUMBNAIL_FONT
Definition gtk.h:114
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_BG
Definition gtk.h:109
@ DT_GUI_COLOR_MAP_COUNT_BG
Definition gtk.h:125
@ DT_GUI_COLOR_LOG_BG
Definition gtk.h:121
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_BORDER
Definition gtk.h:118
@ DT_GUI_COLOR_THUMBNAIL_OUTLINE
Definition gtk.h:111
@ DT_GUI_COLOR_MAP_LOC_SHAPE_LOW
Definition gtk.h:127
@ DT_GUI_COLOR_LIGHTTABLE_BG
Definition gtk.h:101
@ DT_GUI_COLOR_BUTTON_FG
Definition gtk.h:107
@ DT_GUI_COLOR_DARKROOM_BG
Definition gtk.h:99
@ DT_GUI_COLOR_THUMBNAIL_BORDER
Definition gtk.h:117
@ DT_GUI_COLOR_LIGHTTABLE_PREVIEW_BG
Definition gtk.h:102
@ DT_GUI_COLOR_MAP_COUNT_SAME_LOC
Definition gtk.h:123
@ DT_GUI_COLOR_MAP_COUNT_DIFF_LOC
Definition gtk.h:124
@ DT_GUI_COLOR_THUMBNAIL_BG
Definition gtk.h:108
@ DT_GUI_COLOR_PREVIEW_HOVER_BORDER
Definition gtk.h:120
@ DT_GUI_COLOR_FILMSTRIP_BG
Definition gtk.h:119
@ DT_GUI_COLOR_BRUSH_TRACE
Definition gtk.h:106
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_FONT
Definition gtk.h:115
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_OUTLINE
Definition gtk.h:112
@ DT_GUI_COLOR_THUMBNAIL_HOVER_BG
Definition gtk.h:110
@ DT_GUI_COLOR_PRINT_BG
Definition gtk.h:104
@ DT_GUI_COLOR_MAP_LOC_SHAPE_DEF
Definition gtk.h:128
@ DT_GUI_COLOR_THUMBNAIL_HOVER_FONT
Definition gtk.h:116
@ DT_GUI_COLOR_THUMBNAIL_HOVER_OUTLINE
Definition gtk.h:113
struct _gui_collapsible_section_t dt_gui_collapsible_section_t
void dt_gui_new_collapsible_section(dt_gui_collapsible_section_t *cs, const char *confname, const char *label, GtkBox *parent, GtkPackType pack)
Create a collapsible section and pack it into the parent box.
Definition gtk.c:2666
GtkWidget * dt_ui_notebook_page(GtkNotebook *notebook, const char *text, const char *tooltip)
Definition gtk.c:1917
GtkNotebook * dt_ui_notebook_new()
Definition gtk.c:1912
static GtkWindow * dt_gtk_get_window(GtkWidget *widget)
Definition gtk.h:516
static GdkPixbuf * dt_gdk_pixbuf_new_from_file_at_size(const char *filename, int width, int height, GError **error)
Definition gtk.h:258
void dt_gui_add_help_link(GtkWidget *widget, const char *link)
Definition gtk.c:1684
static cairo_surface_t * dt_cairo_image_surface_create(cairo_format_t format, int width, int height)
Definition gtk.h:226
void dt_ui_container_destroy_children(dt_ui_t *ui, const dt_ui_container_t c)
destroy all child widgets from container
Definition gtk.c:1399
char * dt_gui_show_standalone_string_dialog(const char *title, const char *markup, const char *placeholder, const char *no_text, const char *yes_text)
Definition gtk.c:1600
int dt_gui_container_num_children(GtkContainer *container)
Definition gtk.c:2447
int dt_ui_panel_get_size(dt_ui_t *ui, const dt_ui_panel_t p)
get width of right, left, or bottom panel
Definition window_manager.c:69
void dt_gui_draw_rounded_rectangle(cairo_t *cr, float width, float height, float x, float y)
Definition gtk.c:2567
GtkWidget * dt_gui_container_nth_child(GtkContainer *container, int which)
Definition gtk.c:2467
void dt_gui_widget_init_auto_height(GtkWidget *widget, int min_rows, int max_rows)
Set the automatic height for a widget based on the number of rows or lines it contains.
Definition gtk.c:2404
static cairo_surface_t * dt_gdk_cairo_surface_create_from_pixbuf(const GdkPixbuf *pixbuf, int scale, GdkWindow *for_window)
Definition gtk.h:252
gboolean dt_ui_panel_visible(dt_ui_t *ui, const dt_ui_panel_t)
get visible state of panel
Definition display.c:192
void dt_gui_update_collapsible_section(dt_gui_collapsible_section_t *cs)
Definition gtk.c:2644
gboolean dt_ui_panel_ancestor(dt_ui_t *ui, const dt_ui_panel_t p, GtkWidget *w)
is the panel ancestor of widget
Definition window_manager.c:95
void dt_gui_load_theme(const char *theme)
Definition gtk.c:1691
void dt_capitalize_label(gchar *text)
Definition gtk.c:2709
int dt_gui_gtk_write_config()
Definition gtk.c:348
void dt_gui_store_last_preset(const char *name)
Definition gtk.c:396
void dt_ellipsize_combo(GtkComboBox *cbox)
Definition gtk.c:1474
GdkModifierType dt_key_modifier_state()
Definition gtk.c:1844
void dt_configure_ppd_dpi(dt_gui_gtk_t *gui)
Definition gtk.c:1225
void dt_gui_gtk_quit()
Definition gtk.c:375
void dt_ui_toggle_panels_visibility(dt_ui_t *ui)
toggle view of panels eg. collapse/expands to previous view state
Definition display.c:105
gboolean dt_gui_search_start(GtkWidget *widget, GdkEventKey *event, GtkSearchEntry *entry)
Definition gtk.c:2580
double dt_get_system_gui_ppd(GtkWidget *widget)
Definition gtk.c:1208
void dt_gui_container_destroy_children(GtkContainer *container)
Definition gtk.c:2494
GtkWidget * dt_ui_log_msg(dt_ui_t *ui)
get the log message widget
Definition window_manager.c:110
void dt_ui_notify_user()
draw user's attention
Definition gtk.c:1404
gboolean dt_gui_show_standalone_yes_no_dialog(const char *title, const char *markup, const char *no_text, const char *yes_text)
Definition gtk.c:1515
GtkWidget * dt_gui_get_popup_relative_widget(GtkWidget *widget, GdkRectangle *rect)
Resolve the widget used as parent for nested popups on Wayland.
Definition gtk.c:2500
void dt_ui_panel_show(dt_ui_t *ui, const dt_ui_panel_t, gboolean show, gboolean write)
shows/hide a panel
Definition display.c:117
int dt_gui_gtk_init(dt_gui_gtk_t *gui)
Definition gtk.c:987
GtkWidget * dt_ui_main_window(dt_ui_t *ui)
get the main window widget
Definition window_manager.c:119
static GtkWidget * dt_ui_section_label_new(const gchar *str)
Definition gtk.h:355
gboolean dt_gui_container_has_children(GtkContainer *container)
Definition gtk.c:2437
static int dt_cairo_image_surface_get_width(cairo_surface_t *surface)
Definition gtk.h:244
void dt_gui_refocus_center()
Definition gtk.c:2793
@ TREE_LIST_MIN_ROWS
Definition gtk.h:81
@ TREE_LIST_MAX_ROWS
Definition gtk.h:82
void dt_gui_gtk_set_source_rgba(cairo_t *cr, dt_gui_color_t, float opacity_coef)
Definition gtk.c:369
GtkWidget * dt_ui_scroll_wrap(GtkWidget *w, gint min_size, char *config_str)
Definition gtk.c:2056
static cairo_surface_t * dt_cairo_image_surface_create_for_data(unsigned char *data, cairo_format_t format, int width, int height, int stride)
Definition gtk.h:232
GtkBox * attach_popover(GtkWidget *widget, const char *icon, GtkWidget *content)
Definition gtk.c:2723
static void dt_ui_section_label_set(GtkWidget *label)
Definition gtk.h:347
void dt_gui_gtk_run(dt_gui_gtk_t *gui)
Definition gtk.c:1174
GtkWidget * dt_gui_container_first_child(GtkContainer *container)
Definition gtk.c:2457
GtkWidget * dt_ui_center_base(dt_ui_t *ui)
Definition window_manager.c:105
void dt_accels_disconnect_on_text_input(GtkWidget *widget)
Disconnects accels when a text or search entry gets the focus, and reconnects them when it looses it....
Definition gtk.c:2784
void dt_gui_add_class(GtkWidget *widget, const gchar *class_name)
Definition gtk.c:129
static GtkWidget * dt_ui_label_new(const gchar *str)
Definition gtk.h:365
static int dt_cairo_image_surface_get_height(cairo_surface_t *surface)
Definition gtk.h:248
void dt_ui_container_focus_widget(dt_ui_t *ui, const dt_ui_container_t c, GtkWidget *w)
gives a widget focus in the container
Definition gtk.c:1383
GtkBox * dt_ui_get_container(dt_ui_t *ui, const dt_ui_container_t c)
Definition window_manager.c:124
static const float x
Definition iop_profile.h:239
struct _GtkWidget GtkWidget
Definition splash.h:29
Definition gtk.h:202
gchar * confname
Definition gtk.h:204
GtkBox * container
Definition gtk.h:207
GtkWidget * toggle
Definition gtk.h:205
GtkWidget * expander
Definition gtk.h:206
GtkBox * parent
Definition gtk.h:203
GtkWidget * label
Definition gtk.h:208
struct dt_gui_gtk_t * gui
Definition darktable.h:703
Definition accelerators.h:120
Definition gtk.h:133
double dpi
Definition gtk.h:162
struct dt_gui_gtk_t::@44 mouse
double ppd
Definition gtk.h:162
gint scroll_mask
Definition gtk.h:179
double overlay_contrast
Definition gtk.h:160
int32_t center_tooltip
Definition gtk.h:146
cairo_surface_t * surface
Definition gtk.h:139
int32_t reset
Definition gtk.h:143
dt_accels_t * accels
Definition gtk.h:156
float effect_radius
Definition gtk.h:167
double overlay_red
Definition gtk.h:160
GtkMenu * presets_popup_menu
Definition gtk.h:140
GtkWidget * has_scroll_focus
Definition gtk.h:183
double overlay_green
Definition gtk.h:160
double dpi_factor
Definition gtk.h:162
dt_ui_t * ui
Definition gtk.h:135
GtkWidget * scroll_to[2]
Definition gtk.h:177
double overlay_blue
Definition gtk.h:160
dt_pthread_mutex_t mutex
Definition gtk.h:198
gboolean culling_mode
Definition gtk.h:149
int icon_size
Definition gtk.h:172
cairo_filter_t dr_filter_image
Definition gtk.h:186
gboolean selection_stacked
Definition gtk.h:153
struct dt_gui_gtk_t::@46 styles_popup
float effect_radius_scaled
Definition gtk.h:169
char gtkrc[PATH_MAX]
Definition gtk.h:175
GtkWidget * window
Definition gtk.h:190
cairo_filter_t filter_image
Definition gtk.h:185
char * last_preset
Definition gtk.h:141
struct dt_gui_gtk_t::@45 export_popup
dt_gui_widgets_t widgets
Definition gtk.h:137
GList * input_devices
Definition gtk.h:158
GdkRGBA colors[DT_GUI_COLOR_LAST]
Definition gtk.h:144
Definition gtk.h:212
gulong model_row_expanded
Definition gtk.h:221
int max_rows
Definition gtk.h:214
int min_rows
Definition gtk.h:213
gulong model_row_collapsed
Definition gtk.h:222
gulong buffer_changed
Definition gtk.h:223
gulong model_row_inserted
Definition gtk.h:217
GtkTreeModel * model
Definition gtk.h:215
gulong model_row_changed
Definition gtk.h:219
gulong model_rows_reordered
Definition gtk.h:220
gulong model_row_deleted
Definition gtk.h:218
GtkTextBuffer * buffer
Definition gtk.h:216
Definition gtk.h:86
int panel_handle_x
Definition gtk.h:93
gboolean panel_handle_dragging
Definition gtk.h:92
int panel_handle_y
Definition gtk.h:93
GtkGrid * panel_right
Definition gtk.h:89
GtkGrid * panel_left
Definition gtk.h:88
Definition window_manager.h:84
Definition ashift_lsd.c:1229
A widget to manage and display image thumbnails in Ansel's lighttable and filmstrip views.
dt_ui_container_t
Definition window_manager.h:49
dt_ui_panel_t
Definition window_manager.h:35