![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "common/collection.h"#include "common/colorspaces.h"#include "common/l10n.h"#include "common/file_location.h"#include "common/ratings.h"#include "common/image.h"#include "common/image_cache.h"#include "gui/guides.h"#include "bauhaus/bauhaus.h"#include "develop/develop.h"#include "develop/imageop.h"#include "dtgtk/button.h"#include "dtgtk/expander.h"#include "dtgtk/sidepanel.h"#include "gui/gtk.h"#include "gui/splash.h"#include "common/styles.h"#include "control/conf.h"#include "control/control.h"#include "control/jobs.h"#include "control/signal.h"#include "gui/presets.h"#include "views/view.h"#include <gdk/gdkkeysyms.h>#include <gtk/gtk.h>#include <math.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <pthread.h>
Include dependency graph for gtk.c:Go to the source code of this file.
Data Structures | |
| struct | dt_tablet_motion_state_t |
| struct | _spacing_ctx_t |
| struct | result_t |
| struct | dt_ui_resizable_area_t |
Typedefs | |
| typedef struct dt_tablet_motion_state_t | dt_tablet_motion_state_t |
| typedef struct _spacing_ctx_t | _spacing_ctx_t |
| typedef struct result_t | result_t |
| typedef struct dt_ui_resizable_area_t | dt_ui_resizable_area_t |
Functions | |
| static void | _ui_widget_redraw_callback (gpointer instance, GtkWidget *widget) |
| static void | _ui_log_redraw_callback (gpointer instance, GtkWidget *widget) |
| static void | _ui_toast_redraw_callback (gpointer instance, GtkWidget *widget) |
| void | dt_gui_add_class (GtkWidget *widget, const gchar *class_name) |
| void | dt_gui_remove_class (GtkWidget *widget, const gchar *class_name) |
| static void | _init_widgets (dt_gui_gtk_t *gui) |
| static gboolean | _configure (GtkWidget *da, GdkEventConfigure *event, gpointer user_data) |
| 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) |
| static gboolean | _draw (GtkWidget *da, cairo_t *cr, gpointer user_data) |
| static gboolean | _scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) |
| int | dt_gui_gtk_write_config () |
| void | dt_gui_gtk_set_source_rgb (cairo_t *cr, dt_gui_color_t color) |
| void | dt_gui_gtk_set_source_rgba (cairo_t *cr, dt_gui_color_t color, float opacity_coef) |
| void | dt_gui_gtk_quit () |
| gboolean | dt_gui_quit_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
| void | dt_gui_store_last_preset (const char *name) |
| static gboolean | _window_configure (GtkWidget *da, GdkEvent *event, gpointer user_data) |
| static double | _clamp01d (const double value) |
| static const gdouble * | _event_axes (const GdkEvent *event) |
| static gboolean | _get_axis_value_for_source (const GdkEvent *event, GdkDevice *source_device, const GdkAxisUse axis, double *value, gboolean *from_source_map) |
| static gboolean | _sample_axis_from_device_state (GdkWindow *window, GdkDevice *device, const GdkAxisUse axis, double *value) |
| static gboolean | _sample_tablet_state_from_devices (const GdkEvent *event, double *pressure, gboolean *have_pressure, double *tilt_x, double *tilt_y, gboolean *have_tilt, const char **picked_device_name) |
| static dt_control_pointer_input_t | _extract_pointer_input (const GdkEvent *event, const double x, const double y, const guint32 time_ms, const gboolean reset_kinematics, const char *tag) |
| static gboolean | _button_pressed (GtkWidget *w, GdkEventButton *event, gpointer user_data) |
| static gboolean | _button_released (GtkWidget *w, GdkEventButton *event, gpointer user_data) |
| static gboolean | _mouse_moved (GtkWidget *w, GdkEventMotion *event, gpointer user_data) |
| static gboolean | _key_pressed (GtkWidget *w, GdkEventKey *event) |
| static gboolean | _center_leave (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | _center_enter (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static const char * | _get_source_name (int pos) |
| static const char * | _get_mode_name (int pos) |
| static const char * | _get_axis_name (int pos) |
| int | dt_gui_gtk_init (dt_gui_gtk_t *gui) |
| void | dt_gui_gtk_run (dt_gui_gtk_t *gui) |
| double | dt_get_system_gui_ppd (GtkWidget *widget) |
| void | dt_configure_ppd_dpi (dt_gui_gtk_t *gui) |
| static void | _refresh_container_spacing (GtkWidget *w, gpointer user_data) |
| static void | _refresh_all_container_spacing (void) |
| void | dt_gui_update_em (void) |
| void | dt_gui_set_pango_resolution (PangoLayout *layout) |
| void | dt_gui_cairo_set_font_options (cairo_t *cr, GtkWidget *widget) |
| static gboolean | _focus_in_out_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
| static gboolean | _ui_log_button_press_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
| static gboolean | _ui_toast_button_press_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
| 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_notify_user () |
| draw user's attention | |
| void | dt_ellipsize_combo (GtkComboBox *cbox) |
| static void | _gtk_main_quit_safe (GtkWidget *widget, gpointer data) |
| static void | _yes_no_button_handler (GtkButton *button, gpointer data) |
| 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, char *link) |
| void | dt_gui_load_theme (const char *theme) |
| GdkModifierType | dt_key_modifier_state () |
| static void | _notebook_size_callback (GtkNotebook *notebook, GdkRectangle *allocation, gpointer *data) |
| static gboolean | _notebook_motion_notify_callback (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
| GtkNotebook * | dt_ui_notebook_new () |
| GtkWidget * | dt_ui_notebook_page (GtkNotebook *notebook, const char *text, const char *tooltip) |
| static gint | _get_container_row_heigth (GtkWidget *w) |
| static GtkWidget * | _search_parent_scrolled_window (GtkWidget *w) |
| static int | _treeview_count_visible_rows (GtkTreeView *treeview, GtkTreeModel *model, GtkTreeIter *parent) |
| static int | _textview_count_visible_rows (GtkWidget *textview) |
| static void | _widget_auto_disconnect_model (dt_gui_widget_auto_height_t *state, GtkWidget *treeview) |
| static void | _widget_auto_disconnect_buffer (dt_gui_widget_auto_height_t *state) |
| static gint | _resizable_scroll_max_height (void) |
| Window-height ceiling shared by the auto-size rule and the drag handle. | |
| static void | _resizable_scroll_apply (GtkWidget *w) |
| The single sizing rule for every dt_ui_scroll_wrap area. | |
| static void | _widget_auto_update (GtkWidget *widget) |
| static gboolean | _resizable_scroll_draw (GtkWidget *w, cairo_t *cr, gpointer user_data) |
| static void | _resizable_scroll_realize (GtkWidget *w, gpointer user_data) |
| static int | _resizable_scroll_handle_get_size (gpointer user_data) |
| static int | _resizable_scroll_handle_resize (int requested_size, gboolean finished, gpointer user_data) |
| static void | _widget_auto_model_row_inserted (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) |
| static void | _widget_auto_model_row_deleted (GtkTreeModel *model, GtkTreePath *path, gpointer user_data) |
| static void | _widget_auto_model_row_changed (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) |
| static void | _widget_auto_model_rows_reordered (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gint *new_order, gpointer user_data) |
| static void | _widget_auto_model_row_expanded (GtkTreeView *tree_view, GtkTreeIter *expanded_iter, GtkTreePath *path, gpointer user_data) |
| static void | _widget_auto_model_row_collapsed (GtkTreeView *tree_view, GtkTreeIter *collapsed_iter, GtkTreePath *path, gpointer user_data) |
| static void | _widget_auto_text_buffer_changed (GtkTextBuffer *buffer, gpointer user_data) |
| static void | _widget_auto_connect_model (GtkWidget *treeview) |
| static void | _widget_auto_connect_buffer (GtkWidget *textview) |
| static void | _widget_auto_on_model_changed (GObject *treeview, GParamSpec *pspec, gpointer user_data) |
| static void | _widget_auto_on_buffer_changed (GObject *textview, GParamSpec *pspec, gpointer user_data) |
| static void | _widget_auto_height_free (gpointer data) |
| void | dt_gui_textview_set_padding (GtkTextView *textview) |
| Apply the standard recessed-input text padding to a GtkTextView. | |
| GtkWidget * | dt_ui_scroll_wrap (GtkWidget *w, gint min_size, char *config_str, dt_ui_resize_mode_t mode) |
| Wrap a scrollable content widget in a recessed, vertically resizable scrolled window. | |
| GtkWidget * | dt_ui_scroll_wrap_get_scrolled_window (GtkWidget *wrapper) |
| Return the inner scrolled window of a dt_ui_scroll_wrap() wrapper, or NULL. | |
| static void | _resizable_area_free (gpointer data) |
| static int | _resizable_area_get_size (gpointer user_data) |
| static int | _resizable_area_resize (int requested_size, gboolean finished, gpointer user_data) |
| GtkWidget * | dt_ui_resizable_drawing_area (GtkWidget *area, char *config_str, int default_height, int min_height) |
| Make a self-drawing widget (typically a GtkDrawingArea graph or scope) vertically resizable. | |
| 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) |
| static void | _remove_child (GtkWidget *widget, gpointer data) |
| void | dt_gui_container_remove_children (GtkContainer *container) |
| static void | _delete_child (GtkWidget *widget, gpointer data) |
| void | dt_gui_container_destroy_children (GtkContainer *container) |
| 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_menu_popup (GtkMenu *menu, GtkWidget *button, GdkGravity widget_anchor, GdkGravity menu_anchor) |
| static void | _popover_set_relative_to_topmost_parent (GtkPopover *popover, GtkWidget *button) |
| 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) |
| static void | _collapsible_set_states (dt_gui_collapsible_section_t *cs, gboolean active) |
| static void | _collapsible_container_show (GtkWidget *widget, gpointer user_data) |
| static void | _coeffs_button_changed (GtkDarktableToggleButton *widget, gpointer user_data) |
| static void | _coeffs_expander_click (GtkWidget *widget, GdkEventButton *e, gpointer user_data) |
| void | dt_gui_update_collapsible_section (dt_gui_collapsible_section_t *cs) |
| void | dt_gui_hide_collapsible_section (dt_gui_collapsible_section_t *cs) |
| 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_capitalize_label (gchar *text) |
| GtkBox * | attach_popover (GtkWidget *widget, const char *icon, GtkWidget *content) |
| GtkBox * | attach_help_popover (GtkWidget *widget, const char *label) |
| static gboolean | _text_entry_focus_in_event (GtkWidget *self, GdkEventFocus event, gpointer user_data) |
| static gboolean | _text_entry_focus_out_event (GtkWidget *self, GdkEventFocus event, gpointer user_data) |
| static gboolean | _text_entry_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
| 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. | |
| void | dt_gui_refocus_center () |
Variables | |
| static dt_tablet_motion_state_t | _tablet_motion_state = { 0 } |
| static gint | _last_box_spacing = 10 |
| static const char *const | DT_GUI_WIDGET_AUTO_HEIGHT_KEY = "dt-gui-widget-auto-height" |
| static const char *const | DT_UI_RESIZABLE_AREA_KEY = "dt-ui-resizable-area" |
| typedef struct _spacing_ctx_t _spacing_ctx_t |
| typedef struct dt_tablet_motion_state_t dt_tablet_motion_state_t |
| typedef struct dt_ui_resizable_area_t dt_ui_resizable_area_t |
|
static |
Definition at line 982 of file gtk.c.
References _extract_pointer_input(), darktable, dt_control_button_pressed(), dt_control_set_pointer_input(), FALSE, darktable_t::gui, dt_control_pointer_input_t::has_pressure, dt_gui_gtk_t::has_scroll_focus, dt_ui_t::main_window, dt_control_pointer_input_t::pressure, TRUE, and dt_gui_gtk_t::ui.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 998 of file gtk.c.
References _extract_pointer_input(), darktable, dt_control_button_released(), dt_control_set_pointer_input(), FALSE, darktable_t::gui, dt_ui_t::main_window, TRUE, and dt_gui_gtk_t::ui.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 1069 of file gtk.c.
References dt_control_mouse_enter(), and TRUE.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 1063 of file gtk.c.
References dt_control_mouse_leave(), and TRUE.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 3057 of file gtk.c.
References _collapsible_set_states(), _gui_collapsible_section_t::confname, CPF_DIRECTION_DOWN, CPF_DIRECTION_LEFT, dt_conf_set_bool(), 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 dt_gui_new_collapsible_section().
|
static |
Definition at line 3069 of file gtk.c.
References _collapsible_set_states(), and _gui_collapsible_section_t::toggle.
Referenced by dt_gui_new_collapsible_section().
Definition at line 3046 of file gtk.c.
References _gui_collapsible_section_t::toggle.
Referenced by dt_gui_new_collapsible_section().
|
static |
Definition at line 3031 of file gtk.c.
References dt_gui_add_class(), dt_gui_remove_class(), _gui_collapsible_section_t::expander, and TRUE.
Referenced by _coeffs_button_changed(), _coeffs_expander_click(), dt_gui_hide_collapsible_section(), and dt_gui_update_collapsible_section().
|
static |
Definition at line 509 of file gtk.c.
References darktable, dt_cairo_image_surface_create(), DT_COLORSPACE_DISPLAY, dt_colorspaces_set_display_profile(), dt_configure_ppd_dpi(), dt_control_configure(), darktable_t::gui, and dt_gui_gtk_t::surface.
Referenced by dt_gui_gtk_init().
Definition at line 2913 of file gtk.c.
References void().
Referenced by dt_gui_container_destroy_children().
|
static |
Definition at line 325 of file gtk.c.
References darktable, dt_control_expose(), darktable_t::gui, dt_gui_gtk_t::surface, and TRUE.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 581 of file gtk.c.
References IS_NULL_PTR.
Referenced by _get_axis_value_for_source().
|
static |
Definition at line 752 of file gtk.c.
References _clamp01d(), _get_axis_value_for_source(), _sample_axis_from_device_state(), _sample_tablet_state_from_devices(), _tablet_motion_state, dt_control_pointer_input_t::acceleration, darktable, DT_DEBUG_INPUT, dt_print(), dt_ui_center(), FALSE, darktable_t::gui, dt_control_pointer_input_t::has_pressure, dt_control_pointer_input_t::has_tilt, dt_tablet_motion_state_t::have_pressure, dt_tablet_motion_state_t::have_tilt, IS_NULL_PTR, MAX, dt_control_pointer_input_t::pressure, dt_tablet_motion_state_t::pressure, dt_tablet_motion_state_t::speed_px_s, dt_control_pointer_input_t::tilt, dt_control_pointer_input_t::tilt_x, dt_tablet_motion_state_t::tilt_x, dt_control_pointer_input_t::tilt_y, dt_tablet_motion_state_t::tilt_y, dt_control_pointer_input_t::time_ms, dt_tablet_motion_state_t::time_ms, TRUE, dt_gui_gtk_t::ui, dt_tablet_motion_state_t::valid, x, dt_control_pointer_input_t::x, dt_tablet_motion_state_t::x, dt_control_pointer_input_t::y, and dt_tablet_motion_state_t::y.
Referenced by _button_pressed(), _button_released(), and _mouse_moved().
|
static |
|
static |
Definition at line 1092 of file gtk.c.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 598 of file gtk.c.
References _event_axes(), FALSE, IS_NULL_PTR, TRUE, and value.
Referenced by _extract_pointer_input().
|
static |
Definition at line 2283 of file gtk.c.
References dt_gui_container_first_child(), DT_PIXEL_APPLY_DPI, and height.
Referenced by _resizable_scroll_apply().
|
static |
Definition at line 1085 of file gtk.c.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 1075 of file gtk.c.
Referenced by dt_gui_gtk_init().
Definition at line 1833 of file gtk.c.
References void().
Referenced by _yes_no_button_handler(), dt_gui_show_standalone_string_dialog(), and dt_gui_show_standalone_yes_no_dialog().
|
static |
Definition at line 1524 of file gtk.c.
References _focus_in_out_event(), _key_pressed(), _scrolled(), _ui_log_button_press_event(), _ui_log_redraw_callback(), _ui_toast_button_press_event(), _ui_toast_redraw_callback(), _ui_widget_redraw_callback(), dt_ui_t::center_base, container(), darktable, dt_conf_get_bool(), dt_conf_get_int(), dt_conf_key_exists(), dt_configure_ppd_dpi(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), DT_GUI_BOX_SPACING, dt_gui_quit_callback(), dt_gui_splash_set_transient_for(), DT_PIXEL_APPLY_DPI, DT_SIGNAL_CONTROL_LOG_REDRAW, DT_SIGNAL_CONTROL_REDRAW_ALL, DT_SIGNAL_CONTROL_TOAST_REDRAW, dt_ui_init_main_table(), dt_ui_init_titlebar(), dt_ui_log_msg(), dt_ui_main_window(), dt_ui_toast_msg(), FALSE, darktable_t::gui, height, IS_NULL_PTR, dt_ui_t::log_msg, dt_ui_t::main_window, MAX, dt_gui_gtk_t::scroll_mask, darktable_t::signals, dt_ui_t::toast_msg, TRUE, dt_gui_gtk_t::ui, width, and x.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 1056 of file gtk.c.
References darktable, dt_control_key_pressed(), FALSE, darktable_t::gui, dt_ui_t::main_window, TRUE, and dt_gui_gtk_t::ui.
Referenced by _init_widgets(), and dt_gui_gtk_init().
|
static |
Definition at line 1009 of file gtk.c.
References _extract_pointer_input(), darktable, dt_control_mouse_moved(), dt_control_set_pointer_input(), FALSE, darktable_t::gui, dt_control_pointer_input_t::has_pressure, dt_ui_t::main_window, dt_control_pointer_input_t::pressure, and dt_gui_gtk_t::ui.
Referenced by dt_gui_gtk_init().
|
static |
|
static |
|
static |
Definition at line 2983 of file gtk.c.
References dt_gui_get_popup_relative_widget().
Referenced by attach_popover().
Definition at line 1427 of file gtk.c.
References _last_box_spacing, _refresh_container_spacing(), and DT_GUI_BOX_SPACING.
Referenced by dt_gui_update_em().
Definition at line 1397 of file gtk.c.
References _refresh_container_spacing().
Referenced by _refresh_all_container_spacing(), and _refresh_container_spacing().
Definition at line 2902 of file gtk.c.
Referenced by dt_gui_container_remove_children().
|
static |
Definition at line 2807 of file gtk.c.
References dt_free, IS_NULL_PTR, and state.
Referenced by dt_ui_resizable_drawing_area().
|
static |
Definition at line 2815 of file gtk.c.
References DT_UI_RESIZABLE_AREA_KEY, and state.
Referenced by dt_ui_resizable_drawing_area().
|
static |
Definition at line 2823 of file gtk.c.
References _resizable_scroll_max_height(), dt_conf_set_int(), DT_UI_RESIZABLE_AREA_KEY, height, IS_NULL_PTR, MAX, and state.
Referenced by dt_ui_resizable_drawing_area().
The single sizing rule for every dt_ui_scroll_wrap area.
Height = clamp(min(content, cap), min_size, 75% window), where the cap is the user's persisted height when set, otherwise the window ceiling so the area auto-grows to its content. This makes small content shrink to fit, lets nested lists grow and have their parent panel scroll until the user drags the handle to cap them, and snaps lists/textviews to whole rows to avoid clipped half-rows. The computed bare (pre-padding) height is cached for the drag handle.
Definition at line 2450 of file gtk.c.
References _get_container_row_heigth(), _resizable_scroll_max_height(), _search_parent_scrolled_window(), _textview_count_visible_rows(), _treeview_count_visible_rows(), dt_conf_get_int(), dt_conf_key_exists(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, DT_UI_RESIZE_STATIC, height, IS_NULL_PTR, MAX, MIN, and state.
Referenced by _resizable_scroll_draw(), _resizable_scroll_handle_resize(), _resizable_scroll_realize(), and _widget_auto_update().
|
static |
Definition at line 2521 of file gtk.c.
References _resizable_scroll_apply(), and FALSE.
Referenced by dt_ui_scroll_wrap().
|
static |
Definition at line 2533 of file gtk.c.
References DT_GUI_WIDGET_AUTO_HEIGHT_KEY, and state.
Referenced by dt_ui_scroll_wrap().
|
static |
Definition at line 2540 of file gtk.c.
References _resizable_scroll_apply(), _resizable_scroll_max_height(), dt_conf_set_int(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, IS_NULL_PTR, MAX, state, and value.
Referenced by dt_ui_scroll_wrap().
|
static |
Window-height ceiling shared by the auto-size rule and the drag handle.
The full main-window height: a resizable area may grow as tall as the window (the parent panel scrolls to reach it). Content shorter than this still shrinks to fit, so this only bounds how far the user can drag.
Definition at line 2435 of file gtk.c.
References darktable, DT_PIXEL_APPLY_DPI, dt_ui_main_window(), darktable_t::gui, and dt_gui_gtk_t::ui.
Referenced by _resizable_area_resize(), _resizable_scroll_apply(), _resizable_scroll_handle_resize(), and dt_ui_resizable_drawing_area().
Definition at line 2527 of file gtk.c.
References _resizable_scroll_apply().
Referenced by dt_ui_scroll_wrap().
|
static |
Definition at line 619 of file gtk.c.
References FALSE, IS_NULL_PTR, and value.
Referenced by _extract_pointer_input().
|
static |
Definition at line 640 of file gtk.c.
References darktable, dt_ui_center(), FALSE, darktable_t::gui, i, IS_NULL_PTR, p, TRUE, and dt_gui_gtk_t::ui.
Referenced by _extract_pointer_input().
|
static |
Definition at line 370 of file gtk.c.
References darktable, dt_gui_get_scroll_unit_delta(), dt_view_manager_scrolled(), FALSE, darktable_t::gui, dt_ui_t::main_window, dt_gui_gtk_t::ui, and darktable_t::view_manager.
Referenced by _init_widgets(), and dt_gui_gtk_init().
Definition at line 2325 of file gtk.c.
Referenced by _resizable_scroll_apply().
|
static |
Definition at line 3203 of file gtk.c.
References dt_gui_gtk_t::accels, darktable, dt_accels_disable(), FALSE, darktable_t::gui, and TRUE.
Referenced by dt_accels_disconnect_on_text_input().
|
static |
Definition at line 3209 of file gtk.c.
References dt_gui_gtk_t::accels, darktable, dt_accels_disable(), FALSE, and darktable_t::gui.
Referenced by dt_accels_disconnect_on_text_input().
|
static |
Definition at line 3215 of file gtk.c.
References dt_gui_refocus_center(), FALSE, and TRUE.
Referenced by dt_accels_disconnect_on_text_input().
|
static |
|
static |
Definition at line 2340 of file gtk.c.
References _treeview_count_visible_rows(), and model.
Referenced by _resizable_scroll_apply(), and _treeview_count_visible_rows().
|
static |
Definition at line 1765 of file gtk.c.
References darktable_t::control, darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::log_ack, dt_control_t::log_message, dt_control_t::log_mutex, and dt_control_t::log_pos.
Referenced by _init_widgets().
|
static |
Definition at line 1787 of file gtk.c.
References darktable_t::control, darktable, DT_PIXEL_APPLY_DPI, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_ui_center_base(), darktable_t::gui, dt_control_t::toast_ack, dt_control_t::toast_message, dt_control_t::toast_mutex, dt_control_t::toast_pos, and dt_gui_gtk_t::ui.
Referenced by _init_widgets().
Definition at line 1760 of file gtk.c.
Referenced by _init_widgets().
Definition at line 2642 of file gtk.c.
References _widget_auto_disconnect_buffer(), _widget_auto_text_buffer_changed(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, IS_NULL_PTR, and state.
Referenced by _widget_auto_on_buffer_changed(), and dt_ui_scroll_wrap().
Definition at line 2613 of file gtk.c.
References _widget_auto_disconnect_model(), _widget_auto_model_row_changed(), _widget_auto_model_row_collapsed(), _widget_auto_model_row_deleted(), _widget_auto_model_row_expanded(), _widget_auto_model_row_inserted(), _widget_auto_model_rows_reordered(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, IS_NULL_PTR, model, and state.
Referenced by _widget_auto_on_model_changed(), and dt_ui_scroll_wrap().
|
static |
Definition at line 2413 of file gtk.c.
References IS_NULL_PTR, and state.
Referenced by _widget_auto_connect_buffer(), and _widget_auto_height_free().
|
static |
Definition at line 2384 of file gtk.c.
References IS_NULL_PTR, model, and state.
Referenced by _widget_auto_connect_model(), and _widget_auto_height_free().
|
static |
Definition at line 2677 of file gtk.c.
References _widget_auto_disconnect_buffer(), _widget_auto_disconnect_model(), dt_free, IS_NULL_PTR, and state.
Referenced by dt_ui_scroll_wrap().
|
static |
Definition at line 2568 of file gtk.c.
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
Definition at line 2596 of file gtk.c.
References _widget_auto_update(), and void().
Referenced by _widget_auto_connect_model().
|
static |
Definition at line 2561 of file gtk.c.
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
Definition at line 2587 of file gtk.c.
References _widget_auto_update(), and void().
Referenced by _widget_auto_connect_model().
|
static |
Definition at line 2552 of file gtk.c.
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
Definition at line 2577 of file gtk.c.
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
Definition at line 2669 of file gtk.c.
References _widget_auto_connect_buffer(), _widget_auto_update(), and void().
Referenced by dt_ui_scroll_wrap().
|
static |
Definition at line 2661 of file gtk.c.
References _widget_auto_connect_model(), _widget_auto_update(), and void().
Referenced by dt_ui_scroll_wrap().
|
static |
Definition at line 2607 of file gtk.c.
References _widget_auto_update(), and void().
Referenced by _widget_auto_connect_buffer().
Definition at line 2516 of file gtk.c.
References _resizable_scroll_apply().
Referenced by _widget_auto_model_row_changed(), _widget_auto_model_row_collapsed(), _widget_auto_model_row_deleted(), _widget_auto_model_row_expanded(), _widget_auto_model_row_inserted(), _widget_auto_model_rows_reordered(), _widget_auto_on_buffer_changed(), _widget_auto_on_model_changed(), _widget_auto_text_buffer_changed(), and dt_ui_scroll_wrap().
|
static |
Definition at line 546 of file gtk.c.
References DT_COLORSPACE_DISPLAY, dt_colorspaces_set_display_profile(), and FALSE.
Referenced by dt_gui_gtk_init().
|
static |
Definition at line 1840 of file gtk.c.
References _gtk_main_quit_safe(), result_t::button_no, result_t::button_yes, result_t::entry, result_t::entry_text, result_t::result, and result_t::window.
Referenced by dt_gui_show_standalone_string_dialog(), and dt_gui_show_standalone_yes_no_dialog().
| 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 |
Definition at line 3194 of file gtk.c.
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 |
Definition at line 3164 of file gtk.c.
References _popover_set_relative_to_topmost_parent(), DT_GUI_BOX_SPACING, 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 |
Definition at line 3225 of file gtk.c.
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(), _lib_tagging_tag_show_accel(), _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().
| void dt_capitalize_label | ( | gchar * | text | ) |
Definition at line 3150 of file gtk.c.
Referenced by _hm_clean_module_name(), _iop_panel_label(), _ioporder_create_endpoint_node(), _ioporder_create_graph_node(), dt_action_button_new(), dt_bauhaus_widget_set_label(), dt_history_item_get_name(), dt_iop_gui_init(), dt_lib_gui_get_expander(), dt_lib_init_module(), dt_lib_unload_module(), dt_ui_label_new(), dt_ui_notebook_page(), dt_ui_section_label_new(), and init_collection_line().
| void dt_configure_ppd_dpi | ( | dt_gui_gtk_t * | gui | ) |
Definition at line 1348 of file gtk.c.
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_gui_update_em(), 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().
Definition at line 1331 of file gtk.c.
References DT_DEBUG_CONTROL, dt_osx_get_ppd(), and dt_print().
Referenced by dt_configure_ppd_dpi().
Definition at line 133 of file gtk.c.
Referenced by _add_sample(), _add_tag_button_clicked(), _attach_grid_separator(), _bauhaus_widget_init(), _blendif_options_callback(), _collapsible_set_states(), _darkroom_autoset_button_set_running(), _darkroom_autoset_popover_rebuild(), _discarded_files_popup(), _ensure_page_widgets(), _gui_presets_popup_menu_show_internal(), _gui_set_single_expanded(), _gui_styles_dialog_run(), _hm_show_merge_report_popup(), _init_widgets(), _insert_subsection_sep(), _iop_dim_all_but(), _iop_tooltip_callback(), _ioporder_create_endpoint_node(), _ioporder_create_graph_node(), _lib_backgroundjobs_added(), _menuitem_preferences(), _modulegroups_drag_begin(), _modulegroups_drag_motion(), _mouse_over_image_callback(), _set_widget_dimmed(), _thumb_update_rating_class(), add_generic_top_menu_entry(), ask_and_delete(), dt_accels_search(), dt_accels_window(), dt_bauhaus_combobox_from_widget(), dt_bauhaus_slider_from_widget(), dt_control_crawler_show_image_list(), dt_gui_gtk_quit(), dt_gui_hist_dialog_new(), dt_gui_new_collapsible_section(), dt_guides_popover(), dt_iop_gui_init_blendif(), 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_export_metadata_configuration_dialog(), dt_lib_gui_get_expander(), dt_lib_gui_set_expanded(), 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_scroll_wrap(), 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(), init_tab_presets(), and update_entry().
Definition at line 2022 of file gtk.c.
Referenced by _blendop_create_notebook_page(), _blendop_create_toggle_page(), _styles_open_popup_callback(), dt_iop_gui_init_blending_body(), 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().
Definition at line 1475 of file gtk.c.
References darktable, darktable_t::gui, IS_NULL_PTR, dt_ui_t::main_window, and dt_gui_gtk_t::ui.
Referenced by dt_bauhaus_load_theme(), and show_pango_text().
| void dt_gui_container_destroy_children | ( | GtkContainer * | container | ) |
Definition at line 2919 of file gtk.c.
References _delete_child(), and container().
Referenced by _lib_duplicate_init_callback(), clear_search(), dt_iop_gui_update_blendif(), dt_ui_container_destroy_children(), and gui_cleanup().
| GtkWidget * dt_gui_container_first_child | ( | GtkContainer * | container | ) |
Definition at line 2882 of file gtk.c.
References container().
Referenced by _get_container_row_heigth(), and gui_init().
| gboolean dt_gui_container_has_children | ( | GtkContainer * | container | ) |
Definition at line 2862 of file gtk.c.
References container(), FALSE, and IS_NULL_PTR.
Referenced by _destroyed_gui_thread().
| GtkWidget * dt_gui_container_nth_child | ( | GtkContainer * | container, |
| int | which | ||
| ) |
| int dt_gui_container_num_children | ( | GtkContainer * | container | ) |
Definition at line 2872 of file gtk.c.
References container(), and FALSE.
| void dt_gui_container_remove_children | ( | GtkContainer * | container | ) |
Definition at line 2907 of file gtk.c.
References _remove_child(), and container().
Referenced by _on_storage_list_changed().
| void dt_gui_draw_rounded_rectangle | ( | cairo_t * | cr, |
| float | width, | ||
| float | height, | ||
| float | x, | ||
| float | y | ||
| ) |
Definition at line 2992 of file gtk.c.
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. Definition at line 2925 of file gtk.c.
References IS_NULL_PTR, MAX, rect::width, rect::x, and rect::y.
Referenced by _completion_update(), _popover_set_relative_to_topmost_parent(), _setup_completion(), _toolbar_show_popup(), and dt_gui_menu_popup().
| gboolean dt_gui_get_scroll_delta | ( | const GdkEventScroll * | event, |
| gdouble * | delta | ||
| ) |
Definition at line 302 of file gtk.c.
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 | ||
| ) |
Definition at line 159 of file gtk.c.
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 | ||
| ) |
Definition at line 313 of file gtk.c.
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 | ||
| ) |
Definition at line 219 of file gtk.c.
References dt_conf_get_bool(), FALSE, and TRUE.
Referenced by _area_scroll_callback(), _area_scrolled_callback(), _datetime_scroll_over(), _scroll_event(), _thumbtable_scroll(), _widget_scroll(), 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 | ) |
Definition at line 1102 of file gtk.c.
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_concat_path_file(), 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_UI_SCALE_DEVICE, dt_gui_gtk_t::effect_radius, dt_gui_gtk_t::export_popup, FALSE, flags, dt_gui_gtk_t::gtkrc, darktable_t::gui, dt_gui_gtk_t::has_scroll_focus, i, IS_NULL_PTR, darktable_t::l10n, dt_gui_gtk_t::last_preset, dt_gui_gtk_t::mouse, 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 | ( | ) |
Definition at line 454 of file gtk.c.
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 | ) |
Definition at line 1290 of file gtk.c.
References darktable_t::control, darktable, dt_cairo_image_surface_create(), dt_cleanup(), dt_osx_focus_window(), dt_ui_center(), dt_view_manager_configure(), darktable_t::gui, dt_gui_gtk_t::surface, dt_control_t::tabborder, dt_gui_gtk_t::ui, and darktable_t::view_manager.
Referenced by main().
| void dt_gui_gtk_set_source_rgb | ( | cairo_t * | cr, |
| dt_gui_color_t | color | ||
| ) |
Definition at line 442 of file gtk.c.
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 | ||
| ) |
Definition at line 448 of file gtk.c.
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 | ( | ) |
Definition at line 386 of file gtk.c.
References darktable, dt_conf_set_bool(), dt_conf_set_int(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_ui_main_window(), FALSE, darktable_t::gui, height, i, IS_NULL_PTR, dt_gui_gtk_t::mutex, TRUE, dt_gui_gtk_t::ui, width, and x.
Referenced by dt_gui_gtk_quit().
| void dt_gui_hide_collapsible_section | ( | dt_gui_collapsible_section_t * | cs | ) |
Definition at line 3095 of file gtk.c.
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 | ) |
Definition at line 2029 of file gtk.c.
References 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_gui_update_em(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), dt_ui_main_window(), dt_util_str_replace(), error(), darktable_t::gui, i, init(), IS_NULL_PTR, 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 | ||
| ) |
Definition at line 2953 of file gtk.c.
References darktable, dt_gui_get_popup_relative_widget(), darktable_t::gui, IS_NULL_PTR, dt_ui_t::main_window, and dt_gui_gtk_t::ui.
Referenced by _blendif_options_callback(), _gui_multiinstance_callback(), _ioporder_node_show_presets(), _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. |
Definition at line 3102 of file gtk.c.
References _coeffs_button_changed(), _coeffs_expander_click(), _collapsible_container_show(), _gui_collapsible_section_t::confname, _gui_collapsible_section_t::container, CPF_DIRECTION_DOWN, CPF_DIRECTION_LEFT, dt_conf_get_bool(), dt_gui_add_class(), DT_GUI_BOX_SPACING, 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 dt_iop_gui_init_masks(), and gui_init().
| gboolean dt_gui_quit_callback | ( | GtkWidget * | widget, |
| GdkEvent * | event, | ||
| gpointer | user_data | ||
| ) |
Definition at line 469 of file gtk.c.
References dt_control_quit(), and TRUE.
Referenced by _init_widgets().
| void dt_gui_refocus_center | ( | ) |
Definition at line 3234 of file gtk.c.
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().
Definition at line 143 of file gtk.c.
Referenced by _collapsible_set_states(), _darkroom_autoset_button_set_running(), _event_dnd_end(), _gui_set_single_expanded(), _iop_dim_all_but(), _modulegroups_clear_drop_state(), _modulegroups_drag_begin(), _mouse_over_image_callback(), _set_widget_dimmed(), _thumb_update_rating_class(), dt_iop_gui_set_enable_button(), dt_iop_request_focus(), dt_lib_gui_set_expanded(), dt_thumbnail_set_group_border(), dt_thumbtable_set_overlays_mode(), and update_entry().
| gboolean dt_gui_search_start | ( | GtkWidget * | widget, |
| GdkEventKey * | event, | ||
| GtkSearchEntry * | entry | ||
| ) |
Definition at line 3005 of file gtk.c.
Referenced by init_tab_presets().
Definition at line 3016 of file gtk.c.
Referenced by init_tab_presets().
| void dt_gui_set_pango_resolution | ( | PangoLayout * | layout | ) |
Definition at line 1467 of file gtk.c.
References darktable, dt_gui_gtk_t::dpi, darktable_t::gui, and IS_NULL_PTR.
Referenced by _init_drawing(), dt_iop_tonecurve_draw(), dt_iop_tonecurve_draw(), and gui_post_expose().
| 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 at line 1939 of file gtk.c.
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_GUI_BOX_SPACING, dt_osx_disallow_fullscreen(), dt_ui_main_window(), result_t::entry_text, darktable_t::gui, IS_NULL_PTR, dt_ui_t::main_window, 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 | ||
| ) |
Definition at line 1855 of file gtk.c.
References _gtk_main_quit_safe(), _yes_no_button_handler(), result_t::button_no, result_t::button_yes, darktable, DT_GUI_BOX_SPACING, dt_osx_disallow_fullscreen(), dt_ui_main_window(), darktable_t::gui, IS_NULL_PTR, dt_ui_t::main_window, 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 | ) |
Definition at line 475 of file gtk.c.
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_textview_set_padding | ( | GtkTextView * | textview | ) |
Apply the standard recessed-input text padding to a GtkTextView.
CSS padding on the textview "text" node is parsed but ignored for layout in GTK3, so the 2px/4px inset matching entry/treeview (see data/themes/.css) has to be set on the widget itself.
| textview | The GtkTextView to update. |
Definition at line 2687 of file gtk.c.
References DT_PIXEL_APPLY_DPI.
Referenced by _active_modules_popup(), _pop_menu_dictionary_create_tag(), _pop_menu_dictionary_edit_tag(), gui_init(), and init_tab_general().
| void dt_gui_update_collapsible_section | ( | dt_gui_collapsible_section_t * | cs | ) |
Definition at line 3080 of file gtk.c.
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 dt_iop_gui_init_blending_body(), and gui_update().
Definition at line 1441 of file gtk.c.
References _refresh_all_container_spacing(), darktable, double(), dt_gui_gtk_t::dpi, dt_gui_gtk_t::em, darktable_t::gui, dt_ui_t::main_window, size, and dt_gui_gtk_t::ui.
Referenced by dt_configure_ppd_dpi(), and dt_gui_load_theme().
| GdkModifierType dt_key_modifier_state | ( | ) |
Definition at line 2186 of file gtk.c.
References darktable, dt_ui_main_window(), darktable_t::gui, state, and dt_gui_gtk_t::ui.
Referenced by _color_picker_callback_button_press(), and color_picker_apply().
| void dt_ui_container_destroy_children | ( | dt_ui_t * | ui, |
| const dt_ui_container_t | c | ||
| ) |
destroy all child widgets from container
Definition at line 1739 of file gtk.c.
References 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
Definition at line 1723 of file gtk.c.
References 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
Definition at line 1733 of file gtk.c.
References dt_ui_t::containers.
Referenced by dt_view_manager_switch_by_view().
| GtkNotebook * dt_ui_notebook_new | ( | ) |
Definition at line 2254 of file gtk.c.
Referenced by gui_init(), gui_init(), and gui_init().
| GtkWidget * dt_ui_notebook_page | ( | GtkNotebook * | notebook, |
| const char * | text, | ||
| const char * | tooltip | ||
| ) |
Definition at line 2259 of file gtk.c.
References _notebook_motion_notify_callback(), _notebook_size_callback(), dt_capitalize_label(), dt_free, DT_GUI_BOX_SPACING, 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
Definition at line 1744 of file gtk.c.
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().
| GtkWidget * dt_ui_resizable_drawing_area | ( | GtkWidget * | area, |
| char * | config_str, | ||
| int | default_height, | ||
| int | min_height | ||
| ) |
Make a self-drawing widget (typically a GtkDrawingArea graph or scope) vertically resizable.
The widget is given a fixed height-request (persisted under config_str) and a drag grip floating on its bottom edge — the same grip used by panels, scroll wrappers and the histogram scope. The content is not scrolled: it keeps drawing to its live allocation, only the height-request changes. Returns a wrapper overlay to pack in place of area.
| area | the drawing widget (its callbacks/refs stay valid; pack the returned overlay instead). |
| config_str | conf key persisting the user-chosen height (copied internally). |
| default_height | default height in device-independent px (rescaled by DT_PIXEL_APPLY_DPI). |
| min_height | minimum height floor in device-independent px. |
Definition at line 2836 of file gtk.c.
References _resizable_area_free(), _resizable_area_get_size(), _resizable_area_resize(), _resizable_scroll_max_height(), dt_bauhaus_resize_handle_new(), dt_conf_get_int(), dt_conf_key_exists(), DT_PIXEL_APPLY_DPI, DT_UI_RESIZABLE_AREA_KEY, FALSE, height, MAX, and state.
Referenced by gui_init(), gui_init(), and gui_init().
| GtkWidget * dt_ui_scroll_wrap | ( | GtkWidget * | w, |
| gint | min_size, | ||
| char * | config_str, | ||
| dt_ui_resize_mode_t | mode | ||
| ) |
Wrap a scrollable content widget in a recessed, vertically resizable scrolled window.
Wrap a scrollable widget in a recessed, vertically resizable scrolled window with a drag handle.
Returns an overlay wrapping the scrolled window, with a themed drag grip floating on its bottom edge (the same grip primitive used by panels and the histogram scope). The grip takes no layout space and is invisible until hovered. Sizing follows mode: DT_UI_RESIZE_DYNAMIC auto-fits the content up to the user height, DT_UI_RESIZE_STATIC keeps a fixed height (see _resizable_scroll_apply).
The returned widget is the wrapper overlay, not the scrolled window; callers needing the inner scrolled window (e.g. to tweak its scroll policy) must use dt_ui_scroll_wrap_get_scrolled_window().
| w | content widget (treeview, textview or any container) |
| min_size | minimum height floor in device pixels (also the static default before the user drags) |
| config_str | conf key persisting the user-chosen height (copied internally) |
| mode | DT_UI_RESIZE_DYNAMIC (auto-fit) or DT_UI_RESIZE_STATIC (fixed height) |
Definition at line 2713 of file gtk.c.
References _resizable_scroll_draw(), _resizable_scroll_handle_get_size(), _resizable_scroll_handle_resize(), _resizable_scroll_realize(), _widget_auto_connect_buffer(), _widget_auto_connect_model(), _widget_auto_height_free(), _widget_auto_on_buffer_changed(), _widget_auto_on_model_changed(), _widget_auto_update(), dt_bauhaus_resize_handle_new(), dt_gui_add_class(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, DT_PIXEL_APPLY_DPI, DT_UI_RESIZE_DYNAMIC, FALSE, MAX, and state.
Referenced by dt_iop_gui_init_masks(), and gui_init().
Return the inner scrolled window of a dt_ui_scroll_wrap() wrapper, or NULL.
Return the inner GtkScrolledWindow of a dt_ui_scroll_wrap() wrapper, or NULL.
Definition at line 2775 of file gtk.c.
Referenced by gui_init().
|
static |
Definition at line 1390 of file gtk.c.
Referenced by _refresh_all_container_spacing().
|
static |
Definition at line 574 of file gtk.c.
Referenced by _extract_pointer_input().
|
static |
Definition at line 2322 of file gtk.c.
Referenced by _resizable_scroll_apply(), _resizable_scroll_handle_get_size(), _resizable_scroll_handle_resize(), _widget_auto_connect_buffer(), _widget_auto_connect_model(), and dt_ui_scroll_wrap().
|
static |
Definition at line 2798 of file gtk.c.
Referenced by _resizable_area_get_size(), _resizable_area_resize(), and dt_ui_resizable_drawing_area().