Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
widget_settings.h File Reference
#include <gtk/gtk.h>
#include <pthread.h>
#include <stdarg.h>
+ Include dependency graph for widget_settings.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_gui_freeze_token_t
 
struct  dt_widget_overlay_color_t
 

Macros

#define dt_gui_freeze_begin()   dt_gui_freeze_begin_(__FILE__, __LINE__)
 
#define dt_gui_freeze_end()   dt_gui_freeze_end_(__FILE__, __LINE__)
 
#define DT_FREEZE_CAT_(a, b)   a##b
 
#define DT_FREEZE_CAT(a, b)   DT_FREEZE_CAT_(a, b)
 
#define dt_gui_widget_freeze()
 
#define dt_widget_log(...)   do { } while(0)
 
#define dt_widget_log_enabled()   FALSE
 
#define DT_UI_SCALE_UI(value)   ((value) * dt_widget_dpi_factor())
 
#define DT_UI_SCALE_DEVICE(value)   ((value) * dt_widget_dpi_factor() * dt_widget_ppd())
 
#define DT_PIXEL_APPLY_DPI(value)   DT_UI_SCALE_UI(value)
 
#define DT_PIXEL_APPLY_DPI_DPP(value)   DT_UI_SCALE_DEVICE(value)
 
#define DT_GUI_EM_SIZE   ((gint)dt_widget_em_size())
 
#define DT_GUI_BOX_SPACING_EM   0.625
 
#define DT_GUI_BOX_SPACING   ((gint)(DT_GUI_EM_SIZE * DT_GUI_BOX_SPACING_EM + 0.5))
 
#define DT_GUI_MOUSE_EFFECT_RADIUS   dt_widget_mouse_radius_clamped()
 
#define dt_gtk_widget_queue_draw(widget)   gtk_widget_queue_draw(widget)
 
#define dt_gtk_toggle_button_set_active(toggle_button, active)   gtk_toggle_button_set_active(toggle_button, active)
 

Typedefs

typedef GtkWidget *(* dt_widget_root_window_handler_t) (void)
 
typedef gint(* dt_widget_natural_width_handler_t) (GtkWidget *widget)
 
typedef void(* dt_widget_message_handler_t) (const char *message)
 
typedef void(* dt_widget_cursor_handler_t) (GdkCursorType cursor)
 
typedef gboolean(* dt_widget_stored_int_getter_t) (const char *key, int *value)
 
typedef void(* dt_widget_stored_int_setter_t) (const char *key, int value)
 
typedef gboolean(* dt_widget_stored_bool_getter_t) (const char *key)
 
typedef void(* dt_widget_stored_bool_setter_t) (const char *key, gboolean value)
 
typedef void(* dt_widget_refocus_handler_t) (void)
 
typedef void(* dt_widget_notebook_page_handler_t) (gpointer owner)
 
typedef enum dt_gui_color_t dt_gui_color_t
 
typedef struct dt_widget_overlay_color_t dt_widget_overlay_color_t
 

Enumerations

enum  {
  DT_WIDGET_COLORLABEL_RED = 0 ,
  DT_WIDGET_COLORLABEL_YELLOW ,
  DT_WIDGET_COLORLABEL_GREEN ,
  DT_WIDGET_COLORLABEL_BLUE ,
  DT_WIDGET_COLORLABEL_PURPLE ,
  DT_WIDGET_COLORLABEL_COUNT
}
 
enum  dt_gui_color_t {
  DT_GUI_COLOR_BG = 0 ,
  DT_GUI_COLOR_DARKROOM_BG ,
  DT_GUI_COLOR_DARKROOM_PREVIEW_BG ,
  DT_GUI_COLOR_LIGHTTABLE_BG ,
  DT_GUI_COLOR_LIGHTTABLE_PREVIEW_BG ,
  DT_GUI_COLOR_LIGHTTABLE_FONT ,
  DT_GUI_COLOR_PRINT_BG ,
  DT_GUI_COLOR_BRUSH_CURSOR ,
  DT_GUI_COLOR_BRUSH_TRACE ,
  DT_GUI_COLOR_BUTTON_FG ,
  DT_GUI_COLOR_THUMBNAIL_BG ,
  DT_GUI_COLOR_THUMBNAIL_SELECTED_BG ,
  DT_GUI_COLOR_THUMBNAIL_HOVER_BG ,
  DT_GUI_COLOR_THUMBNAIL_OUTLINE ,
  DT_GUI_COLOR_THUMBNAIL_SELECTED_OUTLINE ,
  DT_GUI_COLOR_THUMBNAIL_HOVER_OUTLINE ,
  DT_GUI_COLOR_THUMBNAIL_FONT ,
  DT_GUI_COLOR_THUMBNAIL_SELECTED_FONT ,
  DT_GUI_COLOR_THUMBNAIL_HOVER_FONT ,
  DT_GUI_COLOR_THUMBNAIL_BORDER ,
  DT_GUI_COLOR_THUMBNAIL_SELECTED_BORDER ,
  DT_GUI_COLOR_FILMSTRIP_BG ,
  DT_GUI_COLOR_PREVIEW_HOVER_BORDER ,
  DT_GUI_COLOR_LOG_BG ,
  DT_GUI_COLOR_LOG_FG ,
  DT_GUI_COLOR_MAP_COUNT_SAME_LOC ,
  DT_GUI_COLOR_MAP_COUNT_DIFF_LOC ,
  DT_GUI_COLOR_MAP_COUNT_BG ,
  DT_GUI_COLOR_MAP_LOC_SHAPE_HIGH ,
  DT_GUI_COLOR_MAP_LOC_SHAPE_LOW ,
  DT_GUI_COLOR_MAP_LOC_SHAPE_DEF ,
  DT_GUI_COLOR_WARNING ,
  DT_GUI_COLOR_LAST
}
 

