![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "gui/color_picker_proxy.h"#include "bauhaus/bauhaus.h"#include "common/color_picker.h"#include "control/signal.h"#include "control/control.h"#include "develop/dev_pixelpipe.h"#include "develop/pixelpipe_cache.h"#include "gui/gtk.h"#include "libs/colorpicker.h"#include "libs/lib.h"#include <inttypes.h>#include <math.h>#include <string.h>
Include dependency graph for color_picker_proxy.c:Typedefs | |
| typedef enum dt_pixelpipe_picker_source_t | dt_pixelpipe_picker_source_t |
| typedef enum dt_color_picker_resample_status_t | dt_color_picker_resample_status_t |
Enumerations | |
| enum | dt_pixelpipe_picker_source_t { PIXELPIPE_PICKER_INPUT = 0 , PIXELPIPE_PICKER_OUTPUT = 1 } |
| enum | dt_color_picker_resample_status_t { DT_COLOR_PICKER_RESAMPLE_CONSUMED = 0 , DT_COLOR_PICKER_RESAMPLE_RETRY = 1 , DT_COLOR_PICKER_RESAMPLE_EMITTED = 2 } |
| typedef enum dt_pixelpipe_picker_source_t dt_pixelpipe_picker_source_t |
|
static |
References _color_picker_callback_button_press().
Referenced by _color_picker_new().
|
static |
References _color_picker_reset(), dt_iop_color_picker_t::colorpick, darktable, darktable_t::develop, dt_bauhaus_widget_set_quad_active(), DT_COLOR_PICKER_AREA, DT_COLOR_PICKER_POINT, DT_COLOR_PICKER_POINT_AREA, dt_control_queue_redraw_center(), DT_DEBUG_DEV, dt_iop_color_picker_request_update(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), dt_key_modifier_state(), dt_lib_colorpicker_set_box_area(), dt_lib_colorpicker_set_point(), DT_LIB_COLORPICKER_SIZE_BOX, dt_modifier_is(), dt_print(), DT_REQUEST_COLORPICK_OFF, dt_unreachable_codepath, DTGTK_IS_TOGGLEBUTTON, FALSE, darktable_t::gui, IOP_CS_NONE, kind, dt_iop_color_picker_t::kind, darktable_t::lib, dt_iop_color_picker_t::pick_box, dt_iop_color_picker_t::pick_pos, dt_iop_color_picker_t::picker_cst, dt_gui_gtk_t::reset, and TRUE.
Referenced by _color_picker_callback(), and _color_picker_new().
|
static |
References _color_picker_callback(), _color_picker_callback_button_press(), _color_picker_widget_destroy(), _init_picker(), dt_develop_t::color_picker, darktable, darktable_t::develop, dt_bauhaus_widget_set_quad_active(), dt_bauhaus_widget_set_quad_paint(), dt_bauhaus_widget_set_quad_toggle(), dt_gui_add_class(), dt_iop_set_cache_bypass(), dtgtk_cairo_paint_colorpicker(), dtgtk_togglebutton_new(), dt_develop_t::enabled, FALSE, darktable_t::gui, kind, dt_develop_t::kind, dt_develop_t::picker, dt_develop_t::picker_cst, dt_iop_color_picker_t::picker_cst, dt_gui_gtk_t::reset, TRUE, and dt_develop_t::widget.
Referenced by dt_color_picker_new(), and dt_color_picker_new_with_cst().
|
static |
|
static |
References dt_develop_t::color_picker, darktable, darktable_t::develop, dt_develop_t::picker, void(), and dt_develop_t::widget.
Referenced by _color_picker_new().
|
static |
|
static |
References _queue_refresh_active_picker(), dt_develop_t::color_picker, darktable, darktable_t::develop, FALSE, and dt_develop_t::recompute_requested.
Referenced by dt_iop_color_picker_cleanup(), and dt_iop_color_picker_init().
|
static |
References dt_colorpicker_sample_t::box, dt_develop_t::color_picker, darktable, darktable_t::develop, dt_dev_coordinates_image_norm_to_preview_abs(), dt_dev_distort_backtransform_plus(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, DT_DEV_TRANSFORM_DIR_FORW_INCL, DT_LIB_COLORPICKER_SIZE_BOX, DT_LIB_COLORPICKER_SIZE_POINT, dt_iop_roi_t::height, dt_iop_module_t::iop_order, MAX, MIN, PIXELPIPE_PICKER_INPUT, dt_colorpicker_sample_t::point, dt_develop_t::preview_pipe, dt_develop_t::primary_sample, dt_colorpicker_sample_t::size, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _sample_picker_buffer().
|
static |
|
static |
Synchronize one picker cached geometry with the primary sample.
The active picker keeps a copy of the sample point/box so reopening it restores the previous GUI geometry. This function only mirrors the current primary sample into that cached geometry and reports whether the coordinates changed since the previous sampling pass.
It does not consume self->update_pending. That flag is the same update logic seen from the non-geometric side: first activation and colorspace changes request one callback even if the picker geometry itself did not move.
References dt_colorpicker_sample_t::box, dt_develop_t::color_picker, darktable, darktable_t::develop, DT_LIB_COLORPICKER_SIZE_BOX, DT_LIB_COLORPICKER_SIZE_POINT, FALSE, dt_iop_color_picker_t::pick_box, dt_iop_color_picker_t::pick_pos, dt_colorpicker_sample_t::point, dt_develop_t::primary_sample, dt_colorpicker_sample_t::size, and TRUE.
Referenced by _refresh_active_picker().
|
static |
References _record_point_area(), _request_picker_recompute(), _sample_picker_from_cache(), dt_develop_t::color_picker, DT_COLOR_PICKER_RESAMPLE_RETRY, DT_DEBUG_DEV, dt_print(), dt_develop_t::enabled, FALSE, dt_develop_t::picker, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, dt_develop_t::recompute_requested, dt_dev_pixelpipe_t::status, and dt_develop_t::update_pending.
Referenced by _refresh_active_picker_idle().
|
static |
References _refresh_active_picker(), dt_develop_t::color_picker, and dt_develop_t::refresh_idle_source.
Referenced by _queue_refresh_active_picker().
|
static |
References dt_develop_t::color_picker, DT_DEBUG_DEV, dt_dev_pixelpipe_update_history_preview, dt_print(), dt_develop_t::preview_pipe, dt_develop_t::recompute_requested, and TRUE.
Referenced by _refresh_active_picker().
|
static |
References _picker_sample_box(), dt_iop_buffer_dsc_t::cst, dt_color_picker_helper(), dt_iop_color_picker_get_active_cst(), dt_ioppr_get_pipe_current_profile_info(), FALSE, max, min, and TRUE.
Referenced by _sample_picker_from_cache().
|
static |
References _sample_picker_buffer(), dt_develop_t::color_picker, darktable, dt_iop_buffer_dsc_t::datatype, dt_dev_pixelpipe_iop_t::dsc_out, DT_COLOR_PICKER_RESAMPLE_CONSUMED, DT_COLOR_PICKER_RESAMPLE_EMITTED, DT_COLOR_PICKER_RESAMPLE_RETRY, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_DEBUG_DEV, dt_dev_pixelpipe_cache_peek(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_get_module_piece(), dt_dev_pixelpipe_get_prev_enabled_piece(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_print(), DT_SIGNAL_CONTROL_PICKERDATA_READY, dt_develop_t::enabled, dt_iop_module_t::enabled, FALSE, dt_dev_pixelpipe_iop_t::global_hash, dt_develop_t::gui_module, dt_develop_t::pending_module, dt_develop_t::pending_pipe, dt_develop_t::picker, dt_develop_t::piece_hash, darktable_t::pixelpipe_cache, PIXELPIPE_PICKER_INPUT, PIXELPIPE_PICKER_OUTPUT, dt_develop_t::preview_pipe, dt_dev_pixelpipe_iop_t::roi_out, darktable_t::signals, TRUE, TYPE_FLOAT, and dt_develop_t::update_pending.
Referenced by _refresh_active_picker().
| GtkWidget * dt_color_picker_new | ( | dt_iop_module_t * | module, |
| dt_iop_color_picker_kind_t | kind, | ||
| GtkWidget * | w | ||
| ) |
References _color_picker_new(), FALSE, IOP_CS_NONE, and kind.
Referenced by dt_iop_gui_init_blendif(), gui_init(), gui_init(), gui_init(), and gui_init_section().
| GtkWidget * dt_color_picker_new_with_cst | ( | dt_iop_module_t * | module, |
| dt_iop_color_picker_kind_t | kind, | ||
| GtkWidget * | w, | ||
| const dt_iop_colorspace_type_t | cst | ||
| ) |
References _color_picker_new(), kind, and TRUE.
Referenced by gui_init(), and gui_init().
References _iop_color_picker_preview_pipe_finished_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, and darktable_t::signals.
Referenced by leave().
| gboolean dt_iop_color_picker_force_cache | ( | const dt_develop_t * | dev, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_iop_module_t * | module | ||
| ) |
| dt_iop_colorspace_type_t dt_iop_color_picker_get_active_cst | ( | dt_iop_module_t * | module | ) |
References dt_develop_t::color_picker, darktable, darktable_t::develop, IOP_CS_NONE, dt_develop_t::picker, and dt_iop_color_picker_t::picker_cst.
Referenced by _blendif_colorpicker_cst(), and _sample_picker_buffer().
| int dt_iop_color_picker_get_ready_data | ( | const dt_iop_module_t * | module, |
| GtkWidget ** | picker, | ||
| dt_dev_pixelpipe_t ** | pipe, | ||
| const dt_dev_pixelpipe_iop_t ** | piece | ||
| ) |
References dt_develop_t::color_picker, darktable, dt_dev_pixelpipe_iop_t::data, darktable_t::develop, DT_DEBUG_DEV, dt_print(), dt_dev_pixelpipe_iop_t::global_hash, dt_dev_pixelpipe_t::nodes, dt_iop_module_t::op, dt_develop_t::pending_module, dt_develop_t::pending_pipe, dt_develop_t::piece_hash, and dt_develop_t::widget.
Referenced by _iop_color_picker_data_ready_callback().
References _iop_color_picker_preview_pipe_finished_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, and darktable_t::signals.
Referenced by enter().
| gboolean dt_iop_color_picker_is_active_module | ( | const dt_iop_module_t * | module | ) |
Tell whether one module currently owns the active darkroom picker.
Module code often needs to know whether a GUI callback is running for the module that currently captures picker updates. That ownership lives under dt_develop_t::color_picker, so callers should query it through this API instead of open-coding the develop-state test at each call site.
| module | Candidate module. |
module. Referenced by _spot_settings_changed_callback(), and _spot_settings_changed_callback().
| gboolean dt_iop_color_picker_is_visible | ( | const dt_develop_t * | dev | ) |
References dt_develop_t::color_picker, dt_develop_t::enabled, dt_iop_module_t::enabled, and dt_develop_t::gui_module.
Referenced by _switch_cursors(), button_pressed(), button_released(), expose(), and mouse_moved().
References _queue_refresh_active_picker(), dt_develop_t::color_picker, darktable, darktable_t::develop, DT_DEBUG_DEV, dt_print(), dt_develop_t::picker, TRUE, dt_develop_t::update_pending, dt_iop_color_picker_t::update_pending, and dt_develop_t::widget.
Referenced by _color_picker_callback_button_press(), dt_iop_color_picker_set_cst(), dt_lib_colorpicker_set_box_area(), and dt_lib_colorpicker_set_point().
| void dt_iop_color_picker_reset | ( | dt_iop_module_t * | module, |
| gboolean | keep | ||
| ) |
References _color_picker_reset(), dt_develop_t::color_picker, darktable, darktable_t::develop, DT_COLOR_PICKER_POINT, dt_develop_t::enabled, FALSE, IOP_CS_NONE, dt_develop_t::kind, dt_develop_t::picker, dt_develop_t::picker_cst, dt_develop_t::recompute_requested, dt_develop_t::update_pending, and dt_develop_t::widget.
Referenced by _area_button_press_callback(), _area_button_press_callback(), _area_key_press_callback(), _area_key_press_callback(), _area_motion_notify_callback(), _area_motion_notify_callback(), _area_scrolled_callback(), _area_scrolled_callback(), _autoexp_disable(), _blendop_blendif_reset(), _blendop_blendif_sliders_callback(), _blendop_blendif_tab_switch(), _blendop_masks_add_shape(), _blendop_masks_show_and_edit(), _channel_tabs_switch_callback(), _delete_node(), _edit_masks(), _interpolator_callback(), _select_region_toggled_callback(), _select_region_toggled_callback(), _turn_selregion_picker_off(), _turn_selregion_picker_off(), apply_autocolor(), apply_autoluma(), area_button_press(), aspect_changed(), auto_adjust_contrast_boost(), auto_adjust_exposure_boost(), balance_callback(), black_point_source_callback(), black_point_target_callback(), center_callback(), colorpick_color_set(), colorpicker_callback(), contrast_callback(), controls_callback(), Dmin_picker_callback(), dt_iop_gui_changed(), dt_iop_gui_update_blendif(), dt_iop_gui_update_blending(), dt_iop_levels_autoadjust_callback(), dt_iop_levels_scroll(), dt_iop_monochrome_button_press(), dt_iop_monochrome_button_release(), dt_iop_monochrome_scrolled(), dt_iop_request_focus(), frame_colorpick_color_set(), global_saturation_callback(), grey_point_source_callback(), grey_point_target_callback(), gui_cleanup(), gui_reset(), gui_reset(), gui_reset(), gui_update(), gui_update(), gui_update(), interpolator_callback(), latitude_stops_callback(), leave(), notebook_button_press(), output_power_callback(), patch_callback(), position_h_changed(), position_v_changed(), preset_tune_callback(), rt_add_shape_callback(), rt_colorpick_color_set_callback(), rt_edit_masks_callback(), saturation_callback(), security_threshold_callback(), show_luminance_mask_callback(), smoothing_callback(), target_callback(), temp_tint_callback(), WB_high_picker_callback(), WB_low_picker_callback(), white_point_source_callback(), and white_point_target_callback().
| void dt_iop_color_picker_set_cst | ( | dt_iop_module_t * | module, |
| const dt_iop_colorspace_type_t | picker_cst | ||
| ) |