![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "darktable.h"#include "common/logging.h"#include "common/selection.h"#include "control/control.h"#include "develop/develop.h"#include "gui/application.h"#include "views/view.h"#include <assert.h>#include <gdk/gdkkeysyms.h>#include <glib/gstdio.h>#include <stdlib.h>#include <string.h>#include "gui/screen_metrics.h"#include "control/signal.h"
Include dependency graph for control.c:Go to the source code of this file.
Data Structures | |
| struct | dt_control_redraw_widget_t |
Typedefs | |
| typedef struct dt_control_redraw_widget_t | dt_control_redraw_widget_t |
Functions | |
| void | dt_control_set_pointer_input (const dt_control_pointer_input_t *input) |
| void | dt_control_get_pointer_input (dt_control_pointer_input_t *input) |
| void | dt_control_init (dt_control_t *s) |
| static const char * | _get_cursor_name (dt_cursor_t cursor) |
| Human-readable name of a GDK cursor shape, for debug output. | |
| void | dt_control_forbid_change_cursor () |
| void | dt_control_allow_change_cursor () |
| static void | _control_set_cursor_on_widget (GtkWidget *widget, GdkCursor *cursor) |
| static void | _control_apply_cursor (GdkCursor *cursor) |
| static void | _control_store_current_cursor (const dt_cursor_t shape, const char *shape_str) |
| void | dt_control_change_cursor_by_name (const char *curs_str) |
| Apply a GTK named cursor without changing the queued cursor. | |
| void | dt_control_change_cursor_by_name_and_flush (const char *curs_str) |
| Apply a named cursor immediatelly and flush display updates for immediate feedback. | |
| void | dt_control_commit_cursor () |
| void | dt_control_change_cursor_EXT (dt_cursor_t cursor, const char *file, int line) |
| void | dt_control_queue_cursor_EXT (dt_cursor_t cursor, const char *file, int line) |
| void | dt_control_queue_cursor_by_name (const char *curs_str) |
| Queue a GTK named cursor for the next cursor commit. | |
| void | dt_control_set_cursor_visible_EXT (gboolean visible, const char *file, int line) |
| Set whether the cursor should be visible or not. | |
| void | dt_control_mouse_is_dragging (gboolean state) |
| void | dt_control_mouse_is_painting (gboolean state) |
| int | dt_control_running () |
| void | dt_control_quit () |
| void | dt_control_shutdown (dt_control_t *s) |
| void | dt_control_cleanup (dt_control_t *s) |
| gboolean | dt_control_configure (GtkWidget *da, GdkEventConfigure *event, gpointer user_data) |
| static GdkRGBA | lookup_color (GtkStyleContext *context, const char *name) |
| void | dt_control_draw_busy_msg (cairo_t *cr, int width, int height) |
| gboolean | dt_control_button_down (int which) |
Is mouse button which currently held down? | |
| void | dt_control_expose (cairo_t *cr, const int width, const int height) |
| void | dt_control_mouse_leave () |
| void | dt_control_mouse_enter () |
| void | dt_control_mouse_moved (double x, double y, double pressure, int which) |
| void | dt_control_key_pressed (GdkEventKey *event) |
| void | dt_control_button_released (double x, double y, int which, uint32_t state) |
| static void | _dt_ctl_switch_mode_prepare () |
| static gboolean | _dt_ctl_switch_mode_to (gpointer user_data) |
| static gboolean | _dt_ctl_switch_mode_to_by_view (gpointer user_data) |
| void | dt_ctl_switch_mode_to (const char *mode) |
| void | dt_ctl_switch_mode_to_by_view (const dt_view_t *view) |
| static gboolean | _dt_ctl_open_image_in_darkroom (gpointer user_data) |
| void | dt_ctl_open_image_in_darkroom (const int32_t imgid) |
| open one specific image in the darkroom, from any view and any thread. | |
| static gboolean | _dt_ctl_log_message_timeout_callback (gpointer data) |
| static gboolean | _dt_ctl_toast_message_timeout_callback (gpointer data) |
| void | dt_control_button_pressed (double x, double y, double pressure, int which, int type, uint32_t state) |
| static gboolean | _redraw_center (gpointer user_data) |
| void | dt_control_log (const char *msg,...) |
| static void | _toast_log (const gboolean markup, const char *msg, va_list ap) |
| void | dt_toast_log (const char *msg,...) |
| void | dt_toast_markup_log (const char *msg,...) |
| void | dt_control_log_busy_enter () |
| void | dt_control_toast_busy_enter () |
| void | dt_control_log_busy_leave () |
| void | dt_control_toast_busy_leave () |
| void | dt_control_queue_redraw () |
| Request a redraw of the whole workspace. | |
| void | dt_control_queue_redraw_center () |
| Request a redraw of the centre view. | |
| void | dt_control_navigation_redraw () |
| Request a redraw of the navigation module's widget. | |
| void | dt_control_log_redraw () |
| Request a redraw of the log message label. | |
| void | dt_control_toast_redraw () |
| Request a redraw of the toast message label. | |
| static int | _widget_queue_draw (void *widget_data) |
| static void | _widget_queue_draw_cleanup (void *widget_data) |
| void | dt_control_queue_redraw_widget (GtkWidget *widget) |
| threadsafe request of redraw of specific widget. Use this function if you need to redraw a specific widget if your current thread context is not gtk main thread. | |
| void | dt_control_hinter_message (const struct dt_control_t *s, const char *message) |
| int32_t | dt_control_get_mouse_over_id () |
| void | dt_control_set_mouse_over_id (int32_t value) |
| int32_t | dt_control_get_keyboard_over_id () |
| void | dt_control_set_keyboard_over_id (int32_t value) |
Variables | |
| static dt_control_pointer_input_t | _pointer_input = { 0 } |
| typedef struct dt_control_redraw_widget_t dt_control_redraw_widget_t |
|
static |
Definition at line 251 of file control.c.
References _control_set_cursor_on_widget(), dt_gui_center_widget(), dt_gui_get_ui(), dt_gui_main_window(), and dt_ui_center_base().
Referenced by dt_control_change_cursor_by_name(), and dt_control_change_cursor_EXT().
Definition at line 243 of file control.c.
References IS_NULL_PTR, and window.
Referenced by _control_apply_cursor().
|
static |
Definition at line 267 of file control.c.
References darktable_t::control, dt_control_t::current_shape, dt_control_t::current_shape_str, dt_control_t::cursor, and darktable.
Referenced by dt_control_change_cursor_by_name(), and dt_control_change_cursor_EXT().
|
static |
Definition at line 750 of file control.c.
References darktable_t::control, darktable, dt_control_log_redraw(), DT_CTL_LOG_SIZE, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), FALSE, dt_control_t::log_ack, dt_control_t::log_message_timeout_id, dt_control_t::log_mutex, and dt_control_t::log_pos.
Referenced by dt_control_log().
|
static |
Definition at line 720 of file control.c.
References _dt_ctl_switch_mode_prepare(), darktable, dt_control_set_mouse_over_id(), dt_selection_get_global(), dt_selection_select_single(), dt_view_manager_get_current_view(), dt_view_manager_switch(), FALSE, IS_NULL_PTR, dt_view_t::module_name, and darktable_t::view_manager.
Referenced by dt_ctl_open_image_in_darkroom().
|
static |
Definition at line 678 of file control.c.
References dt_gui_gtk_t::center_tooltip, dt_gui_center_widget(), and dt_gui_get_global().
Referenced by _dt_ctl_open_image_in_darkroom(), _dt_ctl_switch_mode_to(), and _dt_ctl_switch_mode_to_by_view().
|
static |
Definition at line 685 of file control.c.
References _dt_ctl_switch_mode_prepare(), darktable, dt_view_manager_switch(), FALSE, and darktable_t::view_manager.
Referenced by dt_ctl_switch_mode_to().
|
static |
Definition at line 693 of file control.c.
References _dt_ctl_switch_mode_prepare(), darktable, dt_view_manager_switch_by_view(), FALSE, view, and darktable_t::view_manager.
Referenced by dt_ctl_switch_mode_to_by_view().
|
static |
Definition at line 761 of file control.c.
References darktable_t::control, darktable, dt_control_toast_redraw(), DT_CTL_TOAST_SIZE, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), FALSE, dt_control_t::toast_ack, dt_control_t::toast_message_timeout_id, dt_control_t::toast_mutex, and dt_control_t::toast_pos.
Referenced by _toast_log().
|
static |
Human-readable name of a GDK cursor shape, for debug output.
The returned string is a static literal owned by this table: it must NOT be freed, and it stays valid for the lifetime of the process. This used to g_strdup() its result from a 90-case switch, and neither of the two call sites freed it – one of them could not, because it selected between the allocated name and a plain literal with a ternary. Static storage removes both the leak and the question.
| cursor | the shape to name. |
Definition at line 138 of file control.c.
Referenced by dt_control_change_cursor_EXT(), and dt_control_queue_cursor_EXT().
|
static |
Definition at line 817 of file control.c.
References dt_control_log_redraw(), dt_control_toast_redraw(), and FALSE.
Referenced by _toast_log(), and dt_control_log().
|
static |
Definition at line 847 of file control.c.
References _dt_ctl_toast_message_timeout_callback(), _redraw_center(), darktable_t::control, darktable, DT_CTL_TOAST_MSG_SIZE, DT_CTL_TOAST_SIZE, DT_CTL_TOAST_TIMEOUT, dt_free, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::toast_ack, dt_control_t::toast_message, dt_control_t::toast_message_timeout_id, dt_control_t::toast_mutex, and dt_control_t::toast_pos.
Referenced by dt_toast_log(), and dt_toast_markup_log().
|
static |
Definition at line 949 of file control.c.
References FALSE, IS_NULL_PTR, and dt_control_redraw_widget_t::widget_ref.
Referenced by dt_control_queue_redraw_widget().
Definition at line 962 of file control.c.
References dt_free, and dt_control_redraw_widget_t::widget_ref.
Referenced by dt_control_queue_redraw_widget().
| void dt_control_allow_change_cursor | ( | ) |
Definition at line 238 of file control.c.
References darktable_t::control, dt_control_t::cursor, darktable, FALSE, and dt_control_t::lock.
Referenced by _main_do_event_help(), and _restore_default_cursor().
| gboolean dt_control_button_down | ( | int | which | ) |
Is mouse button which currently held down?
| which | 1 = left, 2 = middle, 3 = right, as in GdkEventButton.button. |
This reports the DEVICE's state, not "a drag we started". A button pressed over another window and still held when the pointer enters ours reads TRUE here, where the old stored flag – set only by our own press handler – read FALSE. Every current caller pairs it with its own grab or hover test, so the distinction does not reach behaviour; a new caller that needs "did the press land on us" wants a press handler, not this.
Definition at line 563 of file control.c.
References dt_gui_center_widget(), FALSE, IS_NULL_PTR, and window.
Referenced by gui_post_expose(), mouse_leave(), mouse_moved(), and mouse_moved().
| void dt_control_button_pressed | ( | double | x, |
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Definition at line 772 of file control.c.
References dt_control_t::button_x, dt_control_t::button_y, darktable_t::control, darktable, DT_CTL_LOG_SIZE, DT_CTL_TOAST_SIZE, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_view_manager_button_pressed(), dt_control_t::height, dt_control_t::log_ack, dt_control_t::log_message_timeout_id, dt_control_t::log_mutex, dt_control_t::log_pos, state, dt_control_t::toast_ack, dt_control_t::toast_message_timeout_id, dt_control_t::toast_mutex, dt_control_t::toast_pos, type, darktable_t::view_manager, and x.
Referenced by _button_pressed().
Definition at line 672 of file control.c.
References darktable, dt_view_manager_button_released(), state, darktable_t::view_manager, and x.
Referenced by _button_released().
| void dt_control_change_cursor_by_name | ( | const char * | curs_str | ) |
Apply a GTK named cursor without changing the queued cursor.
Apply a GTK named cursor immediately without replacing the queued cursor state.
Named cursors report GDK_CURSOR_IS_PIXMAP as their type, which is only a marker for GTK's cursor cache. The queued cursor state is owned by dt_control_queue_cursor_by_name(), so temporary named cursors such as the busy cursor do not overwrite the cursor that should be restored later.
Definition at line 283 of file control.c.
References _control_apply_cursor(), _control_store_current_cursor(), darktable_t::control, dt_control_t::current_shape, dt_control_t::current_shape_str, dt_control_t::cursor, darktable, dt_control_queue_cursor_by_name(), DT_DEBUG_CONTROL, DT_DEBUG_VERBOSE, dt_get_debug_flags(), dt_print(), dt_control_t::hide, IS_NULL_PTR, and dt_control_t::lock.
Referenced by dt_control_change_cursor_by_name_and_flush(), dt_control_commit_cursor(), and dt_control_expose().
| void dt_control_change_cursor_by_name_and_flush | ( | const char * | curs_str | ) |
Apply a named cursor immediatelly and flush display updates for immediate feedback.
Apply a GTK named cursor immediately and flush display updates.
Some synchronous UI-thread operations perform heavy work right after cursor setup. Without an explicit display flush, GTK may delay painting and the busy cursor can remain invisible until the computation already finished.
| curs_str | GTK cursor name (for example "progress"). |
Definition at line 335 of file control.c.
References dt_control_change_cursor_by_name(), and IS_NULL_PTR.
Referenced by _cache_wait_cursor_progress(), _lib_duplicate_thumb_press_callback(), _lib_snapshot_capture_state(), _undo_announce(), and dt_iop_autoset_advance().
| void dt_control_change_cursor_EXT | ( | dt_cursor_t | cursor, |
| const char * | file, | ||
| int | line | ||
| ) |
Definition at line 354 of file control.c.
References _control_apply_cursor(), _control_store_current_cursor(), _get_cursor_name(), darktable_t::control, dt_control_t::current_shape, dt_control_t::current_shape_str, dt_control_t::cursor, darktable, dt_control_queue_cursor_EXT(), DT_DEBUG_CONTROL, DT_DEBUG_VERBOSE, dt_get_debug_flags(), dt_print(), dt_control_t::hide, IS_NULL_PTR, and dt_control_t::lock.
| void dt_control_cleanup | ( | dt_control_t * | s | ) |
Definition at line 493 of file control.c.
References dt_control_t::cond_mutex, dt_control_t::current_shape_str, dt_control_t::cursor, dt_control_jobs_cleanup(), dt_pthread_mutex_destroy(), dt_control_t::log_mutex, dt_control_t::mutex, dt_control_t::progress_system, dt_control_t::queue_mutex, dt_control_t::res_mutex, dt_control_t::run_mutex, dt_control_t::shape_str, and dt_control_t::toast_mutex.
Referenced by dt_cleanup().
| void dt_control_commit_cursor | ( | ) |
Definition at line 343 of file control.c.
References darktable_t::control, dt_control_t::cursor, darktable, dt_control_change_cursor, dt_control_change_cursor_by_name(), IS_NULL_PTR, dt_control_t::log_busy, dt_control_t::shape, and dt_control_t::shape_str.
Referenced by _cache_wait_cursor_restore(), _lib_duplicate_thumb_press_callback(), _lib_snapshot_capture_state(), _undo_announce_end(), dt_control_expose(), and mouse_moved().
| gboolean dt_control_configure | ( | GtkWidget * | da, |
| GdkEventConfigure * | event, | ||
| gpointer | user_data | ||
| ) |
Definition at line 515 of file control.c.
References darktable, dt_view_manager_configure(), TRUE, and darktable_t::view_manager.
Referenced by _configure().
| void dt_control_draw_busy_msg | ( | cairo_t * | cr, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 530 of file control.c.
References dt_bauhaus_get_global(), dt_free, dt_get_main_message_copy(), DT_GUI_COLOR_LOG_BG, DT_GUI_COLOR_LOG_FG, DT_PIXEL_APPLY_DPI, dt_widget_set_source_rgb(), height, IS_NULL_PTR, and width.
Referenced by _thumb_draw_image(), _thumb_draw_image(), dt_control_expose(), and expose().
| void dt_control_expose | ( | cairo_t * | cr, |
| const int | width, | ||
| const int | height | ||
| ) |
Definition at line 594 of file control.c.
References dt_develop_t::completed, darktable_t::control, darktable, darktable_t::develop, dt_control_change_cursor_by_name(), dt_control_commit_cursor(), dt_control_draw_busy_msg(), dt_gui_center_widget(), DT_PIXEL_APPLY_DPI, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_view_manager_current_flags(), dt_view_manager_expose(), height, dt_control_t::height, IS_NULL_PTR, dt_control_t::log_busy, dt_control_t::log_mutex, lookup_color(), dt_develop_t::progress, dt_develop_t::total, VIEW_FLAGS_PAINTS_WHOLE_AREA, darktable_t::view_manager, width, and dt_control_t::width.
Referenced by _draw().
| void dt_control_forbid_change_cursor | ( | ) |
Definition at line 233 of file control.c.
References darktable_t::control, dt_control_t::cursor, darktable, dt_control_t::lock, and TRUE.
Referenced by _main_do_event_help(), and contextual_help_callback().
| int32_t dt_control_get_keyboard_over_id | ( | ) |
Definition at line 1012 of file control.c.
References darktable_t::control, darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::global_mutex, and dt_control_t::keyboard_over_id.
Referenced by dt_act_on_get_first_image(), dt_act_on_get_images(), dt_act_on_get_images_nb(), dt_thumbtable_key_pressed_grid(), and dt_thumbtable_scroll_to_selection().
| int32_t dt_control_get_mouse_over_id | ( | ) |
Definition at line 986 of file control.c.
References darktable_t::control, darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::global_mutex, and dt_control_t::mouse_over_id.
Referenced by _event_dnd_begin(), _get_image_datetime(), _init_treeview(), _jump_to(), _metadata_view_update_values(), _mouse_over_image_callback(), _populate_thumbnails(), _thumbtable_drag_set_icon(), _update_for_current_image(), dt_thumbtable_key_pressed_grid(), dt_thumbtable_scroll_to_selection(), mouse_moved(), and try_enter().
| void dt_control_get_pointer_input | ( | dt_control_pointer_input_t * | input | ) |
Definition at line 83 of file control.c.
References _pointer_input, and IS_NULL_PTR.
Referenced by _build_raw_input_event(), button_pressed(), button_released(), and gui_post_expose().
| void dt_control_hinter_message | ( | const struct dt_control_t * | s, |
| const char * | message | ||
| ) |
sets the hinter message
Definition at line 981 of file control.c.
References dt_gui_get_ui(), and dt_hinter_set_message().
Referenced by _blendop_masks_show_and_edit(), _set_hinter_message(), _switch_cursors(), _switch_preview_cursor(), btn_make_radio_callback(), button_released(), dt_collection_hint_message_internal(), gui_focus(), key_pressed(), mouse_moved(), and mouse_moved().
| void dt_control_init | ( | dt_control_t * | s | ) |
Definition at line 89 of file control.c.
References dt_control_t::cond, dt_control_t::cond_mutex, dt_control_t::current_shape, dt_control_t::current_shape_str, dt_control_t::cursor, dt_control_jobs_init(), dt_pthread_mutex_init(), FALSE, dt_control_t::global_mutex, dt_control_t::gui_thread, dt_control_t::hide, dt_control_t::keyboard_over_id, dt_control_t::lock, dt_control_t::log_ack, dt_control_t::log_busy, dt_control_t::log_message_timeout_id, dt_control_t::log_mutex, dt_control_t::log_pos, dt_control_t::mouse_over_id, dt_control_t::mutex, dt_control_t::progress_system, dt_control_t::queue_mutex, dt_control_t::res_mutex, dt_control_t::run_mutex, dt_control_t::shape, dt_control_t::shape_str, dt_control_t::toast_ack, dt_control_t::toast_busy, dt_control_t::toast_message_timeout_id, dt_control_t::toast_mutex, and dt_control_t::toast_pos.
Referenced by dt_init().
| void dt_control_key_pressed | ( | GdkEventKey * | event | ) |
Definition at line 667 of file control.c.
References darktable, dt_view_manager_key_pressed(), and darktable_t::view_manager.
Referenced by _key_pressed().
| void dt_control_log | ( | const char * | msg, |
| ... | |||
| ) |
Definition at line 824 of file control.c.
References _dt_ctl_log_message_timeout_callback(), _redraw_center(), darktable_t::control, darktable, DT_CTL_LOG_MSG_SIZE, DT_CTL_LOG_SIZE, DT_CTL_LOG_TIMEOUT, dt_free, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::log_ack, dt_control_t::log_message, dt_control_t::log_message_timeout_id, dt_control_t::log_mutex, and dt_control_t::log_pos.
Referenced by __attribute__(), __attribute__(), _act_folders_relocate(), _apply_style_before_export(), _background_layer_job_done_idle(), _channelmixerrgb_mixer_mode_callback(), _channelmixerrgb_primaries_slider_callback(), _channelmixerrgb_reject_mixer_mode(), _channelmixerrgb_white_preserving_slider_callback(), _click_on_view(), _control_import_job_run(), _create_background_clicked(), _create_dir(), _create_layer_clicked(), _darkroom_log_image_load_error(), _deflicker_prepare_histogram(), _delete_tagids(), _display_mask_callback(), _dnd_folder_import_job_run(), _do_get_structure_auto(), _drop_move_to_folder(), _dt_collection_changed_callback(), _edit_preset(), _edit_preset_response(), _enqueue_input(), _enqueue_stroke_end(), _event_aspect_presets_changed(), _export_button_clicked(), _export_button_clicked(), _export_image(), _export_list_save(), _extract_patches(), _fill_black_clicked(), _fill_transparent_clicked(), _fill_white_clicked(), _film_import1(), _folder_survey_job_run(), _generic_dt_control_fileop_images_job_run(), _gui_styles_dialog_run(), _gui_styles_edit_style_response(), _gui_styles_new_style_response(), _history_notify(), _image_import_internal(), _import_button_clicked(), _import_image(), _import_preset_from_file(), _layerio_log_errors(), _lib_tagging_tag_show_accel(), _main_do_event_help(), _masks_operation_callback(), _menuitem_delete_preset(), _metadata_notify(), _mixer_mode_callback(), _modchooser_run(), _name_editing_done(), _noiseprofile_load(), _open_uri(), _page_new_area_clicked(), _paper_size(), _pipeline_message(), _pixelpipe_cache_warn(), _pop_menu_dictionary_delete_node(), _pop_menu_dictionary_set_as_tag(), _pop_undo(), _primaries_slider_callback(), _print_button_clicked(), _print_job_run(), _process_file_list(), _rename_layer_clicked(), _reset_form_creation(), _save_and_render(), _save_clut_callback(), _set_paper_size(), _set_test_path(), _slideshow_slow_down_accel(), _slideshow_speed_up_accel(), _slideshow_start_stop_accel(), _slideshow_step_back_accel(), _slideshow_step_forward_accel(), _step_state(), _studio_dev_setup(), _studio_style_apply_callback(), _thumbtable_dnd_import(), _undo_announce(), _update_point_gui(), _updates_notify(), _white_preserving_slider_callback(), aspect_presets_changed(), button_clicked(), button_pressed(), button_pressed(), button_released(), calculate_clut_3dl(), calculate_clut_cube(), calculate_clut_haldclut(), commit_params(), commit_params(), copy_callback(), copy_parts_callback(), do_crop(), do_fit(), dt_configure_runtime_performance(), dt_control_datetime_job_run(), dt_control_delete_image(), dt_control_delete_images(), dt_control_export(), dt_control_export_job_run(), dt_control_gpx_apply_job_run(), dt_control_local_copy_images_job_run(), dt_control_merge_hdr_job_run(), dt_control_merge_hdr_process(), dt_control_remove_images(), dt_control_remove_images_job_run(), dt_control_save_xmps_job_run(), dt_dev_pixelpipe_propagate_formats(), dt_drawlayer_runtime_manager_update(), dt_film_remove(), dt_folder_survey_halt(), dt_folder_survey_start(), dt_gui_hist_dialog_new(), dt_gui_preferences_show(), dt_image_check_camera_missing_sample(), dt_image_local_copy_reset(), dt_image_local_copy_set(), dt_image_local_copy_synch(), dt_image_rename(), dt_imageio_open(), dt_iop_gui_update_blending(), dt_lib_presets_apply(), dt_lightroom_import(), dt_load_from_string(), dt_masks_group_add_form_with_state(), dt_print_file(), dt_styles_create_from_list(), dt_thumbtable_select_all(), dt_thumbtable_select_range(), dual_demosaic(), duplicate_callback(), enter(), export_clicked(), fast_surface_blur(), finalize_store(), find_coeffs(), gui_changed(), gui_init(), gui_update(), gui_update(), key_pressed(), legacy_params(), lmmse_demosaic(), new_history_callback(), paste_all_callback(), paste_parts_callback(), prepare_matrices(), process(), process(), process(), process_cl(), process_drago(), process_internal(), rcd_demosaic(), rt_display_wavelet_scale_callback(), rt_select_algorithm_callback(), rt_showmask_callback(), set_new_params_interactive(), smoothing_callback(), store(), store(), try_enter(), workicc_changed(), write_image(), write_image(), write_image(), and write_image().
| void dt_control_log_busy_enter | ( | ) |
Definition at line 887 of file control.c.
References darktable_t::control, darktable, dt_control_queue_redraw_center(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::log_busy, and dt_control_t::log_mutex.
Referenced by dt_dev_darkroom_pipeline(), dt_iop_autoset_advance(), and expose().
| void dt_control_log_busy_leave | ( | ) |
Definition at line 903 of file control.c.
References darktable_t::control, darktable, dt_control_queue_redraw_center(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::log_busy, and dt_control_t::log_mutex.
Referenced by _dt_iop_autoset_progress_leave(), cleanup(), dt_dev_darkroom_pipeline(), expose(), and leave().
| void dt_control_log_redraw | ( | ) |
Request a redraw of the log message label.
Definition at line 934 of file control.c.
References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, and DT_SIGNAL_CONTROL_LOG_REDRAW.
Referenced by _dt_ctl_log_message_timeout_callback(), and _redraw_center().
| void dt_control_mouse_enter | ( | ) |
Definition at line 657 of file control.c.
References darktable, dt_view_manager_mouse_enter(), and darktable_t::view_manager.
Referenced by _center_enter().
| void dt_control_mouse_is_dragging | ( | gboolean | state | ) |
Definition at line 432 of file control.c.
References dt_gui_get_global(), dt_gui_gtk_t::is_dragging, dt_gui_gtk_t::mouse, and state.
Referenced by button_pressed(), button_pressed(), button_released(), dt_masks_gui_is_dragging(), leave(), and mouse_leave().
| void dt_control_mouse_is_painting | ( | gboolean | state | ) |
Definition at line 437 of file control.c.
References dt_gui_get_global(), dt_gui_gtk_t::is_painting, dt_gui_gtk_t::mouse, and state.
Referenced by _brush_events_button_pressed(), button_pressed(), button_pressed(), button_released(), leave(), and mouse_leave().
| void dt_control_mouse_leave | ( | ) |
Definition at line 652 of file control.c.
References darktable, dt_view_manager_mouse_leave(), and darktable_t::view_manager.
Referenced by _center_leave().
Definition at line 662 of file control.c.
References darktable, dt_view_manager_mouse_moved(), darktable_t::view_manager, and x.
Referenced by _mouse_moved().
| void dt_control_navigation_redraw | ( | ) |
Request a redraw of the navigation module's widget.
Definition at line 929 of file control.c.
References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, and DT_SIGNAL_CONTROL_NAVIGATION_REDRAW.
Referenced by _enter_edit_mode(), dt_dev_pixelpipe_change_zoom_main(), and gui_changed().
| void dt_control_queue_cursor_by_name | ( | const char * | curs_str | ) |
Queue a GTK named cursor for the next cursor commit.
The cursor object is created only to validate the theme name. The queued ownership remains the string because GTK exposes named cursors as GDK_CURSOR_IS_PIXMAP, which cannot be passed back to gdk_cursor_new_for_display().
Definition at line 407 of file control.c.
References darktable_t::control, dt_control_t::cursor, darktable, IS_NULL_PTR, and dt_control_t::shape_str.
Referenced by _darkroom_set_default_cursor(), _set_cursor_shape(), _switch_cursors(), _switch_preview_cursor(), dt_control_change_cursor_by_name(), gui_post_expose(), mouse_leave(), and mouse_moved().
| void dt_control_queue_cursor_EXT | ( | dt_cursor_t | cursor, |
| const char * | file, | ||
| int | line | ||
| ) |
Definition at line 385 of file control.c.
References _get_cursor_name(), darktable_t::control, dt_control_t::cursor, darktable, DT_DEBUG_CONTROL, DT_DEBUG_VERBOSE, dt_get_debug_flags(), dt_print(), IS_NULL_PTR, dt_control_t::shape, and dt_control_t::shape_str.
Referenced by dt_control_change_cursor_EXT().
| void dt_control_queue_redraw | ( | ) |
Request a redraw of the whole workspace.
Definition at line 919 of file control.c.
References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, and DT_SIGNAL_CONTROL_REDRAW_ALL.
Referenced by _enter_edit_mode(), _export_image(), _view_print_settings(), dt_dev_configure_real(), dt_dev_darkroom_pipeline(), dt_image_import_job_run(), dt_lib_gui_set_expanded(), enter(), and process_clusters().
| void dt_control_queue_redraw_center | ( | ) |
Request a redraw of the centre view.
Definition at line 924 of file control.c.
References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, and DT_SIGNAL_CONTROL_REDRAW_CENTER.
Referenced by _add_shape(), _apply_display_brush_color(), _area_button_press_callback(), _area_motion_notify_callback(), _blendop_masks_apply_and_commit(), _button_clicked(), _cache_wait_cursor_restore(), _cacheline_ready_callback(), _channel_tabs_switch_callback(), _color_picker_callback_button_press(), _darkroom_image_loaded_callback(), _dev_backbuf_restart_cache_wait(), _display_brightness_callback(), _display_samples_changed(), _do_get_structure_lines(), _do_get_structure_quad(), _drag_and_drop_received(), _drag_motion_received(), _drop_move_to_folder(), _edit_masks(), _enter_edit_mode(), _event_process_after_preview_callback(), _event_process_after_ui_callback(), _event_structure_auto_clicked(), _film_import1(), _film_strip_activated(), _generic_dt_control_fileop_images_job_run(), _grid_callback(), _grid_horizontal_changed(), _grid_size_changed(), _grid_subdiv_changed(), _grid_vertical_changed(), _gui_delete_callback(), _gui_set_single_expanded(), _guides_quickbutton_clicked(), _height_changed(), _key_scroll(), _lib_duplicate_preview_updated_callback(), _lib_duplicate_thumb_press_callback(), _lib_duplicate_thumb_revert_callback(), _lib_snapshots_delete_button_clicked_callback(), _lib_snapshots_toggled_callback(), _live_sample_button(), _masks_shape_button_pressed(), _page_clear_area_clicked(), _page_delete_area(), _pipeline_busy(), _preview_cache_wait_restart(), _print_settings_activate_or_update_callback(), _publish_backend_progress(), _recompute_job_run(), _refresh_active_picker(), _refresh_display(), _remove_sample_cb(), _ring_tabs_switch_callback(), _sample_enter_callback(), _sample_leave_callback(), _set_orientation(), _settings_colors_changed(), _settings_contrast_changed(), _settings_flip_changed(), _settings_guides_changed(), _shape_manager_handler_callback(), _snap_grid_callback(), _studio_deferred_refresh(), _studio_history_changed_callback(), _studio_set_image(), _studio_toggle_zoom(), _switch_cursors(), _tree_add_shape(), _tree_apply_operation(), _tree_selection_change(), _view_surface_commit_main(), _width_changed(), _x_changed(), _y_changed(), aspect_presets_changed(), auto_advance(), button_pressed(), button_pressed(), button_pressed(), button_pressed(), button_released(), button_released(), button_released(), checker_changed_callback(), checker_color_changed_callback(), color_picker_apply(), delete_history_callback(), dt_control_delete_images_job_run(), dt_control_duplicate_images_job_run(), dt_control_flip_images_job_run(), dt_control_local_copy_images_job_run(), dt_control_log_busy_enter(), dt_control_log_busy_leave(), dt_control_merge_hdr_job_run(), dt_control_monochrome_images_job_run(), dt_control_refresh_exif_run(), dt_control_remove_images_job_run(), dt_control_toast_busy_enter(), dt_control_toast_busy_leave(), dt_dev_darkroom_pipeline(), dt_dev_snapshot_request(), dt_drawlayer_commit_dabs(), dt_drawlayer_runtime_manager_update(), dt_film_open(), dt_image_local_copy_reset(), dt_image_local_copy_set(), dt_iop_request_focus(), dt_masks_set_edit_mode(), entry_activated(), expose(), gui_changed(), gui_focus(), gui_reset(), gui_update(), key_pressed(), key_swap_callback(), keystone_type_changed(), load_xmp_callback(), mouse_leave(), mouse_leave(), mouse_moved(), mouse_moved(), mouse_moved(), mouse_moved(), paste_parts_callback(), row_activated(), rt_select_algorithm_callback(), rt_show_forms_for_current_scale(), safety_changed_callback(), scrolled(), scrolled(), set_params(), start_profiling_callback(), sync_pipe(), and ungroup_images_callback().
threadsafe request of redraw of specific widget. Use this function if you need to redraw a specific widget if your current thread context is not gtk main thread.
Definition at line 969 of file control.c.
References _widget_queue_draw(), _widget_queue_draw_cleanup(), dt_control_running(), IS_NULL_PTR, and dt_control_redraw_widget_t::widget_ref.
Referenced by _blendop_blendif_polarity_callback(), _blendop_compositing_changed(), _blendop_masks_polarity_callback(), _iop_zonesystem_redraw_preview_callback(), _lib_navigation_control_redraw_callback(), _lib_navigation_history_resync_callback(), _lib_navigation_restart_cache_wait(), _raster_polarity_callback(), _refresh_module_histogram(), apply_auto_black(), apply_auto_Dmax(), apply_auto_Dmin(), apply_auto_exposure(), apply_auto_offset(), apply_auto_WB_high(), apply_auto_WB_low(), color_picker_apply(), gui_changed(), process_clusters(), update_colorchecker_color_list(), Wb_high_norm_callback(), and Wb_low_norm_callback().
| void dt_control_quit | ( | ) |
Definition at line 452 of file control.c.
References dt_control_t::cond_mutex, darktable_t::control, darktable, dt_gui_gtk_quit(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::run_mutex, and dt_control_t::running.
Referenced by _handle_method_call(), append_file(), and dt_gui_quit_callback().
| int dt_control_running | ( | ) |
get threadsafe running state.
Definition at line 442 of file control.c.
References darktable_t::control, darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::run_mutex, and dt_control_t::running.
Referenced by _job_cancelled(), _update_display_profile(), dt_control_crawler_run_in_background(), dt_control_queue_redraw_widget(), dt_control_signal_raise(), dt_control_work(), dt_control_work_res(), dt_control_worker_kicker(), dt_dev_darkroom_pipeline(), gui_reset(), and leave().
| void dt_control_set_cursor_visible_EXT | ( | gboolean | visible, |
| const char * | file, | ||
| int | line | ||
| ) |
Set whether the cursor should be visible or not.
Cursor visibility changes are routed through a macro so the implementation can log the exact call site that requested the state transition.
Definition at line 425 of file control.c.
References darktable_t::control, dt_control_t::cursor, darktable, DT_DEBUG_CONTROL, DT_DEBUG_VERBOSE, dt_get_debug_flags(), dt_print(), and dt_control_t::hide.
| void dt_control_set_keyboard_over_id | ( | int32_t | value | ) |
Definition at line 1020 of file control.c.
References darktable_t::control, darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::global_mutex, dt_control_t::keyboard_over_id, and value.
Referenced by _culling_mode(), _film_strip_activated(), _studio_set_image(), _view_map_button_press_callback(), _view_map_filmstrip_drag_begin_callback(), _view_map_selection_changed(), _view_print_filmstrip_drag_begin_callback(), dt_thumbtable_dispatch_over(), dt_ui_panel_show(), and enter().
| void dt_control_set_mouse_over_id | ( | int32_t | value | ) |
Definition at line 994 of file control.c.
References darktable_t::control, darktable, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), DT_SIGNAL_MOUSE_OVER_IMAGE_CHANGE, dt_control_t::global_mutex, dt_control_t::keyboard_over_id, dt_control_t::mouse_over_id, and value.
Referenced by _culling_mode(), _dev_change_image(), _display_next_image(), _dt_ctl_open_image_in_darkroom(), _event_main_enter(), _event_main_leave(), _event_main_leave(), _event_main_motion(), _event_main_press(), _film_import1(), _film_strip_activated(), _studio_set_image(), _view_map_button_press_callback(), _view_map_filmstrip_drag_begin_callback(), _view_map_motion_notify_callback(), _view_map_selection_changed(), _view_print_filmstrip_drag_begin_callback(), dt_collection_load_filmroll(), dt_load_from_string(), dt_thumbtable_dispatch_over(), dt_ui_panel_show(), enter(), mouse_leave(), mouse_moved(), and reset().
| void dt_control_set_pointer_input | ( | const dt_control_pointer_input_t * | input | ) |
Definition at line 77 of file control.c.
References _pointer_input, and IS_NULL_PTR.
Referenced by _button_pressed(), _button_released(), and _mouse_moved().
| void dt_control_shutdown | ( | dt_control_t * | s | ) |
Definition at line 465 of file control.c.
References dt_control_t::cond, dt_control_t::cond_mutex, dt_control_jobs_drain(), DT_CTL_WORKER_RESERVED, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), k, dt_control_t::kick_on_workers_thread, dt_control_t::num_threads, dt_control_t::run_mutex, dt_control_t::running, dt_control_t::thread, and dt_control_t::thread_res.
Referenced by dt_cleanup().
| void dt_control_toast_busy_enter | ( | ) |
Definition at line 895 of file control.c.
References darktable_t::control, darktable, dt_control_queue_redraw_center(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::toast_busy, and dt_control_t::toast_mutex.
Referenced by dt_dev_darkroom_pipeline().
| void dt_control_toast_busy_leave | ( | ) |
Definition at line 911 of file control.c.
References darktable_t::control, darktable, dt_control_queue_redraw_center(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_control_t::toast_busy, and dt_control_t::toast_mutex.
Referenced by dt_dev_darkroom_pipeline().
| void dt_control_toast_redraw | ( | ) |
Request a redraw of the toast message label.
Definition at line 939 of file control.c.
References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, and DT_SIGNAL_CONTROL_TOAST_REDRAW.
Referenced by _dt_ctl_toast_message_timeout_callback(), and _redraw_center().
| void dt_ctl_open_image_in_darkroom | ( | const int32_t | imgid | ) |
open one specific image in the darkroom, from any view and any thread.
The darkroom picks the image it opens from the mouse-over id, falling back on the selection. Both are volatile: a pointer motion rewrites the mouse-over id, and leaving the darkroom restores the selection to the image it was editing. A caller that knows which image it wants – an import job, a background task – must therefore not publish the target and request the view switch separately: it has to happen in one go on the GUI thread, which is what this does.
| imgid | the image to open. The caller owns this contract: an id that names no image only gets the darkroom to refuse the switch and log "No image to open". |
Definition at line 745 of file control.c.
References _dt_ctl_open_image_in_darkroom().
Referenced by _dt_collection_change_view_after_import().
| void dt_ctl_switch_mode_to | ( | const char * | mode | ) |
Definition at line 701 of file control.c.
References _dt_ctl_switch_mode_to(), darktable, dt_ctl_switch_mode_to(), dt_view_manager_get_current_view(), dt_view_t::module_name, and darktable_t::view_manager.
Referenced by _dt_collection_change_view_after_import(), _home_callback(), _view_map_button_press_callback(), dt_cleanup(), dt_ctl_switch_mode_to(), dt_init(), dt_load_from_string(), and key_pressed().
Definition at line 714 of file control.c.
References _dt_ctl_switch_mode_to_by_view(), darktable, dt_view_manager_get_current_view(), view, and darktable_t::view_manager.
| void dt_toast_log | ( | const char * | msg, |
| ... | |||
| ) |
Definition at line 871 of file control.c.
References _toast_log(), and FALSE.
Referenced by _change_size(), _history_toast(), _init_fading(), _init_size(), _metadata_notify(), _polygon_creation_closing_form(), _toast_log_lat_lon(), _widget_message(), dt_masks_form_change_opacity(), dt_masks_form_set_interaction_value(), and dt_masks_get_set_conf_value_with_toast().
| void dt_toast_markup_log | ( | const char * | msg, |
| ... | |||
| ) |
Definition at line 879 of file control.c.
References _toast_log(), and TRUE.
|
static |
Definition at line 522 of file control.c.
Referenced by dt_control_expose().
|
static |
Definition at line 75 of file control.c.
Referenced by dt_control_get_pointer_input(), and dt_control_set_pointer_input().