Functions

G_BEGIN_DECLS GdkEventMask dt_widget_scroll_mask (void)
 
void dt_widget_set_scroll_mask (GdkEventMask mask)
 
GtkWidgetdt_widget_scroll_focus (void)
 
void dt_widget_set_scroll_focus (GtkWidget *widget)
 
cairo_filter_t dt_widget_image_filter (void)
 
void dt_widget_set_image_filter (cairo_filter_t filter)
 
gboolean dt_gui_widgets_suppressed (void)
 
void dt_widget_set_gui_thread (pthread_t thread)
 
void dt_gui_freeze_begin_ (const char *file, int line)
 
void dt_gui_freeze_end_ (const char *file, int line)
 
void dt_gui_freeze_reset (void)
 
static void dt_gui_freeze_release_ (dt_gui_freeze_token_t *t)
 
gboolean dt_gui_get_scroll_unit_deltas (const GdkEventScroll *event, int *delta_x, int *delta_y)
 
gboolean dt_gui_get_scroll_unit_delta (const GdkEventScroll *event, int *delta)
 
void dt_widget_set_scroll_reversed (gboolean reverse_x, gboolean reverse_y)
 
void dt_widget_set_root_window_handler (dt_widget_root_window_handler_t handler)
 
GtkWidgetdt_widget_root_window (void)
 
void dt_widget_set_natural_width_handler (dt_widget_natural_width_handler_t handler)
 
gint dt_widget_natural_width (GtkWidget *widget)
 
void dt_widget_set_message_handler (dt_widget_message_handler_t handler)
 
void dt_widget_message (const char *message)
 
void dt_widget_set_cursor_handler (dt_widget_cursor_handler_t handler)
 
void dt_widget_set_cursor (GdkCursorType cursor)
 
gboolean dt_widget_debug_overlays (void)
 
void dt_widget_set_debug_overlays (gboolean enabled)
 
void dt_widget_set_storage_handlers (dt_widget_stored_int_getter_t get_int, dt_widget_stored_int_setter_t set_int, dt_widget_stored_bool_getter_t get_bool, dt_widget_stored_bool_setter_t set_bool)
 
gboolean dt_widget_stored_int (const char *key, int *value)
 
void dt_widget_store_int (const char *key, int value)
 
gboolean dt_widget_stored_bool (const char *key)
 
void dt_widget_store_bool (const char *key, gboolean value)
 
gboolean dt_widget_theme_loaded (void)
 
void dt_widget_set_theme_loaded (gboolean loaded)
 
void dt_widget_set_refocus_handler (dt_widget_refocus_handler_t handler)
 
void dt_widget_refocus (void)
 
void dt_widget_set_notebook_page_handler (dt_widget_notebook_page_handler_t handler)
 
void dt_widget_notebook_page_changed (gpointer owner)
 
double dt_widget_dpi (void)
 
void dt_widget_set_dpi (double dpi)
 
gboolean dt_widget_metrics_probed (void)
 
double dt_widget_dpi_factor (void)
 
void dt_widget_set_dpi_factor (double factor)
 
double dt_widget_ppd (void)
 
void dt_widget_set_ppd (double ppd)
 
gint dt_widget_min_panel_width (void)
 
void dt_widget_set_min_panel_width (gint width)
 
double dt_widget_em_size (void)
 
void dt_widget_set_em_size (double em)
 
double dt_get_system_gui_ppd (GtkWidget *widget)
 
GdkModifierType dt_key_modifier_state (void)
 
const GdkRGBA * dt_widget_colorlabel (int index)
 
void dt_widget_set_colorlabels (const GdkRGBA *labels, int count)
 
static gboolean dt_modifier_is (const GdkModifierType state, const GdkModifierType desired_modifier_mask)
 
static gboolean dt_modifiers_include (const GdkModifierType state, const GdkModifierType desired_modifier_mask)
 
gboolean dt_gui_get_scroll_deltas (const GdkEventScroll *event, gdouble *delta_x, gdouble *delta_y)
 
gboolean dt_gui_get_scroll_delta (const GdkEventScroll *event, gdouble *delta)
 
GdkRGBA * dt_widget_colors (void)
 
void dt_widget_set_source_rgb (cairo_t *cr, dt_gui_color_t color)
 
void dt_widget_set_source_rgba (cairo_t *cr, dt_gui_color_t color, float opacity_coef)
 
const dt_widget_overlay_color_tdt_widget_overlay_color (void)
 
void dt_widget_set_overlay_color (double red, double green, double blue, double contrast)
 
float dt_widget_mouse_radius (void)
 
float dt_widget_mouse_radius_clamped (void)
 
void dt_widget_set_mouse_radius (float radius, float clamped)
 

Macro Definition Documentation

◆ DT_FREEZE_CAT

#define DT_FREEZE_CAT (   a,
 
)    DT_FREEZE_CAT_(a, b)

Definition at line 90 of file widget_settings.h.

◆ DT_FREEZE_CAT_

#define DT_FREEZE_CAT_ (   a,
 
)    a##b

Definition at line 89 of file widget_settings.h.

◆ dt_gtk_toggle_button_set_active

