![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/dtpthread.h"#include "common/gui_module_api.h"#include "common/iop_profile.h"#include <stddef.h>#include <gtk/gtk.h>
Include dependency graph for lut_viewer.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_lut_viewer_control_node_t |
Typedefs | |
| typedef struct dt_lut_viewer_t | dt_lut_viewer_t |
| typedef struct dt_lut_viewer_control_node_t | dt_lut_viewer_control_node_t |
Functions | |
| dt_lut_viewer_t * | dt_lut_viewer_new (dt_gui_module_t *module) |
| void | dt_lut_viewer_destroy (dt_lut_viewer_t **viewer) |
| GtkWidget * | dt_lut_viewer_get_widget (dt_lut_viewer_t *viewer) |
| void | dt_lut_viewer_set_lut (dt_lut_viewer_t *viewer, const float *clut, uint16_t level, dt_pthread_rwlock_t *clut_lock, const dt_iop_order_iccprofile_info_t *lut_profile, const dt_iop_order_iccprofile_info_t *display_profile) |
| void | dt_lut_viewer_set_control_nodes (dt_lut_viewer_t *viewer, const dt_lut_viewer_control_node_t *control_nodes, size_t control_node_count) |
| void | dt_lut_viewer_queue_draw (dt_lut_viewer_t *viewer) |
| typedef struct dt_lut_viewer_control_node_t dt_lut_viewer_control_node_t |
| typedef struct dt_lut_viewer_t dt_lut_viewer_t |
| void dt_lut_viewer_destroy | ( | dt_lut_viewer_t ** | viewer | ) |
Release the viewer private state. The GTK widget hierarchy is still owned by its parent container and will be destroyed there.
References _invalidate_surface(), dt_free_align, and IS_NULL_PTR.
Referenced by gui_cleanup().
| GtkWidget * dt_lut_viewer_get_widget | ( | dt_lut_viewer_t * | viewer | ) |
Return the top-level GTK widget packing the controls and the drawing area.
References dt_lut_viewer_t::widget.
Referenced by gui_init().
| dt_lut_viewer_t * dt_lut_viewer_new | ( | dt_gui_module_t * | module | ) |
Build a reusable GTK widget able to preview a 3D LUT as target/output RGB samples projected from the RGB cube onto a Cairo surface.
References _button_press_callback(), _button_release_callback(), _control_changed(), _draw_callback(), _motion_notify_callback(), _save_clut_callback(), _scroll_callback(), dt_lut_viewer_t::area, darktable_t::bauhaus, dt_lut_viewer_t::cached_gamut, dt_lut_viewer_t::cached_pan_x, dt_lut_viewer_t::cached_pan_y, dt_lut_viewer_t::cached_ppd, dt_lut_viewer_t::cached_rotation_around_axis, dt_lut_viewer_t::cached_rotation_of_axis, dt_lut_viewer_t::cached_shift_threshold, dt_lut_viewer_t::cached_slice_depth, dt_lut_viewer_t::cached_slice_thickness, dt_lut_viewer_t::cached_zoom, dt_lut_viewer_t::controls, darktable, dt_lut_viewer_t::drag_mode, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_format(), DT_BAUHAUS_SPACE, dt_bauhaus_widget_set_label(), DT_LUT_VIEWER_DRAG_NONE, DT_LUT_VIEWER_GAMUT_REC2020, DT_PIXEL_APPLY_DPI, dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, dt_lut_viewer_t::gamut, IS_NULL_PTR, dt_lut_viewer_t::pan_x, dt_lut_viewer_t::pan_y, dt_lut_viewer_t::rotation_around_axis, dt_lut_viewer_t::rotation_of_axis, dt_lut_viewer_t::sample_cache_control_node_count, dt_lut_viewer_t::sample_cache_control_nodes, dt_lut_viewer_t::sample_cache_gamut, dt_lut_viewer_t::sample_cache_rotation_around_axis, dt_lut_viewer_t::sample_cache_rotation_of_axis, dt_lut_viewer_t::sample_cache_shift_threshold, dt_lut_viewer_t::sample_cache_show_control_nodes, dt_lut_viewer_t::sample_cache_slice_depth, dt_lut_viewer_t::sample_cache_slice_thickness, dt_lut_viewer_t::save_button, dt_lut_viewer_t::shift_threshold, dt_lut_viewer_t::show_control_nodes, dt_lut_viewer_t::slice_depth, dt_lut_viewer_t::slice_thickness, TRUE, dt_lut_viewer_t::widget, and dt_lut_viewer_t::zoom.
Referenced by gui_init().
| void dt_lut_viewer_queue_draw | ( | dt_lut_viewer_t * | viewer | ) |
Queue a redraw of the drawing area after the cache has been invalidated.
References dt_lut_viewer_t::area.
Referenced by _update_gui_lut_cache(), and _update_gui_lut_cache().
| void dt_lut_viewer_set_control_nodes | ( | dt_lut_viewer_t * | viewer, |
| const dt_lut_viewer_control_node_t * | control_nodes, | ||
| size_t | control_node_count | ||
| ) |
Update the list of sparse control nodes displayed by the viewer when the caller enables the dedicated control-node mode. The viewer does not take ownership of this memory and expects it to stay valid until the next update.
References _invalidate_sample_cache(), _invalidate_surface(), dt_lut_viewer_t::control_node_count, dt_lut_viewer_t::control_nodes, FALSE, IS_NULL_PTR, and dt_lut_viewer_t::show_control_nodes.
Referenced by _update_gui_lut_cache(), and _update_gui_lut_cache().
| void dt_lut_viewer_set_lut | ( | dt_lut_viewer_t * | viewer, |
| const float * | clut, | ||
| uint16_t | level, | ||
| dt_pthread_rwlock_t * | clut_lock, | ||
| const dt_iop_order_iccprofile_info_t * | lut_profile, | ||
| const dt_iop_order_iccprofile_info_t * | display_profile | ||
| ) |
Update the currently displayed LUT. The viewer does not take ownership of the CLUT memory and expects it to stay valid until the next update. If a read/write lock is provided, the viewer will acquire a read lock while rebuilding its cached Cairo surface from that CLUT.
References _invalidate_sample_cache(), _invalidate_surface(), dt_lut_viewer_t::clut, dt_lut_viewer_t::clut_level, dt_lut_viewer_t::clut_lock, dt_lut_viewer_t::display_profile, IS_NULL_PTR, and dt_lut_viewer_t::lut_profile.
Referenced by _update_gui_lut_cache(), and _update_gui_lut_cache().