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-2022 darktable developers.
4
5 darktable 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 darktable 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 darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "common/darktable.h"
22#include "common/dtpthread.h"
23#include "dtgtk/thumbtable.h"
24#include "gui/window_manager.h"
25#include "gui/accelerators.h"
26
27#include <gtk/gtk.h>
28#include <stdint.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#define DT_GUI_IOP_MODULE_CONTROL_SPACING 0
35
36/* helper macro that applies the DPI transformation to fixed pixel values. input should be defaulting to 96
37 * DPI */
38#define DT_PIXEL_APPLY_DPI(value) ((value) * darktable.gui->dpi_factor)
39
40typedef struct dt_gui_widgets_t
41{
42 /* left panel */
43 GtkGrid *panel_left; // panel grid 3 rows, top,center,bottom and file on center
44 GtkGrid *panel_right;
45
46 /* resize of left/right panels */
50
86
87typedef struct dt_gui_gtk_t
88{
89
91
93
94 cairo_surface_t *surface;
97
98 int32_t reset;
100
101 int32_t center_tooltip; // 0 = no tooltip, 1 = new tooltip, 2 = old tooltip
102
103 // Culling mode is a special case of collection filter that is restricted to user selection
104 gboolean culling_mode;
105
106 // Track if the current selection has pushed on the backup copy
107 // see common/selection.h:dt_selection_push()
109
110 // Global accelerators for main menu, needed for GtkMenu mnemonics.
112
114
116
118
119 int icon_size; // size of top panel icons
120
121 // store which gtkrc we loaded:
123
124 GtkWidget *scroll_to[2]; // one for left, one for right
125
127
128 // scrolling focus
129 // This emulates the same feature as Gtk focus, but to capture scrolling events
131
132 cairo_filter_t filter_image; // filtering used for all modules expect darkroom
133 cairo_filter_t dr_filter_image; // filtering used in the darkroom
134
135 // Export popup window
136 struct {
137 GtkWidget *window;
138 GtkWidget *module;
140
141 dt_pthread_mutex_t mutex;
143
145{
146 GtkBox *parent; // the parent widget
147 gchar *confname; // configuration name for the toggle status
148 GtkWidget *toggle; // toggle button
149 GtkWidget *expander; // the expanded
150 GtkBox *container; // the container for all widgets into the section
151 GtkWidget *label; // The section label
153
154static inline cairo_surface_t *dt_cairo_image_surface_create(cairo_format_t format, int width, int height) {
155 cairo_surface_t *cst = cairo_image_surface_create(format, width * darktable.gui->ppd, height * darktable.gui->ppd);
156 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
157 return cst;
158}
159
160static inline cairo_surface_t *dt_cairo_image_surface_create_for_data(unsigned char *data, cairo_format_t format, int width, int height, int stride) {
161 cairo_surface_t *cst = cairo_image_surface_create_for_data(data, format, width, height, stride);
162 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
163 return cst;
164}
165
166static inline cairo_surface_t *dt_cairo_image_surface_create_from_png(const char *filename) {
167 cairo_surface_t *cst = cairo_image_surface_create_from_png(filename);
168 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
169 return cst;
170}
171
172static inline int dt_cairo_image_surface_get_width(cairo_surface_t *surface) {
173 return cairo_image_surface_get_width(surface) / darktable.gui->ppd;
174}
175
176static inline int dt_cairo_image_surface_get_height(cairo_surface_t *surface) {
177 return cairo_image_surface_get_height(surface) / darktable.gui->ppd;
178}
179
180static inline cairo_surface_t *dt_gdk_cairo_surface_create_from_pixbuf(const GdkPixbuf *pixbuf, int scale, GdkWindow *for_window) {
181 cairo_surface_t *cst = gdk_cairo_surface_create_from_pixbuf(pixbuf, scale, for_window);
182 cairo_surface_set_device_scale(cst, darktable.gui->ppd, darktable.gui->ppd);
183 return cst;
184}
185
186static inline GdkPixbuf *dt_gdk_pixbuf_new_from_file_at_size(const char *filename, int width, int height, GError **error) {
187 return gdk_pixbuf_new_from_file_at_size(filename, width * darktable.gui->ppd, height * darktable.gui->ppd, error);
188}
189
190// 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)
191void dt_gui_add_class(GtkWidget *widget, const gchar *class_name);
192void dt_gui_remove_class(GtkWidget *widget, const gchar *class_name);
193
196void dt_gui_gtk_quit();
197void dt_gui_store_last_preset(const char *name);
200void dt_gui_gtk_set_source_rgba(cairo_t *cr, dt_gui_color_t, float opacity_coef);
201double dt_get_system_gui_ppd(GtkWidget *widget);
202
203/* Return requested scroll delta(s) from event. If delta_x or delta_y
204 * is NULL, do not return that delta. Return TRUE if requested deltas
205 * can be retrieved. Handles both GDK_SCROLL_UP/DOWN/LEFT/RIGHT and
206 * GDK_SCROLL_SMOOTH style scroll events. */
207gboolean dt_gui_get_scroll_deltas(const GdkEventScroll *event, gdouble *delta_x, gdouble *delta_y);
208/* Same as above, except accumulate smooth scrolls deltas of < 1 and
209 * only set deltas and return TRUE once scrolls accumulate to >= 1.
210 * Effectively makes smooth scroll events act like old-style unit
211 * scroll events. */
212gboolean dt_gui_get_scroll_unit_deltas(const GdkEventScroll *event, int *delta_x, int *delta_y);
213
214/* Note that on macOS Shift+vertical scroll can be reported as Shift+horizontal scroll.
215 * So if Shift changes scrolling effect, both scrolls should be handled the same.
216 * For this case (or if it's otherwise useful) use the following 2 functions. */
217
218/* Return sum of scroll deltas from event. Return TRUE if any deltas
219 * can be retrieved. Handles both GDK_SCROLL_UP/DOWN/LEFT/RIGHT and
220 * GDK_SCROLL_SMOOTH style scroll events. */
221gboolean dt_gui_get_scroll_delta(const GdkEventScroll *event, gdouble *delta);
222/* Same as above, except accumulate smooth scrolls deltas of < 1 and
223 * only set delta and return TRUE once scrolls accumulate to >= 1.
224 * Effectively makes smooth scroll events act like old-style unit
225 * scroll events. */
226gboolean dt_gui_get_scroll_unit_delta(const GdkEventScroll *event, int *delta);
227
229void dt_ui_container_focus_widget(dt_ui_t *ui, const dt_ui_container_t c, GtkWidget *w);
231void dt_ui_container_foreach(dt_ui_t *ui, const dt_ui_container_t c, GtkCallback callback);
235void dt_ui_panel_show(dt_ui_t *ui, const dt_ui_panel_t, gboolean show, gboolean write);
239void dt_ui_notify_user();
241gboolean dt_ui_panel_visible(dt_ui_t *ui, const dt_ui_panel_t);
245gboolean dt_ui_panel_ancestor(dt_ui_t *ui, const dt_ui_panel_t p, GtkWidget *w);
247GtkWidget *dt_ui_center(dt_ui_t *ui);
248GtkWidget *dt_ui_center_base(dt_ui_t *ui);
250GtkWidget *dt_ui_main_window(dt_ui_t *ui);
251
253GtkWidget *dt_ui_log_msg(dt_ui_t *ui);
255GtkWidget *dt_ui_toast_msg(dt_ui_t *ui);
256
257GtkBox *dt_ui_get_container(dt_ui_t *ui, const dt_ui_container_t c);
258
259/* activate ellipsization of the combox entries */
260void dt_ellipsize_combo(GtkComboBox *cbox);
261
262// capitalize strings. Because grammar says sentences start with a capital,
263// and typography says it makes it easier to extract the structure of the text.
264void dt_capitalize_label(gchar *text);
265
266#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)
267
268#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)
269
270#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)
271
272#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)
273
274
275static inline void dt_ui_section_label_set(GtkWidget *label)
276{
277 gtk_widget_set_halign(label, GTK_ALIGN_FILL); // make it span the whole available width
278 gtk_label_set_xalign (GTK_LABEL(label), 0.5f);
279 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END); // ellipsize labels
280 dt_gui_add_class(label, "dt_section_label"); // make sure that we can style these easily
281}
282
283static inline GtkWidget *dt_ui_section_label_new(const gchar *str)
284{
285 gchar *str_cpy = g_strdup(str);
286 dt_capitalize_label(str_cpy);
287 GtkWidget *label = gtk_label_new(str_cpy);
288 g_free(str_cpy);
290 return label;
291};
292
293static inline GtkWidget *dt_ui_label_new(const gchar *str)
294{
295 gchar *str_cpy = g_strdup(str);
296 dt_capitalize_label(str_cpy);
297 GtkWidget *label = gtk_label_new(str_cpy);
298 g_free(str_cpy);
299 gtk_widget_set_halign(label, GTK_ALIGN_START);
300 gtk_label_set_xalign (GTK_LABEL(label), 0.0f);
301 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
302 return label;
303};
304
305GtkNotebook *dt_ui_notebook_new();
306
307GtkWidget *dt_ui_notebook_page(GtkNotebook *notebook, const char *text, const char *tooltip);
308
309// show a dialog box with 2 buttons in case some user interaction is required BEFORE dt's gui is initialised.
310// this expects gtk_init() to be called already which should be the case during most of dt's init phase.
311gboolean dt_gui_show_standalone_yes_no_dialog(const char *title, const char *markup, const char *no_text,
312 const char *yes_text);
313
314// similar to the one above. this one asks the user for some string. the hint is shown in the empty entry box
315char *dt_gui_show_standalone_string_dialog(const char *title, const char *markup, const char *placeholder,
316 const char *no_text, const char *yes_text);
317
318void dt_gui_add_help_link(GtkWidget *widget, const char *link);
319
320// load a CSS theme
321void dt_gui_load_theme(const char *theme);
322
323// reload GUI scalings
325
326// return modifier keys currently pressed, independent of any key event
327GdkModifierType dt_key_modifier_state();
328
329GtkWidget *dt_ui_scroll_wrap(GtkWidget *w, gint min_size, char *config_str);
330
331// check whether the given container has any user-added children
332gboolean dt_gui_container_has_children(GtkContainer *container);
333// return a count of the user-added children in the given container
335// return the first child of the given container
336GtkWidget *dt_gui_container_first_child(GtkContainer *container);
337// return the requested child of the given container, or NULL if it has fewer children
338GtkWidget *dt_gui_container_nth_child(GtkContainer *container, int which);
339
340// remove all of the children we've added to the container. Any which no longer have any references will
341// be destroyed.
343
344// delete all of the children we've added to the container. Use this function only if you are SURE
345// there are no other references to any of the children (if in doubt, use dt_gui_container_remove_children
346// instead; it's a bit slower but safer).
348
349void dt_gui_menu_popup(GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor);
350
351void dt_gui_draw_rounded_rectangle(cairo_t *cr, float width, float height, float x, float y);
352
353// event handler for "key-press-event" of GtkTreeView to decide if focus switches to GtkSearchEntry
354gboolean dt_gui_search_start(GtkWidget *widget, GdkEventKey *event, GtkSearchEntry *entry);
355
356// event handler for "stop-search" of GtkSearchEntry
357void dt_gui_search_stop(GtkSearchEntry *entry, GtkWidget *widget);
358
359// create a collapsible section, insert in parent, return the container
361 const char *confname, const char *label,
362 GtkBox *parent);
363// routine to be called from gui_update
365
366// routine to hide the collapsible section
368
377GtkBox *attach_popover(GtkWidget *widget, const char *icon, GtkWidget *content);
378
391GtkBox *attach_help_popover(GtkWidget *widget, const char *label);
392
393
400void dt_accels_disconnect_on_text_input(GtkWidget *widget);
401
402// Get the top-most window attached to a widget.
403// This is a dynamic get that takes into account destroyed widgets and such.
404static inline GtkWindow *dt_gtk_get_window(GtkWidget *widget)
405{
406 if(!widget) return NULL;
407 GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
408 if(toplevel && gtk_widget_is_toplevel(toplevel)) return GTK_WINDOW(toplevel);
409 return NULL;
410}
411
412
413// Give back the focus to the main/center widget, either
414// image in darkroom or thumbtable in lighttable
416
417#ifdef __cplusplus
418}
419#endif
420
421// clang-format off
422// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
423// vim: shiftwidth=2 expandtab tabstop=2 cindent
424// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
425// clang-format on
Handle default and user-set shortcuts (accelerators)
static void error(char *msg)
Definition ashift_lsd.c:191
uint32_t container(dt_lib_module_t *self)
Definition backgroundjobs.c:61
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
const char * tooltip
Definition common/image.h:163
char * name
Definition common/metadata.c:41
darktable_t darktable
Definition darktable.c:111
#define PATH_MAX
Definition darktable.h:824
GtkWidget * dt_ui_toast_msg(dt_ui_t *ui)
get the toast message widget
Definition window_manager.c:94
gboolean dt_gui_get_scroll_deltas(const GdkEventScroll *event, gdouble *delta_x, gdouble *delta_y)
Definition gtk.c:97
GtkWidget * dt_ui_center(dt_ui_t *ui)
get the center drawable widget
Definition window_manager.c:81
void dt_gui_gtk_set_source_rgb(cairo_t *cr, dt_gui_color_t)
Definition gtk.c:306
GtkBox * attach_help_popover(GtkWidget *widget, const char *label)
Definition gtk.c:1806
void dt_gui_menu_popup(GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor)
Definition gtk.c:1601
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:885
gboolean dt_gui_get_scroll_delta(const GdkEventScroll *event, gdouble *delta)
Definition gtk.c:240
void dt_gui_container_remove_children(GtkContainer *container)
Definition gtk.c:1583
gboolean dt_gui_get_scroll_unit_deltas(const GdkEventScroll *event, int *delta_x, int *delta_y)
Definition gtk.c:157
static cairo_surface_t * dt_cairo_image_surface_create_from_png(const char *filename)
Definition gtk.h:166
gboolean dt_gui_get_scroll_unit_delta(const GdkEventScroll *event, int *delta)
Definition gtk.c:251
void dt_gui_search_stop(GtkSearchEntry *entry, GtkWidget *widget)
Definition gtk.c:1650
void dt_gui_new_collapsible_section(dt_gui_collapsible_section_t *cs, const char *confname, const char *label, GtkBox *parent)
Definition gtk.c:1725
void dt_gui_hide_collapsible_section(dt_gui_collapsible_section_t *cs)
Definition gtk.c:1718
void dt_gui_remove_class(GtkWidget *widget, const gchar *class_name)
Definition gtk.c:82
dt_gui_color_t
Definition gtk.h:52
@ DT_GUI_COLOR_BG
Definition gtk.h:53
@ DT_GUI_COLOR_DARKROOM_PREVIEW_BG
Definition gtk.h:55
@ DT_GUI_COLOR_LIGHTTABLE_FONT
Definition gtk.h:58
@ DT_GUI_COLOR_MAP_LOC_SHAPE_HIGH
Definition gtk.h:81
@ DT_GUI_COLOR_LOG_FG
Definition gtk.h:77
@ DT_GUI_COLOR_BRUSH_CURSOR
Definition gtk.h:60
@ DT_GUI_COLOR_LAST
Definition gtk.h:84
@ DT_GUI_COLOR_THUMBNAIL_FONT
Definition gtk.h:69
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_BG
Definition gtk.h:64
@ DT_GUI_COLOR_MAP_COUNT_BG
Definition gtk.h:80
@ DT_GUI_COLOR_LOG_BG
Definition gtk.h:76
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_BORDER
Definition gtk.h:73
@ DT_GUI_COLOR_THUMBNAIL_OUTLINE
Definition gtk.h:66
@ DT_GUI_COLOR_MAP_LOC_SHAPE_LOW
Definition gtk.h:82
@ DT_GUI_COLOR_LIGHTTABLE_BG
Definition gtk.h:56
@ DT_GUI_COLOR_BUTTON_FG
Definition gtk.h:62
@ DT_GUI_COLOR_DARKROOM_BG
Definition gtk.h:54
@ DT_GUI_COLOR_THUMBNAIL_BORDER
Definition gtk.h:72
@ DT_GUI_COLOR_LIGHTTABLE_PREVIEW_BG
Definition gtk.h:57
@ DT_GUI_COLOR_MAP_COUNT_SAME_LOC
Definition gtk.h:78
@ DT_GUI_COLOR_MAP_COUNT_DIFF_LOC
Definition gtk.h:79
@ DT_GUI_COLOR_THUMBNAIL_BG
Definition gtk.h:63
@ DT_GUI_COLOR_PREVIEW_HOVER_BORDER
Definition gtk.h:75
@ DT_GUI_COLOR_FILMSTRIP_BG
Definition gtk.h:74
@ DT_GUI_COLOR_BRUSH_TRACE
Definition gtk.h:61
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_FONT
Definition gtk.h:70
@ DT_GUI_COLOR_THUMBNAIL_SELECTED_OUTLINE
Definition gtk.h:67
@ DT_GUI_COLOR_THUMBNAIL_HOVER_BG
Definition gtk.h:65
@ DT_GUI_COLOR_PRINT_BG
Definition gtk.h:59
@ DT_GUI_COLOR_MAP_LOC_SHAPE_DEF
Definition gtk.h:83
@ DT_GUI_COLOR_THUMBNAIL_HOVER_FONT
Definition gtk.h:71
@ DT_GUI_COLOR_THUMBNAIL_HOVER_OUTLINE
Definition gtk.h:68
struct _gui_collapsible_section_t dt_gui_collapsible_section_t
GtkWidget * dt_ui_notebook_page(GtkNotebook *notebook, const char *text, const char *tooltip)
Definition gtk.c:1391
GtkNotebook * dt_ui_notebook_new()
Definition gtk.c:1386
static GtkWindow * dt_gtk_get_window(GtkWidget *widget)
Definition gtk.h:404
static GdkPixbuf * dt_gdk_pixbuf_new_from_file_at_size(const char *filename, int width, int height, GError **error)
Definition gtk.h:186
void dt_gui_add_help_link(GtkWidget *widget, const char *link)
Definition gtk.c:1158
static cairo_surface_t * dt_cairo_image_surface_create(cairo_format_t format, int width, int height)
Definition gtk.h:154
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:891
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:1074
int dt_gui_container_num_children(GtkContainer *container)
Definition gtk.c:1551
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:49
void dt_gui_draw_rounded_rectangle(cairo_t *cr, float width, float height, float x, float y)
Definition gtk.c:1626
GtkWidget * dt_gui_container_nth_child(GtkContainer *container, int which)
Definition gtk.c:1569
static cairo_surface_t * dt_gdk_cairo_surface_create_from_pixbuf(const GdkPixbuf *pixbuf, int scale, GdkWindow *for_window)
Definition gtk.h:180
gboolean dt_ui_panel_visible(dt_ui_t *ui, const dt_ui_panel_t)
get visible state of panel
Definition display.c:174
void dt_gui_update_collapsible_section(dt_gui_collapsible_section_t *cs)
Definition gtk.c:1703
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:75
void dt_gui_load_theme(const char *theme)
Definition gtk.c:1165
void dt_capitalize_label(gchar *text)
Definition gtk.c:1763
int dt_gui_gtk_write_config()
Definition gtk.c:291
void dt_gui_store_last_preset(const char *name)
Definition gtk.c:340
void dt_ellipsize_combo(GtkComboBox *cbox)
Definition gtk.c:956
GdkModifierType dt_key_modifier_state()
Definition gtk.c:1318
void dt_configure_ppd_dpi(dt_gui_gtk_t *gui)
Definition gtk.c:719
void dt_gui_gtk_quit()
Definition gtk.c:318
void dt_ui_toggle_panels_visibility(dt_ui_t *ui)
toggle view of panels eg. collapse/expands to previous view state
Definition display.c:87
gboolean dt_gui_search_start(GtkWidget *widget, GdkEventKey *event, GtkSearchEntry *entry)
Definition gtk.c:1639
double dt_get_system_gui_ppd(GtkWidget *widget)
Definition gtk.c:702
void dt_gui_container_destroy_children(GtkContainer *container)
Definition gtk.c:1595
GtkWidget * dt_ui_log_msg(dt_ui_t *ui)
get the log message widget
Definition window_manager.c:90
void dt_ui_notify_user()
draw user's attention
Definition gtk.c:896
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:989
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:99
int dt_gui_gtk_init(dt_gui_gtk_t *gui)
Definition gtk.c:511
GtkWidget * dt_ui_main_window(dt_ui_t *ui)
get the main window widget
Definition window_manager.c:99
static GtkWidget * dt_ui_section_label_new(const gchar *str)
Definition gtk.h:283
gboolean dt_gui_container_has_children(GtkContainer *container)
Definition gtk.c:1542
static int dt_cairo_image_surface_get_width(cairo_surface_t *surface)
Definition gtk.h:172
void dt_gui_refocus_center()
Definition gtk.c:1846
void dt_gui_gtk_set_source_rgba(cairo_t *cr, dt_gui_color_t, float opacity_coef)
Definition gtk.c:312
GtkWidget * dt_ui_scroll_wrap(GtkWidget *w, gint min_size, char *config_str)
Definition gtk.c:1530
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:160
GtkBox * attach_popover(GtkWidget *widget, const char *icon, GtkWidget *content)
Definition gtk.c:1777
static void dt_ui_section_label_set(GtkWidget *label)
Definition gtk.h:275
void dt_gui_gtk_run(dt_gui_gtk_t *gui)
Definition gtk.c:668
GtkWidget * dt_gui_container_first_child(GtkContainer *container)
Definition gtk.c:1560
GtkWidget * dt_ui_center_base(dt_ui_t *ui)
Definition window_manager.c:85
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:1837
void dt_gui_add_class(GtkWidget *widget, const gchar *class_name)
Definition gtk.c:72
static GtkWidget * dt_ui_label_new(const gchar *str)
Definition gtk.h:293
static int dt_cairo_image_surface_get_height(cairo_surface_t *surface)
Definition gtk.h:176
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:875
GtkBox * dt_ui_get_container(dt_ui_t *ui, const dt_ui_container_t c)
Definition window_manager.c:104
Definition gtk.h:145
gchar * confname
Definition gtk.h:147
GtkBox * container
Definition gtk.h:150
GtkWidget * toggle
Definition gtk.h:148
GtkWidget * expander
Definition gtk.h:149
GtkBox * parent
Definition gtk.h:146
GtkWidget * label
Definition gtk.h:151
struct dt_gui_gtk_t * gui
Definition darktable.h:541
Definition accelerators.h:87
Definition gtk.h:88
double dpi
Definition gtk.h:117
double ppd
Definition gtk.h:117
gint scroll_mask
Definition gtk.h:126
double overlay_contrast
Definition gtk.h:115
int32_t center_tooltip
Definition gtk.h:101
cairo_surface_t * surface
Definition gtk.h:94
int32_t reset
Definition gtk.h:98
dt_accels_t * accels
Definition gtk.h:111
double overlay_red
Definition gtk.h:115
GtkMenu * presets_popup_menu
Definition gtk.h:95
struct dt_gui_gtk_t::@40 export_popup
GtkWidget * has_scroll_focus
Definition gtk.h:130
double overlay_green
Definition gtk.h:115
double dpi_factor
Definition gtk.h:117
dt_ui_t * ui
Definition gtk.h:90
GtkWidget * scroll_to[2]
Definition gtk.h:124
double overlay_blue
Definition gtk.h:115
dt_pthread_mutex_t mutex
Definition gtk.h:141
gboolean culling_mode
Definition gtk.h:104
int icon_size
Definition gtk.h:119
cairo_filter_t dr_filter_image
Definition gtk.h:133
gboolean selection_stacked
Definition gtk.h:108
char gtkrc[PATH_MAX]
Definition gtk.h:122
GtkWidget * window
Definition gtk.h:137
cairo_filter_t filter_image
Definition gtk.h:132
char * last_preset
Definition gtk.h:96
dt_gui_widgets_t widgets
Definition gtk.h:92
GList * input_devices
Definition gtk.h:113
GdkRGBA colors[DT_GUI_COLOR_LAST]
Definition gtk.h:99
Definition gtk.h:41
int panel_handle_x
Definition gtk.h:48
gboolean panel_handle_dragging
Definition gtk.h:47
int panel_handle_y
Definition gtk.h:48
GtkGrid * panel_right
Definition gtk.h:44
GtkGrid * panel_left
Definition gtk.h:43
Definition window_manager.h:66
A widget to manage and display image thumbnails in Ansel's lighttable and filmstrip views.
dt_ui_container_t
Definition window_manager.h:31
dt_ui_panel_t
Definition window_manager.h:17