#define dt_gtk_toggle_button_set_active (   toggle_button,
  active 
)    gtk_toggle_button_set_active(toggle_button, active)

Definition at line 392 of file widget_settings.h.

◆ dt_gtk_widget_queue_draw

#define dt_gtk_widget_queue_draw (   widget)    gtk_widget_queue_draw(widget)

Definition at line 391 of file widget_settings.h.

◆ DT_GUI_BOX_SPACING

#define DT_GUI_BOX_SPACING   ((gint)(DT_GUI_EM_SIZE * DT_GUI_BOX_SPACING_EM + 0.5))

Definition at line 255 of file widget_settings.h.

◆ DT_GUI_BOX_SPACING_EM

#define DT_GUI_BOX_SPACING_EM   0.625

Definition at line 254 of file widget_settings.h.

◆ DT_GUI_EM_SIZE

#define DT_GUI_EM_SIZE   ((gint)dt_widget_em_size())

Definition at line 253 of file widget_settings.h.

◆ dt_gui_freeze_begin

#define dt_gui_freeze_begin ( )    dt_gui_freeze_begin_(__FILE__, __LINE__)

Definition at line 81 of file widget_settings.h.

◆ dt_gui_freeze_end

#define dt_gui_freeze_end ( )    dt_gui_freeze_end_(__FILE__, __LINE__)

Definition at line 82 of file widget_settings.h.

◆ DT_GUI_MOUSE_EFFECT_RADIUS

#define DT_GUI_MOUSE_EFFECT_RADIUS   dt_widget_mouse_radius_clamped()

Mouse hit-test radius in darkroom image space, clamped for usable overlay selection.

Definition at line 366 of file widget_settings.h.

◆ dt_gui_widget_freeze

#define dt_gui_widget_freeze ( )
Value:
void cleanup(dt_imageio_module_format_t *self)
Definition avif.c:170
static void dt_gui_freeze_release_(dt_gui_freeze_token_t *t)
#define DT_FREEZE_CAT(a, b)

Definition at line 91 of file widget_settings.h.

◆ DT_PIXEL_APPLY_DPI

#define DT_PIXEL_APPLY_DPI (   value)    DT_UI_SCALE_UI(value)

Definition at line 246 of file widget_settings.h.

◆ DT_PIXEL_APPLY_DPI_DPP

#define DT_PIXEL_APPLY_DPI_DPP (   value)    DT_UI_SCALE_DEVICE(value)

Definition at line 247 of file widget_settings.h.

◆ DT_UI_SCALE_DEVICE

#define DT_UI_SCALE_DEVICE (   value)    ((value) * dt_widget_dpi_factor() * dt_widget_ppd())

Definition at line 245 of file widget_settings.h.

◆ DT_UI_SCALE_UI

#define DT_UI_SCALE_UI (   value)    ((value) * dt_widget_dpi_factor())

Definition at line 244 of file widget_settings.h.

◆ dt_widget_log

#define dt_widget_log (   ...)    do { } while(0)

Definition at line 146 of file widget_settings.h.

◆ dt_widget_log_enabled

#define dt_widget_log_enabled ( )    FALSE

Definition at line 147 of file widget_settings.h.

Typedef Documentation

◆ dt_gui_color_t

◆ dt_widget_cursor_handler_t

typedef void(* dt_widget_cursor_handler_t) (GdkCursorType cursor)

Definition at line 129 of file widget_settings.h.

◆ dt_widget_message_handler_t

typedef void(* dt_widget_message_handler_t) (const char *message)

Definition at line 122 of file widget_settings.h.

◆ dt_widget_natural_width_handler_t

typedef gint(* dt_widget_natural_width_handler_t) (GtkWidget *widget)

Definition at line 115 of file widget_settings.h.

◆ dt_widget_notebook_page_handler_t

typedef void(* dt_widget_notebook_page_handler_t) (gpointer owner)

Definition at line 201 of file widget_settings.h.

◆ dt_widget_overlay_color_t

◆ dt_widget_refocus_handler_t

typedef void(* dt_widget_refocus_handler_t) (void)

Definition at line 195 of file widget_settings.h.

◆ dt_widget_root_window_handler_t

typedef GtkWidget *(* dt_widget_root_window_handler_t) (void)

Definition at line 108 of file widget_settings.h.

◆ dt_widget_stored_bool_getter_t

typedef gboolean(* dt_widget_stored_bool_getter_t) (const char *key)

Definition at line 170 of file widget_settings.h.

◆ dt_widget_stored_bool_setter_t

typedef void(* dt_widget_stored_bool_setter_t) (const char *key, gboolean value)

Definition at line 171 of file widget_settings.h.

◆ dt_widget_stored_int_getter_t

typedef gboolean(* dt_widget_stored_int_getter_t) (const char *key, int *value)

Definition at line 168 of file widget_settings.h.

◆ dt_widget_stored_int_setter_t

typedef void(* dt_widget_stored_int_setter_t) (const char *key, int value)

Definition at line 169 of file widget_settings.h.

Enumeration Type Documentation

◆ anonymous enum

Enumerator
DT_WIDGET_COLORLABEL_RED 
DT_WIDGET_COLORLABEL_YELLOW 
DT_WIDGET_COLORLABEL_GREEN 
DT_WIDGET_COLORLABEL_BLUE 
DT_WIDGET_COLORLABEL_PURPLE 
DT_WIDGET_COLORLABEL_COUNT 

