Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
color_picker_proxy.h File Reference
#include <gtk/gtk.h>
#include "develop/imageop.h"
#include "develop/develop.h"
+ Include dependency graph for color_picker_proxy.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_iop_color_picker_t
 

Typedefs

typedef enum _iop_color_picker_kind_t dt_iop_color_picker_kind_t
 
typedef struct dt_iop_color_picker_t dt_iop_color_picker_t
 

Enumerations

enum  _iop_color_picker_kind_t {
  DT_COLOR_PICKER_POINT = 0 ,
  DT_COLOR_PICKER_AREA ,
  DT_COLOR_PICKER_POINT_AREA
}
 

Functions

gboolean dt_iop_color_picker_is_visible (const dt_develop_t *dev)
 
gboolean dt_iop_color_picker_is_active_module (const dt_iop_module_t *module)
 Tell whether one module currently owns the active darkroom picker.
 
void dt_iop_color_picker_reset (dt_iop_module_t *module, gboolean keep)
 
void dt_iop_color_picker_set_cst (dt_iop_module_t *module, const dt_iop_colorspace_type_t picker_cst)
 
dt_iop_colorspace_type_t dt_iop_color_picker_get_active_cst (dt_iop_module_t *module)
 
void dt_iop_color_picker_request_update (void)
 
int dt_iop_color_picker_get_ready_data (const dt_iop_module_t *module, GtkWidget **picker, struct dt_dev_pixelpipe_t **pipe, const struct dt_dev_pixelpipe_iop_t **piece)
 Resolve the current ready picker payload for one module.
 
gboolean dt_iop_color_picker_force_cache (const dt_develop_t *dev, const struct dt_dev_pixelpipe_t *pipe, const dt_iop_module_t *module)
 Tell whether the active picker requires host-cache retention on one module output.
 
void dt_iop_color_picker_init ()
 
void dt_iop_color_picker_cleanup ()
 
GtkWidgetdt_color_picker_new (dt_iop_module_t *module, dt_iop_color_picker_kind_t kind, GtkWidget *w)
 
GtkWidgetdt_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)
 

Typedef Documentation

◆ dt_iop_color_picker_kind_t

◆ dt_iop_color_picker_t

Enumeration Type Documentation

◆ _iop_color_picker_kind_t

Enumerator
DT_COLOR_PICKER_POINT 
DT_COLOR_PICKER_AREA 
Todo:
: s/AREA/BOX/
DT_COLOR_PICKER_POINT_AREA 

Function Documentation

◆ dt_color_picker_new()

◆ dt_color_picker_new_with_cst()

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().

◆ dt_iop_color_picker_cleanup()

◆ dt_iop_color_picker_force_cache()

gboolean dt_iop_color_picker_force_cache ( const dt_develop_t dev,
const struct dt_dev_pixelpipe_t pipe,
const dt_iop_module_t module 
)

Tell whether the active picker requires host-cache retention on one module output.

Picker sampling reopens the active module cacheline directly from the preview cache on the GUI thread. To make that possible when OpenCL is active, the producing module must keep a host-visible cacheline. The pixelpipe asks that question during _set_opencl_cache(), while the picker code asks it again when deciding whether a cache miss should trigger a preview recompute.

Parameters
devCurrent develop instance.
moduleCandidate module in the preview pipe.
Returns
TRUE if the active picker captures module and therefore needs its output cached on host.

◆ dt_iop_color_picker_get_active_cst()

◆ dt_iop_color_picker_get_ready_data()

int dt_iop_color_picker_get_ready_data ( const dt_iop_module_t module,
GtkWidget **  picker,
struct dt_dev_pixelpipe_t **  pipe,
const struct dt_dev_pixelpipe_iop_t **  piece 
)

Resolve the current ready picker payload for one module.

DT_SIGNAL_CONTROL_PICKERDATA_READY does not carry the sampled module, pipe, picker widget, or piece as signal parameters anymore. The picker manager stores that ready state under dt_develop_t until signal subscribers consume it on the GUI thread. This accessor lets any subscriber check whether the ready sample belongs to module and, if so, recover the current live piece from the current preview pipe graph through its immutable global_hash.

Parameters
moduleSignal subscriber asking whether the current ready sample is for it.
pickerOptional output pointer receiving the active picker widget.
pipeOptional output pointer receiving the preview pipe used for sampling.
pieceOptional output pointer receiving the current live piece matching the sampled global_hash.
Returns
0 when the ready sample belongs to module and all requested outputs were resolved, 1 otherwise.

◆ dt_iop_color_picker_init()

◆ dt_iop_color_picker_is_active_module()

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.

Parameters
moduleCandidate module.
Returns
TRUE when the picker manager is enabled and the active picker belongs to module.

Referenced by _spot_settings_changed_callback(), and _spot_settings_changed_callback().

◆ dt_iop_color_picker_is_visible()

gboolean dt_iop_color_picker_is_visible ( const dt_develop_t dev)

◆ dt_iop_color_picker_request_update()

◆ dt_iop_color_picker_reset()

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().

◆ dt_iop_color_picker_set_cst()