![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/colorspaces.h"#include "common/darktable.h"#include "common/debug.h"#include "common/history.h"#include "common/iop_order.h"#include "control/signal.h"#include "develop/develop.h"#include "develop/format.h"#include "develop/imageop.h"#include "develop/pixelpipe_hb.h"#include "dtgtk/button.h"#include "dtgtk/paint.h"#include "dtgtk/togglebutton.h"#include "gui/gtk.h"#include "gui/presets.h"#include "libs/lib.h"#include <gtk/gtk.h>#include <limits.h>#include <math.h>#include <stdlib.h>#include <string.h>
Include dependency graph for ioporder.c:Data Structures | |
| struct | dt_ioporder_graph_node_t |
| struct | dt_lib_ioporder_t |
Macros | |
| #define | DT_IOPORDER_GRAPH_NODE_WIDTH DT_PIXEL_APPLY_DPI(260) |
| #define | DT_IOPORDER_GRAPH_NODE_STEP DT_PIXEL_APPLY_DPI(300) |
| #define | DT_IOPORDER_GRAPH_LEFT_MARGIN DT_PIXEL_APPLY_DPI(60) |
| #define | DT_IOPORDER_GRAPH_TOP_MARGIN DT_PIXEL_APPLY_DPI(68) |
| #define | DT_IOPORDER_GRAPH_MIN_WIDTH DT_PIXEL_APPLY_DPI(640) |
| #define | DT_IOPORDER_GRAPH_HEIGHT DT_PIXEL_APPLY_DPI(540) |
| #define | DT_IOPORDER_BAND_HEIGHT DT_PIXEL_APPLY_DPI(26) |
| #define | DT_IOPORDER_MASK_ARROW_OFFSET DT_PIXEL_APPLY_DPI(12) |
| #define | DT_IOPORDER_MASK_BOTTOM_MARGIN DT_PIXEL_APPLY_DPI(56) |
Typedefs | |
| typedef enum dt_ioporder_dnd_target_t | dt_ioporder_dnd_target_t |
| typedef enum dt_ioporder_runtime_band_kind_t | dt_ioporder_runtime_band_kind_t |
| typedef struct dt_ioporder_graph_node_t | dt_ioporder_graph_node_t |
| typedef struct dt_lib_ioporder_t | dt_lib_ioporder_t |
Functions | |
| static void | _ioporder_drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, gpointer user_data) |
| Handle drag-data export for the graph node drag and drop. | |
| static void | _ioporder_drag_begin (GtkWidget *widget, GdkDragContext *context, gpointer user_data) |
| Track the module being dragged from the graph. | |
| static void | _ioporder_drag_end (GtkWidget *widget, GdkDragContext *context, gpointer user_data) |
| Reset drag feedback when the source drag ends. | |
| static gboolean | _ioporder_drag_motion (GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint time, gpointer user_data) |
| Validate the potential drop target while dragging across graph nodes. | |
| static gboolean | _ioporder_drag_drop (GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint time, gpointer user_data) |
| Request the drag payload when dropping on a graph node. | |
| static void | _ioporder_drag_leave (GtkWidget *widget, GdkDragContext *dc, guint time, gpointer user_data) |
| Clear drop feedback when leaving a graph node during drag. | |
| static void | _ioporder_drag_data_received (GtkWidget *widget, GdkDragContext *dc, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time, gpointer user_data) |
| Commit a module reorder after dropping on another graph node. | |
| static void | _ioporder_free_graph_node (gpointer data) |
| Release one graph node descriptor. | |
| static void | _ioporder_popup_destroy (GtkWidget *widget, gpointer user_data) |
| Drop cached popup widget pointers once GTK destroys the popup. | |
| static gboolean | _ioporder_module_in_history (const dt_iop_module_t *module) |
| Return TRUE when a module already exists in history. | |
| static gboolean | _ioporder_module_is_graph_visible (const dt_iop_module_t *module) |
| Apply the active-pipe visibility policy used by modulegroups. | |
| static dt_dev_pixelpipe_iop_t * | _ioporder_get_preview_piece (dt_iop_module_t *module) |
| Map a module instance to its preview-pipe piece. | |
| static const char * | _ioporder_type_to_string (const dt_iop_buffer_type_t datatype) |
| Return a human-readable datatype string for a pixel descriptor. | |
| static const char * | _ioporder_colorspace_to_string (const dt_iop_colorspace_type_t cst) |
| Return a human-readable colorspace string for a pixel descriptor. | |
| static gchar * | _ioporder_raw_flags_to_string (const dt_iop_buffer_dsc_t *dsc) |
| Format the RAW-specific flags carried by a pixel descriptor. | |
| static gchar * | _ioporder_descriptor_to_text (const char *prefix, const dt_iop_buffer_dsc_t *dsc, const char *display_colorspace) |
| Build the descriptor list shown below each module node. | |
| static dt_ioporder_runtime_band_kind_t | _ioporder_runtime_band_kind (const gboolean raw_input, const gboolean colorin_crossed, const dt_iop_module_t *module, const dt_iop_buffer_dsc_t *dsc, const gboolean after_module) |
| Classify one runtime descriptor into a stable band kind. | |
| static const char * | _ioporder_runtime_band_label (const dt_ioporder_runtime_band_kind_t kind, const dt_iop_buffer_dsc_t *dsc) |
| Return the user-visible label for one runtime band kind. | |
| static void | _ioporder_runtime_band_color (const dt_ioporder_runtime_band_kind_t kind, GdkRGBA *color) |
| Pick the color used by the colorspace lifecycle band. | |
| static gboolean | _ioporder_same_runtime_profile (const dt_iop_order_iccprofile_info_t *profile_a, const dt_iop_order_iccprofile_info_t *profile_b) |
| Compare two profile descriptors for lifecycle segment merging. | |
| static const dt_iop_order_iccprofile_info_t * | _ioporder_runtime_band_profile_info (const gboolean raw_input, const gboolean colorin_crossed, const dt_iop_module_t *module, const dt_iop_buffer_dsc_t *dsc, const gboolean after_module) |
| Pick the RGB profile metadata that matches one runtime band segment. | |
| static gchar * | _ioporder_runtime_band_text (const char *label, const dt_iop_order_iccprofile_info_t *profile_info) |
| Build the text shown in one colorspace-band segment. | |
| static gchar * | _ioporder_get_current_order_name (dt_lib_module_t *self) |
| Retrieve the display name of the current pipeline order. | |
| static void | _ioporder_refresh_toolbar (dt_lib_module_t *self) |
| Refresh the preset combo and status label in the popup toolbar. | |
| static void | _ioporder_clear_graph (dt_lib_ioporder_t *d) |
| Destroy every node widget and free the node descriptors. | |
| static void | _ioporder_set_enable_button_icon (GtkWidget *widget, dt_iop_module_t *module) |
| Apply the same enable-button icon policy used by module headers. | |
| static void | _ioporder_node_toggle_enable (GtkToggleButton *togglebutton, gpointer user_data) |
| Proxy the module enable state through the real darkroom header widget. | |
| static void | _ioporder_node_toggle_mask (GtkToggleButton *togglebutton, gpointer user_data) |
| Proxy raster/drawn mask preview toggling through the real module header. | |
| static void | _ioporder_node_show_presets (GtkButton *button, gpointer user_data) |
| Open the standard module preset popup from a graph node. | |
| static dt_ioporder_graph_node_t * | _ioporder_create_graph_node (dt_iop_module_t *module, dt_dev_pixelpipe_iop_t *piece, const char *display_in, const char *display_out) |
| Create one interactive graph node mirroring a module header. | |
| static dt_ioporder_graph_node_t * | _ioporder_create_endpoint_node (const char *label) |
| Create a compact endpoint node used for the graph boundaries. | |
| static void | _ioporder_rebuild_graph (dt_lib_module_t *self) |
| Refresh the full graph contents from the current darkroom pipeline. | |
| static void | _ioporder_draw_rounded_rect (cairo_t *cr, const double x, const double y, const double width, const double height, const double radius) |
| Draw a filled rounded rectangle. | |
| static void | _ioporder_draw_label (GtkWidget *widget, cairo_t *cr, const double x, const double y, const char *text) |
| Draw a short label with the widget font on the graph background. | |
| static void | _ioporder_draw_sequence_arrow (cairo_t *cr, const double x1, const double y1, const double x2, const double y2) |
| Draw a straight sequence arrow between two consecutive module nodes. | |
| static void | _ioporder_draw_mask_arrow (GtkWidget *widget, cairo_t *cr, const double sx, const double sy, const double dx, const double dy) |
| Draw a curved raster-mask dependency arrow between two nodes. | |
| static gboolean | _ioporder_graph_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) |
| Paint the graph background, runtime bands, fences, and arrows. | |
| static void | _ioporder_add_preset (GtkButton *button, gpointer user_data) |
| Save the current pipeline order as a named preset. | |
| static void | _ioporder_reset_order (GtkButton *button, gpointer user_data) |
| Reset the current order to the default v3.0 order. | |
| static void | _ioporder_apply_preset (GtkComboBox *combo, gpointer user_data) |
| Apply the preset selected in the popup toolbar combo box. | |
| static void | _ioporder_init_popup (dt_lib_module_t *self) |
| Build the popup window lazily on first use. | |
| void | show_popup (dt_lib_module_t *self) |
| Open the popup window owned by the ioporder lib. | |
| static void | _ioporder_refresh_callback (gpointer instance, gpointer user_data) |
| Central refresh callback for develop-side state changes. | |
| static void | _ioporder_presets_changed_callback (gpointer instance, gpointer module_name, gpointer user_data) |
| Refresh the preset toolbar when ioporder presets change. | |
| const char * | name (struct dt_lib_module_t *self) |
| const char ** | views (dt_lib_module_t *self) |
| uint32_t | container (dt_lib_module_t *self) |
| int | expandable (dt_lib_module_t *self) |
| int | position () |
| void | gui_init (dt_lib_module_t *self) |
| void | gui_cleanup (dt_lib_module_t *self) |
| void | gui_reset (dt_lib_module_t *self) |
| void | init_presets (dt_lib_module_t *self) |
| int | set_params (dt_lib_module_t *self, const void *params, int size) |
| void * | get_params (dt_lib_module_t *self, int *size) |
| gboolean | preset_autoapply (dt_lib_module_t *self) |
Variables | |
| static const GtkTargetEntry | _ioporder_target_list [] |
| static const guint | _ioporder_target_count = G_N_ELEMENTS(_ioporder_target_list) |
| #define DT_IOPORDER_BAND_HEIGHT DT_PIXEL_APPLY_DPI(26) |
| #define DT_IOPORDER_GRAPH_HEIGHT DT_PIXEL_APPLY_DPI(540) |
| #define DT_IOPORDER_GRAPH_LEFT_MARGIN DT_PIXEL_APPLY_DPI(60) |
| #define DT_IOPORDER_GRAPH_MIN_WIDTH DT_PIXEL_APPLY_DPI(640) |
| #define DT_IOPORDER_GRAPH_NODE_STEP DT_PIXEL_APPLY_DPI(300) |
| #define DT_IOPORDER_GRAPH_NODE_WIDTH DT_PIXEL_APPLY_DPI(260) |
| #define DT_IOPORDER_GRAPH_TOP_MARGIN DT_PIXEL_APPLY_DPI(68) |
| #define DT_IOPORDER_MASK_ARROW_OFFSET DT_PIXEL_APPLY_DPI(12) |
| #define DT_IOPORDER_MASK_BOTTOM_MARGIN DT_PIXEL_APPLY_DPI(56) |
| typedef enum dt_ioporder_dnd_target_t dt_ioporder_dnd_target_t |
| typedef struct dt_ioporder_graph_node_t dt_ioporder_graph_node_t |
| typedef struct dt_lib_ioporder_t dt_lib_ioporder_t |
|
static |
Save the current pipeline order as a named preset.
| button | Toolbar add-preset button. |
| user_data | The ioporder lib module. |
References _ioporder_refresh_toolbar(), d, darktable, dt_lib_module_t::data, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_free, dt_handle_dialog_enter(), dt_lib_presets_add(), DT_PIXEL_APPLY_DPI, DT_SIGNAL_PRESETS_CHANGED, dt_ui_main_window(), FALSE, darktable_t::gui, dt_lib_module_t::plugin_name, darktable_t::signals, size, TRUE, and dt_gui_gtk_t::ui.
Referenced by _ioporder_init_popup().
|
static |
Apply the preset selected in the popup toolbar combo box.
| combo | Preset selection combo box. |
| user_data | The ioporder lib module. |
References _ioporder_rebuild_graph(), d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_iop_gui_commit_iop_order_change(), dt_lib_presets_apply(), FALSE, dt_lib_module_t::plugin_name, and TRUE.
Referenced by _ioporder_init_popup().
|
static |
Destroy every node widget and free the node descriptors.
| d | Popup runtime state. |
References _ioporder_free_graph_node(), d, and IS_NULL_PTR.
Referenced by _ioporder_rebuild_graph(), and gui_cleanup().
|
static |
Return a human-readable colorspace string for a pixel descriptor.
| cst | Descriptor colorspace enum. |
References IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LAB, IOP_CS_LCH, IOP_CS_NONE, IOP_CS_RAW, IOP_CS_RGB, and IOP_CS_RGB_DISPLAY.
Referenced by _ioporder_runtime_band_label().
|
static |
Create a compact endpoint node used for the graph boundaries.
Endpoint nodes represent the pipeline source and sink, so they stay smaller, non-interactive, and visually distinct from module header replicas.
| label | User-visible endpoint label. |
References dt_capitalize_label(), dt_gui_add_class(), DT_PIXEL_APPLY_DPI, dt_ioporder_graph_node_t::endpoint_label, dt_ioporder_graph_node_t::event_box, dt_ioporder_graph_node_t::header, dt_ioporder_graph_node_t::is_endpoint, dt_ioporder_graph_node_t::title, and TRUE.
Referenced by _ioporder_rebuild_graph().
|
static |
Create one interactive graph node mirroring a module header.
| module | Module shown by the node. |
| piece | Matching preview-pipe runtime piece, if any. |
References _ioporder_descriptor_to_text(), _ioporder_node_show_presets(), _ioporder_node_toggle_enable(), _ioporder_node_toggle_mask(), _ioporder_set_enable_button_icon(), delete_underscore(), dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_pixelpipe_iop_t::dsc_out, dt_capitalize_label(), dt_dev_get_multi_name(), dt_free, dt_gui_add_class(), DT_IOPORDER_GRAPH_NODE_WIDTH, DT_PIXEL_APPLY_DPI, dtgtk_button_new(), dtgtk_cairo_paint_module_switch(), dtgtk_cairo_paint_presets(), dtgtk_cairo_paint_showmask(), dtgtk_togglebutton_new(), enable(), dt_iop_module_t::enabled, dt_ioporder_graph_node_t::event_box, FALSE, dt_ioporder_graph_node_t::header, dt_iop_module_t::hide_enable_button, dt_ioporder_graph_node_t::info_in, dt_ioporder_graph_node_t::info_out, dt_ioporder_graph_node_t::instance, dt_ioporder_graph_node_t::piece, dt_ioporder_graph_node_t::title, and TRUE.
Referenced by _ioporder_rebuild_graph().
|
static |
Build the descriptor list shown below each module node.
We keep the runtime contract explicit as a short title followed by one item per property so users can scan the in/out descriptors independently.
| prefix | User-visible list title such as "In" or "Out". |
| dsc | Descriptor to format. |
| display_colorspace | User-visible runtime lifecycle label. |
References _ioporder_raw_flags_to_string(), _ioporder_type_to_string(), dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, dt_free, IS_NULL_PTR, and dt_iop_buffer_dsc_t::processed_maximum.
Referenced by _ioporder_create_graph_node().
|
static |
Track the module being dragged from the graph.
| widget | Source node widget. |
| context | Drag context. |
| user_data | The ioporder lib module. |
References d, and dt_lib_module_t::data.
Referenced by _ioporder_rebuild_graph().
|
static |
Handle drag-data export for the graph node drag and drop.
| widget | Source node widget. |
| context | Drag context. |
| selection_data | Drag payload. |
| info | Target info id. |
| time | Event timestamp. |
| user_data | The ioporder lib module. |
Referenced by _ioporder_rebuild_graph().
|
static |
Commit a module reorder after dropping on another graph node.
This mirrors darkroom's reorder flow: update the order list, reorder the visible expander widgets, rebuild the pipe, append history, and raise the module-moved signal.
| widget | Drop target node widget. |
| dc | Drag context. |
| x | Local X coordinate. |
| y | Local Y coordinate. |
| selection_data | Drag payload. |
| info | Target info id. |
| time | Event timestamp. |
| user_data | The ioporder lib module. |
References _ioporder_rebuild_graph(), d, dt_lib_module_t::data, dt_iop_gui_move_module_after(), dt_iop_gui_move_module_before(), FALSE, dt_iop_module_t::iop_order, and TRUE.
Referenced by _ioporder_rebuild_graph().
|
static |
Request the drag payload when dropping on a graph node.
| widget | Destination node widget. |
| dc | Drag context. |
| x | Local X coordinate. |
| y | Local Y coordinate. |
| time | Event timestamp. |
| user_data | The ioporder lib module. |
References TRUE.
Referenced by _ioporder_rebuild_graph().
|
static |
Reset drag feedback when the source drag ends.
| widget | Source node widget. |
| context | Drag context. |
| user_data | The ioporder lib module. |
References d, and dt_lib_module_t::data.
Referenced by _ioporder_rebuild_graph().
|
static |
Clear drop feedback when leaving a graph node during drag.
| widget | Destination node widget. |
| dc | Drag context. |
| time | Event timestamp. |
| user_data | The ioporder lib module. |
References d, and dt_lib_module_t::data.
Referenced by _ioporder_rebuild_graph().
|
static |
Validate the potential drop target while dragging across graph nodes.
| widget | Destination node widget under the pointer. |
| dc | Drag context. |
| x | Local X coordinate. |
| y | Local Y coordinate. |
| time | Event timestamp. |
| user_data | The ioporder lib module. |
References d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_ioppr_check_can_move_after_iop(), dt_ioppr_check_can_move_before_iop(), FALSE, dt_develop_t::iop, and dt_iop_module_t::iop_order.
Referenced by _ioporder_rebuild_graph().
|
static |
Draw a short label with the widget font on the graph background.
| widget | Reference widget used to create the layout. |
| cr | Cairo context. |
| x | Left coordinate. |
| y | Top coordinate. |
| text | Text to draw. |
References IS_NULL_PTR, and x.
Referenced by _ioporder_graph_draw().
|
static |
Draw a curved raster-mask dependency arrow between two nodes.
| widget | Reference widget used to render the arrow annotation. |
| cr | Cairo context. |
| sx | Source X. |
| sy | Source Y. |
| dx | Destination X. |
| dy | Destination Y. |
References _ioporder_draw_rounded_rect(), DT_IOPORDER_MASK_BOTTOM_MARGIN, DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_showmask(), M_PI, MAX, MIN, and void().
Referenced by _ioporder_graph_draw().
|
static |
Draw a filled rounded rectangle.
| cr | Cairo context. |
| x | Left coordinate. |
| y | Top coordinate. |
| width | Rectangle width. |
| height | Rectangle height. |
| radius | Corner radius. |
References height, M_PI, MIN, r, width, and x.
Referenced by _ioporder_draw_mask_arrow(), and _ioporder_graph_draw().
|
static |
Draw a straight sequence arrow between two consecutive module nodes.
| cr | Cairo context. |
| x1 | Arrow start X. |
| y1 | Arrow start Y. |
| x2 | Arrow end X. |
| y2 | Arrow end Y. |
References DT_PIXEL_APPLY_DPI, and M_PI.
Referenced by _ioporder_graph_draw().
|
static |
Release one graph node descriptor.
Widgets are destroyed separately when clearing the fixed container, so this helper only releases the bookkeeping fields owned by the node.
| data | Node descriptor to free. |
References dt_free, dt_ioporder_graph_node_t::endpoint_label, and IS_NULL_PTR.
Referenced by _ioporder_clear_graph(), and _ioporder_popup_destroy().
|
static |
Retrieve the display name of the current pipeline order.
Built-in orders use their public name while custom orders are matched against saved presets to surface a preset name when possible.
| self | The ioporder lib module. |
References d, darktable, dt_lib_module_t::data, darktable_t::db, darktable_t::develop, dt_database_get(), DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, dt_free_gpointer(), DT_IOP_ORDER_ANSEL_RAW, DT_IOP_ORDER_CUSTOM, dt_iop_order_string(), dt_ioppr_deserialize_iop_order_list(), dt_ioppr_get_iop_order_list_kind(), dt_ioppr_serialize_text_iop_order_list(), dt_develop_t::iop_order_list, IS_NULL_PTR, kind, and name.
Referenced by _ioporder_refresh_toolbar().
|
static |
Map a module instance to its preview-pipe piece.
The runtime descriptors displayed under each node come from the preview pipe, so we scan the instantiated preview nodes and match them by module pointer.
| module | Module whose runtime piece is requested. |
References darktable, dt_dev_pixelpipe_iop_t::data, darktable_t::develop, IS_NULL_PTR, dt_dev_pixelpipe_t::nodes, and dt_develop_t::preview_pipe.
Referenced by _ioporder_rebuild_graph().
|
static |
Paint the graph background, runtime bands, fences, and arrows.
| widget | Drawing area used as graph background. |
| cr | Cairo context. |
| user_data | The ioporder lib module. |
References _ioporder_draw_label(), _ioporder_draw_mask_arrow(), _ioporder_draw_rounded_rect(), _ioporder_draw_sequence_arrow(), _ioporder_runtime_band_color(), _ioporder_runtime_band_kind(), _ioporder_runtime_band_label(), _ioporder_runtime_band_profile_info(), _ioporder_runtime_band_text(), _ioporder_same_runtime_profile(), dt_iop_buffer_dsc_t::cst, d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_image_t::dsc, dt_free, DT_IOPORDER_BAND_HEIGHT, DT_IOPORDER_MASK_ARROW_OFFSET, DT_IOPORDER_RUNTIME_BAND_NONE, DT_PIXEL_APPLY_DPI, dt_ioporder_graph_node_t::event_box, FALSE, dt_ioporder_graph_node_t::header, dt_develop_t::image_storage, IOP_CS_NONE, IOP_CS_RAW, dt_ioporder_graph_node_t::is_endpoint, IS_NULL_PTR, dt_ioporder_graph_node_t::piece, TRUE, and x.
Referenced by _ioporder_init_popup().
|
static |
Build the popup window lazily on first use.
The popup owns the toolbar and the scrollable graph surface and is kept alive for the whole darkroom session so updates only need to refresh its contents.
| self | The ioporder lib module. |
References _ioporder_add_preset(), _ioporder_apply_preset(), _ioporder_graph_draw(), _ioporder_popup_destroy(), _ioporder_rebuild_graph(), _ioporder_refresh_toolbar(), _ioporder_reset_order(), add_preset(), d, darktable, dt_lib_module_t::data, DT_IOPORDER_GRAPH_HEIGHT, DT_IOPORDER_GRAPH_MIN_WIDTH, DT_PIXEL_APPLY_DPI, dt_ui_main_window(), FALSE, darktable_t::gui, reset(), TRUE, and dt_gui_gtk_t::ui.
Referenced by show_popup().
|
static |
Return TRUE when a module already exists in history.
The graph uses the same active/history visibility policy as the active pipe tab, so we scan the history stack and look for the exact module instance.
| module | Module to test. |
References darktable, darktable_t::develop, FALSE, dt_develop_t::history, IS_NULL_PTR, and TRUE.
Referenced by _ioporder_module_is_graph_visible().
|
static |
Apply the active-pipe visibility policy used by modulegroups.
We only show visible GUI modules that are currently enabled or that already appear in history, matching the darkroom pipeline tab.
| module | Module to test. |
References _ioporder_module_in_history(), dt_iop_is_hidden(), FALSE, and IS_NULL_PTR.
Referenced by _ioporder_rebuild_graph().
|
static |
Open the standard module preset popup from a graph node.
| button | Proxy presets button clicked in the graph node. |
| user_data | Node descriptor. |
References darktable, dt_gui_menu_popup(), dt_gui_presets_popup_menu_show_for_module(), DTGTK_BUTTON, dtgtk_button_set_active(), DTGTK_IS_BUTTON, FALSE, darktable_t::gui, and dt_gui_gtk_t::presets_popup_menu.
Referenced by _ioporder_create_graph_node().
|
static |
Proxy the module enable state through the real darkroom header widget.
The proxy button keeps the graph UI consistent while delegating the actual state change to the existing module header callback chain.
| togglebutton | Proxy enable button. |
| user_data | Node descriptor. |
Referenced by _ioporder_create_graph_node().
|
static |
Proxy raster/drawn mask preview toggling through the real module header.
| togglebutton | Proxy mask-display button. |
| user_data | Node descriptor. |
Referenced by _ioporder_create_graph_node().
Drop cached popup widget pointers once GTK destroys the popup.
The popup is transient-for the main window and uses destroy-with-parent, so application shutdown may destroy it before the lib cleanup code runs. Keep the graph node bookkeeping cleanup local here while the widget ownership is still entirely on the GTK side, then invalidate every cached widget pointer so later teardown paths don't touch stale instances.
| widget | Destroyed popup window. |
| user_data | The ioporder lib private state. |
References _ioporder_free_graph_node(), d, and IS_NULL_PTR.
Referenced by _ioporder_init_popup().
|
static |
Refresh the preset toolbar when ioporder presets change.
| instance | Signal instance. |
| module_name | Plugin name carried by the preset-changed signal. |
| user_data | The ioporder lib module. |
References _ioporder_rebuild_graph(), _ioporder_refresh_toolbar(), d, dt_lib_module_t::data, and dt_lib_module_t::plugin_name.
Referenced by gui_cleanup(), and gui_init().
|
static |
Format the RAW-specific flags carried by a pixel descriptor.
| dsc | Descriptor to inspect. |
References dt_iop_buffer_dsc_t::cst, dt_iop_buffer_dsc_t::filters, IOP_CS_RAW, and IS_NULL_PTR.
Referenced by _ioporder_descriptor_to_text().
|
static |
Refresh the full graph contents from the current darkroom pipeline.
We rebuild the graph from scratch because the visible subset, runtime descriptors, mask links, and reorder boundaries all change together whenever the pipe changes.
| self | The ioporder lib module. |
References _ioporder_clear_graph(), _ioporder_create_endpoint_node(), _ioporder_create_graph_node(), _ioporder_drag_begin(), _ioporder_drag_data_get(), _ioporder_drag_data_received(), _ioporder_drag_drop(), _ioporder_drag_end(), _ioporder_drag_leave(), _ioporder_drag_motion(), _ioporder_get_preview_piece(), _ioporder_module_is_graph_visible(), _ioporder_refresh_toolbar(), _ioporder_runtime_band_kind(), _ioporder_runtime_band_label(), _ioporder_target_count, _ioporder_target_list, dt_iop_buffer_dsc_t::cst, d, darktable, dt_lib_module_t::data, darktable_t::develop, dt_image_t::dsc, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_pixelpipe_iop_t::dsc_out, DT_IOPORDER_GRAPH_HEIGHT, DT_IOPORDER_GRAPH_LEFT_MARGIN, DT_IOPORDER_GRAPH_MIN_WIDTH, DT_IOPORDER_GRAPH_NODE_STEP, DT_IOPORDER_GRAPH_NODE_WIDTH, DT_IOPORDER_GRAPH_TOP_MARGIN, DT_PIXEL_APPLY_DPI, dt_ui_main_window(), dt_ioporder_graph_node_t::event_box, FALSE, darktable_t::gui, dt_ioporder_graph_node_t::header, dt_develop_t::image_storage, dt_develop_t::iop, IOP_CS_RAW, IS_NULL_PTR, MAX, MIN, TRUE, dt_gui_gtk_t::ui, and x.
Referenced by _ioporder_apply_preset(), _ioporder_drag_data_received(), _ioporder_init_popup(), _ioporder_presets_changed_callback(), _ioporder_refresh_callback(), _ioporder_reset_order(), and show_popup().
|
static |
Central refresh callback for develop-side state changes.
| instance | Signal instance. |
| user_data | The ioporder lib module. |
References _ioporder_rebuild_graph(), d, and dt_lib_module_t::data.
Referenced by gui_cleanup(), and gui_init().
|
static |
Refresh the preset combo and status label in the popup toolbar.
The combo is rebuilt from the preset table so it always exposes the latest saved pipeline-order presets and keeps the current order selected when it matches one of them.
| self | The ioporder lib module. |
References _ioporder_get_current_order_name(), d, darktable, dt_lib_module_t::data, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, FALSE, IS_NULL_PTR, and TRUE.
Referenced by _ioporder_add_preset(), _ioporder_init_popup(), _ioporder_presets_changed_callback(), and _ioporder_rebuild_graph().
|
static |
Reset the current order to the default v3.0 order.
| button | Toolbar reset button. |
| user_data | The ioporder lib module. |
References _ioporder_rebuild_graph().
Referenced by _ioporder_init_popup().
|
static |
Pick the color used by the colorspace lifecycle band.
| kind | Stable band kind returned by _ioporder_runtime_band_kind(). |
| color | Output color. |
References DT_IOPORDER_RUNTIME_BAND_DISPLAY_RGB, DT_IOPORDER_RUNTIME_BAND_LAB, DT_IOPORDER_RUNTIME_BAND_NONE, DT_IOPORDER_RUNTIME_BAND_OTHER, DT_IOPORDER_RUNTIME_BAND_PIPELINE_RGB, DT_IOPORDER_RUNTIME_BAND_RAW, DT_IOPORDER_RUNTIME_BAND_SENSOR_RGB, DT_IOPORDER_RUNTIME_BAND_UNAVAILABLE, IS_NULL_PTR, and kind.
Referenced by _ioporder_graph_draw().
|
static |
Classify one runtime descriptor into a stable band kind.
RAW pipelines become sensor RGB before colorin and working-pipeline RGB from colorin onwards. Display RGB is now carried explicitly by the runtime descriptor itself once colorout publishes it.
| raw_input | TRUE when the source image starts as RAW. |
| colorin_crossed | TRUE when the graph already passed colorin. |
| module | Module owning the runtime piece. |
| dsc | Runtime descriptor to classify. |
| after_module | TRUE to classify the module output, FALSE for its input. |
References dt_iop_buffer_dsc_t::cst, DT_IOPORDER_RUNTIME_BAND_DISPLAY_RGB, DT_IOPORDER_RUNTIME_BAND_LAB, DT_IOPORDER_RUNTIME_BAND_OTHER, DT_IOPORDER_RUNTIME_BAND_PIPELINE_RGB, DT_IOPORDER_RUNTIME_BAND_RAW, DT_IOPORDER_RUNTIME_BAND_SENSOR_RGB, DT_IOPORDER_RUNTIME_BAND_UNAVAILABLE, IOP_CS_LAB, IOP_CS_RAW, IOP_CS_RGB, IOP_CS_RGB_DISPLAY, IS_NULL_PTR, and dt_iop_module_t::op.
Referenced by _ioporder_graph_draw(), and _ioporder_rebuild_graph().
|
static |
Return the user-visible label for one runtime band kind.
We derive labels from the stable enum so translated strings remain a pure UI concern and never drive segment merging or color decisions.
| kind | Stable runtime band kind. |
| dsc | Runtime descriptor, only used for fallback "other" colorspaces. |
References _ioporder_colorspace_to_string(), dt_iop_buffer_dsc_t::cst, DT_IOPORDER_RUNTIME_BAND_DISPLAY_RGB, DT_IOPORDER_RUNTIME_BAND_LAB, DT_IOPORDER_RUNTIME_BAND_NONE, DT_IOPORDER_RUNTIME_BAND_OTHER, DT_IOPORDER_RUNTIME_BAND_PIPELINE_RGB, DT_IOPORDER_RUNTIME_BAND_RAW, DT_IOPORDER_RUNTIME_BAND_SENSOR_RGB, DT_IOPORDER_RUNTIME_BAND_UNAVAILABLE, and kind.
Referenced by _ioporder_graph_draw(), and _ioporder_rebuild_graph().
|
static |
Pick the RGB profile metadata that matches one runtime band segment.
Runtime RGB segments can refer to the input profile before colorin, the work profile in pipeline RGB, or the output/display profile once colorout has produced display RGB.
| raw_input | TRUE when the source image starts as RAW. |
| colorin_crossed | TRUE when the graph already passed colorin. |
| module | Module owning the runtime piece. |
| dsc | Runtime descriptor to classify. |
| after_module | TRUE to classify the module output, FALSE for its input. |
References dt_iop_buffer_dsc_t::cst, darktable, darktable_t::develop, dt_iop_colorspace_is_rgb(), dt_ioppr_get_pipe_input_profile_info(), dt_ioppr_get_pipe_output_profile_info(), dt_ioppr_get_pipe_work_profile_info(), IOP_CS_RGB_DISPLAY, IS_NULL_PTR, dt_iop_module_t::op, dt_develop_t::preview_pipe, and void().
Referenced by _ioporder_graph_draw().
|
static |
Build the text shown in one colorspace-band segment.
When a runtime band is RGB-based and the pipe exposes ICC/profile metadata, we append the profile display name so the graph states both the lifecycle stage and the actual RGB basis.
| label | Runtime lifecycle label such as "pipeline RGB". |
| profile_info | Matching profile metadata. |
References DT_COLORSPACE_NONE, dt_colorspaces_get_name(), dt_iop_order_iccprofile_info_t::filename, IS_NULL_PTR, and dt_iop_order_iccprofile_info_t::type.
Referenced by _ioporder_graph_draw().
|
static |
Compare two profile descriptors for lifecycle segment merging.
RGB segments need to split when the attached profile metadata changes, even if the broad lifecycle kind stays the same. We only compare the fields that affect the label shown to the user.
| profile_a | First profile descriptor or NULL. |
| profile_b | Second profile descriptor or NULL. |
References FALSE, dt_iop_order_iccprofile_info_t::filename, IS_NULL_PTR, TRUE, and dt_iop_order_iccprofile_info_t::type.
Referenced by _ioporder_graph_draw().
|
static |
Apply the same enable-button icon policy used by module headers.
The real helper is private to imageop.c, so the graph node mirrors the same paint selection locally.
| widget | Proxy enable button. |
| module | Module represented by the proxy. |
References dtgtk_cairo_paint_module_switch(), dtgtk_cairo_paint_module_switch_on(), DTGTK_IS_TOGGLEBUTTON, DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), and dt_iop_module_t::hide_enable_button.
Referenced by _ioporder_create_graph_node().
|
static |
Return a human-readable datatype string for a pixel descriptor.
| datatype | Descriptor datatype enum. |
References TYPE_FLOAT, TYPE_UINT16, TYPE_UINT8, and TYPE_UNKNOWN.
Referenced by _ioporder_descriptor_to_text().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
References DT_UI_CONTAINER_PANEL_LEFT_CENTER.
| int expandable | ( | dt_lib_module_t * | self | ) |
| void * get_params | ( | dt_lib_module_t * | self, |
| int * | size | ||
| ) |
References darktable, darktable_t::develop, dt_ioppr_serialize_iop_order_list(), dt_develop_t::iop_order_list, and size.
| void gui_cleanup | ( | dt_lib_module_t * | self | ) |
| void gui_init | ( | dt_lib_module_t * | self | ) |
References _ioporder_presets_changed_callback(), _ioporder_refresh_callback(), d, darktable, dt_lib_module_t::data, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_SIGNAL_DEVELOP_HISTORY_CHANGE, DT_SIGNAL_DEVELOP_IMAGE_CHANGED, DT_SIGNAL_DEVELOP_INITIALIZE, DT_SIGNAL_DEVELOP_MODULE_MOVED, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, DT_SIGNAL_PRESETS_CHANGED, and darktable_t::signals.
| void gui_reset | ( | dt_lib_module_t * | self | ) |
| void init_presets | ( | dt_lib_module_t * | self | ) |
| const char * name | ( | struct dt_lib_module_t * | self | ) |
| int position | ( | ) |
| gboolean preset_autoapply | ( | dt_lib_module_t * | self | ) |
References TRUE.
| int set_params | ( | dt_lib_module_t * | self, |
| const void * | params, | ||
| int | size | ||
| ) |
| void show_popup | ( | dt_lib_module_t * | self | ) |
Open the popup window owned by the ioporder lib.
The module is now headless in the side panels, so darkroom launches the popup explicitly through the lib API instead of proxying a hidden widget.
| self | The ioporder lib module. |
References _ioporder_init_popup(), _ioporder_rebuild_graph(), d, and dt_lib_module_t::data.
| const char ** views | ( | dt_lib_module_t * | self | ) |
References v.
|
static |
Referenced by _ioporder_rebuild_graph().
|
static |
Referenced by _ioporder_rebuild_graph().