Definition at line 260 of file widget_settings.h.

◆ dt_gui_color_t

Enumerator
DT_GUI_COLOR_BG 
DT_GUI_COLOR_DARKROOM_BG 
DT_GUI_COLOR_DARKROOM_PREVIEW_BG 
DT_GUI_COLOR_LIGHTTABLE_BG 
DT_GUI_COLOR_LIGHTTABLE_PREVIEW_BG 
DT_GUI_COLOR_LIGHTTABLE_FONT 
DT_GUI_COLOR_PRINT_BG 
DT_GUI_COLOR_BRUSH_CURSOR 
DT_GUI_COLOR_BRUSH_TRACE 
DT_GUI_COLOR_BUTTON_FG 
DT_GUI_COLOR_THUMBNAIL_BG 
DT_GUI_COLOR_THUMBNAIL_SELECTED_BG 
DT_GUI_COLOR_THUMBNAIL_HOVER_BG 
DT_GUI_COLOR_THUMBNAIL_OUTLINE 
DT_GUI_COLOR_THUMBNAIL_SELECTED_OUTLINE 
DT_GUI_COLOR_THUMBNAIL_HOVER_OUTLINE 
DT_GUI_COLOR_THUMBNAIL_FONT 
DT_GUI_COLOR_THUMBNAIL_SELECTED_FONT 
DT_GUI_COLOR_THUMBNAIL_HOVER_FONT 
DT_GUI_COLOR_THUMBNAIL_BORDER 
DT_GUI_COLOR_THUMBNAIL_SELECTED_BORDER 
DT_GUI_COLOR_FILMSTRIP_BG 
DT_GUI_COLOR_PREVIEW_HOVER_BORDER 
DT_GUI_COLOR_LOG_BG 
DT_GUI_COLOR_LOG_FG 
DT_GUI_COLOR_MAP_COUNT_SAME_LOC 
DT_GUI_COLOR_MAP_COUNT_DIFF_LOC 
DT_GUI_COLOR_MAP_COUNT_BG 
DT_GUI_COLOR_MAP_LOC_SHAPE_HIGH 
DT_GUI_COLOR_MAP_LOC_SHAPE_LOW 
DT_GUI_COLOR_MAP_LOC_SHAPE_DEF 
DT_GUI_COLOR_WARNING 
DT_GUI_COLOR_LAST 

Definition at line 305 of file widget_settings.h.

Function Documentation

◆ dt_get_system_gui_ppd()

double dt_get_system_gui_ppd ( GtkWidget widget)

The device scale GTK reports for the monitor widget is on, i.e. how many device pixels it puts in a logical one. Probed from the toolkit, not from our own settings.

Definition at line 607 of file widget_settings.c.

References dt_osx_get_ppd(), dt_widget_log, and L.

Referenced by dt_configure_ppd_dpi().

◆ dt_gui_freeze_begin_()

void dt_gui_freeze_begin_ ( const char *  file,
int  line 
)

Definition at line 198 of file widget_settings.c.

References _on_gui_thread(), _widget_suppress_depth, MAX, and void().

◆ dt_gui_freeze_end_()

void dt_gui_freeze_end_ ( const char *  file,
int  line 
)

Definition at line 211 of file widget_settings.c.

References _on_gui_thread(), _widget_suppress_depth, and L.

Referenced by dt_gui_freeze_release_().

◆ dt_gui_freeze_release_()

static void dt_gui_freeze_release_ ( dt_gui_freeze_token_t t)
inlinestatic

Definition at line 85 of file widget_settings.h.

References dt_gui_freeze_end_(), and t.

◆ dt_gui_freeze_reset()

void dt_gui_freeze_reset ( void  )

Definition at line 228 of file widget_settings.c.

References _widget_suppress_depth.

Referenced by dt_gui_gtk_init().

◆ dt_gui_get_scroll_delta()

gboolean dt_gui_get_scroll_delta ( const GdkEventScroll event,
gdouble *  delta 
)

Definition at line 560 of file widget_settings.c.

References delta, dt_gui_get_scroll_deltas(), FALSE, L, and TRUE.

Referenced by _area_scrolled_callback(), _scrolled(), and _scrolled().

◆ dt_gui_get_scroll_deltas()

gboolean dt_gui_get_scroll_deltas ( const GdkEventScroll event,
gdouble *  delta_x,
gdouble *  delta_y 
)

Definition at line 499 of file widget_settings.c.

References _reverse_x, _reverse_y, FALSE, L, and TRUE.

Referenced by dt_gui_get_scroll_delta().

◆ dt_gui_get_scroll_unit_delta()

gboolean dt_gui_get_scroll_unit_delta ( const GdkEventScroll event,
int *  delta 
)

◆ dt_gui_get_scroll_unit_deltas()

◆ dt_gui_widgets_suppressed()

gboolean dt_gui_widgets_suppressed ( void  )

Definition at line 193 of file widget_settings.c.

References _widget_suppress_depth.

