![]() |
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 <string.h>#include <unistd.h>#include <pthread.h>
Include dependency graph for gtk.c:Data Structures | |
| struct | dt_tablet_motion_state_t |
| struct | result_t |
Typedefs | |
| typedef struct dt_tablet_motion_state_t | dt_tablet_motion_state_t |
| typedef struct result_t | result_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) |
| 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 | _configure (GtkWidget *da, GdkEventConfigure *event, gpointer user_data) |
| 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 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, const 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 gboolean | _scroll_wrap_resize (GtkWidget *w, void *cr, const char *config_str) |
| static gboolean | _scroll_wrap_scroll (GtkScrolledWindow *sw, GdkEventScroll *event, const char *config_str) |
| GtkWidget * | dt_ui_scroll_wrap (GtkWidget *w, gint min_size, char *config_str) |
| static GtkWidget * | _search_parent_scrolled_window (GtkWidget *w) |
| static void | _widget_auto_ensure_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 | dt_gui_widget_update_list_height (GtkWidget *widget, int rows, int min_rows, int max_rows) |
| 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 void | _widget_auto_update (GtkWidget *widget) |
| 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_widget_init_auto_height (GtkWidget *w, const int min_rows, const int max_rows) |
| Set the automatic height for a widget based on the number of rows or lines it contains. | |
| 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 | _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 const char *const | DT_GUI_WIDGET_AUTO_HEIGHT_KEY = "dt-gui-widget-auto-height" |
| typedef struct dt_tablet_motion_state_t dt_tablet_motion_state_t |
|
static |
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 |
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 |
References dt_control_mouse_enter(), and TRUE.
Referenced by dt_gui_gtk_init().
|
static |
References dt_control_mouse_leave(), and TRUE.
Referenced by dt_gui_gtk_init().
References MAX, MIN, and value.
Referenced by _extract_pointer_input().
|
static |
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 |
References _collapsible_set_states(), and _gui_collapsible_section_t::toggle.
Referenced by dt_gui_new_collapsible_section().
|
static |
|
static |
References void().
Referenced by dt_gui_container_destroy_children().
|
static |
References darktable, dt_control_expose(), darktable_t::gui, dt_gui_gtk_t::surface, and TRUE.
Referenced by dt_gui_gtk_init().
|
static |
Referenced by _get_axis_value_for_source().
|
static |
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, 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 |
References FALSE.
Referenced by _init_widgets().
|
static |
Referenced by dt_gui_gtk_init().
|
static |
References _event_axes(), FALSE, TRUE, and value.
Referenced by _extract_pointer_input().
|
static |
References c, dt_gui_container_first_child(), DT_PIXEL_APPLY_DPI, and height.
Referenced by _scroll_wrap_resize(), and _scroll_wrap_scroll().
|
static |
Referenced by dt_gui_gtk_init().
|
static |
Referenced by dt_gui_gtk_init().
References void().
Referenced by _yes_no_button_handler(), dt_gui_show_standalone_string_dialog(), and dt_gui_show_standalone_yes_no_dialog().
|
static |
References _focus_in_out_event(), _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_configure_ppd_dpi(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_gui_add_class(), 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, dt_ui_t::log_msg, dt_ui_t::main_window, dt_gui_gtk_t::scroll_mask, darktable_t::signals, dt_ui_t::toast_msg, dt_gui_gtk_t::ui, and width.
Referenced by dt_gui_gtk_init().
|
static |
References darktable, dt_control_key_pressed(), FALSE, darktable_t::gui, dt_ui_t::main_window, TRUE, and dt_gui_gtk_t::ui.
Referenced by dt_gui_gtk_init().
|
static |
|
static |
Referenced by dt_ui_notebook_page().
|
static |
Referenced by dt_ui_notebook_page().
|
static |
References dt_gui_get_popup_relative_widget().
Referenced by attach_popover().
Referenced by dt_gui_container_remove_children().
|
static |
Referenced by _extract_pointer_input().
|
static |
References darktable, dt_ui_center(), FALSE, darktable_t::gui, i, p, TRUE, and dt_gui_gtk_t::ui.
Referenced by _extract_pointer_input().
References _get_container_row_heigth(), container(), darktable, dt_conf_get_int(), dt_conf_set_int(), DT_PIXEL_APPLY_DPI, dt_ui_main_window(), FALSE, darktable_t::gui, height, dt_gui_gtk_t::ui, and value.
Referenced by _scroll_wrap_scroll(), and dt_ui_scroll_wrap().
|
static |
References _get_container_row_heigth(), _scroll_wrap_resize(), dt_conf_get_int(), dt_conf_set_int(), dt_gui_get_scroll_unit_deltas(), dt_modifier_is(), dt_toast_log(), FALSE, and TRUE.
Referenced by dt_ui_scroll_wrap().
|
static |
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().
Referenced by _widget_auto_ensure_scrolled_window(), and dt_gui_widget_update_list_height().
|
static |
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 |
References dt_gui_gtk_t::accels, darktable, dt_accels_disable(), FALSE, and darktable_t::gui.
Referenced by dt_accels_disconnect_on_text_input().
|
static |
References dt_gui_refocus_center(), FALSE, and TRUE.
Referenced by dt_accels_disconnect_on_text_input().
|
static |
References MAX.
Referenced by _widget_auto_update().
|
static |
References _treeview_count_visible_rows(), and model.
Referenced by _treeview_count_visible_rows(), and _widget_auto_update().
|
static |
References TRUE.
Referenced by _init_widgets().
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 |
References TRUE.
Referenced by _init_widgets().
References darktable_t::control, darktable, DT_PIXEL_APPLY_DPI, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_ui_center_base(), darktable_t::gui, h, 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().
Referenced by _init_widgets().
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, dt_gui_widget_auto_height_t::model, model, dt_gui_widget_auto_height_t::model_row_changed, dt_gui_widget_auto_height_t::model_row_collapsed, dt_gui_widget_auto_height_t::model_row_deleted, dt_gui_widget_auto_height_t::model_row_expanded, dt_gui_widget_auto_height_t::model_row_inserted, and dt_gui_widget_auto_height_t::model_rows_reordered.
Referenced by _widget_auto_on_model_changed(), and dt_gui_widget_init_auto_height().
|
static |
References dt_gui_widget_auto_height_t::buffer, and dt_gui_widget_auto_height_t::buffer_changed.
Referenced by _widget_auto_connect_buffer(), and _widget_auto_height_free().
|
static |
References dt_gui_widget_auto_height_t::model, model, dt_gui_widget_auto_height_t::model_row_changed, dt_gui_widget_auto_height_t::model_row_collapsed, dt_gui_widget_auto_height_t::model_row_deleted, dt_gui_widget_auto_height_t::model_row_expanded, dt_gui_widget_auto_height_t::model_row_inserted, and dt_gui_widget_auto_height_t::model_rows_reordered.
Referenced by _widget_auto_connect_model(), and _widget_auto_height_free().
References _search_parent_scrolled_window(), position(), and TRUE.
Referenced by dt_gui_widget_init_auto_height().
|
static |
References _widget_auto_disconnect_buffer(), _widget_auto_disconnect_model(), and dt_free.
Referenced by dt_gui_widget_init_auto_height().
|
static |
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
References _widget_auto_update(), tree_view(), and void().
Referenced by _widget_auto_connect_model().
|
static |
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
References _widget_auto_update(), tree_view(), and void().
Referenced by _widget_auto_connect_model().
|
static |
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
References _widget_auto_update(), model, and void().
Referenced by _widget_auto_connect_model().
|
static |
References _widget_auto_connect_buffer(), _widget_auto_update(), and void().
Referenced by dt_gui_widget_init_auto_height().
|
static |
References _widget_auto_connect_model(), _widget_auto_update(), and void().
Referenced by dt_gui_widget_init_auto_height().
|
static |
References _widget_auto_update(), and void().
Referenced by _widget_auto_connect_buffer().
References _textview_count_visible_rows(), _treeview_count_visible_rows(), DT_GUI_WIDGET_AUTO_HEIGHT_KEY, dt_gui_widget_update_list_height(), dt_gui_widget_auto_height_t::max_rows, dt_gui_widget_auto_height_t::min_rows, and model.
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_gui_widget_init_auto_height().
|
static |
References DT_COLORSPACE_DISPLAY, dt_colorspaces_set_display_profile(), and FALSE.
Referenced by dt_gui_gtk_init().
|
static |
| 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().
| 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 | ) |
References DT_DEBUG_CONTROL, dt_osx_get_ppd(), and dt_print().
Referenced by dt_configure_ppd_dpi().
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().
| gboolean dt_gui_quit_callback | ( | GtkWidget * | widget, |
| GdkEvent * | event, | ||
| gpointer | user_data | ||
| ) |
References dt_control_quit(), and TRUE.
Referenced by _init_widgets().
| 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().
|
static |
References _search_parent_scrolled_window(), darktable_t::bauhaus, c, darktable, DT_PIXEL_APPLY_DPI, h, height, dt_bauhaus_t::line_height, and MAX.
Referenced by _widget_auto_update().
| 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().
| 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().
| 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().
References _scroll_wrap_resize(), _scroll_wrap_scroll(), and DT_PIXEL_APPLY_DPI.
Referenced by gui_init().
|
static |
Referenced by _extract_pointer_input().
|
static |