![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "common/dtpthread.h"#include "dtgtk/thumbtable.h"#include "gui/window_manager.h"#include "gui/accelerators.h"#include <gtk/gtk.h>#include <stdint.h>
Include dependency graph for gtk.h:Go to the source code of this file.
Data Structures | |
| struct | dt_gui_widgets_t |
| struct | dt_gui_gtk_t |
| struct | _gui_collapsible_section_t |
| struct | dt_gui_widget_auto_height_t |
Macros | |
| #define | DT_GUI_IOP_MODULE_CONTROL_SPACING 0 |
| #define | DT_GUI_MOUSE_EFFECT_RADIUS darktable.gui->mouse.effect_radius |
| #define | DT_GUI_MOUSE_EFFECT_RADIUS_SCALED darktable.gui->mouse.effect_radius_scaled |
| #define | DT_PIXEL_APPLY_DPI(value) ((value) * darktable.gui->dpi_factor) |
| #define | DT_PIXEL_APPLY_DPI_DPP(value) ((value) * darktable.gui->dpi_factor * darktable.gui->ppd) |
| #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) |
| #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) |
| #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) |
| #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) |
Typedefs | |
| typedef struct dt_gui_widgets_t | dt_gui_widgets_t |
| typedef enum dt_gui_color_t | dt_gui_color_t |
| typedef struct dt_gui_gtk_t | dt_gui_gtk_t |
| typedef struct _gui_collapsible_section_t | dt_gui_collapsible_section_t |
| typedef struct dt_gui_widget_auto_height_t | dt_gui_widget_auto_height_t |
Functions | |
| static cairo_surface_t * | dt_cairo_image_surface_create (cairo_format_t format, int width, int height) |
| static cairo_surface_t * | dt_cairo_image_surface_create_for_data (unsigned char *data, cairo_format_t format, int width, int height, int stride) |
| static cairo_surface_t * | dt_cairo_image_surface_create_from_png (const char *filename) |
| static int | dt_cairo_image_surface_get_width (cairo_surface_t *surface) |
| static int | dt_cairo_image_surface_get_height (cairo_surface_t *surface) |
| static cairo_surface_t * | dt_gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf, int scale, GdkWindow *for_window) |
| static GdkPixbuf * | dt_gdk_pixbuf_new_from_file_at_size (const char *filename, int width, int height, GError **error) |
| void | dt_gui_add_class (GtkWidget *widget, const gchar *class_name) |
| void | dt_gui_remove_class (GtkWidget *widget, const gchar *class_name) |
| int | dt_gui_gtk_init (dt_gui_gtk_t *gui) |
| void | dt_gui_gtk_run (dt_gui_gtk_t *gui) |
| void | dt_gui_gtk_quit () |
| void | dt_gui_store_last_preset (const char *name) |
| int | dt_gui_gtk_write_config () |
| void | dt_gui_gtk_set_source_rgb (cairo_t *cr, dt_gui_color_t) |
| void | dt_gui_gtk_set_source_rgba (cairo_t *cr, dt_gui_color_t, float opacity_coef) |
| double | dt_get_system_gui_ppd (GtkWidget *widget) |
| gboolean | dt_gui_get_scroll_deltas (const GdkEventScroll *event, gdouble *delta_x, gdouble *delta_y) |
| gboolean | dt_gui_get_scroll_unit_deltas (const GdkEventScroll *event, int *delta_x, int *delta_y) |
| gboolean | dt_gui_get_scroll_delta (const GdkEventScroll *event, gdouble *delta) |
| gboolean | dt_gui_get_scroll_unit_delta (const GdkEventScroll *event, int *delta) |
| 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 | |
| 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 | |
| void | dt_ui_container_destroy_children (dt_ui_t *ui, const dt_ui_container_t c) |
| destroy all child widgets from container | |
| void | dt_ui_panel_show (dt_ui_t *ui, const dt_ui_panel_t, gboolean show, gboolean write) |
| shows/hide a panel | |
| void | dt_ui_toggle_panels_visibility (dt_ui_t *ui) |
| toggle view of panels eg. collapse/expands to previous view state | |
| void | dt_ui_notify_user () |
| draw user's attention | |
| gboolean | dt_ui_panel_visible (dt_ui_t *ui, const dt_ui_panel_t) |
| get visible state of panel | |
| int | dt_ui_panel_get_size (dt_ui_t *ui, const dt_ui_panel_t p) |
| get width of right, left, or bottom panel | |
| gboolean | dt_ui_panel_ancestor (dt_ui_t *ui, const dt_ui_panel_t p, GtkWidget *w) |
| is the panel ancestor of widget | |
| GtkWidget * | dt_ui_center (dt_ui_t *ui) |
| get the center drawable widget | |
| GtkWidget * | dt_ui_center_base (dt_ui_t *ui) |
| GtkWidget * | dt_ui_main_window (dt_ui_t *ui) |
| get the main window widget | |
| GtkWidget * | dt_ui_log_msg (dt_ui_t *ui) |
| get the log message widget | |
| GtkWidget * | dt_ui_toast_msg (dt_ui_t *ui) |
| get the toast message widget | |
| GtkBox * | dt_ui_get_container (dt_ui_t *ui, const dt_ui_container_t c) |
| void | dt_ellipsize_combo (GtkComboBox *cbox) |
| void | dt_capitalize_label (gchar *text) |
| static void | dt_ui_section_label_set (GtkWidget *label) |
| static GtkWidget * | dt_ui_section_label_new (const gchar *str) |
| static GtkWidget * | dt_ui_label_new (const gchar *str) |
| GtkNotebook * | dt_ui_notebook_new () |
| GtkWidget * | dt_ui_notebook_page (GtkNotebook *notebook, const char *text, const char *tooltip) |
| gboolean | dt_gui_show_standalone_yes_no_dialog (const char *title, const char *markup, const char *no_text, const char *yes_text) |
| char * | dt_gui_show_standalone_string_dialog (const char *title, const char *markup, const char *placeholder, const char *no_text, const char *yes_text) |
| void | dt_gui_add_help_link (GtkWidget *widget, const char *link) |
| void | dt_gui_load_theme (const char *theme) |
| void | dt_configure_ppd_dpi (dt_gui_gtk_t *gui) |
| GdkModifierType | dt_key_modifier_state () |
| 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. | |
| GtkWidget * | dt_ui_scroll_wrap (GtkWidget *w, gint min_size, char *config_str) |
| gboolean | dt_gui_container_has_children (GtkContainer *container) |
| int | dt_gui_container_num_children (GtkContainer *container) |
| GtkWidget * | dt_gui_container_first_child (GtkContainer *container) |
| GtkWidget * | dt_gui_container_nth_child (GtkContainer *container, int which) |
| void | dt_gui_container_remove_children (GtkContainer *container) |
| void | dt_gui_container_destroy_children (GtkContainer *container) |
| void | dt_gui_menu_popup (GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor) |
| GtkWidget * | dt_gui_get_popup_relative_widget (GtkWidget *widget, GdkRectangle *rect) |
| Resolve the widget used as parent for nested popups on Wayland. | |
| void | dt_gui_draw_rounded_rectangle (cairo_t *cr, float width, float height, float x, float y) |
| gboolean | dt_gui_search_start (GtkWidget *widget, GdkEventKey *event, GtkSearchEntry *entry) |
| void | dt_gui_search_stop (GtkSearchEntry *entry, GtkWidget *widget) |
| 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. | |
| void | dt_gui_update_collapsible_section (dt_gui_collapsible_section_t *cs) |
| void | dt_gui_hide_collapsible_section (dt_gui_collapsible_section_t *cs) |
| GtkBox * | attach_popover (GtkWidget *widget, const char *icon, GtkWidget *content) |
| GtkBox * | attach_help_popover (GtkWidget *widget, const char *label) |
| 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. This helps dealing with one-key shortcuts. | |
| static GtkWindow * | dt_gtk_get_window (GtkWidget *widget) |
| void | dt_gui_refocus_center () |
| #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) |
| #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) |
| #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) |
| #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) |
| #define DT_GUI_IOP_MODULE_CONTROL_SPACING 0 |
| #define DT_GUI_MOUSE_EFFECT_RADIUS darktable.gui->mouse.effect_radius |
| #define DT_GUI_MOUSE_EFFECT_RADIUS_SCALED darktable.gui->mouse.effect_radius_scaled |
| typedef struct _gui_collapsible_section_t dt_gui_collapsible_section_t |
| typedef enum dt_gui_color_t dt_gui_color_t |
| typedef struct dt_gui_gtk_t dt_gui_gtk_t |
| typedef struct dt_gui_widget_auto_height_t dt_gui_widget_auto_height_t |
| typedef struct dt_gui_widgets_t dt_gui_widgets_t |
| enum dt_gui_color_t |
| GtkBox * attach_help_popover | ( | GtkWidget * | widget, |
| const char * | label | ||
| ) |
Add an help button triggering a popover label next to an arbitrary widget, to document its action. This is a better take at help tooltips that most people don't see, unless they know about them. Also tooltips window positionning is wonky (can easily overflow viewport), line breaks are added manually (ugly hack), and they appear and disappear on hover (not available on touch screens), so it's flimsy UI.
| widget | the original widget to document. DON'T add it to a container. |
| label | the in-app "docstring" for the widget |
References attach_popover(), and TRUE.
Referenced by gui_init().
Add an arbitrary button next to the widget that opens a popover with arbitrary content.
| widget | the original widget next to which the popover button will be added. DON'T add it to a container. |
| icon | the Freedesktop icon name to put in the button |
| content | the widget that will fit inside the popover |
References _popover_set_relative_to_topmost_parent(), DT_PIXEL_APPLY_DPI, and FALSE.
Referenced by attach_help_popover(), and gui_init().
Disconnects accels when a text or search entry gets the focus, and reconnects them when it looses it. This helps dealing with one-key shortcuts.
| widget |
References _text_entry_focus_in_event(), _text_entry_focus_out_event(), and _text_entry_key_pressed().
Referenced by _add_tag_button_clicked(), _gui_init_datetime(), _gui_styles_dialog_run(), _lib_duplicate_init_callback(), _pop_menu_dictionary_change_path(), _pop_menu_dictionary_create_tag(), _pop_menu_dictionary_edit_tag(), _presets_show_edit_dialog(), dt_gui_preferences_string(), dt_gui_show_standalone_string_dialog(), dt_iop_gui_rename_module(), gui_init(), gui_init(), gui_init(), gui_init(), gui_init(), gui_init(), init_tab_general(), and init_tab_presets().
|
inlinestatic |
References darktable, darktable_t::gui, height, dt_gui_gtk_t::ppd, and width.
Referenced by _area_draw_callback(), _area_draw_callback(), _area_draw_callback(), _bottom_area_draw_callback(), _build_preview_fallback_surface(), _configure(), _darkroom_prepare_image_surface(), _get_combobox_max_width(), _init_drawing(), _lib_navigation_draw_callback(), _on_drag_begin(), _origin_color_draw(), _target_color_draw(), _trigger_recompute(), _widget_draw(), area_draw(), checker_draw(), cluster_preview_draw(), denoiseprofile_draw(), dt_bauhaus_popup_draw(), dt_control_expose(), dt_gui_gtk_run(), dt_iop_basecurve_draw(), dt_iop_colorcorrection_draw(), dt_iop_levels_area_draw(), dt_iop_monochrome_draw(), dt_iop_tonecurve_draw(), dt_iop_tonecurve_draw(), dt_iop_tonecurve_draw(), dt_iop_tonecurve_draw(), dt_iop_zonesystem_bar_draw(), dt_iop_zonesystem_preview_draw(), illuminant_color_draw(), lowlight_draw(), origin_color_draw(), rawdenoise_draw(), rt_wdbar_draw(), and target_color_draw().
|
inlinestatic |
References darktable, darktable_t::gui, height, dt_gui_gtk_t::ppd, and width.
Referenced by _util_get_svg_img(), and expose().
|
inlinestatic |
References darktable, darktable_t::gui, and dt_gui_gtk_t::ppd.
Referenced by _lib_snapshots_toggled_callback().
|
inlinestatic |
References darktable, darktable_t::gui, and dt_gui_gtk_t::ppd.
Referenced by dt_control_expose().
|
inlinestatic |
References darktable, darktable_t::gui, and dt_gui_gtk_t::ppd.
Referenced by dt_control_expose().
| void dt_capitalize_label | ( | gchar * | text | ) |
| void dt_configure_ppd_dpi | ( | dt_gui_gtk_t * | gui | ) |
References dt_gui_gtk_t::dpi, dt_gui_gtk_t::dpi_factor, dt_conf_get_float(), DT_DEBUG_CONTROL, dt_get_system_gui_ppd(), dt_osx_autoset_dpi(), dt_print(), dt_gui_gtk_t::filter_image, dt_ui_t::main_window, dt_gui_gtk_t::ppd, and dt_gui_gtk_t::ui.
Referenced by _configure(), _init_widgets(), and dpi_scaling_changed_callback().
| void dt_ellipsize_combo | ( | GtkComboBox * | cbox | ) |
|
inlinestatic |
References darktable, darktable_t::gui, and dt_gui_gtk_t::ppd.
|
inlinestatic |
References darktable, error(), darktable_t::gui, height, dt_gui_gtk_t::ppd, and width.
References DT_DEBUG_CONTROL, dt_osx_get_ppd(), and dt_print().
Referenced by dt_configure_ppd_dpi().
|
inlinestatic |
Referenced by _add_sample(), _attach_grid_separator(), _bauhaus_widget_init(), _blendif_options_callback(), _changes_tooltip_callback(), _collapsible_set_states(), _color_picker_new(), _gui_presets_popup_menu_show_internal(), _init_widgets(), _iop_dim_all_but(), _iop_tooltip_callback(), _lib_backgroundjobs_added(), _mouse_over_image_callback(), _on_drag_begin(), _on_drag_motion(), _sample_tooltip_callback(), _set_widget_dimmed(), _thumb_update_rating_class(), _view_map_drag_set_icon(), add_generic_top_menu_entry(), dt_bauhaus_combobox_from_widget(), dt_bauhaus_slider_from_widget(), dt_gui_gtk_quit(), dt_gui_new_collapsible_section(), dt_guides_popover(), dt_iop_gui_init_blendif(), dt_iop_gui_init_blending_body(), dt_iop_gui_init_masks(), dt_iop_gui_init_raster(), dt_iop_gui_set_enable_button(), dt_iop_gui_set_expander(), dt_iop_request_focus(), dt_lib_gui_get_expander(), dt_lib_presets_popup_menu_show(), dt_thumbnail_create_widget(), dt_thumbnail_set_group_border(), dt_thumbtable_new(), dt_thumbtable_set_overlays_mode(), dt_ui_init_global_menu(), dt_ui_section_label_set(), dtgtk_button_new(), dtgtk_gradient_slider_multivalue_new(), dtgtk_gradient_slider_multivalue_new_with_color(), dtgtk_gradient_slider_new(), dtgtk_gradient_slider_new_with_color(), dtgtk_thumbnail_btn_new(), dtgtk_togglebutton_new(), gui_init(), gui_init(), gui_init(), gui_init(), init_tab_general(), and update_entry().
Referenced by _styles_open_popup_callback(), dt_iop_gui_init_blendif(), dt_iop_gui_init_blending_body(), dt_iop_gui_init_masks(), dt_iop_gui_init_raster(), dt_iop_gui_set_expander(), dt_thumbtable_new(), dt_thumbtable_set_parent(), dt_view_manager_switch_by_view(), export_files_callback(), gui_init(), and gui_init().
| void dt_gui_container_destroy_children | ( | GtkContainer * | container | ) |
References _delete_child(), and container().
Referenced by _lib_duplicate_init_callback(), clear_search(), dt_iop_gui_update_blendif(), and dt_ui_container_destroy_children().
| GtkWidget * dt_gui_container_first_child | ( | GtkContainer * | container | ) |
References container().
Referenced by _get_container_row_heigth(), and gui_init().
| gboolean dt_gui_container_has_children | ( | GtkContainer * | container | ) |
References container(), and FALSE.
Referenced by _destroyed_gui_thread().
| GtkWidget * dt_gui_container_nth_child | ( | GtkContainer * | container, |
| int | which | ||
| ) |
References container().
Referenced by _iop_panel_label().
| int dt_gui_container_num_children | ( | GtkContainer * | container | ) |
References container(), and FALSE.
Referenced by container_len().
| void dt_gui_container_remove_children | ( | GtkContainer * | container | ) |
References _remove_child(), and container().
Referenced by _on_storage_list_changed(), and container_cleanup().
| void dt_gui_draw_rounded_rectangle | ( | cairo_t * | cr, |
| float | width, | ||
| float | height, | ||
| float | x, | ||
| float | y | ||
| ) |
References height, M_PI, width, and x.
Referenced by gui_draw_sym(), gui_post_expose(), and gui_post_expose().
Resolve the widget used as parent for nested popups on Wayland.
Gtk on Wayland requires popups to use the top-most enclosing popup as parent. This helper walks the parent chain to find that anchor while keeping the caller in charge of the popup logic. When rect is not NULL, it returns the position and size of widget in the coordinate system of the returned anchor.
| widget | the widget the popup should visually point to. |
| rect | optional output rectangle receiving the geometry of widget. |
widget is NULL. References MAX, rect::width, rect::x, and rect::y.
Referenced by _completion_update(), _popover_set_relative_to_topmost_parent(), _setup_completion(), _toolbar_show_popup(), dt_bauhaus_show_popup(), and dt_gui_menu_popup().
| gboolean dt_gui_get_scroll_delta | ( | const GdkEventScroll * | event, |
| gdouble * | delta | ||
| ) |
References delta, dt_gui_get_scroll_deltas(), FALSE, and TRUE.
Referenced by _area_scrolled_callback(), _scrolled(), and _scrolled().
| gboolean dt_gui_get_scroll_deltas | ( | const GdkEventScroll * | event, |
| gdouble * | delta_x, | ||
| gdouble * | delta_y | ||
| ) |
References dt_conf_get_bool(), FALSE, and TRUE.
Referenced by dt_gui_get_scroll_delta().
| gboolean dt_gui_get_scroll_unit_delta | ( | const GdkEventScroll * | event, |
| int * | delta | ||
| ) |
References delta, dt_gui_get_scroll_unit_deltas(), FALSE, and TRUE.
Referenced by _area_scrolled_callback(), _gradient_slider_scroll_event(), and _scrolled().
| gboolean dt_gui_get_scroll_unit_deltas | ( | const GdkEventScroll * | event, |
| int * | delta_x, | ||
| int * | delta_y | ||
| ) |
References dt_conf_get_bool(), FALSE, and TRUE.
Referenced by _area_scroll_callback(), _area_scrolled_callback(), _area_scrolled_callback(), _datetime_scroll_over(), _lib_modulegroups_scroll(), _scroll_wrap_scroll(), _thumbtable_scroll(), _widget_scroll(), area_scroll_callback(), area_scroll_callback(), area_scrolled(), denoiseprofile_scrolled(), dt_gui_get_scroll_unit_delta(), dt_iop_colorcorrection_scrolled(), dt_iop_levels_scroll(), dt_iop_monochrome_scrolled(), dt_iop_zonesystem_bar_scrolled(), lowlight_scrolled(), rawdenoise_scrolled(), and rt_wdbar_scrolled().
| int dt_gui_gtk_init | ( | dt_gui_gtk_t * | gui | ) |
References _button_pressed(), _button_released(), _center_enter(), _center_leave(), _configure(), _draw(), _get_axis_name(), _get_mode_name(), _get_source_name(), _init_widgets(), _key_pressed(), _mouse_moved(), _scrolled(), _window_configure(), dt_gui_gtk_t::accels, dt_gui_gtk_t::center_tooltip, dt_gui_gtk_t::culling_mode, darktable, dt_accels_dispatch(), dt_accels_init(), DT_COLORSPACE_DISPLAY, dt_colorspaces_set_display_profile(), dt_conf_get_bool(), dt_conf_get_string_const(), dt_control_change_cursor(), DT_DEBUG_INPUT, dt_free, dt_gui_load_theme(), dt_gui_presets_init(), dt_guides_set_overlay_colors(), dt_l10n_get_current_lang(), dt_loc_get_datadir(), dt_loc_get_sharedir(), dt_loc_get_user_config_dir(), dt_print(), dt_pthread_mutex_init(), dt_ui_center(), dt_ui_main_window(), dt_gui_gtk_t::export_popup, FALSE, flags, dt_gui_gtk_t::gtkrc, darktable_t::gui, dt_gui_gtk_t::has_scroll_focus, i, darktable_t::l10n, dt_gui_gtk_t::last_preset, dt_gui_gtk_t::mutex, PATH_MAX, dt_gui_gtk_t::presets_popup_menu, dt_gui_gtk_t::reset, dt_gui_gtk_t::scroll_mask, dt_gui_gtk_t::selection_stacked, dt_gui_gtk_t::styles_popup, dt_gui_gtk_t::surface, TRUE, dt_gui_gtk_t::ui, and dt_gui_gtk_t::window.
Referenced by dt_init().
| void dt_gui_gtk_quit | ( | ) |
References darktable, dt_gui_add_class(), dt_gui_gtk_write_config(), dt_ui_cleanup_titlebar(), dt_ui_main_window(), darktable_t::gui, and dt_gui_gtk_t::ui.
Referenced by dt_control_quit().
| void dt_gui_gtk_run | ( | dt_gui_gtk_t * | gui | ) |
| void dt_gui_gtk_set_source_rgb | ( | cairo_t * | cr, |
| dt_gui_color_t | color | ||
| ) |
References dt_gui_gtk_t::colors, darktable, and darktable_t::gui.
Referenced by _draw_ellipse(), _draw_rectangle(), _view_map_images_count(), dt_control_draw_busy_msg(), dt_view_manager_expose(), and expose().
| void dt_gui_gtk_set_source_rgba | ( | cairo_t * | cr, |
| dt_gui_color_t | color, | ||
| float | opacity_coef | ||
| ) |
References dt_gui_gtk_t::colors, darktable, and darktable_t::gui.
Referenced by _brush_events_post_expose(), and dt_draw_get_pixbuf_from_cairo().
| int dt_gui_gtk_write_config | ( | ) |
References darktable, dt_conf_set_bool(), dt_conf_set_int(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_ui_main_window(), darktable_t::gui, height, dt_gui_gtk_t::mutex, dt_gui_gtk_t::ui, and width.
Referenced by dt_gui_gtk_quit().
| void dt_gui_hide_collapsible_section | ( | dt_gui_collapsible_section_t * | cs | ) |
References _collapsible_set_states(), _gui_collapsible_section_t::container, FALSE, and _gui_collapsible_section_t::toggle.
Referenced by gui_update().
| void dt_gui_load_theme | ( | const char * | theme | ) |
References c, dt_gui_gtk_t::colors, darktable, dt_conf_get_bool(), dt_conf_get_float(), dt_conf_key_exists(), dt_conf_set_bool(), dt_conf_set_string(), dt_free, DT_GUI_COLOR_BG, DT_GUI_COLOR_BRUSH_CURSOR, DT_GUI_COLOR_BRUSH_TRACE, DT_GUI_COLOR_BUTTON_FG, DT_GUI_COLOR_DARKROOM_BG, DT_GUI_COLOR_DARKROOM_PREVIEW_BG, DT_GUI_COLOR_FILMSTRIP_BG, DT_GUI_COLOR_LAST, DT_GUI_COLOR_LIGHTTABLE_BG, DT_GUI_COLOR_LIGHTTABLE_FONT, DT_GUI_COLOR_LIGHTTABLE_PREVIEW_BG, DT_GUI_COLOR_LOG_BG, DT_GUI_COLOR_LOG_FG, DT_GUI_COLOR_MAP_COUNT_BG, DT_GUI_COLOR_MAP_COUNT_DIFF_LOC, DT_GUI_COLOR_MAP_COUNT_SAME_LOC, DT_GUI_COLOR_MAP_LOC_SHAPE_DEF, DT_GUI_COLOR_MAP_LOC_SHAPE_HIGH, DT_GUI_COLOR_MAP_LOC_SHAPE_LOW, DT_GUI_COLOR_PREVIEW_HOVER_BORDER, DT_GUI_COLOR_PRINT_BG, DT_GUI_COLOR_THUMBNAIL_BG, DT_GUI_COLOR_THUMBNAIL_BORDER, DT_GUI_COLOR_THUMBNAIL_FONT, DT_GUI_COLOR_THUMBNAIL_HOVER_BG, DT_GUI_COLOR_THUMBNAIL_HOVER_FONT, DT_GUI_COLOR_THUMBNAIL_HOVER_OUTLINE, DT_GUI_COLOR_THUMBNAIL_OUTLINE, DT_GUI_COLOR_THUMBNAIL_SELECTED_BG, DT_GUI_COLOR_THUMBNAIL_SELECTED_BORDER, DT_GUI_COLOR_THUMBNAIL_SELECTED_FONT, DT_GUI_COLOR_THUMBNAIL_SELECTED_OUTLINE, dt_loc_get_datadir(), dt_loc_get_user_config_dir(), dt_ui_main_window(), dt_util_str_replace(), error(), darktable_t::gui, i, init(), name, PATH_MAX, TRUE, and dt_gui_gtk_t::ui.
Referenced by dt_gui_gtk_init(), reload_ui_last_theme(), and theme_callback().
| void dt_gui_menu_popup | ( | GtkMenu * | menu, |
| GtkWidget * | button, | ||
| GdkGravity | widget_anchor, | ||
| GdkGravity | menu_anchor | ||
| ) |
References darktable, dt_gui_get_popup_relative_widget(), darktable_t::gui, dt_ui_t::main_window, and dt_gui_gtk_t::ui.
Referenced by _blendif_options_callback(), _gui_multiinstance_callback(), _lib_navigation_button_press_callback(), _presets_popup_callback(), _show_popover_menu(), camera_autosearch_clicked(), camera_menusearch_clicked(), lens_autosearch_clicked(), lens_menusearch_clicked(), and presets_popup_callback().
| 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.
The pack argument makes the insertion side explicit so callers control layout order without reordering children later.
| cs | section storage owned by the caller. |
| confname | configuration key used to persist the expanded state. |
| label | UI label for the section header. |
| parent | GtkBox that receives the section. |
| pack | either GTK_PACK_START or GTK_PACK_END to choose insertion side. |
References _coeffs_button_changed(), _coeffs_expander_click(), _gui_collapsible_section_t::confname, _gui_collapsible_section_t::container, CPF_DIRECTION_DOWN, CPF_DIRECTION_LEFT, DT_BAUHAUS_SPACE, dt_conf_get_bool(), dt_gui_add_class(), dt_ui_section_label_new(), dtgtk_cairo_paint_solid_arrow(), DTGTK_EXPANDER, dtgtk_expander_new(), dtgtk_expander_set_expanded(), dtgtk_togglebutton_new(), _gui_collapsible_section_t::expander, FALSE, _gui_collapsible_section_t::label, _gui_collapsible_section_t::parent, _gui_collapsible_section_t::toggle, and TRUE.
Referenced by gui_init(), and gui_init().
| void dt_gui_refocus_center | ( | ) |
References dt_gui_gtk_t::accels, darktable, dt_accels_disable(), dt_ui_center(), dt_ui_main_window(), dt_view_manager_name(), FALSE, dt_thumbtable_t::grid, darktable_t::gui, dt_ui_t::thumbtable_lighttable, dt_gui_gtk_t::ui, and darktable_t::view_manager.
Referenced by _dispatch_selected_shortcut(), _gui_delete_callback(), _process_file_list(), _text_entry_key_pressed(), default_iop_focus(), dt_iop_request_focus(), dt_lib_colorpicker_set_box_area(), dt_lib_colorpicker_set_point(), dt_lib_gui_set_expanded(), enter(), and row_activated_with_event().
Referenced by _collapsible_set_states(), _event_dnd_end(), _iop_dim_all_but(), _mouse_over_image_callback(), _on_drag_begin(), _on_drag_data_received(), _on_drag_leave(), _on_drag_motion(), _set_widget_dimmed(), _thumb_update_rating_class(), dt_iop_gui_set_enable_button(), dt_iop_request_focus(), dt_thumbnail_set_group_border(), dt_thumbtable_set_overlays_mode(), and update_entry().
| gboolean dt_gui_search_start | ( | GtkWidget * | widget, |
| GdkEventKey * | event, | ||
| GtkSearchEntry * | entry | ||
| ) |
Referenced by init_tab_presets().
Referenced by init_tab_presets().
| char * dt_gui_show_standalone_string_dialog | ( | const char * | title, |
| const char * | markup, | ||
| const char * | placeholder, | ||
| const char * | no_text, | ||
| const char * | yes_text | ||
| ) |
References _gtk_main_quit_safe(), _yes_no_button_handler(), result_t::button_no, result_t::button_yes, darktable, dt_accels_disconnect_on_text_input(), dt_free, dt_osx_disallow_fullscreen(), dt_ui_main_window(), result_t::entry_text, darktable_t::gui, result_t::result, TRUE, dt_gui_gtk_t::ui, and result_t::window.
| gboolean dt_gui_show_standalone_yes_no_dialog | ( | const char * | title, |
| const char * | markup, | ||
| const char * | no_text, | ||
| const char * | yes_text | ||
| ) |
References _gtk_main_quit_safe(), _yes_no_button_handler(), result_t::button_no, result_t::button_yes, darktable, dt_osx_disallow_fullscreen(), dt_ui_main_window(), darktable_t::gui, result_t::result, darktable_t::themes, TRUE, dt_gui_gtk_t::ui, and result_t::window.
Referenced by _ask_for_maintenance(), ask_for_upgrade(), and dt_database_show_error().
| void dt_gui_store_last_preset | ( | const char * | name | ) |
References darktable, dt_free, darktable_t::gui, dt_gui_gtk_t::last_preset, and name.
Referenced by _edit_preset_final_callback(), dt_gui_presets_apply_preset(), and dt_lib_presets_apply().
| void dt_gui_update_collapsible_section | ( | dt_gui_collapsible_section_t * | cs | ) |
References _collapsible_set_states(), _gui_collapsible_section_t::container, CPF_DIRECTION_DOWN, CPF_DIRECTION_LEFT, dtgtk_cairo_paint_solid_arrow(), DTGTK_EXPANDER, dtgtk_expander_set_expanded(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), _gui_collapsible_section_t::expander, and _gui_collapsible_section_t::toggle.
Referenced by gui_update().
Set the automatic height for a widget based on the number of rows or lines it contains.
Compatible with GtkTreeView and GtkTextView.
If the widget is already wrapped in a GtkBox, this function creates a GtkScrolledWindow to contain the widget to scroll. The widget is then wrapped into a GtkScrolledWindow while preserving box packing options. If the widget is already inside a GtkScrolledWindow, its policy is set to horizontal=never and vertical=automatic.
| widget | The GtkWidget. It have to be already packed into a GtkBox, or already wrapped in a GtkScrolledWindow. |
| min_rows | The minimum number of rows to display. |
| max_rows | The maximum number of rows to display. |
References _widget_auto_connect_buffer(), _widget_auto_connect_model(), _widget_auto_ensure_scrolled_window(), _widget_auto_height_free(), _widget_auto_on_buffer_changed(), _widget_auto_on_model_changed(), _widget_auto_update(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, MAX, dt_gui_widget_auto_height_t::max_rows, and dt_gui_widget_auto_height_t::min_rows.
Referenced by dt_iop_gui_init_masks(), and gui_init().
| GdkModifierType dt_key_modifier_state | ( | ) |
References darktable, dt_ui_main_window(), darktable_t::gui, and dt_gui_gtk_t::ui.
Referenced by _color_picker_callback_button_press(), blend_color_picker_apply(), and color_picker_apply().
get the center drawable widget
References dt_ui_t::center.
Referenced by _control_apply_cursor(), _dt_ctl_switch_mode_prepare(), _extract_pointer_input(), _focus_main_image(), _sample_tablet_state_from_devices(), _unregister_modules_drag_n_drop(), button_pressed(), dt_colorspaces_set_display_profile(), dt_control_expose(), dt_dev_pixelpipe_change_zoom_main(), dt_drawlayer_set_os_cursor_hidden(), dt_gui_gtk_init(), dt_gui_gtk_run(), dt_gui_refocus_center(), dt_masks_creation_mode(), enter(), gui_init(), key_pressed(), leave(), and mouse_moved().
References dt_ui_t::center_base.
Referenced by _control_apply_cursor(), _ui_toast_redraw_callback(), and leave().
| void dt_ui_container_destroy_children | ( | dt_ui_t * | ui, |
| const dt_ui_container_t | c | ||
| ) |
destroy all child widgets from container
References c, dt_ui_t::containers, and dt_gui_container_destroy_children().
Referenced by dt_view_manager_switch_by_view().
| 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
References c, and dt_ui_t::containers.
Referenced by _gui_set_single_expanded().
| 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
References c, and dt_ui_t::containers.
Referenced by dt_view_manager_switch_by_view().
| GtkBox * dt_ui_get_container | ( | dt_ui_t * | ui, |
| const dt_ui_container_t | c | ||
| ) |
References c, and dt_ui_t::containers.
Referenced by _gui_delete_callback(), _gui_movedown_callback(), _gui_moveup_callback(), _iop_plugin_header_button_press(), _on_drag_begin(), _on_drag_data_received(), _on_drag_motion(), _register_modules_drag_n_drop(), _reorder_gui_module_list(), _unregister_modules_drag_n_drop(), dt_dev_reorder_gui_module_list(), and dt_iop_gui_duplicate().
|
inlinestatic |
get the main window widget
References dt_ui_t::main_window.
Referenced by _apply_rename_path(), _ask_before_delete_style(), _choose_gpx_callback(), _confirm_delete_layer(), _control_apply_cursor(), _datetime_key_pressed(), _discarded_files_popup(), _dt_delete_dialog_main_thread(), _edit_preset(), _enter_key_pressed(), _export_button_clicked(), _export_button_clicked(), _gui_styles_dialog_run(), _gui_styles_edit_style_response(), _gui_styles_new_style_response(), _hm_ask_user_constraints_choice(), _hm_show_merge_report_popup(), _hm_show_toposort_cycle_popup(), _hm_warn_missing_raster_producers(), _import_button_clicked(), _init_widgets(), _key_pressed(), _main_do_event_help(), _masks_gui_confirm_remove_form_dialog(), _menuitem_delete_preset(), _menuitem_preferences(), _menuitem_update_preset(), _offer_missing_layer_recreation(), _open_uri(), _pop_menu_dictionary_change_path(), _pop_menu_dictionary_create_tag(), _pop_menu_dictionary_delete_node(), _pop_menu_dictionary_delete_tag(), _pop_menu_dictionary_edit_tag(), _preview_gpx_file(), _save_layer_clicked(), _scroll_wrap_resize(), _show_drawlayer_modal_message(), _show_drawlayer_wait_dialog(), _styles_open_popup_callback(), _switch_cursors(), _timezone_key_pressed(), _timezone_save(), ask_and_delete(), button_clicked(), button_clicked(), button_clicked(), dt_bauhaus_init(), dt_bauhaus_load_theme(), dt_bauhaus_show_popup(), dt_cleanup(), dt_control_copy_images(), dt_control_crawler_show_image_list(), dt_control_delete_image(), dt_control_delete_images(), dt_control_move_images(), dt_control_remove_images(), dt_drawlayer_set_os_cursor_hidden(), dt_gui_gtk_init(), dt_gui_gtk_quit(), dt_gui_gtk_write_config(), dt_gui_hist_dialog_new(), dt_gui_load_theme(), dt_gui_preferences_show(), dt_gui_refocus_center(), dt_gui_show_standalone_string_dialog(), dt_gui_show_standalone_yes_no_dialog(), dt_key_modifier_state(), dt_lib_export_metadata_configuration_dialog(), dt_preview_window_spawn(), dt_ui_notify_user(), dt_view_manager_button_pressed(), dt_view_manager_switch_by_view(), edit_preset(), enter(), export_clicked(), export_files_callback(), full_screen_callback(), full_screen_checked_callback(), get_stamp_params(), global_progress_end(), global_progress_set(), global_progress_start(), gui_init(), gui_reset(), import_clicked(), load_xmp_callback(), menuitem_delete_preset(), menuitem_update_preset(), mouse_leave(), mouse_moved(), open_chat_callback(), open_doc_callback(), open_forum_callback(), open_search_callback(), search_accels_callback(), shortcuts_callback(), show_about_dialog(), and view_popup_menu_onSearchFilmroll().
| GtkNotebook * dt_ui_notebook_new | ( | ) |
Referenced by gui_init(), gui_init(), and gui_init().
| GtkWidget * dt_ui_notebook_page | ( | GtkNotebook * | notebook, |
| const char * | text, | ||
| const char * | tooltip | ||
| ) |
References _notebook_motion_notify_callback(), _notebook_size_callback(), dt_capitalize_label(), dt_free, FALSE, tooltip, and TRUE.
Referenced by dt_iop_gui_update_blendif(), gui_init(), gui_init(), and gui_init().
| void dt_ui_notify_user | ( | ) |
draw user's attention
References darktable, dt_ui_main_window(), darktable_t::gui, TRUE, and dt_gui_gtk_t::ui.
Referenced by _pathlist_import_run(), dt_control_export_job_run(), and dt_film_import1_run().
| gboolean dt_ui_panel_ancestor | ( | dt_ui_t * | ui, |
| const dt_ui_panel_t | p, | ||
| GtkWidget * | w | ||
| ) |
is the panel ancestor of widget
References FALSE, p, and dt_ui_t::panels.
Referenced by _get_preferred_width().
| int dt_ui_panel_get_size | ( | dt_ui_t * | ui, |
| const dt_ui_panel_t | p | ||
| ) |
get width of right, left, or bottom panel
References dt_conf_get_int(), dt_conf_key_exists(), dt_free, DT_UI_PANEL_BOTTOM, DT_UI_PANEL_BOTTOM_DEFAULT_SIZE, DT_UI_PANEL_LEFT, DT_UI_PANEL_RIGHT, DT_UI_PANEL_SIDE_DEFAULT_SIZE, key, p, panels_get_panel_path(), and size.
Referenced by _get_preferred_width(), and _panel_get_size_cb().
| void dt_ui_panel_show | ( | dt_ui_t * | ui, |
| const dt_ui_panel_t | p, | ||
| gboolean | show, | ||
| gboolean | write | ||
| ) |
shows/hide a panel
References dt_conf_get_int(), dt_conf_set_bool(), dt_conf_set_int(), dt_free, DT_UI_PANEL_BOTTOM, DT_UI_PANEL_LEFT, DT_UI_PANEL_RIGHT, DT_UI_PANEL_SIZE, dt_ui_panel_visible(), FALSE, key, p, dt_ui_t::panels, panels_get_panel_path(), panels_get_view_path(), and TRUE.
Referenced by _lib_masks_reveal(), _panel_hide_all_cb(), _panel_hide_cb(), _panel_show_all_cb(), _panel_show_cb(), dt_ui_restore_panels(), enter(), filmstrip_callback(), panel_left_callback(), panel_right_callback(), and panel_top_callback().
| gboolean dt_ui_panel_visible | ( | dt_ui_t * | ui, |
| const dt_ui_panel_t | p | ||
| ) |
get visible state of panel
References FALSE, p, and dt_ui_t::panels.
Referenced by _lib_masks_reveal(), _panel_visible_cb(), dt_ui_panel_show(), filmstrip_checked_callback(), panel_left_checked_callback(), panel_right_checked_callback(), and panel_top_checked_callback().
References _scroll_wrap_resize(), _scroll_wrap_scroll(), and DT_PIXEL_APPLY_DPI.
Referenced by gui_init().
|
inlinestatic |
References dt_capitalize_label(), dt_free, and dt_ui_section_label_set().
Referenced by _configure_slider_blocks(), dt_gui_new_collapsible_section(), gui_init(), gui_init(), gui_init(), and gui_init_section().
References dt_gui_add_class().
Referenced by dt_ui_section_label_new(), and section_label_init().
toggle view of panels eg. collapse/expands to previous view state
References dt_conf_get_int(), dt_conf_set_int(), dt_free, dt_ui_restore_panels(), key, and panels_get_view_path().
Referenced by _toggle_side_borders_accel_callback().