Referenced by _add_shape_callback(), _alignment_callback(), _attached_view_combo_changed(), _auto_levels_callback(), _auto_levels_callback(), _blendop_blend_mode_callback(), _blendop_blendif_boost_factor_callback(), _blendop_blendif_channel_display_toggled(), _blendop_blendif_details_callback(), _blendop_blendif_enter(), _blendop_blendif_invert(), _blendop_blendif_key_press(), _blendop_blendif_leave(), _blendop_blendif_log_scale_toggled(), _blendop_blendif_polarity_callback(), _blendop_blendif_showmask_clicked(), _blendop_blendif_sliders_callback(), _blendop_blendif_sliders_reset_callback(), _blendop_blendif_tab_switch(), _blendop_compositing_changed(), _blendop_masks_all_selection_changed(), _blendop_masks_all_toggled(), _blendop_masks_group_selection_changed(), _blendop_masks_invert_toggled(), _blendop_masks_mode_changed(), _blendop_masks_polarity_callback(), _blendop_masks_show_and_edit(), _channel_tabs_switch_callback(), _channel_tabs_switch_callback(), _channelmixerrgb_mixer_mode_callback(), _channelmixerrgb_primaries_slider_callback(), _channelmixerrgb_simple_slider_callback(), _color_picker_callback_button_press(), _commit_combobox_value(), _commit_slider_value(), _confidence_changed(), _custom_model_callback(), _dimensions_type_changed(), _display_mask_callback(), _display_mask_indicator_callback(), _draw(), _dttags_check_toggled(), _edit_by_area_callback(), _edit_masks(), _enter_leave(), _event_aspect_presets_changed(), _event_draw(), _event_fit_both_button_clicked(), _event_fit_h_button_clicked(), _event_fit_v_button_clicked(), _event_process_after_preview_callback(), _event_process_after_ui_callback(), _event_structure_auto_clicked(), _event_structure_lines_clicked(), _event_structure_quad_clicked(), _folder_levels_changed(), _general_callback(), _grid_size_changed(), _gui_off_callback(), _height_changed(), _height_changed(), _interpolator_callback(), _iop_toggle_callback(), _layer_selected(), _lib_history_view_selection_changed(), _masks_shape_button_pressed(), _mixer_mode_callback(), _no_uncategorized_toggled(), _op_changed(), _preview_bg_toggled(), _primaries_slider_callback(), _print_dpi_changed(), _print_height_changed(), _print_width_changed(), _raster_polarity_callback(), _raw_toggled(), _recent_tags_changed(), _recursive_toggled(), _resync_pixel_dimensions(), _resync_print_dimensions(), _ring_tabs_switch_callback(), _run_pending_preview_job(), _select_region_toggled_callback(), _select_region_toggled_callback(), _simple_slider_callback(), _sort_by_changed(), _sort_combo_changed(), _sort_dir_toggled(), _spot_settings_changed_callback(), _spot_settings_changed_callback(), _sync_params_from_gui(), _tab_switch_callback(), _toggle_suggestion_button_callback(), _toggle_tree_button_callback(), _unit_changed(), _visualize_callback(), _visualize_callback(), _widget_changed(), _width_changed(), _width_changed(), _x_changed(), _y_changed(), acquire_source_button_pressed(), acquire_target_button_pressed(), alignment_callback(), apply_auto_black(), apply_auto_black(), apply_auto_black(), apply_auto_black(), apply_auto_Dmax(), apply_auto_Dmin(), apply_auto_dynamic_range(), apply_auto_exposure(), apply_auto_grey(), apply_auto_grey(), apply_auto_grey(), apply_auto_offset(), apply_auto_WB_high(), apply_auto_WB_low(), apply_auto_white_point_source(), apply_auto_white_point_source(), apply_autogrey(), apply_gain_auto(), apply_gain_neutralize(), apply_gamma_auto(), apply_gamma_neutralize(), apply_lift_auto(), apply_lift_neutralize(), area_button_press(), area_button_press(), area_button_release(), area_enter_notify(), area_enter_notify(), area_leave_notify(), area_leave_notify(), area_motion_notify(), area_motion_notify(), aspect_presets_changed(), balance_callback(), black_point_source_callback(), black_point_target_callback(), blue_callback(), btn_toggled(), camera_menu_select(), center_callback(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), colorpick_callback(), colorpick_color_set(), colorpick_color_set(), colorpicker_callback(), combo_changed(), commit_box(), commit_profile_callback(), contrast_callback(), controls_callback(), corrections_done(), cropmode_callback(), denoiseprofile_draw_variance(), denoiseprofile_tab_switch(), Dmin_picker_callback(), dt_dev_pixelpipe_reset_all(), dt_iop_gui_blending_lose_focus(), dt_iop_levels_autoadjust_callback(), dt_iop_monochrome_draw(), dt_iop_request_focus(), dtgtk_gradient_slider_multivalue_set_value(), dtgtk_gradient_slider_multivalue_set_values(), extra_callback(), filepath_callback(), fontsel_callback(), frame_colorpick_color_set(), global_saturation_callback(), green_callback(), grey_point_source_callback(), grey_point_target_callback(), hvflip_callback(), illum_xy_callback(), interpolator_callback(), interpolator_callback(), interpolator_callback(), latitude_stops_callback(), lens_menu_select(), logbase_callback(), lutname_callback(), mask_callback(), mix_callback(), modflags_changed(), notebook_button_press(), optimize_changed_callback(), output_callback(), output_power_callback(), preserve_color_callback(), preset_tune_callback(), process(), process(), process_cl(), process_internal(), profile_changed(), rawdenoise_tab_switch(), red_callback(), rt_auto_levels_callback(), rt_colorpick_color_set_callback(), rt_copypaste_scale_callback(), rt_curr_scale_update(), rt_display_wavelet_scale_callback(), rt_edit_masks_callback(), rt_gslider_changed(), rt_mask_opacity_callback(), rt_merge_from_scale_update(), rt_num_scales_update(), rt_select_algorithm_callback(), rt_showmask_callback(), rt_suppress_callback(), rt_wdbar_button_press(), rt_wdbar_scrolled(), run_profile_callback(), run_validation_callback(), safety_changed_callback(), saturation_callback(), scrolled(), security_threshold_callback(), show_luminance_mask_callback(), show_mask_callback(), smoothing_callback(), start_profiling_callback(), tab_switch(), tab_switch(), tab_switch_callback(), temp_tint_callback(), text_callback(), toe_shoulder_callback(), watermark_callback(), Wb_high_norm_callback(), WB_high_picker_callback(), Wb_low_norm_callback(), WB_low_picker_callback(), white_point_source_callback(), white_point_target_callback(), and workicc_changed().

