![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Everything the pixel pipeline says to whoever is watching: messages for the user, and the busy banner naming the module being processed. More...
#include <glib.h>
Include dependency graph for pipeline_notify.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | dt_pipeline_set_message_handler (dt_pipeline_message_handler_t handler) |
| Install the handler, or NULL to remove it. Messages raised with none installed are dropped. | |
| void | dt_pipeline_message (const char *format,...) G_GNUC_PRINTF(1 |
| Tell the user something went sideways in the pipe. Internal to the pipeline: the format string is translated at the call site. | |
| void | dt_pipeline_set_busy_handler (dt_pipeline_busy_handler_t handler) |
| void | dt_pipeline_busy_printf (const char *format,...) G_GNUC_PRINTF(1 |
| Publish what the pipe is chewing on ("Processing module `%s' ..."). | |
| void void | dt_pipeline_busy_clear (void) |
| Processing finished; clear the banner. | |
Variables | |
| G_BEGIN_DECLS typedef void(* | dt_pipeline_message_handler_t )(const char *message) |
| Receives one formatted, already-translated message for the user. Was dt_control_log() from pipeline code. | |
| void typedef void(* | dt_pipeline_busy_handler_t )(const char *message_or_null) |
| Receives the busy-banner text, or NULL when processing finished and the banner should clear. Was dt_set_main_message() under control->log_mutex plus a forced centre redraw; the handler owns both. The string is the callee's only for the duration of the call — copy it to keep it. | |
Everything the pixel pipeline says to whoever is watching: messages for the user, and the busy banner naming the module being processed.
Tiling failures, blending allocation errors, OpenCL fallbacks and the per-module progress banner were raised by the worker thread calling straight into control/ — dt_control_log(), dt_set_main_message() under control->log_mutex, forced centre redraws. That made every pure pixel file (tiling.c, blend.c, pixelpipe_gpu.c, the raster-mask transport) carry control/control.h for a handful of user-facing strings, and made the pipeline unbuildable without the control loop.
Inverted the same way as metadata/notify.h, history/notify.h and common/image_notify.h: the pipeline states the fact; whoever is running it decides what that looks like. With no handler installed — ansel-cli, a unit test — the message is dropped, which is what a headless export wants.
Both handlers are called from pipeline worker threads, exactly as the calls they replace were; dt_control_log() and dt_control_queue_redraw_center() are worker-safe today and the darktable.c handlers keep that contract.
Definition in file pipeline_notify.h.
Processing finished; clear the banner.
Definition at line 74 of file pipeline_notify.c.
References _busy_handler, and dt_pipeline_busy_handler_t.
Referenced by dt_dev_pixelpipe_process_rec().
| void dt_pipeline_busy_printf | ( | const char * | format, |
| ... | |||
| ) |
Publish what the pipe is chewing on ("Processing module `%s' ...").
| void dt_pipeline_message | ( | const char * | format, |
| ... | |||
| ) |
Tell the user something went sideways in the pipe. Internal to the pipeline: the format string is translated at the call site.
| void dt_pipeline_set_busy_handler | ( | dt_pipeline_busy_handler_t | handler | ) |
| void dt_pipeline_set_message_handler | ( | dt_pipeline_message_handler_t | handler | ) |
Install the handler, or NULL to remove it. Messages raised with none installed are dropped.
Definition at line 30 of file pipeline_notify.c.
References _message_handler.
Referenced by dt_init().
| void typedef void(* dt_pipeline_busy_handler_t) (const char *message_or_null) | ( | const char * | message_or_null | ) |
Receives the busy-banner text, or NULL when processing finished and the banner should clear. Was dt_set_main_message() under control->log_mutex plus a forced centre redraw; the handler owns both. The string is the callee's only for the duration of the call — copy it to keep it.
Definition at line 66 of file pipeline_notify.h.
Referenced by dt_pipeline_busy_clear(), and dt_pipeline_busy_printf().
| G_BEGIN_DECLS typedef void(* dt_pipeline_message_handler_t) (const char *message) | ( | const char * | message | ) |
Receives one formatted, already-translated message for the user. Was dt_control_log() from pipeline code.
Definition at line 50 of file pipeline_notify.h.
Referenced by dt_pipeline_message().