![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "system/simd.h"#include "common/module_versioning.h"#include "develop/iop_profile.h"#include "widgets/bauhaus.h"#include "pixel/rgb_norms.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "gui/color_picker_proxy.h"#include "widgets/draw.h"#include "widgets/notebook.h"#include "widgets/scroll_wrap.h"#include "gui/screen_metrics.h"#include "widgets/togglebutton.h"#include "control/signal.h"
Include dependency graph for rgblevels.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_rgblevels_params_t |
| struct | dt_iop_rgblevels_gui_data_t |
| struct | dt_iop_rgblevels_data_t |
Macros | |
| #define | DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(5) |
| #define | RGBLEVELS_MIN 0.f |
| #define | RGBLEVELS_MID 0.5f |
| #define | RGBLEVELS_MAX 1.f |
Typedefs | |
| typedef enum dt_iop_rgblevels_channel_t | dt_iop_rgblevels_channel_t |
| typedef enum dt_iop_rgblevels_autoscale_t | dt_iop_rgblevels_autoscale_t |
| typedef struct dt_iop_rgblevels_params_t | dt_iop_rgblevels_params_t |
| typedef struct dt_iop_rgblevels_gui_data_t | dt_iop_rgblevels_gui_data_t |
| typedef struct dt_iop_rgblevels_data_t | dt_iop_rgblevels_data_t |
Enumerations | |
| enum | dt_iop_rgblevels_channel_t { DT_IOP_RGBLEVELS_R = 0 , DT_IOP_RGBLEVELS_G = 1 , DT_IOP_RGBLEVELS_B = 2 , DT_IOP_RGBLEVELS_MAX_CHANNELS = 3 } |
| enum | dt_iop_rgblevels_autoscale_t { DT_IOP_RGBLEVELS_LINKED_CHANNELS = 0 , DT_IOP_RGBLEVELS_INDEPENDENT_CHANNELS = 1 } |
| #define DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(5) |
Definition at line 60 of file rgblevels.c.
| #define RGBLEVELS_MAX 1.f |
Definition at line 66 of file rgblevels.c.
| #define RGBLEVELS_MID 0.5f |
Definition at line 65 of file rgblevels.c.
| #define RGBLEVELS_MIN 0.f |
Definition at line 64 of file rgblevels.c.
| typedef enum dt_iop_rgblevels_autoscale_t dt_iop_rgblevels_autoscale_t |
| typedef enum dt_iop_rgblevels_channel_t dt_iop_rgblevels_channel_t |
| typedef struct dt_iop_rgblevels_data_t dt_iop_rgblevels_data_t |
| typedef struct dt_iop_rgblevels_gui_data_t dt_iop_rgblevels_gui_data_t |
| typedef struct dt_iop_rgblevels_params_t dt_iop_rgblevels_params_t |
| Enumerator | |
|---|---|
| DT_IOP_RGBLEVELS_LINKED_CHANNELS | |
| DT_IOP_RGBLEVELS_INDEPENDENT_CHANNELS | |
Definition at line 76 of file rgblevels.c.
| Enumerator | |
|---|---|
| DT_IOP_RGBLEVELS_R | |
| DT_IOP_RGBLEVELS_G | |
| DT_IOP_RGBLEVELS_B | |
| DT_IOP_RGBLEVELS_MAX_CHANNELS | |
Definition at line 68 of file rgblevels.c.
|
static |
Definition at line 483 of file rgblevels.c.
References _turn_selregion_picker_off(), dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_gui_data(), dt_iop_request_focus(), FALSE, dt_iop_module_t::gui, dt_develop_t::gui_module, i, dt_iop_rgblevels_params_t::levels, p, dt_iop_module_t::params, TRUE, and dt_iop_module_gui_t::widget.
Referenced by gui_init().
|
static |
Definition at line 520 of file rgblevels.c.
References dt_iop_gui_data(), FALSE, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 265 of file rgblevels.c.
References ch, dt_bauhaus_get_global(), dt_cairo_image_surface_create(), dt_draw_histogram_8(), dt_draw_vertical_lines(), DT_GUI_CURVE_EDITOR_INSET, dt_iop_gui_data(), DT_IOP_RGBLEVELS_B, DT_IOP_RGBLEVELS_G, DT_IOP_RGBLEVELS_INDEPENDENT_CHANNELS, DT_IOP_RGBLEVELS_LINKED_CHANNELS, DT_IOP_RGBLEVELS_MAX_CHANNELS, DT_IOP_RGBLEVELS_R, DT_PIXEL_APPLY_DPI, dt_iop_module_t::enabled, FALSE, height, dt_iop_module_t::histogram, dt_iop_module_t::histogram_max, IS_NULL_PTR, k, p, dt_iop_module_t::params, set_color(), TRUE, and width.
Referenced by gui_init().
|
static |
Definition at line 257 of file rgblevels.c.
References dt_iop_gui_data(), and TRUE.
Referenced by gui_init().
|
static |
Definition at line 438 of file rgblevels.c.
References _rgblevels_move_handle(), dist(), DT_GUI_CURVE_EDITOR_INSET, dt_iop_gui_data(), height, k, p, dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
|
static |
Definition at line 531 of file rgblevels.c.
References _rgblevels_move_handle(), _turn_selregion_picker_off(), dt_iop_module_t::dev, dt_gui_get_scroll_unit_deltas(), dt_iop_gui_data(), dt_iop_request_focus(), FALSE, dt_develop_t::gui_module, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 968 of file rgblevels.c.
References ch, DT_IOP_RGBLEVELS_INDEPENDENT_CHANNELS, dt_rgb_norm(), DT_RGB_NORM_NONE, height, max, min, p, width, and x.
Referenced by process().
|
static |
Definition at line 558 of file rgblevels.c.
References _turn_selregion_picker_off(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_pixelpipe_update_history_all, dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), g, dt_iop_module_t::gui, dt_iop_module_gui_t::off, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 639 of file rgblevels.c.
References _turn_select_region_off().
Referenced by gui_init().
|
static |
Definition at line 202 of file rgblevels.c.
References d, dt_dev_pixelpipe_iop_t::data, delta, DT_IOP_RGBLEVELS_LINKED_CHANNELS, and i.
Referenced by commit_params().
|
static |
Definition at line 166 of file rgblevels.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), g, gui_update(), IS_NULL_PTR, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 910 of file rgblevels.c.
References DT_ALIGNED_ARRAY, dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_BACK_INCL, g, height, dt_iop_roi_t::height, dt_dev_pixelpipe_t::iheight, dt_iop_module_t::iop_order, IS_NULL_PTR, dt_dev_pixelpipe_t::iwidth, k, MAX, MIN, dt_iop_roi_t::scale, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process().
|
static |
Definition at line 397 of file rgblevels.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_gui_data(), IS_NULL_PTR, levels(), and TRUE.
Referenced by _area_motion_notify_callback(), and _area_scroll_callback().
|
static |
Definition at line 239 of file rgblevels.c.
References DT_IOP_RGBLEVELS_INDEPENDENT_CHANNELS, DT_IOP_RGBLEVELS_LINKED_CHANNELS, FALSE, g, p, and TRUE.
Referenced by gui_changed(), and gui_update().
|
static |
Definition at line 584 of file rgblevels.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_color_picker_reset(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_iop_request_focus(), g, dt_iop_module_t::gui, dt_iop_module_gui_t::off, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 629 of file rgblevels.c.
References dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, dt_iop_module_t::gui, and dt_iop_module_gui_t::widget.
Referenced by gui_init().
|
static |
Definition at line 150 of file rgblevels.c.
References dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by _color_picker_callback(), _turn_selregion_picker_off(), and gui_focus().
|
static |
Definition at line 160 of file rgblevels.c.
References _turn_select_region_off(), dt_iop_color_picker_reset(), and TRUE.
Referenced by _area_button_press_callback(), _area_scroll_callback(), _auto_levels_callback(), gui_changed(), and gui_reset().
| void change_image | ( | struct dt_iop_module_t * | self | ) |
Definition at line 796 of file rgblevels.c.
References dt_iop_gui_data(), DT_IOP_RGBLEVELS_R, and g.
Referenced by gui_init().
| void cleanup_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 744 of file rgblevels.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 644 of file rgblevels.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_gui_data(), levels(), p, dt_iop_module_t::params, dt_iop_module_t::picked_color, TRUE, and void().
| void commit_params | ( | dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 711 of file rgblevels.c.
References _compute_lut(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_has_preview_output(), DT_IOP_RGBLEVELS_LINKED_CHANNELS, DT_IOP_RGBLEVELS_MAX_CHANNELS, DT_REQUEST_ON, i, p, and dt_dev_pixelpipe_iop_t::request_histogram.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 136 of file rgblevels.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 126 of file rgblevels.c.
References IOP_GROUP_COLOR.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 141 of file rgblevels.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 131 of file rgblevels.c.
References IOP_FLAGS_DEPRECATED, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 613 of file rgblevels.c.
References _rgblevels_show_hide_controls(), _turn_selregion_picker_off(), dt_iop_gui_data(), DT_IOP_RGBLEVELS_R, g, p, and dt_iop_module_t::params.
| void gui_cleanup | ( | dt_iop_module_t * | self | ) |
Definition at line 902 of file rgblevels.c.
References _develop_ui_pipe_finished_callback(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, and IOP_GUI_FREE.
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Definition at line 764 of file rgblevels.c.
References _turn_select_region_off().
| void gui_init | ( | dt_iop_module_t * | self | ) |
Definition at line 808 of file rgblevels.c.
References _area_button_press_callback(), _area_button_release_callback(), _area_draw_callback(), _area_leave_notify_callback(), _area_motion_notify_callback(), _area_scroll_callback(), _auto_levels_callback(), _color_picker_callback(), _develop_ui_pipe_finished_callback(), _select_region_toggled_callback(), _tab_switch_callback(), change_image(), dt_bauhaus_combobox_from_params(), dt_color_picker_new(), DT_COLOR_PICKER_POINT, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_GUI_BOX_SPACING, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, dt_ui_notebook_page(), dt_ui_notebook_set_picker_owner(), dt_ui_resizable_drawing_area(), dt_widget_scroll_mask(), dtgtk_cairo_paint_colorpicker(), dtgtk_togglebutton_new(), FALSE, dt_iop_module_t::gui, IOP_GUI_ALLOC, TRUE, and dt_iop_module_gui_t::widget.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
Definition at line 769 of file rgblevels.c.
References _turn_selregion_picker_off(), dt_iop_gui_data(), DT_IOP_RGBLEVELS_R, g, dt_iop_module_t::gui, and dt_iop_module_gui_t::widget.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 751 of file rgblevels.c.
References _rgblevels_show_hide_controls(), dt_bauhaus_combobox_set(), dt_iop_gui_data(), g, dt_iop_module_t::gui, p, dt_iop_module_t::params, and dt_iop_module_gui_t::widget.
Referenced by _develop_ui_pipe_finished_callback().
| void init | ( | dt_iop_module_t * | self | ) |
Definition at line 780 of file rgblevels.c.
References d, dt_iop_module_t::default_params, dt_iop_default_init(), DT_IOP_RGBLEVELS_MAX_CHANNELS, DT_REQUEST_ON, dt_iop_module_t::request_histogram, RGBLEVELS_MAX, RGBLEVELS_MID, and RGBLEVELS_MIN.
| void init_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 738 of file rgblevels.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| const char * name | ( | ) |
Definition at line 121 of file rgblevels.c.
| __DT_CLONE_TARGETS__ int process | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid | ||
| ) |
Definition at line 1039 of file rgblevels.c.
References __OMP_PARALLEL_FOR__, _auto_levels(), _get_selected_area(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_has_preview_output(), dt_gui_widgets_suppressed(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_IOP_RGBLEVELS_INDEPENDENT_CHANNELS, dt_ioppr_get_pipe_work_profile_info(), dt_rgb_norm(), DT_RGB_NORM_NONE, for_each_channel, g, dt_iop_roi_t::height, IS_NULL_PTR, k, levels(), out, ovoid, p, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, and dt_iop_roi_t::width.