◆ dt_key_modifier_state()

GdkModifierType dt_key_modifier_state ( void  )

Modifier keys currently held, independent of any key event.

Todo:
double check correct way of doing this (merge conflict with Input System NG 20210319) GdkKeymap *keymap = gdk_keymap_get_for_display(gdk_display_get_default()); return gdk_keymap_get_modifier_state(keymap) & gdk_keymap_get_modifier_mask(keymap, GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK);

Definition at line 624 of file widget_settings.c.

References dt_widget_root_window(), L, state, and window.

Referenced by _color_picker_callback_button_press(), and color_picker_apply().

◆ dt_modifier_is()

static gboolean dt_modifier_is ( const GdkModifierType  state,
const GdkModifierType  desired_modifier_mask 
)
inlinestatic
Todo:
: on Macs, remap the GDK_CONTROL_MASK bit in desired_modifier_mask to be the bit for the Cmd key

Definition at line 276 of file widget_settings.h.

References L, and state.

Referenced by _apply_gui_button_pressed_state(), _area_button_press_callback(), _area_button_press_callback(), _area_button_press_callback(), _blendop_blendif_enter(), _blendop_blendif_showmask_clicked(), _blendop_masks_show_and_edit(), _brush_events_button_pressed(), _brush_events_button_released(), _brush_events_mouse_scrolled(), _circle_events_button_pressed(), _circle_events_mouse_scrolled(), _click_on_view(), _click_on_view_dictionary(), _color_picker_callback_button_press(), _datetime_scroll_over(), _decorate_hierarchy(), _dictionary_key_pressed(), _ellipse_events_button_pressed(), _ellipse_events_mouse_scrolled(), _event_image_motion(), _event_main_release(), _gradient_events_button_pressed(), _gradient_events_mouse_scrolled(), _grid_handle_key(), _gui_reset_callback(), _iop_plugin_header_button_press(), _iop_plugin_header_button_release(), _key_pressed(), _lib_history_view_button_press_callback(), _lib_plugin_header_button_press(), _mouse_scroll(), _polygon_events_button_pressed(), _polygon_events_mouse_scrolled(), _rating_clicked(), _slider_add_step(), _thumbtable_scroll(), _tree_button_pressed(), _view_map_button_press_callback(), _view_map_scroll_event(), button_pressed(), button_pressed(), button_pressed(), button_released(), button_released(), checker_button_press(), color_picker_apply(), dt_iop_basecurve_button_press(), dt_iop_tonecurve_button_press(), dt_masks_set_source_pos_initial_state(), key_pressed(), mouse_moved(), rt_edit_masks_callback(), rt_select_algorithm_callback(), scrolled(), scrolled(), and scrolled().

◆ dt_modifiers_include()

static gboolean dt_modifiers_include ( const GdkModifierType  state,
const GdkModifierType  desired_modifier_mask 
)
inlinestatic
Todo:
: on Macs, remap the GDK_CONTROL_MASK bit in desired_modifier_mask to be the bit for the Cmd key

Definition at line 284 of file widget_settings.h.

References L, and state.

Referenced by _event_structure_auto_clicked(), button_pressed(), and key_pressed().

◆ dt_widget_colorlabel()

const GdkRGBA * dt_widget_colorlabel ( int  index)

◆ dt_widget_colors()

GdkRGBA * dt_widget_colors ( void  )

The palette itself, writable so the theme loader can fill it in place. Zeroed until then.

Definition at line 450 of file widget_settings.c.

References _colors.

Referenced by _studio_import_update_state(), and dt_gui_load_theme().

◆ dt_widget_debug_overlays()

gboolean dt_widget_debug_overlays ( void  )

Whether to draw diagnostic overlays (hit-test radii and the like) on top of normal rendering. A debugging aid the host switches on; off by default.

Definition at line 341 of file widget_settings.c.

References _debug_overlays.

Referenced by dt_draw_node().

◆ dt_widget_dpi()

double dt_widget_dpi ( void  )

Screen resolution in dots per inch; 96.0 (the X/GDK default) until resolved.

Definition at line 98 of file widget_settings.c.

References _dpi.

Referenced by dt_screen_dpi().

◆ dt_widget_dpi_factor()

double dt_widget_dpi_factor ( void  )

Definition at line 148 of file widget_settings.c.

References _dpi_factor.

Referenced by dt_screen_dpi_factor().

◆ dt_widget_em_size()

double dt_widget_em_size ( void  )

Resolved root font size in px; 16.0 until the application resolves it.

Definition at line 154 of file widget_settings.c.

References _em.

Referenced by dt_screen_em_size().

◆ dt_widget_image_filter()

cairo_filter_t dt_widget_image_filter ( void  )

Cairo filter used when scaling images outside the darkroom. Set once at GUI init.

