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
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)
233 cairo_surface_t *cst = cairo_image_surface_create_for_data(data, format,
width,
height, stride);
239 cairo_surface_t *cst = cairo_image_surface_create_from_png(filename);
253 cairo_surface_t *cst = gdk_cairo_surface_create_from_pixbuf(pixbuf, scale, for_window);
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)
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)
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)
344#define dt_accels_new_map_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->map_accels, c, d, e, f, FALSE, g)
346#define dt_accels_new_print_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->print_accels, c, d, e, f, FALSE, g)
348#define dt_accels_new_slideshow_action(a, b, c, d, e, f, g) dt_accels_new_action_shortcut(darktable.gui->accels, a, b, darktable.gui->accels->slideshow_accels, c, d, e, f, FALSE, g)
350#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)
355 gtk_widget_set_halign(label, GTK_ALIGN_FILL);
356 gtk_label_set_xalign (GTK_LABEL(label), 0.5f);
357 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
363 gchar *str_cpy = g_strdup(str);
365 GtkWidget *label = gtk_label_new(str_cpy);
373 gchar *str_cpy = g_strdup(str);
375 GtkWidget *label = gtk_label_new(str_cpy);
377 gtk_widget_set_halign(label, GTK_ALIGN_START);
378 gtk_label_set_xalign (GTK_LABEL(label), 0.0f);
379 gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
390 const char *yes_text);
394 const char *no_text,
const char *yes_text);
479 const char *confname,
const char *label,
480 GtkBox *parent, GtkPackType pack);
525 GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
526 if(toplevel && gtk_widget_is_toplevel(toplevel))
return GTK_WINDOW(toplevel);
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:309
const float delta
Definition colorspaces_inline_conversions.h:491
darktable_t darktable
Definition darktable.c:173
#define dt_free(ptr)
Definition darktable.h:456
#define PATH_MAX
Definition darktable.h:1061
#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 darktable.h:281
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:2754
void dt_gui_menu_popup(GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor)
Definition gtk.c:2529
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:1394
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:2483
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:2592
void dt_gui_hide_collapsible_section(dt_gui_collapsible_section_t *cs)
Definition gtk.c:2660
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:2667
GtkWidget * dt_ui_notebook_page(GtkNotebook *notebook, const char *text, const char *tooltip)
Definition gtk.c:1918
GtkNotebook * dt_ui_notebook_new()
Definition gtk.c:1913
static GtkWindow * dt_gtk_get_window(GtkWidget *widget)
Definition gtk.h:522
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:1685
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:1400
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:1601
int dt_gui_container_num_children(GtkContainer *container)
Definition gtk.c:2448
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:2568
GtkWidget * dt_gui_container_nth_child(GtkContainer *container, int which)
Definition gtk.c:2468
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:2405
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:211
void dt_gui_update_collapsible_section(dt_gui_collapsible_section_t *cs)
Definition gtk.c:2645
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:1692
void dt_capitalize_label(gchar *text)
Definition gtk.c:2710
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:1475
GdkModifierType dt_key_modifier_state()
Definition gtk.c:1845
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:112
gboolean dt_gui_search_start(GtkWidget *widget, GdkEventKey *event, GtkSearchEntry *entry)
Definition gtk.c:2581
double dt_get_system_gui_ppd(GtkWidget *widget)
Definition gtk.c:1208
void dt_gui_container_destroy_children(GtkContainer *container)
Definition gtk.c:2495
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:1405
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:1516
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:2501
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:124
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:361
gboolean dt_gui_container_has_children(GtkContainer *container)
Definition gtk.c:2438
static int dt_cairo_image_surface_get_width(cairo_surface_t *surface)
Definition gtk.h:244
void dt_gui_refocus_center()
Definition gtk.c:2794
@ 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:2057
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:2724
static void dt_ui_section_label_set(GtkWidget *label)
Definition gtk.h:353
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:2458
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:2785
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:371
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:1384
GtkBox * dt_ui_get_container(dt_ui_t *ui, const dt_ui_container_t c)
Definition window_manager.c:124
const char * tooltip
Definition image.h:217
static const float x
Definition iop_profile.h:235
struct _GtkWidget GtkWidget
Definition splash.h:29
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:774
Definition accelerators.h:120
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 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