Definition at line 63 of file widget_settings.c.

References _image_filter.

Referenced by dt_focuspeaking(), and expose().

◆ dt_widget_message()

void dt_widget_message ( const char *  message)

Definition at line 133 of file widget_settings.c.

References _message_handler.

Referenced by _action_request_focus().

◆ dt_widget_metrics_probed()

gboolean dt_widget_metrics_probed ( void  )

TRUE once something has actually interrogated a display. The getters are always safe to call, but answer with neutral defaults until then – use this only where reporting an invented 96dpi would be worse than reporting nothing (a crash report, a telemetry payload), never as an "is there a GUI?" test for scaling.

Definition at line 101 of file widget_settings.c.

References _metrics_probed.

Referenced by dt_screen_metrics_probed().

◆ dt_widget_min_panel_width()

gint dt_widget_min_panel_width ( void  )

Minimum width a side panel may shrink to, in logical px. A user preference the application supplies; the panel widget reads it when its class is initialised. 350 until the application says otherwise.

Definition at line 391 of file widget_settings.c.

References _min_panel_width.

Referenced by dtgtk_side_panel_class_init().

◆ dt_widget_mouse_radius()

float dt_widget_mouse_radius ( void  )

Definition at line 480 of file widget_settings.c.

References _mouse_radius.

Referenced by dt_dev_update_mouse_effect_radius().

◆ dt_widget_mouse_radius_clamped()

float dt_widget_mouse_radius_clamped ( void  )

Definition at line 485 of file widget_settings.c.

References _mouse_radius_clamped.

◆ dt_widget_natural_width()

gint dt_widget_natural_width ( GtkWidget widget)

Definition at line 123 of file widget_settings.c.

References _natural_width_handler.

Referenced by _get_preferred_width().

◆ dt_widget_notebook_page_changed()

void dt_widget_notebook_page_changed ( gpointer  owner)

Definition at line 431 of file widget_settings.c.

References _notebook_page_handler, and L.

Referenced by _notebook_switch_page_signal_relay().

◆ dt_widget_overlay_color()

const dt_widget_overlay_color_t * dt_widget_overlay_color ( void  )

Definition at line 467 of file widget_settings.c.

References _overlay.

Referenced by dt_draw_set_color_overlay().

◆ dt_widget_ppd()

double dt_widget_ppd ( void  )

Definition at line 151 of file widget_settings.c.

References _ppd.

Referenced by _get_combobox_max_width(), _widget_draw(), dt_bauhaus_popup_draw(), and dt_screen_ppd().

◆ dt_widget_refocus()

void dt_widget_refocus ( void  )

Definition at line 421 of file widget_settings.c.

References _refocus_handler.

Referenced by _text_entry_key_pressed().

◆ dt_widget_root_window()

◆ dt_widget_scroll_focus()

◆ dt_widget_scroll_mask()

G_BEGIN_DECLS GdkEventMask dt_widget_scroll_mask ( void  )

Event mask widgets must add to receive scroll events. Set once at GUI init.

Definition at line 43 of file widget_settings.c.

References _scroll_mask.

Referenced by _bauhaus_widget_init(), _gradient_slider_init(), _gui_init_datetime(), _init_widgets(), dt_bauhaus_init(), dt_gui_gtk_init(), dt_ui_init_main_table(), gui_init(), gui_init(), and gui_init().

◆ dt_widget_set_colorlabels()

void dt_widget_set_colorlabels ( const GdkRGBA *  labels,
int  count 
)

Definition at line 184 of file widget_settings.c.

References _colorlabels, _colorlabels_count, i, and L.

Referenced by dt_bauhaus_load_theme().

◆ dt_widget_set_cursor()

void dt_widget_set_cursor ( GdkCursorType  cursor)

Definition at line 143 of file widget_settings.c.

References _cursor_handler.

Referenced by _resize_handle_button(), and _resize_handle_cursor().

◆ dt_widget_set_cursor_handler()

void dt_widget_set_cursor_handler ( dt_widget_cursor_handler_t  handler)

Definition at line 138 of file widget_settings.c.

References _cursor_handler, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_debug_overlays()

void dt_widget_set_debug_overlays ( gboolean  enabled)

Definition at line 346 of file widget_settings.c.

References _debug_overlays.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_dpi()

void dt_widget_set_dpi ( double  dpi)

Definition at line 99 of file widget_settings.c.

References _dpi, _metrics_probed, and TRUE.

Referenced by dt_screen_set_dpi().

◆ dt_widget_set_dpi_factor()

void dt_widget_set_dpi_factor ( double  factor)

Definition at line 149 of file widget_settings.c.

References _dpi_factor, _metrics_probed, factor, and TRUE.

Referenced by dt_configure_ppd_dpi(), and dt_screen_set_dpi_factor().

◆ dt_widget_set_em_size()

void dt_widget_set_em_size ( double  em)

Definition at line 155 of file widget_settings.c.

References _em.

Referenced by dt_gui_update_em(), and dt_screen_set_em_size().

◆ dt_widget_set_gui_thread()

void dt_widget_set_gui_thread ( pthread_t  thread)

Register the thread that owns widget state. Freeze/unfreeze is a deliberate no-op on any other thread – worker-thread reload_defaults has no widgets to suppress, and a concurrent non-atomic ++/– would drift the depth and break suppression for the GUI thread. Until this is called, freezing is inert.

Definition at line 157 of file widget_settings.c.

References _gui_thread, _gui_thread_set, and TRUE.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_image_filter()

void dt_widget_set_image_filter ( cairo_filter_t  filter)

Definition at line 68 of file widget_settings.c.

References _image_filter.

Referenced by dt_configure_ppd_dpi().

◆ dt_widget_set_message_handler()

void dt_widget_set_message_handler ( dt_widget_message_handler_t  handler)

Definition at line 128 of file widget_settings.c.

References _message_handler, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_min_panel_width()

void dt_widget_set_min_panel_width ( gint  width)

Definition at line 396 of file widget_settings.c.

References _min_panel_width, and width.

Referenced by _ui_init_panel_left().

◆ dt_widget_set_mouse_radius()

void dt_widget_set_mouse_radius ( float  radius,
float  clamped 
)

Definition at line 490 of file widget_settings.c.

References _mouse_radius, _mouse_radius_clamped, and L.

Referenced by dt_dev_update_mouse_effect_radius(), and dt_gui_gtk_init().

◆ dt_widget_set_natural_width_handler()

void dt_widget_set_natural_width_handler ( dt_widget_natural_width_handler_t  handler)

Definition at line 118 of file widget_settings.c.

References _natural_width_handler, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_notebook_page_handler()

void dt_widget_set_notebook_page_handler ( dt_widget_notebook_page_handler_t  handler)

Definition at line 426 of file widget_settings.c.

References _notebook_page_handler, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_overlay_color()

void dt_widget_set_overlay_color ( double  red,
double  green,
double  blue,
double  contrast 
)

◆ dt_widget_set_ppd()

void dt_widget_set_ppd ( double  ppd)

Definition at line 152 of file widget_settings.c.

References _metrics_probed, _ppd, and TRUE.

Referenced by dt_configure_ppd_dpi(), and dt_screen_set_ppd().

◆ dt_widget_set_refocus_handler()

void dt_widget_set_refocus_handler ( dt_widget_refocus_handler_t  handler)

Definition at line 416 of file widget_settings.c.

References _refocus_handler, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_root_window_handler()

void dt_widget_set_root_window_handler ( dt_widget_root_window_handler_t  handler)

Definition at line 108 of file widget_settings.c.

References _root_window_handler, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_scroll_focus()

◆ dt_widget_set_scroll_mask()

void dt_widget_set_scroll_mask ( GdkEventMask  mask)

Definition at line 48 of file widget_settings.c.

References _scroll_mask.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_scroll_reversed()

void dt_widget_set_scroll_reversed ( gboolean  reverse_x,
gboolean  reverse_y 
)

Whether each scroll axis is inverted. A user preference, supplied by the application – a widget does not read configuration.

Definition at line 163 of file widget_settings.c.

References _reverse_x, _reverse_y, and L.

Referenced by dt_gui_gtk_init().

◆ dt_widget_set_source_rgb()

void dt_widget_set_source_rgb ( cairo_t cr,
dt_gui_color_t  color 
)

Set a cairo source from the palette, opaque or scaled by the palette entry's own alpha.

Definition at line 455 of file widget_settings.c.

References _colors, color, and L.

Referenced by _draw_ellipse(), _draw_rectangle(), _view_map_images_count(), dt_control_draw_busy_msg(), dt_view_manager_expose(), and expose().

◆ dt_widget_set_source_rgba()

void dt_widget_set_source_rgba ( cairo_t cr,
dt_gui_color_t  color,
float  opacity_coef 
)

Definition at line 461 of file widget_settings.c.

References _colors, color, and L.

Referenced by _brush_events_post_expose(), and dt_draw_get_pixbuf_from_cairo().

◆ dt_widget_set_storage_handlers()

void dt_widget_set_storage_handlers ( dt_widget_stored_int_getter_t  get_int,
dt_widget_stored_int_setter_t  set_int,
dt_widget_stored_bool_getter_t  get_bool,
dt_widget_stored_bool_setter_t  set_bool 
)

◆ dt_widget_set_theme_loaded()

void dt_widget_set_theme_loaded ( gboolean  loaded)

Definition at line 408 of file widget_settings.c.

References _theme_loaded.

Referenced by dt_gui_load_theme().

◆ dt_widget_store_bool()

void dt_widget_store_bool ( const char *  key,
gboolean  value 
)

Definition at line 384 of file widget_settings.c.

References _stored_bool_setter, key, and value.

Referenced by _coeffs_button_changed().

◆ dt_widget_store_int()

void dt_widget_store_int ( const char *  key,
int  value 
)

Definition at line 373 of file widget_settings.c.

References _stored_int_setter, key, and value.

Referenced by _resizable_area_resize(), and _resizable_scroll_handle_resize().

◆ dt_widget_stored_bool()

gboolean dt_widget_stored_bool ( const char *  key)

Read a stored flag. FALSE when nothing is stored, which is the collapsed/default state.

Definition at line 378 of file widget_settings.c.

References _stored_bool_getter, FALSE, and key.

Referenced by dt_gui_new_collapsible_section().

◆ dt_widget_stored_int()

gboolean dt_widget_stored_int ( const char *  key,
int *  value 
)

Read a stored integer. Returns FALSE (leaving value untouched) if nothing is stored.

Definition at line 367 of file widget_settings.c.

References _stored_int_getter, FALSE, key, and value.

Referenced by _resizable_scroll_apply(), and dt_ui_resizable_drawing_area().

◆ dt_widget_theme_loaded()

gboolean dt_widget_theme_loaded ( void  )